aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h
diff options
context:
space:
mode:
authorErez Alfasi <ereza@mellanox.com>2019-09-16 14:34:55 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2019-11-01 14:55:17 -0700
commit1cdc14e9d134a48d86673fd75a6abcbe0e58a29c (patch)
tree7e771f9af2714f043dcf9182f1a1254557a46c82 /drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h
parentnet/mlx5: LAG, Use port enumerators (diff)
downloadwireguard-linux-1cdc14e9d134a48d86673fd75a6abcbe0e58a29c.tar.xz
wireguard-linux-1cdc14e9d134a48d86673fd75a6abcbe0e58a29c.zip
net/mlx5: LAG, Use affinity type enumerators
Instead of using explicit indexes, simply use affinity type enumerators to make the code more readable. Fixes: 544fe7c2e654 ("net/mlx5e: Activate HW multipath and handle port affinity based on FIB events") Signed-off-by: Erez Alfasi <ereza@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h
index 6d14b1100be9..79be89e9c7a4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.h
@@ -7,6 +7,12 @@
#include "lag.h"
#include "mlx5_core.h"
+enum mlx5_lag_port_affinity {
+ MLX5_LAG_NORMAL_AFFINITY,
+ MLX5_LAG_P1_AFFINITY,
+ MLX5_LAG_P2_AFFINITY,
+};
+
struct lag_mp {
struct notifier_block fib_nb;
struct fib_info *mfi; /* used in tracking fib events */