Skip to content

Commit

Permalink
net/mlx5e: TC, Add missing policer validation
Browse files Browse the repository at this point in the history
There is a missing policer validation when offloading police action
with tc action api. Add it.

Fixes: 7d1a5ce ("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>
  • Loading branch information
Roi Dayan authored and Saeed Mahameed committed Aug 22, 2022
1 parent 7b3707f commit f7a4e86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/police.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f7a4e86

Please sign in to comment.