net/mlx5e: TC, Add missing policer validation

There is a missing policer validation when offloading police action
with tc action api. Add it.

Fixes: 7d1a5ce46e ("net/mlx5e: TC, Support tc action api for police")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Roi Dayan 2022-08-01 18:02:49 +03:00 committed by Saeed Mahameed
parent 7b3707fc79
commit f7a4e867f4
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ tc_act_police_offload(struct mlx5e_priv *priv,
struct mlx5e_flow_meter_handle *meter;
int err = 0;
err = mlx5e_policer_validate(&fl_act->action, act, fl_act->extack);
if (err)
return err;
err = fill_meter_params_from_act(act, &params);
if (err)
return err;