From: Song Liu Date: Tue, 29 May 2018 17:03:21 +0000 (-0700) Subject: net: remove bypassed check in sch_direct_xmit() X-Git-Tag: v4.18-rc1~114^2~95 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4341f8308d53f95a4a1ab54f45fa9af2c30ff596;p=uclinux-h8%2Flinux.git net: remove bypassed check in sch_direct_xmit() Checking netif_xmit_frozen_or_stopped() at the end of sch_direct_xmit() is being bypassed. This is because "ret" from sch_direct_xmit() will be either NETDEV_TX_OK or NETDEV_TX_BUSY, and only ret == NETDEV_TX_OK == 0 will reach the condition: if (ret && netif_xmit_frozen_or_stopped(txq)) return false; This patch cleans up the code by removing the whole condition. For more discussion about this, please refer to https://marc.info/?t=152727195700008 Signed-off-by: Song Liu Cc: John Fastabend Cc: Alexei Starovoitov Cc: David S. Miller Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 760ab1b09f8b..69078c82963e 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -346,9 +346,6 @@ bool sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, return false; } - if (ret && netif_xmit_frozen_or_stopped(txq)) - return false; - return true; }