diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2018-06-15 13:27:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-22 13:43:25 +0200 |
commit | 1c67c117d4273566e39b22902637c0d2aa33355a (patch) | |
tree | c299b9ba069042216c7fba6145b3751e6bcb0f8a | |
parent | 861aa150174135b16b8c6502baaa65f802ef8dca (diff) | |
download | linux-stable-1c67c117d4273566e39b22902637c0d2aa33355a.tar.gz linux-stable-1c67c117d4273566e39b22902637c0d2aa33355a.tar.bz2 linux-stable-1c67c117d4273566e39b22902637c0d2aa33355a.zip |
net_sched: blackhole: tell upper qdisc about dropped packets
[ Upstream commit 7e85dc8cb35abf16455f1511f0670b57c1a84608 ]
When blackhole is used on top of classful qdisc like hfsc it breaks
qlen and backlog counters because packets are disappear without notice.
In HFSC non-zero qlen while all classes are inactive triggers warning:
WARNING: ... at net/sched/sch_hfsc.c:1393 hfsc_dequeue+0xba4/0xe90 [sch_hfsc]
and schedules watchdog work endlessly.
This patch return __NET_XMIT_BYPASS in addition to NET_XMIT_SUCCESS,
this flag tells upper layer: this packet is gone and isn't queued.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/sched/sch_blackhole.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_blackhole.c b/net/sched/sch_blackhole.c index 094a874b48bc..0f1495bc79c6 100644 --- a/net/sched/sch_blackhole.c +++ b/net/sched/sch_blackhole.c @@ -20,7 +20,7 @@ static int blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch) { qdisc_drop(skb, sch); - return NET_XMIT_SUCCESS; + return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; } static struct sk_buff *blackhole_dequeue(struct Qdisc *sch) |