STRUCT MXL862XX_EVLAN_BLOCK(9)
π 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 viaEXTENDEDVLAN_ALLOC. this one is basically the bouncer at the club π«Ά: it guards alloc/free idempotency, and theblock_idis only valid whileallocatedis 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 inset_bridge_port. and here's the fun part: it can befalsewhileallocatedis stilltrueβ no cap. for example, when all egress VIDs are removed (idx == 0inevlan_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 ofEXTENDEDVLAN_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 beyondn_activeare never scanned β they just sit there, unbothered, unlooked-at π. and for ingress blocks it always equalsblock_size, because those are fixed catchall rules. periodt.
π¦ SEE ALSO π¦
- the kernel file itself:
./drivers/net/dsa/mxl862xx/mxl862xx.h mxl862xx_fw_portmap_set_bit(9)mxl862xx_fw_portmap_clear_bit(9)mxl862xx_fw_portmap_is_empty(9)struct mxl862xx_vf_vid(9)struct mxl862xx_vf_block(9)struct mxl862xx_port_stats(9)struct mxl862xx_port(9)struct mxl862xx_pcs(9)struct mxl862xx_fw_version(9)struct mxl862xx_priv(9)
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
- 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