On 1/28/25 6:15 PM, Lorenzo Bianconi wrote:
> [...]
>>
>> This function is called for non-IC OVN+vxlan deployments too. I don't
>> think we want to reduce the number of datapaths in that case too. I
>> think we should differentiate between "regular" logical switches and
>> transit switches. We can do that by checking the
>> NB.LS.other_config:interconn-ts value.
>
> I guess the point here is we need to keep the tunnel key allocation spaces
> between 'local' datapaths and transit switches separated since the two hmaps
> used to allocate dp keys are not in sync (please take a look to ts_run()).
> I know we are setting "requested-tnl-key" in ts_run(), but are we sure there
> are no possible tnl key clashes if we use the same allocation space for both
> local and ts keys?
> One possible solution is to check in build_datapaths() if there is any ts
> configured looping over NB.LS table and check NB.LS.other_config:interconn-ts
> value. What do you think?
You're right, that would probably work fine.
Regards,
Dumitru
>
> Regards,
> Lorenzo
>
>>
>>> diff --git a/ovn-nb.xml b/ovn-nb.xml
>>> index 24ef12f3b..3612a47ad 100644
>>> --- a/ovn-nb.xml
>>> +++ b/ovn-nb.xml
>>> @@ -394,6 +394,9 @@
>>> support HW VTEP functionality and main encap type is GENEVE or
>>> STT, set
>>> this option to <code>false</code> to use default
>>> non-<code>VXLAN mode</code> tunnel IDs allocation logic.
>>> + Please consider when OVN is running in <code>VXLAN mode</code>,
>>> + in order to support <code>OVN-interconnect</code>, the max number
>>> of
>>> + local datapath is reduced to 1024.
>>> </column>
>>>
>>> <column name="options" key="always_tunnel"
>>> diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
>>> index 93d569389..885da06af 100644
>>> --- a/tests/ovn-northd.at
>>> +++ b/tests/ovn-northd.at
>>> @@ -2904,7 +2904,7 @@ done
>>> check ovn-nbctl --wait=sb $cmd
>>>
>>> check_row_count nb:Logical_Switch 4097
>>> -wait_row_count sb:Datapath_Binding 4095
>>> +wait_row_count sb:Datapath_Binding 1023
>>>
>>> OVS_WAIT_UNTIL([grep "all datapath tunnel ids exhausted"
>>> northd/ovn-northd.log])
>>>
>>> @@ -2928,19 +2928,19 @@ check_uuid ovn-sbctl \
>>>
>>> cmd="ovn-nbctl --wait=sb"
>>>
>>> -for i in {1..4095}; do
>>> +for i in {1..1023}; do
>>> cmd="${cmd} -- ls-add lsw-${i}"
>>> done
>>>
>>> eval $cmd
>>>
>>> -check_row_count nb:Logical_Switch 4095
>>> -wait_row_count sb:Datapath_Binding 4095
>>> +check_row_count nb:Logical_Switch 1023
>>> +wait_row_count sb:Datapath_Binding 1023
>>>
>>> check ovn-nbctl ls-add lsw-exhausted
>>>
>>> -check_row_count nb:Logical_Switch 4096
>>> -wait_row_count sb:Datapath_Binding 4095
>>> +check_row_count nb:Logical_Switch 1024
>>> +wait_row_count sb:Datapath_Binding 1023
>>>
>>> OVS_WAIT_UNTIL([grep "all datapath tunnel ids exhausted"
>>> northd/ovn-northd.log])
>>>
>>> @@ -12730,7 +12730,7 @@ check_engine_stats northd recompute nocompute
>>> check_engine_stats lflow recompute nocompute
>>>
>>> AT_CHECK([ovn-nbctl get NB_Global . options:max_tunid | \
>>> -sed s/":"//g | sed s/\"//g], [0], [4095
>>> +sed s/":"//g | sed s/\"//g], [0], [1023
>>> ], [])
>>>
>>> check as northd ovn-appctl -t ovn-northd inc-engine/clear-stats
>>> diff --git a/tests/ovn.at b/tests/ovn.at
>>> index 7a794f08d..98b4f157f 100644
>>> --- a/tests/ovn.at
>>> +++ b/tests/ovn.at
>>> @@ -24429,7 +24429,7 @@ m4_define([DVR_N_S_ARP_HANDLING],
>>> # validate max_tunid reflects the type of encapsulation used
>>> max_tunid=`ovn-nbctl get NB_Global . options:max_tunid | sed s/":"//g |
>>> sed s/\"//g`
>>> if [[ $encap = vxlan ]]; then
>>> - max_tunid_expected=4095
>>> + max_tunid_expected=1023
>>> else
>>> max_tunid_expected=16711680
>>> fi
>>
>> Regards,
>> Dumitru
>>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev