Skip to content

Commit ef4a47a

Browse files
committed
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
Tariq Toukan says: ==================== mlx5-next updates 2025-02-24 The following pull-request contains common mlx5 updates for your *net-next* tree. * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Change POOL_NEXT_SIZE define value and make it global net/mlx5: Add new health syndrome error and crr bit offset ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 8fa19c2 + 80df31f commit ef4a47a

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int esw_create_legacy_fdb_table(struct mlx5_eswitch *esw)
9696
if (!flow_group_in)
9797
return -ENOMEM;
9898

99-
ft_attr.max_fte = POOL_NEXT_SIZE;
99+
ft_attr.max_fte = MLX5_FS_MAX_POOL_SIZE;
100100
ft_attr.prio = LEGACY_FDB_PRIO;
101101
fdb = mlx5_create_flow_table(root_ns, &ft_attr);
102102
if (IS_ERR(fdb)) {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ mlx5_ft_pool_get_avail_sz(struct mlx5_core_dev *dev, enum fs_flow_table_type tab
5050
int i, found_i = -1;
5151

5252
for (i = ARRAY_SIZE(FT_POOLS) - 1; i >= 0; i--) {
53-
if (dev->priv.ft_pool->ft_left[i] && FT_POOLS[i] >= desired_size &&
53+
if (dev->priv.ft_pool->ft_left[i] &&
54+
(FT_POOLS[i] >= desired_size ||
55+
desired_size == MLX5_FS_MAX_POOL_SIZE) &&
5456
FT_POOLS[i] <= max_ft_size) {
5557
found_i = i;
56-
if (desired_size != POOL_NEXT_SIZE)
58+
if (desired_size != MLX5_FS_MAX_POOL_SIZE)
5759
break;
5860
}
5961
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#include <linux/mlx5/driver.h>
88
#include "fs_core.h"
99

10-
#define POOL_NEXT_SIZE 0
11-
1210
int mlx5_ft_pool_init(struct mlx5_core_dev *dev);
1311
void mlx5_ft_pool_destroy(struct mlx5_core_dev *dev);
1412

drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ mlx5_chains_create_table(struct mlx5_fs_chains *chains,
161161
ft_attr.flags |= (MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT |
162162
MLX5_FLOW_TABLE_TUNNEL_EN_DECAP);
163163

164-
sz = (chain == mlx5_chains_get_nf_ft_chain(chains)) ? FT_TBL_SZ : POOL_NEXT_SIZE;
164+
sz = (chain == mlx5_chains_get_nf_ft_chain(chains)) ?
165+
FT_TBL_SZ : MLX5_FS_MAX_POOL_SIZE;
165166
ft_attr.max_fte = sz;
166167

167168
/* We use chains_default_ft(chains) as the table's next_ft till

include/linux/mlx5/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ struct mlx5_cmd_layout {
538538
};
539539

540540
enum mlx5_rfr_severity_bit_offsets {
541+
MLX5_CRR_BIT_OFFSET = 0x6,
541542
MLX5_RFR_BIT_OFFSET = 0x7,
542543
};
543544

include/linux/mlx5/fs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
#define MLX5_SET_CFG(p, f, v) MLX5_SET(create_flow_group_in, p, f, v)
4242

43+
#define MLX5_FS_MAX_POOL_SIZE BIT(30)
44+
4345
enum mlx5_flow_destination_type {
4446
MLX5_FLOW_DESTINATION_TYPE_NONE,
4547
MLX5_FLOW_DESTINATION_TYPE_VPORT,

include/linux/mlx5/mlx5_ifc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11119,6 +11119,7 @@ enum {
1111911119
MLX5_INITIAL_SEG_HEALTH_SYNDROME_FFSER_ERR = 0xf,
1112011120
MLX5_INITIAL_SEG_HEALTH_SYNDROME_HIGH_TEMP_ERR = 0x10,
1112111121
MLX5_INITIAL_SEG_HEALTH_SYNDROME_ICM_PCI_POISONED_ERR = 0x12,
11122+
MLX5_INITIAL_SEG_HEALTH_SYNDROME_TRUST_LOCKDOWN_ERR = 0x13,
1112211123
};
1112311124

1112411125
struct mlx5_ifc_initial_seg_bits {

0 commit comments

Comments
 (0)