Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ofctrl.c: Use bundle to avoid data plane downtime during the first fl…
…ow installation. Now in ofctrl we wait in S_WAIT_BEFORE_CLEAR for the initial flow compute to complete before clearing the existing flows, to reduce the data plane down time during ovn-controller restart. However, the flow installation takes a long time when the flow number is huge, which still leads to a long data plane interruption after we clearing the flows in S_CLEAR_FLOWS and before the new flow installation completes. This patch moves the initial flow/group/meter deletion from run_S_CLEAR_FLOWS to ofctrl_put() the first time when we install flows to OVS after the transition from S_CLEAR_FLOWS state, and combine the initial flow/group deletion and the new flow/group installation to a bundle, so that OVS atomically switch from the old flows to the new ones without any gap. Ideally we should include meters in the bundle as well, but OVS doesn't support meter mod in the bundle yet. The new order of the operations in ofctrl_put becomes: - clear meters (if it is first run after S_CLEAR_FLOWS) - add new meters - bundle - clear flows (if it is first run after S_CLEAR_FLOWS) - clear groups (if it is first run after S_CLEAR_FLOWS) - add new groups - flow changes - delete old groups - delete old meters Tested with ~200k ovs flows generated by ovn-controller on a system with 8 Armv8 A72 cores, with ovn-ofctrl-wait-before-clear set to 8000. Without this patch, there were ~5 seconds ping failures during ovn-controller restart. With this patch, there is no ping failure observed with 100ms interval (ping -i 0.1). Signed-off-by: Han Zhou <hzhou@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com> (cherry picked from commit d53c599) Signed-off-by: Numan Siddique <numans@ovn.org>
- Loading branch information