diff options
author | Michael S. Tsirkin <mst@dev.mellanox.co.il> | 2007-06-20 12:22:15 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-06-21 16:38:08 -0400 |
commit | 82c3aca6ad9004169df8f2f8c0747686fe4003b3 (patch) | |
tree | ab24b09038b432e93e6afdcd660447ca1714eaa6 /drivers/infiniband | |
parent | 3ec7393a6858a1716e74aa81be6af76fd180021d (diff) |
IPoIB/cm: Fix interoperability when MTU doesn't match
IPoIB connected mode currently rejects a connection request unless the
supported MTU is >= the local netdevice 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 test
is just a leftover from 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@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index c64249f7caed..472c632ee52c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -759,9 +759,9 @@ static int ipoib_cm_rep_handler(struct ib_cm_id *cm_id, struct ib_cm_event *even | |||
759 | 759 | ||
760 | p->mtu = be32_to_cpu(data->mtu); | 760 | p->mtu = be32_to_cpu(data->mtu); |
761 | 761 | ||
762 | if (p->mtu < priv->dev->mtu + IPOIB_ENCAP_LEN) { | 762 | if (p->mtu <= IPOIB_ENCAP_LEN) { |
763 | ipoib_warn(priv, "Rejecting connection: mtu %d < device mtu %d + 4\n", | 763 | ipoib_warn(priv, "Rejecting connection: mtu %d <= %d\n", |
764 | p->mtu, priv->dev->mtu); | 764 | p->mtu, IPOIB_ENCAP_LEN); |
765 | return -EINVAL; | 765 | return -EINVAL; |
766 | } | 766 | } |
767 | 767 | ||