Re: [PATCH RFC 2/3] RDMA/srp: Post command IUs inline

From: Andrei-Alexandru Bleortu

Date: Thu Oct 15 2026 - 14:23:35 EST


On 10/15/26 Bart Van Assche wrote:
> A table like the above makes maintenance of the RDMA subsystem harder
> than necessary. Shouldn't a mechanism be added for querying this
> information from the RDMA adapter?

Yes, the table should go. But a single value per device would not work
for mlx5. There the limit depends on the QP: the send WQE must fit in
max_wqe_sz_sq, and part of it is taken by segments whose size depends
on the QP type and create flags. Only QP creation knows the real limit.

> What changes in the RDMA core would be needed to eliminate this loop?

A new QP create flag. With it, the ULP asks for up to N bytes of inline
data, and the driver gives as much as it can, up to N, instead of
failing. The driver reports the amount in cap.max_inline_data, as mlx5,
bnxt_re and rxe already do.

The ULP still names N because inline data is not free on mlx5: it sets
the size of every send queue slot, and so the send queue's memory.

On a driver without the flag, creation can fail. The ULP then creates
the QP once more without inline data. No table or loop is left, and it
works for any QP type.

If you, Jason and Leon are fine with this, I will send the core flag
and the driver changes first, then a new version of the three ULP
patches on top.