[ovs-dev] [tests+nxm-ofctl 42/42] ovs-ofctl: Add --more option to increase OpenFlow message verbosity.

Ben Pfaff blp at nicira.com
Tue Dec 7 21:34:38 UTC 2010


On Tue, Dec 07, 2010 at 01:05:34AM -0800, Justin Pettit wrote:
> On Nov 23, 2010, at 2:44 PM, Ben Pfaff wrote:
> 
> > +AT_CHECK([ovs-ofctl -F nxm -mmm parse-flows flows.txt], [0], [stdout])
> > +AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
> > +NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(007b) actions=FLOOD
> > +NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(fffe), NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_VLAN_TCI_W(1009/1fff) actions=drop
> > +NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(c0a80001) actions=drop_spoofed_arp,NORMAL
> > +NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_VLAN_TCI_W(f000/f000), NXM_OF_IP_PROTO(11) idle:5 actions=strip_vlan,output:0
> > +NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(0050) actions=set_queue:37,output:1
> > +NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(0035) actions=pop_queue,output:1
> 
> The non-verbose NXM types don't have spaces after the commas, but
> these do.  In general, we haven't been very consistent about commas
> and spaces, but it would be nice to be a bit better about that.  I'm
> happy to do the work if others are agreeable to it.  (I realize we do
> this sometimes for grouping, but I don't think that's immediately
> obvious to users, so it just looks somewhat sloppy.)

There's actually a reason here, even if it isn't a very good one.  For
non-verbose output, the lack of spaces between the commas makes it
easier to cut and paste logging output back into "ovs-ofctl add-flow"
and other commands.  The verbose output isn't anything that can be
cut-and-pasted usefully, normally anyhow, and so it's better to have it
be a little easier to read, especially since it's so unreadable to begin
with.




More information about the dev mailing list