STRUCT FC_RPORT_PRIV(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿฆ‹ NAME ๐Ÿฆ‹

struct fc_rport_priv โ€” the libfc remote port + discovery info glow-up ๐Ÿ’…

okay so this is a page from the Kernel API Manual, bestie, and it's literally all about one struct. buckle up ๐ŸŽ€


โœจ SYNOPSIS โœจ

no cap, here's the whole thing, character for character, don't touch:

struct fc_rport_priv {
    struct fc_lport             *local_port;
    struct fc_rport             *rport;
    struct kref                 kref;
    enum fc_rport_state         rp_state;
    struct fc_rport_identifiers ids;
    u16 flags;
    u16 max_seq;
    u16 disc_id;
    u16 maxframe_size;
    unsigned int                retries;
    unsigned int                major_retries;
    unsigned int                e_d_tov;
    unsigned int                r_a_tov;
    struct mutex                rp_mutex;
    struct delayed_work         retry_work;
    enum fc_rport_event         event;
    struct fc_rport_operations  *ops;
    struct list_head            peers;
    struct work_struct          event_work;
    u32 supported_classes;
    u16 prli_count;
    struct rcu_head             rcu;
    u16 sp_features;
    u8 spp_type;
    void (*lld_event_callback)(struct fc_lport *, struct fc_rport_priv
*, enum fc_rport_event);
 };

๐ŸŒธ Members ๐ŸŒธ

the way each one of these has a whole personality, honestly:

  • local_port โ€” the local port it's vibing with ๐Ÿซถ
  • rport โ€” the FC transport remote port, its main character counterpart
  • kref โ€” the reference counter, literally keeping track of who's still holding on
  • rp_state โ€” an enumeration that tracks progress of PLOGI, PRLI, and RTV exchanges ๐Ÿ“ˆ
  • ids โ€” the remote port identifiers and roles
  • flags โ€” STARTED, REC and RETRY_SUPPORTED flags ๐Ÿšฉ
  • max_seq โ€” maximum number of concurrent sequences
  • disc_id โ€” the discovery identifier
  • maxframe_size โ€” the maximum frame size ๐Ÿ“
  • retries โ€” the retry count for the current state
  • major_retries โ€” the retry count for the entire PLOGI/PRLI state machine ๐Ÿ˜ฎโ€๐Ÿ’จ
  • e_d_tov โ€” error detect timeout value (in msec)
  • r_a_tov โ€” resource allocation timeout value (in msec)
  • rp_mutex โ€” the mutex that protects the remote port ๐Ÿ”’
  • retry_work โ€” handle for retries
  • prli_count โ€” count of open PRLI sessions in providers
  • rcu โ€” structure used for freeing in an RCU-safe manner
  • lld_event_callback โ€” callback when READY, FAILED or LOGO states complete ๐Ÿ””

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

Kernel file ./include/scsi/libfc.h โ€” and like, a whole friend group:

enum fc_lport_state(9), enum fc_rport_state(9), struct fc_disc_port(9), enum fc_rport_event(9), struct fc_rport_operations(9), struct fc_rport_libfc_priv(9), struct fc_stats(9), struct fc_seq_els_data(9), struct fc_fcp_pkt(9), struct fc_seq(9), struct fc_exch(9), struct fc_disc(9), struct fc_lport(9), struct fc4_prov(9), fc_lport_test_ready(9), fc_set_wwnn(9), fc_set_wwpn(9), fc_lport_state_enter(9), fc_lport_init_stats(9), fc_lport_free_stats(9), lport_priv(9), libfc_host_alloc(9)


and that's the whole page, bestie ๐Ÿ’– that's it, that's the struct. sourced from ./include/scsi, dated October 2026, and it's the struct fc_rport_priv(9) page โ€” slay, go read the kernel source now, iykyk โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from