STRUCT NFP_NET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct nfp_net(9) πŸ’–

okay so bestie, welcome to the struct nfp_net page β€” this is the NFP network device structure and it lives in the Kernel API Manual. it's a big one, grab a snack πŸ“


✨ SYNOPSIS ✨

like, here's the whole vibe, every field, exactly as it is:

struct nfp_net {
    struct nfp_net_dp dp;
    const struct nfp_dev_info *dev_info;
    struct nfp_net_fw_version fw_ver;
    u32 id;
    u32 cap;
    u32 cap_w1;
    u32 max_mtu;
    u8 rss_hfunc;
    u32 rss_cfg;
    u8 rss_key[NFP_NET_CFG_RSS_KEY_SZ];
    u8 rss_itbl[NFP_NET_CFG_RSS_ITBL_SZ];
    struct xdp_attachment_info xdp;
    struct xdp_attachment_info xdp_hw;
    unsigned int max_tx_rings;
    unsigned int max_rx_rings;
    int stride_tx;
    int stride_rx;
    unsigned int max_r_vecs;
    struct nfp_net_r_vector r_vecs[NFP_NET_MAX_R_VECS];
    struct msix_entry irq_entries[NFP_NET_MAX_IRQS];
    irq_handler_t lsc_handler;
    char lsc_name[IFNAMSIZ + 8];
    irq_handler_t exn_handler;
    char exn_name[IFNAMSIZ + 8];
    irq_handler_t shared_handler;
    char shared_name[IFNAMSIZ + 8];
    bool link_up;
    spinlock_t link_status_lock;
    spinlock_t reconfig_lock;
    u32 reconfig_posted;
    bool reconfig_timer_active;
    bool reconfig_sync_present;
    struct timer_list reconfig_timer;
    u32 reconfig_in_progress_update;
    struct semaphore bar_lock;
    bool rx_coalesce_adapt_on;
    bool tx_coalesce_adapt_on;
    u32 rx_coalesce_usecs;
    u32 rx_coalesce_max_frames;
    u32 tx_coalesce_usecs;
    u32 tx_coalesce_max_frames;
    u8 __iomem *qcp_cfg;
    u8 __iomem *tx_bar;
    u8 __iomem *rx_bar;
  #ifdef CONFIG_NFP_NET_IPSEC;
    struct xarray xa_ipsec;
  #endif;
    struct nfp_net_tlv_caps tlv_caps;
    unsigned int ktls_tx_conn_cnt;
    unsigned int ktls_rx_conn_cnt;
    atomic64_t ktls_conn_id_gen;
    atomic_t ktls_no_space;
    atomic_t ktls_rx_resync_req;
    atomic_t ktls_rx_resync_ign;
    atomic_t ktls_rx_resync_sent;
    struct {
      struct sk_buff_head queue;
      wait_queue_head_t wq;
      struct workqueue_struct *workq;
      struct work_struct wait_work;
      struct work_struct runq_work;
      u16 tag;
    } mbox_cmsg;
    struct dentry *debugfs_dir;
    struct list_head vnic_list;
    struct pci_dev *pdev;
    struct nfp_app *app;
    bool vnic_no_name;
    struct nfp_port *port;
    struct {
      spinlock_t lock;
      struct list_head list;
      struct work_struct work;
    } mbox_amsg;
    struct {
      u16 count;
      struct list_head list;
    } fs;
    void *app_priv;
 };

🌸 MEMBERS 🌸

okay, deep breath, we're going field by field and honestly? every single one ate πŸ’…

  • dp β€” the datapath structure. like the whole main-character of data movement.
  • dev_info β€” NFP ASIC params. the hardware's little ID card.
  • fw_ver β€” firmware version. good to know what we're working with fr fr.
  • id β€” vNIC id within the PF (it's 0 for VFs, no cap).
  • cap β€” capabilities advertised by the Firmware. the flex list.
  • cap_w1 β€” extended capabilities word advertised by the Firmware. slay, more flex.
  • max_mtu β€” maximum support MTU advertised by the Firmware. (yes, "support", that's what it says, don't come for me 😭)
  • rss_hfunc β€” RSS selected hash function.
  • rss_cfg β€” RSS configuration.
  • rss_key β€” RSS secret key. 🀫
  • rss_itbl β€” RSS indirection table.
  • xdp β€” information about the driver XDP program.
  • xdp_hw β€” information about the HW XDP program.
  • max_tx_rings β€” maximum number of TX rings supported by the Firmware.
  • max_rx_rings β€” maximum number of RX rings supported by the Firmware.
  • stride_tx β€” queue controller TX queue spacing.
  • stride_rx β€” queue controller RX queue spacing.
  • max_r_vecs β€” number of allocated interrupt vectors for RX/TX.
  • r_vecs β€” pre-allocated array of ring vectors.
  • irq_entries β€” pre-allocated array of MSI-X entries.
  • lsc_handler β€” handler for Link State Change interrupt.
  • lsc_name β€” name for Link State Change interrupt.
  • exn_handler β€” handler for Exception interrupt.
  • exn_name β€” name for Exception interrupt.
  • shared_handler β€” handler for shared interrupts.
  • shared_name β€” name for shared interrupt.
  • link_up β€” is the link up? (the eternal question πŸ’€)
  • link_status_lock β€” protects link_* and ensures atomicity with BAR reading.
  • reconfig_lock β€” protects reconfig_posted, reconfig_timer_active, reconfig_sync_present and HW reconfiguration request regs/machinery from async requests (sync must take bar_lock). lowkey a lot of responsibility ngl.
  • reconfig_posted β€” pending reconfig bits coming from async sources.
  • reconfig_timer_active β€” timer for reading reconfiguration results is pending.
  • reconfig_sync_present β€” some thread is performing synchronous reconfig.
  • reconfig_timer β€” timer for async reading of reconfig results.
  • reconfig_in_progress_update β€” update FW is processing now (debug only). πŸ”
  • bar_lock β€” vNIC config BAR access lock, protects: update, mailbox area, crypto TLV.
  • rx_coalesce_adapt_on β€” is RX interrupt moderation adaptive?
  • tx_coalesce_adapt_on β€” is TX interrupt moderation adaptive?
  • rx_coalesce_usecs β€” RX interrupt moderation usecs delay parameter.
  • rx_coalesce_max_frames β€” RX interrupt moderation frame count parameter.
  • tx_coalesce_usecs β€” TX interrupt moderation usecs delay parameter.
  • tx_coalesce_max_frames β€” TX interrupt moderation frame count parameter.
  • qcp_cfg β€” pointer to QCP queue used for configuration notification.
  • tx_bar β€” pointer to mapped TX queues.
  • rx_bar β€” pointer to mapped FL/RX queues.
  • xa_ipsec β€” IPsec xarray SA data. (only a thing when CONFIG_NFP_NET_IPSEC is on, iykyk)
  • tlv_caps β€” parsed TLV capabilities.
  • ktls_tx_conn_cnt β€” number of offloaded kTLS TX connections.
  • ktls_rx_conn_cnt β€” number of offloaded kTLS RX connections.
  • ktls_conn_id_gen β€” trivial generator for kTLS connection ids (for TX).
  • ktls_no_space β€” counter of firmware rejecting kTLS connection due to lack of space. rude of it, honestly.
  • ktls_rx_resync_req β€” counter of TLS RX resync requested.
  • ktls_rx_resync_ign β€” counter of TLS RX resync requests ignored.
  • ktls_rx_resync_sent β€” counter of TLS RX resync completed.
  • mbox_cmsg β€” Common Control Message via vNIC mailbox state.
    • mbox_cmsg.queue β€” CCM mbox queue of pending messages.
    • mbox_cmsg.wq β€” CCM mbox wait queue of waiting processes.
    • mbox_cmsg.workq β€” CCM mbox work queue for wait_work and runq_work.
    • mbox_cmsg.wait_work β€” CCM mbox posted msg reconfig wait work.
    • mbox_cmsg.runq_work β€” CCM mbox posted msg queue runner work.
    • mbox_cmsg.tag β€” CCM mbox message tag allocator.
  • debugfs_dir β€” device directory in debugfs.
  • vnic_list β€” entry on device vNIC list.
  • pdev β€” backpointer to PCI device.
  • app β€” APP handle if available.
  • vnic_no_name β€” for non-port PF vNIC make ndo_get_phys_port_name return -EOPNOTSUPP to keep backwards compatibility (set by app). yes that's the whole sentence, it's important 🫢
  • port β€” pointer to nfp_port structure if vNIC is a port.
  • mbox_amsg β€” asynchronously processed message via mailbox.
    • mbox_amsg.lock β€” protect message list.
    • mbox_amsg.list β€” list of message to process.
    • mbox_amsg.work β€” work to process message asynchronously.
  • fs β€” flow steering.
    • fs.count β€” flow count.
    • fs.list β€” list of flows.
  • app_priv β€” APP private data for this vNIC.

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next bestie, they're all in the kernel file ./drivers/net/ethernet/netronome/nfp/nfp_net.h, and also:


and that's the page!! πŸ’œ this one's from ./drivers/net/ethernet/netrono... (they truncated it, not me πŸ™ˆ), dated October 2026 β€” ty for reading bestie, go forth and slay those rings βœ¨πŸŽ€πŸŒˆ
πŸ“¦ where this page comes from