STRUCT NFP_NET_DP(9)
πΈ 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 tostruct device. It's giving "who's your parent" energy.netdevβ backpointer to thenet_devicestructure. 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_vecsin size (for AF_XDP). Serving AF_XDP looks π
π¦ SEE ALSO π¦
Kernel file ./drivers/net/ethernet/netronome/nfp/nfp_net.h, plus these absolute legends:
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_r_vector(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)
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
- 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