summaryrefslogtreecommitdiff
path: root/ovn
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 /ovn
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 'ovn')
-rw-r--r--ovn/controller/ofctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c
index 5aff2302a..7164ff061 100644
--- a/ovn/controller/ofctrl.c
+++ b/ovn/controller/ofctrl.c
@@ -1150,7 +1150,7 @@ ofctrl_inject_pkt(const struct ovsrec_bridge *br_int, const char *flow_s,
uint64_t packet_stub[128 / 8];
struct dp_packet packet;
dp_packet_use_stub(&packet, packet_stub, sizeof packet_stub);
- flow_compose(&packet, &uflow);
+ flow_compose(&packet, &uflow, 0);
uint64_t ofpacts_stub[1024 / 8];
struct ofpbuf ofpacts = OFPBUF_STUB_INITIALIZER(ofpacts_stub);