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

Hal Rosenstock hal.rosenstock at gmail.com
Mon Jul 23 05:54:22 PDT 2007


On 7/22/07, Moni Shoua <monisonlists at gmail.com> wrote:
>
> 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.
>
> 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)) {


Wouldn't this allow 2 limited PKeys to match though ?

-- Hal

                       *index = i;
>                        return 0;
>                }
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit
> http://openib.org/mailman/listinfo/openib-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20070723/d15abcf9/attachment.html>


More information about the general mailing list