STRUCT DMA_FENCE_CHAIN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, welcome to the Kernel API Manual β€” this is the tea on struct dma_fence_chain(9), and it is literally the blueprint for one single node in a fence chain. yes, one. it's giving "small but mighty" energy fr fr πŸŽ€


✨ NAME ✨

struct dma_fence_chain β€” a fence that represents a node of a fence chain 🌸


✨ SYNOPSIS ✨

struct dma_fence_chain {
    struct dma_fence base;
    struct dma_fence *prev;
    u64 prev_seqno;
    struct dma_fence *fence;
    union {
      struct dma_fence_cb cb;
      struct irq_work work;
    };
 };

✨ Members ✨

  • base β€” the fence base class, the whole foundation of the vibe 🫢
  • prev β€” the previous fence in the chain, aka the one that came before, holding it down πŸ‘‘
  • prev_seqno β€” the original previous seqno from before garbage collection happened. yeah, it remembers the pre-glow-up version πŸ¦‹
  • fence β€” the encapsulated fence, wrapped up cute like a little gift 🎁
  • {unnamed_union} β€” anonymous. no name, just vibes ✨
  • cb β€” the callback for signaling. this is what's used to add the callback for signaling the completion of the fence chain. Never used at the same time as the irq work β€” they do not share the aux cord, periodt πŸ’€
  • work β€” the irq work item for signaling. it's the irq work structure that lets us add the callback without running into lock inversion, which is lowkey iconic problem-solving. also never used at the same time as the callback β€” one or the other, no cap 🚫
bestie pls note: cb and work are mutually exclusive. they live in the same anonymous union and they are NOT meant to be used together. do not try to make them coexist, i'm begging πŸ™ˆ

🌈 SEE ALSO 🌈

peep the Kernel file ./include/linux/dma-fence-chain.h for the whole friend group πŸ’–


and that's the whole page bestie!! 🧚✨ this one came straight out of <purple>./include/linux</purple>, dated October 2026, section 9 of the Kernel API Manual β€” go forth and slay your fence chains πŸ’œπŸ”₯πŸ“

πŸ“¦ where this page comes from