Commit 7cfc1b1f authored by Eric Dumazet's avatar Eric Dumazet Committed by Paolo Abeni
Browse files

net: netdev_tx_sent_queue() small optimization



Change smp_mb() imediately following a set_bit()
with smp_mb__after_atomic().

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241018052310.2612084-1-edumazet@google.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent e44ef3f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))