[ofa-general] PATCH] IB/core: ignore membership bit when looking for a P_Key in the table

Moni Shoua monisonlists at gmail.com
Mon Jul 23 00:07:42 PDT 2007


I am resending the patch with Signed-off-by line. Sorry.
------------------------------------------------------------------

IPoIB turns on the P_Key membership bit of limited membership P_Keys
when creating a child interface. After that IPoIB looks for the full
membership P_key in the table to make the interface "RUNNING". This 
patch fixes the pkey lookup in order to match full and partial membership 
keys that belong of the same partition.

Signed-off-by: Moni Shoua <monis at voltaire.com>
---

 device.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Index: infiniband/drivers/infiniband/core/device.c
===================================================================
--- infiniband.orig/drivers/infiniband/core/device.c	2007-07-08 12:45:07.000000000 +0300
+++ infiniband/drivers/infiniband/core/device.c	2007-07-22 17:43:32.440829619 +0300
@@ -702,7 +702,7 @@ int ib_find_pkey(struct ib_device *devic
 		if (ret)
 			return ret;
 
-		if (pkey == tmp_pkey) {
+		if ((pkey & 0x7fff) == (tmp_pkey & 0x7fff)) {
 			*index = i;
 			return 0;
 		}




More information about the general mailing list