Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-08

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

From: Florian Westphal <fw@strlen.de>
Date: 2016-06-06 22:52:32

Eric Dumazet [off-list ref] wrote:
quoted
 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...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help