Skip to contentSkip to conversation

r8169: handle tx before rx in napi poll

PATCH Applied Heiner Kallweit 2 participants 2 messages Feb 11, 2021 – Feb 12, 2021

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: handle tx before rx in napi poll

Cleaning up tx descriptors first increases the chance that rtl_rx() can allocate new skb's from the cache.

---
 drivers/net/ethernet/realtek/r8169_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +2 -2
index de439db75..44a438bad 100644
@@ -4588,10 +4588,10 @@ static int rtl8169_poll(struct napi_struct *napi, int budget)
 	struct net_device *dev = tp->dev;
 	int work_done;
 
-	work_done = rtl_rx(dev, tp, budget);
-
 	rtl_tx(dev, tp, budget);
 
+	work_done = rtl_rx(dev, tp, budget);
+
 	if (work_done < budget && napi_complete_done(napi, work_done))
 		rtl_irq_enable(tp);
 
Signature · 1 line
2.30.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 7 lines · On Thu, 11 Feb 2021 21:20:08 +0100 you wrote:

Cleaning up tx descriptors first increases the chance that rtl_rx() can allocate new skb's from the cache.

---
 drivers/net/ethernet/realtek/r8169_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- [net-next] r8169: handle tx before rx in napi poll

    https://git.kernel.org/netdev/net-next/c/9fbb4a7ac463

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html