Commit 41eeb134 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Greg Kroah-Hartman
Browse files

r8169: improve rtl8169_start_xmit



[ Upstream commit 41294e6a ]

Improve the following in rtl8169_start_xmit:
- tp->cur_tx can be accessed in parallel by rtl_tx(), therefore
  annotate the race by using WRITE_ONCE
- avoid checking stop_queue a second time by moving the doorbell check
- netif_stop_queue() uses atomic operation set_bit() that includes a
  full memory barrier on some platforms, therefore use
  smp_mb__after_atomic to avoid overhead

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/80085451-3eaf-507a-c7c0-08d607c46fbc@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Stable-dep-of: c71e3a5c ("r8169: Fix possible ring buffer corruption on fragmented Tx packets.")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 04f9d0cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment