All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
@ 2022-05-03 12:14 Vladimir Oltean
  2022-05-03 12:20 ` Ido Schimmel
  2022-05-05  2:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2022-05-03 12:14 UTC (permalink / raw)
  To: netdev
  Cc: Jakub Kicinski, David S. Miller, Paolo Abeni, Eric Dumazet,
	Florian Fainelli, Vivien Didelot, Andrew Lunn, Vladimir Oltean,
	Claudiu Manoil, Alexandre Belloni, UNGLinuxDriver,
	Xiaoliang Yang, Colin Foster, Ido Schimmel

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: 8cd6b020b644 ("selftests: ocelot: add some example VCAP IS1, IS2 and ES0 tc offloads")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh b/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh
index 7e684e27a682..4401a654c2c0 100755
--- a/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh
+++ b/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh
@@ -190,7 +190,7 @@ setup_prepare()
 
 	tc filter add dev $eth0 ingress chain $(IS2 0 0) pref 1 \
 		protocol ipv4 flower skip_sw ip_proto udp dst_port 5201 \
-		action police rate 50mbit burst 64k \
+		action police rate 50mbit burst 64k conform-exceed drop/pipe \
 		action goto chain $(IS2 1 0)
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
  2022-05-03 12:14 [PATCH net] selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer Vladimir Oltean
@ 2022-05-03 12:20 ` Ido Schimmel
  2022-05-05  2:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Ido Schimmel @ 2022-05-03 12:20 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, Jakub Kicinski, David S. Miller, Paolo Abeni,
	Eric Dumazet, Florian Fainelli, Vivien Didelot, Andrew Lunn,
	Vladimir Oltean, Claudiu Manoil, Alexandre Belloni,
	UNGLinuxDriver, Xiaoliang Yang, Colin Foster

On Tue, May 03, 2022 at 03:14:28PM +0300, Vladimir Oltean wrote:
> 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: 8cd6b020b644 ("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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
  2022-05-03 12:14 [PATCH net] selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer Vladimir Oltean
  2022-05-03 12:20 ` Ido Schimmel
@ 2022-05-05  2:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-05  2:50 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, kuba, davem, pabeni, edumazet, f.fainelli,
	vivien.didelot, andrew, olteanv, claudiu.manoil,
	alexandre.belloni, UNGLinuxDriver, xiaoliang.yang_1,
	colin.foster, idosch

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  3 May 2022 15:14:28 +0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net] selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
    https://git.kernel.org/netdev/net/c/5a7c5f70c743

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-05  2:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 12:14 [PATCH net] selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer Vladimir Oltean
2022-05-03 12:20 ` Ido Schimmel
2022-05-05  2:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.