]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sched/sch_netem.c
pkt_sched: Remove smp_wmb() in qdisc_watchdog()
[karo-tx-linux.git] / net / sched / sch_netem.c
index f69698ff88d900cbbea7054098f72750e265177d..d876b873484852d0a1da004e51fc4198d65627de 100644 (file)
@@ -46,9 +46,6 @@
         layering other disciplines.  It does not need to do bandwidth
         control either since that can be handled by using token
         bucket or other rate control.
-
-        The simulator is limited by the Linux timer resolution
-        and will create packet bursts on the HZ boundary (1ms).
 */
 
 struct netem_sched_data {
@@ -252,20 +249,6 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        return ret;
 }
 
-/* Requeue packets but don't change time stamp */
-static int netem_requeue(struct sk_buff *skb, struct Qdisc *sch)
-{
-       struct netem_sched_data *q = qdisc_priv(sch);
-       int ret;
-
-       if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) {
-               sch->q.qlen++;
-               sch->qstats.requeues++;
-       }
-
-       return ret;
-}
-
 static unsigned int netem_drop(struct Qdisc* sch)
 {
        struct netem_sched_data *q = qdisc_priv(sch);
@@ -283,7 +266,6 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
        struct netem_sched_data *q = qdisc_priv(sch);
        struct sk_buff *skb;
 
-       smp_mb();
        if (sch->flags & TCQ_F_THROTTLED)
                return NULL;
 
@@ -345,10 +327,9 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
        root_lock = qdisc_root_sleeping_lock(sch);
 
        spin_lock_bh(root_lock);
-       d = xchg(&q->delay_dist, d);
+       kfree(q->delay_dist);
+       q->delay_dist = d;
        spin_unlock_bh(root_lock);
-
-       kfree(d);
        return 0;
 }
 
@@ -531,7 +512,6 @@ static struct Qdisc_ops tfifo_qdisc_ops __read_mostly = {
        .enqueue        =       tfifo_enqueue,
        .dequeue        =       qdisc_dequeue_head,
        .peek           =       qdisc_peek_head,
-       .requeue        =       qdisc_requeue,
        .drop           =       qdisc_queue_drop,
        .init           =       tfifo_init,
        .reset          =       qdisc_reset_queue,
@@ -620,7 +600,6 @@ static struct Qdisc_ops netem_qdisc_ops __read_mostly = {
        .enqueue        =       netem_enqueue,
        .dequeue        =       netem_dequeue,
        .peek           =       qdisc_peek_dequeued,
-       .requeue        =       netem_requeue,
        .drop           =       netem_drop,
        .init           =       netem_init,
        .reset          =       netem_reset,