STRUCT NET_BRIDGE_VLAN_GROUP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 fr
  • pvid β€” 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 the master flag set but not the brentry flag. 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