patch 'net/hns3: optimize SVE Tx performance' has been queued to stable release 20.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 3 10:27:32 CET 2022
Hi,
FYI, your patch has been queued to stable release 20.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/af4494eb82d7da5ec8e219cf671cecc43ed45b1a
Thanks.
Luca Boccassi
---
>From af4494eb82d7da5ec8e219cf671cecc43ed45b1a Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Mon, 5 Sep 2022 16:59:35 +0800
Subject: [PATCH] net/hns3: optimize SVE Tx performance
[ upstream commit 12590fc503e967df1e6e34667682fbb27aed5364 ]
Optimize SVE xmit algorithm performance, will get about 1%+
performance gain under 64B macfwd.
Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
---
drivers/net/hns3/hns3_rxtx_vec_sve.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c
index e7446eb017..888008d73f 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c
+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c
@@ -384,10 +384,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq,
HNS3_UINT32_BIT;
svuint64_t base_addr, buf_iova, data_off, data_len, addr;
svuint64_t offsets = svindex_u64(0, BD_SIZE);
- uint32_t i = 0;
- svbool_t pg = svwhilelt_b64_u32(i, nb_pkts);
+ uint32_t cnt = svcntd();
+ svbool_t pg;
+ uint32_t i;
- do {
+ for (i = 0; i < nb_pkts; /* i is updated in the inner loop */) {
+ pg = svwhilelt_b64_u32(i, nb_pkts);
base_addr = svld1_u64(pg, (uint64_t *)pkts);
/* calc mbuf's field buf_iova address */
buf_iova = svadd_n_u64_z(pg, base_addr,
@@ -429,12 +431,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq,
offsets, svdup_n_u64(valid_bit));
/* update index for next loop */
- i += svcntd();
- pkts += svcntd();
- txdp += svcntd();
- tx_entry += svcntd();
- pg = svwhilelt_b64_u32(i, nb_pkts);
- } while (svptest_any(svptrue_b64(), pg));
+ i += cnt;
+ pkts += cnt;
+ txdp += cnt;
+ tx_entry += cnt;
+ }
}
static uint16_t
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-11-03 09:27:29.847558960 +0000
+++ 0074-net-hns3-optimize-SVE-Tx-performance.patch 2022-11-03 09:27:25.505424996 +0000
@@ -1 +1 @@
-From 12590fc503e967df1e6e34667682fbb27aed5364 Mon Sep 17 00:00:00 2001
+From af4494eb82d7da5ec8e219cf671cecc43ed45b1a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 12590fc503e967df1e6e34667682fbb27aed5364 ]
+
@@ -9,2 +10,0 @@
-Cc: stable at dpdk.org
-
@@ -17 +17 @@
-index f09a81dbd5..6f23ba674d 100644
+index e7446eb017..888008d73f 100644
@@ -20 +20 @@
-@@ -389,10 +389,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq,
+@@ -384,10 +384,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq,
@@ -36,2 +36,2 @@
-@@ -439,12 +441,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq,
- (svaddv_u64(pg, data_len) >> HNS3_UINT16_BIT);
+@@ -429,12 +431,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq,
+ offsets, svdup_n_u64(valid_bit));
More information about the stable
mailing list