tb_ring_tx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ tb_ring_tx β€” enqueue a frame on a TX ring ✨

okay so bestie, welcome to the tb_ring_tx page from the Kernel API Manual, section 9 πŸŽ€ this is the one that shoves your frame onto a TX ring, and honestly? it's giving "one job, done slayfully" πŸ’…


🌸 SYNOPSIS 🌸

int tb_ring_tx (struct tb_ring *ring , struct ring_frame *frame );

short, sweet, and to the point β€” she ate and left no crumbs πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ring β€” the ring you're enqueueing the frame onto πŸŒ€ like, this is the destination, the main character ring itself
  • frame β€” the frame you're enqueueing πŸŽ€ the little payload that's about to go on a journey

πŸ’– DESCRIPTION πŸ’–

okay so before you even think about calling this, you gotta have these fields all set and ready to go, no cap:

  • frame->buffer
  • frame->buffer_phy
  • frame->size
  • frame->eof
  • frame->sof

those five? literally non-negotiable. set them. all of them. πŸ™ˆ

then, once the frame has been transmitted, frame->callback will be invoked ✨ so your callback is the confetti cannon at the end of the parade, got it?

and here's the plot twist 😭 β€” if ring_stop gets called after the packet has been enqueued, then frame->callback will be called with canceled set to true. so like, your frame might not make it to the party, but at least you get told about it. communication queen πŸ‘‘


⭐ RETURN ⭐

  • -ESHUTDOWN β€” if ring_stop has been called πŸ’€ the ring said "we're closed, bestie"
  • 0 β€” otherwise 🫢 everything's chill

🌈 SEE ALSO 🌈

Kernel file ./include/linux/thunderbolt.h and all her friends, fr fr:

  • 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)
  • struct ring_frame(9)
  • tb_ring_rx(9)
  • tb_ring_dma_device(9)

quick vibe check 🧚 β€” set all five frame fields before calling, or the whole thing is a no. and remember, a ring_stop after enqueue means your callback shows up with canceled = true. iconic behavior, honestly πŸ’…

and that's the page!! brought to you by the fine folks over at ./include/linux, dated October 2026 β€” mwah, drink some water, and go enqueue those frames bestie πŸ’œπŸ¦‹πŸ“

πŸ“¦ where this page comes from