]> git.proxmox.com Git - mirror_ovs.git/commit - ofproto/ofproto-dpif-upcall.c
revalidator: Refactor ukey creation/lookup.
authorJoe Stringer <joestringer@nicira.com>
Wed, 4 Jun 2014 09:59:23 +0000 (09:59 +0000)
committerJoe Stringer <joestringer@nicira.com>
Thu, 5 Jun 2014 01:21:50 +0000 (13:21 +1200)
commitfeca8bd78a2e8bf5bb37ac8d07e6040d6ff75bd5
tree139f051493abcdb823d7068f9505263c0d88b4da
parent2608616d87e4669531541b2a64db84c8d1426c2f
revalidator: Refactor ukey creation/lookup.

This patch refactors the code around ukey creation and lookup to
simplify the code for callers. A new function ukey_acquire() combines
these functions and attempts to acquire a lock on the ukey. Failure to
acquire a lock on the ukey is usually a sign that another thread is
handling the same flow concurrently, which means the flow does not need
to be handled anyway.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif-upcall.c