STRUCT NVME_FC_LOCAL_PORT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct nvme_fc_local_port(9) β€” the Kernel API Manual glow-up πŸ’–

okay so bestie, we're in the Kernel API Manual, section 9, and today's main character is struct nvme_fc_local_port πŸŽ€ β€” no cap, this one's lowkey iconic if you're into NVME-FC. πŸ¦‹


✨ NAME ✨

struct nvme_fc_local_port β€” the structure that sits between the NVME-FC transport and a LLDD, and it's the thing that references a local NVME host port. It's allocated and created for you by the nvme_fc_register_localport() transport interface, so like… you don't have to do it yourself, bestie 🫢


🌸 SYNOPSIS 🌸

struct nvme_fc_local_port {
    u32 port_num;
    u32 port_role;
    u64 node_name;
    u64 port_name;
    void *private;
    u32 port_id;
    enum nvme_fc_obj_state port_state;
 };

literally just vibes and fields, periodt πŸ’…


πŸ‘‘ Members πŸ‘‘

  • port_num β€” the NVME-FC transport host port number, fr fr. πŸ”’
  • port_role β€” the NVME roles that are supported on the port (peep FC_PORT_ROLE_xxx for the whole menu, iykyk). 🎭
  • node_name β€” the FC WWNN for the port. 🌐
  • port_name β€” the FC WWPN for the port. ⭐
  • private β€” a pointer to memory that's allocated alongside the local port structure, and it's specifically for the LLDD to use. The length of that buffer corresponds to the local_priv_sz value you specified in the nvme_fc_port_template supplied by the LLDD. it's giving designated LLDD space, honestly πŸ™ˆ
  • port_id β€” the FC N_Port_ID currently assigned to the port. Upper 8 bits must be set to 0 β€” not a suggestion, bestie, that's the rule πŸ’€
  • port_state β€” the operational state of the port. 🌈

🧚 Description 🧚

There's two flavours of fields hanging out in here, and you gotta know which is which:

  • Fields with static values for the port. These get initialized by the port_info struct that was supplied to the registration call. set it and forget it energy ✨
  • Fields with dynamic values. Values may change base on link state (yes, "base" β€” we're quoting the original vibe, don't come for me 😭). The LLDD may reference these fields directly to change them. These are also initialized by the port_info struct supplied to the registration call. main character energy: always evolving πŸ’«

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/linux/nvme-fc-driver.h β€” that's the one, go read it πŸ“–
  • struct nvmefc_ls_req(9)
  • struct nvmefc_ls_rsp(9)
  • struct nvme_fc_port_info(9)
  • struct nvmefc_fcp_req(9)
  • struct nvme_fc_remote_port(9)
  • struct nvme_fc_port_template(9)
  • struct nvmet_fc_port_info(9)
  • struct nvmefc_tgt_fcp_req(9)
  • struct nvmet_fc_target_port(9)
  • struct nvmet_fc_target_template(9)

that's the whole friend group right there, go say hi πŸ«ΆπŸ’œ


ok and one last thing before you go β€” this page lives in ./include/linux, dated October 2026, and yeah it's still filed under struct nvme_fc_local_port(9). slay, go forth and register those local ports πŸ’…πŸŽ€
πŸ“¦ where this page comes from