i40e_devlink_create_port(9)
π i40e_devlink_create_port(9) π
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 π₯
- the kernel file, literally right here:
./drivers/net/ethernet/intel/i40e/i40e_devlink.cποΈ i40e_alloc_pf(9)i40e_free_pf(9)i40e_devlink_register(9)i40e_devlink_unregister(9)i40e_devlink_set_switch_id(9)i40e_devlink_destroy_port(9)
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
- 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