STRUCT MXL862XX_PORT(9)
π¦ 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 atdsandpriv, 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βtruewhen address learning is enabled on this port. slay.setup_doneβ set at the end ofport_setup, cleared at the start ofport_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βtruewhen 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 byport_set_host_floodand then consumed by the deferredhost_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_floodruns in atomic context (undernetif_addr_lock), so the firmware calls must be deferred. The worker acquiresrtnl_lockto serialize with DSA callbacks, and it checkssetup_doneto 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_stats64against concurrent updates coming from the polling work. no data races in this house π₯
β¨ SEE ALSO β¨
- Kernel file
./drivers/net/dsa/mxl862xx/mxl862xx.h mxl862xx_fw_portmap_set_bit(9)mxl862xx_fw_portmap_clear_bit(9)mxl862xx_fw_portmap_is_empty(9)struct mxl862xx_vf_vid(9)struct mxl862xx_vf_block(9)struct mxl862xx_evlan_block(9)struct mxl862xx_port_stats(9)struct mxl862xx_pcs(9)struct mxl862xx_fw_version(9)struct mxl862xx_priv(9)
π§ 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
- 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