On 4/4/24 20:41, Vladislav Odintsov wrote:
> Commit [1] introduced a "vxlan mode" concept. It brought a limitation
> for available tunnel IDs because of lack of space in VXLAN VNI.
> In vxlan mode OVN is limited by 4095 datapaths (LRs or non-transit LSs)
> and 2047 logical switch ports per datapath.
>
> Prior to this patch vxlan mode was enabled automatically if at least one
> chassis had encap of vxlan type. In scenarios where one want to use VXLAN
> only for HW VTEP (RAMP) switch, such limitation makes no sence.
>
> This patch adds support for explicit disabling of vxlan mode via
> Northbound database.
>
> 1: https://github.com/ovn-org/ovn/commit/b07f1bc3d068
>
> CC: Ihar Hrachyshka <[email protected]>
> Fixes: b07f1bc3d068 ("Add VXLAN support for non-VTEP datapath bindings")
> Signed-off-by: Vladislav Odintsov <[email protected]>
> ---
Thanks for the v3, Vladislav!
[...]
> diff --git a/ovn-nb.xml b/ovn-nb.xml
> index b652046a7..9b2cb355e 100644
> --- a/ovn-nb.xml
> +++ b/ovn-nb.xml
> @@ -381,6 +381,18 @@
> of SB changes would be very noticeable.
> </column>
>
> + <column name="options" key="disable_vxlan_mode">
> + Be default if at least one chassis in OVN cluster has VXLAN encap,
Typo: "Be default".
> + northd will run in a `vxlan mode`, which means it splits 24-bit
> + VXLAN VNI for datapath and port tunnel IDs allocation evenly.
> Maximum
> + datapaths count in this mode is 4095 and maximum ports per datapath
> is
> + 2047. Rest of IDs are used for multicast groups.
Maybe "The rest of the IDs are used for.."?
> + In case VXLAN encaps are needed on chassis only to support HW VTEP
> + functionality, and main encap type is GENEVE or STT, set this option
> to
> + `false` to use defaults -- 16-bit space for datapath tunnel IDS and
> 15
> + bits for port tunnel IDs.
> + </column>
> +
> <group title="Options for configuring interconnection route
> advertisement">
> <p>
> These options control how routes are advertised between OVN
> diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> index fc2c972a4..6edb1129e 100644
> --- a/tests/ovn-northd.at
> +++ b/tests/ovn-northd.at
> @@ -2819,6 +2819,35 @@ AT_CHECK(
> get_tunnel_keys
> AT_CHECK([test $lsp02 = 3 && test $ls1 = 123])
>
> +AT_CLEANUP
> +])
> +OVN_FOR_EACH_NORTHD_NO_HV([
> +AT_SETUP([check vxlan mode disabling])
> +ovn_start
> +
> +# Create a fake chassis with vxlan encap to implicitly enable vxlan mode.
> +ovn-sbctl \
> + --id=@e create encap chassis_name=hv1 ip="192.168.0.1" type="vxlan" \
> + -- --id=@c create chassis name=hv1 encaps=@e
> +
> +cmd="ovn-nbctl --wait=sb"
> +for i in {1..4097..1}; do
> + cmd="${cmd} -- ls-add lsw-${i}"
> +done
> +
> +eval $cmd
Couldn't this be just "check $cmd"?
> +
> +check_row_count nb:Logical_Switch 4097
> +wait_row_count sb:Datapath_Binding 4095
> +
> +OVS_WAIT_UNTIL([grep "all datapath tunnel ids exhausted"
> northd/ovn-northd.log])
> +
> +# Explicitly disable vxlan mode and check that two remaining datapaths were
> created.
> +check ovn-nbctl set NB_Global . options:disable_vxlan_mode=true
> +
> +check_row_count nb:Logical_Switch 4097
> +wait_row_count sb:Datapath_Binding 4097
> +
> AT_CLEANUP
> ])
>
Aside for the minor things above (which I can address when applying the
patch so no need for v4) the rest looks good to me. Ihar, what do you
think?
Regards,
Dumitru
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev