]> git.openfabrics.org - ~emulex/tmp/compat-rdma/.git/commitdiff
IB/ipoib: Change To max_cm_mtu when changing mode to connected
authorVladimir Sokolovsky <vlad@mellanox.com>
Mon, 8 Jun 2015 07:42:53 +0000 (10:42 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Mon, 8 Jun 2015 07:42:53 +0000 (10:42 +0300)
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: Vladimir Sokolovsky <vlad@mellanox.com>
linux-next-pending/0020-IB-ipoib-Change-To-max_cm_mtu-when-changing-mode-to-.patch [new file with mode: 0644]

diff --git a/linux-next-pending/0020-IB-ipoib-Change-To-max_cm_mtu-when-changing-mode-to-.patch b/linux-next-pending/0020-IB-ipoib-Change-To-max_cm_mtu-when-changing-mode-to-.patch
new file mode 100644 (file)
index 0000000..871cc91
--- /dev/null
@@ -0,0 +1,27 @@
+From: Vladimir Sokolovsky <vlad@mellanox.com>
+Subject: [PATCH] IB/ipoib: Change To max_cm_mtu when changing mode to
+ connected
+
+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: Vladimir Sokolovsky <vlad@mellanox.com>
+---
+ drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
+index xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
++++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
+@@ -241,6 +241,7 @@ int ipoib_set_mode(struct net_device *dev, const char *buf)
+                         ipoib_warn(priv, "mtu > %d will cause multicast packet drops.\n",
+                                    priv->mcast_mtu);
+ #endif
++              dev_set_mtu(dev, ipoib_cm_max_mtu(dev));
+               rtnl_unlock();
+               priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM;