diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-09-14 16:51:27 -0700 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-09-14 16:51:27 -0700 |
commit | 6dd3c787f5914ea27b239b6852d8fc0815033128 (patch) | |
tree | 69fc093392b33e9b3f4043359a225eebd12a39b4 /include/openvswitch/ofp-util.h | |
parent | 1f4a893366826e392722d5b1ba59e94331bfe5c9 (diff) | |
download | openvswitch-6dd3c787f5914ea27b239b6852d8fc0815033128.tar.gz |
ofproto: Support packet_outs in bundles.
Add support for OFPT_PACKET_OUT messages in bundles.
While ovs-ofctl already has a packet-out command, we did not have a
string parser for it, as the parsing was done directly from command
line arguments.
This patch adds the string parser for packet-out messages, adds
support for it into the 'ovs-ofctl packet-out' command, and adds a new
ofctl/packet-out ovs-appctl command that can be used when ovs-ofctl is
used as a flow monitor. The old 'ovs-ofctl packet-out syntax is
deprecated' and will be removed in a later OVS release.
The new packet-out parser is further supported with the ovs-ofctl
bundle command, which allows bundles to mix flow mods, group mods and
packet-out messages. Also the packet-outs in bundles are only
executed if the whole bundle is successful. A failing packet-out
translation may also make the whole bundle to fail.
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/openvswitch/ofp-util.h')
-rw-r--r-- | include/openvswitch/ofp-util.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/openvswitch/ofp-util.h b/include/openvswitch/ofp-util.h index 450e739ac..da0aa0108 100644 --- a/include/openvswitch/ofp-util.h +++ b/include/openvswitch/ofp-util.h @@ -1338,18 +1338,20 @@ enum ofperr ofputil_decode_bundle_add(const struct ofp_header *, struct ofputil_bundle_add_msg *, enum ofptype *type); +/* Bundle message as produced by ofp-parse. */ struct ofputil_bundle_msg { enum ofptype type; union { struct ofputil_flow_mod fm; struct ofputil_group_mod gm; + struct ofputil_packet_out po; }; }; -/* Destroys 'bms'. */ -void ofputil_encode_bundle_msgs(struct ofputil_bundle_msg *bms, size_t n_bms, - struct ovs_list *requests, +void ofputil_encode_bundle_msgs(const struct ofputil_bundle_msg *bms, + size_t n_bms, struct ovs_list *requests, enum ofputil_protocol); +void ofputil_free_bundle_msgs(struct ofputil_bundle_msg *bms, size_t n_bms); struct ofputil_tlv_map { struct ovs_list list_node; |