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: Jarek Poplawski <hidden>
Date: 2008-07-25 10:52:43

On 20-07-2008 01:35, Jussi Kivilinna wrote:
Signed-off-by: Jussi Kivilinna <redacted>
...
quoted hunk ↗ jump to hunk
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 1afe3ee..f1d2f8e 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -370,7 +370,6 @@ static int
 cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 {
 	struct cbq_sched_data *q = qdisc_priv(sch);
-	int len = skb->len;
 	int uninitialized_var(ret);
 	struct cbq_class *cl = cbq_classify(skb, sch, &ret);
 
@@ -391,7 +390,7 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 	if (ret == NET_XMIT_SUCCESS) {
 		sch->q.qlen++;
 		sch->bstats.packets++;
-		sch->bstats.bytes+=len;
+		sch->bstats.bytes += qdisc_pkt_len(skb);
Alas I didn't manage to read this earlier, but this type of changes
here and elsewhere in this patch looks wrong to me: we shouldn't
use skb pointer after ->enqueue().

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