tb_ring_alloc_tx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_ring_alloc_tx πŸ’…

Okay so bestie, welcome to the Kernel API Manual β€” yes we're in kernel-land now, and this one is literally all about grabbing yourself a DMA ring so your Thunderbolt stuff can transmit. Iconic. Let's go πŸ¦‹


✨ NAME ✨

tb_ring_alloc_tx β€” allocate a DMA ring for transmit πŸŽ€

🌸 SYNOPSIS 🌸

struct tb_ring * tb_ring_alloc_tx (struct tb_nhi *nhi , int hop , int
size , unsigned int flags );

Like, that's the whole vibe. You hand it an NHI, a hop, a size and some flags, and it hands you back a struct tb_ring *. Simple as 🫢

πŸ’œ ARGUMENTS πŸ’œ

  • nhi β€” a pointer to the NHI that the ring is gonna be allocated for. It's giving "here's where my ring lives" 🏠
  • hop β€” the HopID (that's the ring, bestie) you want to allocate ✨
  • size β€” how many entries go in the ring. Pick a number, any number (okay, pick a sensible one) πŸ”’
  • flags β€” the flags for the ring. Flags!! Everybody loves flags 🚩

πŸ¦‹ RETURN πŸ¦‹

You get a pointer to struct tb_ring πŸ’– β€” or NULL otherwise, and no cap, NULL means it did not work out 😭

⭐ SEE ALSO ⭐

Kernel file ./drivers/thunderbolt/nhi.c β€” that's the main character file right there πŸ‘‘

Also go read these, fr fr:


Lowkey the whole ring lifecycle is in that list β€” alloc, start, poll, flush, stop, throttle. Do yourself a favour and read them together, iykyk πŸ’€

And that's a wrap, bestie πŸŽ€ this little gem lives in ./drivers/thunderbolt and the version vibes are dated October 2026 β€” slay, go allocate your rings responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from