STRUCT OCELOT_FDMA_TX_RING(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct ocelot_fdma_tx_ring β€” bestie, this is the TX ring description of DCBs πŸ’… (and yes we're in struct ocelot_fdma_tx_ring(9), section 9, Kernel API Manual β€” welcome to the kernel, it's cozy here 🫢)


πŸŽ€ SYNOPSIS πŸŽ€

okay so picture the whole thing at once, it's giving very structured, very demure:

struct ocelot_fdma_tx_ring {
    struct ocelot_fdma_dcb *dcbs;
    dma_addr_t dcbs_dma;
    struct ocelot_fdma_tx_buf bufs[OCELOT_FDMA_TX_RING_SIZE];
    spinlock_t xmit_lock;
    u16 next_to_clean;
    u16 next_to_use;
 };

like… she's got pointers, she's got a DMA address, she's got a whole fixed-size array of buffers, she's got a spinlock. main character energy fr fr πŸ‘‘


🌸 Members 🌸

one member at a time, no skipping, we do not skip here πŸ’–

  • dcbs β€” the DCBs that were allocated for the ring. that's it, that's the field.
  • dcbs_dma β€” the DMA base address of those DCBs. dma_addr_t, because of course it is ✨
  • bufs β€” the list of TX buffer associated to the DCBs. it's literally struct ocelot_fdma_tx_buf bufs[OCELOT_FDMA_TX_RING_SIZE]; β€” array, fixed size, iconic.
  • xmit_lock β€” the lock for concurrent xmit access. a spinlock_t. do not forget her, she is the whole vibe check for concurrency 😭
  • next_to_clean β€” the next DCB to be cleaned in tx_cleanup. a u16. she cleans up after everyone 🧹
  • next_to_use β€” the next available DCB to send SKB. also a u16. she's the one who finds you a spot πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, iykyk, they're all in the Kernel file ./drivers/net/ethernet/mscc/ocelot_fdma.h:

  • struct ocelot_fdma_tx_buf(9)
  • struct ocelot_fdma_rx_buf(9)
  • struct ocelot_fdma_rx_ring(9)
  • struct ocelot_fdma(9)

ngl the whole squad lives in ./drivers/net/ethernet/mscc and honestly? obsessed 🌈

okay that's the page, love u, go write some drivers β€” this one's from ./drivers/net/ethernet/mscc, dated October 2026, and the header keeps chanting struct ocelot_fdma_tx_ring(9) at us like a little hype chant. periodt πŸ’œπŸŽ€

πŸ“¦ where this page comes from