On Wed, Jul 16, 2014 at 3:05 PM, Ben Pfaff <b...@nicira.com> wrote: > 'n_txq' was initialized to 0 and never modified, so pinsched_count_txqlen() > always returned 0. Instead, return the correct number. > > This only affected the results of "ovs-appctl memory/show", and only if > controller rate limiting was turned on, so it is not a serious bug. > > Signed-off-by: Ben Pfaff <b...@nicira.com> > --- > ofproto/pinsched.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c > index 831afef..6b66774 100644 > --- a/ofproto/pinsched.c > +++ b/ofproto/pinsched.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. > + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > @@ -49,9 +49,6 @@ struct pinsched { > int n_queued; /* Sum over queues[*].n. */ > struct pinqueue *next_txq; /* Next pinqueue check in round-robin. */ > > - /* Transmission queue. */ > - int n_txq; /* No. of packets waiting in rconn for tx. */ > - > /* Statistics reporting. */ > unsigned long long n_normal; /* # txed w/o rate limit queuing. */ > unsigned long long n_limited; /* # queued for rate limiting. */ > @@ -256,7 +253,6 @@ pinsched_create(int rate_limit, int burst_limit) > hmap_init(&ps->queues); > ps->n_queued = 0; > ps->next_txq = NULL; > - ps->n_txq = 0; > ps->n_normal = 0; > ps->n_limited = 0; > ps->n_queue_dropped = 0; > @@ -304,5 +300,5 @@ pinsched_set_limits(struct pinsched *ps, int rate_limit, > int burst_limit)
> unsigned int > pinsched_count_txqlen(const struct pinsched *ps) > { > - return ps ? ps->n_txq : 0; > + return ps ? ps->n_queued : 0; Should n_queued be "unsigned int"? Acked-by: Gurucharan Shetty <gshe...@nicira.com> > } > -- > 1.7.10.4 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev