Re: [PATCH IB/core 2/2] IB/cm: Send authentic pkey in REQ msg and check eligibility of the pkeys

From: Jason Gunthorpe
Date: Wed May 16 2018 - 13:28:46 EST


On Wed, May 16, 2018 at 07:46:10PM +0200, HÃkon Bugge wrote:

> OK. Lets take one example. The pkey table contains 0xFFFF, 0x8001,
> 0x0001.
>
> The wce.pkey_index is 1 (i.e., pointing to 0x8001). Now, tell me, was
> BTH.PKey 0x8001 (matches 0x8001) or was it 0x0001 (also matching
> 0x8001) ?

As far as the Linux core is concerned, it must have been 0x8001,
because the only way the pkey_index feature works properly is if
exact-match takes precedence over in-exact match.

Jason