Skip to contentSkip to conversation

py verbs tests

DISCUSSION Bob Pearson 2 participants 4 messages Oct 2, 2020 – Oct 13, 2020 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 23 lines · Bob Pearson

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.

Quoted 5 lines

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.

maintainer
#2 lore raw
In reply to Bob Pearson
Quoted 18 lines · Bob Pearson

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.

Quoted 7 lines

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 33 lines · Edward Srouji
Quoted 31 lines · Jason Gunthorpe
Quoted 18 lines · Bob Pearson

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.

Quoted 7 lines

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?

Quoted 9 lines
Quoted 1 line

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.