Thread (13 messages) 13 messages, 6 authors, 2011-01-17

Re: [PATCH] net_sched: factorize qdisc stats handling

flat view

From: Eric Dumazet <hidden>
Date: 2011-01-17 22:04:19

Le lundi 17 janvier 2011 à 22:55 +0100, Jesper Dangaard Brouer a écrit :
quoted hunk ↗ jump to hunk
On Sat, 8 Jan 2011, Eric Dumazet wrote:
quoted
quoted
Changli Gao [off-list ref] wrote:
quoted
quoted
+       cl->bstats.packets += skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
What about the qlen when we enqueue a GSO packet? Should we account for 
the number of internal GSO packets, or just account a GSO packet as a 
single packet?
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 0918834..1a8c0a3 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -453,7 +453,8 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, 
struct Qdisc* qdisc)
                 struct sk_buff_head *list = band2list(priv, band);

                 priv->bitmap |= (1 << band);
-               qdisc->q.qlen++;
+               /* Should the number of GSO packets be taken into account?*/
+               qdisc->q.qlen += skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
                 return __qdisc_enqueue_tail(skb, qdisc, list);
         }

Is is at all legal to modify the q.qlen this way?
nope ;)

q.qlen is really number of skbs here.


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help