diff options
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 11 | ||||
-rw-r--r-- | include/linux/mlx5/driver.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c index 5680beba8c07..5633f8572800 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c @@ -6,6 +6,7 @@ #include "lag_mp.h" #include "mlx5_core.h" #include "eswitch.h" +#include "lib/mlx5.h" static bool mlx5_lag_multipath_check_prereq(struct mlx5_lag *ldev) { @@ -73,6 +74,16 @@ static void mlx5_lag_set_port_affinity(struct mlx5_lag *ldev, int port) return; } + if (tracker.netdev_state[0].tx_enabled) + mlx5_notifier_call_chain(ldev->pf[0].dev->priv.events, + MLX5_DEV_EVENT_PORT_AFFINITY, + (void *)0); + + if (tracker.netdev_state[1].tx_enabled) + mlx5_notifier_call_chain(ldev->pf[1].dev->priv.events, + MLX5_DEV_EVENT_PORT_AFFINITY, + (void *)0); + mlx5_modify_lag(ldev, &tracker); } diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index ee109b3fbfb8..5ffb5df1a2c2 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -195,6 +195,7 @@ struct mlx5_rsc_debug { enum mlx5_dev_event { MLX5_DEV_EVENT_SYS_ERROR = 128, /* 0 - 127 are FW events */ + MLX5_DEV_EVENT_PORT_AFFINITY = 129, }; enum mlx5_port_status { |