Skip to contentSkip to conversation

net: Use NET_XMIT_SUCCESS where possible.

net-next Applied Ben Greear 2 participants 2 messages Aug 9, 2010 – Aug 10, 2010

Subsystems (3)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

This is based on work originally done by Patric McHardy.

---
:100644 100644 e114f23... 3406627... M net/sched/sch_atm.c
:100644 100644 c657628... a5a2915... M net/sched/sch_sfq.c
:100644 100644 0991c64... 641a30d... M net/sched/sch_tbf.c
:100644 100644 807643b... feaabc1... M net/sched/sch_teql.c

 net/sched/sch_atm.c  |    4 ++--
 net/sched/sch_sfq.c  |    2 +-
 net/sched/sch_tbf.c  |    4 ++--
 net/sched/sch_teql.c |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
net/sched/sch_atm.c +2 -2
index e114f23..3406627 100644
@@ -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;
net/sched/sch_sfq.c +1 -1
index c657628..a5a2915 100644
@@ -323,7 +323,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);
net/sched/sch_tbf.c +2 -2
index 0991c64..641a30d 100644
@@ -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)
net/sched/sch_teql.c +1 -1
index 807643b..feaabc1 100644
@@ -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);
Signature · 1 line
1.6.2.5