]> git.proxmox.com Git - mirror_ovs.git/commit - utilities/ovs-dpctl.c
dpif: Refactor flow dumping interface to make better sense for batching.
authorBen Pfaff <blp@nicira.com>
Tue, 20 May 2014 18:37:02 +0000 (11:37 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 20 May 2014 18:37:02 +0000 (11:37 -0700)
commitac64794acb85a28059c666ef99250971880027b3
treef42da516bb7a11d46061fcec2da74f961c404334
parent260ecd6f4f52a5355f63a6fbc95a9fc9aa07b6f4
dpif: Refactor flow dumping interface to make better sense for batching.

Commit a6ce4b9d251 (ofproto-dpif-upcall: Avoid use-after-free in
revalidate() corner case.) showed that it is somewhat tricky to correctly
use the existing dpif flow dumping interface to obtain batches of flows.
One has to be careful about calling dpif_flow_dump_next_may_destroy_keys()
before going on to the next flow.

A better interface is possible, one that is naturally oriented toward
retrieving batches when that is a useful optimization.  This commit
replaces the dpif interface by such a design, and updates both the
implementations and the callers to adopt it.

This is a fairly large change, but I think that the code in
ofproto-dpif-upcall is easier to understand after the change.

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