t4vf_change_mac(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… t4vf_change_mac(9) β€” like, the Kernel API Manual page, bestie

okay so picture this: it's a Kernel API Manual page, the function is t4vf_change_mac, and it does exactly one gorgeous little thing β€” it swaps the exact-match filter over to a brand new MAC address. no cap. let's get into it πŸŽ€


✨ NAME ✨

t4vf_change_mac β€” modifies the exact-match filter for a MAC address. literally her whole personality πŸ’–


🌸 SYNOPSIS 🌸

int t4vf_change_mac (struct adapter *adapter , unsigned int viid , int
idx , const u8 *addr , bool persist );

yes the line break in the middle of the params is canon, don't come for me πŸ™ˆ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adapter β€” the adapter. the main character, the whole device, her 🫢
  • viid β€” the Virtual Interface ID. iykyk πŸ’…
  • idx β€” index of the existing filter for the old value of the MAC address, or -1
  • addr β€” the new MAC address value 🌈
  • persist β€” if idx < 0, the new MAC allocation should be persistent. like, forever forever ⭐

πŸ‘‘ DESCRIPTION πŸ‘‘

So here's the tea: this function modifies an exact-match filter and sets it to the new MAC address. iconique. πŸ”₯

But β€” and this is the important part, bestie, don't skip it β€” note that in general it is not possible to modify the value of a given filter, so the generic way to modify an address filter is to:

  1. free the one being used by the old address value, and
  2. allocate a new filter for the new address value.

let that sink in. it's giving "you can't just edit it, you have to let it go and start fresh" πŸ’€βœ¨ very main character growth arc of the function, honestly.

idx can be -1 if the address is a new addition πŸ“

Returns a negative error number, or the index of the filter with the new MAC value. so either sad news or a whole new index to obsess over. no in between 🧚


πŸ’œ SEE ALSO πŸ’œ

first up, the kernel file, and yes we're citing her directly:

Kernel file ./drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c

and now the whole friend group, in order, don't lose anybody:


ok that's the whole page, go forth and change those MACs responsibly πŸ’…

mwah πŸ’‹ this lil page lives at ./drivers/net/ethernet/chelsio... and it's stamped October 2026 β€” t4vf_change_mac(9) forever and always, periodt. πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from