STRUCT FC_RPORT_PRIV(9)
๐ฆ 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 counterpartkrefโ the reference counter, literally keeping track of who's still holding onrp_stateโ an enumeration that tracks progress ofPLOGI,PRLI, andRTVexchanges ๐idsโ the remote port identifiers and rolesflagsโSTARTED,RECandRETRY_SUPPORTEDflags ๐ฉmax_seqโ maximum number of concurrent sequencesdisc_idโ the discovery identifiermaxframe_sizeโ the maximum frame size ๐retriesโ the retry count for the current statemajor_retriesโ the retry count for the entirePLOGI/PRLIstate 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 retriesprli_countโ count of openPRLIsessions in providersrcuโ structure used for freeing in an RCU-safe mannerlld_event_callbackโ callback whenREADY,FAILEDorLOGOstates 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
- 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