STRUCT NFP_NET_R_VECTOR(9)
π struct nfp_net_r_vector(9) β Kernel API Manual
okay bestie, welcome to the glow-up zone β¨ this is the manual page for struct nfp_net_r_vector(9), straight out of the Kernel API Manual, and honestly? it's giving "one ring vector to rule them all" π
πΈ NAME πΈ
struct nfp_net_r_vector β the per-ring interrupt vector configuration. literally the little control center for one ring's interrupts π¦
β¨ SYNOPSIS β¨
struct nfp_net_r_vector {
struct nfp_net *nfp_net;
union {
struct napi_struct napi;
struct {
struct tasklet_struct tasklet;
struct sk_buff_head queue;
spinlock_t lock;
};
};
struct nfp_net_tx_ring *tx_ring;
struct nfp_net_rx_ring *rx_ring;
u16 irq_entry;
u16 event_ctr;
struct dim rx_dim;
struct dim tx_dim;
struct u64_stats_sync rx_sync;
u64 rx_pkts;
u64 rx_bytes;
u64 rx_drops;
u64 hw_csum_rx_ok;
u64 hw_csum_rx_inner_ok;
u64 hw_csum_rx_complete;
u64 hw_tls_rx;
u64 hw_csum_rx_error;
u64 rx_replace_buf_alloc_fail;
struct nfp_net_tx_ring *xdp_ring;
struct xsk_buff_pool *xsk_pool;
struct u64_stats_sync tx_sync;
u64 tx_pkts;
u64 tx_bytes;
u64 hw_csum_tx;
u64 hw_csum_tx_inner;
u64 tx_gather;
u64 tx_lso;
u64 hw_tls_tx;
u64 tls_tx_fallback;
u64 tls_tx_no_fallback;
u64 tx_errors;
u64 tx_busy;
u32 irq_vector;
irq_handler_t handler;
char name[IFNAMSIZ + 8];
cpumask_t affinity_mask;
};
likeβ¦ look at all those fields. she's thorough. she's organized. she has main character energy π
π§ Members π§
okay so let's meet the cast, one field at a time π
nfp_netβ backpointer to thenfp_netstructure. yes she knows her parent, slay π«Ά{unnamed_union}β anonymous. no name, no problem πnapiβ theNAPIstructure for this ring vec{unnamed_struct}β anonymous, again. mysterious. iconic πtaskletβ ctrl vNIC, the tasklet for servicing the r_vecqueueβ ctrl vNIC, the send queuelockβ ctrl vNIC, the r_vec lock that protectsqueuetx_ringβ pointer to the TX ringrx_ringβ pointer to the RX ringirq_entryβ MSI-X table entry (use this one for talking to the device) π₯event_ctrβ the number of interruptrx_dimβ dynamic interrupt moderation structure for RXtx_dimβ dynamic interrupt moderation structure for TXrx_syncβ seqlock for atomic updates of RX statsrx_pktsβ number of received packetsrx_bytesβ number of received bytesrx_dropsβ number of packets dropped on RX due to lack of resources πhw_csum_rx_okβ counter of packets where the HW checksum was OKhw_csum_rx_inner_okβ counter of packets where the inner HW checksum was OKhw_csum_rx_completeβ counter of packets withCHECKSUM_COMPLETEreportedhw_tls_rxβ number of packets with TLS decrypted by hardware πhw_csum_rx_errorβ counter of packets with bad checksums πrx_replace_buf_alloc_failβ counter of RX buffer allocation failuresxdp_ringβ pointer to an extra TX ring for XDPxsk_poolβ XSK buffer pool active on the vector queue pair (for AF_XDP)tx_syncβ seqlock for atomic updates of TX statstx_pktsβ number of Transmitted packetstx_bytesβ number of Transmitted byteshw_csum_txβ counter of packets with TX checksum offload requestedhw_csum_tx_innerβ counter of inner TX checksum offload requeststx_gatherβ counter of packets with Gather DMAtx_lsoβ counter of LSO packets senthw_tls_txβ counter of TLS packets sent with crypto offloaded to HWtls_tx_fallbackβ counter of TLS packets sent which had to be encrypted by the fallback path because packets came out of ordertls_tx_no_fallbackβ counter of TLS packets not sent because the fallback path could not encrypt them π¬tx_errorsβ how many TX errors were encounteredtx_busyβ how often was TX busy (no space)?irq_vectorβ interrupt vector number (use this one for talking to the OS)handlerβ the interrupt handler for this ring vectornameβ name of the interrupt vectoraffinity_maskβ SMP affinity mask for this vector
π Description π
so what does this whole thing even do, you ask? π«Ά this structure ties RX and TX rings to interrupt vectors and a NAPI context. that's the vibe.
heads up bestie: it currently only supports one RX and TX ring per interrupt vector β but it might be extended in the future to allow association of multiple rings per vector. no cap, that's what the docs say π
π SEE ALSO π
kernel file ./drivers/net/ethernet/netronome/nfp/nfp_net.h and also these cuties:
struct nfp_net_tx_ring(9)struct nfp_net_rx_buf(9)struct nfp_net_xsk_rx_buf(9)struct nfp_net_rx_ring(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)
aaaand that's the whole page, bestie π this little diva lives at ./drivers/net/ethernet/netrono... and the page is dated October 2026 β go forth and read your structs, 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