mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
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:
parent
7b3707fc79
commit
f7a4e867f4
@ -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, ¶ms);
|
||||
if (err)
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user