hinic_port_add_mac(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ 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 to
  • addr โ€” the mac address, bestie ๐Ÿ“ฎ (it's a const 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 ๐Ÿ’œ:


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