linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* py verbs tests
@ 2020-10-02 21:34 Bob Pearson
  2020-10-02 21:41 ` Bob Pearson
  2020-10-08 19:07 ` Jason Gunthorpe
  0 siblings, 2 replies; 4+ messages in thread
From: Bob Pearson @ 2020-10-02 21:34 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma, Leon Romanovsky

I am currently trying to figure out why one of the pyverbs tests is failing.

I added a check implementing C9-205 (p 419) of the IBA spec. I requires that a responder receiving a packet longer
than the receive buffer or the PMTU shall be silently dropped. I.e. a class D error.

    C9-205: Before executing the request, the responder shall validate the
    Packet Length field of the LRH and the PadCnt of the BTH as described
    in 9.8.3.2.2: Responder - Length Validation.
    The following characteristics shall be validated:
    • The Length fields shall be checked to confirm that there is sufficient
    space available in the receive buffer specified by the receive WQE.
    • The packet payload length must be between zero and PMTU bytes
    inclusive in size.
    If a packet is detected with an invalid length, the request shall be an invalid
    request and it shall be silently dropped by the responder as specified in
    Section 9.9.3 Responder Side Behavior on page 435. The responder then
    waits for a new request packet.

tests/test_cq_events.py passes PATH_MTU = 1024 in the modify QPs verb for RC and XRC but not UD.
This should be a required parameter as part of the primary destination address but is not getting
set for UD. The test then proceeds to send a 1024 byte payload to the destination and for UD hangs
waiting for the completion.

I don't want to mess with these tests because I am a poor python coder. Is there some reason why it is
OK to not set the PMTU for UD QPs?

Bob

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: py verbs tests
  2020-10-02 21:34 py verbs tests Bob Pearson
@ 2020-10-02 21:41 ` Bob Pearson
  2020-10-08 19:07 ` Jason Gunthorpe
  1 sibling, 0 replies; 4+ messages in thread
From: Bob Pearson @ 2020-10-02 21:41 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma, Leon Romanovsky

On 10/2/20 4:34 PM, Bob Pearson wrote:
> I am currently trying to figure out why one of the pyverbs tests is failing.
> 
> I added a check implementing C9-205 (p 419) of the IBA spec. I requires that a responder receiving a packet longer
> than the receive buffer or the PMTU shall be silently dropped. I.e. a class D error.
> 
>     C9-205: Before executing the request, the responder shall validate the
>     Packet Length field of the LRH and the PadCnt of the BTH as described
>     in 9.8.3.2.2: Responder - Length Validation.
>     The following characteristics shall be validated:
>     • The Length fields shall be checked to confirm that there is sufficient
>     space available in the receive buffer specified by the receive WQE.
>     • The packet payload length must be between zero and PMTU bytes
>     inclusive in size.
>     If a packet is detected with an invalid length, the request shall be an invalid
>     request and it shall be silently dropped by the responder as specified in
>     Section 9.9.3 Responder Side Behavior on page 435. The responder then
>     waits for a new request packet.
> 
> tests/test_cq_events.py passes PATH_MTU = 1024 in the modify QPs verb for RC and XRC but not UD.
> This should be a required parameter as part of the primary destination address but is not getting
> set for UD. The test then proceeds to send a 1024 byte payload to the destination and for UD hangs
> waiting for the completion.
> 
> I don't want to mess with these tests because I am a poor python coder. Is there some reason why it is
> OK to not set the PMTU for UD QPs?
> 
> Bob
> 

Duh. It's not connected therefore there is no path and thus no path mtu.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: py verbs tests
  2020-10-02 21:34 py verbs tests Bob Pearson
  2020-10-02 21:41 ` Bob Pearson
@ 2020-10-08 19:07 ` Jason Gunthorpe
       [not found]   ` <585b94bf-cd80-f135-0823-b68c7ce9fcdb@nvidia.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2020-10-08 19:07 UTC (permalink / raw)
  To: Bob Pearson; +Cc: linux-rdma, Leon Romanovsky, Edward Srouji

On Fri, Oct 02, 2020 at 04:34:22PM -0500, Bob Pearson wrote:
> I am currently trying to figure out why one of the pyverbs tests is failing.
> 
> I added a check implementing C9-205 (p 419) of the IBA spec. I requires that a responder receiving a packet longer
> than the receive buffer or the PMTU shall be silently dropped. I.e. a class D error.
> 
>     C9-205: Before executing the request, the responder shall validate the
>     Packet Length field of the LRH and the PadCnt of the BTH as described
>     in 9.8.3.2.2: Responder - Length Validation.
>     The following characteristics shall be validated:
>     • The Length fields shall be checked to confirm that there is sufficient
>     space available in the receive buffer specified by the receive WQE.
>     • The packet payload length must be between zero and PMTU bytes
>     inclusive in size.
>     If a packet is detected with an invalid length, the request shall be an invalid
>     request and it shall be silently dropped by the responder as specified in
>     Section 9.9.3 Responder Side Behavior on page 435. The responder then
>     waits for a new request packet.
> 
> tests/test_cq_events.py passes PATH_MTU = 1024 in the modify QPs verb for RC and XRC but not UD.
> This should be a required parameter as part of the primary destination address but is not getting
> set for UD. The test then proceeds to send a 1024 byte payload to the destination and for UD hangs
> waiting for the completion.
> 
> I don't want to mess with these tests because I am a poor python coder. Is there some reason why it is
> OK to not set the PMTU for UD QPs?

Edward is the person to ask about the tests..

It seems like you are right and it should be set for UD too, if it is
not set what is the default?

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: py verbs tests
       [not found]   ` <585b94bf-cd80-f135-0823-b68c7ce9fcdb@nvidia.com>
@ 2020-10-13 14:22     ` Bob Pearson
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Pearson @ 2020-10-13 14:22 UTC (permalink / raw)
  To: Edward Srouji, Jason Gunthorpe; +Cc: linux-rdma, Leon Romanovsky

On 10/12/20 5:31 AM, Edward Srouji wrote:
> 
> On 10/8/2020 10:07 PM, Jason Gunthorpe wrote:
>> On Fri, Oct 02, 2020 at 04:34:22PM -0500, Bob Pearson wrote:
>>> I am currently trying to figure out why one of the pyverbs tests is failing.
>>>
>>> I added a check implementing C9-205 (p 419) of the IBA spec. I requires that a responder receiving a packet longer
>>> than the receive buffer or the PMTU shall be silently dropped. I.e. a class D error.
>>>
>>>      C9-205: Before executing the request, the responder shall validate the
>>>      Packet Length field of the LRH and the PadCnt of the BTH as described
>>>      in 9.8.3.2.2: Responder - Length Validation.
>>>      The following characteristics shall be validated:
>>>      • The Length fields shall be checked to confirm that there is sufficient
>>>      space available in the receive buffer specified by the receive WQE.
>>>      • The packet payload length must be between zero and PMTU bytes
>>>      inclusive in size.
>>>      If a packet is detected with an invalid length, the request shall be an invalid
>>>      request and it shall be silently dropped by the responder as specified in
>>>      Section 9.9.3 Responder Side Behavior on page 435. The responder then
>>>      waits for a new request packet.
>>>
>>> tests/test_cq_events.py passes PATH_MTU = 1024 in the modify QPs verb for RC and XRC but not UD.
>>> This should be a required parameter as part of the primary destination address but is not getting
>>> set for UD. The test then proceeds to send a 1024 byte payload to the destination and for UD hangs
>>> waiting for the completion.
>>>
>>> I don't want to mess with these tests because I am a poor python coder. Is there some reason why it is
>>> OK to not set the PMTU for UD QPs?
>> Edward is the person to ask about the tests..
>>
>> It seems like you are right and it should be set for UD too, if it is
>> not set what is the default?
>>
>> Jason
> 
> AFAIK PATH_MTU (when modifying a QP) is valid only for connected types (e.g. RC/UC etc.). It's not valid for UD. If you look at the code you may see that modify_qp does not update the PMTU according to the user attribute.
> 
> There is a default PMTU set for UD (usually it's the maximum PMTU).
> 
> Edward.
> 
> 
Totally agree. Sorry for the wild goose chase. 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-13 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 21:34 py verbs tests Bob Pearson
2020-10-02 21:41 ` Bob Pearson
2020-10-08 19:07 ` Jason Gunthorpe
     [not found]   ` <585b94bf-cd80-f135-0823-b68c7ce9fcdb@nvidia.com>
2020-10-13 14:22     ` Bob Pearson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).