-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ofctrl.c: Check installed flow when merging tracked flow changes.
During incremental flow processing, we track the OVS desired flow changes so that we can incrementally install them to OVS. The function merge_tracked_flows() is to merge the "delete and add/update" for the same flows, to avoid unnecessary changes to OVS when flows are deleted but added back in the same run. The function ensures that the flows being deleted and added/updated are exactly the same, including actions. It only compares the desired flows, assuming that the flow installed to OVS is exactly the same as the desired flow being deleted. However, this assumption can be wrong. If the same flow is already updated before "delete and add/update" in the same run, the initial "update" is not sent to OVS yet, but the change-tracking entry of that initial "update" is already override by the "delete". This would result in lost changes to OVS flows. This kind of problems can only be recovered by a full recompute in ovn-controller. This patch fixes the problem by adding the check for installed flows before making the decision to merge the "delete and add/update" entries. We will not merge if the installed flow doesn't match the desired flow finally added/update. A test case is added to cover the scenario, which would fail without the fix. Reported-by: François Rigault <frigo@amadeus.com> Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2071272#c12 Reported-by: Numan Siddique <numans@ovn.org> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2022-April/393256.html Fixes: f4e508d ("ofctrl.c: Merge opposite changes of tracked flows before installing.") Signed-off-by: Han Zhou <hzhou@ovn.org> (cherry picked from commit 9c6d285)
- Loading branch information
Showing
3 changed files
with
101 additions
and
5 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