[openib-general] [RFC] [PATCH] ib_cache: do not mask upper bit when searching for a pkey
Moni Levy
monil at voltaire.com
Tue Feb 27 08:57:31 PST 2007
Sean,
On 2/26/07, Sean Hefty <sean.hefty at intel.com> wrote:
> I think the following patch would make ipoib spec compliant.
> ib_find_cached_pkey is called by ib_cm, rdma_cm, ib_srp, and ib_ipoib.
> I'm not certain what this change would do to SRP, but the ib_cm and
> rdma_cm look okay, given that non-reversible paths aren't supported
> yet anyway.
Sorry for jumping into that thread, but although this patch will make
things more spec compliant, it will break functionality we depend one.
I suggest that we first find an alternate way to enable usage of
partial partition membership before disabling that functionality at
all.
--Moni
> --
>
> ib_find_cached_pkey masks off the upper-bit of the PKey when searching
> for a match. The upper bit indicates partial or full membership. Ignoring
> the upper bit can result in a full membership PKey matching with a partial
> membership PKey. For ipoib, this can result in joining a multicast group
> that disallows communication between all members.
>
> Signed-off-by: Sean Hefty <sean.hefty at intel.com>
> ---
> drivers/infiniband/core/cache.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
> index 558c9a0..6f366c3 100644
> --- a/drivers/infiniband/core/cache.c
> +++ b/drivers/infiniband/core/cache.c
> @@ -179,7 +179,7 @@ int ib_find_cached_pkey(struct ib_device *device,
> *index = -1;
>
> for (i = 0; i < cache->table_len; ++i)
> - if ((cache->table[i] & 0x7fff) == (pkey & 0x7fff)) {
> + if (cache->table[i] == pkey) {
> *index = i;
> ret = 0;
> break;
> --
> 1.4.4.3
>
>
>
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
>
More information about the general
mailing list