dpsw_vlan_add_if(9)
π dpsw_vlan_add_if β Kernel API Manual
okay so bestie, welcome to dpsw_vlan_add_if(9), the kernel API manual page that's about to make your whole VLAN situation make sense β¨ this one lives in the Kernel API Manual, and it's literally the function you call when you want to add a bunch of interfaces to a VLAN that already exists. no cap.
πΈ NAME πΈ
dpsw_vlan_add_if β adding a set of interfaces to an existing VLAN. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
int dpsw_vlan_add_if (struct fsl_mc_io *mc_io , u32 cmd_flags , u16
token , u16 vlan_id , const struct dpsw_vlan_if_cfg *cfg );
she takes five args and returns an int, periodt π
π«Ά ARGUMENTS π«Ά
mc_ioβ pointer to the MC portal's I/O object. yes bestie, the portal. it's giving "magic door to the hardware" energy πͺβ¨cmd_flagsβ command flags; one or more of'MC_CMD_FLAG_'. pick your flags, queen πtokenβ token of the DPSW object. that's your little hand-stamp for this DPAA2 switch ποΈvlan_idβ VLAN Identifier. the actual number of the VLAN you're messing with π’cfgβ set of interfaces to add. this is the *const struct dpsw_vlan_if_cfg *` bundle of friends you're bringing to the party π
π¦ DESCRIPTION π¦
so here's the tea β: it adds only interfaces that don't already belong to this VLAN. if one of them is already in there? an error is generated and the entire command is ignored π like, the whole thing. not just the one bad interface. the whole command. so don't try to sneak a duplicate in there, it will not slay, it will not pass go π
the good news? this function can be called numerous times, as long as you're always providing the required interfaces delta. so like, incremental additions, one batch at a time. that's the move π§
bestie warning π: the all-or-nothing behaviour above is literally in the spec β one already-belonging interface means the entire command gets ignored. plan your delta accordingly π
π RETURN π
Completion status β¨ '0' on Success; Error code otherwise. so check your return value, bestie, don't just vibe and assume π€
β SEE ALSO β
the kernel file lives at ./drivers/net/ethernet/freescale/dpaa2/dpsw.c and honestly the whole friend group is here:
dpsw_open(9),dpsw_close(9),dpsw_enable(9),dpsw_disable(9),dpsw_reset(9)dpsw_set_irq_enable(9),dpsw_set_irq_mask(9),dpsw_get_irq_status(9),dpsw_clear_irq_status(9)dpsw_get_attributes(9)dpsw_if_set_link_cfg(9),dpsw_if_get_link_state(9),dpsw_if_set_tci(9),dpsw_if_get_tci(9),dpsw_if_set_stp(9),dpsw_if_get_counter(9),dpsw_if_enable(9),dpsw_if_disable(9),dpsw_if_get_attributes(9),dpsw_if_set_max_frame_length(9)dpsw_vlan_add(9),dpsw_vlan_add_if_untagged(9),dpsw_vlan_remove_if(9),dpsw_vlan_remove_if_untagged(9),dpsw_vlan_remove(9)dpsw_fdb_add(9),dpsw_fdb_remove(9),dpsw_fdb_add_unicast(9),dpsw_fdb_dump(9),dpsw_fdb_remove_unicast(9),dpsw_fdb_add_multicast(9),dpsw_fdb_remove_multicast(9)dpsw_ctrl_if_get_attributes(9),dpsw_ctrl_if_set_pools(9),dpsw_ctrl_if_set_queue(9),dpsw_get_api_version(9),dpsw_if_get_port_mac_addr(9),dpsw_ctrl_if_enable(9),dpsw_ctrl_if_disable(9)dpsw_set_egress_flood(9),dpsw_if_set_learning_mode(9)dpsw_acl_add(9),dpsw_acl_remove(9),dpsw_acl_add_if(9),dpsw_acl_remove_if(9),dpsw_acl_prepare_entry_cfg(9),dpsw_acl_add_entry(9),dpsw_acl_remove_entry(9)dpsw_set_reflection_if(9),dpsw_if_add_reflection(9),dpsw_if_remove_reflection(9)dpsw_lag_set(9),dpsw_if_set_lag_state(9)
iykyk π₯ go read the whole squad, bestie, they all ate π
and that's the page π it's from ./drivers/net/ethernet/freesca... dated October 2026, header says dpsw_vlan_add_if(9) β love that for us. bye bestie, go add those interfaces ππ¦β¨
π¦ 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