[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1400231990-10404-1-git-send-email-yangyingliang@huawei.com>
Date: Fri, 16 May 2014 17:19:50 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <netdev@...r.kernel.org>
CC: <eric.dumazet@...il.com>, <vtlam@...gle.com>,
<nanditad@...gle.com>, <davem@...emloft.net>
Subject: [PATCH net-next] pkt_sched: return NET_XMIT_DROP when packet is dropped
If packets are dropped in enqueue(), it should not return
NET_XMIT_SUCCESS but NET_XMIT_DROP.
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
net/sched/sch_fq_codel.c | 2 +-
net/sched/sch_hhf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 0bf432c782c1..303ab0ce23ab 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -207,7 +207,7 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch)
/* As we dropped a packet, better let upper stack know this */
qdisc_tree_decrease_qlen(sch, 1);
- return NET_XMIT_SUCCESS;
+ return NET_XMIT_DROP;
}
/* This is the specific function called from codel_dequeue()
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index 6aab8619bbb0..a13d1d78ded1 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -426,7 +426,7 @@ static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch)
/* As we dropped a packet, better let upper stack know this. */
qdisc_tree_decrease_qlen(sch, 1);
- return NET_XMIT_SUCCESS;
+ return NET_XMIT_DROP;
}
static struct sk_buff *hhf_dequeue(struct Qdisc *sch)
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists