[ovs-git] [openvswitch/ovs] bc0f51: flow: Refactor flow_compose() API.

GitHub noreply at github.com
Thu Jul 27 22:23:14 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: bc0f51765d2741d122f07252b6b37c985c7e9325
      https://github.com/openvswitch/ovs/commit/bc0f51765d2741d122f07252b6b37c985c7e9325
  Author: Andy Zhou <azhou at ovn.org>
  Date:   2017-07-27 (Thu, 27 Jul 2017)

  Changed paths:
    M lib/flow.c
    M lib/flow.h
    M lib/netdev-dummy.c
    M ofproto/ofproto-dpif-trace.c
    M ofproto/ofproto-dpif.c
    M ovn/controller/ofctrl.c
    M tests/test-ovn.c

  Log Message:
  -----------
  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 at ovn.org>
Acked-by: Ilya Maximets <i.maximets at samsung.com>




More information about the git mailing list