sfp_select_interface(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the struct sfp_bus structure 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:


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