STRUCT NVME_FC_LOCAL_PORT(9)
π 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 (peepFC_PORT_ROLE_xxxfor 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 thelocal_priv_szvalue you specified in thenvme_fc_port_templatesupplied 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_infostruct 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_infostruct 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 understruct nvme_fc_local_port(9). slay, go forth and register those local ports π π
π¦ 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