nfp_net_write_mac_addr(9)
πΈ nfp_net_write_mac_addr(9) β like, the Kernel API Manual page for it πΈ
okay bestie, welcome to section 9 of the Kernel API Manual, where we learn how to yeet a MAC address straight into the device control BAR π no cap, it's a whole little function and it's lowkey iconic.
β¨ NAME β¨
nfp_net_write_mac_addr β write mac address to the device control BAR π
π¦ SYNOPSIS π¦
void nfp_net_write_mac_addr (struct nfp_net *nn , const u8 *addr );
like, that's it. that's the whole vibe. it returns nothing (void), it just does the thing β¨
π ARGUMENTS π
nnβ the NFP Net device you're reconfiguring, the main character of this operation πaddrβ the MAC address to write, aka the payload, the moment, the ~content~ π
π DESCRIPTION π
So the way that this works is: it writes the MAC address from the netdev to the device control BAR. simple enough, right? π«Ά
BUT β and this is the important part, bestie, do not skip this β it does not perform the required reconfig. it's giving "I did my one job and I did it well, the rest is not my problem" π so don't come for it later when stuff isn't reconfigured, okay?
Also, we do a little byte swapping dance π because firmware is LE. that's it, that's the dance. LE firmware, bytes get swapped, we move on. iykyk π
π§ SEE ALSO π§
Kernel file ./drivers/net/ethernet/netronome/nfp/nfp_net_common.c β go read it, it's literally right there π
and now, the friend group, the whole squad, the entire roster (do not lose a single one of them, they all matter fr fr):
nfp_net_get_fw_version(9)nfp_net_reconfig_post(9)__nfp_net_reconfig(9)nfp_net_mbox_reconfig(9)nfp_net_irqs_alloc(9)nfp_net_irqs_assign(9)nfp_net_irqs_disable(9)nfp_net_irq_rxtx(9)nfp_net_read_link_status(9)nfp_net_irq_lsc(9)nfp_net_irq_exn(9)nfp_net_aux_irq_request(9)nfp_net_aux_irq_free(9)nfp_net_vecs_init(9)nfp_net_rss_write_itbl(9)nfp_net_rss_write_key(9)nfp_net_coalesce_write_cfg(9)nfp_net_clear_config_and_disable(9)nfp_net_set_config_and_enable(9)nfp_net_close_stack(9)nfp_net_close_free_all(9)nfp_net_netdev_close(9)nfp_net_open_stack(9)nfp_net_info(9)nfp_net_alloc(9)nfp_net_free(9)nfp_net_rss_key_sz(9)nfp_net_rss_init(9)nfp_net_irqmod_init(9)nfp_net_init(9)nfp_net_clean(9)
π friendly reminder from your local gen z unix girlie: this function writes the MAC and dips. the required reconfig? not her job. she said "not me doing that" and left. periodt.
mwah π this page came from the kernel source file ./drivers/net/ethernet/netrono... and it's dated October 2026 β that's the version, that's the date, and yes we're still here writing MAC addresses to BARs. slay. πβ¨
π¦ 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