[openib-general] [PATCH] IB/ipoib: use appropriate path selector (was Re: [PATCH for-2.6.18] IB/cma: option to limitMTUto 1K)

Michael S. Tsirkin mst at mellanox.co.il
Wed Sep 13 13:54:31 PDT 2006


> >  IPoIB sets mtu selector to >= 2K.
> 
> I don't think that's a requirement for IPoIB.

whatever MTU IPoIB needs, it should set selector appropriately.

> > I am talking about users that do not set mtu selector.
> 
> Understood.

Roland, would it make sense for this to go upstream? In my opinion,
it's important to have this in sooner rather than later since this is
a question of interoperability with SM. If we have IPoIB implementations
that don't set MTU selector appropriately, we'll need workarounds
in SM.

----

IPoIB in linux needs 2K 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..e92c3f8 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            = IB_MTU_2048;
+	path->pathrec.mtu_selector   = IB_SA_GTE;
 
 	return path;
 }

-- 
MST




More information about the general mailing list