net/mlx5e: psp: Adjust rx_check FT size and use a drop_group

The rx_check ft was requesting max_fte == 2, but it created 4 entries.
While this accidentally works, it's not accurate, so change that and use
the correct number of entries. Also use an explicit drop_group for the
last match(*) drop rule.

Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260707130858.969928-10-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Cosmin Ratiu
2026-07-07 16:08:52 +03:00
committed by Jakub Kicinski
parent 1b1a66b37e
commit 25f756e29f

View File

@@ -31,6 +31,7 @@ struct mlx5e_psp_tx_table {
struct mlx5e_psp_rx_check_table {
struct mlx5_flow_table *ft;
struct mlx5_flow_group *drop_group;
struct mlx5_flow_handle *rule;
struct mlx5_flow_handle *auth_fail_rule;
struct mlx5_flow_handle *err_rule;
@@ -165,6 +166,7 @@ void accel_psp_fs_rx_check_ft_destroy(struct mlx5e_psp_fs *fs,
accel_psp_fs_del_flow_rule(&check->err_rule);
accel_psp_fs_del_flow_rule(&check->auth_fail_rule);
accel_psp_fs_del_flow_rule(&check->rule);
accel_psp_fs_destroy_flow_group(&check->drop_group);
accel_psp_fs_destroy_ft(&check->ft);
}
@@ -218,7 +220,8 @@ int accel_psp_fs_rx_check_ft_create(struct mlx5e_psp_fs *fs,
if (!spec)
return -ENOMEM;
ft_attr.max_fte = 2;
ft_attr.max_fte = 4;
ft_attr.autogroup.num_reserved_entries = 1;
ft_attr.autogroup.max_num_groups = 2;
ft_attr.level = MLX5E_ACCEL_FS_ESP_FT_ERR_LEVEL;
ft_attr.prio = MLX5E_NIC_PRIO;
@@ -229,6 +232,14 @@ int accel_psp_fs_rx_check_ft_create(struct mlx5e_psp_fs *fs,
goto out_err;
}
err = accel_psp_fs_create_miss_group(check->ft, &check->drop_group);
if (err) {
mlx5_core_err(fs->mdev,
"fail to create psp rx check drop group err=%d\n",
err);
goto out_err;
}
accel_psp_setup_syndrome_match(spec, PSP_OK);
/* create fte */
flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST |