diff options
author | Julio Faracco <jcfaracco@gmail.com> | 2019-10-01 11:39:04 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-01 09:26:03 -0700 |
commit | 5be5515a8ea198de6eb204a0ff25faf98b8ff719 (patch) | |
tree | 0ef40e10869fccb90f574b7b63c02e9db7862bc7 /net/core/dev.c | |
parent | 5f71c84038d39def573744a145c573758f52a949 (diff) | |
download | linux-stable-5be5515a8ea198de6eb204a0ff25faf98b8ff719.tar.gz linux-stable-5be5515a8ea198de6eb204a0ff25faf98b8ff719.tar.bz2 linux-stable-5be5515a8ea198de6eb204a0ff25faf98b8ff719.zip |
net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method
Function netif_schedule_queue() has a hardcoded comparison between queue
state and any xoff flag. This comparison does the same thing as method
netif_xmit_stopped(). In terms of code clarity, it is better. See other
methods like: generic_xdp_tx() and dev_direct_xmit().
Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index bf3ed413abaf..21a9c2987cbb 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2771,7 +2771,7 @@ static struct dev_kfree_skb_cb *get_kfree_skb_cb(const struct sk_buff *skb) void netif_schedule_queue(struct netdev_queue *txq) { rcu_read_lock(); - if (!(txq->state & QUEUE_STATE_ANY_XOFF)) { + if (!netif_xmit_stopped(txq)) { struct Qdisc *q = rcu_dereference(txq->qdisc); __netif_schedule(q); |