[openib-general] [PATCH] IB/ipoib: use appropriate path selector

Hal Rosenstock halr at voltaire.com
Wed Sep 13 15:37:24 PDT 2006


On Wed, 2006-09-13 at 18:08, Michael S. Tsirkin wrote:
> Quoting r. Roland Dreier <rdreier at cisco.com>:
> > Subject: Re: [PATCH] IB/ipoib: use appropriate path selector
> > 
> >     Michael> IPoIB in linux needs 2K MTU. Therefore it must set mtu
> >     Michael> selector in path record query accordingly.
> > 
> > Umm -- why does it need a 2K MTU?  As far as I know it should work
> > fine with any MTU, assuming the SA sets the MTU of the broadcast
> > multicast group correctly.
> 
> Hmm, you are right, it is just that existing implementations all
> set that to 2K.

By default yes. It can be configured.

> But there is a silent assumption that MTU of any path is >= broadcast
> multicast group MTU, and this is what I want to fix.

The spec says:
"The value (for IB MTU) assigned to the broadcast-GID must not be
greater than any physical link MTU spanned by the IPoIB subnet".
so if the broadcast group is improperly setup not to follow this, there
will be other issues. It doesn't need to be included in the PR request.

-- Hal

> Like this then? We could look at dev->mtu instead, but that's
> a couple of extra lines and I'm not sure it's worth the complexity.
> What do you think?
> 
> --
> 
> IPoIB in linux needs MTU on any path to be >= broadcast mtu.
> Therefore it must set mtu selector in path record query accordingly.
> 
> Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index cf71d2a..3bc052f 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -441,9 +441,11 @@ static struct ipoib_path *path_rec_creat
>  	INIT_LIST_HEAD(&path->neigh_list);
>  
>  	memcpy(path->pathrec.dgid.raw, gid, sizeof (union ib_gid));
> -	path->pathrec.sgid      = priv->local_gid;
> -	path->pathrec.pkey      = cpu_to_be16(priv->pkey);
> -	path->pathrec.numb_path = 1;
> +	path->pathrec.sgid           = priv->local_gid;
> +	path->pathrec.pkey           = cpu_to_be16(priv->pkey);
> +	path->pathrec.numb_path      = 1;
> +	path->pathrec.mtu            = priv->broadcast->mcmember.mtu;
> +	path->pathrec.mtu_selector   = IB_SA_GTE;
>  
>  	return path;
>  }





More information about the general mailing list