STRUCT EMAC_DESC_RING(9)
π NAME π
struct emac_desc_ring β okay bestie, this is the software-side information for one descriptor ring. Same structure used for both RX and TX, no cap. This page is straight out of the Kernel API Manual, and it's lowkey iconic. π«Ά
β¨ SYNOPSIS β¨
The shape of it is literally:
struct emac_desc_ring {
void *desc_addr;
dma_addr_t desc_dma_addr;
u32 total_size;
u32 total_cnt;
u32 head;
u32 tail;
union {
struct emac_rx_desc_buffer *rx_desc_buf;
struct emac_tx_desc_buffer *tx_desc_buf;
};
};
π Members π
desc_addrβ virtual address to the descriptor ring memory. That's the address, bestie.desc_dma_addrβ DMA address of the descriptor ring.total_sizeβ size of ring in bytes.total_cntβ number of descriptors.headβ next descriptor to associate a buffer with.tailβ next descriptor to check status bit.{unnamed_union}β anonymous. Literally no name, just anonymous union energy. The next two live inside it, iykyk.rx_desc_bufβ array of descriptors for RX.tx_desc_bufβ array of descriptors for TX, with max of two buffers each.
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/spacemit/k1_emac.cβ go read the source, bestie, it's right there. fr fr.
xoxo π this struct emac_desc_ring(9) page came from source/version ./drivers/net/ethernet/spacemit, dated October 2026. Slay.
π¦ 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