STRUCT OCELOT_FDMA_TX_RING(9)
β¨ 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 literallystruct ocelot_fdma_tx_buf bufs[OCELOT_FDMA_TX_RING_SIZE];β array, fixed size, iconic.xmit_lockβ the lock for concurrent xmit access. aspinlock_t. do not forget her, she is the whole vibe check for concurrency πnext_to_cleanβ the next DCB to be cleaned intx_cleanup. au16. she cleans up after everyone π§Ήnext_to_useβ the next available DCB to send SKB. also au16. 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
- 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