dpni_get_port_mac_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dpni_get_port_mac_addr β€” like, the whole page, bestie

okay so this is a page out of the Kernel API Manual (yes that's the manual name, it's giving very official ✨), and it's all about one tiny little function: dpni_get_port_mac_addr(9). Sit down, grab a πŸ“, we're getting your MAC address.


✨ NAME ✨

dpni_get_port_mac_addr β€” retrieve the MAC address associated to the physical port that the DPNI is attached to 🫢

no cap, that's literally it. you're getting the hardware's address, the one true πŸ’–


🌸 SYNOPSIS 🌸

int dpni_get_port_mac_addr (struct fsl_mc_io *mc_io , u32 cmd_flags ,
u16 token , u8 mac_addr[6] );

look at her. four args, returns an int. iconic.


πŸŽ€ ARGUMENTS πŸŽ€

  • mc_io β€” pointer to the MC portal's I/O object, iykyk. it's your way in. πŸšͺ
  • cmd_flags β€” command flags, and you pass one or more of 'MC_CMD_FLAG_'. pick your faves.
  • token β€” the token of the DPNI object. it's like the DPNI's little name tag 🏷️
  • mac_addr β€” the MAC address of the physical port, if there is one β€” otherwise 0. soz if it's empty, bestie 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

the whole point: you're fetching the MAC address of the physical port your DPNI is attached to.

and the one detail that matters, so don't skip it: the primary MAC address is not cleared by this operation. like, this is a read, she's not destructive, the primary MAC stays exactly where it is. periodt πŸ’…


πŸ”₯ RETURN πŸ”₯

so the manpage has the heading, but there's literally nothing under it. the void. the silence. πŸ™ˆ (the synopsis does say it returns an int, though β€” that's the tea.)


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file herself, the source of truth:

Kernel file ./drivers/net/ethernet/freescale/dpaa2/dpni.c

and now the whole entire friend group, in order, no skipping πŸ‘‡


yeah that's a lot of friends. she's popular. what can I say. πŸ’€

anyway that's the page!! source file is the truncated little baby we showed above, version/date stamp says October 2026 πŸ—“οΈβœ¨ β€” so go forth, grab that MAC, don't clear that primary. mwah πŸ’‹ πŸ§šβ€β™€οΈ πŸ’œ

πŸ“¦ where this page comes from