Subject: Re: [PATCH -next] cbq: remove only caller of qdisc->drop()

From: Florian Westphal <[email-masked]>
Date: Tue, 7 Jun 2016 00:52:27 +0200

Eric Dumazet <[email-masked]> 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...