aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-10-18 05:23:10 +0000
committerPaolo Abeni <pabeni@redhat.com>2024-10-23 13:31:45 +0200
commit7cfc1b1fa8673fe386304194d4cc2c8fe555bbf9 (patch)
treeefde842719e85046a316d77f0ea98ca2f35e1837
parentnetpoll: remove ndo_netpoll_setup() second argument (diff)
downloadwireguard-linux-7cfc1b1fa8673fe386304194d4cc2c8fe555bbf9.tar.xz
wireguard-linux-7cfc1b1fa8673fe386304194d4cc2c8fe555bbf9.zip
net: netdev_tx_sent_queue() small optimization
Change smp_mb() imediately following a set_bit() with smp_mb__after_atomic(). Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241018052310.2612084-1-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--include/linux/netdevice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 86a0b7eb9461..bbd30f3c5d29 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3517,7 +3517,7 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue,
* because in netdev_tx_completed_queue we update the dql_completed
* before checking the XOFF flag.
*/
- smp_mb();
+ smp_mb__after_atomic();
/* check again in case another CPU has just made room avail */
if (unlikely(dql_avail(&dev_queue->dql) >= 0))