diff options
author | Rosen Penev <rosenp@gmail.com> | 2022-10-30 12:25:19 -0700 |
---|---|---|
committer | Sander Vanheule <sander@svanheule.net> | 2022-11-01 09:09:24 +0100 |
commit | 3b936510720b04ec02b4e4a395aa39cdcfbc47d5 (patch) | |
tree | ea7dfd50389c6b760f575d1732560cf249d18d80 | |
parent | e131a66e307cb108443714e9d57c1eeca12194a1 (diff) | |
download | upstream-3b936510720b04ec02b4e4a395aa39cdcfbc47d5.tar.gz upstream-3b936510720b04ec02b4e4a395aa39cdcfbc47d5.tar.bz2 upstream-3b936510720b04ec02b4e4a395aa39cdcfbc47d5.zip |
target/realtek: use netif_receive_skb_list
Small performance improvement on rx.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r-- | target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c index be84549b9e..166e49e139 100644 --- a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c @@ -1252,6 +1252,7 @@ static int rtl838x_hw_receive(struct net_device *dev, int r, int budget) struct rtl838x_eth_priv *priv = netdev_priv(dev); struct ring_b *ring = priv->membase; struct sk_buff *skb; + LIST_HEAD(rx_list); unsigned long flags; int i, len, work_done = 0; u8 *data, *skb_data; @@ -1329,7 +1330,7 @@ static int rtl838x_hw_receive(struct net_device *dev, int r, int budget) dev->stats.rx_packets++; dev->stats.rx_bytes += len; - netif_receive_skb(skb); + list_add_tail(&skb->list, &rx_list); } else { if (net_ratelimit()) dev_warn(&dev->dev, "low on memory - packet dropped\n"); @@ -1347,6 +1348,8 @@ static int rtl838x_hw_receive(struct net_device *dev, int r, int budget) last = (u32 *)KSEG1ADDR(sw_r32(priv->r->dma_if_rx_cur + r * 4)); } while (&ring->rx_r[r][ring->c_rx[r]] != last && work_done < budget); + netif_receive_skb_list(&rx_list); + // Update counters priv->r->update_cntr(r, 0); |