On Fri, May 10, 2013 at 01:39:39PM -0700, Alex Wang wrote: > Since the use of single datapath, all bridges belonging to the same type of > datapath will use the same (single) datapath. This causes confusion in the > current 'ofproto/trace' command. Especially, when given the unrelated > 'bridge' and 'in_port' combination, the current implementation will still > be able to process and give misleading output. Thusly, this patch changes > the 'ofproto/trace' command syntax to formats shown as follow. > > ofproto/trace [datapath] odp_flow [-generate|packet] > ofproto/trace bridge br_flow [-generate|packet] > > Also, this patch updates the tests and the manpages accordingly. > > Signed-off-by: Alex Wang <al...@nicira.com>
Thanks, Alex. I think that the argument parsing is more complicated than necessary. As a first step, we can detect whether the last argument is either -generate or a sequence of hex digits. After we've removed that argument, if present, then we can look at what is now the last argument. If it is an odp_flow, then we can consider the first optional "datapath" argument if present; otherwise we need to have a first "bridge" argument. I don't think it is a good idea to hard-code all the currently known datapath types (because then we have to maintain that list), but I don't think that it is necessary, either. I had in mine that the user would provide a datapath name (e.g. ovs-system) rather than a datapath type name (e.g. system). Your way is fine also, but in that case please update the documentation to make it clear. Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev