t4vf_alloc_mac_filt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” if true, 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:

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