]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix matchall police parameters validation
authorVlad Buslov <vladbu@nvidia.com>
Mon, 4 Jul 2022 20:44:05 +0000 (22:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2022 11:44:39 +0000 (12:44 +0100)
commit9ae5207feabb16692dac0566e026722dd94edc80
tree01fa9fc940185a231a27369ef54ea437bff3d4d0
parenta0b6934c9f93c65bb24e12773729c897c95a0db3
net/mlx5e: Fix matchall police parameters validation

Referenced commit prepared the code for upcoming extension that allows mlx5
to offload police action attached to flower classifier. However, with
regard to existing matchall classifier offload validation should be
reversed as FLOW_ACTION_CONTINUE is the only supported notexceed police
action type. Fix the problem by allowing FLOW_ACTION_CONTINUE for police
action and extend scan_tc_matchall_fdb_actions() to only allow such actions
with matchall classifier.

Fixes: d7826daaf80f ("flow_offload: reject offload for all drivers with invalid police parameters")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Acked-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c