Skip to content

Commit

Permalink
r8169: use netif_receive_skb_list batching
Browse files Browse the repository at this point in the history
Use netif_receive_skb_list() instead of napi_gro_receive() to benefit
from batched skb processing.

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 Mar 31, 2019
1 parent e660755 commit 6578229
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -6426,6 +6426,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
{
unsigned int cur_rx, rx_left;
unsigned int count;
LIST_HEAD(rx_list);

cur_rx = tp->cur_rx;

Expand Down Expand Up @@ -6501,7 +6502,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
if (skb->pkt_type == PACKET_MULTICAST)
dev->stats.multicast++;

napi_gro_receive(&tp->napi, skb);
list_add_tail(&skb->list, &rx_list);

u64_stats_update_begin(&tp->rx_stats.syncp);
tp->rx_stats.packets++;
Expand All @@ -6516,6 +6517,8 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
count = cur_rx - tp->cur_rx;
tp->cur_rx = cur_rx;

netif_receive_skb_list(&rx_list);

return count;
}

Expand Down

0 comments on commit 6578229

Please sign in to comment.