On Mon, Sep 12, 2016 at 01:52:43PM -0700, Jarno Rajahalme wrote: > 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, and adds a > new ofctl/packet-out ovs-appctl command that can be used when > ovs-ofctl is used as a flow monitor. > > 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 <ja...@ovn.org>
Should the existing packet-out command in ovs-ofctl also support this new syntax? It could distinguish it from the legacy syntax by checking the number of arguments (1 versus 4+). If so, perhaps we should deprecate the legacy syntax. I think that parse_ofp_packet_out_str__() has some memory leaks inside the while loop: if it detects than one error, then the earlier one is leaked. It's a little unusual that ofputil_encode_bundle_msgs() frees the bundled messages and that there's no separate way to do that without encoding. I'm surprised that do_bundle_commit() potentially increases ofproto->tables_version more than once (in the loop labeled "4. Finish."). I would have guessed that it would do that once, to make visible everything in the bundle. Acked-by: Ben Pfaff <b...@ovn.org> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev