mbox series

[ovs-dev,v3,net-next,0/5] selftests: openvswitch: add flow programming cases

Message ID 20230801212226.909249-1-aconole@redhat.com
Headers show
Series selftests: openvswitch: add flow programming cases | expand

Message

Aaron Conole Aug. 1, 2023, 9:22 p.m. UTC
The openvswitch selftests currently contain a few cases for managing the
datapath, which includes creating datapath instances, adding interfaces,
and doing some basic feature / upcall tests.  This is useful to validate
the control path.

Add the ability to program some of the more common flows with actions. This
can be improved overtime to include regression testing, etc.

v2->v3:
1. Dropped support for ipv6 in nat() case
2. Fixed a spelling mistake in 2/5 commit message.

v1->v2:
1. Fix issue when parsing ipv6 in the NAT action
2. Fix issue calculating length during ctact parsing
3. Fix error message when invalid bridge is passed
4. Fold in Adrian's patch to support key masks


Aaron Conole (4):
  selftests: openvswitch: add an initial flow programming case
  selftests: openvswitch: add a test for ipv4 forwarding
  selftests: openvswitch: add basic ct test case parsing
  selftests: openvswitch: add ct-nat test case with ipv4

Adrian Moreno (1):
  selftests: openvswitch: support key masks

 .../selftests/net/openvswitch/openvswitch.sh  | 223 +++++++
 .../selftests/net/openvswitch/ovs-dpctl.py    | 588 +++++++++++++++++-
 2 files changed, 787 insertions(+), 24 deletions(-)

Comments

Simon Horman Aug. 3, 2023, 9:10 a.m. UTC | #1
On Tue, Aug 01, 2023 at 05:22:21PM -0400, Aaron Conole wrote:
> The openvswitch selftests currently contain a few cases for managing the
> datapath, which includes creating datapath instances, adding interfaces,
> and doing some basic feature / upcall tests.  This is useful to validate
> the control path.
> 
> Add the ability to program some of the more common flows with actions. This
> can be improved overtime to include regression testing, etc.

Thanks Aaron.

For series,

Reviewed-by: Simon Horman <horms@kernel.org>
Paolo Abeni Aug. 3, 2023, 1:22 p.m. UTC | #2
On Tue, 2023-08-01 at 17:22 -0400, Aaron Conole wrote:
> The openvswitch selftests currently contain a few cases for managing the
> datapath, which includes creating datapath instances, adding interfaces,
> and doing some basic feature / upcall tests.  This is useful to validate
> the control path.
> 
> Add the ability to program some of the more common flows with actions. This
> can be improved overtime to include regression testing, etc.
> 
> v2->v3:
> 1. Dropped support for ipv6 in nat() case
> 2. Fixed a spelling mistake in 2/5 commit message.
> 
> v1->v2:
> 1. Fix issue when parsing ipv6 in the NAT action
> 2. Fix issue calculating length during ctact parsing
> 3. Fix error message when invalid bridge is passed
> 4. Fold in Adrian's patch to support key masks

FTR, this apparently requires an [un?]fairly recent version of
pyroute2. Perhaps you could explicitly check for a minimum working
version and otherwise bail out (skip) the add-flow tests.

Cheers,

Paolo
patchwork-bot+netdevbpf@kernel.org Aug. 3, 2023, 1:30 p.m. UTC | #3
Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue,  1 Aug 2023 17:22:21 -0400 you wrote:
> The openvswitch selftests currently contain a few cases for managing the
> datapath, which includes creating datapath instances, adding interfaces,
> and doing some basic feature / upcall tests.  This is useful to validate
> the control path.
> 
> Add the ability to program some of the more common flows with actions. This
> can be improved overtime to include regression testing, etc.
> 
> [...]

Here is the summary with links:
  - [v3,net-next,1/5] selftests: openvswitch: add an initial flow programming case
    https://git.kernel.org/netdev/net-next/c/918423fda910
  - [v3,net-next,2/5] selftests: openvswitch: support key masks
    https://git.kernel.org/netdev/net-next/c/9f1179fbbd84
  - [v3,net-next,3/5] selftests: openvswitch: add a test for ipv4 forwarding
    https://git.kernel.org/netdev/net-next/c/05398aa40953
  - [v3,net-next,4/5] selftests: openvswitch: add basic ct test case parsing
    https://git.kernel.org/netdev/net-next/c/2893ba9c1d1a
  - [v3,net-next,5/5] selftests: openvswitch: add ct-nat test case with ipv4
    https://git.kernel.org/netdev/net-next/c/60f10077eec6

You are awesome, thank you!
Aaron Conole Aug. 4, 2023, 12:20 p.m. UTC | #4
Paolo Abeni <pabeni@redhat.com> writes:

> On Tue, 2023-08-01 at 17:22 -0400, Aaron Conole wrote:
>> The openvswitch selftests currently contain a few cases for managing the
>> datapath, which includes creating datapath instances, adding interfaces,
>> and doing some basic feature / upcall tests.  This is useful to validate
>> the control path.
>> 
>> Add the ability to program some of the more common flows with actions. This
>> can be improved overtime to include regression testing, etc.
>> 
>> v2->v3:
>> 1. Dropped support for ipv6 in nat() case
>> 2. Fixed a spelling mistake in 2/5 commit message.
>> 
>> v1->v2:
>> 1. Fix issue when parsing ipv6 in the NAT action
>> 2. Fix issue calculating length during ctact parsing
>> 3. Fix error message when invalid bridge is passed
>> 4. Fold in Adrian's patch to support key masks
>
> FTR, this apparently requires an [un?]fairly recent version of
> pyroute2. Perhaps you could explicitly check for a minimum working
> version and otherwise bail out (skip) the add-flow tests.

I'll make sure to get a follow up out ASAP that includes some check for
supported version and will skip if not.  I will try to also include some
additional robustness checks.

Thanks Paolo!

> Cheers,
>
> Paolo