Thread (29 messages) 29 messages, 4 authors, 2008-07-30

Re: [PATCH v2 2/3] net_sched: Add accessor function for packet length for qdiscs

From: David Miller <davem@davemloft.net>
Date: 2008-07-25 11:52:16

From: Jarek Poplawski <redacted>
Date: Fri, 25 Jul 2008 11:53:55 +0000
On Fri, Jul 25, 2008 at 11:37:57AM +0000, Jarek Poplawski wrote:

As a matter of fact it's a good example: in your patch we have this:

+		ret = cl->un.leaf.q->enqueue(skb, cl->un.leaf.q);
+		if (ret == NET_XMIT_DROP) {
+			sch->qstats.drops++;
+			cl->qstats.drops++;
+		} else {
+			cl->bstats.packets +=
+				skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
+			cl->bstats.bytes += skb->len;

So, if something works like noop_enqueue() and returns NET_XMIT_CN
here, we're just using skb after kfree...
noop_enqueue() can only be a root qdisc, never a leaf hanging off of a
class

What TCP depends upon is that DROP means DROP, and that the
packet never reached the device and has been freed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help