From: Florian Westphal <fw@strlen.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, netdev@vger.kernel.org
Subject: Re: [PATCH -next] cbq: remove only caller of qdisc->drop()
Date: Tue, 7 Jun 2016 00:52:27 +0200 [thread overview]
Message-ID: <20160606225227.GE7827@breakpoint.cc> (raw)
In-Reply-To: <1465251192.24873.1.camel@edumazet-glaptop3.roam.corp.google.com>
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > static void cbq_ovl_drop(struct cbq_class *cl)
> > {
> > - if (cl->q->ops->drop)
> > - if (cl->q->ops->drop(cl->q))
> > - cl->qdisc->q.qlen--;
> > + struct sk_buff *skb = cl->q->ops->dequeue(cl->q);
> > +
> > + if (skb) {
> > + cl->deficit -= qdisc_pkt_len(skb);
> > + cl->qdisc->q.qlen--;
> > + qdisc_drop(skb, cl->qdisc);
> > + }
> > +
> > cl->xstats.overactions++;
> > cbq_ovl_classic(cl);
> > }
>
> A drop() is not equivalent to a dequeue() followed by qdisc_drop() for
> statistics.
>
> dequeue() will update stats of _sent_ packets/bytes, while drop() should
> not.
Well, I could send patch to just remove cbq_ovl_drop completely,
you can't configure this facility with iproute2.
You are right of course, but is it really worth to have this?
Not calling cl->q->ops->drop() in cbq would allow removal of ~300 LOC
in qdiscs...
next prev parent reply other threads:[~2016-06-06 22:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 21:20 [PATCH -next] cbq: remove only caller of qdisc->drop() Florian Westphal
2016-06-06 22:13 ` Eric Dumazet
2016-06-06 22:52 ` Florian Westphal [this message]
2016-06-08 0:11 ` 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=20160606225227.GE7827@breakpoint.cc \
--to=fw@strlen.de \
--cc=eric.dumazet@gmail.com \
--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.