hinic_port_add_mac(9)
โจ hinic_port_add_mac(9) โจ
okay so bestie, welcome to the Kernel API Manual entry for hinic_port_add_mac โ yes that's the whole title, and yes it's a whole vibe ๐ฆ. This is the little kernel function that adds a mac address to a nic device. That's it, that's the girl. Let's get into it ๐
๐ธ NAME ๐ธ
hinic_port_add_mac โ add mac address โจ (literally what it says, no plot twist)
๐ SYNOPSIS ๐
int hinic_port_add_mac (struct hinic_dev *nic_dev , const u8 *addr , u16
vlan_id );
so she takes a struct hinic_dev * pointer, a const u8 * address, and a u16 vlan id, and hands you back an int. iconic signature, no notes ๐ซถ
๐ฆ ARGUMENTS ๐ฆ
nic_devโ the nic device ๐ like, the actual network interface card you're doing this toaddrโ the mac address, bestie ๐ฎ (it's aconst u8 *, so hands off the contents)vlan_idโ the vlan number you want to set together with the mac ๐ท๏ธ yes, they go together, they're a package deal
โญ DESCRIPTION โญ
okay so the return value story, because this is the whole description and we're not skipping it:
- returns
0โ Success ๐ slay, it worked - returns a negative value โ Failure ๐ญ so like, check that return value fr fr, don't just ignore it
ngl there's no more detail in the original here, so I'm not gonna make any up โ that's the entire description, and we respect the source ๐
๐ SEE ALSO ๐
the kernel file herself lives at:
./drivers/net/ethernet/huawei/hinic/hinic_port.c
and here's the whole friend group, all the related pages, no one left out ๐:
change_mac(9)hinic_port_del_mac(9)hinic_port_get_mac(9)hinic_port_set_mtu(9)hinic_port_add_vlan(9)hinic_port_del_vlan(9)hinic_port_set_rx_mode(9)hinic_port_link_state(9)hinic_port_set_state(9)hinic_port_set_func_state(9)hinic_port_get_cap(9)hinic_port_set_tso(9)
and that's the page, bestie ๐ง sources say ./drivers/net/ethernet/huawei/... and the date stamp is October 2026, landing under the footer hinic_port_add_mac(9) โ go add those mac addresses, ily, bye ๐๐
๐ฆ 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