STRUCT NFP_ETH_TABLE(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’– NAME ๐Ÿ’–

struct nfp_eth_table โ€” the ETH table info, bestie. That's it, that's the whole vibe โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

okay so picture it: a big table, and inside it, more tables. it's giving nested-struct main character energy ๐Ÿ‘‘

struct nfp_eth_table {
    unsigned int count;
    unsigned int max_index;
    struct nfp_eth_table_port {
      unsigned int eth_index;
      unsigned int index;
      unsigned int nbi;
      unsigned int base;
      unsigned int lanes;
      unsigned int speed;
      unsigned int interface;
      enum nfp_eth_media media;
      enum nfp_eth_fec fec;
      enum nfp_eth_fec act_fec;
      enum nfp_eth_aneg aneg;
      u8 mac_addr[ETH_ALEN];
      u8 label_port;
      u8 label_subport;
      bool enabled;
      bool tx_enabled;
      bool rx_enabled;
      bool supp_aneg;
      bool rx_pause;
      bool tx_pause;
      bool override_changed;
      u8 port_type;
      unsigned int port_lanes;
      bool is_split;
      unsigned int fec_modes_supported;
      u64 link_modes_supp[2];
      u64 link_modes_ad[2];
    } ports[];
};

like, that's the whole thing. the ports[] flex array at the end? iconic. it's literally the main event ๐Ÿ’…


๐Ÿฆ‹ Members ๐Ÿฆ‹

okay bestie, field-by-field, let's go โ€” and yes you have to read all of them, no skipping ๐Ÿ™ˆ

  • count โ€” the number of table entries. how many we got.
  • max_index โ€” the max of the index fields across all ports. the biggest index in the room, lowkey.
  • ports โ€” the table of ports. the actual lineup, periodt.

and now the port fields, one by one:

  • ports.eth_index โ€” port index according to legacy ethX numbering. retro vibes fr.
  • ports.index โ€” chip-wide first channel index.
  • ports.nbi โ€” NBI index.
  • ports.base โ€” first channel index (within NBI).
  • ports.lanes โ€” number of channels.
  • ports.speed โ€” interface speed (in Mbps).
  • ports.interface โ€” the interface (module) plugged in.
  • ports.media โ€” media type of the interface.
  • ports.fec โ€” forward error correction mode.
  • ports.act_fec โ€” active forward error correction mode. (the one actually doing something โœจ)
  • ports.aneg โ€” auto negotiation mode.
  • ports.mac_addr โ€” interface MAC address.
  • ports.label_port โ€” port id.
  • ports.label_subport โ€” id of interface within port (for split ports).
  • ports.enabled โ€” is enabled? ๐Ÿ‘€
  • ports.tx_enabled โ€” is TX enabled?
  • ports.rx_enabled โ€” is RX enabled?
  • ports.rx_pause โ€” Switch of RX pause frame.
  • ports.tx_pause โ€” Switch of Tx pause frame.
  • ports.override_changed โ€” is media reconfig pending? like, are we waiting on a glow-up ๐Ÿ’…
  • ports.port_type โ€” one of PORT_* defines for ethtool.
  • ports.port_lanes โ€” total number of lanes on the port (sum of lanes of all subports). math queen ๐Ÿงฎ
  • ports.is_split โ€” is interface part of a split port.
  • ports.fec_modes_supported โ€” bitmap of FEC modes supported.
  • ports.link_modes_supp โ€” bitmap of link modes supported.
  • ports.link_modes_ad โ€” bitmap of link modes advertised.
ngl, supp_aneg is chillin' in the struct up there but it's not in the Members list โ€” that's just how the page is, don't come for me ๐Ÿซถ

๐ŸŽ€ SEE ALSO ๐ŸŽ€

  • Kernel file ./drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h
  • struct nfp_nsp_identify(9)

go read those too, iykyk ๐Ÿ”ฅ


okay that's the whole page, bestie โ€” Kernel API Manual realness, straight from ./drivers/net/ethernet/netrono... (yes it's truncated, that's the source line as given, don't @ me ๐Ÿ˜ญ) dated October 2026. mwah, slay, go forth and read your structs ๐Ÿ’œ๐ŸŒˆโญ

๐Ÿ“ฆ where this page comes from