dpsw_vlan_add_if(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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