STRUCT SRPT_SEND_IOCTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct srpt_send_ioctx(9) β€” the SRPT send I/O context, explained

okay so real talk, bestie β€” this page is from the Kernel API Manual, and it's about struct srpt_send_ioctx, aka the SRPT send I/O context. It's giving "one struct to rule a send" energy, and we're gonna go through every single member together, no skipping, periodt. πŸŽ€


✨ SYNOPSIS ✨

struct srpt_send_ioctx {
    struct srpt_ioctx       ioctx;
    struct srpt_rdma_ch     *ch;
    struct srpt_recv_ioctx  *recv_ioctx;
    struct srpt_rw_ctx      s_rw_ctx;
    struct srpt_rw_ctx      *rw_ctxs;
    struct scatterlist      imm_sg;
    struct ib_cqe           rdma_cqe;
    enum srpt_command_state state;
    struct se_cmd           cmd;
    u8 n_rdma;
    u8 n_rw_ctx;
    bool queue_status_only;
    u8 sense_data[TRANSPORT_SENSE_BUFFER];
 };

like, look at her. iconic. πŸ’–


🌸 Members 🌸

so these are all the fields, and yes we're doing all of them, don't scroll:

  • ioctx β€” literally "see above." that's it. that's the whole description. (the manpage said it, not me, don't come for me 😭)
  • ch β€” the channel pointer. your girl's ride-or-die link to her channel. πŸ¦‹
  • recv_ioctx β€” the receive I/O context that's associated with this here send I/O context. careful though: it's only used for processing immediate data. iykyk.
  • s_rw_ctx β€” this is the little spot where rw_ctxs points if only a single rw_ctx is needed. lowkey efficient. ✨
  • rw_ctxs β€” the RDMA read/write contexts. plural. she contains multitudes.
  • imm_sg β€” the scatterlist for immediate data. gathering them bytes.
  • rdma_cqe β€” the RDMA completion queue element. the "we're so back" notification. πŸ”₯
  • state β€” the I/O context state. main character's current mood.
  • cmd β€” the target core command data structure. the actual business.
  • n_rdma β€” number of work requests needed to transfer this ioctx. count 'em.
  • n_rw_ctx β€” the size of the rw_ctxs array. (different from n_rdma, bestie, don't mix them up πŸ’€)
  • queue_status_only β€” when this is set, you send a SCSI status back to the initiator but no data. status only. no thoughts, no head, no data.
  • sense_data β€” the sense data to be sent to the initiator. it's a u8 sense_data[TRANSPORT_SENSE_BUFFER] situation, very demure.

🫢 SEE ALSO 🫢

if you're the kind of girl who reads the whole wiki, here's the reading list β€” plus the kernel file they all live in, ./drivers/infiniband/ulp/srpt/ib_srpt.h:

  • enum srpt_command_state(9)
  • struct srpt_ioctx(9)
  • struct srpt_recv_ioctx(9)
  • enum rdma_ch_state(9)
  • struct srpt_rdma_ch(9)
  • struct srpt_nexus(9)
  • struct srpt_port_attrib(9)
  • struct srpt_tpg(9)
  • struct srpt_port_id(9)
  • struct srpt_port(9)
  • struct srpt_device(9)

go read them. i'll wait. πŸ’…


and that's the whole send I/O context, no cap. every field, every pointer, every u8, accounted for. slay. 🌈

alright bestie, that's the page! 🧚 this one came from ./drivers/infiniband/ulp/srpt, dated October 2026, and it's filed under struct srpt_send_ioctx(9) in the Kernel API Manual. mwah πŸ’œ

πŸ“¦ where this page comes from