STRUCT MXL862XX_PORT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct mxl862xx_port πŸ’…

okay bestie, welcome to the Kernel API Manual, section 9 β€” this is the page for struct mxl862xx_port, and it's literally the driver's little diary for each port. Every port gets one. Let's get into it ✨


🌸 NAME 🌸

struct mxl862xx_port β€” the per-port state that the driver keeps track of, no cap 🫢


⭐ SYNOPSIS ⭐

struct mxl862xx_port {
    struct mxl862xx_priv *priv;
    u16 fid;
    unsigned long flood_block;
    bool learning;
    bool setup_done;
    u16 pvid;
    bool vlan_filtering;
    struct mxl862xx_vf_block vf;
    struct mxl862xx_evlan_block ingress_evlan;
    struct mxl862xx_evlan_block egress_evlan;
    bool host_flood_uc;
    bool host_flood_mc;
    struct work_struct host_flood_work;
    struct mxl862xx_port_stats stats;
    spinlock_t stats_lock;
 };

πŸŽ€ Members πŸŽ€

ok so here's the group chat roster, one by one πŸ‘‘

  • priv β€” back-pointer to the switch private data πŸ’–. The deferred work handlers need it to get at ds and priv, so it's giving "emergency contact".
  • fid β€” the firmware FID for the permanent single-port bridge. It stays alive for the entire lifetime of the port so that traffic is never forwarded while the port is unbridged. iconic commitment honestly 🫑
  • flood_block β€” a bitmask of firmware meter indices that are currently rate-limiting flood traffic on this port (these are the zero-rate meters used to block flooding, iykyk).
  • learning β€” true when address learning is enabled on this port. slay.
  • setup_done β€” set at the end of port_setup, cleared at the start of port_teardown. It guards deferred work so nobody touches torn-down state 😭 (the vibe check for work handlers, fr fr).
  • pvid β€” the port VLAN ID (native VLAN) that gets assigned to untagged traffic.
  • vlan_filtering β€” true when VLAN filtering is enabled on this port.
  • vf β€” the per-port VLAN Filter block state 🌈
  • ingress_evlan β€” the ingress extended VLAN block state.
  • egress_evlan β€” the egress extended VLAN block state.
  • host_flood_uc β€” the desired host unicast flood state (true = flood). It's updated atomically by port_set_host_flood and then consumed by the deferred host_flood_work.
  • host_flood_mc β€” the desired host multicast flood state (true = flood). same energy, different letter πŸ’…
  • host_flood_work β€” the deferred work for applying host flood changes. Here's the tea 🍡: port_set_host_flood runs in atomic context (under netif_addr_lock), so the firmware calls must be deferred. The worker acquires rtnl_lock to serialize with DSA callbacks, and it checks setup_done to avoid acting on torn-down ports. main character worker behavior, honestly.
  • stats β€” 64-bit accumulated hardware statistics, updated periodically by the stats polling work πŸ“Š
  • stats_lock β€” protects accumulator reads in .get_stats64 against concurrent updates coming from the polling work. no data races in this house πŸ”₯

✨ SEE ALSO ✨


🧚 and that's the whole port struct bestie, go forth and read the header file. periodt.

kisses from ./drivers/net/dsa/mxl862xx, dated October 2026 β€” this page is struct mxl862xx_port(9) and it ate, no crumbs πŸ’œπŸŽ€

πŸ“¦ where this page comes from