summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-02-11 21:20:08 +0100
committerDavid S. Miller <davem@davemloft.net>2021-02-11 18:16:32 -0800
commit9fbb4a7ac463c9a7240787f6d9481ec6f8048a74 (patch)
tree0295fc601aa52263c0c4d17e7f5e776c142382be /drivers/net/ethernet/realtek
parent3b23a32a63219f51a5298bc55a65ecee866e79d0 (diff)
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 <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169_main.c4
1 files 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);