net: Use NET_XMIT_SUCCESS where possible.
authorBen Greear <greearb@candelatech.com>
Tue, 10 Aug 2010 08:45:40 +0000 (01:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Aug 2010 09:51:11 +0000 (02:51 -0700)
This is based on work originally done by Patric McHardy.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_atm.c
net/sched/sch_sfq.c
net/sched/sch_tbf.c
net/sched/sch_teql.c

index e114f23d5eaeb189428fbf4d307669da80e4f255..3406627895298324fdd9d27186ad8c9c8d9a9964 100644 (file)
@@ -418,7 +418,7 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        }
 
        ret = qdisc_enqueue(skb, flow->q);
-       if (ret != 0) {
+       if (ret != NET_XMIT_SUCCESS) {
 drop: __maybe_unused
                if (net_xmit_drop_count(ret)) {
                        sch->qstats.drops++;
@@ -442,7 +442,7 @@ drop: __maybe_unused
         */
        if (flow == &p->link) {
                sch->q.qlen++;
-               return 0;
+               return NET_XMIT_SUCCESS;
        }
        tasklet_schedule(&p->task);
        return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
index d8e0ae5fa16a808ceffce2851c9fc9deedce4d89..b8bcb2096df8af43316b92843f83aeb1b67f5f13 100644 (file)
@@ -334,7 +334,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        if (++sch->q.qlen <= q->limit) {
                sch->bstats.bytes += qdisc_pkt_len(skb);
                sch->bstats.packets++;
-               return 0;
+               return NET_XMIT_SUCCESS;
        }
 
        sfq_drop(sch);
index 0991c640cd3e8f3e5ae836c44b16b9e27f743c7e..641a30d646356867b808ac86d7bac59901fe2729 100644 (file)
@@ -127,7 +127,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
                return qdisc_reshape_fail(skb, sch);
 
        ret = qdisc_enqueue(skb, q->qdisc);
-       if (ret != 0) {
+       if (ret != NET_XMIT_SUCCESS) {
                if (net_xmit_drop_count(ret))
                        sch->qstats.drops++;
                return ret;
@@ -136,7 +136,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
        sch->q.qlen++;
        sch->bstats.bytes += qdisc_pkt_len(skb);
        sch->bstats.packets++;
-       return 0;
+       return NET_XMIT_SUCCESS;
 }
 
 static unsigned int tbf_drop(struct Qdisc* sch)
index 807643bdcbac30817edecfb4185dd45826b750eb..feaabc103ce6a061e350ddb07e1a2faf5d1ee4bd 100644 (file)
@@ -85,7 +85,7 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc* sch)
                __skb_queue_tail(&q->q, skb);
                sch->bstats.bytes += qdisc_pkt_len(skb);
                sch->bstats.packets++;
-               return 0;
+               return NET_XMIT_SUCCESS;
        }
 
        kfree_skb(skb);