svc_rdma_read_data_item(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… svc_rdma_read_data_item β€” from the Kernel API Manual (section 9), bestie

okay so picture this: it's a whole kernel API page, manual name is Kernel API Manual, and it lives in section 9, and the function is svc_rdma_read_data_item. yes that's a mouthful. no we're not renaming it. let's go ✨

πŸŽ€ NAME πŸŽ€

svc_rdma_read_data_item β€” literally builds RDMA Reads to go pull the data item Read chunks. that's the whole job. it's giving "fetch, but make it DMA" πŸ’…


🌸 SYNOPSIS 🌸

int svc_rdma_read_data_item (struct svc_rqst *rqstp , struct
       svc_rdma_recv_ctxt *head );

two args, one int back. short and cute. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rqstp β€” the RPC transaction context. this is your main character, the whole transaction vibe lives in here.
  • head β€” context for the ongoing I/O. yes, "head". yes, it's what it's called. moving on πŸ’€

πŸ”₯ DESCRIPTION πŸ”₯

so the chunk data lands in the page list of rqstp->rq_arg.pages. that's the destination, that's where it goes, no cap. πŸ“₯

here's the little detail nobody tells you: currently NFSD does not look at the rqstp->rq_arg.tail[0] kvec. like, at all. so because of that, the XDR round-up of the Read chunk and the trailing inline content β€” both of those β€” must be added at the end of the pagelist. both. gotta do it. πŸ™ˆ

be careful here, this is the kind of thing that bites you if you skip it β€” the round-up and the trailing inline content go at the end of the pagelist, periodt.

now the return values, and listen, these matter, here they are exactly as they come:

  • 0 β€” the RDMA Read WQEs were successfully built. slay, we're so back πŸ‘‘
  • -EINVAL β€” the client provided too many chunks or segments. rude. too much.
  • -ENOMEM β€” the rdma_rw context pool was exhausted. we ran out, it happens 😭
  • -ENOTCONN β€” posting failed, and the reason is that the connection is lost. πŸ’€
  • -EIO β€” rdma_rw initialization failed (DMA mapping, etc). something went sideways in the setup.

🌈 SEE ALSO 🌈

the kernel file, right here babes:

./net/sunrpc/xprtrdma/svc_rdma_rw.c

and the whole friend group, everyone's invited, honestly obsessed with how long this list is:


okay that's the page!! πŸ“ source is ./net/sunrpc/xprtrdma, dated October 2026, and the whole thing is filed under svc_rdma_read_data_item(9) in the Kernel API Manual β€” mwah, go read your WQEs, love u bye πŸ’–πŸ§šβ­

πŸ“¦ where this page comes from