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

Michael S. Tsirkin mst at mellanox.co.il
Wed Sep 13 22:35:09 PDT 2006


Quoting r. Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH] IB/ipoib: use appropriate path selector
> 
>  > +	path->pathrec.mtu            = priv->broadcast->mcmember.mtu;
>  > +	path->pathrec.mtu_selector   = IB_SA_GTE;
> 
> Does this do anything without setting the component mask of the actual request??
> 

Ugh. Correct of course. The SA I was testing against seems to have a bug.
The following is yet untested - any more obvious gotchas you can see?


diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index cf71d2a..c8e8dd3 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;
 }
@@ -464,7 +466,8 @@ static int path_rec_start(struct net_dev
 				   IB_SA_PATH_REC_DGID		|
 				   IB_SA_PATH_REC_SGID		|
 				   IB_SA_PATH_REC_NUMB_PATH	|
-				   IB_SA_PATH_REC_PKEY,
+				   IB_SA_PATH_REC_PKEY          |
+				   IB_SA_PATH_REC_MTU_SELECTOR,
 				   1000, GFP_ATOMIC,
 				   path_rec_completion,
 				   path, &path->query);


-- 
MST




More information about the general mailing list