STRUCT FC_EXCH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 executing resp.
  • resp_task β€” If resp_active > 0, either the task executing resp, the task that has been interrupted to execute the soft-IRQ executing resp, or NULL if more than one task is executing resp concurrently. yes, it’s a whole situation. 😭
  • resp_wq β€” Waitqueue for the tasks waiting on resp_active.
  • resp β€” Callback for responses on this exchange.
  • arg β€” Passed as a void pointer to the resp callback.
  • 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:


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