STRUCT NET_BRIDGE_VLAN_GROUP(9)
π struct net_bridge_vlan_group(9) β the Kernel API Manual, bestie edition π
okay so this is a page from the Kernel API Manual and it's all about struct net_bridge_vlan_group β yes the NAME section is literally just the struct name and nothing else, she's mysterious like that β¨
π¦ SYNOPSIS π¦
here's the whole struct, verbatim, no cap:
struct net_bridge_vlan_group {
struct rhashtable vlan_hash;
struct rhashtable tunnel_hash;
struct list_head vlan_list;
u16 num_vlans;
u16 pvid;
u8 pvid_state;
};
πΈ Members πΈ
vlan_hashβ the rhashtable holding your VLAN entries. it's giving "main character data structure" πtunnel_hashβ hash table that maps from a tunnel key ID (like a VXLAN VNI, iykyk) to a VLAN πvlan_listβ a sorted list of VLAN entries. sorted! organized! iconic β¨num_vlansβ the number of total VLAN entries, fr frpvidβ the PVID VLAN id π·οΈpvid_stateβ the PVID's STP state (like forwarding, learning, or blocking β pick your vibe) π¦
π Description π
IMPORTANT: bestie please be careful when you're checking if there are VLAN entries using list primitives π because the bridge can have entries in its list that are just for global context and not for filtering β meaning they have themasterflag set but not thebrentryflag. messy, I know.
so if you have to check whether there are "real" entries in the bridge, please please please test num_vlans instead π that's the whole assignment. that's the tea. π
π SEE ALSO π
- Kernel file
./net/bridge/br_private.h struct net_bridge_vlan(9)
and that's the page! π«Ά brought to you by the good people in ./net/bridge, dated October 2026, with the footer reading struct net_b...e_vlan_group(9) β yes the title is abbreviated in the footer, she's shy π slay, go forth and check your num_vlans πβ
π¦ 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