net: remove bypassed check in sch_direct_xmit()
authorSong Liu <songliubraving@fb.com>
Tue, 29 May 2018 17:03:21 +0000 (10:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 May 2018 17:26:19 +0000 (13:26 -0400)
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 <songliubraving@fb.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_generic.c

index 760ab1b09f8b1760cd17c6da3b56c119ef2186ff..69078c82963ef1502820f0a4f372f83dc45b584e 100644 (file)
@@ -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;
 }