]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: blackhole: tell upper qdisc about dropped packets
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fri, 15 Jun 2018 10:27:31 +0000 (13:27 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Jun 2018 23:42:33 +0000 (08:42 +0900)
commit458206e51ff77472d288781347ca15e1e827c156
tree67373c29f348071727ab51c76c30b3ae886e4045
parent69551aa5cbfa36e291a39a4718d88adb5d817297
net_sched: blackhole: tell upper qdisc about dropped packets

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>
net/sched/sch_blackhole.c