[ovs-dev] [RFC ovn 1/2] ovn-controller: Detect OVS datapath capabilities.

Dumitru Ceara dceara at redhat.com
Wed May 26 19:13:21 UTC 2021


On 5/26/21 3:37 PM, Dumitru Ceara wrote:
> Automatically create an OVS Datapath record if none exists for the
> current br-int datapath type.
> 
> Add a 'features' module to track which OVS features are available in
> the datapath currently being used.  For now, only ct_all_zero_nat is
> tracked, all other features are assumed to be on-par between all
> datapaths.
> 
> A future commit will make use of the 'features' module to conditionally
> program openflows based on available datapath features.
> 
> Signed-off-by: Dumitru Ceara <dceara at redhat.com>
> ---
>  controller/ovn-controller.c |  126 ++++++++++++++++++++++++++++++++++---------
>  include/ovn/features.h      |   12 ++++
>  lib/automake.mk             |    1 
>  lib/features.c              |   39 +++++++++++++
>  tests/ovn-controller.at     |   10 ++-
>  5 files changed, 156 insertions(+), 32 deletions(-)
>  create mode 100644 lib/features.c
> 

[...]

> diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at
> index d1d758c49..29d4f5327 100644
> --- a/tests/ovn-controller.at
> +++ b/tests/ovn-controller.at
> @@ -151,23 +151,25 @@ sysid=$(ovs-vsctl get Open_vSwitch . external_ids:system-id)
>  check_datapath_type () {
>      datapath_type=$1
>      chassis_datapath_type=$(ovn-sbctl get Chassis ${sysid} other_config:datapath-type | sed -e 's/"//g') #"
> +    ovs_datapath_type=$(ovs-vsctl get Bridge br-int datapath-type)
>      test "${datapath_type}" = "${chassis_datapath_type}"
> +    test "${datapath_type}" = "${ovs_datapath_type}"

This should be:

test "${datapath_type}" = "${chassis_datapath_type}" && test
"${datapath_type}" = "${ovs_datapath_type}"

>  }
>  
> -OVS_WAIT_UNTIL([check_datapath_type ""])
> +OVS_WAIT_UNTIL([check_datapath_type system])
>  
>  ovs-vsctl set Bridge br-int datapath-type=foo
>  OVS_WAIT_UNTIL([check_datapath_type foo])
>  
>  # Change "ovn-bridge-mappings" value. It should not change the "datapath-type".
>  ovs-vsctl set Open_vSwitch . external_ids:ovn-bridge-mappings=foo-mapping
> -check_datapath_type foo
> +check_datapath_type system

This should be:

AT_CHECK([check_datapath_type foo])

I'll fix these when sending the non-RFC patch.



More information about the dev mailing list