STRUCT NFP_DP_OPS(9)
π¦ struct nfp_dp_ops(9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in the kernel, you've got multiple different implementations of "dp" doing their thing, and somebody has to wrap them all up in one tidy little struct. That's struct nfp_dp_ops. It's literally the hook-collection energy we all deserve. β¨
πΈ NAME πΈ
struct nfp_dp_ops β hooks that wrap around the different implementations of different dp. no cap, that's the whole job. π«Ά
β¨ SYNOPSIS β¨
like, here's the whole vibe, verbatim:
struct nfp_dp_ops {
enum nfp_nfd_version version;
unsigned int tx_min_desc_per_pkt;
u32 cap_mask;
u64 dma_mask;
int (*poll)(struct napi_struct *napi, int budget);
int (*xsk_poll)(struct napi_struct *napi, int budget);
void (*ctrl_poll)(struct tasklet_struct *t);
netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *netdev);
bool (*ctrl_tx_one)(struct nfp_net *nn, struct nfp_net_r_vector
*r_vec, struct sk_buff *skb, bool old);
void (*rx_ring_fill_freelist)(struct nfp_net_dp *dp, struct
nfp_net_rx_ring *rx_ring);
int (*tx_ring_alloc)(struct nfp_net_dp *dp, struct nfp_net_tx_ring
*tx_ring);
void (*tx_ring_reset)(struct nfp_net_dp *dp, struct nfp_net_tx_ring
*tx_ring);
void (*tx_ring_free)(struct nfp_net_tx_ring *tx_ring);
int (*tx_ring_bufs_alloc)(struct nfp_net_dp *dp, struct
nfp_net_tx_ring *tx_ring);
void (*tx_ring_bufs_free)(struct nfp_net_dp *dp, struct
nfp_net_tx_ring *tx_ring);
void (*print_tx_descs)(struct seq_file *file, struct
nfp_net_r_vector *r_vec, struct nfp_net_tx_ring *tx_ring, u32 d_rd_p,
u32 d_wr_p);
};
π Members π
bestie, let's meet the whole cast. every single one of them, nobody gets left out π
versionβ tells you what dp type this is. it's giving name tag at the party π·οΈtx_min_desc_per_pktβ the minimal TX descs you need for each packet. don't skimp, it's the bare minimum fr frcap_maskβ the mask of supported features π«dma_maskβ DMA addressing capability. the range of addresses it can handle, iconicpollβ the napi poll for the normal rx/tx pathxsk_pollβ the napi poll you get when xsk is enabled (special occasion poll β¨)ctrl_pollβ tasklet poll for the ctrl rx/tx pathxmitβ xmit for the normal path, sending it πctrl_tx_oneβ xmit for the ctrl path. one at a time, main character energyrx_ring_fill_freelistβ gives buffers from the ring to FW. sharing is caring π«Άtx_ring_allocβ allocate resources for a TX ringtx_ring_resetβ frees any untransmitted buffers and resets pointers. note the "any untransmitted buffers" part β that's a real consequence, not just a vibe check β οΈtx_ring_freeβ frees the resources that were allocated to a TX ringtx_ring_bufs_allocβ allocate resources for each TX buffertx_ring_bufs_freeβ free the resources allocated to each TX bufferprint_tx_descsβ shows the TX ring's info, for debug purposes. detective mode π
π SEE ALSO π
- the kernel file
./drivers/net/ethernet/netronome/nfp/nfp_net_dp.hβ go read it, iykyk π nfp_net_tx_full(9)nfp_net_irq_unmask(9)
okay that's the whole page, you ate that π
go forth and wrap your dps. and for the record, this whole thing came out of ./drivers/net/ethernet/netrono... in October 2026 β that's the version/date stamp of the page itself, so jot that down in your notes babe ππ
π¦ 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