phylink_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so first things first, bestie: this page lives in the Kernel API Manual, it's phylink_create(9), and it's literally the birth certificate for a phylink instance. let's get into it πŸŽ€


✨ NAME ✨

phylink_create β€” create a phylink instance πŸ¦‹ (yes that's the whole name section, she's simple and she's iconic)


🌸 SYNOPSIS 🌸

struct phylink * phylink_create (struct phylink_config *config , const
struct fwnode_handle *fwnode , phy_interface_t iface , const struct
phylink_mac_ops *mac_ops );

four arguments, one pointer out, no cap πŸ’…


🫢 ARGUMENTS 🫢

  • config β€” a pointer to the target struct phylink_config. that's the config bestie, it's giving "here's my whole personality" πŸŽ€
  • fwnode β€” a pointer to a struct fwnode_handle describing the network interface 🌈
  • iface β€” the desired link mode, defined by typedef phy_interface_t ⭐
  • mac_ops β€” a pointer to a struct phylink_mac_ops for the MAC πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

okay so this is the main character function: it creates a new phylink instance, and it parses the link parameters found in np. like, all of them. this will parse in-band modes, fixed-link or SFP configuration β€” the whole vibe check πŸ”₯


πŸ’€ NOTE πŸ’€

bestie. listen. the rtnl lock must not be held when calling this function. like, do not. 😭 that's a hard no.

it returns a pointer to a struct phylink, or an error-pointer value. users must use IS_ERR to check for errors from this function β€” don't skip the vibe check on the return value, fr fr πŸ™ˆ


⭐ SEE ALSO ⭐

the whole friend group, in order, no one left out 🧚:


and that's the page, periodt πŸ’œ this lil masterpiece comes from ./drivers/net/phy, dated October 2026, and it's filed under phylink_create(9) β€” go create something iconic, bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from