dsa_lag_map(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dsa_lag_map β€” like, kernel API manual energy (section 9, bestie)

okay so real talk, this is a page straight out of the Kernel API Manual, section 9, and it's all about one tiny little function that does one tiny little thing. and honestly? she ate. let's get into it πŸŽ€


✨ NAME ✨

dsa_lag_map β€” maps a LAG structure into a linear LAG array πŸ¦‹

like that's it, that's the whole vibe. she takes your LAG and she puts it where it belongs.


🌸 SYNOPSIS 🌸

void dsa_lag_map (struct dsa_switch_tree *dst , struct dsa_lag *lag );

no return value, no drama, no notes. she just does the thing πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • dst β€” the tree πŸŽ€ the one where the mapping gets recorded. that's her whole job, she holds the map.
  • lag β€” the LAG structure 🌈 the actual thing being mapped into that tree's array. she's the main character getting placed, fr fr.

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the lore, bestie. once you've done this, you can use dsa_lag_id / dsa_lag_by_id to translate between those two spaces β€” like going back and forth between the LAG itself and its slot in the array. cute, right? πŸ”₯

the size of that mapping space? not her call. the driver decides, by setting ds->num_lag_ids. so if you're the driver, you're the one setting the vibes here.

and ngl, it is perfectly legal to just... leave it unset if you don't need it 🫢 like, nothing breaks, nobody's mad. in that case these functions literally become no-ops β€” they show up, they do nothing, they leave. iconic behaviour honestly 😭


πŸ’€ SEE ALSO πŸ’€

  • Kernel file ./net/dsa/dsa.c πŸ“
  • dsa_lag_unmap(9) β€” the reverse girly πŸ’œ

okay that's the whole page, you're welcome, go forth and map your LAGs responsibly 🧚✨

sign-off time!! this little masterpiece comes to you from ./net/dsa and it's dated October 2026 β€” yes, we're being punctual about it πŸ’…πŸŒΈβ­

πŸ“¦ where this page comes from