srpt_build_cmd_rsp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… srpt_build_cmd_rsp β€” like, the kernel API manual, but make it make sense

okay so bestie, welcome to the srpt_build_cmd_rsp(9) page β€” this is a kernel API function, section 9, and it's the one that literally builds you an SRP_RSP response πŸŽ€


✨ NAME ✨

srpt_build_cmd_rsp β€” build a SRP_RSP response. that's it, that's the whole job, and it does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

int srpt_build_cmd_rsp (struct srpt_rdma_ch *ch , struct srpt_send_ioctx
*ioctx , u64 tag , int status );

it returns an int, it takes four things, and none of them are optional, so gather them all before you call, mwah 😌


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ch β€” the RDMA channel that the request came in through. like, the exact doorway the request walked through, and yes you need it πŸ’«
  • ioctx β€” the I/O context tied to the SRP_CMD request. lowkey important: the response gets built in the buffer that ioctx->buf points at, which means this function will straight up overwrite your request data. not a drill, the request data is gone after this 🫢
  • tag β€” the tag of the request you're generating this response for. match it up correctly or it's giving chaos 🎯
  • status β€” the value that goes into the STATUS field of the SRP_RSP information unit. yes, exactly that field, capital letters and all πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does it actually do? it returns the size in bytes of the SRP_RSP response it built. that's the return value, bestie β€” bytes, not vibes πŸ“

an SRP_RSP response carries a SCSI status or service response, and if you want the full format tea you gotta read section 6.9 in the SRP r16a document β€” that's where the whole layout of an SRP_RSP response lives πŸ“–βœ¨

also, for more info about sense data, go look at SPC-2. iconic reference, no cap 🌈


πŸ’œ SEE ALSO πŸ’œ

the kernel file is right here, bestie: ./drivers/infiniband/ulp/srpt/ib_srpt.c

and here's the whole friend group, everybody say hi πŸ‘‹:


and that's the page!! 🫢 this little icon lives under ./drivers/infiniband/ulp/srpt and it's dated October 2026, so yeah, fresh off the press fr fr. go build those responses, bestie, you're gonna slay πŸ’–βœ¨

πŸ“¦ where this page comes from