summaryrefslogtreecommitdiff
path: root/lib/dpif.h
diff options
context:
space:
mode:
authorJoe Stringer <joestringer@nicira.com>2014-02-27 14:13:09 -0800
committerBen Pfaff <blp@nicira.com>2014-02-27 14:38:58 -0800
commit938eaa50a637df3817ef5f356c10f3965f8226fe (patch)
tree9f8c1e6829cf8a221b1a0a4ed1739bfe055e1780 /lib/dpif.h
parentd2ad7ef178c39427f2e93ea5c70b3ffc51b7ad1f (diff)
downloadopenvswitch-938eaa50a637df3817ef5f356c10f3965f8226fe.tar.gz
dpif: Don't synchronize flow_dump_next() status.
Recent changes to the flow_dump_next() interface have made it the responsibility of the dpif implementation to track error status over a flow dump operation. This patch removes status tracking from 'struct dpif_flow_dump', allowing multiple threads to call dpif_flow_dump_next() and track their status independently. Even if one thread finishes processing flows for a given iterator and state, it will not prevent other callers from processing the remaining flows in their buffers. After this patch, the error code that dpif_flow_dump_next() returns is only significant for the current state and buffer. As before, the status of the entire flow dump operation can be obtained by calling dpif_flow_dump_done(). Signed-off-by: Joe Stringer <joestringer@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/dpif.h')
-rw-r--r--lib/dpif.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/dpif.h b/lib/dpif.h
index 696154c7f..8e6e7d566 100644
--- a/lib/dpif.h
+++ b/lib/dpif.h
@@ -514,11 +514,10 @@ int dpif_flow_get(const struct dpif *,
struct dpif_flow_dump {
const struct dpif *dpif;
- int error;
void *iter;
};
void dpif_flow_dump_state_init(const struct dpif *, void **statep);
-void dpif_flow_dump_start(struct dpif_flow_dump *, const struct dpif *);
+int dpif_flow_dump_start(struct dpif_flow_dump *, const struct dpif *);
bool dpif_flow_dump_next(struct dpif_flow_dump *, void *state,
const struct nlattr **key, size_t *key_len,
const struct nlattr **mask, size_t *mask_len,