summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-trace.c
diff options
context:
space:
mode:
authorAndy Zhou <azhou@ovn.org>2017-07-25 14:26:22 -0700
committerAndy Zhou <azhou@ovn.org>2017-07-27 15:22:39 -0700
commitbc0f51765d2741d122f07252b6b37c985c7e9325 (patch)
tree4cf3f66e1ab7ac826cfebe7fcdba836c058bac67 /ofproto/ofproto-dpif-trace.c
parentd5e13d39d7a38bbaadaed0fd11949cbb13b13b58 (diff)
downloadopenvswitch-bc0f51765d2741d122f07252b6b37c985c7e9325.tar.gz
flow: Refactor flow_compose() API.
Currently, flow_compose_size() is only supposed to be called after flow_compose(). I find this API to be unintuitive. Change flow_compose() API to take the 'size' argument, and returns 'true' if the packet can be created, 'false' otherwise. This change also improves error detection and reporting when 'size' is unreasonably small. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ilya Maximets <i.maximets@samsung.com>
Diffstat (limited to 'ofproto/ofproto-dpif-trace.c')
-rw-r--r--ofproto/ofproto-dpif-trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c
index b3f3cbc6a..38d11002f 100644
--- a/ofproto/ofproto-dpif-trace.c
+++ b/ofproto/ofproto-dpif-trace.c
@@ -376,7 +376,7 @@ parse_flow_and_packet(int argc, const char *argv[],
/* Generate a packet, if requested. */
if (packet) {
if (!dp_packet_size(packet)) {
- flow_compose(packet, flow);
+ flow_compose(packet, flow, 0);
} else {
/* Use the metadata from the flow and the packet argument
* to reconstruct the flow. */