Skip to content

Commit 12063c2

Browse files
Paul BlakeySaeed Mahameed
authored andcommitted
net/mlx5: Simplify fdb chain and prio eswitch defines
FDB_MAX_CHAIN and FDB_MAX_PRIO were defined differently depending on if CONFIG_MLX5_ESWITCH is enabled to save space on allocations. This is a minor space saving, and there is no real need for it. Simplify things instead, and define them the same in both cases. Signed-off-by: Paul Blakey <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Acked-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 94de879 commit 12063c2

File tree

1 file changed

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

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
#include <linux/mlx5/fs.h>
4444
#include "lib/mpfs.h"
4545

46+
#define FDB_MAX_CHAIN 3
47+
#define FDB_SLOW_PATH_CHAIN (FDB_MAX_CHAIN + 1)
48+
#define FDB_MAX_PRIO 16
49+
4650
#ifdef CONFIG_MLX5_ESWITCH
4751

4852
#define MLX5_MAX_UC_PER_VPORT(dev) \
@@ -59,10 +63,6 @@
5963
#define mlx5_esw_has_fwd_fdb(dev) \
6064
MLX5_CAP_ESW_FLOWTABLE(dev, fdb_multi_path_to_table)
6165

62-
#define FDB_MAX_CHAIN 3
63-
#define FDB_SLOW_PATH_CHAIN (FDB_MAX_CHAIN + 1)
64-
#define FDB_MAX_PRIO 16
65-
6666
struct vport_ingress {
6767
struct mlx5_flow_table *acl;
6868
struct mlx5_flow_handle *allow_rule;
@@ -637,10 +637,6 @@ static inline const u32 *mlx5_esw_query_functions(struct mlx5_core_dev *dev)
637637

638638
static inline void mlx5_eswitch_update_num_of_vfs(struct mlx5_eswitch *esw, const int num_vfs) {}
639639

640-
#define FDB_MAX_CHAIN 1
641-
#define FDB_SLOW_PATH_CHAIN (FDB_MAX_CHAIN + 1)
642-
#define FDB_MAX_PRIO 1
643-
644640
#endif /* CONFIG_MLX5_ESWITCH */
645641

646642
#endif /* __MLX5_ESWITCH_H__ */

0 commit comments

Comments
 (0)