]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sched/sch_fq_codel.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
[linux.git] / net / sched / sch_fq_codel.c
index d59fbcc745d1cbd147dc3cd95dc8d62120363078..c261c0a1886824ca38e8fb4297f9ca23a4c4863a 100644 (file)
@@ -45,7 +45,6 @@ struct fq_codel_flow {
        struct sk_buff    *tail;
        struct list_head  flowchain;
        int               deficit;
-       u32               dropped; /* number of drops (or ECN marks) on this flow */
        struct codel_vars cvars;
 }; /* please try to keep this structure <= 64 bytes */
 
@@ -173,7 +172,8 @@ static unsigned int fq_codel_drop(struct Qdisc *sch, unsigned int max_packets,
                __qdisc_drop(skb, to_free);
        } while (++i < max_packets && len < threshold);
 
-       flow->dropped += i;
+       /* Tell codel to increase its signal strength also */
+       flow->cvars.count += i;
        q->backlogs[idx] -= len;
        q->memory_usage -= mem;
        sch->qstats.drops += i;
@@ -211,7 +211,6 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                list_add_tail(&flow->flowchain, &q->new_flows);
                q->new_flow_count++;
                flow->deficit = q->quantum;
-               flow->dropped = 0;
        }
        get_codel_cb(skb)->mem_usage = skb->truesize;
        q->memory_usage += get_codel_cb(skb)->mem_usage;
@@ -286,7 +285,6 @@ static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
        struct sk_buff *skb;
        struct fq_codel_flow *flow;
        struct list_head *head;
-       u32 prev_drop_count, prev_ecn_mark;
 
 begin:
        head = &q->new_flows;
@@ -303,16 +301,10 @@ static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
                goto begin;
        }
 
-       prev_drop_count = q->cstats.drop_count;
-       prev_ecn_mark = q->cstats.ecn_mark;
-
        skb = codel_dequeue(sch, &sch->qstats.backlog, &q->cparams,
                            &flow->cvars, &q->cstats, qdisc_pkt_len,
                            codel_get_enqueue_time, drop_func, dequeue_func);
 
-       flow->dropped += q->cstats.drop_count - prev_drop_count;
-       flow->dropped += q->cstats.ecn_mark - prev_ecn_mark;
-
        if (!skb) {
                /* force a pass through old_flows to prevent starvation */
                if ((head == &q->new_flows) && !list_empty(&q->old_flows))
@@ -658,7 +650,7 @@ static int fq_codel_dump_class_stats(struct Qdisc *sch, unsigned long cl,
                        sch_tree_unlock(sch);
                }
                qs.backlog = q->backlogs[idx];
-               qs.drops = flow->dropped;
+               qs.drops = 0;
        }
        if (gnet_stats_copy_queue(d, NULL, &qs, qs.qlen) < 0)
                return -1;