Re: [PATCH net-next 1/2] selftests: openvswitch: fix action formatting

2024-06-11 Thread Aaron Conole
Adrián Moreno writes: > On Mon, Jun 03, 2024 at 03:00:03PM GMT, Aaron Conole wrote: >> Adrian Moreno writes: >> >> > In the action formatting function ("dpstr"), the iteration is made over >> > the nla_map, so if there are more than one attribute from

Re: [PATCH net-next 2/2] selftests: openvswitch: set value to nla flags

2024-06-03 Thread Aaron Conole
alue(cell[1]) > File "[...]/pyroute2/netlink/__init__.py", line 1265, in setvalue > nlv.setvalue(nla_tuple[1]) > ~^^^ > IndexError: list index out of range > > Signed-off-by: Adrian Moreno > --- Acked-by: Aaron Conole I don't know which pyr

Re: [PATCH net-next 1/2] selftests: openvswitch: fix action formatting

2024-06-03 Thread Aaron Conole
Adrian Moreno writes: > In the action formatting function ("dpstr"), the iteration is made over > the nla_map, so if there are more than one attribute from the same type > we only print the first one. > > Fix this by iterating over the actual attributes. > > Signed-off-by: Adrian Moreno > --- >

Re: [ovs-dev] selftests: openvswitch: Questions about possible enhancements

2024-04-25 Thread Aaron Conole
Jakub Kicinski writes: > On Thu, 25 Apr 2024 19:57:19 +0100 Simon Horman wrote: >> openvswitch.sh does not appear to have any dependencies on Open vSwitch >> user-space. My understanding is that, rather, it makes use of >> tools/testing/selftests/net/openvswitch/ovs-dpctl.py to talk to the

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-25 Thread Aaron Conole
Simon Horman writes: > On Wed, Apr 24, 2024 at 02:14:09PM -0400, Aaron Conole wrote: >> Simon Horman writes: >> >> > Hi Aaron, Jakub, all, >> > >> > I have recently been exercising the Open vSwitch kernel selftests, >> > using vng, somet

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-25 Thread Aaron Conole
Jakub Kicinski writes: > On Wed, 24 Apr 2024 17:44:05 +0100 Simon Horman wrote: >> I have recently been exercising the Open vSwitch kernel selftests, >> using vng, > > Speaking of ovs tests, we currently don't run them in CI (and suffer > related skips in pmtu.sh) because Amazon Linux doesn't

Re: [ovs-dev] selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Aaron Conole
Benjamin Poirier writes: > On 2024-04-24 18:37 +0100, Simon Horman wrote: >> On Wed, Apr 24, 2024 at 05:44:05PM +0100, Simon Horman wrote: >> > Hi Aaron, Jakub, all, >> > >> > I have recently been exercising the Open vSwitch kernel selftests, >> > using vng, something like this: >> > >> >

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Aaron Conole
Simon Horman writes: > Hi Aaron, Jakub, all, > > I have recently been exercising the Open vSwitch kernel selftests, > using vng, something like this: > > TESTDIR="tools/testing/selftests/net/openvswitch" > > vng -v --run . --user root --cpus 2 \ > --overlay-rwdir

Re: [PATCH net-next] selftests: openvswitch: Fix escape chars in regexp.

2024-04-17 Thread Aaron Conole
; > Signed-off-by: Adrian Moreno > --- Thanks, Adrian. Reviewed-by: Aaron Conole

Re: [ovs-dev] [RFC 3/7] selftests: openvswitch: use non-graceful kills when needed

2024-02-21 Thread Aaron Conole
Adrian Moreno writes: > On 2/16/24 16:28, Aaron Conole wrote: >> Normally a spawned process under OVS is given a SIGTERM when the test >> ends as part of cleanup. However, in case the process is still lingering >> for some reason, we also send a SIGKILL to force it down

Re: [RFC 0/7] selftests: openvswitch: cleanups for running as selftests

2024-02-20 Thread Aaron Conole
Jakub Kicinski writes: > On Fri, 16 Feb 2024 10:28:39 -0500 Aaron Conole wrote: >> The series is a host of cleanups to the openvswitch selftest suite >> which should be ready to run under the netdev selftest runners using >> vng. For now, the testing has been don

Re: [RFC 4/7] selftests: openvswitch: delete previously allocated netns

2024-02-16 Thread Aaron Conole
Paolo Abeni writes: > On Fri, 2024-02-16 at 10:28 -0500, Aaron Conole wrote: >> Many openvswitch test cases reused netns and interface names. This works >> fine as long as the test case cleans up gracefully. However, if there is >> some kind of ungraceful termination

[RFC 7/7] selftests: openvswitch: add config and timeout settings

2024-02-16 Thread Aaron Conole
file which includes a timeout value that should be sufficent for such environments. Signed-off-by: Aaron Conole --- .../testing/selftests/net/openvswitch/config | 50 +++ .../selftests/net/openvswitch/settings| 1 + 2 files changed, 51 insertions(+) create mode 100644

[RFC 6/7] selftests: openvswitch: insert module when running the tests

2024-02-16 Thread Aaron Conole
a different location. Signed-off-by: Aaron Conole --- .../testing/selftests/net/openvswitch/openvswitch.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index a2c106104fb8

[RFC 5/7] selftests: openvswitch: make arping test a bit 'slower'

2024-02-16 Thread Aaron Conole
, and also increase the opportunity to not miss processing the upcall queue. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools

[RFC 4/7] selftests: openvswitch: delete previously allocated netns

2024-02-16 Thread Aaron Conole
timeout gets exceeded, while running under very slow debugging conditions. The solution here is to cleanup the netns on executing the next test. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing

[RFC 2/7] selftests: openvswitch: be more verbose with selftest debugging

2024-02-16 Thread Aaron Conole
the amount of details logged to the debug log by trapping all 'info' logs, and all 'ovs_sbx' commands. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net

[RFC 1/7] selftests: openvswitch: add test case error directories to clean list

2024-02-16 Thread Aaron Conole
Normally, the openvswitch selftests don't keep error files around, but if debugging, there is an option to keep these files. The 'clean' target should be informed that they exist to ensure they are deleted properly. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch

[RFC 3/7] selftests: openvswitch: use non-graceful kills when needed

2024-02-16 Thread Aaron Conole
Normally a spawned process under OVS is given a SIGTERM when the test ends as part of cleanup. However, in case the process is still lingering for some reason, we also send a SIGKILL to force it down faster. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh

[RFC 0/7] selftests: openvswitch: cleanups for running as selftests

2024-02-16 Thread Aaron Conole
/ \ -- \ make -C tools/testing/selftests/net/openvswitch \ TARGETS=openvswitch TEST_PROGS=openvswitch.sh run_tests Aaron Conole (7): selftests: openvswitch: add test case error directories to clean list selftests: openvswitch: be more verbose with selftest debugging selftests

[PATCH net v2 2/2] selftests: openvswitch: Add validation for the recursion test

2024-02-07 Thread Aaron Conole
Add a test case into the netlink checks that will show the number of nested action recursions won't exceed 16. Going to 17 on a small clone call isn't enough to exhaust the stack on (most) systems, so it should be safe to run even on systems that don't have the fix applied. Signed-off-by: Aaron

[PATCH net v2 1/2] net: openvswitch: limit the number of recursions from action sets

2024-02-07 Thread Aaron Conole
Signed-off-by: Aaron Conole --- v1->v2: Switch to tracking the stack depth by using a depth argument rather than a per-cpu counter. net/openvswitch/flow_netlink.c | 49 +++--- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/net/openvswitch/flo

[PATCH net v2 0/2] net: openvswitch: limit the recursions from action sets

2024-02-07 Thread Aaron Conole
, this series provides a selftest in 2/2 that can be used to determine if the OVS module is allowing unbounded access. It can be safely omitted where the ovs selftest framework isn't available. Aaron Conole (2): net: openvswitch: limit the number of recursions from action sets selftests

Re: [PATCH net-next] selftests: openvswitch: Test ICMP related matches work with SNAT

2024-01-31 Thread Aaron Conole
@faucet.nz/ > Link: https://mail.openvswitch.org/pipermail/ovs-dev/2024-January/410476.html > Suggested-by: Aaron Conole > Signed-off-by: Brad Cowie > --- I tested this on a patched kernel and as well as an unpatched kernel and got the following: 6.5.5-200: TEST: ip4-nat-related: ICMP related matches

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Aaron Conole
l for it, but we do require it in setup() if I understand correctly. I don't think it should hold up this patch though. Acked-by: Aaron Conole

[PATCH net v2 4/4] selftests: openvswitch: Fix the ct_tuple for v4

2023-10-11 Thread Aaron Conole
tests: openvswitch: add flow dump support") Signed-off-by: Aaron Conole --- v2: More detailed explanation for fix. tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.p

[PATCH net v2 3/4] selftests: openvswitch: Skip drop testing on older kernels

2023-10-11 Thread Aaron Conole
a datapath allowing us to test for explicit drop actions, and then clear the flows to build the original test case. Fixes: 4242029164d6 ("selftests: openvswitch: add explicit drop testcase") Signed-off-by: Aaron Conole --- v2: Address intermingled tabs vs. spaces .../selftests/net/o

[PATCH net v2 1/4] selftests: openvswitch: Add version check for pyroute2

2023-10-11 Thread Aaron Conole
need additional skip logic anyway. Just draw a line in the sand now. Fixes: 25f16c873fb1 ("selftests: add openvswitch selftest suite") Reported-by: Paolo Abeni Closes: https://lore.kernel.org/lkml/8470c431e0930d2ea204a9363a60937289b7fdbe.ca...@redhat.com/ Signed-off-by: Aaron Cono

[PATCH net v2 0/4] selftests: openvswitch: Minor fixes for some systems

2023-10-11 Thread Aaron Conole
these individual cases. Aaron Conole (4): selftests: openvswitch: Add version check for pyroute2 selftests: openvswitch: Catch cases where the tests are killed selftests: openvswitch: Skip drop testing on older kernels selftests: openvswitch: Fix the ct_tuple for v4 .../selftests/net/openvswitch

[PATCH net v2 2/4] selftests: openvswitch: Catch cases where the tests are killed

2023-10-11 Thread Aaron Conole
In case of fatal signal, or early abort at least cleanup the current test case. Fixes: 25f16c873fb1 ("selftests: add openvswitch selftest suite") Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 2 ++ 1 file changed, 2 insertions(+) diff --g

Re: [PATCH net 4/4] selftests: openvswitch: Fix the ct_tuple for v4

2023-10-11 Thread Aaron Conole
Paolo Abeni writes: > On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: >> Caught during code review. > > Since there are a few other small things, please additionally expand > this changelog briefly describing the addressed problem and it's > consequences. ACK. wi

Re: [PATCH net 3/4] selftests: openvswitch: Skip drop testing on older kernels

2023-10-11 Thread Aaron Conole
Paolo Abeni writes: > On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: >> Kernels that don't have support for openvswitch drop reasons also >> won't have the drop counter reasons, so we should skip the test >> completely. It previously wasn't possible

Re: [PATCH net 1/4] selftests: openvswitch: Add version check for pyroute2

2023-10-11 Thread Aaron Conole
Paolo Abeni writes: > On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: >> Paolo Abeni reports that on some systems the pyroute2 version isn't >> new enough to run the test suite. Ensure that we support a minimum >> version of 0.6 for all cases (which does incl

[PATCH net 0/4] selftests: openvswitch: Minor fixes for some systems

2023-10-06 Thread Aaron Conole
these individual cases. Aaron Conole (4): selftests: openvswitch: Add version check for pyroute2 selftests: openvswitch: Catch cases where the tests are killed selftests: openvswitch: Skip drop testing on older kernels selftests: openvswitch: Fix the ct_tuple for v4 .../selftests/net/openvswitch

[PATCH net 4/4] selftests: openvswitch: Fix the ct_tuple for v4

2023-10-06 Thread Aaron Conole
Caught during code review. Fixes: e52b07aa1a54 ("selftests: openvswitch: add flow dump support") Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/o

[PATCH net 1/4] selftests: openvswitch: Add version check for pyroute2

2023-10-06 Thread Aaron Conole
need additional skip logic anyway. Just draw a line in the sand now. Fixes: 25f16c873fb1 ("selftests: add openvswitch selftest suite") Reported-by: Paolo Abeni Closes: https://lore.kernel.org/lkml/8470c431e0930d2ea204a9363a60937289b7fdbe.ca...@redhat.com/ Signed-off-by: Aaron Conole

[PATCH net 3/4] selftests: openvswitch: Skip drop testing on older kernels

2023-10-06 Thread Aaron Conole
a datapath allowing us to test for explicit drop actions, and then clear the flows to build the original test case. Fixes: 4242029164d6 ("selftests: openvswitch: add explicit drop testcase") Signed-off-by: Aaron Conole --- .../selftests/net/openvswitch/openvswitch.sh | 17 ++ .../sel

[PATCH net 2/4] selftests: openvswitch: Catch cases where the tests are killed

2023-10-06 Thread Aaron Conole
In case of fatal signal, or early abort at least cleanup the current test case. Fixes: 25f16c873fb1 ("selftests: add openvswitch selftest suite") Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 2 ++ 1 file changed, 2 insertions(+) diff --g