]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 3 May 2022 12:14:28 +0000 (15:14 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 May 2022 02:40:19 +0000 (19:40 -0700)
commitaf54ba785b7bafcda7b1857e4849446c7c87ec1a
tree0e5ae3620eb6f79ce84c5e4559bcf3afffcae66c
parent202b448cc0a4e1f248b4ac5d910581e7a64ec5a7
selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer

As discussed here with Ido Schimmel:
https://patchwork.kernel.org/project/netdevbpf/patch/20220224102908.5255-2-jianbol@nvidia.com/

the default conform-exceed action is "reclassify", for a reason we don't
really understand.

The point is that hardware can't offload that police action, so not
specifying "conform-exceed" was always wrong, even though the command
used to work in hardware (but not in software) until the kernel started
adding validation for it.

Fix the command used by the selftest by making the policer drop on
exceed, and pass the packet to the next action (goto) on conform.

Fixes: 02e198d4c961 ("selftests: ocelot: add some example VCAP IS1, IS2 and ES0 tc offloads")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20220503121428.842906-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh