Skip to content

Commit

Permalink
r8169: handle tx before rx in napi poll
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Feb 12, 2021
1 parent 3b23a32 commit 9fbb4a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9fbb4a7

Please sign in to comment.