[openwrt/openwrt] bcm63xx: enetsw: switch to netdev_alloc_skb_ip_align
LEDE Commits
lede-commits at lists.infradead.org
Wed Dec 2 14:39:10 EST 2020
noltari pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ba74da5b99a1e8239af896378fbbc68f8761cd15
commit ba74da5b99a1e8239af896378fbbc68f8761cd15
Author: Sieng Piaw Liew <liew.s.piaw at gmail.com>
AuthorDate: Mon Nov 2 11:12:19 2020 +0800
bcm63xx: enetsw: switch to netdev_alloc_skb_ip_align
Increases packet processing performance by 30%.
Tested on BCM6328 320 MHz and iperf3 -M 512 for packet/sec performance.
Before:
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-30.00 sec 120 MBytes 33.7 Mbits/sec 277 sender
[ 4] 0.00-30.00 sec 120 MBytes 33.5 Mbits/sec receiver
After:
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-30.00 sec 155 MBytes 43.3 Mbits/sec 354 sender
[ 4] 0.00-30.00 sec 154 MBytes 43.1 Mbits/sec receiver
Signed-off-by: Sieng Piaw Liew <liew.s.piaw at gmail.com>
[Merge patches, amend commit and add patch description]
Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
.../441-bcm63xx_enet-alloc_rx_skb_ip_align.patch | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/target/linux/bcm63xx/patches-5.4/441-bcm63xx_enet-alloc_rx_skb_ip_align.patch b/target/linux/bcm63xx/patches-5.4/441-bcm63xx_enet-alloc_rx_skb_ip_align.patch
new file mode 100644
index 0000000000..ade99beacc
--- /dev/null
+++ b/target/linux/bcm63xx/patches-5.4/441-bcm63xx_enet-alloc_rx_skb_ip_align.patch
@@ -0,0 +1,37 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Sieng Piaw Liew <liew.s.piaw at gmail.com>
+Date: Mon, 30 Nov 2020 11:07:47 +0800
+Subject: [PATCH] bcm63xx: enetsw: switch to netdev_alloc_skb_ip_align
+
+Increases packet processing performance by 30%.
+Tested on BCM6328 320 MHz and iperf3 -M 512 for packet/sec performance.
+
+Before:
+[ ID] Interval Transfer Bandwidth Retr
+[ 4] 0.00-30.00 sec 120 MBytes 33.7 Mbits/sec 277 sender
+[ 4] 0.00-30.00 sec 120 MBytes 33.5 Mbits/sec receiver
+
+After:
+[ ID] Interval Transfer Bandwidth Retr
+[ 4] 0.00-30.00 sec 155 MBytes 43.3 Mbits/sec 354 sender
+[ 4] 0.00-30.00 sec 154 MBytes 43.1 Mbits/sec receiver
+
+Signed-off-by: Sieng Piaw Liew <liew.s.piaw at gmail.com>
+---
+ drivers/net/ethernet/broadcom/bcm63xx_enet.c | 6 +++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+@@ -239,7 +239,10 @@ static int bcm_enet_refill_rx(struct net
+ desc = &priv->rx_desc_cpu[desc_idx];
+
+ if (!priv->rx_skb[desc_idx]) {
+- skb = netdev_alloc_skb(dev, priv->rx_skb_size);
++ if (priv->enet_is_sw)
++ skb = netdev_alloc_skb_ip_align(dev, priv->rx_skb_size);
++ else
++ skb = netdev_alloc_skb(dev, priv->rx_skb_size);
+ if (!skb)
+ break;
+ priv->rx_skb[desc_idx] = skb;
More information about the lede-commits
mailing list