STRUCT NFP_PORT(9)
π NAME π
okay so bestie, welcome to the struct nfp_port(9) page from the Kernel API Manual β literally the structure representing NFP port. we are going to walk through every single member together, no cap, and nobody gets left behind π
.
β¨ SYNOPSIS β¨
here's the whole struct in all its glory β keep the code exactly as it is, especially that little line break inside speed_bitmap, bestie π:
struct nfp_port {
struct net_device *netdev;
enum nfp_port_type type;
unsigned long flags;
unsigned long tc_offload_cnt;
struct nfp_app *app;
void (*link_cb)(struct nfp_port *port);
struct devlink_port dl_port;
union {
struct {
unsigned int eth_id;
bool eth_forced;
struct nfp_eth_table_port *eth_port;
u8 __iomem *eth_stats;
unsigned long speed_bitmap[BITS_TO_LONGS(
NFP_SUP_SPEED_NUMBER)];
};
struct {
unsigned int pf_id;
unsigned int vf_id;
bool pf_split;
unsigned int pf_split_id;
u8 __iomem *vnic;
};
};
struct list_head port_list;
};
π Members π
here's the member-by-member tea, in the same order as the struct, because we are not skipping a single one β¨
netdevβ backpointer to associatednetdev.typeβ what port type does the entity represent.flagsβ port flags.tc_offload_cntβ number of active TC offloads; how offloads are counted is not defined, so use it as a boolean. lowkey that's the whole vibe.appβ backpointer to the app structure.link_cbβ callback when link status changed.dl_portβ devlink port structure.{unnamed_union}β anonymous.{unnamed_struct}β anonymous. (first inner struct)eth_idβ forNFP_PORT_PHYS_PORT, port ID in NFP enumeration scheme.eth_forcedβ forNFP_PORT_PHYS_PORT, port is forced UP or DOWN, don't change it.eth_portβ forNFP_PORT_PHYS_PORT, translated ETH Table port entry.eth_statsβ forNFP_PORT_PHYS_PORT, MAC stats if available.speed_bitmapβ forNFP_PORT_PHYS_PORT, supported speed bitmap.
{unnamed_struct}β anonymous. (second inner struct)pf_idβ forNFP_PORT_PF_PORT,NFP_PORT_VF_PORT, ID of the PCI PF (0-3).vf_idβ forNFP_PORT_VF_PORT, ID of the PCI VF withinpf_id.pf_splitβ forNFP_PORT_PF_PORT, true if PCI PF has more than one vNIC.pf_split_idβ forNFP_PORT_PF_PORT, ID of PCI PF vNIC (valid ifpf_split).vnicβ forNFP_PORT_PF_PORT,NFP_PORT_VF_PORT, vNIC ctrl memory.
port_listβ entry on pf's list of ports.
π SEE ALSO π
go look at the kernel file ./drivers/net/ethernet/netronome/nfp/nfp_port.h, enum nfp_port_type(9), and enum nfp_port_flags(9). that's the whole friend group π
mwah π source/version: ./drivers/net/ethernet/netrono... β date: October 2026. periodt, go slay your NFP ports π«Ά
π¦ 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