STRUCT NFP_NET_TX_RING(9)
π 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 anu8 __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 withwr_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_moredelayed 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,kprefix, 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 isdma_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β aboolasking 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:
- Kernel file
./drivers/net/ethernet/netronome/nfp/nfp_net.hstruct nfp_net_rx_buf(9) struct nfp_net_xsk_rx_buf(9)struct nfp_net_rx_ring(9)struct nfp_net_r_vector(9)struct nfp_net_dp(9)struct nfp_net(9)nfp_qcp_rd_ptr_add(9)nfp_qcp_wr_ptr_add(9)nfp_qcp_rd_ptr_read(9)nfp_qcp_wr_ptr_read(9)
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
- 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