STRUCT MXL862XX_VLANFILTER_ALLOC(9)
π struct mxl862xx_vlanfilter_alloc(9) β Kernel API Manual β¨
Okay bestie, gather round, because we're about to deep-dive into a very specific little kernel struct. This is struct mxl862xx_vlanfilter_alloc, and it's giving "I manage VLAN filter blocks and I take that job very seriously." π It's part of the Kernel API Manual, and honestly? Iconic.
πΈ NAME πΈ
struct mxl862xx_vlanfilter_alloc β the VLAN Filter block allocation struct. That's it, that's the vibe. No cap. π
β¨ SYNOPSIS β¨
Here's the whole glow-up, bestie β every field exactly as it lives in the kernel, no edits, no notes:
struct mxl862xx_vlanfilter_alloc {
__le16 number_of_entries;
__le16 vlan_filter_block_id;
u8 discard_untagged;
u8 discard_unmatched_tagged;
u8 use_default_port_vid;
};
Look at those little __le16s and u8s just sitting there being perfect. Little endian chipmunk energy. πΏοΈπ
π¦ Members π¦
Okay so every field in this struct has a job, and we're gonna give each one its moment. Periodt.
number_of_entriesβ This is the count of entries you're working with. And the way it's a double agent? On the way in it's the number of entries you wanna allocate (that's the input, bestie), and on the way out it's the number that actually got allocated (that's the output). She's versatile. She contains multitudes. πvlan_filter_block_idβ The block ID that firmware hands you. And get this β it's got different roles depending on what you're doing: it's an output on alloc (firmware tells you which block you got) and an input on free (you tell firmware which block to take back). Same field, two modes, true main character energy. πdiscard_untaggedβ Yep, it's exactly what it sounds like: discard untagged packets. Untagged packets who? Don't know her. Bye. ποΈdiscard_unmatched_taggedβ This one throws out tagged packets that do not match any entry in the block. Like, if you're a tagged packet and you don't have a matching entry? You're not on the list, you're not getting in. Security guard energy. πuse_default_port_vidβ Toggles using the default port VLAN ID for filtering. Simple, cute, does its thing. π
π§ Description π§
So this whole struct is literally for two things: MXL862XX_VLANFILTER_ALLOC and MXL862XX_VLANFILTER_FREE. That's the tea. Used with both, and that's the entire description bestie, we're done here. π
π SEE ALSO π
Okay buckle up, because this list is long and we do not skip a single one. Every reference, exactly as written, no cap. Read 'em, love 'em, click through to the rest of the API. These are all from the kernel file ./drivers/net/dsa/mxl862xx/mxl862xx-api.h:
struct mdio_relay_data(9), struct mxl862xx_register_mod(9), enum mxl862xx_mac_table_filter(9), struct mxl862xx_mac_table_add(9), struct mxl862xx_mac_table_remove(9), struct mxl862xx_mac_table_read(9), struct mxl862xx_mac_table_query(9), enum mxl862xx_mac_clear_type(9), struct mxl862xx_mac_table_clear(9), enum mxl862xx_age_timer(9), struct mxl862xx_bridge_alloc(9), enum mxl862xx_bridge_config_mask(9), enum mxl862xx_bridge_port_egress_meter(9), struct mxl862xx_qos_meter_cfg(9), enum mxl862xx_bridge_forward_mode(9), struct mxl862xx_bridge_config(9), struct mxl862xx_bridge_port_alloc(9), enum mxl862xx_bridge_port_config_mask(9), enum mxl862xx_color_marking_mode(9), enum mxl862xx_color_remarking_mode(9), enum mxl862xx_pmapper_mapping_mode(9), struct mxl862xx_pmapper(9), struct mxl862xx_bridge_port_config(9), struct mxl862xx_cfg(9), enum mxl862xx_extended_vlan_filter_type(9), enum mxl862xx_extended_vlan_filter_tpid(9), enum mxl862xx_extended_vlan_filter_dei(9), enum mxl862xx_extended_vlan_treatment_remove_tag(9), enum mxl862xx_extended_vlan_treatment_priority(9), enum mxl862xx_extended_vlan_treatment_vid(9), enum mxl862xx_extended_vlan_treatment_tpid(9), enum mxl862xx_extended_vlan_treatment_dei(9), enum mxl862xx_extended_vlan_4_tpid_mode(9), enum mxl862xx_extended_vlan_filter_ethertype(9), struct mxl862xx_extendedvlan_filter_vlan(9), struct mxl862xx_extendedvlan_filter(9), struct mxl862xx_extendedvlan_treatment_vlan(9), struct mxl862xx_extendedvlan_treatment(9), struct mxl862xx_extendedvlan_alloc(9), struct mxl862xx_extendedvlan_config(9), enum mxl862xx_vlan_filter_tci_mask(9), struct mxl862xx_vlanfilter_config(9), enum mxl862xx_ss_sp_tag_mask(9), enum mxl862xx_ss_sp_tag_rx(9), enum mxl862xx_ss_sp_tag_tx(9), enum mxl862xx_ss_sp_tag_rx_pen(9), struct mxl862xx_ss_sp_tag(9), enum mxl862xx_logical_port_mode(9), struct mxl862xx_ctp_port_assignment(9), enum mxl862xx_stp_port_state(9), struct mxl862xx_stp_port_cfg(9), struct mxl862xx_sys_fw_image_version(9), enum mxl862xx_port_type(9), enum mxl862xx_rmon_port_type(9), struct mxl862xx_rmon_port_cnt(9), union mxl862xx_xpcs_an_word(9), enum mxl862xx_xpcs_loopback_mode(9), struct mxl862xx_xpcs_pcs_cfg(9), struct mxl862xx_xpcs_pcs_state(9), struct mxl862xx_xpcs_pcs_disable(9), struct mxl862xx_xpcs_an_restart(9), struct mxl862xx_xpcs_pcs_link_up(9).
That's the whole squad. π«Ά
Ngl bestie, this one is very specific to the mxl862xx switch driver, so if you're not in that ./drivers/net/dsa/mxl862xx directory, this might be a lot. But if you ARE β you're so welcome. ππ
And that's the whole page! π Huge shoutout to the kernel documentation at ./drivers/net/dsa/mxl862xx, dated October 2026, for making this little struct make sense. Go forth and filter those VLANs, bestie β slay. πβ¨π₯
π¦ 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