[ewg] [PATCH] IB/ipoib: set max CM MTU when moving to CM mode

Eli Cohen eli at dev.mellanox.co.il
Mon Jun 30 23:04:37 PDT 2008


>From fce9f2d3a91abe2df8676cd709b72c7a2c7670ed Mon Sep 17 00:00:00 2001
From: Eli Cohen <eli at mellanox.co.il>
Date: Tue, 1 Jul 2008 08:54:39 +0300
Subject: [PATCH] IB/ipoib: set max CM MTU when moving to CM mode

This will relieve the user from the need to restore CM mode MTU
every time he switchs from UD to CM mode. With the current code,
if the user fails to reset the MTU to a decent higher value, he
will get poor performance.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 82f3f2f..1ad8ef6 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1404,6 +1404,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
 		dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO);
 		priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM;
 
+		dev_set_mtu(dev, ipoib_cm_max_mtu(dev));
 		ipoib_flush_paths(dev);
 		return count;
 	}
-- 
1.5.6




More information about the ewg mailing list