]> git.baikalelectronics.ru Git - kernel.git/commitdiff
r8169: handle tx before rx in napi poll
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 11 Feb 2021 20:20:08 +0000 (21:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Feb 2021 02:16:32 +0000 (18:16 -0800)
Cleaning up tx descriptors first increases the chance that
rtl_rx() can allocate new skb's from the cache.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c

index 6cc54c263d8bf146d133e51817d5a42df226104b..9197da8e626a3b62d769fd66166b4e78ba7b7fe0 100644 (file)
@@ -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);