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

Michael S. Tsirkin mst at mellanox.co.il
Wed Sep 13 15:08:59 PDT 2006


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.

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

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;
 }

-- 
MST




More information about the general mailing list