]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: SD, Implement devcom communication and primary election
authorTariq Toukan <tariqt@nvidia.com>
Sun, 10 Dec 2023 14:24:36 +0000 (16:24 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 21 Dec 2023 00:54:25 +0000 (16:54 -0800)
commita45af9a96740873db9a4b5bb493ce2ad81ccb4d5
tree541a2c91fff8690e5b2a4cbc043f53ccb2cef838
parent63b9ce944c0e26c44c42cdd5095c2e9851c1a8ff
net/mlx5: SD, Implement devcom communication and primary election

Use devcom to communicate between the different devices. Add a new
devcom component type for this.

Each device registers itself to the devcom component <SD, group ID>.
Once all devices of a component are registered, the component becomes
ready, and a primary device is elected.

In principle, any of the devices can act as a primary, they are all
capable, and a random election would've worked. However, we aim to
achieve predictability and consistency, hence each group always choses
the same device, with the lowest PCI BUS number, as primary.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.h
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c