[ovs-dev] [ofp-print 04/18] ofp-print: Improve OFPST_FLOW stats reply printing.

Ben Pfaff blp at nicira.com
Thu Dec 9 01:15:16 UTC 2010


Thanks, I pushed out the first four of these.

On Wed, Dec 08, 2010 at 05:03:55PM -0800, Justin Pettit wrote:
> Looks good.
> 
> --Justin
> 
> 
> On Dec 8, 2010, at 4:26 PM, Ben Pfaff wrote:
> 
> > This fixes the spacing and prints the priority included in the message
> > instead of the implicit priority.
> > ---
> > lib/ofp-print.c |    6 +++---
> > 1 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/lib/ofp-print.c b/lib/ofp-print.c
> > index 40d096d..83d61b5 100644
> > --- a/lib/ofp-print.c
> > +++ b/lib/ofp-print.c
> > @@ -1103,14 +1103,13 @@ ofp_print_ofpst_flow_reply(struct ds *string, const struct ofp_header *oh,
> >             break;
> >         }
> > 
> > -        ds_put_format(string, "  cookie=0x%"PRIx64", ", ntohll(fs->cookie));
> > +        ds_put_format(string, " cookie=0x%"PRIx64", ", ntohll(fs->cookie));
> >         ds_put_format(string, "duration_sec=%"PRIu32"s, ",
> >                     ntohl(fs->duration_sec));
> >         ds_put_format(string, "duration_nsec=%"PRIu32"ns, ",
> >                     ntohl(fs->duration_nsec));
> >         ds_put_format(string, "table_id=%"PRIu8", ", fs->table_id);
> > -        ds_put_format(string, "priority=%"PRIu16", ",
> > -                    fs->match.wildcards ? ntohs(fs->priority) : (uint16_t)-1);
> > +        ds_put_format(string, "priority=%"PRIu16", ", ntohs(fs->priority));
> >         ds_put_format(string, "n_packets=%"PRIu64", ",
> >                     ntohll(fs->packet_count));
> >         ds_put_format(string, "n_bytes=%"PRIu64", ", ntohll(fs->byte_count));
> > @@ -1123,6 +1122,7 @@ ofp_print_ofpst_flow_reply(struct ds *string, const struct ofp_header *oh,
> >                           ntohs(fs->hard_timeout));
> >         }
> >         ofp_print_match(string, &fs->match, verbosity);
> > +        ds_put_char(string, ' ');
> >         ofp_print_actions(string, fs->actions, length - sizeof *fs);
> > 
> >         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