Commit 8aaca197 authored by Rabie Loulou's avatar Rabie Loulou Committed by Saeed Mahameed
Browse files

net/mlx5: Allow co-enablement of uplink LAG and SRIOV



Enable setting uplink LAG if sriov is enabled on both ports in switchdev
mode.

Once the sriov mode is changed from switchdev for any of the ports, the
LAG instance is disabled.

Signed-off-by: default avatarRabie Loulou <rabiel@mellanox.com>
Signed-off-by: default avatarAviv Heller <avivh@mellanox.com>
Signed-off-by: default avatarJianbo Liu <jianbol@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent eff849b2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2232,8 +2232,10 @@ EXPORT_SYMBOL_GPL(mlx5_eswitch_mode);

bool mlx5_esw_lag_prereq(struct mlx5_core_dev *dev0, struct mlx5_core_dev *dev1)
{
	if (dev0->priv.eswitch->mode == SRIOV_NONE &&
	    dev1->priv.eswitch->mode == SRIOV_NONE)
	if ((dev0->priv.eswitch->mode == SRIOV_NONE &&
	     dev1->priv.eswitch->mode == SRIOV_NONE) ||
	    (dev0->priv.eswitch->mode == SRIOV_OFFLOADS &&
	     dev1->priv.eswitch->mode == SRIOV_OFFLOADS))
		return true;

	return false;