STRUCT EMAC_DESC_RING(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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