forked from ovn-org/ovn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
controller: Fix IPv6 dp flow explosion by setting flow table prefixes.
OVS allows enabling prefix match optimizations per flow table. This enables masked matches whenever possible on fields that otherwise would be exact matched in the datapath flow. By default, however, only nw_src and nw_dst are enabled (L4 ports are also always enabled, but this is not configurable). OVN is using mixed flow tables that match on both IPv4 and IPv6 addresses, meaning that IPv6 traffic generates exact match datapath flows where IPv4 generates masked matches, causing datapath flow explosion under heavy IPv6 load. OVN owns the "br-int" bridge and the flow tables, so it should enable appropriate fields per flow table to avoid flow explosion and achieve better performance overall. Example on how the prefixes can be configured manually: for i in $(seq 0 254); do ovs-vsctl set Bridge br-int flow_tables:${i}=@n -- \ --id=@n create Flow_Table name=t${i} \ prefixes=nw_src,nw_dst,ipv6_dst,ipv6_src; done Until recently, OVS only supported up to 3 prefixes per flow table, but now the limit will be increased to 4 in OVS 3.5 and some newer minor releases of older versions down to 3.3. Unfortunately, that means that ovn-controller needs to check and choose the appropriate number of prefixes. For the 3 we may just add ipv6_src and leave ipv6_dst unoptimized. OVS 3.5 will have all 4 prefixes enabled by default, but OVN will be paired with older versions of OVS for a long time, so it's better to set these config options to better support older setups. Unfortunately, IDL doesn't provide a way today to get the type of the column from the server side, so it's hard to tell how many prefixes are actually supported. A few approaches: 1. Try 3 and 4 and check if transaction fails. 2. Try to get and parse the schema from the server. 3. Enhance IDL to provide server column type information. While the first approach seems simpler, it's actually not trivial to figure out why exactly the transaction failed from the application level. IDL only has the string representation of the error and doesn't provide it to the application. The third approach is the most clean one, but it requires modifications of the IDL and CS layers in order to get this information. This would significantly complicate the process of getting this change backported to OVN 24.03 LTS, for example. The second approach is taken by this commit with intention to replace the schema parsing with the enhanced IDL API, once it is available. This allows for easier backports today with a cleaner solution in the future. IMO, the backportability is important due to increasing importance of IPv6 in OVN clusters and the cloud environments in general. Reported-at: https://issues.redhat.com/browse/FDP-1024 Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: 0-day Robot <robot@bytheb.org>
- Loading branch information
Showing
7 changed files
with
244 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters