STRUCT SRPT_RDMA_CH(9)
π 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 incq. 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 ofSRP_CMDfor immediate data.spinlockβ protectsfree_listandstate. do not skip the lock, i'm begging πstateβ the channel state. see alsoenum rdma_ch_state.rsp_buf_cacheβ thekmem_cacheforioctx_ring.ioctx_ringβ the send ring.req_buf_cacheβ thekmem_cacheforioctx_recv_ring.ioctx_recv_ringβ the receive I/O context ring.listβ the node insrpt_nexus.ch_list.cmd_wait_listβ the list of SCSI commands that arrived before the RTU event. this list containsstruct srpt_ioctxelements and is protected against concurrent modification by thecm_idspinlock. π 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 notcmd_wait_listis being processed.sessβ the session information associated with this SRP channel.sess_nameβ the session name.release_workβ allows scheduling ofsrpt_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms