summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2021-05-14 11:17:01 +0800
committerDavid S. Miller <davem@davemloft.net>2021-05-14 15:05:46 -0700
commitdcad9ee9e0663d74a89b25b987f9c7be86432812 (patch)
treeab35fda898b963d929da7fc6a42c9c08518b022e /net/rds
parent102b55ee92f9fda4dde7a45d2b20538e6e3e3d1e (diff)
downloadlwn-dcad9ee9e0663d74a89b25b987f9c7be86432812.tar.gz
lwn-dcad9ee9e0663d74a89b25b987f9c7be86432812.zip
net: sched: fix tx action reschedule issue with stopped queue
The netdev qeueue might be stopped when byte queue limit has reached or tx hw ring is full, net_tx_action() may still be rescheduled if STATE_MISSED is set, which consumes unnecessary cpu without dequeuing and transmiting any skb because the netdev queue is stopped, see qdisc_run_end(). This patch fixes it by checking the netdev queue state before calling qdisc_run() and clearing STATE_MISSED if netdev queue is stopped during qdisc_run(), the net_tx_action() is rescheduled again when netdev qeueue is restarted, see netif_tx_wake_queue(). As there is time window between netif_xmit_frozen_or_stopped() checking and STATE_MISSED clearing, between which STATE_MISSED may set by net_tx_action() scheduled by netif_tx_wake_queue(), so set the STATE_MISSED again if netdev queue is restarted. Fixes: 6b3ba9146fe6 ("net: sched: allow qdiscs to handle locking") Reported-by: Michal Kubecek <mkubecek@suse.cz> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
0 files changed, 0 insertions, 0 deletions