X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fsch_fifo.c;h=4888305c96dadf1f339acbd7bbc3ab5ee03d2651;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=b089924177f859fb3304db78ea90e2309a72a159;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index b08992417..4888305c9 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,14 +47,14 @@ bfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) { struct fifo_sched_data *q = qdisc_priv(sch); - if (sch->stats.backlog + skb->len <= q->limit) { + if (sch->qstats.backlog + skb->len <= q->limit) { __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->qstats.backlog += skb->len; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } - sch->stats.drops++; + sch->qstats.drops++; #ifdef CONFIG_NET_CLS_POLICE if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) #endif @@ -66,7 +66,8 @@ static int bfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + sch->qstats.backlog += skb->len; + sch->qstats.requeues++; return 0; } @@ -77,7 +78,7 @@ bfifo_dequeue(struct Qdisc* sch) skb = __skb_dequeue(&sch->q); if (skb) - sch->stats.backlog -= skb->len; + sch->qstats.backlog -= skb->len; return skb; } @@ -89,7 +90,7 @@ fifo_drop(struct Qdisc* sch) skb = __skb_dequeue_tail(&sch->q); if (skb) { unsigned int len = skb->len; - sch->stats.backlog -= len; + sch->qstats.backlog -= len; kfree_skb(skb); return len; } @@ -100,7 +101,7 @@ static void fifo_reset(struct Qdisc* sch) { skb_queue_purge(&sch->q); - sch->stats.backlog = 0; + sch->qstats.backlog = 0; } static int @@ -110,11 +111,11 @@ pfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) if (sch->q.qlen < q->limit) { __skb_queue_tail(&sch->q, skb); - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } - sch->stats.drops++; + sch->qstats.drops++; #ifdef CONFIG_NET_CLS_POLICE if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) #endif @@ -126,6 +127,7 @@ static int pfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(&sch->q, skb); + sch->qstats.requeues++; return 0; }