Thread (6 messages) flat view 6 messages, 4 authors, 2018-05-29

Re: [PATCH net] net: sched: check netif_xmit_frozen_or_stopped() in sch_direct_xmit()

From: David Miller <davem@davemloft.net>
Date: 2018-05-29 14:02:57

From: Song Liu <redacted>
Date: Fri, 25 May 2018 11:11:44 -0700
Summary:

At the end of sch_direct_xmit(), we are in the else path of
!dev_xmit_complete(ret), which means ret == NETDEV_TX_OK. The following
condition will always fail and netif_xmit_frozen_or_stopped() is not
checked at all.

    if (ret && netif_xmit_frozen_or_stopped(txq))
         return false;

In this patch, this condition is fixed as:

    if (netif_xmit_frozen_or_stopped(txq))
         return false;

and further simplifies the code as:

    return !netif_xmit_frozen_or_stopped(txq);

Fixes: 29b86cdac00a ("net: sched: remove remaining uses for qdisc_qlen in xmit path")
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Song Liu <redacted>
I expect a new version of this patch which removes the test entirely.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help