[ofa-general] Re: [ewg] [PATCH] Subject: [PATCH] IB/ipoib: set max CM MTU when moving to CM mode

Eli Cohen eli at dev.mellanox.co.il
Mon Jul 7 00:32:56 PDT 2008


On Thu, Jul 03, 2008 at 11:53:29AM +0300, Eli Cohen wrote:

Roland,
what's your opinion about this patch?

> 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 |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index 99a4daf..eba92e7 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -1384,8 +1384,12 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
>  		ipoib_warn(priv, "enabling connected mode "
>  			   "will cause multicast packet drops\n");
>  
> +		if (ipoib_cm_max_mtu(dev) > priv->mcast_mtu)
> +			ipoib_warn(priv, "mtu > %d will cause multicast packet drops.\n",
> +				   priv->mcast_mtu);
>  		rtnl_lock();
>  		dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO);
> +		dev_set_mtu(dev, ipoib_cm_max_mtu(dev));
>  		rtnl_unlock();
>  		priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM;
>  
> -- 
> 1.5.6
> 
> _______________________________________________
> ewg mailing list
> ewg at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg



More information about the general mailing list