[ovs-git] [openvswitch/ovs] c56eba: ofproto-dpif-upcall: Don't delete modified ukeys.
GitHub
noreply at github.com
Fri Jan 8 00:03:28 UTC 2016
Branch: refs/heads/master
Home: https://github.com/openvswitch/ovs
Commit: c56eba3b7ab04773204881fa48ff86c3753badc6
https://github.com/openvswitch/ovs/commit/c56eba3b7ab04773204881fa48ff86c3753badc6
Author: Joe Stringer <joe at ovn.org>
Date: 2016-01-07 (Thu, 07 Jan 2016)
Changed paths:
M ofproto/ofproto-dpif-upcall.c
Log Message:
-----------
ofproto-dpif-upcall: Don't delete modified ukeys.
If revalidation returns the result UKEY_DELETE, then both the ukey and
its corresponding flow should be deleted. However, if revalidation
returns UKEY_MODIFY, the ukey itself should be modified in-place and
should not be deleted.
Fix this by only applying the ukey deletion to ukeys whose datapath
operations delete a flow.
This may fix statistics accounting issues in rare cases involving
OpenFlow rule modification where actions are updated but flows remain
the same.
Found by inspection.
Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Jarno Rajahalme <jarno at ovn.org>
Commit: cebfec69420bc838df002c51b560488c81bf33ee
https://github.com/openvswitch/ovs/commit/cebfec69420bc838df002c51b560488c81bf33ee
Author: Joe Stringer <joe at ovn.org>
Date: 2016-01-07 (Thu, 07 Jan 2016)
Changed paths:
M ofproto/ofproto-dpif-upcall.c
Log Message:
-----------
ofproto-dpif-upcall: Simplify revalidator_sweep__().
Broadly, there are two cases that are handled during revalidator_sweep__:
- Ukeys which had their corresponding datapath flows deleted during the
most recent dump phase need to be deleted.
- If a flow for a ukey still exists in the datapath, the flow may need
to be removed or updated. This depends on a variety of factors such as
whether the datapath is being flushed, whether individual flows were
recently dumped, and whether those flows are valid for the current
revalidation generation.
Previously, the logic was written such that the first of these cases
would be handled under the "UKEY_KEEP" case to ensure that
revalidator_sweep__() will not attempt to delete flows that already
exist. In this case, ukey->flow_exists would be false, which would
trigger ukey cleanup.
While correct, this is misleading and difficult to follow. Since commit
83b03fe05e7a ("ofproto-dpif-upcall: Avoid double-delete of ukeys."),
this logic is no longer required to prevent double-deletion of such
flows, so we can now make this codepath more straightforward.
Signed-off-by: Joe Stringer <joe at ovn.org>
Co-authored-by: Jarno Rajahalme <jarno at ovn.org>
Acked-by: Jarno Rajahalme <jarno at ovn.org>
Compare: https://github.com/openvswitch/ovs/compare/ad99e2ed4926...cebfec69420b
More information about the git
mailing list