STRUCT FC_EXCH_MGR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct fc_exch_mgr(9) πŸ’…

okay so this is from the Kernel API Manual and it's genuinely one of those pages that looks scary but is actually just... the Exchange Manager. the EM. say hi 🫢


✨ NAME ✨

struct fc_exch_mgr β€” The Exchange Manager (EM). that's it, that's the name, and honestly the acronym being "EM" is kind of iconic of the kernel ngl πŸ’…


🌸 SYNOPSIS 🌸

bestie, here's the whole struct, verbatim, don't touch it:

struct fc_exch_mgr {
    struct fc_exch_pool __percpu *pool;
    mempool_t *ep_pool;
    struct fc_lport *lport;
    enum fc_class   class;
    struct kref     kref;
    u16 min_xid;
    u16 max_xid;
    u16 pool_max_index;
    struct {
      atomic_t no_free_exch;
      atomic_t no_free_exch_xid;
      atomic_t xid_not_found;
      atomic_t xid_busy;
      atomic_t seq_not_found;
      atomic_t non_bls_resp;
    } stats;
 };

like, she's got layers πŸ’œ


πŸŽ€ Members πŸŽ€

let's meet the cast, one by one, no skips:

  • pool β€” per cpu exch pool. literally each CPU gets its own little pool, main character energy per core ✨
  • ep_pool β€” reserved exchange pointers. these are the backups, the understudies, the "we planned ahead" girlies πŸŽ€
  • lport β€” local exchange port. the home base 🏠
  • class β€” default class for new sequences. the vibe new sequences get assigned by default πŸ’…
  • kref β€” reference counter. keeping track of who's still holding on 😭
  • min_xid β€” minimum exchange ID. the floor, the lower bound πŸ¦‹
  • max_xid β€” maximum exchange ID. the ceiling, the upper bound ⭐
  • pool_max_index β€” max exch array index in exch pool. biggest index allowed in the pool's exch array, periodt 🌈
  • stats β€” statistics structure. she's got receipts: no_free_exch, no_free_exch_xid, xid_not_found, xid_busy, seq_not_found, and non_bls_resp, all atomic_t πŸ’€

πŸ‘‘ Description πŸ‘‘

okay so here's the tea πŸ”₯: this structure is the center for creating exchanges and sequences. like the main hub, the group chat admin, the one who actually knows what's going on. she manages the allocation of exchange IDs πŸ‘‘ β€” that's the whole job. no cap.


🧚 SEE ALSO 🧚

genuinely obsessed with how long this list is, iykyk. it's all from the kernel file ./drivers/scsi/libfc/fc_exch.c:

like... that's a lot of friends and she loves them all 🫢


aaaand that's the page!! πŸ’– this one came out of ./drivers/scsi/libfc, dated October 2026, and the whole thing is filed under struct fc_exch_mgr(9). go read the source bestie, ily, bye πŸ¦‹βœ¨

πŸ“¦ where this page comes from