t4vf_change_mac(9)
π 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-1addrβ the new MAC address value πpersistβ ifidx < 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:
- free the one being used by the old address value, and
- 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:
t4vf_record_mbox(9)t4vf_wr_mbox_core(9)fwcaps16_to_caps32(9)fwcap_to_fwspeed(9)t4vf_port_init(9)t4vf_fw_reset(9)t4vf_query_params(9)t4vf_set_params(9)t4vf_fl_pkt_align(9)t4vf_bar2_sge_qregs(9)t4vf_get_sge_params(9)t4vf_get_vpd_params(9)t4vf_get_dev_params(9)t4vf_get_rss_glb_config(9)t4vf_get_vfres(9)t4vf_read_rss_vi_config(9)t4vf_write_rss_vi_config(9)t4vf_config_rss_range(9)t4vf_alloc_vi(9)t4vf_free_vi(9)t4vf_enable_vi(9)t4vf_enable_pi(9)t4vf_identify_port(9)t4vf_set_rxmode(9)t4vf_alloc_mac_filt(9)t4vf_free_mac_filt(9)t4vf_set_addr_hash(9)t4vf_get_port_stats(9)t4vf_iq_free(9)t4vf_eth_eq_free(9)t4vf_link_down_rc_str(9)t4vf_handle_get_port_info(9)t4vf_update_port_info(9)t4vf_handle_fw_rpl(9)t4vf_get_vf_mac_acl(9)t4vf_get_vf_vlan_acl(9)
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
- 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