STRUCT NFP_NET_DP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct nfp_net_dp β€” the NFP network device datapath data structure, aka the main character of your NIC's whole life πŸ’…

So like, quick vibe check: this is from the kernel API manual, page struct nfp_net_dp(9). Grab a boba, bestie, we're going in πŸ§‹


✨ SYNOPSIS ✨

struct nfp_net_dp {
    struct device *dev;
    struct net_device *netdev;
    u8 is_vf:1;
    u8 chained_metadata_format:1;
    u8 ktls_tx:1;
    u8 rx_dma_dir;
    u8 rx_offset;
    u32 rx_dma_off;
    u32 ctrl;
    u32 ctrl_w1;
    u32 fl_bufsz;
    struct bpf_prog *xdp_prog;
    struct nfp_net_tx_ring *tx_rings;
    struct nfp_net_rx_ring *rx_rings;
    u8 __iomem *ctrl_bar;
    const struct nfp_dp_ops *ops;
    u64 *txrwb;
    dma_addr_t txrwb_dma;
    unsigned int txd_cnt;
    unsigned int rxd_cnt;
    unsigned int num_r_vecs;
    unsigned int num_tx_rings;
    unsigned int num_stack_tx_rings;
    unsigned int num_rx_rings;
    unsigned int mtu;
    struct xsk_buff_pool **xsk_pools;
};

No cap, that's the whole struct. Every field, every bitfield, exactly as it lives in the kernel 🫢


πŸ’– Members πŸ’–

Okay so here's the group chat roll call β€” every field gets its moment πŸ”₯

  • dev β€” the backpointer to struct device. It's giving "who's your parent" energy.
  • netdev β€” backpointer to the net_device structure. Your classic "go ask my netdev" situation.
  • is_vf β€” is the driver attached to a VF? One bit, huge implications πŸ’€
  • chained_metadata_format β€” Firemware will use the new metadata format. (Yeah that's the original's spelling bestie β€” the firmware is fine, we promise 🌸)
  • ktls_tx β€” is kTLS TX enabled? Yes or no, one single bit, iconic.
  • rx_dma_dir β€” the mapping direction for RX buffers. Direction matters, always 🧭
  • rx_offset β€” offset in the RX buffers where the packet data actually starts.
  • rx_dma_off β€” offset at which DMA packets (for XDP headroom). Headroom is self-care ✨
  • ctrl β€” local copy of the control register/word.
  • ctrl_w1 β€” local copy of the control register/word1. (Yes there's a second one. There's always a second one.)
  • fl_bufsz β€” the currently configured size of the freelist buffers.
  • xdp_prog β€” the installed XDP program. Your eBPF bestie is in the building πŸ‘‘
  • tx_rings β€” an array of pre-allocated TX ring structures.
  • rx_rings β€” an array of pre-allocated RX ring structures. Matching set, slay πŸŽ€
  • ctrl_bar β€” pointer to the mapped control BAR.
  • ops β€” the callbacks and parameters for this vNIC's NFD version.
  • txrwb β€” TX pointer write back area, indexed by queue id.
  • txrwb_dma β€” the TX pointer write back area's DMA address.
  • txd_cnt β€” size of the TX ring in number of min size packets.
  • rxd_cnt β€” size of the RX ring in number of min size packets.
  • num_r_vecs β€” number of used ring vectors.
  • num_tx_rings β€” the currently configured number of TX rings.
  • num_stack_tx_rings β€” number of TX rings used by the stack (not XDP). Stack rings stay in their own lane, periodt.
  • num_rx_rings β€” the currently configured number of RX rings.
  • mtu β€” device MTU. Big packets, big energy.
  • xsk_pools β€” XSK buffer pools, max_r_vecs in size (for AF_XDP). Serving AF_XDP looks πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/net/ethernet/netronome/nfp/nfp_net.h, plus these absolute legends:

Go read them. All of them. For real, fr fr β€” iykyk πŸ“šβœ¨

and that's a wrap bestie!! πŸ’œ This page came from the source/version line ./drivers/net/ethernet/netrono... (yep, it's genuinely truncated like that in the original β€” not me being lazy πŸ’€) and it's dated October 2026. Stay hydrated, keep your rings pre-allocated, and I'll see you in the next (9) page πŸŽ€πŸ«ΆπŸ’–

πŸ“¦ where this page comes from