ofproto-dpif: Lock rules to prevent eviction.
authorEthan Jackson <ethan@nicira.com>
Wed, 17 Jul 2013 23:14:02 +0000 (16:14 -0700)
committerEthan Jackson <ethan@nicira.com>
Sun, 11 Aug 2013 17:36:18 +0000 (10:36 -0700)
commitad3efdcb0d5812df189ab08f19dac4b39f3a9e27
treef5f233b5bf32de39772ef6a5d25e683af3bf5bf9
parentd72e22c8413ae12221d30df1c00b985433e14cee
ofproto-dpif: Lock rules to prevent eviction.

This patch uses a read-write lock to prevent rules from being evicted
while they're used by child threads.  It also changes the prototypes
of the various rule lookup functions so that the thread safety
analysis can be used to ensure that the locking is handled properly.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h
ofproto/ofproto-provider.h
ofproto/ofproto.c