STRUCT NFP_NET_R_VECTOR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the nfp_net structure. yes she knows her parent, slay 🫢
  • {unnamed_union} β€” anonymous. no name, no problem πŸ’…
  • napi β€” the NAPI structure for this ring vec
  • {unnamed_struct} β€” anonymous, again. mysterious. iconic πŸ™ˆ
  • tasklet β€” ctrl vNIC, the tasklet for servicing the r_vec
  • queue β€” ctrl vNIC, the send queue
  • lock β€” ctrl vNIC, the r_vec lock that protects queue
  • tx_ring β€” pointer to the TX ring
  • rx_ring β€” pointer to the RX ring
  • irq_entry β€” MSI-X table entry (use this one for talking to the device) πŸ”₯
  • event_ctr β€” the number of interrupt
  • rx_dim β€” dynamic interrupt moderation structure for RX
  • tx_dim β€” dynamic interrupt moderation structure for TX
  • rx_sync β€” seqlock for atomic updates of RX stats
  • rx_pkts β€” number of received packets
  • rx_bytes β€” number of received bytes
  • rx_drops β€” number of packets dropped on RX due to lack of resources 😭
  • hw_csum_rx_ok β€” counter of packets where the HW checksum was OK
  • hw_csum_rx_inner_ok β€” counter of packets where the inner HW checksum was OK
  • hw_csum_rx_complete β€” counter of packets with CHECKSUM_COMPLETE reported
  • hw_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 failures
  • xdp_ring β€” pointer to an extra TX ring for XDP
  • xsk_pool β€” XSK buffer pool active on the vector queue pair (for AF_XDP)
  • tx_sync β€” seqlock for atomic updates of TX stats
  • tx_pkts β€” number of Transmitted packets
  • tx_bytes β€” number of Transmitted bytes
  • hw_csum_tx β€” counter of packets with TX checksum offload requested
  • hw_csum_tx_inner β€” counter of inner TX checksum offload requests
  • tx_gather β€” counter of packets with Gather DMA
  • tx_lso β€” counter of LSO packets sent
  • hw_tls_tx β€” counter of TLS packets sent with crypto offloaded to HW
  • tls_tx_fallback β€” counter of TLS packets sent which had to be encrypted by the fallback path because packets came out of order
  • tls_tx_no_fallback β€” counter of TLS packets not sent because the fallback path could not encrypt them 😬
  • tx_errors β€” how many TX errors were encountered
  • tx_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 vector
  • name β€” name of the interrupt vector
  • affinity_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:


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