[RFC5040 question] RDMA/siw: R is set without an RDMA header for a Send-with-Invalidate error
alu a <[email protected]> Mon, 3 Aug 2026 22:19:52 +0800
| Newsgroups | org.kernel.vger.linux-rdma |
|---|---|
| Message-ID | <CAH+L_5bnerRW_shYJLaqokepgCxPzXLQJVr7+jnL3eY0e5ENaw@mail.gmail.com> |
Hello, RFC 5040 Section 4.8 says that a Terminated RDMA Header must be present when the R bit is set. Section 7.1 case 2 says that the Terminated RDMA Header is zero for errors on incoming Send messages. On Linux master commit 075b74841bd0065a3bda3440873c747938e69b68, an invalidation failure returning -EACCES is classified as an RDMAP Remote Protection Error with in_tx=0: https://github.com/torvalds/linux/blob/075b74841bd0065a3bda3440873c747938e69b68/drivers/infiniband/sw/siw/siw_qp_rx.c#L1248-L1258 siw_send_terminate() then sets M, D, and R unconditionally: https://github.com/torvalds/linux/blob/075b74841bd0065a3bda3440873c747938e69b68/drivers/infiniband/sw/siw/siw_qp.c#L427-L435 For the non-RREQ path, however, it appends only sizeof(struct iwarp_send): https://github.com/torvalds/linux/blob/075b74841bd0065a3bda3440873c747938e69b68/drivers/infiniband/sw/siw/siw_qp.c#L470-L483 That object supplies the DDP Segment Length and terminated DDP header, but no 224-bit RDMA Read Request header. The resulting Terminate therefore appears to advertise R=1 without carrying the corresponding RDMA header. Figure 10 also says that a Remote Protection Error includes an RDMA header while listing Send with Invalidate as a possible cause, which seems difficult to reconcile with the Section 4.8 prose and Section 7.1 case 2. Should R be cleared for the non-RREQ branch, or is another header representation intended here? I have not reproduced this on a live connection; this is based on static source and wire-layout analysis. This finding came from an academic source-level RFC consistency review. Best regards