From: "Håkon Bugge" <haakon.bugge@oracle.com>
To: Hal Rosenstock <hal@dev.mellanox.co.il>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
Doug Ledford <dledford@redhat.com>,
Don Hiatt <don.hiatt@intel.com>, Ira Weiny <ira.weiny@intel.com>,
Sean Hefty <sean.hefty@intel.com>,
OFED mailing list <linux-rdma@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH IB/core 2/2] IB/cm: Send authentic pkey in REQ msg and check eligibility of the pkeys
Date: Tue, 15 May 2018 20:11:09 +0200 [thread overview]
Message-ID: <E41BCEAA-0204-448D-8188-ACA03932B3AC@oracle.com> (raw)
In-Reply-To: <ab0e1318-8e1a-5822-5484-33e460095830@dev.mellanox.co.il>
> On 15 May 2018, at 02:38, Hal Rosenstock <hal@dev.mellanox.co.il> wrote:
>
> On 5/14/2018 5:02 PM, Jason Gunthorpe wrote:
>> On Thu, May 10, 2018 at 05:16:28PM +0200, Håkon Bugge wrote:
>>
>>> We are talking about two things here. The PKey in the BTH and the
>>> PKey in the CM REQ payload. They differ.
>>>
>>> I am out of office, but if my memory serves me correct, the PKey in
>>> the BTH in the MAD packet will be the default PKey. Further, we have
>>> per IBTA:
>>
>> This sounds like a Linux bug.
>>
>> Linux does not do a PR to get a reversible path dedicated to the GMP> so it always uses the data flow path, thus the GMP path paramenters
>> and those in the REQ should always exactly match.
>>
>> Where is Linux setting the BTH.PKey and how did it choose to use the
>> default pkey? Lets fix that at least for sure.
Linux isn’t. The BTH.PKey is inserted by the HCA (hw or fw) coming from the P_Key table (10.9.2 in IBTA), selected by a pkey_index associated with the QP.
As per C10-133: Packets sent from the Send Queue of a GSI QP shall attach a P_Key associated with that QP, just as a P_Key is associated with nonmanagement QPs
>> Once that is fixed the rest of the series makes no sense since a REQ
>> with invalid PKey will never arrive.
>>
>> However...
>>
>> This series seems inconsistent with the spec.
>>
>> IIRC the spec doesn't say if a full or limited pkey should be placed
>> in the REQ (Hal?).
>
> CM spec for REQ just says partition key without indicating whether this
> means P_Key or just the partition (15 bits) so my read is that either
> full or limited pkey is allowed in REQ.
>
>> It is designed so that the requestor can get a
>> single reversible path and put that results into the REQ without
>> additional processing, however the PR returns only one PKey and again,
>> it is not really specified if it should be the full or limited pkey
>> (Hal?).
>
> Correct; it's not specified.
>
>> Basically this means that any pkey in the REQ could randomly be the
>> full or limited value, and that in-of-itself has not bearing on the
>> connection.
>>
>> So it is quite wrong to insist that the pkey be limited or full when
>> processing the REQ. The end port is expected to match against the
>> local table.
>
> Note that there is thorny issue with shared (physical) port
> virtualization. In shared port virtualization, the VF pkey assignment is
> a local matter. Only thing SM knows is the physical port pkeys where
> both full and limited membership of same partition is possible. It is
> conceivable that CM REQ contains limited partition key between 2 limited
> VFs and for that a new REJ reason code appears to be needed.
+1
Håkon
>
> -- Hal
>
>> The real answer to your trap problem is to fix the SM to not create
>> paths that are non-functional, that is just flat out broken SM
>> behavior.
>>
>> Jason
>>
next prev parent reply other threads:[~2018-05-15 18:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 9:30 [PATCH IB/core 0/2] Do not form IB connections between limited partition members Håkon Bugge
2018-05-09 9:30 ` [PATCH IB/core 1/2] IB/core: A full pkey is required to match a limited one Håkon Bugge
2018-05-09 9:30 ` [PATCH IB/core 2/2] IB/cm: Send authentic pkey in REQ msg and check eligibility of the pkeys Håkon Bugge
2018-05-09 11:28 ` Hal Rosenstock
2018-05-10 9:16 ` Håkon Bugge
2018-05-10 14:01 ` Hal Rosenstock
2018-05-10 15:16 ` Håkon Bugge
2018-05-10 16:54 ` Hal Rosenstock
2018-05-11 10:55 ` Håkon Bugge
2018-05-11 12:51 ` Hal Rosenstock
2018-05-14 21:04 ` Jason Gunthorpe
2018-05-14 21:02 ` Jason Gunthorpe
2018-05-15 0:38 ` Hal Rosenstock
2018-05-15 18:11 ` Håkon Bugge [this message]
2018-05-15 19:04 ` Jason Gunthorpe
2018-05-16 6:47 ` Håkon Bugge
2018-05-16 15:12 ` Jason Gunthorpe
2018-05-16 16:42 ` Hal Rosenstock
2018-05-16 16:57 ` Jason Gunthorpe
[not found] ` <151B2A36-28F0-4A88-8633-31AE7E55F848@oracle.com>
2018-05-16 18:01 ` Jason Gunthorpe
2018-05-16 18:14 ` Håkon Bugge
2018-05-16 18:16 ` Jason Gunthorpe
[not found] ` <A087A721-E596-428E-8554-FAEB4BE9B306@oracle.com>
2018-05-16 19:30 ` Hal Rosenstock
2018-05-09 18:11 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E41BCEAA-0204-448D-8188-ACA03932B3AC@oracle.com \
--to=haakon.bugge@oracle.com \
--cc=dledford@redhat.com \
--cc=don.hiatt@intel.com \
--cc=hal@dev.mellanox.co.il \
--cc=ira.weiny@intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®