STRUCT NFP_NET_TX_RING(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct nfp_net_tx_ring(9) β€” the TX ring glow-up πŸŽ€

okay bestie, welcome to the Kernel API Manual entry for struct nfp_net_tx_ring. this is the whole TX ring structure, and honestly? it's giving organized. every field, every union, every little pointer β€” we're covering it all, no skips, no cap. πŸ¦‹


✨ NAME ✨

struct nfp_net_tx_ring β€” the TX ring structure, periodt. this is the data structure, it's the whole vibe, it's the main character. πŸ’œ


🌸 SYNOPSIS 🌸

here's the whole thing laid out, character for character, exactly as it lives in the header. copy it, stare at it, memorize it β€” it's all here:

struct nfp_net_tx_ring {
    struct nfp_net_r_vector *r_vec;
    u16 idx;
    u16 data_pending;
    u8 __iomem *qcp_q;
    u64 *txrwb;
    u32 cnt;
    u32 wr_p;
    u32 rd_p;
    u32 qcp_rd_p;
    u32 wr_ptr_add;
    union {
      struct nfp_nfd3_tx_buf *txbufs;
      struct nfp_nfdk_tx_buf *ktxbufs;
    };
    union {
      struct nfp_nfd3_tx_desc *txds;
      struct nfp_nfdk_tx_desc *ktxds;
    };
    int qcidx;
    dma_addr_t dma;
    size_t size;
    bool is_xdp;
 };

🫢 MEMBERS 🫢

okay so this is the good part β€” every single field, explained. drink water, stay hydrated, and let's go field by field:

  • r_vec β€” back pointer to the ring vector structure. it's the "hey, this is my parent" link. every ring knows where it came from. πŸ‘‘
  • idx β€” the ring index from Linux's perspective. that's the important qualifier, bestie, keep it.
  • data_pending β€” number of bytes added to the current block. NFDK only, so don't come for it if you're on NFD3.
  • qcp_q β€” pointer to the base of the QCP TX queue. that's the Queue Controller Peripheral queue, and it's an u8 __iomem *, iykyk.
  • txrwb β€” the TX pointer write back area. this is where the write-back happens. cute.
  • cnt β€” size of the queue, measured in number of descriptors. not bytes! descriptors. πŸ“
  • wr_p β€” the TX ring write pointer, and it's free running β€” meaning it just keeps on going, no wrapping drama here.
  • rd_p β€” the TX ring read pointer. also free running. matching set with wr_p, we love symmetry. πŸ’–
  • qcp_rd_p β€” the local copy of the QCP TX queue read pointer. it's a copy, a little snapshot, a "just in case".
  • wr_ptr_add β€” the accumulated number of buffers to add to the QCP write pointer. it's used for .xmit_more delayed kick. yes, that dot is real, that's the name, don't touch it.

🧚 the anonymous unions 🧚

  • {unnamed_union} β€” anonymous. that's it, that's the label. it's a union with no name, living its best anonymous life.
  • txbufs β€” array of transmitted TX buffers, to free on transmit. NFD3 flavor. πŸ“
  • ktxbufs β€” array of transmitted TX buffers, to free on transmit. NFDK flavor. same job, different name, different letter.
  • {unnamed_union} β€” anonymous again. second anonymous union, second chance at anonymity. iconic honestly.
  • txds β€” virtual address of the TX ring in host memory. NFD3 version.
  • ktxds β€” virtual address of the TX ring in host memory. NFDK version. same thing, k prefix, you get it. ✨

🌈 and the rest of the fields 🌈

  • qcidx β€” the Queue Controller Peripheral (QCP) queue index for the TX queue. spelled out in full because acronyms deserve lore.
  • dma β€” the DMA address of the TX ring. type is dma_addr_t, it's fancy.
  • size β€” size, in bytes, of the TX ring. and yes it's "needed to free" β€” that's the whole reason it's hanging around. lowkey essential. πŸ’€
  • is_xdp β€” a bool asking the big question: is this a XDP TX ring? yes or no, no in-between.

πŸ”₯ SEE ALSO πŸ”₯

go read these next, bestie, we're doing a whole study session:


ngl, if you skipped a field, go back. we said every detail and we meant every detail. no cap. πŸ™ˆ

and that's the page! this one came from ./drivers/net/ethernet/netrono... (the footer truncates it, not me 🫢) and it's dated October 2026 β€” future-coded of it. big slay, thanks for reading, mwah. πŸ’…πŸŽ€

πŸ“¦ where this page comes from