diff options
author | Erez Shitrit <erezsh@mellanox.com> | 2015-06-07 13:36:11 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-07-14 20:20:13 +0300 |
commit | edcd2a7474ba3b47e54c3c9a300287342de74766 (patch) | |
tree | 8d3c0e536ea383c80a8ffb02c0e64815dd7a9059 /drivers | |
parent | c42687784b9a6b9733fee701ed236a5fe088fac4 (diff) | |
download | linux-edcd2a7474ba3b47e54c3c9a300287342de74766.tar.xz |
IB/ipoib: Set MTU to max allowed by mode when mode changes
When switching between modes (datagram / connected) change the MTU
accordingly.
datagram mode up to 4K, connected mode up to (64K - 0x10).
Signed-off-by: ELi Cohen <eli@mellanox.com>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 59604a7e5e3e..b2943c84a5dd 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -232,6 +232,7 @@ int ipoib_set_mode(struct net_device *dev, const char *buf) ipoib_warn(priv, "enabling connected mode " "will cause multicast packet drops\n"); netdev_update_features(dev); + dev_set_mtu(dev, ipoib_cm_max_mtu(dev)); rtnl_unlock(); priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM; |