]> git.proxmox.com Git - mirror_ovs.git/commit
flow: Refactor flow_compose() API.
authorAndy Zhou <azhou@ovn.org>
Tue, 25 Jul 2017 21:26:22 +0000 (14:26 -0700)
committerAndy Zhou <azhou@ovn.org>
Thu, 27 Jul 2017 22:22:39 +0000 (15:22 -0700)
commitbc0f51765d2741d122f07252b6b37c985c7e9325
tree4cf3f66e1ab7ac826cfebe7fcdba836c058bac67
parentd5e13d39d7a38bbaadaed0fd11949cbb13b13b58
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>
lib/flow.c
lib/flow.h
lib/netdev-dummy.c
ofproto/ofproto-dpif-trace.c
ofproto/ofproto-dpif.c
ovn/controller/ofctrl.c
tests/test-ovn.c