STRUCT SRPT_DEVICE(9)
π struct srpt_device(9) β like, the whole kernel API manual but make it make sense
okay so bestie, welcome to the struct srpt_device(9) glow-up β¨ this is the kernel API manual page for struct srpt_device, and we're about to get into it. no cap, it's giving "one struct to hold all the HCA info" and honestly? iconic.
πΈ NAME πΈ
struct srpt_device β the info that SRPT keeps around for a single HCA π (yes, one whole HCA. main character energy fr fr)
π¦ SYNOPSIS π¦
like, here's the literal struct, copy-paste it exactly, do not come for me:
struct srpt_device {
struct kref refcnt;
struct ib_device *device;
struct ib_pd *pd;
u32 lkey;
struct ib_srq *srq;
struct ib_cm_id *cm_id;
int srq_size;
struct mutex sdev_mutex;
bool use_srq;
struct kmem_cache *req_buf_cache;
struct srpt_recv_ioctx **ioctx_ring;
struct ib_event_handler event_handler;
struct list_head list;
struct srpt_port port[];
};
π Members π
okay now the vibe check on every single field, no skipping, we don't do that here π«Ά
refcntβ the reference count for this device. it's literally counting refs, that's the whole job πdeviceβ a backpointer to thestruct ib_devicethat the IB core manages πpdβ the IB protection domain π‘οΈlkeyβ the L_Key (local key) that has write access to, like, all local memory π₯ big permissions energy.srqβ the per-HCA SRQ, aka the shared receive queue πcm_idβ the connection identifier β¨srq_sizeβ the SRQ size, which is... the size of the SRQ πsdev_mutexβ serializesuse_srqchanges π so like, one at a time please.use_srqβ whether or not to use SRQ. a simple yes/no king πreq_buf_cacheβ thekmem_cacheforioctx_ringbuffers π§Ί caching, but make it buffers.ioctx_ringβ per-HCA SRQ. (yes, same description assrq, I don't make the rules, I just report them π)event_handlerβ the per-HCA asynchronous IB event handler π¦ catching events, staying booked and busy.listβ the node insrpt_dev_listπ linked-list realness.portβ info about the ports owned by this HCA β (it's an array,port[], noted π)
β SEE ALSO β
go read these next, bestie, it's a whole universe:
- Kernel file
./drivers/infiniband/ulp/srpt/ib_srpt.henum 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_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)
π cute lil sign-off: this page lives in./drivers/infiniband/ulp/srpt, dated October 2026, and yeah it's stillstruct srpt_device(9)at the bottom, 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