STRUCT SRP_TARGET_PORT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct srp_target_port(9) β€” like, the whole vibe

okay bestie, so this is a page from the Kernel API Manual and it's about struct srp_target_port, which is the RDMA port in the SRP target system. that's literally the whole name. we're starting strong. πŸŽ€


✨ SYNOPSIS ✨

here's the struct, in full, exactly as it is, no cap:

struct srp_target_port {
    spinlock_t lock;
    u32 global_rkey;
    struct srp_rdma_ch      *ch;
    struct net              *net;
    u32 ch_count;
    u32 lkey;
    enum srp_target_state   state;
    uint32_t max_it_iu_size;
    unsigned int            cmd_sg_cnt;
    unsigned int            indirect_size;
    bool allow_ext_sg;
    union ib_gid            sgid;
    __be64 id_ext;
    __be64 ioc_guid;
    __be64 initiator_ext;
    u16 io_class;
    struct srp_host        *srp_host;
    struct Scsi_Host       *scsi_host;
    struct srp_rport       *rport;
    char target_name[32];
    unsigned int            scsi_id;
    unsigned int            sg_tablesize;
    unsigned int            target_can_queue;
    int mr_pool_size;
    int mr_per_cmd;
    int queue_size;
    int comp_vector;
    int tl_retry_count;
    bool using_rdma_cm;
    union {
      struct {
        __be64 service_id;
        union ib_gid            orig_dgid;
        __be16 pkey;
      } ib_cm;
      struct {
        union {
          struct sockaddr_in      ip4;
          struct sockaddr_in6     ip6;
          struct sockaddr         sa;
          struct sockaddr_storage ss;
        } src;
        union {
          struct sockaddr_in      ip4;
          struct sockaddr_in6     ip6;
          struct sockaddr         sa;
          struct sockaddr_storage ss;
        } dst;
        bool src_specified;
      } rdma_cm;
    };
    u32 rq_tmo_jiffies;
    int zero_req_lim;
    struct work_struct      tl_err_work;
    struct work_struct      remove_work;
    struct list_head        list;
    bool qp_in_error;
 };

like… look at all those fields. πŸ¦‹ the lock is a spinlock_t. the qp_in_error is a bool. the target_name gets 32 whole chars to itself. iconic behaviour honestly.


🌸 Members 🌸

so the page only spills the tea on a couple of these bad boys, and here they are:

  • comp_vector β€” this is the completion vector that the first RDMA channel created for this target port uses. the first one. the main character one. πŸ‘‘
  • {unnamed_union} β€” literally just says anonymous. that's it. that's the whole description. no notes. πŸ’€

🫢 SEE ALSO 🫢

go read these next, bestie, they're in the kernel file ./drivers/infiniband/ulp/srp/ib_srp.h:

  • struct srp_rdma_ch(9)
  • struct srp_fr_desc(9)
  • struct srp_fr_pool(9)
  • struct srp_map_state(9)

heads up: this page is genuinely light on the details β€” most of the fields above have no description on it. that's just how it is, i'm not gonna invent lore for them. πŸ™ˆ

and that's the whole thing! this one lives in ./drivers/infiniband/ulp/srp, it's part of the Kernel API Manual, and it's dated October 2026. go forth and be obsessed with your RDMA target ports, mwah πŸ’œβœ¨

πŸ“¦ where this page comes from