[ofa-general] [PATCH for-2.6.22] ipoib/cm: fix interoperability when mtu don't match
Michael S. Tsirkin
mst at dev.mellanox.co.il
Wed Jun 20 09:22:15 PDT 2007
IoIB/CM currently rejects a connection unless the supported mtu
is >= device mtu. This breaks interoperability with implementations that
might have tweaked IPOIB_CM_MTU, and there's real no longer a reason to do so:
this is a left-over from time when we did not tweak mtu per-connection.
Fix this by making the test as permissive as possible.
Signed-off-by: Michael S. Tsirkin <mst at dev.mellanox.co.il>
---
Roland, this is an *obviously* safe fix and has important interoperability
implications. I think while not a crasher, it's appropriate for 2.6.22.
Do you agree?
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index c64249f..1fe7f66 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -759,9 +759,8 @@ static int ipoib_cm_rep_handler(struct ib_cm_id *cm_id, struct ib_cm_event *even
p->mtu = be32_to_cpu(data->mtu);
- if (p->mtu < priv->dev->mtu + IPOIB_ENCAP_LEN) {
- ipoib_warn(priv, "Rejecting connection: mtu %d < device mtu %d + 4\n",
- p->mtu, priv->dev->mtu);
+ if (p->mtu <= IPOIB_ENCAP_LEN) {
+ ipoib_warn(priv, "Rejecting connection: mtu %d <= 4\n", p->mtu);
return -EINVAL;
}
--
MST
More information about the general
mailing list