sfp_select_interface(9)
π sfp_select_interface(9) β a Kernel API Manual moment
okay so bestie, welcome to sfp_select_interface from the Kernel API Manual β yes it's a section 9 page, yes it's kernel-internal, and yes we're gonna get through it together π«Ά
β¨ NAME β¨
sfp_select_interface β the girl whose whole job is picking the right phy_interface_t mode. that's it, that's the gig π
πΈ SYNOPSIS πΈ
phy_interface_t sfp_select_interface (struct sfp_bus *bus , const
unsigned long *link_modes );
like, literally two args and a return value, we love a low-maintenance icon β¨
π ARGUMENTS π
busβ a pointer to thestruct sfp_busstructure for the sfp module. yes bestie, the whole bus. it's giving main character energy πlink_modesβ ethtool link modes mask. that's the vibe check input, ok? memorize it π¦
π₯ DESCRIPTION π₯
so what does she actually do? she derives the phy_interface_t mode for the SFP module from the link modes mask. like she looks at the mask and goes "okay, this one" β no cap, that's the entire plot π
not me being obsessed with how clean that is. one input, one derived mode, periodt π
π SEE ALSO π
the whole friend group, fr fr β go say hi:
- Kernel file
./drivers/net/phy/sfp-bus.c struct sfp_bus(9)sfp_bus_put(9)sfp_get_module_info(9)sfp_get_module_eeprom(9)sfp_get_module_eeprom_by_page(9)sfp_upstream_start(9)sfp_upstream_stop(9)sfp_upstream_set_signal_rate(9)sfp_bus_find_fwnode(9)sfp_bus_add_upstream(9)sfp_bus_del_upstream(9)sfp_get_name(9)
ok that's the whole page bestie, you ate that π
and a lil sign-off: this one lives in ./drivers/net/phy, dated October 2026 π slay, go read sfp_bus(9) next, 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