From 9fbb4a7ac463c9a7240787f6d9481ec6f8048a74 Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Thu, 11 Feb 2021 21:20:08 +0100 Subject: 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. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- drivers/net/ethernet/realtek/r8169_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 6cc54c263d8b..9197da8e626a 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4587,10 +4587,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); -- cgit v1.2.3