Skip to content

Commit 8aaca19

Browse files
Rabie LoulouSaeed Mahameed
authored andcommitted
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: Rabie Loulou <[email protected]> Signed-off-by: Aviv Heller <[email protected]> Signed-off-by: Jianbo Liu <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent eff849b commit 8aaca19

File tree

1 file changed

+4
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+4
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,8 +2232,10 @@ EXPORT_SYMBOL_GPL(mlx5_eswitch_mode);
22322232

22332233
bool mlx5_esw_lag_prereq(struct mlx5_core_dev *dev0, struct mlx5_core_dev *dev1)
22342234
{
2235-
if (dev0->priv.eswitch->mode == SRIOV_NONE &&
2236-
dev1->priv.eswitch->mode == SRIOV_NONE)
2235+
if ((dev0->priv.eswitch->mode == SRIOV_NONE &&
2236+
dev1->priv.eswitch->mode == SRIOV_NONE) ||
2237+
(dev0->priv.eswitch->mode == SRIOV_OFFLOADS &&
2238+
dev1->priv.eswitch->mode == SRIOV_OFFLOADS))
22372239
return true;
22382240

22392241
return false;

0 commit comments

Comments
 (0)