STRUCT FC_LPORT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

Welcome to the Kernel API Manual, bestie πŸ’– β€” this page is struct fc_lport(9), aka the Local port. Short name section, maximum main-character energy πŸ‘‘.


✨ SYNOPSIS ✨

Okay so here's the exact struct, no cap β€” every field stays exactly as written:

struct fc_lport {
    struct Scsi_Host               *host;
    struct list_head               ema_list;
    struct fc_rport_priv           *dns_rdata;
    struct fc_rport_priv           *ms_rdata;
    struct fc_rport_priv           *ptp_rdata;
    void *scsi_priv;
    struct fc_disc                 disc;
    struct list_head               vports;
    struct fc_vport                *vport;
    struct libfc_function_template tt;
    u8 link_up;
    u8 qfull;
    u16 vlan;
    enum fc_lport_state            state;
    unsigned long                  boot_time;
    struct fc_host_statistics      host_stats;
    struct fc_stats __percpu       *stats;
    u8 retry_count;
    u32 port_id;
    u64 wwpn;
    u64 wwnn;
    unsigned int                   service_params;
    unsigned int                   e_d_tov;
    unsigned int                   r_a_tov;
    struct fc_els_rnid_gen         rnid_gen;
    u32 sg_supp:1;
    u32 seq_offload:1;
    u32 crc_offload:1;
    u32 lro_enabled:1;
    u32 does_npiv:1;
    u32 npiv_enabled:1;
    u32 point_to_multipoint:1;
    u32 fdmi_enabled:1;
    u32 mfs;
    u8 max_retry_count;
    u8 max_rport_retry_count;
    u16 rport_priv_size;
    u16 link_speed;
    u16 link_supported_speeds;
    u16 lro_xid;
    unsigned int                   lso_max;
    struct fc_ns_fts               fcts;
    struct mutex                   lp_mutex;
    struct list_head               list;
    struct delayed_work            retry_work;
    void *prov[FC_FC4_PROV_SIZE];
    struct list_head               lport_list;
 };

🫢 Members 🫢

Now let's go member by member, bestie. These field names are literal, so keep them exactly as shown 🌸.

  • host β€” the SCSI host associated with a local port.
  • ema_list β€” the exchange manager anchor list.
  • dns_rdata β€” the directory server remote port.
  • ms_rdata β€” the management server remote port.
  • ptp_rdata β€” point to point remote port.
  • scsi_priv β€” FCP layer internal data.
  • disc β€” discovery context.
  • vports β€” child vports if N_Port.
  • vport β€” parent vport if VN_Port.
  • tt β€” Libfc function template.
  • link_up β€” link state: 1 = link up, 0 = link down. Periodt.
  • qfull β€” queue state: 1 queue is full, 0 queue is not full.
  • state β€” identifies the state.
  • boot_time β€” timestamp indicating when the local port came online. ⏰
  • host_stats β€” SCSI host statistics.
  • stats β€” FC local port stats (the page literally has a TODO about separating libfc LLD stats).
  • retry_count β€” number of retries in the current state.
  • port_id β€” FC Port ID.
  • wwpn β€” World Wide Port Name.
  • wwnn β€” World Wide Node Name.
  • service_params β€” common service parameters.
  • e_d_tov β€” error detection timeout value.
  • r_a_tov β€” resource allocation timeout value.
  • rnid_gen β€” RNID information.
  • sg_supp β€” indicates if scatter gather is supported. ✨
  • seq_offload β€” indicates if sequence offload is supported.
  • crc_offload β€” indicates if CRC offload is supported.
  • lro_enabled β€” indicates if large receive offload is supported.
  • does_npiv β€” supports multiple vports.
  • npiv_enabled β€” switch/fabric allows NPIV.
  • mfs β€” the maximum Fibre Channel payload size.
  • max_retry_count β€” the maximum retry attempts.
  • max_rport_retry_count β€” the maximum remote port retry attempts.
  • rport_priv_size β€” size needed by driver after struct fc_rport_priv.
  • lro_xid β€” the maximum XID for LRO.
  • lso_max β€” the maximum large offload send size.
  • fcts β€” FC-4 type mask.
  • lp_mutex β€” mutex to protect the local port.
  • list β€” linkage on list of vport peers.
  • retry_work β€” handle to local port for delayed retry context.
  • prov β€” pointers available for use by passive FC-4 providers.
  • lport_list β€” linkage on module-wide list of local ports.

Tiny side note, bestie 🫢: the struct code above also has vlan, point_to_multipoint, fdmi_enabled, link_speed, and link_supported_speeds fields. This page's Members list doesn't give those individual blurbs, so I'm not inventing any tea β€” the code block is the receipts πŸ’….


🌈 SEE ALSO 🌈

The Kernel file is ./include/scsi/libfc.h β€” yes, that exact path β€” and here are all the cross-reference besties:


That's the whole manual page, bestie πŸ’– β€” source/version ./include/scsi, date October 2026, and the page is struct fc_lport(9). Mwah πŸ’‹

πŸ“¦ where this page comes from