ice_devlink_port_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, this one lives in the Kernel API Manual, section 9, and it's the function that literally births a brand-new devlink port. Iconic behavior, honestly. Let's get into it πŸŽ€


✨ SYNOPSIS ✨

int ice_devlink_port_new (struct devlink *devlink , const struct
       devlink_port_new_attrs *new_attr , struct netlink_ext_ack *extack ,
       struct devlink_port **devlink_port );

🫢 ARGUMENTS 🫢

  • devlink β€” pointer to devlink. The main character of this whole situation πŸ’œ
  • new_attr β€” pointer to the port new attributes. Like, the vibes the new port is supposed to have ✨
  • extack β€” extack for reporting error messages. If something goes wrong, this is the one who tells everyone 😭
  • devlink_port β€” pointer to a new port. Yes queen, this is where the fresh port ends up πŸ¦‹

🌸 DESCRIPTION 🌸

So what actually happens here? ice_devlink_port_new creates a new devlink port, checks the new port attributes and rejects any unsupported parameters, and allocates a new subfunction for that port.

Periodt. Three things, all slaying:

  1. Creates the new devlink port πŸŽ€
  2. Checks the new port attributes and rejects any unsupported parameters 🚫
  3. Allocates new subfunction for that port πŸ‘‘

Lowkey a lot of responsibility for one function, and it's carrying it flawlessly.


⭐ RETURN ⭐

Zero on success, or an error code on failure. That's it, that's the whole mood.

No cap β€” if you get a nonzero back, something didn't eat and you need to go check your attributes πŸ‘€

πŸ”₯ SEE ALSO πŸ”₯

The kernel file got its own shoutout, so here it is:

Kernel file ./drivers/net/ethernet/intel/ice/devlink/port.c

And then the whole friend group, in order, no one left out fr fr:

That's the whole group chat, bestie. Go read them too, iykyk 🌈


Alright, that's the page! Huge shoutout to the source it shipped from β€” ./drivers/net/ethernet/intel/i... (yes it's truncated like that, don't come for me πŸ™ˆ) β€” version dating all the way to October 2026, and the page itself is ice_devlink_port_new(9). Bye bestie, go create some ports πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from