ice_devlink_port_new(9)
π ice_devlink_port_new β devlink handler for the new port
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:
- Creates the new devlink port π
- Checks the new port attributes and rejects any unsupported parameters π«
- 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:
ice_devlink_port_opt_speed_str(9)ice_devlink_port_options_print(9)ice_devlink_aq_set_port_option(9)ice_devlink_port_split(9)ice_devlink_port_unsplit(9)ice_devlink_set_port_split_options(9)ice_devlink_set_switch_id(9)ice_devlink_create_pf_port(9)ice_devlink_destroy_pf_port(9)ice_devlink_port_get_vf_fn_mac(9)ice_devlink_port_set_vf_fn_mac(9)ice_devlink_create_vf_port(9)ice_devlink_destroy_vf_port(9)ice_devlink_create_sf_dev_port(9)ice_devlink_destroy_sf_dev_port(9)ice_activate_dynamic_port(9)ice_deactivate_dynamic_port(9)ice_dealloc_dynamic_port(9)ice_dealloc_all_dynamic_ports(9)ice_devlink_port_new_check_attr(9)ice_devlink_port_del(9)ice_devlink_port_fn_hw_addr_set(9)ice_devlink_port_fn_hw_addr_get(9)ice_devlink_port_fn_state_set(9)ice_devlink_port_fn_state_get(9)ice_reserve_sf_num(9)ice_devlink_create_sf_port(9)ice_devlink_destroy_sf_port(9)ice_alloc_dynamic_port(9)
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
- 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