[RFC5040 question] siw: RREQ with payload is dropped without Terminate

alu a <[email protected]> Sat, 1 Aug 2026 23:26:12 +0800
Newsgroups org.kernel.vger.linux-rdma
Message-ID <CAH+L_5b2KKrm=BaNeUhWGTBkC-8U8JydMS4f5K4+13YbRgT+Vg@mail.gmail.com>
Hello,

Resending in plain text because the previous copy was rejected by the
mailing list.

RFC 5040 Figure 5 says that an RDMA Read Request cannot carry ULP payload.

On Linux master commit 8ba098e6b6ff0db8edf28528d1552be261af30d4, when
the MPA length leaves bytes after the fixed RREQ header:

- siw_proc_rreq() returns -EPROTO without calling siw_init_terminate():
https://github.com/torvalds/linux/blob/8ba098e6b6ff0db8edf28528d1552be261af30d4/drivers/infiniband/sw/siw/siw_qp_rx.c#L624-L638

- the error reaches the RREQ case in siw_rdmap_complete(), which also
does not initialize a Terminate, and the receive path then schedules
the LLP close:
https://github.com/torvalds/linux/blob/8ba098e6b6ff0db8edf28528d1552be261af30d4/drivers/infiniband/sw/siw/siw_qp_rx.c#L1318-L1323
https://github.com/torvalds/linux/blob/8ba098e6b6ff0db8edf28528d1552be261af30d4/drivers/infiniband/sw/siw/siw_qp_rx.c#L1460-L1470

The close worker calls siw_send_terminate(), but that function returns
immediately because term_info.valid was never set:
https://github.com/torvalds/linux/blob/8ba098e6b6ff0db8edf28528d1552be261af30d4/drivers/infiniband/sw/siw/siw_qp.c#L340-L378
https://github.com/torvalds/linux/blob/8ba098e6b6ff0db8edf28528d1552be261af30d4/drivers/infiniband/sw/siw/siw_cm.c#L1119-L1129

RFC 5040 Section 7.1, case 3, says that an error detected on an
incoming RDMA Read Request after DDP delivery MUST be reported with a
Terminate Message:
https://www.rfc-editor.org/rfc/rfc5040.html#section-7.1

Based on static source analysis, this appears to close the connection
without sending the required Terminate. Could you please confirm
whether the bare LLP teardown is intentional because SIW considers
this condition to be detected before formal DDP delivery, or whether
this path should initialize a Terminate before closing?

I have not reproduced this at packet level.

This finding came from an academic source-level RFC consistency review.

Best regards