ksz_update_port_member(9)
β¨ ksz_update_port_member(9) β¨
okay bestie, welcome to the Kernel API Manual page for ksz_update_port_member(9) β yeah that's the whole name, it's giving "section 9, kernel internals, handle with care" π
and honestly? she deserves the hype. buckle up π
πΈ NAME πΈ
ksz_update_port_member β adjusts port forwarding rules based on STP state and isolation settings. periodt.
π¦ SYNOPSIS π¦
void ksz_update_port_member (struct ksz_device *dev , int port );
like, that's the whole signature. no cap, that's it π
π ARGUMENTS π
devβ a pointer to thestruct ksz_devicerepresenting the device. she's the main character, everything hangs off her π«Άportβ the port number to adjust. literally the one we're here for β¨
π DESCRIPTION π
so here's the tea π΅ β this function dynamically adjusts the port membership configuration for a specified port AND for the other device ports, based on Spanning Tree Protocol (STP) states and port isolation settings. like she's out here doing chemistry between ports, matching them up and breaking them up π₯
ngl the setup is kinda iconic: every port β including the CPU port β has a membership register, and it's represented as a bitfield. each bit corresponds to a port number. a set bit means "yep, you're allowed to forward frames to that port" π a clear bit is a hard no π
the function iterates over all ports, updating the membership register so it reflects the current forwarding permissions:
- Forwards frames only to ports that are part of the same bridge group AND are in the
BR_STATE_FORWARDINGstate. no bridge group, no forwarding β simple as that π - Takes into account the isolation status of ports. ports in the
BR_STATE_FORWARDINGstate withBR_ISOLATEDconfiguration will not forward frames to each other, even if they're in the same bridge group. yes bestie, even then. they're in the same group but they're not talking π - Ensures that the CPU port is included in the membership based on its upstream port configuration, so that management and control traffic can flow as required. the CPU port stays in the group chat, she has admin privileges π
fr fr this is the kind of function where every bit matters. one wrong bit and frames are either going nowhere or going everywhere, and neither is cute π«Ά
π SEE ALSO π
- Kernel file
./drivers/net/dsa/microchip/ksz_common.cβ the source, go read her π ksz_phylink_mac_disable_tx_lpi(9)ksz_phylink_mac_enable_tx_lpi(9)ksz_parent_mdio_read(9)ksz_parent_mdio_write(9)ksz_phy_addr_to_port(9)ksz_irq_phy_setup(9)ksz_irq_phy_free(9)ksz_parse_dt_phy_config(9)ksz_mdio_register(9)ksz_handle_wake_reason(9)ksz_is_port_mac_global_usable(9)ksz_get_wol(9)ksz_set_wol(9)ksz_wol_pre_shutdown(9)ksz_switch_macaddr_get(9)ksz_switch_shutdown(9)ksz_drive_strength_to_reg(9)ksz_drive_strength_error(9)ksz_drive_strength_write(9)
like, that's the whole friend group β go say hi to all of them π¦β¨
and that's the page bestie! π this little baddie lives under ./drivers/net/dsa/microchip and it's dated October 2026 β yes, the future-looking queen that she is ππ now go forth and forward those frames correctly. mwah π
π¦ 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