STRUCT FC_EXCH(9)
okay so you opened struct fc_exch(9) from the Kernel API Manual, and itβs literally all about Fibre Channel Exchange β kernel struct edition, bestie. π
β¨
π NAME
struct fc_exch β Fibre Channel Exchange. Thatβs the name situation, periodt. π
β¨ SYNOPSIS
Hereβs the struct in all its exact glory, no cap, because we do not mess with types around here:
struct fc_exch {
spinlock_t ex_lock;
atomic_t ex_refcnt;
enum fc_class class;
struct fc_exch_mgr *em;
struct fc_exch_pool *pool;
struct list_head ex_list;
struct fc_lport *lp;
u32 esb_stat;
u8 state;
u8 fh_type;
u8 seq_id;
u8 encaps;
u16 xid;
u16 oxid;
u16 rxid;
u32 oid;
u32 sid;
u32 did;
u32 r_a_tov;
u32 f_ctl;
struct fc_seq seq;
int resp_active;
struct task_struct *resp_task;
wait_queue_head_t resp_wq;
void (*resp)(struct fc_seq *, struct fc_frame *, void *);
void *arg;
void (*destructor)(struct fc_seq *, void *);
struct delayed_work timeout_work;
};
π«Ά Members
okay bestie, member-by-member, no skips, no crumbs:
ex_lockβ Lock that protects the exchange. iconic protective energy. πex_refcntβ Reference count.classβ The class of service.emβ Exchange manager.poolβ Exchange pool.ex_listβ Handle used by the EM to track free exchanges.lpβ The local port that this exchange is on.esb_statβ ESB exchange status.stateβ The exchangeβs state.fh_typeβ The frame type.seq_idβ The next sequence ID to use.encapsβ encapsulation information for lower-level driver.xidβ The exchange ID.oxidβ Originatorβs exchange ID.rxidβ Responderβs exchange ID.oidβ Originatorβs FCID.sidβ Source FCID.didβ Destination FCID.r_a_tovβ Resource allocation time out value (in msecs).f_ctlβ F_CTL flags for the sequence.seqβ The sequence in use on this exchange.resp_activeβ Number of tasks that are concurrently executingresp.resp_taskβ Ifresp_active > 0, either the task executingresp, the task that has been interrupted to execute the soft-IRQ executingresp, orNULLif more than one task is executingrespconcurrently. yes, itβs a whole situation. πresp_wqβ Waitqueue for the tasks waiting onresp_active.respβ Callback for responses on this exchange.argβ Passed as a void pointer to therespcallback.destructorβ Called when destroying the exchange.timeout_workβ Handle for timeout handler.
π Description
Locking notes, bestie: The ex_lock protects following items: state, esb_stat, f_ctl, seq.ssb_stat, seq_id, sequence allocation. Thatβs the list, and yes you should take it seriously. π
π₯
π SEE ALSO
Kernel file ./include/scsi/libfc.h β plus the 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_rport_priv(9)struct fc_stats(9)struct fc_seq_els_data(9)struct fc_fcp_pkt(9)struct fc_seq(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)
Thatβs the page, bestie! Source/version ./include/scsi, dated October 2026, and itβs struct fc_exch(9) forever. πππ¦
π¦ 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