[ovs-dev] [PATCH] ofp-print: Print each flow at the start of a line.

Ben Pfaff blp at nicira.com
Wed Dec 8 21:33:11 UTC 2010


Thanks, I pushed this.

On Wed, Dec 08, 2010 at 01:21:29PM -0800, Justin Pettit wrote:
> Looks good.
> 
> --Justin
> 
> 
> On Dec 8, 2010, at 12:05 PM, Ben Pfaff wrote:
> 
> > Before this commit, the first flow in "ovs-ofctl dump-flows" output was
> > printed on the same line as the OpenFlow message type name and the xid.
> > With this commit, that flow is put on a line of its own, like all of the
> > other flows in the output.
> > 
> > Requested-by: Paul Ingram <paul at nicira.com>
> > CC: Paul Ingram <paul at nicira.com>
> > ---
> > lib/ofp-print.c |    3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/lib/ofp-print.c b/lib/ofp-print.c
> > index e199ac9..4141b9f 100644
> > --- a/lib/ofp-print.c
> > +++ b/lib/ofp-print.c
> > @@ -1069,6 +1069,8 @@ ofp_print_ofpst_flow_reply(struct ds *string, const struct ofp_header *oh,
> >         ptrdiff_t bytes_left = body + len - pos;
> >         size_t length;
> > 
> > +        ds_put_char(string, '\n');
> > +
> >         if (bytes_left < sizeof *fs) {
> >             if (bytes_left != 0) {
> >                 ds_put_format(string, " ***%td leftover bytes at end***",
> > @@ -1118,7 +1120,6 @@ ofp_print_ofpst_flow_reply(struct ds *string, const struct ofp_header *oh,
> >         }
> >         ofp_print_match(string, &fs->match, verbosity);
> >         ofp_print_actions(string, fs->actions, length - sizeof *fs);
> > -        ds_put_char(string, '\n');
> > 
> >         pos += length;
> >      }
> > -- 
> > 1.7.1
> > 
> > 
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
> 




More information about the dev mailing list