tb_ring_alloc_tx(9)
π 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:
tb_ring_poll(9)tb_ring_poll_complete(9)tb_ring_alloc_rx(9)tb_ring_start(9)tb_ring_flush(9)tb_ring_stop(9)tb_ring_throttling(9)nhi_mailbox_cmd(9)nhi_mailbox_mode(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms