t4vf_alloc_mac_filt(9)
β¨ t4vf_alloc_mac_filt(9) β¨
okay so bestie, welcome to the t4vf_alloc_mac_filt page from the Kernel API Manual π
this one's a whole function-signature moment and honestly it's giving "let me reserve you a spot in the filter table" energy. stay with me, it's not that deep, i promise π«Ά
πΈ NAME πΈ
t4vf_alloc_mac_filt β literally allocates exact-match filters for MAC addresses. that's the whole vibe. no cap. π
β¨ SYNOPSIS β¨
int t4vf_alloc_mac_filt (struct adapter *adapter , unsigned int viid ,
bool free , unsigned int naddr , const u8 **addr , u16 *idx , u64 *hash
, bool sleep_ok );
like, yes, that's a lot of parameters. breathe. we're gonna go through every single one of them together π
π¦ ARGUMENTS π¦
adapterβ the adapter. yeah that's the whole description. it's the adapter, bestie, what more do you want from me πviidβ the Virtual Interface Identifier. iconic little id, it knows which interface it belongs to πfreeβ iftrue, any existing filters for this VI id get removed first. like clearing your camera roll before a new photoshoot πΈnaddrβ the number of MAC addresses to allocate filters for, and heads up, it's up to 7. seven. that's the ceiling. don't come at me with 8 πaddrβ the MAC address(es). the main characters of this whole operation πidxβ where to store the index of each allocated filter. your little receipt of where everything landed π§Ύhashβ pointer to the hash address filter bitmap. the backup plan energy β¨sleep_okβ call is allowed to sleep π΄ yes that's really what it means, and yes it's a whole mood
π DESCRIPTION π
so what does it actually do? it allocates an exact-match filter for each of the supplied addresses and sets it to the corresponding address. one filter, one address, matching set, periodt π―
if idx is not NULL it should have at least naddr entries, each of which will be set to the index of the filter allocated for the corresponding MAC address. so like, keep the list long enough or it's gonna be a bad time, iykyk.
if a filter could not be allocated for an address, its index is set to 0xffff. that's the "sorry babe, no slot for you" value π
if hash is not NULL, addresses that fail to allocate an exact filter are hashed and update the hash filter bitmap pointed at by hash. so they still get somewhere to live. not the same vibe, but they're housed π
then it returns a negative error number or the number of filters allocated. negative = nope, positive number = that's how many you actually got. easy β
π SEE ALSO π
the kernel file lives at ./drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c β go say hi to it for me π
and here's the whole friend group, every single one of them, not skipping a single bestie:
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_free_mac_filt(9)t4vf_change_mac(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)
lowkey if you read all 36 of those you're a real one. go touch some grass, then come back and allocate some filters π±
okay that's the page!! this came from ./drivers/net/ethernet/chelsio... and it's dated October 2026 β so it's lowkey from the future, which is very main character of it β thanks for reading, bestie, you ate that ππ
π¦ 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