8eff0e06 | 11-Oct-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: Fix the ct_tuple for v4
The ct_tuple v4 data structure decode / encode routines were using the v6 IP address decode and relying on default encode. This could cause exceptions
selftests: openvswitch: Fix the ct_tuple for v4
The ct_tuple v4 data structure decode / encode routines were using the v6 IP address decode and relying on default encode. This could cause exceptions during encode / decode depending on how a ct4 tuple would appear in a netlink message.
Caught during code review.
Fixes: e52b07aa1a54 ("selftests: openvswitch: add flow dump support") Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
76035fd1 | 11-Oct-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: Skip drop testing on older kernels
Kernels that don't have support for openvswitch drop reasons also won't have the drop counter reasons, so we should skip the test completel
selftests: openvswitch: Skip drop testing on older kernels
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 to build a test case for this without polluting the datapath, so we introduce a mechanism to clear all the flows from 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 <aconole@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
af846afa | 11-Oct-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: Catch cases where the tests are killed
In case of fatal signal, or early abort at least cleanup the current test case.
Fixes: 25f16c873fb1 ("selftests: add openvswitch selft
selftests: openvswitch: Catch cases where the tests are killed
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 <aconole@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
42420291 | 11-Aug-2023 |
Adrian Moreno <amorenoz@redhat.com> |
selftests: openvswitch: add explicit drop testcase
Test explicit drops generate the right drop reason. Also, verify that the kernel rejects flows with actions following an explicit drop.
Acked-by:
selftests: openvswitch: add explicit drop testcase
Test explicit drops generate the right drop reason. Also, verify that the kernel rejects flows with actions following an explicit drop.
Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Adrian Moreno <amorenoz@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
60f10077 | 01-Aug-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: add ct-nat test case with ipv4
Building on the previous work, add a very simplistic NAT case using ipv4. This just tests dnat transformation
Signed-off-by: Aaron Conole <ac
selftests: openvswitch: add ct-nat test case with ipv4
Building on the previous work, add a very simplistic NAT case using ipv4. This just tests dnat transformation
Signed-off-by: Aaron Conole <aconole@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
2893ba9c | 01-Aug-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: add basic ct test case parsing
Forwarding via ct() action is an important use case for openvswitch, but generally would require using a full ovs-vswitchd to get working. Add
selftests: openvswitch: add basic ct test case parsing
Forwarding via ct() action is an important use case for openvswitch, but generally would require using a full ovs-vswitchd to get working. Add a ct action parser for basic ct test case.
Signed-off-by: Aaron Conole <aconole@redhat.com> Reviewed-by: Adrian Moreno <amorenoz@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
05398aa4 | 01-Aug-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: add a test for ipv4 forwarding
This is a simple ipv4 bidirectional connectivity test.
Signed-off-by: Aaron Conole <aconole@redhat.com> Reviewed-by: Adrian Moreno <amorenoz@r
selftests: openvswitch: add a test for ipv4 forwarding
This is a simple ipv4 bidirectional connectivity test.
Signed-off-by: Aaron Conole <aconole@redhat.com> Reviewed-by: Adrian Moreno <amorenoz@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
9f1179fb | 01-Aug-2023 |
Adrian Moreno <amorenoz@redhat.com> |
selftests: openvswitch: support key masks
The default value for the mask actually depends on the value (e.g: if the value is non-null, the default is full-mask), so change the convert functions to a
selftests: openvswitch: support key masks
The default value for the mask actually depends on the value (e.g: if the value is non-null, the default is full-mask), so change the convert functions to accept the full, possibly masked string and let them figure out how to parse the different values.
Also, implement size-aware int parsing.
With this patch we can now express flows such as the following: "eth(src=0a:ca:fe:ca:fe:0a/ff:ff:00:00:ff:00)" "eth(src=0a:ca:fe:ca:fe:0a)" -> mask = ff:ff:ff:ff:ff:ff "ipv4(src=192.168.1.1)" -> mask = 255.255.255.255 "ipv4(src=192.168.1.1/24)" "ipv4(src=192.168.1.1/255.255.255.0)" "tcp(src=8080)" -> mask = 0xffff "tcp(src=8080/0xf0f0)"
Signed-off-by: Adrian Moreno <amorenoz@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
9feac87b | 14-Apr-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: add support for upcall testing
The upcall socket interface can be exercised now to make sure that future feature adjustments to the field can maintain backwards compatibility
selftests: openvswitch: add support for upcall testing
The upcall socket interface can be exercised now to make sure that future feature adjustments to the field can maintain backwards compatibility.
Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
e52b07aa | 14-Apr-2023 |
Aaron Conole <aconole@redhat.com> |
selftests: openvswitch: add flow dump support
Add a basic set of fields to print in a 'dpflow' format. This will be used by future commits to check for flow fields after parsing, as well as verifyi
selftests: openvswitch: add flow dump support
Add a basic set of fields to print in a 'dpflow' format. This will be used by future commits to check for flow fields after parsing, as well as verifying the flow fields pushed into the kernel from userspace.
Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|