net/mlx5: Lag, add initial logic for shared FDB
authorMark Bloch <mbloch@nvidia.com>
Tue, 3 Aug 2021 23:19:47 +0000 (16:19 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Aug 2021 20:49:24 +0000 (13:49 -0700)
commitaf8c0e25f249abf8829f0cfa074b08d7398e3e38
tree7f43dc2ffd8fb99eaf30087eac8273e4ed20d627
parent97a8a8c1f985baf13a3d0d252b787850330d2ea7
net/mlx5: Lag, add initial logic for shared FDB

As shared FDB requires changes in two subsystems first expose the needed
core functions so the RDMA side can be changed.

mlx5_lag_is_master(): return true if a given mlx5 device is the lag master.
mlx5_lag_is_shared_fdb(): Returns true if the lag mode is shared FDB.
mlx5_lag_get_peer_mdev(): Return the peer mdev in lag.

The mentioned functions will be used by downstream patches in order
to add support for shared FDB for the RDMA side.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag.c
drivers/net/ethernet/mellanox/mlx5/core/lag.h
include/linux/mlx5/driver.h