i40e_devlink_create_port(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual β€” yes, that's the manual name, we're fancy here ✨ β€” and today's main character is i40e_devlink_create_port. she creates a devlink port for a PF. that's the whole vibe. let's get into it πŸŽ€


🌸 NAME 🌸

i40e_devlink_create_port β€” creates a devlink port for this PF, no cap πŸ‘‘


✨ SYNOPSIS ✨

int i40e_devlink_create_port (struct i40e_pf *pf );

like, that's the whole signature. short. iconic. periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pf β€” the PF you're making a port for. that's it. that's the argument 🫢

πŸ’– DESCRIPTION πŸ’–

so what she actually does: she creates and registers a devlink_port for this PF. both. not just one. the way she does the most πŸ’…

but here's the little plot twist you need to know πŸ“Œ β€” even though each physical function is connected to a separate devlink instance (yes, separate, like they each got their own group chat 😭), the port is still numbered according to the physical function id. so the numbering stays loyal to the PF id no matter which devlink instance you're chilling in. iykyk 🌈

ngl this is one of those details you skim and then regret skimming. the port number follows the physical function id. always. write it down bestie πŸ“

⭐ RETURN ⭐

  • zero on success πŸ₯³ β€” slay, it worked
  • an error code on failure 😭 β€” it's giving "not today"

πŸ”₯ SEE ALSO πŸ”₯

like a whole friend group of functions honestly, go say hi to all of them 🫢✨


and that's the page!! πŸ’œ this came out of ./drivers/net/ethernet/intel/i40e, dated October 2026 β€” so mark your calendar bestie, and remember: create the port, register the port, keep the PF id numbering. mwah πŸŽ€πŸ’–πŸŒΈ

πŸ“¦ where this page comes from