dpif: Make dpif_flow_dump_next() thread-safe.
authorJoe Stringer <joestringer@nicira.com>
Thu, 27 Feb 2014 22:13:08 +0000 (14:13 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 27 Feb 2014 22:30:25 +0000 (14:30 -0800)
commitd2ad7ef178c39427f2e93ea5c70b3ffc51b7ad1f
tree0dce5eb1c33bb88872062b7f024e356e83f9fee4
parente723fd32d5d5d8d06c3235d2bc8e9142edcca524
dpif: Make dpif_flow_dump_next() thread-safe.

This patch makes it the caller's responsibility to initialize a
per-thread 'state' object and pass it down to the dpif_flow_dump_next()
implementation. The implementation can expect to be called from multiple
threads with the same 'iter' and different 'state' objects.

When flow_dump_next() returns non-zero, the implementation must ensure
that subsequent calls with the same arguments also return non-zero.
Subsequent calls with the same 'iter' and different 'state' may return
zero, but should make progress towards returning non-zero.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/dpif-linux.c
lib/dpif-netdev.c
lib/dpif-provider.h
lib/dpif.c
lib/dpif.h
ofproto/ofproto-dpif-upcall.c
ofproto/ofproto-dpif.c
utilities/ovs-dpctl.c