* [PATCH net-next] net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method
@ 2019-09-23 1:57 jcfaracco
2019-09-25 11:56 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: jcfaracco @ 2019-09-23 1:57 UTC (permalink / raw)
To: davem; +Cc: netdev
From: Julio Faracco <jcfaracco@gmail.com>
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>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 71b18e8..a8ecf88 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);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method
2019-09-23 1:57 [PATCH net-next] net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method jcfaracco
@ 2019-09-25 11:56 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-09-25 11:56 UTC (permalink / raw)
To: jcfaracco; +Cc: netdev
From: jcfaracco@gmail.com
Date: Sun, 22 Sep 2019 22:57:29 -0300
> From: Julio Faracco <jcfaracco@gmail.com>
>
> 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>
net-next is closed, please resubmit when the net-next tree opens back up.
Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-25 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 1:57 [PATCH net-next] net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method jcfaracco
2019-09-25 11:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).