From: Jarek Poplawski <jarkao2@o2.pl>
To: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH][NET_SCHED] sch_prio: class statistics printing enabled
Date: Wed, 31 Jan 2007 16:01:02 +0100 [thread overview]
Message-ID: <20070131150102.GA3643@ff.dom.local> (raw)
In-Reply-To: <45C0A9A5.4080607@trash.net>
On Wed, Jan 31, 2007 at 03:37:25PM +0100, Patrick McHardy wrote:
> Jarek Poplawski wrote:
> > +static int prio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
> > + struct gnet_dump *d)
> > +{
> > + struct prio_sched_data *q = qdisc_priv(sch);
> > + struct Qdisc *cl_q;
> > +
> > + if (cl - 1 > q->bands)
> > + return -1;
>
> Thats not what I meant, it still hides the bug. Either do
> nothing (don't check) or do BUG_ON(cl - 1 > q->bands).
Sorry - problems with reading!
And with understanding...
>From sch_api.c:
> if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0)
> goto rtattr_failure;
>
> if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
> TCA_XSTATS, q->stats_lock, &d) < 0)
> goto rtattr_failure;
>
> if (cl_ops->dump_stats && cl_ops->dump_stats(q, cl, &d) < 0)
> goto rtattr_failure;
I can't see any difference between calling ->dump and
->dump_stats? Of course we may forsee this error should
jump over cl_ops...
But I'm polite still, so in a minute...
Jarek P.
next prev parent reply other threads:[~2007-01-31 14:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 7:53 [PATCH][NET_SCHED] sch_prio: class statistics printing enabled Jarek Poplawski
2007-01-31 13:47 ` Patrick McHardy
2007-01-31 14:31 ` Jarek Poplawski
2007-01-31 14:35 ` Patrick McHardy
2007-01-31 14:35 ` Jarek Poplawski
2007-01-31 14:37 ` Patrick McHardy
2007-01-31 15:01 ` Jarek Poplawski [this message]
2007-01-31 15:06 ` Patrick McHardy
2007-01-31 15:17 ` Jarek Poplawski
2007-01-31 15:23 ` Patrick McHardy
2007-01-31 15:22 ` Jarek Poplawski
2007-01-31 15:23 ` Patrick McHardy
2007-01-31 20:21 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070131150102.GA3643@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.