STRUCT MXL862XX_EVLAN_BLOCK(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mxl862xx_evlan_block(9) β€” the Kernel API Manual glow-up πŸ’–

okay bestie, so this is a page straight out of the Kernel API Manual, section 9, and it's all about one little struct. sit down, grab a strawberry drink πŸ“, we're doing this.


✨ NAME ✨

struct mxl862xx_evlan_block β€” the per-port, per-direction extended VLAN block. like, per port AND per direction, she's multifaceted πŸ’…


🌸 SYNOPSIS 🌸

struct mxl862xx_evlan_block {
    bool allocated;
    bool in_use;
    u16 block_id;
    u16 block_size;
    u16 n_active;
 };

there she is. five fields, zero notes. icon behavior πŸ‘‘


πŸŽ€ Members πŸŽ€

okay so let's go through the whole cast, one member at a time, main character energy only:

  • allocated β€” is this HW block actually allocated, yes or no? it gets set via EXTENDEDVLAN_ALLOC. this one is basically the bouncer at the club 🫢: it guards alloc/free idempotency, and the block_id is only valid while allocated is true. so no, you can't just peek at the id when she's not allocated, that's not a thing.
  • in_use β€” should the EVLAN engine be enabled for this block on the bridge port? this is literally the enable flag that gets sent in set_bridge_port. and here's the fun part: it can be false while allocated is still true β€” no cap. for example, when all egress VIDs are removed (idx == 0 in evlan_program_egress), the block stays allocated in case it gets reused later, but the engine is disabled so that an empty rule set doesn't go ahead and discard all traffic 😭 that would be so bad.
  • block_id β€” the HW block ID, courtesy of EXTENDEDVLAN_ALLOC. that's her whole job.
  • block_size β€” total entries allocated. the whole capacity, bestie.
  • n_active β€” how many HW entries are currently written. the bridge port config sends this as the egress scan window, which means entries beyond n_active are never scanned β€” they just sit there, unbothered, unlooked-at πŸ™ˆ. and for ingress blocks it always equals block_size, because those are fixed catchall rules. periodt.

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, honestly. go say hi πŸ’œ


ngl the way that struct does exactly what it says on the tin is so satisfying. vibe check: passed βœ…

and that's the tea 🧚 this one's from ./drivers/net/dsa/mxl862xx, dated October 2026, and the header is struct mxl862xx_evlan_block(9) β€” same struct, same energy, bye bestie!! πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from