STRUCT SRPT_RDMA_CH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct srpt_rdma_ch(9) β€” Kernel API Manual, but make it cute ✨

okay so bestie, we're in the kernel API manual today (yes, that manual) and the star of the show is struct srpt_rdma_ch πŸŽ€


✨ NAME ✨

struct srpt_rdma_ch β€” literally just an RDMA channel. that's the whole vibe. slay. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole struct, character for character, no cap β€” don't touch a single glyph, she's perfect:

struct srpt_rdma_ch {
    struct srpt_nexus       *nexus;
    struct ib_qp            *qp;
    union {
      struct {
        struct ib_cm_id         *cm_id;
      } ib_cm;
      struct {
        struct rdma_cm_id       *cm_id;
      } rdma_cm;
    };
    struct ib_cq            *cq;
    u32 cq_size;
    struct ib_cqe           zw_cqe;
    struct rcu_head         rcu;
    struct kref             kref;
    struct completion       *closed;
    int rq_size;
    u32 max_rsp_size;
    atomic_t sq_wr_avail;
    struct srpt_port        *sport;
    int max_ti_iu_len;
    atomic_t req_lim;
    atomic_t req_lim_delta;
    u16 imm_data_offset;
    spinlock_t spinlock;
    enum rdma_ch_state      state;
    struct kmem_cache       *rsp_buf_cache;
    struct srpt_send_ioctx  **ioctx_ring;
    struct kmem_cache       *req_buf_cache;
    struct srpt_recv_ioctx  **ioctx_recv_ring;
    struct list_head        list;
    struct list_head        cmd_wait_list;
    uint16_t pkey;
    bool using_rdma_cm;
    bool processing_wait_list;
    struct se_session       *sess;
    u8 sess_name[40];
    struct work_struct      release_work;
 };

🌸 Members 🌸

okay this is the part where we meet every single field like they're members of the friend group 🫢

  • nexus β€” the I_T nexus this channel is associated with. her plus-one, basically.
  • qp β€” the IB queue pair used for communicating over this channel. the actual mouthpiece πŸ’¬
  • {unnamed_union} β€” anonymous. she has no name and she doesn't need one πŸ’…
  • ib_cm β€” see below bestie πŸ‘‡
  • ib_cm.cm_id β€” the IB CM ID associated with the channel.
  • rdma_cm β€” see below, again πŸ‘‡
  • rdma_cm.cm_id β€” the RDMA CM ID associated with the channel.
  • cq β€” the IB completion queue for this channel.
  • cq_size β€” the number of CQEs in cq. it's giving headcount πŸ”’
  • zw_cqe β€” the zero-length write CQE. tiny but iconic.
  • rcu β€” an RCU head.
  • kref β€” the kref for this channel.
  • closed β€” a completion object that will be signaled as soon as a new channel object with the same identity can be created. she tells you the moment the seat's free πŸͺ‘
  • rq_size β€” the IB receive queue size.
  • max_rsp_size β€” the maximum size of an RSP response message, in bytes.
  • sq_wr_avail β€” the number of work requests available in the send queue.
  • sport β€” a pointer to the information of the HCA port used by this channel.
  • max_ti_iu_len β€” the maximum target-to-initiator information unit length.
  • req_lim β€” the request limit: the maximum number of requests that may be sent by the initiator without having received a response. boundaries, bestie βœ‹
  • req_lim_delta β€” the number of credits not yet sent back to the initiator.
  • imm_data_offset β€” the offset from start of SRP_CMD for immediate data.
  • spinlock β€” protects free_list and state. do not skip the lock, i'm begging 😭
  • state β€” the channel state. see also enum rdma_ch_state.
  • rsp_buf_cache β€” the kmem_cache for ioctx_ring.
  • ioctx_ring β€” the send ring.
  • req_buf_cache β€” the kmem_cache for ioctx_recv_ring.
  • ioctx_recv_ring β€” the receive I/O context ring.
  • list β€” the node in srpt_nexus.ch_list.
  • cmd_wait_list β€” the list of SCSI commands that arrived before the RTU event. this list contains struct srpt_ioctx elements and is protected against concurrent modification by the cm_id spinlock. πŸ”’ very much protected, very much not to be touched by just anybody.
  • pkey β€” the P_Key of the IB partition for this SRP channel.
  • using_rdma_cm β€” whether the RDMA/CM or IB/CM is used for this channel. pick a lane, she said πŸ’β€β™€οΈ
  • processing_wait_list β€” whether or not cmd_wait_list is being processed.
  • sess β€” the session information associated with this SRP channel.
  • sess_name β€” the session name.
  • release_work β€” allows scheduling of srpt_release_channel.

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, i promise they eat πŸ”₯

Kernel file ./drivers/infiniband/ulp/srpt/ib_srpt.h enum srpt_command_state(9), struct srpt_ioctx(9), struct srpt_recv_ioctx(9), struct srpt_send_ioctx(9), enum rdma_ch_state(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)


and that's the page, bestie 🌈 mwah πŸ’‹ β€” brought to you by the fine folks at ./drivers/infiniband/ulp/srpt, dated October 2026, and titled struct srpt_rdma_ch(9) in case you forgot already πŸ™ˆ periodt ✨

πŸ“¦ where this page comes from