STRUCT SRPT_PORT_ID(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct srpt_port_id(9) ✨

okay bestie, we're diving into the Kernel API Manual for struct srpt_port_id and honestly? it's giving "small but mighty" πŸ’… this is the LIO RDMA port info situation, and we're gonna break it down so you can slay your kernel understanding fr fr.


πŸŽ€ NAME πŸŽ€

struct srpt_port_id β€” literally just the LIO RDMA port information, no cap. it's the struct that holds all the deets about a single (port, name) pair. iconic behavior tbh.


🌸 SYNOPSIS 🌸

okay so here's the actual structure, look at her:

struct srpt_port_id {
    struct mutex            mutex;
    struct list_head        tpg_list;
    struct se_wwn           wwn;
    char name[64];
 };

that's it. that's the whole vibe. four members, each one doing its absolute thing. periodt.


πŸ’– Members πŸ’–

let's meet the cast, bestie β€” every single one matters:

  • mutex β€” this is the bodyguard 🫢 it protects tpg_list changes. like, don't touch the list without going through the mutex first, that's the rule.
  • tpg_list β€” all the TPGs chillin' here, associated with the RDMA port name. this is the main character list ngl.
  • wwn β€” the WWN associated with the RDMA port name. world wide name energy, we love to see it ✨
  • name β€” the ASCII representation of the port name. it's a char[64] so it can hold a whole 64 characters of pure port-name identity πŸ’…

πŸ¦‹ Description πŸ¦‹

okay so here's the tea: multiple sysfs directories can be associated with a single RDMA port. wild, right? 😭 and this data structure? it represents a single (port, name) pair. so like, one struct = one pairing, and that's the whole point. it's giving "organized chaos" and honestly we're obsessed.


🌈 SEE ALSO 🌈

if you wanna keep the lore going, check these out β€” every single one, no skipping bestie:

  • 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_rdma_ch(9)
  • struct srpt_nexus(9)
  • struct srpt_port_attrib(9)
  • struct srpt_tpg(9)
  • struct srpt_port(9)
  • struct srpt_device(9)

like a whole friend group of structs and enums, and they all ate πŸ”₯


and that's the whole page, bestie πŸŽ€ courtesy of the kernel squad over in ./drivers/infiniband/ulp/srpt, last touched October 2026 β€” go off and read those sysfs directories with confidence now πŸ’œβœ¨

πŸ“¦ where this page comes from