mlx5_lag_shared_fdb_create(9)
π mlx5_lag_shared_fdb_create β Kernel API Manual β¨
okay bestie, buckle up, because we're diving into mlx5_lag_shared_fdb_create(9) from the Kernel API Manual and honestly? it's giving kernel-internals realness π¦ this one lives in the mlx5 core driver and it's all about making a shared FDB LAG happen. no cap.
π NAME π
mlx5_lag_shared_fdb_create β Create shared FDB LAG π literally what it says on the tin, she creates the shared FDB LAG, periodt.
β¨ SYNOPSIS β¨
int mlx5_lag_shared_fdb_create (struct mlx5_lag *ldev , struct
lag_tracker *tracker , enum mlx5_lag_mode mode , u32 group_id );
four args, one int back, that's the whole vibe πΈ
π«Ά ARGUMENTS π«Ά
so here's the cast of characters, and every single one matters:
ldevβ the LAG device itself π main character energy, she's astruct mlx5_lag *.trackerβ the LAG tracker π§ astruct lag_tracker *. and heads up: it'sNULLfor SD. yes, literallyNULL, don't come for me.modeβ the LAG mode π anenum mlx5_lag_mode. plot twist: it's unused for SD. lowkey just vibing there.group_idβ the SD group ID π₯ au32, and this one's got lore:0(MLX5_LAG_FILTER_PORTS) means ports LAGMLX5_LAG_FILTER_ALLmeans all-device (mpesw) LAG- or it's a specific SD group ID β see the description below, iykyk
π DESCRIPTION π
okay so this is where it gets good. the behaviour of this function depends entirely on what you pass as group_id, and there are two whole situations:
- when
group_idis0(MLX5_LAG_FILTER_PORTS) orMLX5_LAG_FILTER_ALLβ it activates a FW LAG with shared FDB β‘ firmware's getting involved, it's a whole moment. - when
group_idis a specific SD group ID β it creates a software-only shared FDB scoped to that group, and no FW LAG commands happen at all π software-only, staying in her lane, no firmware drama.
so yeah: same function, two completely different energies depending on group_id. vibe check accordingly π
β RETURN β
0on success π slay, she worked.- negative error code on failure π it's giving "something went wrong," and that's genuinely all the detail we have, bestie β a negative error code, no cap.
π₯ SEE ALSO π₯
- Kernel file
./drivers/net/ethernet/mellanox/mlx5/core/lag/shared_fdb.cβ go read the source if you want the full lore π
ngl, if you're poking at LAG modes and group IDs in the mlx5 driver, you probably already know what you're doing. but if you didn't before? now you do π
and that's the page, bestie π source path was ./drivers/net/ethernet/mellano... and the date stamp on this whole thing is October 2026 β she's from the future, iconic π
π¦
mlx5_lag_shared_fdb_create(9) β mwah, no notes π
π¦ 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