revalidator: Protect ukeys with a mutex.
authorJoe Stringer <joestringer@nicira.com>
Mon, 5 May 2014 03:44:04 +0000 (15:44 +1200)
committerJoe Stringer <joestringer@nicira.com>
Tue, 25 Nov 2014 22:12:22 +0000 (14:12 -0800)
commita260693626dda83ded9f1a2c42c407a69a9c1bf6
tree7a1e6413ec5fa8cc510e3289c8cd7fe9dc9e76e4
parent9fce0584a6434a31eea4333644d74b38c29a37e1
revalidator: Protect ukeys with a mutex.

Currently, udpif_keys are protected during revalidator_sweep__() as only
one thread accesses the ukey at a time. This is ensured using barriers:
all revalidators will be in the GC phase, so they will only access their
own ukey collection.

A future patch will change the access patterns to allow these ukey
collections to be read or modified while a revalidator is garbage
collecting it. To protect the ukeys, this patch adds locking on the ukey
collection.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-upcall.c