]> git.proxmox.com Git - mirror_ovs.git/commit - ofproto/ofproto-dpif-upcall.c
upcall: Track ukey states.
authorJoe Stringer <joe@ovn.org>
Wed, 31 Aug 2016 18:06:04 +0000 (11:06 -0700)
committerJoe Stringer <joe@ovn.org>
Thu, 1 Sep 2016 20:21:59 +0000 (13:21 -0700)
commit54ebeff4c03d83fd8b8a61256af95524e757f640
treebdd21d42621b39cef087089c2e71c8d60a1a2fb6
parentf3e8c44ef39255dec360540391e35c9e8f117816
upcall: Track ukey states.

Ukeys have a defined lifetime that starts from being created, inserted
into the umaps, having the corresponding flow installed, then the flow
deleted, the ukey removed from the umap, rcu-deferral of its deletion,
and finally freedom.

However, until now it's all been represented behind a simple boolean
"flow_exists" with a bunch of implicit logic sprinkled around the
accessors. This patch attempts to make the ukey lifetime a bit clearer
by outlining the correct transitions and asserting that their lifetime
proceeds as expected.

This should improve the readability of the current code, and also make
the following patch easier to reason about.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
ofproto/ofproto-dpif-upcall.c