File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed
drivers/net/ethernet/mellanox/mlx5/core Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ mlx5_core-$(CONFIG_MLX5_CORE_EN) += en_main.o en_common.o en_fs.o en_ethtool.o \
30
30
mlx5_core-$(CONFIG_MLX5_EN_ARFS) += en_arfs.o
31
31
mlx5_core-$(CONFIG_MLX5_EN_RXNFC) += en_fs_ethtool.o
32
32
mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) += en_dcbnl.o en/port_buffer.o
33
- mlx5_core-$(CONFIG_MLX5_ESWITCH) += en_rep.o en_tc.o en/tc_tun.o lib/port_tun.o
33
+ mlx5_core-$(CONFIG_MLX5_ESWITCH) += en_rep.o en_tc.o en/tc_tun.o lib/port_tun.o lag_mp.o
34
34
35
35
#
36
36
# Core extra
Original file line number Diff line number Diff line change 9
9
enum {
10
10
MLX5_LAG_FLAG_ROCE = 1 << 0 ,
11
11
MLX5_LAG_FLAG_SRIOV = 1 << 1 ,
12
+ MLX5_LAG_FLAG_MULTIPATH = 1 << 2 ,
12
13
};
13
14
14
- #define MLX5_LAG_MODE_FLAGS (MLX5_LAG_FLAG_ROCE | MLX5_LAG_FLAG_SRIOV)
15
+ #define MLX5_LAG_MODE_FLAGS (MLX5_LAG_FLAG_ROCE | MLX5_LAG_FLAG_SRIOV |\
16
+ MLX5_LAG_FLAG_MULTIPATH)
15
17
16
18
struct lag_func {
17
19
struct mlx5_core_dev * dev ;
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
2
+ /* Copyright (c) 2019 Mellanox Technologies. */
3
+
4
+ #include <linux/netdevice.h>
5
+ #include "lag.h"
6
+ #include "mlx5_core.h"
7
+ #include "eswitch.h"
8
+
9
+ static bool __mlx5_lag_is_multipath (struct mlx5_lag * ldev )
10
+ {
11
+ return !!(ldev -> flags & MLX5_LAG_FLAG_MULTIPATH );
12
+ }
13
+
14
+ bool mlx5_lag_is_multipath (struct mlx5_core_dev * dev )
15
+ {
16
+ struct mlx5_lag * ldev ;
17
+ bool res ;
18
+
19
+ ldev = mlx5_lag_dev_get (dev );
20
+ res = ldev && __mlx5_lag_is_multipath (ldev );
21
+
22
+ return res ;
23
+ }
Original file line number Diff line number Diff line change @@ -1041,6 +1041,7 @@ int mlx5_cmd_create_vport_lag(struct mlx5_core_dev *dev);
1041
1041
int mlx5_cmd_destroy_vport_lag (struct mlx5_core_dev * dev );
1042
1042
bool mlx5_lag_is_roce (struct mlx5_core_dev * dev );
1043
1043
bool mlx5_lag_is_sriov (struct mlx5_core_dev * dev );
1044
+ bool mlx5_lag_is_multipath (struct mlx5_core_dev * dev );
1044
1045
bool mlx5_lag_is_active (struct mlx5_core_dev * dev );
1045
1046
struct net_device * mlx5_lag_get_roce_netdev (struct mlx5_core_dev * dev );
1046
1047
int mlx5_lag_query_cong_counters (struct mlx5_core_dev * dev ,
You can’t perform that action at this time.
0 commit comments