STRUCT RING_FRAME(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct ring_frame(9) ✨

okay so bestie, welcome to the Kernel API Manual entry for struct ring_frame β€” yes it's a real one, yes it's giving structured-data main character energy, and no you're not allowed to skip it πŸ’…


πŸ’– NAME πŸ’–

struct ring_frame β€” the little struct you literally use with ring_rx / ring_tx. that's it, that's the vibe πŸŽ€


🌸 SYNOPSIS 🌸

struct ring_frame {
    dma_addr_t buffer_phy;
    ring_cb callback;
    struct list_head list;
    u32 size:12;
    u32 flags:12;
    u32 eof:4;
    u32 sof:4;
 };

like, look at her. four bitfields, one list hookup, a DMA address, a callback. she's gorgeous, no notes πŸ¦‹


🫢 Members 🫢

  • buffer_phy β€” the DMA mapped address of the frame. yes it's the physical-ish one, don't come for her πŸ’œ
  • callback β€” the callback that gets called when the frame is finished. it's optional, so no pressure bestie 🌸
  • list β€” the frame gets linked to a queue using this. list_head doing what list_head does ✨
  • size β€” size of the frame in bytes. and hear me out: 0 means 4096. that's the rule, that's the lore, iykyk πŸŽ€
  • flags β€” flags for the frame, and for the deets you gotta see enum ring_desc_flags πŸ‘€
  • eof β€” end of frame, protocol defined field. not your field to define, hers πŸ’…
  • sof β€” start of frame, protocol defined field. the matching bestie to eof, we stan a pair 🫢

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/thunderbolt.h, plus the whole friend group: enum tb_security_level(9), struct tb(9), struct tb_property_dir(9), struct tb_property(9), enum tb_link_width(9), struct tb_xdomain(9), struct tb_protocol_handler(9), struct tb_service(9), struct tb_service_driver(9), struct tb_nhi(9), struct tb_ring(9), enum ring_desc_flags(9), tb_ring_rx(9), tb_ring_tx(9), tb_ring_dma_device(9) πŸ¦‹


ngl, this whole thing lives in ./include/linux and is dated October 2026, and it's filed under struct ring_frame(9). go read the header, it ate πŸ’–β­
πŸ“¦ where this page comes from