Skip to content

Commit 7e85dc8

Browse files
koct9idavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a912288 commit 7e85dc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/sch_blackhole.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static int blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch,
2121
struct sk_buff **to_free)
2222
{
2323
qdisc_drop(skb, sch, to_free);
24-
return NET_XMIT_SUCCESS;
24+
return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
2525
}
2626

2727
static struct sk_buff *blackhole_dequeue(struct Qdisc *sch)

0 commit comments

Comments
 (0)