smb2_prep_rdma_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smb2_prep_rdma_read(9) β€” Kernel API Manual, section 9 πŸŽ€

okay so bestie, gather round, because today we're looking at smb2_prep_rdma_read β€” a little kernel function from the Kernel API Manual, section 9, and honestly? it's giving "small but mighty" ✨


🌸 NAME 🌸

smb2_prep_rdma_read β€” transform an RDMA READ payload πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int smb2_prep_rdma_read (struct ksmbd_work *work , struct smb2_read_req
*req , struct smb2_read_rsp *rsp , void *data , unsigned int datalen );

like, that's the whole signature, no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • work β€” the request work item. your main character struct for this call πŸ’–
  • req β€” the READ request, and it's the one controlling encryption or signing, so it's lowkey the boss here
  • rsp β€” the READ response, and this is where the transform metadata goes to live ✨
  • data β€” the actual data that will be transferred through RDMA. the payload bestie herself 🌈
  • datalen β€” the data length, obviously, we love a straightforward queen πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

So what does it actually do? Two things, and both of them are in place:

  1. It encrypts the payload in place πŸ”₯
  2. It encodes the detached crypto metadata into the response buffer 🧚

that's it, that's the vibe. no extra steps, no drama, just crypto business handled πŸ’…


⭐ RETURN ⭐

The function returns the metadata length πŸŽ‰

But also, watch out:

  • returns zero when no transform applies πŸ™ˆ
  • or a negative errno if something went wrong 😭
ngl bestie, always check that return value. zero is a valid answer here, and negative means trouble πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

okay this list is LONG and honestly kind of iconic β€” everything from the same neighbourhood, Kernel file ./fs/smb/server/smb2pdu.c πŸ“:

like, the whole friend group showed up πŸ’€πŸ’–


and that's the page bestie!! πŸ¦‹ this one came out of ./fs/smb/server, dated October 2026, and it's filed under smb2_prep_rdma_read(9) β€” go forth and transform those payloads, you absolute icon πŸ‘‘βœ¨

πŸ“¦ where this page comes from