STRUCT GSI_TRANS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct gsi_trans πŸ’… β€” a GSI transaction, bestie ✨

okay so this is a page from the Kernel API Manual about struct gsi_trans(9), which is, like, literally a GSI transaction. it's giving "kernel internals but make it cute" and honestly? we're obsessed. let's get into it πŸŽ€


🌸 NAME 🌸

struct gsi_trans β€” a GSI transaction. that's it, that's the gig ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole struct, copied exactly, no cap:

struct gsi_trans {
    struct gsi *gsi;
    u8 channel_id;
    bool cancelled;
    u8 rsvd_count;
    u8 used_count;
    u32 len;
    union {
      void *data;
      u8 cmd_opcode[IPA_COMMAND_TRANS_TRE_MAX];
    };
    struct scatterlist *sgl;
    enum dma_data_direction direction;
    refcount_t refcount;
    struct completion completion;
    u64 byte_count;
    u64 trans_count;
 };

like, look at her. main character struct energy fr fr πŸ‘‘


πŸ’– Members πŸ’–

okay bestie, field-by-field, let's go:

  • gsi β€” the GSI pointer. your ride-or-die back to the GSI, iykyk.
  • channel_id β€” channel number this transaction is associated with πŸŽ€
  • cancelled β€” if the core code sets this, it means the transaction was cancelled. dramatic but valid πŸ’€
  • rsvd_count β€” how many TREs got reserved for this transaction.
  • used_count β€” how many TREs are used β€” and yes, it could be less than rsvd_count. lowkey flexible like that ✨
  • len β€” number of bytes sent or received by the transaction.
  • {unnamed_union} β€” anonymous. she doesn't need a name, she's mysterious like that πŸ™ˆ
  • data β€” preserved but not touched by the core transaction code. hands off, she's not yours 🫢
  • cmd_opcode β€” array of command opcodes (command channel only, okay? only there πŸ’…).
  • sgl β€” an array of scatter/gather entries managed by the core code.
  • direction β€” DMA transfer direction (DMA_NONE for commands).
  • refcount β€” reference count used for destruction. this one's important, don't ghost it 😭
  • completion β€” completed when the transaction completes. yes, that's the sentence. it's giving tautology but it's correct 🌈
  • byte_count β€” TX channel byte count recorded when the transaction was committed.
  • trans_count β€” channel transaction count when committed (for BQL accounting). numbers girlies rise ⭐

πŸ”₯ Description πŸ”₯

heads up: most fields in this structure are for internal use by the transaction core code. so like, don't go poking around in there unless you know what you're doing, bestie πŸ’€

the len field gets set when the transaction is committed. and for RX transactions, it gets updated later to reflect the actual number of bytes received β€” so it's a little "we'll know when we know" situation ✨


🧚 SEE ALSO 🧚

kernel file ./drivers/net/ipa/gsi_trans.h, plus the whole friend group right here β€” go say hi:


okay that's the whole page, you ate that πŸ“ this one lives in ./drivers/net/ipa and it's dated October 2026 β€” so like, future vibes, we love that for us πŸ’œ slay, periodt, go read the actual kernel source now πŸ’…βœ¨

πŸ“¦ where this page comes from