]> git.ipfire.org Git - thirdparty/linux.git/commit
svcrdma: Factor out WR chain linking into helper
authorChuck Lever <chuck.lever@oracle.com>
Fri, 27 Feb 2026 14:03:32 +0000 (09:03 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
commit2239535fb062b404871556b3bbbe4e27579f5edb
treec81c2bec1400bd146a791563528f3a48a5b0a136
parentd16f060f3ee297424c0aba047b1d49208adb9318
svcrdma: Factor out WR chain linking into helper

svc_rdma_prepare_write_chunk() and svc_rdma_prepare_reply_chunk()
contain identical code for linking RDMA R/W work requests onto a
Send context's WR chain. This duplication increases maintenance
burden and risks divergent bug fixes.

Introduce svc_rdma_cc_link_wrs() to consolidate the WR chain
linking logic. The helper walks the chunk context's rwctxts list,
chains each WR via rdma_rw_ctx_wrs(), and updates the Send
context's chain head and SQE count. Completion signaling is
requested only for the tail WR (posted first).

No functional change.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/svc_rdma_rw.c