cxgb4_change_mac(9)
π 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β theport_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-1and 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:
cxgb4_write_rss(9)setup_rss(9)setup_sge_queues(9)cxgb4_set_rspq_intr_params(9)cxgb4_create_server(9)cxgb4_best_mtu(9)cxgb4_best_aligned_mtu(9)cxgb4_port_chan(9)cxgb4_port_e2cchan(9)cxgb4_port_viid(9)cxgb4_port_idx(9)cxgb_up(9)
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
- 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