X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fsch_sfq.c;h=8734bb7280e36dadd1e1bc87aeff3b8401d85ceb;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=f37d9cdd00fe420494b85121e07bedc7c8a54a0d;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index f37d9cdd0..8734bb728 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -227,7 +227,7 @@ static unsigned int sfq_drop(struct Qdisc *sch) kfree_skb(skb); sfq_dec(q, x); sch->q.qlen--; - sch->stats.drops++; + sch->qstats.drops++; return len; } @@ -243,7 +243,7 @@ static unsigned int sfq_drop(struct Qdisc *sch) sfq_dec(q, d); sch->q.qlen--; q->ht[q->hash[d]] = SFQ_DEPTH; - sch->stats.drops++; + sch->qstats.drops++; return len; } @@ -276,8 +276,8 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch) } } if (++sch->q.qlen < q->limit-1) { - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } @@ -310,10 +310,12 @@ sfq_requeue(struct sk_buff *skb, struct Qdisc* sch) q->tail = x; } } - if (++sch->q.qlen < q->limit - 1) + if (++sch->q.qlen < q->limit - 1) { + sch->qstats.requeues++; return 0; + } - sch->stats.drops++; + sch->qstats.drops++; sfq_drop(sch); return NET_XMIT_CN; } @@ -372,7 +374,6 @@ static void sfq_perturbation(unsigned long arg) struct sfq_sched_data *q = qdisc_priv(sch); q->perturbation = net_random()&0x1F; - q->perturb_timer.expires = jiffies + q->perturb_period; if (q->perturb_period) { q->perturb_timer.expires = jiffies + q->perturb_period;