Blob Blame History Raw
From: Julio Faracco <jcfaracco@gmail.com>
Date: Tue, 1 Oct 2019 11:39:04 -0300
Subject: net: core: dev: replace state xoff flag comparison by
 netif_xmit_stopped method
Patch-mainline: v5.5-rc1
Git-commit: 5be5515a8ea198de6eb204a0ff25faf98b8ff719
References: bsc#1154353

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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 net/core/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2690,7 +2690,7 @@ static struct dev_kfree_skb_cb *get_kfre
 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);