mlx5_lag_shared_fdb_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a struct mlx5_lag *.
  • tracker β€” the LAG tracker 🧚 a struct lag_tracker *. and heads up: it's NULL for SD. yes, literally NULL, don't come for me.
  • mode β€” the LAG mode 🌈 an enum mlx5_lag_mode. plot twist: it's unused for SD. lowkey just vibing there.
  • group_id β€” the SD group ID πŸ”₯ a u32, and this one's got lore:
    • 0 (MLX5_LAG_FILTER_PORTS) means ports LAG
    • MLX5_LAG_FILTER_ALL means 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_id is 0 (MLX5_LAG_FILTER_PORTS) or MLX5_LAG_FILTER_ALL β†’ it activates a FW LAG with shared FDB ⚑ firmware's getting involved, it's a whole moment.
  • when group_id is 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 ⭐

  • 0 on 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