diff options
author | Sieng Piaw Liew <liew.s.piaw@gmail.com> | 2022-06-29 16:11:38 +0800 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2023-03-04 19:28:16 +0100 |
commit | 686050b2b2b7f4e7b54632627d4ef8981c543959 (patch) | |
tree | 3f91b86674c2df2155d32a69e63b84510bb4c14d /target/linux/bmips | |
parent | 6276dad6caadc6dc96bb6fb54d432bc8d8455a0e (diff) | |
download | upstream-686050b2b2b7f4e7b54632627d4ef8981c543959.tar.gz upstream-686050b2b2b7f4e7b54632627d4ef8981c543959.tar.bz2 upstream-686050b2b2b7f4e7b54632627d4ef8981c543959.zip |
bmips: batch process rx path
Use netif_receive_skb_list() to batch process rx skb. This improves
cache efficiency.
Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
Diffstat (limited to 'target/linux/bmips')
-rw-r--r-- | target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 04884a122d..b7485ca51a 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -334,8 +334,11 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) { struct bcm6368_enetsw *priv = netdev_priv(dev); struct device *kdev = &priv->pdev->dev; + struct list_head rx_list; int processed = 0; + INIT_LIST_HEAD(&rx_list); + /* don't scan ring further than number of refilled * descriptor */ if (budget > priv->rx_desc_count) @@ -418,9 +421,10 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) skb->protocol = eth_type_trans(skb, dev); dev->stats.rx_packets++; dev->stats.rx_bytes += len; - netif_receive_skb(skb); + list_add_tail(&skb->list, &rx_list); } while (processed < budget); + netif_receive_skb_list(&rx_list); priv->rx_desc_count -= processed; if (processed || !priv->rx_desc_count) { |