cxgb4_change_mac(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cxgb4_change_mac β€” the Kernel API Manual, bestie edition πŸŽ€

Okay so we're deep in the cxgb4 trenches today, and this one is cxgb4_change_mac(9) β€” literally the glow-up operation for a MAC address filter. She changes outfits mid-party and nobody even notices. Iconic.


✨ NAME ✨

cxgb4_change_mac β€” update the match filter for a MAC address. That's it, that's the whole gig. A little MAC-address makeover. πŸ’–


✨ SYNOPSIS ✨

int cxgb4_change_mac (struct port_info *pi , unsigned int viid , int
*tcam_idx , const u8 *addr , bool persist , u8 *smt_idx );

✨ ARGUMENTS ✨

  • pi β€” the port_info. The port's whole personality file, honestly.
  • viid β€” the VI id. Not "vibe id," but honestly close enough.
  • tcam_idx β€” the TCAM index of the existing filter for the old value of the MAC address, or -1. So: give her the old receipt, or hand over -1 and she'll start fresh. 🧾
  • addr β€” the new MAC address value. The new look. The new lewk, if you will.
  • persist β€” whether a new MAC allocation should be persistent. Keeping it around vs. ghosting later.
  • smt_idx β€” the destination to store the new SMT index. She writes it there, you go read it. Cooperative queen behavior. πŸ‘‘

🌸 DESCRIPTION 🌸

So here's the tea: this function modifies an MPS filter and sets it to the new MAC address if tcam_idx >= 0. Like, you already had a filter, she just updates it in place. Slay, no drama.

But if tcam_idx < 0, she adds the MAC address to a brand-new filter instead. And in that case β€” the new-filter case β€” the address is added persistently if persist is true. Lowkey important distinction, ngl.

And babe, listen: addresses are programmed to the hash region if the TCAM runs out of entries. So there's a fallback. She's resourceful. πŸ¦‹

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c β€” the mothership, the main character's address, iykyk.

Plus the whole friend group:


And that's the whole page, bestie. 🌈 Cute little sign-off time: this gem lives in ./drivers/net/ethernet/chelsio..., dated October 2026, and the source/version tag on the footer is cxgb4_change_mac(9). Periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from