* patch 'hash: fix GFNI implementation build with GCC 12' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
@ 2023-02-23 15:04 ` Kevin Traynor
2023-02-23 15:04 ` patch 'doc: fix dependency setup in l2fwd-cat example guide' " Kevin Traynor
` (96 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:04 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/47951ef1dc21882215a531472d055c58a7618cb0
Thanks.
Kevin
---
From 47951ef1dc21882215a531472d055c58a7618cb0 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 9 Jan 2023 11:03:37 +0100
Subject: [PATCH] hash: fix GFNI implementation build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit fe2c18a0a8b22703dec3add385a371ad819d7872 ]
On a system that has AVX512F and GFNI, compiling fails with:
In file included from /usr/lib/gcc/x86_64-redhat-linux/12/include/immintrin.h:71,
from /usr/lib/gcc/x86_64-redhat-linux/12/include/x86intrin.h:32,
from ../../../git/pub/dpdk.org/main/lib/eal/x86/include/rte_vect.h:31,
from ../../../git/pub/dpdk.org/main/lib/eal/x86/include/rte_memcpy.h:17,
from ../../../git/pub/dpdk.org/main/lib/mempool/rte_mempool.h:48,
from ../../../git/pub/dpdk.org/main/lib/mbuf/rte_mbuf.h:38,
from ../../../git/pub/dpdk.org/main/lib/net/rte_ip.h:33,
from ../../../git/pub/dpdk.org/main/lib/hash/rte_thash.h:25,
from ../../../git/pub/dpdk.org/main/lib/hash/rte_thash.c:7:
In function ‘_mm512_mask_permutexvar_epi8’,
inlined from ‘__rte_thash_gfni’ at
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:142:17,
inlined from ‘rte_thash_gfni’ at
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:182:20,
inlined from ‘rte_thash_adjust_tuple’ at
../../../git/pub/dpdk.org/main/lib/hash/rte_thash.c:784:11:
/usr/lib/gcc/x86_64-redhat-linux/12/include/avx512vbmiintrin.h:97:20:
error: ‘tuple_bytes’ may be used uninitialized [-Werror=maybe-uninitialized]
97 | return (__m512i) __builtin_ia32_permvarqi512_mask ((__v64qi) __B,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 | (__v64qi) __A,
| ~~~~~~~~~~~~~~
99 | (__v64qi) __W,
| ~~~~~~~~~~~~~~
100 | (__mmask64) __M);
| ~~~~~~~~~~~~~~~~
And:
In file included from ../../../git/pub/dpdk.org/main/lib/hash/rte_thash_gfni.h:17,
from ../../../git/pub/dpdk.org/main/lib/hash/rte_thash.h:27:
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:
In function ‘rte_thash_adjust_tuple’:
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:91:33:
note: ‘tuple_bytes’ was declared here
91 | __m512i vals, matrixes, tuple_bytes, tuple_bytes_2;
| ^~~~~~~~~~~
In function ‘_mm512_mask_permutexvar_epi8’,
inlined from ‘__rte_thash_gfni’ at
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:142:17,
inlined from ‘rte_thash_gfni’ at
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:182:20,
inlined from ‘rte_thash_adjust_tuple’ at
../../../git/pub/dpdk.org/main/lib/hash/rte_thash.c:784:11:
/usr/lib/gcc/x86_64-redhat-linux/12/include/avx512vbmiintrin.h:97:20:
error: ‘permute_mask’ may be used uninitialized [-Werror=maybe-uninitialized]
97 | return (__m512i) __builtin_ia32_permvarqi512_mask ((__v64qi) __B,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 | (__v64qi) __A,
| ~~~~~~~~~~~~~~
99 | (__v64qi) __W,
| ~~~~~~~~~~~~~~
100 | (__mmask64) __M);
| ~~~~~~~~~~~~~~~~
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:
In function ‘rte_thash_adjust_tuple’:
../../../git/pub/dpdk.org/main/lib/hash/rte_thash_x86_gfni.h:92:30:
note: ‘permute_mask’ was declared here
92 | __mmask64 load_mask, permute_mask, permute_mask_2;
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
Set those variables to 0.
Fixes: 4fd8c4cb0de1 ("hash: add new Toeplitz hash implementation")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/hash/rte_thash_x86_gfni.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/hash/rte_thash_x86_gfni.h b/lib/hash/rte_thash_x86_gfni.h
index 657b1862c3..0583f64793 100644
--- a/lib/hash/rte_thash_x86_gfni.h
+++ b/lib/hash/rte_thash_x86_gfni.h
@@ -88,6 +88,8 @@ __rte_thash_gfni(const uint64_t *mtrx, const uint8_t *tuple,
__m512i xor_acc = _mm512_setzero_si512();
__m512i perm_bytes = _mm512_setzero_si512();
- __m512i vals, matrixes, tuple_bytes, tuple_bytes_2;
- __mmask64 load_mask, permute_mask, permute_mask_2;
+ __m512i vals, matrixes, tuple_bytes_2;
+ __m512i tuple_bytes = _mm512_setzero_si512();
+ __mmask64 load_mask, permute_mask_2;
+ __mmask64 permute_mask = 0;
int chunk_len = 0, i = 0;
uint8_t mtrx_msk;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:23.930075333 +0000
+++ 0002-hash-fix-GFNI-implementation-build-with-GCC-12.patch 2023-02-23 14:46:23.695235704 +0000
@@ -1 +1 @@
-From fe2c18a0a8b22703dec3add385a371ad819d7872 Mon Sep 17 00:00:00 2001
+From 47951ef1dc21882215a531472d055c58a7618cb0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit fe2c18a0a8b22703dec3add385a371ad819d7872 ]
+
@@ -76 +77,0 @@
-Cc: stable@dpdk.org
@@ -85 +86 @@
-index 880739b710..7bb76ac1bb 100644
+index 657b1862c3..0583f64793 100644
@@ -88 +89 @@
-@@ -89,6 +89,8 @@ __rte_thash_gfni(const uint64_t *mtrx, const uint8_t *tuple,
+@@ -88,6 +88,8 @@ __rte_thash_gfni(const uint64_t *mtrx, const uint8_t *tuple,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'doc: fix dependency setup in l2fwd-cat example guide' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
2023-02-23 15:04 ` patch 'hash: fix GFNI implementation build with GCC 12' " Kevin Traynor
@ 2023-02-23 15:04 ` Kevin Traynor
2023-02-23 15:04 ` patch 'devtools: fix escaped space in grep pattern' " Kevin Traynor
` (95 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:04 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/71d0f78adf9b887c3ad1914faf68c406da6ac9af
Thanks.
Kevin
---
From 71d0f78adf9b887c3ad1914faf68c406da6ac9af Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 30 Dec 2022 21:52:15 +0100
Subject: [PATCH] doc: fix dependency setup in l2fwd-cat example guide
[ upstream commit 8c8bb7f04dfcb50140a508f883e1129e0bb185ba ]
The environment variable PQOS_INSTALL_PATH is not used anymore,
but the documentation was not updated.
Fixes: fda34680eb9a ("examples: remove legacy sections of makefiles")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
doc/guides/sample_app_ug/l2_forward_cat.rst | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/doc/guides/sample_app_ug/l2_forward_cat.rst b/doc/guides/sample_app_ug/l2_forward_cat.rst
index 3ada3575ba..51621b692f 100644
--- a/doc/guides/sample_app_ug/l2_forward_cat.rst
+++ b/doc/guides/sample_app_ug/l2_forward_cat.rst
@@ -51,11 +51,10 @@ Compiling the Application
-#. To compile the application export the path to PQoS lib
- and the DPDK source tree and go to the example directory:
+To compile the application, export the path to PQoS lib:
- .. code-block:: console
-
- export PQOS_INSTALL_PATH=/path/to/libpqos
+.. code-block:: console
+ export CFLAGS=-I/path/to/intel-cmt-cat/include
+ export LDFLAGS=-L/path/to/intel-cmt-cat/lib
To compile the sample application see :doc:`compiling`.
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:23.952109864 +0000
+++ 0003-doc-fix-dependency-setup-in-l2fwd-cat-example-guide.patch 2023-02-23 14:46:23.696235708 +0000
@@ -1 +1 @@
-From 8c8bb7f04dfcb50140a508f883e1129e0bb185ba Mon Sep 17 00:00:00 2001
+From 71d0f78adf9b887c3ad1914faf68c406da6ac9af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c8bb7f04dfcb50140a508f883e1129e0bb185ba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'devtools: fix escaped space in grep pattern' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
2023-02-23 15:04 ` patch 'hash: fix GFNI implementation build with GCC 12' " Kevin Traynor
2023-02-23 15:04 ` patch 'doc: fix dependency setup in l2fwd-cat example guide' " Kevin Traynor
@ 2023-02-23 15:04 ` Kevin Traynor
2023-02-23 15:04 ` patch 'app/crypto-perf: fix number of segments' " Kevin Traynor
` (94 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:04 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/17817f916b5c83d3475a9ada7d6c58484e7e01f3
Thanks.
Kevin
---
From 17817f916b5c83d3475a9ada7d6c58484e7e01f3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 10 Jan 2023 22:23:27 +0100
Subject: [PATCH] devtools: fix escaped space in grep pattern
[ upstream commit 7f6b150cb79dad10b82fe004e5b2310e39507381 ]
Since grep 3.8, a warning is printed if a space is escaped in a pattern:
grep: warning: stray \ before white space
There was an occurence of such extra backslash in check-git-log.sh.
Fixes: d448efa259e9 ("devtools: export dictionary for commit title check")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
devtools/check-git-log.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 23c6a7d9bb..cfdc7f63a6 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -120,5 +120,5 @@ for word in $(cat $words); do
bad=$(echo "$headlines" | grep -iw $word | grep -vw $word)
if [ "$word" = "Tx" ]; then
- bad=$(echo $bad | grep -v 'OCTEON\ TX')
+ bad=$(echo $bad | grep -v 'OCTEON TX')
fi
for bad_line in $bad; do
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:23.973505951 +0000
+++ 0004-devtools-fix-escaped-space-in-grep-pattern.patch 2023-02-23 14:46:23.697235712 +0000
@@ -1 +1 @@
-From 7f6b150cb79dad10b82fe004e5b2310e39507381 Mon Sep 17 00:00:00 2001
+From 17817f916b5c83d3475a9ada7d6c58484e7e01f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7f6b150cb79dad10b82fe004e5b2310e39507381 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 01d8aa0717..e26205814b 100755
+index 23c6a7d9bb..cfdc7f63a6 100755
@@ -24 +25 @@
-@@ -121,5 +121,5 @@ for word in $(cat $words); do
+@@ -120,5 +120,5 @@ for word in $(cat $words); do
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/crypto-perf: fix number of segments' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (2 preceding siblings ...)
2023-02-23 15:04 ` patch 'devtools: fix escaped space in grep pattern' " Kevin Traynor
@ 2023-02-23 15:04 ` Kevin Traynor
2023-02-23 15:04 ` patch 'app/crypto-perf: fix SPI zero' " Kevin Traynor
` (93 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:04 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/d734fcf15cda3727a9c88f232d77a9fcd3dbc3a4
Thanks.
Kevin
---
From d734fcf15cda3727a9c88f232d77a9fcd3dbc3a4 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Tue, 20 Dec 2022 10:25:33 +0530
Subject: [PATCH] app/crypto-perf: fix number of segments
[ upstream commit e03ecc56edd72acb077e2b9bb95ae34f54172a0c ]
When segment size is provided, the total number of segments would be
calculated. Segment size updates due to headroom/tailroom need to be
accounted for when determining total number of segments required.
Fixes: c1670ae0022b ("app/crypto-perf: honour min headroom/tailroom")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_test_common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 97a1ea47ad..5a65e11ba7 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -199,7 +199,9 @@ cperf_alloc_common_memory(const struct cperf_options *options,
uint32_t mbuf_size = sizeof(struct rte_mbuf) + options->segment_sz;
uint32_t max_size = options->max_buffer_size + options->digest_sz;
- uint16_t segments_nb = (max_size % options->segment_sz) ?
- (max_size / options->segment_sz) + 1 :
- max_size / options->segment_sz;
+ uint32_t segment_data_len = options->segment_sz - options->headroom_sz -
+ options->tailroom_sz;
+ uint16_t segments_nb = (max_size % segment_data_len) ?
+ (max_size / segment_data_len) + 1 :
+ (max_size / segment_data_len);
uint32_t obj_size = crypto_op_total_size_padded +
(mbuf_size * segments_nb);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:23.994910479 +0000
+++ 0005-app-crypto-perf-fix-number-of-segments.patch 2023-02-23 14:46:23.698235715 +0000
@@ -1 +1 @@
-From e03ecc56edd72acb077e2b9bb95ae34f54172a0c Mon Sep 17 00:00:00 2001
+From d734fcf15cda3727a9c88f232d77a9fcd3dbc3a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e03ecc56edd72acb077e2b9bb95ae34f54172a0c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 27646cd619..932aab16df 100644
+index 97a1ea47ad..5a65e11ba7 100644
@@ -23 +24 @@
-@@ -198,7 +198,9 @@ cperf_alloc_common_memory(const struct cperf_options *options,
+@@ -199,7 +199,9 @@ cperf_alloc_common_memory(const struct cperf_options *options,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/crypto-perf: fix SPI zero' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (3 preceding siblings ...)
2023-02-23 15:04 ` patch 'app/crypto-perf: fix number of segments' " Kevin Traynor
@ 2023-02-23 15:04 ` Kevin Traynor
2023-02-23 15:04 ` patch 'app/crypto-perf: fix IPsec direction' " Kevin Traynor
` (92 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:04 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/b2d5a49ce6f1825f79f12c3cc42f6b18e18595fb
Thanks.
Kevin
---
From b2d5a49ce6f1825f79f12c3cc42f6b18e18595fb Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Mon, 2 Jan 2023 17:16:54 +0530
Subject: [PATCH] app/crypto-perf: fix SPI zero
[ upstream commit 2218e0780f22519a5be2ef97c80c37798c797857 ]
As per IPsec specification (RFC 4303) SPI zero is reserved. Using
lcore_id directly would mean SPI 0 would also be attempted. This may
lead to failure on an otherwise compliant implementation.
Fixes: 28dde5da503e ("app/crypto-perf: support lookaside IPsec")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index d975ae1ab8..3b8b97b043 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -691,5 +691,5 @@ create_ipsec_session(struct rte_mempool *sess_mp,
.protocol = RTE_SECURITY_PROTOCOL_IPSEC,
{.ipsec = {
- .spi = rte_lcore_id(),
+ .spi = rte_lcore_id() + 1,
/**< For testing sake, lcore_id is taken as SPI so that
* for every core a different session is created.
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.016772271 +0000
+++ 0006-app-crypto-perf-fix-SPI-zero.patch 2023-02-23 14:46:23.700235722 +0000
@@ -1 +1 @@
-From 2218e0780f22519a5be2ef97c80c37798c797857 Mon Sep 17 00:00:00 2001
+From b2d5a49ce6f1825f79f12c3cc42f6b18e18595fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2218e0780f22519a5be2ef97c80c37798c797857 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 61a3967697..4a1c9feb1c 100644
+index d975ae1ab8..3b8b97b043 100644
@@ -23 +24 @@
-@@ -723,5 +723,5 @@ create_ipsec_session(struct rte_mempool *sess_mp,
+@@ -691,5 +691,5 @@ create_ipsec_session(struct rte_mempool *sess_mp,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/crypto-perf: fix IPsec direction' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (4 preceding siblings ...)
2023-02-23 15:04 ` patch 'app/crypto-perf: fix SPI zero' " Kevin Traynor
@ 2023-02-23 15:04 ` Kevin Traynor
2023-02-23 15:04 ` patch 'eventdev/eth_tx: fix devices loop' " Kevin Traynor
` (91 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:04 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/a66803521710012213535e8e0f66508e14ed6501
Thanks.
Kevin
---
From a66803521710012213535e8e0f66508e14ed6501 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Mon, 2 Jan 2023 17:16:55 +0530
Subject: [PATCH] app/crypto-perf: fix IPsec direction
[ upstream commit 212304008255fa3aa9d380d912488e4552ea7c68 ]
The default value of options->auth_op & options->cipher_op are such that
an unconditional check for the same would always return true. Hence, the
direction is always determined to be outbound/egress.
The field options->aead_algo should be checked prior to checking above
fields. Since the same check would be required in datapath, introduce a
new flag in options for the same.
Fixes: 28dde5da503e ("app/crypto-perf: support lookaside IPsec")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_ops.c | 35 +++++++++++---------
app/test-crypto-perf/cperf_options.h | 1 +
app/test-crypto-perf/cperf_options_parsing.c | 15 +++++++++
3 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 3b8b97b043..698c44ed30 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -44,6 +44,5 @@ test_ipsec_vec_populate(struct rte_mbuf *m, const struct cperf_options *options,
struct rte_ipv4_hdr *ip = rte_pktmbuf_mtod(m, struct rte_ipv4_hdr *);
- if ((options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) ||
- (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)) {
+ if (options->is_outbound) {
memcpy(ip, test_vector->plaintext.data, m->data_len);
@@ -614,6 +613,7 @@ create_ipsec_session(struct rte_mempool *sess_mp,
uint16_t iv_offset)
{
- struct rte_crypto_sym_xform xform = {0};
struct rte_crypto_sym_xform auth_xform = {0};
+ struct rte_crypto_sym_xform *crypto_xform;
+ struct rte_crypto_sym_xform xform = {0};
if (options->aead_algo != 0) {
@@ -629,8 +629,8 @@ create_ipsec_session(struct rte_mempool *sess_mp,
xform.aead.digest_length = options->digest_sz;
xform.aead.aad_length = options->aead_aad_sz;
+ crypto_xform = &xform;
} else if (options->cipher_algo != 0 && options->auth_algo != 0) {
/* Setup Cipher Parameters */
xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
- xform.next = NULL;
xform.cipher.algo = options->cipher_algo;
xform.cipher.op = options->cipher_op;
@@ -649,5 +649,4 @@ create_ipsec_session(struct rte_mempool *sess_mp,
/* Setup Auth Parameters */
auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
- auth_xform.next = NULL;
auth_xform.auth.algo = options->auth_algo;
auth_xform.auth.op = options->auth_op;
@@ -668,5 +667,13 @@ create_ipsec_session(struct rte_mempool *sess_mp,
}
- xform.next = &auth_xform;
+ if (options->is_outbound) {
+ crypto_xform = &xform;
+ xform.next = &auth_xform;
+ auth_xform.next = NULL;
+ } else {
+ crypto_xform = &auth_xform;
+ auth_xform.next = &xform;
+ xform.next = NULL;
+ }
} else {
return NULL;
@@ -698,13 +705,4 @@ create_ipsec_session(struct rte_mempool *sess_mp,
.options = { 0 },
.replay_win_sz = 0,
- .direction =
- ((options->cipher_op ==
- RTE_CRYPTO_CIPHER_OP_ENCRYPT) &&
- (options->auth_op ==
- RTE_CRYPTO_AUTH_OP_GENERATE)) ||
- (options->aead_op ==
- RTE_CRYPTO_AEAD_OP_ENCRYPT) ?
- RTE_SECURITY_IPSEC_SA_DIR_EGRESS :
- RTE_SECURITY_IPSEC_SA_DIR_INGRESS,
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
@@ -712,7 +710,12 @@ create_ipsec_session(struct rte_mempool *sess_mp,
} },
.userdata = NULL,
- .crypto_xform = &xform
+ .crypto_xform = crypto_xform,
};
+ if (options->is_outbound)
+ sess_conf.ipsec.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS;
+ else
+ sess_conf.ipsec.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS;
+
struct rte_security_ctx *ctx = (struct rte_security_ctx *)
rte_cryptodev_get_sec_ctx(dev_id);
diff --git a/app/test-crypto-perf/cperf_options.h b/app/test-crypto-perf/cperf_options.h
index 031b238b20..5533b2e6fb 100644
--- a/app/test-crypto-perf/cperf_options.h
+++ b/app/test-crypto-perf/cperf_options.h
@@ -104,4 +104,5 @@ struct cperf_options {
uint32_t silent:1;
uint32_t csv:1;
+ uint32_t is_outbound:1;
enum rte_crypto_cipher_algorithm cipher_algo;
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 59a9dc596a..0858640723 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -1249,4 +1249,19 @@ cperf_options_check(struct cperf_options *options)
return -EINVAL;
}
+
+ if (options->op_type == CPERF_IPSEC) {
+ if (options->aead_algo) {
+ if (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT)
+ options->is_outbound = 1;
+ else
+ options->is_outbound = 0;
+ } else {
+ if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT &&
+ options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
+ options->is_outbound = 1;
+ else
+ options->is_outbound = 0;
+ }
+ }
#endif
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.038725011 +0000
+++ 0007-app-crypto-perf-fix-IPsec-direction.patch 2023-02-23 14:46:23.704235736 +0000
@@ -1 +1 @@
-From 212304008255fa3aa9d380d912488e4552ea7c68 Mon Sep 17 00:00:00 2001
+From a66803521710012213535e8e0f66508e14ed6501 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 212304008255fa3aa9d380d912488e4552ea7c68 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 4a1c9feb1c..93b9bfb240 100644
+index 3b8b97b043..698c44ed30 100644
@@ -29 +30 @@
-@@ -43,6 +43,5 @@ test_ipsec_vec_populate(struct rte_mbuf *m, const struct cperf_options *options,
+@@ -44,6 +44,5 @@ test_ipsec_vec_populate(struct rte_mbuf *m, const struct cperf_options *options,
@@ -35,3 +36,3 @@
- memcpy(ip, test_vector->plaintext.data,
- sizeof(struct rte_ipv4_hdr));
-@@ -646,6 +645,7 @@ create_ipsec_session(struct rte_mempool *sess_mp,
+ memcpy(ip, test_vector->plaintext.data, m->data_len);
+
+@@ -614,6 +613,7 @@ create_ipsec_session(struct rte_mempool *sess_mp,
@@ -46 +47 @@
-@@ -661,8 +661,8 @@ create_ipsec_session(struct rte_mempool *sess_mp,
+@@ -629,8 +629,8 @@ create_ipsec_session(struct rte_mempool *sess_mp,
@@ -56 +57 @@
-@@ -681,5 +681,4 @@ create_ipsec_session(struct rte_mempool *sess_mp,
+@@ -649,5 +649,4 @@ create_ipsec_session(struct rte_mempool *sess_mp,
@@ -62 +63 @@
-@@ -700,5 +699,13 @@ create_ipsec_session(struct rte_mempool *sess_mp,
+@@ -668,5 +667,13 @@ create_ipsec_session(struct rte_mempool *sess_mp,
@@ -77 +78 @@
-@@ -730,13 +737,4 @@ create_ipsec_session(struct rte_mempool *sess_mp,
+@@ -698,13 +705,4 @@ create_ipsec_session(struct rte_mempool *sess_mp,
@@ -91 +92 @@
-@@ -744,7 +742,12 @@ create_ipsec_session(struct rte_mempool *sess_mp,
+@@ -712,7 +710,12 @@ create_ipsec_session(struct rte_mempool *sess_mp,
@@ -106 +107 @@
-index 613d6d31e2..6966e0b286 100644
+index 031b238b20..5533b2e6fb 100644
@@ -109 +110 @@
-@@ -106,4 +106,5 @@ struct cperf_options {
+@@ -104,4 +104,5 @@ struct cperf_options {
@@ -116 +117 @@
-index bc5e312c81..cb91bcc3c5 100644
+index 59a9dc596a..0858640723 100644
@@ -119 +120 @@
-@@ -1319,4 +1319,19 @@ cperf_options_check(struct cperf_options *options)
+@@ -1249,4 +1249,19 @@ cperf_options_check(struct cperf_options *options)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'eventdev/eth_tx: fix devices loop' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (5 preceding siblings ...)
2023-02-23 15:04 ` patch 'app/crypto-perf: fix IPsec direction' " Kevin Traynor
@ 2023-02-23 15:04 ` Kevin Traynor
2023-02-23 15:05 ` patch 'crypto/qat: fix stream cipher direction' " Kevin Traynor
` (90 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:04 UTC (permalink / raw)
To: Naga Harish K S V; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/98f5f642407b7312d4d805a5d85dc80a80e423a7
Thanks.
Kevin
---
From 98f5f642407b7312d4d805a5d85dc80a80e423a7 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Sat, 7 Jan 2023 10:40:58 -0600
Subject: [PATCH] eventdev/eth_tx: fix devices loop
[ upstream commit a870c7e863a5996eb842befa30c6a7d3f9729fcf ]
Adapter service function is using RTE_ETH_FOREACH_DEV() macro for
looping through all available eth devices and flushing any pending
buffered packets.
When Traffic Management nodes (vports) are added and deleted dynamically,
there is a possibility of accessing the device info memory beyond the
allocated limit which can result in segfaults. Fixed the logic to
prevent illegal memory access.
Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
---
lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 72e58974a8..971b4024db 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -629,5 +629,5 @@ txa_service_func(void *args)
uint16_t q;
- if (i == txa->dev_count)
+ if (i >= txa->dev_count)
break;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.061524045 +0000
+++ 0008-eventdev-eth_tx-fix-devices-loop.patch 2023-02-23 14:46:23.706235743 +0000
@@ -1 +1 @@
-From a870c7e863a5996eb842befa30c6a7d3f9729fcf Mon Sep 17 00:00:00 2001
+From 98f5f642407b7312d4d805a5d85dc80a80e423a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a870c7e863a5996eb842befa30c6a7d3f9729fcf ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index c780ee1264..6e9bcb1b79 100644
+index 72e58974a8..971b4024db 100644
@@ -27 +28 @@
-@@ -679,5 +679,5 @@ txa_service_func(void *args)
+@@ -629,5 +629,5 @@ txa_service_func(void *args)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'crypto/qat: fix stream cipher direction' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (6 preceding siblings ...)
2023-02-23 15:04 ` patch 'eventdev/eth_tx: fix devices loop' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'fbarray: fix metadata dump' " Kevin Traynor
` (89 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Ciara Power; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/e8f2aab7688ca39daa5d3aafee478f6050a5a691
Thanks.
Kevin
---
From e8f2aab7688ca39daa5d3aafee478f6050a5a691 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 21 Dec 2022 14:05:55 +0000
Subject: [PATCH] crypto/qat: fix stream cipher direction
[ upstream commit 96ef7feb7a63ee74a99e221d255d91e8af3cf196 ]
Stream ciphers use ENCRYPT mode in HW for both encryption and
decryption operations. This patch adds in an overwrite to always set
ENCRYPT mode for these algorithms.
Fixes: d9b7d5bbc845 ("crypto/qat: add ZUC EEA3/EIA3 capability")
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
drivers/crypto/qat/qat_sym_session.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index f269e8992b..eae08f65d1 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1629,7 +1629,8 @@ int qat_sym_cd_cipher_set(struct qat_sym_session *cdesc,
} else if (cdesc->qat_cipher_alg == ICP_QAT_HW_CIPHER_ALGO_SNOW_3G_UEA2
|| cdesc->qat_cipher_alg ==
- ICP_QAT_HW_CIPHER_ALGO_ZUC_3G_128_EEA3)
+ ICP_QAT_HW_CIPHER_ALGO_ZUC_3G_128_EEA3) {
key_convert = ICP_QAT_HW_CIPHER_KEY_CONVERT;
- else if (cdesc->qat_dir == ICP_QAT_HW_CIPHER_ENCRYPT)
+ cdesc->qat_dir = ICP_QAT_HW_CIPHER_ENCRYPT;
+ } else if (cdesc->qat_dir == ICP_QAT_HW_CIPHER_ENCRYPT)
key_convert = ICP_QAT_HW_CIPHER_NO_CONVERT;
else if (cdesc->qat_mode == ICP_QAT_HW_CIPHER_AEAD_MODE)
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.083851460 +0000
+++ 0009-crypto-qat-fix-stream-cipher-direction.patch 2023-02-23 14:46:23.709235753 +0000
@@ -1 +1 @@
-From 96ef7feb7a63ee74a99e221d255d91e8af3cf196 Mon Sep 17 00:00:00 2001
+From e8f2aab7688ca39daa5d3aafee478f6050a5a691 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 96ef7feb7a63ee74a99e221d255d91e8af3cf196 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ea1b729076..978ee49dce 100644
+index f269e8992b..eae08f65d1 100644
@@ -22 +23 @@
-@@ -1885,7 +1885,8 @@ int qat_sym_cd_cipher_set(struct qat_sym_session *cdesc,
+@@ -1629,7 +1629,8 @@ int qat_sym_cd_cipher_set(struct qat_sym_session *cdesc,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'fbarray: fix metadata dump' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (7 preceding siblings ...)
2023-02-23 15:05 ` patch 'crypto/qat: fix stream cipher direction' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'gpudev: fix deadlocks when registering callback' " Kevin Traynor
` (88 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/9a43ba896c3d27adde4b7216cb1e8df7d82f3f19
Thanks.
Kevin
---
From 9a43ba896c3d27adde4b7216cb1e8df7d82f3f19 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 3 Jan 2023 11:48:48 +0100
Subject: [PATCH] fbarray: fix metadata dump
[ upstream commit 70eb4069b05c82494155a89eb8d08d8d2f57b059 ]
If the passed fbarray is invalid, its lock was not taken before
releasing.
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/eal/common/eal_common_fbarray.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 3a28a53247..5903474355 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -1486,5 +1486,5 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)
if (fully_validate(arr->name, arr->elt_sz, arr->len)) {
fprintf(f, "Invalid file-backed array\n");
- goto out;
+ return;
}
@@ -1500,5 +1500,4 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)
for (i = 0; i < msk->n_masks; i++)
fprintf(f, "msk idx %i: 0x%016" PRIx64 "\n", i, msk->data[i]);
-out:
rte_rwlock_read_unlock(&arr->rwlock);
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.107159005 +0000
+++ 0010-fbarray-fix-metadata-dump.patch 2023-02-23 14:46:23.711235760 +0000
@@ -1 +1 @@
-From 70eb4069b05c82494155a89eb8d08d8d2f57b059 Mon Sep 17 00:00:00 2001
+From 9a43ba896c3d27adde4b7216cb1e8df7d82f3f19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 70eb4069b05c82494155a89eb8d08d8d2f57b059 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f11f87979f..169e66e04b 100644
+index 3a28a53247..5903474355 100644
@@ -21 +22 @@
-@@ -1483,5 +1483,5 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)
+@@ -1486,5 +1486,5 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)
@@ -28 +29 @@
-@@ -1497,5 +1497,4 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)
+@@ -1500,5 +1500,4 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'gpudev: fix deadlocks when registering callback' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (8 preceding siblings ...)
2023-02-23 15:05 ` patch 'fbarray: fix metadata dump' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'graph: fix node shrink' " Kevin Traynor
` (87 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: David Marchand; +Cc: Elena Agostini, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/868b1b71dfe1054b442c71329c6c939e8edaafd9
Thanks.
Kevin
---
From 868b1b71dfe1054b442c71329c6c939e8edaafd9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 3 Jan 2023 11:49:00 +0100
Subject: [PATCH] gpudev: fix deadlocks when registering callback
[ upstream commit 75d75530072e95a56799f0a8af261fc2eaf564ab ]
gpu_callback_lock was not released in some branches of the register
helper.
While at it, set rte_errno in one of those branches.
Fixes: 18cb07563165 ("gpudev: add event notification")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Elena Agostini <eagostini@nvidia.com>
---
lib/gpudev/gpudev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c
index 9ae36dbae9..6a549ee08e 100644
--- a/lib/gpudev/gpudev.c
+++ b/lib/gpudev/gpudev.c
@@ -408,4 +408,5 @@ rte_gpu_callback_register(int16_t dev_id, enum rte_gpu_event event,
callback->user_data == user_data) {
GPU_LOG(INFO, "callback already registered");
+ rte_rwlock_write_unlock(&gpu_callback_lock);
return 0;
}
@@ -415,5 +416,7 @@ rte_gpu_callback_register(int16_t dev_id, enum rte_gpu_event event,
if (callback == NULL) {
GPU_LOG(ERR, "cannot allocate callback");
- return -ENOMEM;
+ rte_rwlock_write_unlock(&gpu_callback_lock);
+ rte_errno = ENOMEM;
+ return -rte_errno;
}
callback->function = function;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.129206525 +0000
+++ 0011-gpudev-fix-deadlocks-when-registering-callback.patch 2023-02-23 14:46:23.712235764 +0000
@@ -1 +1 @@
-From 75d75530072e95a56799f0a8af261fc2eaf564ab Mon Sep 17 00:00:00 2001
+From 868b1b71dfe1054b442c71329c6c939e8edaafd9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75d75530072e95a56799f0a8af261fc2eaf564ab ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 805719d00c..8f12abef23 100644
+index 9ae36dbae9..6a549ee08e 100644
@@ -23 +24 @@
-@@ -409,4 +409,5 @@ rte_gpu_callback_register(int16_t dev_id, enum rte_gpu_event event,
+@@ -408,4 +408,5 @@ rte_gpu_callback_register(int16_t dev_id, enum rte_gpu_event event,
@@ -29 +30 @@
-@@ -416,5 +417,7 @@ rte_gpu_callback_register(int16_t dev_id, enum rte_gpu_event event,
+@@ -415,5 +416,7 @@ rte_gpu_callback_register(int16_t dev_id, enum rte_gpu_event event,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'graph: fix node shrink' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (9 preceding siblings ...)
2023-02-23 15:05 ` patch 'gpudev: fix deadlocks when registering callback' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/nfp: fix firmware name derived from PCI name' " Kevin Traynor
` (86 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: David Marchand; +Cc: Kiran Kumar K, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/e4609ddf51b496f1f60c26fb8a2581b9f4ea7189
Thanks.
Kevin
---
From e4609ddf51b496f1f60c26fb8a2581b9f4ea7189 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 19 Jan 2023 11:32:34 +0100
Subject: [PATCH] graph: fix node shrink
[ upstream commit 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 ]
If the node id check failed, graph_lock was not taken before releasing.
Fixes: c59dac2ca14a ("graph: implement node operations")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
lib/graph/node.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/graph/node.c b/lib/graph/node.c
index 86ec4316f9..b7b83f761c 100644
--- a/lib/graph/node.c
+++ b/lib/graph/node.c
@@ -305,14 +305,14 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
if (node->nb_edges < size) {
rte_errno = E2BIG;
- goto fail;
+ } else {
+ node->nb_edges = size;
+ rc = size;
}
- node->nb_edges = size;
- rc = size;
break;
}
}
-fail:
graph_spinlock_unlock();
+fail:
return rc;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.150864486 +0000
+++ 0012-graph-fix-node-shrink.patch 2023-02-23 14:46:23.712235764 +0000
@@ -1 +1 @@
-From 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 Mon Sep 17 00:00:00 2001
+From e4609ddf51b496f1f60c26fb8a2581b9f4ea7189 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99cc0a9ab6730d4df70dba4b19e78e87ad7ba110 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fc6345de07..149414dcd9 100644
+index 86ec4316f9..b7b83f761c 100644
@@ -22 +23 @@
-@@ -301,14 +301,14 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
+@@ -305,14 +305,14 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/nfp: fix firmware name derived from PCI name' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (10 preceding siblings ...)
2023-02-23 15:05 ` patch 'graph: fix node shrink' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: fix inaccurate RTC time to read' " Kevin Traynor
` (85 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Peng Zhang; +Cc: Chaoyong He, Niklas Söderlund, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/d13acd65cc5f8e17e5ab0474c114f2c5b7920645
Thanks.
Kevin
---
From d13acd65cc5f8e17e5ab0474c114f2c5b7920645 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Thu, 8 Dec 2022 11:31:16 +0800
Subject: [PATCH] net/nfp: fix firmware name derived from PCI name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 3ddb4cc0914a13d6dd47a497c1f61919b3ed1c20 ]
Driver looks for a firmware file whose name is derived from the PCI
name, the firmware file name format is described in the driver document.
But the firmware name used in the code is slightly different than the
name in documentation,
document has 'pci-0000:04:00.0.nffw' vs code has 'pci-04:00.0.nffw'.
After this commit, driver will look for firmware file consistent with
what is documented (in nfp.rst).
Fixes: 896c265ef954 ("net/nfp: use new CPP interface")
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/nfp/nfp_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 74f4c1edeb..8f922e4465 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -637,5 +637,5 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
/* Then try the PCI name */
snprintf(fw_name, sizeof(fw_name), "%s/pci-%s.nffw", DEFAULT_FW_PATH,
- dev->device.name);
+ dev->name);
PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.172478314 +0000
+++ 0013-net-nfp-fix-firmware-name-derived-from-PCI-name.patch 2023-02-23 14:46:23.714235771 +0000
@@ -1 +1 @@
-From 3ddb4cc0914a13d6dd47a497c1f61919b3ed1c20 Mon Sep 17 00:00:00 2001
+From d13acd65cc5f8e17e5ab0474c114f2c5b7920645 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3ddb4cc0914a13d6dd47a497c1f61919b3ed1c20 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 0956ea81df..f22ae24b53 100644
+index 74f4c1edeb..8f922e4465 100644
@@ -34 +35 @@
-@@ -725,5 +725,5 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
+@@ -637,5 +637,5 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: fix inaccurate RTC time to read' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (11 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/nfp: fix firmware name derived from PCI name' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'app/testpmd: fix interactive mode with no ports' " Kevin Traynor
` (84 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/f43191608a6ed14b030696e008187217f5476357
Thanks.
Kevin
---
From f43191608a6ed14b030696e008187217f5476357 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 9 Jan 2023 16:23:44 +0800
Subject: [PATCH] net/hns3: fix inaccurate RTC time to read
[ upstream commit 6170abd5c0cc3d8cf4e358c4200ed7737d639d10 ]
The sequence of reading current RTC time register doesn't meet
the hardware requirements, which causes this time obtained is
the one before modifying RTC time.
Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ptp.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 6bbd85ba23..db3c007b12 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -217,5 +217,9 @@ int
hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
{
+#define HNS3_PTP_SEC_H_OFFSET 32
+#define HNS3_PTP_SEC_H_MASK 0xFFFF
+
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ uint32_t sec_hi, sec_lo;
uint64_t ns, sec;
@@ -223,9 +227,9 @@ hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
return -ENOTSUP;
- sec = hns3_read_dev(hw, HNS3_CURR_TIME_OUT_L);
- sec |= (uint64_t)(hns3_read_dev(hw, HNS3_CURR_TIME_OUT_H) & 0xFFFF)
- << 32;
-
ns = hns3_read_dev(hw, HNS3_CURR_TIME_OUT_NS);
+ sec_hi = hns3_read_dev(hw, HNS3_CURR_TIME_OUT_H) & HNS3_PTP_SEC_H_MASK;
+ sec_lo = hns3_read_dev(hw, HNS3_CURR_TIME_OUT_L);
+ sec = ((uint64_t)sec_hi << HNS3_PTP_SEC_H_OFFSET) | sec_lo;
+
ns += sec * NSEC_PER_SEC;
*ts = rte_ns_to_timespec(ns);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.194725863 +0000
+++ 0014-net-hns3-fix-inaccurate-RTC-time-to-read.patch 2023-02-23 14:46:23.714235771 +0000
@@ -1 +1 @@
-From 6170abd5c0cc3d8cf4e358c4200ed7737d639d10 Mon Sep 17 00:00:00 2001
+From f43191608a6ed14b030696e008187217f5476357 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6170abd5c0cc3d8cf4e358c4200ed7737d639d10 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/testpmd: fix interactive mode with no ports' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (12 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: fix inaccurate RTC time to read' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'telemetry: move include after guard' " Kevin Traynor
` (83 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/f6a5384a93f14bf104ebc5244f68a9f503f229f0
Thanks.
Kevin
---
From f6a5384a93f14bf104ebc5244f68a9f503f229f0 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 19 Jan 2023 19:45:59 +0200
Subject: [PATCH] app/testpmd: fix interactive mode with no ports
[ upstream commit 7e40372522c5a129da616d1420ff582968b81b46 ]
Testpmd terminated unconditionally if it failed to start all ports.
The patch allows testpmd to get into the command line,
if the interactive mode was requested.
Fixes: 6937d2103e22 ("app/testpmd: add option to not start device")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
app/test-pmd/testpmd.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index ce8fd3d7d3..f1daa6e09d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -4377,6 +4377,11 @@ main(int argc, char** argv)
}
- if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
- rte_exit(EXIT_FAILURE, "Start ports failed\n");
+ if (!no_device_start && start_port(RTE_PORT_ALL) != 0) {
+ if (!interactive) {
+ rte_eal_cleanup();
+ rte_exit(EXIT_FAILURE, "Start ports failed\n");
+ }
+ fprintf(stderr, "Start ports failed\n");
+ }
/* set all ports to promiscuous mode by default */
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.216104344 +0000
+++ 0015-app-testpmd-fix-interactive-mode-with-no-ports.patch 2023-02-23 14:46:23.718235785 +0000
@@ -1 +1 @@
-From 7e40372522c5a129da616d1420ff582968b81b46 Mon Sep 17 00:00:00 2001
+From f6a5384a93f14bf104ebc5244f68a9f503f229f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7e40372522c5a129da616d1420ff582968b81b46 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 134d79a555..e366f81a0f 100644
+index ce8fd3d7d3..f1daa6e09d 100644
@@ -24 +25 @@
-@@ -4484,6 +4484,11 @@ main(int argc, char** argv)
+@@ -4377,6 +4377,11 @@ main(int argc, char** argv)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'telemetry: move include after guard' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (13 preceding siblings ...)
2023-02-23 15:05 ` patch 'app/testpmd: fix interactive mode with no ports' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'ethdev: fix telemetry data truncation' " Kevin Traynor
` (82 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li
Cc: Morten Brørup, Chengwen Feng, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/005b23b18fba1259847ace67251edd09367e3a69
Thanks.
Kevin
---
From 005b23b18fba1259847ace67251edd09367e3a69 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 19 Dec 2022 15:06:41 +0800
Subject: [PATCH] telemetry: move include after guard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit f7b74387be1de6803716262d7988794accd6d39f ]
The "stdint.h" header is outside '_RTE_TELEMETRY_H_' macro, which cause
this header is unconditional. So this patch moves this header to inside
'_RTE_TELEMETRY_H_'.
Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/telemetry/rte_telemetry.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index 3372b32f38..0f24579235 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -3,8 +3,4 @@
*/
-#include <stdint.h>
-
-#include <rte_compat.h>
-
#ifndef _RTE_TELEMETRY_H_
#define _RTE_TELEMETRY_H_
@@ -14,4 +10,8 @@ extern "C" {
#endif
+#include <stdint.h>
+
+#include <rte_compat.h>
+
/** Maximum length for string used in object. */
#define RTE_TEL_MAX_STRING_LEN 128
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.241707489 +0000
+++ 0016-telemetry-move-include-after-guard.patch 2023-02-23 14:46:23.719235788 +0000
@@ -1 +1 @@
-From f7b74387be1de6803716262d7988794accd6d39f Mon Sep 17 00:00:00 2001
+From 005b23b18fba1259847ace67251edd09367e3a69 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit f7b74387be1de6803716262d7988794accd6d39f ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -21,2 +22,2 @@
- lib/telemetry/rte_telemetry.h | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
+ lib/telemetry/rte_telemetry.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -25 +26 @@
-index d9918c4e96..40e9a3bf9d 100644
+index 3372b32f38..0f24579235 100644
@@ -28 +29 @@
-@@ -3,7 +3,4 @@
+@@ -3,8 +3,4 @@
@@ -32,0 +34 @@
+-#include <rte_compat.h>
@@ -36 +38 @@
-@@ -13,4 +10,6 @@ extern "C" {
+@@ -14,4 +10,8 @@ extern "C" {
@@ -39,0 +42,2 @@
++
++#include <rte_compat.h>
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'ethdev: fix telemetry data truncation' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (14 preceding siblings ...)
2023-02-23 15:05 ` patch 'telemetry: move include after guard' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'mempool: " Kevin Traynor
` (81 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Morten Brørup, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/86d2c8b77c6df2fa43bf863fdf807f8c1e31466d
Thanks.
Kevin
---
From 86d2c8b77c6df2fa43bf863fdf807f8c1e31466d Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 19 Dec 2022 15:06:42 +0800
Subject: [PATCH] ethdev: fix telemetry data truncation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 7db3f2af573287abb9201d46a92b4ca3ebc5d9ad ]
The 'u32' and 'u64' data can not assigned to 'int' type variable.
They need to use the 'u64' APIs to add.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/ethdev/rte_ethdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 62e67f006d..0320694f82 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6369,7 +6369,7 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
rte_tel_data_add_dict_int(d, "port_id", eth_dev->data->port_id);
rte_tel_data_add_dict_int(d, "mtu", eth_dev->data->mtu);
- rte_tel_data_add_dict_int(d, "rx_mbuf_size_min",
+ rte_tel_data_add_dict_u64(d, "rx_mbuf_size_min",
eth_dev->data->min_rx_buf_size);
- rte_tel_data_add_dict_int(d, "rx_mbuf_alloc_fail",
+ rte_tel_data_add_dict_u64(d, "rx_mbuf_alloc_fail",
eth_dev->data->rx_mbuf_alloc_failed);
rte_ether_format_addr(mac_addr, sizeof(mac_addr),
@@ -6400,10 +6400,10 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
rte_tel_data_add_dict_container(d, "txq_state", txq_state, 0);
rte_tel_data_add_dict_int(d, "numa_node", eth_dev->data->numa_node);
- rte_tel_data_add_dict_int(d, "dev_flags", eth_dev->data->dev_flags);
- rte_tel_data_add_dict_int(d, "rx_offloads",
+ rte_tel_data_add_dict_u64(d, "dev_flags", eth_dev->data->dev_flags);
+ rte_tel_data_add_dict_u64(d, "rx_offloads",
eth_dev->data->dev_conf.rxmode.offloads);
- rte_tel_data_add_dict_int(d, "tx_offloads",
+ rte_tel_data_add_dict_u64(d, "tx_offloads",
eth_dev->data->dev_conf.txmode.offloads);
- rte_tel_data_add_dict_int(d, "ethdev_rss_hf",
+ rte_tel_data_add_dict_u64(d, "ethdev_rss_hf",
eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.263299468 +0000
+++ 0017-ethdev-fix-telemetry-data-truncation.patch 2023-02-23 14:46:23.724235806 +0000
@@ -1 +1 @@
-From 7db3f2af573287abb9201d46a92b4ca3ebc5d9ad Mon Sep 17 00:00:00 2001
+From 86d2c8b77c6df2fa43bf863fdf807f8c1e31466d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 7db3f2af573287abb9201d46a92b4ca3ebc5d9ad ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 5d5e18db1e..a40d396677 100644
+index 62e67f006d..0320694f82 100644
@@ -26 +27 @@
-@@ -6038,7 +6038,7 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
+@@ -6369,7 +6369,7 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
@@ -36 +37 @@
-@@ -6069,10 +6069,10 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
+@@ -6400,10 +6400,10 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'mempool: fix telemetry data truncation' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (15 preceding siblings ...)
2023-02-23 15:05 ` patch 'ethdev: fix telemetry data truncation' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'cryptodev: " Kevin Traynor
` (80 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Morten Brørup, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/119d73b152eca50244c3f99a26c5ee388dd0e01a
Thanks.
Kevin
---
From 119d73b152eca50244c3f99a26c5ee388dd0e01a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 19 Dec 2022 15:06:43 +0800
Subject: [PATCH] mempool: fix telemetry data truncation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec ]
The 'u32' and 'u64' data can not assigned to 'int' type variable.
They need to use the 'u64' APIs to add.
Fixes: 2f5c4025abb3 ("mempool: add telemetry endpoint")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/mempool/rte_mempool.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index 3c9a1ad71a..40e6d17409 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1493,25 +1493,25 @@ mempool_info_cb(struct rte_mempool *mp, void *arg)
rte_tel_data_add_dict_string(info->d, "name", mp->name);
- rte_tel_data_add_dict_int(info->d, "pool_id", mp->pool_id);
- rte_tel_data_add_dict_int(info->d, "flags", mp->flags);
+ rte_tel_data_add_dict_u64(info->d, "pool_id", mp->pool_id);
+ rte_tel_data_add_dict_u64(info->d, "flags", mp->flags);
rte_tel_data_add_dict_int(info->d, "socket_id", mp->socket_id);
- rte_tel_data_add_dict_int(info->d, "size", mp->size);
- rte_tel_data_add_dict_int(info->d, "cache_size", mp->cache_size);
- rte_tel_data_add_dict_int(info->d, "elt_size", mp->elt_size);
- rte_tel_data_add_dict_int(info->d, "header_size", mp->header_size);
- rte_tel_data_add_dict_int(info->d, "trailer_size", mp->trailer_size);
- rte_tel_data_add_dict_int(info->d, "private_data_size",
+ rte_tel_data_add_dict_u64(info->d, "size", mp->size);
+ rte_tel_data_add_dict_u64(info->d, "cache_size", mp->cache_size);
+ rte_tel_data_add_dict_u64(info->d, "elt_size", mp->elt_size);
+ rte_tel_data_add_dict_u64(info->d, "header_size", mp->header_size);
+ rte_tel_data_add_dict_u64(info->d, "trailer_size", mp->trailer_size);
+ rte_tel_data_add_dict_u64(info->d, "private_data_size",
mp->private_data_size);
rte_tel_data_add_dict_int(info->d, "ops_index", mp->ops_index);
- rte_tel_data_add_dict_int(info->d, "populated_size",
+ rte_tel_data_add_dict_u64(info->d, "populated_size",
mp->populated_size);
mz = mp->mz;
rte_tel_data_add_dict_string(info->d, "mz_name", mz->name);
- rte_tel_data_add_dict_int(info->d, "mz_len", mz->len);
- rte_tel_data_add_dict_int(info->d, "mz_hugepage_sz",
+ rte_tel_data_add_dict_u64(info->d, "mz_len", mz->len);
+ rte_tel_data_add_dict_u64(info->d, "mz_hugepage_sz",
mz->hugepage_sz);
rte_tel_data_add_dict_int(info->d, "mz_socket_id", mz->socket_id);
- rte_tel_data_add_dict_int(info->d, "mz_flags", mz->flags);
+ rte_tel_data_add_dict_u64(info->d, "mz_flags", mz->flags);
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.288470907 +0000
+++ 0018-mempool-fix-telemetry-data-truncation.patch 2023-02-23 14:46:23.725235809 +0000
@@ -1 +1 @@
-From 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec Mon Sep 17 00:00:00 2001
+From 119d73b152eca50244c3f99a26c5ee388dd0e01a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f33f455790..950d01ffac 100644
+index 3c9a1ad71a..40e6d17409 100644
@@ -26 +27 @@
-@@ -1501,25 +1501,25 @@ mempool_info_cb(struct rte_mempool *mp, void *arg)
+@@ -1493,25 +1493,25 @@ mempool_info_cb(struct rte_mempool *mp, void *arg)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'cryptodev: fix telemetry data truncation' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (16 preceding siblings ...)
2023-02-23 15:05 ` patch 'mempool: " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'mem: " Kevin Traynor
` (79 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Morten Brørup, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/ddb46da59909d3c4d29aa1b4386dbecffa298363
Thanks.
Kevin
---
From ddb46da59909d3c4d29aa1b4386dbecffa298363 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 19 Dec 2022 15:06:44 +0800
Subject: [PATCH] cryptodev: fix telemetry data truncation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 45038f04ab577db8844ef54d7f523119be6c205f ]
The 'u32' data can not assigned to 'int' type variable. The 'u32' data
needs to use the 'u64' APIs to add.
Fixes: d3d98f5ce9d0 ("cryptodev: support telemetry")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/cryptodev/rte_cryptodev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 8b057b989c..00fdd18630 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2473,5 +2473,5 @@ cryptodev_handle_dev_info(const char *cmd __rte_unused,
rte_tel_data_add_dict_string(d, "device_name",
cryptodev_info.device->name);
- rte_tel_data_add_dict_int(d, "max_nb_queue_pairs",
+ rte_tel_data_add_dict_u64(d, "max_nb_queue_pairs",
cryptodev_info.max_nb_queue_pairs);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.310852847 +0000
+++ 0019-cryptodev-fix-telemetry-data-truncation.patch 2023-02-23 14:46:23.727235816 +0000
@@ -1 +1 @@
-From 45038f04ab577db8844ef54d7f523119be6c205f Mon Sep 17 00:00:00 2001
+From ddb46da59909d3c4d29aa1b4386dbecffa298363 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 45038f04ab577db8844ef54d7f523119be6c205f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 742a4c512e..22e7122613 100644
+index 8b057b989c..00fdd18630 100644
@@ -26 +27 @@
-@@ -2860,5 +2860,5 @@ cryptodev_handle_dev_info(const char *cmd __rte_unused,
+@@ -2473,5 +2473,5 @@ cryptodev_handle_dev_info(const char *cmd __rte_unused,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'mem: fix telemetry data truncation' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (17 preceding siblings ...)
2023-02-23 15:05 ` patch 'cryptodev: " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'examples/qos_sched: fix debug mode' " Kevin Traynor
` (78 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Morten Brørup, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c
Thanks.
Kevin
---
From 5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 19 Dec 2022 15:06:45 +0800
Subject: [PATCH] mem: fix telemetry data truncation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 6243e36b837b754c33017718cf79f7574a52b09c ]
The 'u32' and 'u64' data can not assigned to 'int' type variable.
They need to use the 'u64' APIs to add.
Fixes: e6732d0d6e26 ("mem: add telemetry infos")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/eal/common/eal_common_memory.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
index 616db5ce31..a3f2bdd0ca 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -1134,5 +1134,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params,
rte_tel_data_start_dict(d);
- rte_tel_data_add_dict_int(d, "Head id", heap_id);
+ rte_tel_data_add_dict_u64(d, "Head id", heap_id);
rte_tel_data_add_dict_string(d, "Name", heap->name);
rte_tel_data_add_dict_u64(d, "Heap_size",
@@ -1196,11 +1196,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
rte_tel_data_start_dict(d);
- rte_tel_data_add_dict_int(d, "Zone", mz_idx);
+ rte_tel_data_add_dict_u64(d, "Zone", mz_idx);
rte_tel_data_add_dict_string(d, "Name", mz->name);
- rte_tel_data_add_dict_int(d, "Length", mz->len);
+ rte_tel_data_add_dict_u64(d, "Length", mz->len);
snprintf(addr, ADDR_STR, "%p", mz->addr);
rte_tel_data_add_dict_string(d, "Address", addr);
rte_tel_data_add_dict_int(d, "Socket", mz->socket_id);
- rte_tel_data_add_dict_int(d, "Flags", mz->flags);
+ rte_tel_data_add_dict_u64(d, "Flags", mz->flags);
/* go through each page occupied by this memzone */
@@ -1217,5 +1217,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
ms = rte_fbarray_get(&msl->memseg_arr, ms_idx);
- rte_tel_data_add_dict_int(d, "Hugepage_size", page_sz);
+ rte_tel_data_add_dict_u64(d, "Hugepage_size", page_sz);
snprintf(addr, ADDR_STR, "%p", ms->addr);
rte_tel_data_add_dict_string(d, "Hugepage_base", addr);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.334056728 +0000
+++ 0020-mem-fix-telemetry-data-truncation.patch 2023-02-23 14:46:23.728235819 +0000
@@ -1 +1 @@
-From 6243e36b837b754c33017718cf79f7574a52b09c Mon Sep 17 00:00:00 2001
+From 5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6243e36b837b754c33017718cf79f7574a52b09c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 688dc615d7..8e427bf4b4 100644
+index 616db5ce31..a3f2bdd0ca 100644
@@ -26 +27 @@
-@@ -1140,5 +1140,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params,
+@@ -1134,5 +1134,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params,
@@ -33 +34 @@
-@@ -1202,11 +1202,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
+@@ -1196,11 +1196,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
@@ -48 +49 @@
-@@ -1223,5 +1223,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
+@@ -1217,5 +1217,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'examples/qos_sched: fix debug mode' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (18 preceding siblings ...)
2023-02-23 15:05 ` patch 'mem: " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'app/dumpcap: fix storing port identifier' " Kevin Traynor
` (77 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Megha Ajmera; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/dce447af759a98f51145dec6f7328c48761422ce
Thanks.
Kevin
---
From dce447af759a98f51145dec6f7328c48761422ce Mon Sep 17 00:00:00 2001
From: Megha Ajmera <megha.ajmera@intel.com>
Date: Thu, 5 Jan 2023 12:28:53 +0000
Subject: [PATCH] examples/qos_sched: fix debug mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit af13b8711aa43a851d2c12e5d3f8f87dd047307e ]
This issue is happening due to non-initialization of some
fields in “rte_eth_rxconf” structure in our application.
Doing a memset to zero before initialization in HQoS application.
Fixes: de3cfa2c9823 ("sched: initial import")
Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
examples/qos_sched/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 3c1f0bc680..e912ca4f6c 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -82,4 +82,5 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
return 0;
+ memset(&rx_conf, 0, sizeof(struct rte_eth_rxconf));
rx_conf.rx_thresh.pthresh = rx_thresh.pthresh;
rx_conf.rx_thresh.hthresh = rx_thresh.hthresh;
@@ -89,4 +90,5 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
rx_conf.rx_deferred_start = 0;
+ memset(&tx_conf, 0, sizeof(struct rte_eth_txconf));
tx_conf.tx_thresh.pthresh = tx_thresh.pthresh;
tx_conf.tx_thresh.hthresh = tx_thresh.hthresh;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.356518108 +0000
+++ 0021-examples-qos_sched-fix-debug-mode.patch 2023-02-23 14:46:23.728235819 +0000
@@ -1 +1 @@
-From af13b8711aa43a851d2c12e5d3f8f87dd047307e Mon Sep 17 00:00:00 2001
+From dce447af759a98f51145dec6f7328c48761422ce Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit af13b8711aa43a851d2c12e5d3f8f87dd047307e ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 0709aec10c..d28350e14a 100644
+index 3c1f0bc680..e912ca4f6c 100644
@@ -26 +27 @@
-@@ -80,4 +80,5 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
+@@ -82,4 +82,5 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
@@ -32 +33 @@
-@@ -87,4 +88,5 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
+@@ -89,4 +90,5 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/dumpcap: fix storing port identifier' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (19 preceding siblings ...)
2023-02-23 15:05 ` patch 'examples/qos_sched: fix debug mode' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'vdpa/ifc: fix argument compatibility check' " Kevin Traynor
` (76 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Ben Magistro; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/f8d7e778b5b5eb065f7ad2d4f21c196ce34c8861
Thanks.
Kevin
---
From f8d7e778b5b5eb065f7ad2d4f21c196ce34c8861 Mon Sep 17 00:00:00 2001
From: Ben Magistro <koncept1@gmail.com>
Date: Tue, 3 Jan 2023 19:38:10 -0800
Subject: [PATCH] app/dumpcap: fix storing port identifier
[ upstream commit dbb27d6fd88ed9e8177d9e49347905dbd2bae300 ]
When dumpcap adds an interface, the port was not being preserved. This
results in the structure being initialized and the port field being set
to 0 regardless of what port was actually selected. This unset field is
then used in both the enable and cleanup calls. This could result in the
capture occurring on the wrong interface.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Ben Magistro <koncept1@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 8b30d5f1a8..a828b7c8a4 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -197,4 +197,5 @@ static void add_interface(uint16_t port, const char *name)
memset(intf, 0, sizeof(*intf));
+ intf->port = port;
rte_strscpy(intf->name, name, sizeof(intf->name));
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.377865129 +0000
+++ 0022-app-dumpcap-fix-storing-port-identifier.patch 2023-02-23 14:46:23.729235823 +0000
@@ -1 +1 @@
-From dbb27d6fd88ed9e8177d9e49347905dbd2bae300 Mon Sep 17 00:00:00 2001
+From f8d7e778b5b5eb065f7ad2d4f21c196ce34c8861 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dbb27d6fd88ed9e8177d9e49347905dbd2bae300 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d1c70f769b..5ccafd4c3c 100644
+index 8b30d5f1a8..a828b7c8a4 100644
@@ -25 +26 @@
-@@ -209,4 +209,5 @@ static void add_interface(uint16_t port, const char *name)
+@@ -197,4 +197,5 @@ static void add_interface(uint16_t port, const char *name)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'vdpa/ifc: fix argument compatibility check' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (20 preceding siblings ...)
2023-02-23 15:05 ` patch 'app/dumpcap: fix storing port identifier' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'vdpa/ifc: fix reconnection in SW-assisted live migration' " Kevin Traynor
` (75 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Andy Pei; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/2d551ec8dc3cbfeaa28e4be5f13f159aa98a4b30
Thanks.
Kevin
---
From 2d551ec8dc3cbfeaa28e4be5f13f159aa98a4b30 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Thu, 1 Dec 2022 15:32:20 +0800
Subject: [PATCH] vdpa/ifc: fix argument compatibility check
[ upstream commit 97d2dfc4e15caf654eb84ede24f4c1a43793e850 ]
"sw_fallback_lm=0" means driver does not provide live migration assistance.
so hardware assistance is needed to support live migration.
However registers for live migration in BAR4 are not implemented.
In the case, we just return error after display some logs.
Fixes: 4c3f55cc23ea ("net/ifc: add LM mode parameter")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/vdpa/ifc/ifcvf_vdpa.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index f061d55b06..d3c05bd3f9 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -1260,4 +1260,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
}
internal->sw_lm = sw_fallback_lm;
+ if (!internal->sw_lm && !internal->hw.lm_cfg) {
+ DRV_LOG(ERR, "Device %s does not support HW assist live migration, please enable sw-live-migration!",
+ pci_dev->name);
+ goto error;
+ }
internal->vdev = rte_vdpa_register_device(&pci_dev->device, &ifcvf_ops);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.400036685 +0000
+++ 0023-vdpa-ifc-fix-argument-compatibility-check.patch 2023-02-23 14:46:23.730235826 +0000
@@ -1 +1 @@
-From 97d2dfc4e15caf654eb84ede24f4c1a43793e850 Mon Sep 17 00:00:00 2001
+From 2d551ec8dc3cbfeaa28e4be5f13f159aa98a4b30 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97d2dfc4e15caf654eb84ede24f4c1a43793e850 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 49d68ad1b1..9468f66638 100644
+index f061d55b06..d3c05bd3f9 100644
@@ -24 +25 @@
-@@ -1747,4 +1747,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1260,4 +1260,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -33 +34 @@
- pthread_mutex_lock(&internal_list_lock);
+ internal->vdev = rte_vdpa_register_device(&pci_dev->device, &ifcvf_ops);
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'vdpa/ifc: fix reconnection in SW-assisted live migration' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (21 preceding siblings ...)
2023-02-23 15:05 ` patch 'vdpa/ifc: fix argument compatibility check' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'vhost: fix net header settings in datapath' " Kevin Traynor
` (74 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Andy Pei; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/e928dfe88cd92ec50392d6023f07d96b89c42d54
Thanks.
Kevin
---
From e928dfe88cd92ec50392d6023f07d96b89c42d54 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Mon, 12 Dec 2022 15:12:45 +0800
Subject: [PATCH] vdpa/ifc: fix reconnection in SW-assisted live migration
[ upstream commit ef3be7e237dd707f46870b09b93f88f8ee5e75c6 ]
In the case using argument "sw-live-migration=1" to enable SW assisted live
migration, we take QEMU as front end for example, after source VM migrates
to destination VM, we keep vdpa process for source VM there, we kill the
QEMU process for source VM, and restart the QEMU process for source VM.
In this case, vdpa driver will not perform DMA map and data path will not
work properly.
The above case works fine in the case "sw-live-migration=0".
The root cause is that current code driver does not set running flag to 0.
Driver treats device as ruuning and does not perform DMA map.
Fixes: 4bb531e152d3 ("net/ifc: support SW assisted VDPA live migration")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index d3c05bd3f9..c9b10527cc 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -849,4 +849,6 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal)
vdpa_disable_vfio_intr(internal);
+ rte_atomic32_set(&internal->running, 0);
+
ret = rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, false);
if (ret && ret != -ENOTSUP)
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.422938327 +0000
+++ 0024-vdpa-ifc-fix-reconnection-in-SW-assisted-live-migrat.patch 2023-02-23 14:46:23.731235830 +0000
@@ -1 +1 @@
-From ef3be7e237dd707f46870b09b93f88f8ee5e75c6 Mon Sep 17 00:00:00 2001
+From e928dfe88cd92ec50392d6023f07d96b89c42d54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ef3be7e237dd707f46870b09b93f88f8ee5e75c6 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 9468f66638..35520ea3ae 100644
+index d3c05bd3f9..c9b10527cc 100644
@@ -31 +32 @@
-@@ -1045,4 +1045,6 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal)
+@@ -849,4 +849,6 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'vhost: fix net header settings in datapath' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (22 preceding siblings ...)
2023-02-23 15:05 ` patch 'vdpa/ifc: fix reconnection in SW-assisted live migration' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'baseband/acc: fix memory leak on acc100 close' " Kevin Traynor
` (73 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Wenwu Ma; +Cc: Wei Ling, Cheng Jiang, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/dd830098ef69b4165c1776a2b096b560749dfa5a
Thanks.
Kevin
---
From dd830098ef69b4165c1776a2b096b560749dfa5a Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Wed, 4 Jan 2023 10:39:45 +0800
Subject: [PATCH] vhost: fix net header settings in datapath
[ upstream commit b9c1ec8577936419c8801dfad61e848b3535295f ]
In vhost sync batch enqueue, the "num_buffers" of
virtio net header is not be set, but it should be
set to 1 if the mrg_rxbuf feature is turned on,
This patch fix the issue.
Fixes: ef861692c398 ("vhost: add packed ring batch enqueue")
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/vhost/virtio_net.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index e4cc9fdf49..b211799687 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1247,4 +1247,10 @@ virtio_dev_rx_batch_packed_copy(struct virtio_net *dev,
}
+ if (rxvq_is_mergeable(dev)) {
+ vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
+ ASSIGN_UNLESS_EQUAL(hdrs[i]->num_buffers, 1);
+ }
+ }
+
vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE)
virtio_enqueue_offload(pkts[i], &hdrs[i]->hdr);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.445317386 +0000
+++ 0025-vhost-fix-net-header-settings-in-datapath.patch 2023-02-23 14:46:23.733235837 +0000
@@ -1 +1 @@
-From b9c1ec8577936419c8801dfad61e848b3535295f Mon Sep 17 00:00:00 2001
+From dd830098ef69b4165c1776a2b096b560749dfa5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9c1ec8577936419c8801dfad61e848b3535295f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 9abf752f30..a3dbf8cb10 100644
+index e4cc9fdf49..b211799687 100644
@@ -26 +27 @@
-@@ -1454,4 +1454,10 @@ virtio_dev_rx_batch_packed_copy(struct virtio_net *dev,
+@@ -1247,4 +1247,10 @@ virtio_dev_rx_batch_packed_copy(struct virtio_net *dev,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'baseband/acc: fix memory leak on acc100 close' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (23 preceding siblings ...)
2023-02-23 15:05 ` patch 'vhost: fix net header settings in datapath' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'baseband/acc: fix acc100 iteration counter in TB' " Kevin Traynor
` (72 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/3664b67985f2bdab3ec33c0b5f38b6f023d8c987
Thanks.
Kevin
---
From 3664b67985f2bdab3ec33c0b5f38b6f023d8c987 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 12 Jan 2023 11:36:03 -0800
Subject: [PATCH] baseband/acc: fix memory leak on acc100 close
[ upstream commit 1bc7f26ebd45da2ab2740a00c991100dc8f0037d ]
Explicitly call rte_free for harq_layout pointer in dev_close function
to prevent memory leak.
Fixes: ba2262fe16c ("baseband/acc100: fix close cleanup")
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index eba6eb0df4..713e58fb54 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -780,4 +780,5 @@ acc100_dev_close(struct rte_bbdev *dev)
rte_free(d->info_ring);
rte_free(d->sw_rings_base);
+ rte_free(d->harq_layout);
d->sw_rings_base = NULL;
d->tail_ptrs = NULL;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.468853903 +0000
+++ 0026-baseband-acc-fix-memory-leak-on-acc100-close.patch 2023-02-23 14:46:23.736235847 +0000
@@ -1 +1 @@
-From 1bc7f26ebd45da2ab2740a00c991100dc8f0037d Mon Sep 17 00:00:00 2001
+From 3664b67985f2bdab3ec33c0b5f38b6f023d8c987 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1bc7f26ebd45da2ab2740a00c991100dc8f0037d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/baseband/acc/rte_acc100_pmd.c | 1 +
+ drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
@@ -18,5 +19,5 @@
-diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
-index b3164529dd..146a22bd64 100644
---- a/drivers/baseband/acc/rte_acc100_pmd.c
-+++ b/drivers/baseband/acc/rte_acc100_pmd.c
-@@ -621,4 +621,5 @@ acc100_dev_close(struct rte_bbdev *dev)
+diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
+index eba6eb0df4..713e58fb54 100644
+--- a/drivers/baseband/acc100/rte_acc100_pmd.c
++++ b/drivers/baseband/acc100/rte_acc100_pmd.c
+@@ -780,4 +780,5 @@ acc100_dev_close(struct rte_bbdev *dev)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'baseband/acc: fix acc100 iteration counter in TB' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (24 preceding siblings ...)
2023-02-23 15:05 ` patch 'baseband/acc: fix memory leak on acc100 close' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'crypto/ccp: remove some printf' " Kevin Traynor
` (71 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/df587bef4ad9f8e4a026fac725c5ca02a4d3a0b2
Thanks.
Kevin
---
From df587bef4ad9f8e4a026fac725c5ca02a4d3a0b2 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 12 Jan 2023 11:36:04 -0800
Subject: [PATCH] baseband/acc: fix acc100 iteration counter in TB
[ upstream commit 12f2bce128a1766765619357f707430c506c7bc6 ]
Use ldpc or turbo iteration counter based on the operation type.
Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions")
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 713e58fb54..5ac2f96a84 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -4047,6 +4047,10 @@ dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
if (!op->status)
op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR;
- op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
- op->turbo_dec.iter_count);
+ if (q->op_type == RTE_BBDEV_OP_LDPC_DEC)
+ op->ldpc_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
+ op->ldpc_dec.iter_count);
+ else
+ op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
+ op->turbo_dec.iter_count);
/* Check if this is the last desc in batch (Atomic Queue) */
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.493230240 +0000
+++ 0027-baseband-acc-fix-acc100-iteration-counter-in-TB.patch 2023-02-23 14:46:23.740235861 +0000
@@ -1 +1 @@
-From 12f2bce128a1766765619357f707430c506c7bc6 Mon Sep 17 00:00:00 2001
+From df587bef4ad9f8e4a026fac725c5ca02a4d3a0b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 12f2bce128a1766765619357f707430c506c7bc6 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -14 +15 @@
- drivers/baseband/acc/rte_acc100_pmd.c | 8 ++++++--
+ drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++++--
@@ -17,5 +18,5 @@
-diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
-index 146a22bd64..a00314c957 100644
---- a/drivers/baseband/acc/rte_acc100_pmd.c
-+++ b/drivers/baseband/acc/rte_acc100_pmd.c
-@@ -4034,6 +4034,10 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
+diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
+index 713e58fb54..5ac2f96a84 100644
+--- a/drivers/baseband/acc100/rte_acc100_pmd.c
++++ b/drivers/baseband/acc100/rte_acc100_pmd.c
+@@ -4047,6 +4047,10 @@ dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'crypto/ccp: remove some printf' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (25 preceding siblings ...)
2023-02-23 15:05 ` patch 'baseband/acc: fix acc100 iteration counter in TB' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'crypto/ccp: remove some dead code for UIO' " Kevin Traynor
` (70 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: David Marchand; +Cc: Sunil Uttarwar, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/ba8923c86e03ff82ff030ac927b8ae332d92c9d5
Thanks.
Kevin
---
From ba8923c86e03ff82ff030ac927b8ae332d92c9d5 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 4 Oct 2022 11:51:29 +0200
Subject: [PATCH] crypto/ccp: remove some printf
[ upstream commit e946ca8e727424b511fe4ea278d8bec76b800e7a ]
A DPDK application must _not_ use printf.
Use log framework.
Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>
---
drivers/crypto/ccp/ccp_dev.c | 4 ++--
drivers/crypto/ccp/ccp_pci.c | 3 ++-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 0eb1b0328e..8ca092fa6e 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -363,5 +363,5 @@ ccp_find_lsb_regions(struct ccp_queue *cmd_q, uint64_t status)
weight++;
- printf("Queue %d can access %d LSB regions of mask %lu\n",
+ CCP_LOG_DBG("Queue %d can access %d LSB regions of mask %lu\n",
(int)cmd_q->id, weight, cmd_q->lsbmask);
@@ -711,5 +711,5 @@ ccp_probe_devices(struct rte_pci_device *pci_dev,
SYSFS_PCI_DEVICES, d->d_name);
if (is_ccp_device(dirname, ccp_id, &ccp_type)) {
- printf("CCP : Detected CCP device with ID = 0x%x\n",
+ CCP_LOG_DBG("CCP : Detected CCP device with ID = 0x%x\n",
ccp_id[ccp_type].device_id);
ret = ccp_probe_device(ccp_type, pci_dev);
diff --git a/drivers/crypto/ccp/ccp_pci.c b/drivers/crypto/ccp/ccp_pci.c
index 38029a9081..c941e222c7 100644
--- a/drivers/crypto/ccp/ccp_pci.c
+++ b/drivers/crypto/ccp/ccp_pci.c
@@ -12,4 +12,5 @@
#include "ccp_pci.h"
+#include "ccp_pmd_private.h"
static const char * const uio_module_names[] = {
@@ -42,5 +43,5 @@ ccp_check_pci_uio_module(void)
}
fclose(fp);
- printf("Insert igb_uio or uio_pci_generic kernel module(s)");
+ CCP_LOG_DBG("Insert igb_uio or uio_pci_generic kernel module(s)");
return -1;/* uio not inserted */
}
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index a35a8cd775..c5ec952e36 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -251,5 +251,5 @@ cryptodev_ccp_create(const char *name,
}
- printf("CCP : Crypto device count = %d\n", cryptodev_cnt);
+ CCP_LOG_DBG("CCP : Crypto device count = %d\n", cryptodev_cnt);
dev->device = &pci_dev->device;
dev->device->driver = &pci_drv->driver;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.517578790 +0000
+++ 0028-crypto-ccp-remove-some-printf.patch 2023-02-23 14:46:23.741235865 +0000
@@ -1 +1 @@
-From e946ca8e727424b511fe4ea278d8bec76b800e7a Mon Sep 17 00:00:00 2001
+From ba8923c86e03ff82ff030ac927b8ae332d92c9d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e946ca8e727424b511fe4ea278d8bec76b800e7a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 424ead82c3..9c9cb81236 100644
+index 0eb1b0328e..8ca092fa6e 100644
@@ -31 +32 @@
-@@ -710,5 +710,5 @@ ccp_probe_devices(struct rte_pci_device *pci_dev,
+@@ -711,5 +711,5 @@ ccp_probe_devices(struct rte_pci_device *pci_dev,
@@ -56 +57 @@
-index 221a0a5235..bcb621234c 100644
+index a35a8cd775..c5ec952e36 100644
@@ -59 +60 @@
-@@ -238,5 +238,5 @@ cryptodev_ccp_create(const char *name,
+@@ -251,5 +251,5 @@ cryptodev_ccp_create(const char *name,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'crypto/ccp: remove some dead code for UIO' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (26 preceding siblings ...)
2023-02-23 15:05 ` patch 'crypto/ccp: remove some printf' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'crypto/ccp: fix IOVA handling' " Kevin Traynor
` (69 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: David Marchand; +Cc: Sunil Uttarwar, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/bc5f3c068ce22644eee9579e7f723699276e12a0
Thanks.
Kevin
---
From bc5f3c068ce22644eee9579e7f723699276e12a0 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 4 Oct 2022 11:51:30 +0200
Subject: [PATCH] crypto/ccp: remove some dead code for UIO
[ upstream commit b211d968f77097c868eb963a7de11b1a244b1a65 ]
uio_fd is unused.
Fixes: 09a0fd736a08 ("crypto/ccp: enable IOMMU")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>
---
drivers/crypto/ccp/ccp_dev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 8ca092fa6e..3f00b2522b 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -654,5 +654,4 @@ ccp_probe_device(int ccp_type, struct rte_pci_device *pci_dev)
{
struct ccp_device *ccp_dev = NULL;
- int uio_fd = -1;
ccp_dev = rte_zmalloc("ccp_device", sizeof(*ccp_dev),
@@ -672,6 +671,4 @@ ccp_probe_device(int ccp_type, struct rte_pci_device *pci_dev)
fail:
CCP_LOG_ERR("CCP Device probe failed");
- if (uio_fd >= 0)
- close(uio_fd);
if (ccp_dev)
rte_free(ccp_dev);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.539925660 +0000
+++ 0029-crypto-ccp-remove-some-dead-code-for-UIO.patch 2023-02-23 14:46:23.742235868 +0000
@@ -1 +1 @@
-From b211d968f77097c868eb963a7de11b1a244b1a65 Mon Sep 17 00:00:00 2001
+From bc5f3c068ce22644eee9579e7f723699276e12a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b211d968f77097c868eb963a7de11b1a244b1a65 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 9c9cb81236..410e62121e 100644
+index 8ca092fa6e..3f00b2522b 100644
@@ -32,2 +33,2 @@
- rte_free(ccp_dev);
- return -1;
+ if (ccp_dev)
+ rte_free(ccp_dev);
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'crypto/ccp: fix IOVA handling' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (27 preceding siblings ...)
2023-02-23 15:05 ` patch 'crypto/ccp: remove some dead code for UIO' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'test/crypto: fix typo in AES test' " Kevin Traynor
` (68 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: David Marchand; +Cc: Sunil Uttarwar, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/b2c5b2d8a87130ea095a1b202460927caf0d4d82
Thanks.
Kevin
---
From b2c5b2d8a87130ea095a1b202460927caf0d4d82 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 4 Oct 2022 11:51:31 +0200
Subject: [PATCH] crypto/ccp: fix IOVA handling
[ upstream commit 9631fb8f10dfafb0547fbf9127b162e62b2bef43 ]
Using IOVA or physical addresses is something that the user (via
--iova-mode=) or the bus code decides.
The crypto/ccp PCI driver should only use rte_mem_virt2iova.
It should not try to decide what to use solely based on the kmod
the PCI device is bound to.
While at it, the global variable sha_ctx looks unsafe and unneeded.
Remove it.
Fixes: 09a0fd736a08 ("crypto/ccp: enable IOMMU")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>
---
drivers/crypto/ccp/ccp_crypto.c | 105 ++++++-------------------------
drivers/crypto/ccp/ccp_dev.c | 9 +--
drivers/crypto/ccp/ccp_pci.c | 34 ----------
drivers/crypto/ccp/ccp_pci.h | 3 -
drivers/crypto/ccp/rte_ccp_pmd.c | 3 -
5 files changed, 19 insertions(+), 135 deletions(-)
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4bab18323b..351d8ac63e 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -34,6 +34,4 @@
#include <openssl/hmac.h>
-extern int iommu_mode;
-void *sha_ctx;
/* SHA initial context values */
uint32_t ccp_sha1_init[SHA_COMMON_DIGEST_SIZE / sizeof(uint32_t)] = {
@@ -749,11 +747,6 @@ ccp_configure_session_cipher(struct ccp_session *sess,
return -ENOTSUP;
}
- if (iommu_mode == 2) {
- sess->cipher.nonce_phys = rte_mem_virt2iova(sess->cipher.nonce);
- sess->cipher.key_phys = rte_mem_virt2iova(sess->cipher.key_ccp);
- } else {
- sess->cipher.nonce_phys = rte_mem_virt2phy(sess->cipher.nonce);
- sess->cipher.key_phys = rte_mem_virt2phy(sess->cipher.key_ccp);
- }
+ sess->cipher.nonce_phys = rte_mem_virt2iova(sess->cipher.nonce);
+ sess->cipher.key_phys = rte_mem_virt2iova(sess->cipher.key_ccp);
return 0;
}
@@ -794,5 +787,4 @@ ccp_configure_session_auth(struct ccp_session *sess,
sess->auth.ctx_len = CCP_SB_BYTES;
sess->auth.offset = CCP_SB_BYTES - SHA1_DIGEST_SIZE;
- rte_memcpy(sha_ctx, sess->auth.ctx, SHA_COMMON_DIGEST_SIZE);
break;
case RTE_CRYPTO_AUTH_SHA1_HMAC:
@@ -833,5 +825,4 @@ ccp_configure_session_auth(struct ccp_session *sess,
sess->auth.ctx_len = CCP_SB_BYTES;
sess->auth.offset = CCP_SB_BYTES - SHA224_DIGEST_SIZE;
- rte_memcpy(sha_ctx, sess->auth.ctx, SHA256_DIGEST_SIZE);
break;
case RTE_CRYPTO_AUTH_SHA224_HMAC:
@@ -896,5 +887,4 @@ ccp_configure_session_auth(struct ccp_session *sess,
sess->auth.ctx_len = CCP_SB_BYTES;
sess->auth.offset = CCP_SB_BYTES - SHA256_DIGEST_SIZE;
- rte_memcpy(sha_ctx, sess->auth.ctx, SHA256_DIGEST_SIZE);
break;
case RTE_CRYPTO_AUTH_SHA256_HMAC:
@@ -959,5 +949,4 @@ ccp_configure_session_auth(struct ccp_session *sess,
sess->auth.ctx_len = CCP_SB_BYTES << 1;
sess->auth.offset = (CCP_SB_BYTES << 1) - SHA384_DIGEST_SIZE;
- rte_memcpy(sha_ctx, sess->auth.ctx, SHA512_DIGEST_SIZE);
break;
case RTE_CRYPTO_AUTH_SHA384_HMAC:
@@ -1024,5 +1013,4 @@ ccp_configure_session_auth(struct ccp_session *sess,
sess->auth.ctx_len = CCP_SB_BYTES << 1;
sess->auth.offset = (CCP_SB_BYTES << 1) - SHA512_DIGEST_SIZE;
- rte_memcpy(sha_ctx, sess->auth.ctx, SHA512_DIGEST_SIZE);
break;
case RTE_CRYPTO_AUTH_SHA512_HMAC:
@@ -1174,11 +1162,6 @@ ccp_configure_session_aead(struct ccp_session *sess,
return -ENOTSUP;
}
- if (iommu_mode == 2) {
- sess->cipher.nonce_phys = rte_mem_virt2iova(sess->cipher.nonce);
- sess->cipher.key_phys = rte_mem_virt2iova(sess->cipher.key_ccp);
- } else {
- sess->cipher.nonce_phys = rte_mem_virt2phy(sess->cipher.nonce);
- sess->cipher.key_phys = rte_mem_virt2phy(sess->cipher.key_ccp);
- }
+ sess->cipher.nonce_phys = rte_mem_virt2iova(sess->cipher.nonce);
+ sess->cipher.key_phys = rte_mem_virt2iova(sess->cipher.key_ccp);
return 0;
}
@@ -1595,12 +1578,6 @@ ccp_perform_hmac(struct rte_crypto_op *op,
append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
session->auth.ctx_len);
- if (iommu_mode == 2) {
- dest_addr = (phys_addr_t)rte_mem_virt2iova(append_ptr);
- pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *)addr);
- } else {
- dest_addr = (phys_addr_t)rte_mem_virt2phy(append_ptr);
- pst.src_addr = (phys_addr_t)rte_mem_virt2phy((void *)addr);
- }
- dest_addr_t = dest_addr;
+ dest_addr_t = dest_addr = (phys_addr_t)rte_mem_virt2iova(append_ptr);
+ pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *)addr);
/** Load PHash1 to LSB*/
@@ -1684,8 +1661,5 @@ ccp_perform_hmac(struct rte_crypto_op *op,
/** Load PHash2 to LSB*/
addr += session->auth.ctx_len;
- if (iommu_mode == 2)
- pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *)addr);
- else
- pst.src_addr = (phys_addr_t)rte_mem_virt2phy((void *)addr);
+ pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *)addr);
pst.dest_addr = (phys_addr_t)(cmd_q->sb_sha * CCP_SB_BYTES);
pst.len = session->auth.ctx_len;
@@ -1775,12 +1749,6 @@ ccp_perform_sha(struct rte_crypto_op *op,
append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
session->auth.ctx_len);
- if (iommu_mode == 2) {
- dest_addr = (phys_addr_t)rte_mem_virt2iova(append_ptr);
- pst.src_addr = (phys_addr_t)sha_ctx;
- } else {
- dest_addr = (phys_addr_t)rte_mem_virt2phy(append_ptr);
- pst.src_addr = (phys_addr_t)rte_mem_virt2phy((void *)
- session->auth.ctx);
- }
+ pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *)session->auth.ctx);
+ dest_addr = (phys_addr_t)rte_mem_virt2iova(append_ptr);
/** Passthru sha context*/
@@ -1872,13 +1840,6 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
return -1;
}
- if (iommu_mode == 2) {
- dest_addr = (phys_addr_t)rte_mem_virt2iova((void *)append_ptr);
- ctx_paddr = (phys_addr_t)rte_mem_virt2iova(
- session->auth.pre_compute);
- } else {
- dest_addr = (phys_addr_t)rte_mem_virt2phy((void *)append_ptr);
- ctx_paddr = (phys_addr_t)rte_mem_virt2phy(
- session->auth.pre_compute);
- }
+ dest_addr = (phys_addr_t)rte_mem_virt2iova((void *)append_ptr);
+ ctx_paddr = (phys_addr_t)rte_mem_virt2iova(session->auth.pre_compute);
dest_addr_t = dest_addr + (session->auth.ctx_len / 2);
desc = &cmd_q->qbase_desc[cmd_q->qidx];
@@ -2018,11 +1979,6 @@ ccp_perform_sha3(struct rte_crypto_op *op,
return -1;
}
- if (iommu_mode == 2) {
- dest_addr = (phys_addr_t)rte_mem_virt2iova((void *)append_ptr);
- ctx_paddr = (phys_addr_t)rte_mem_virt2iova((void *)ctx_addr);
- } else {
- dest_addr = (phys_addr_t)rte_mem_virt2phy((void *)append_ptr);
- ctx_paddr = (phys_addr_t)rte_mem_virt2phy((void *)ctx_addr);
- }
+ dest_addr = (phys_addr_t)rte_mem_virt2iova((void *)append_ptr);
+ ctx_paddr = (phys_addr_t)rte_mem_virt2iova((void *)ctx_addr);
ctx_addr = session->auth.sha3_ctx;
@@ -2100,11 +2056,5 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
ctx_addr = session->auth.pre_compute;
memset(ctx_addr, 0, AES_BLOCK_SIZE);
- if (iommu_mode == 2)
- pst.src_addr = (phys_addr_t)rte_mem_virt2iova(
- (void *)ctx_addr);
- else
- pst.src_addr = (phys_addr_t)rte_mem_virt2phy(
- (void *)ctx_addr);
-
+ pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *)ctx_addr);
pst.dest_addr = (phys_addr_t)(cmd_q->sb_iv * CCP_SB_BYTES);
pst.len = CCP_SB_BYTES;
@@ -2144,10 +2094,5 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
ctx_addr = session->auth.pre_compute + CCP_SB_BYTES;
memset(ctx_addr, 0, AES_BLOCK_SIZE);
- if (iommu_mode == 2)
- pst.src_addr = (phys_addr_t)rte_mem_virt2iova(
- (void *)ctx_addr);
- else
- pst.src_addr = (phys_addr_t)rte_mem_virt2phy(
- (void *)ctx_addr);
+ pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *)ctx_addr);
pst.dest_addr = (phys_addr_t)(cmd_q->sb_iv * CCP_SB_BYTES);
pst.len = CCP_SB_BYTES;
@@ -2343,10 +2288,5 @@ ccp_perform_3des(struct rte_crypto_op *op,
rte_memcpy(lsb_buf + (CCP_SB_BYTES - session->iv.length),
iv, session->iv.length);
- if (iommu_mode == 2)
- pst.src_addr = (phys_addr_t)rte_mem_virt2iova(
- (void *) lsb_buf);
- else
- pst.src_addr = (phys_addr_t)rte_mem_virt2phy(
- (void *) lsb_buf);
+ pst.src_addr = (phys_addr_t)rte_mem_virt2iova((void *) lsb_buf);
pst.dest_addr = (phys_addr_t)(cmd_q->sb_iv * CCP_SB_BYTES);
pst.len = CCP_SB_BYTES;
@@ -2371,9 +2311,5 @@ ccp_perform_3des(struct rte_crypto_op *op,
dest_addr = src_addr;
- if (iommu_mode == 2)
- key_addr = rte_mem_virt2iova(session->cipher.key_ccp);
- else
- key_addr = rte_mem_virt2phy(session->cipher.key_ccp);
-
+ key_addr = rte_mem_virt2iova(session->cipher.key_ccp);
desc = &cmd_q->qbase_desc[cmd_q->qidx];
@@ -2769,10 +2705,5 @@ process_ops_to_enqueue(struct ccp_qp *qp,
b_info->desccnt = 0;
b_info->cmd_q = cmd_q;
- if (iommu_mode == 2)
- b_info->lsb_buf_phys =
- (phys_addr_t)rte_mem_virt2iova((void *)b_info->lsb_buf);
- else
- b_info->lsb_buf_phys =
- (phys_addr_t)rte_mem_virt2phy((void *)b_info->lsb_buf);
+ b_info->lsb_buf_phys = (phys_addr_t)rte_mem_virt2iova((void *)b_info->lsb_buf);
rte_atomic64_sub(&b_info->cmd_q->free_slots, slots_req);
diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 3f00b2522b..54c568afd1 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -24,5 +24,4 @@
#include "ccp_pmd_private.h"
-int iommu_mode;
struct ccp_list ccp_list = TAILQ_HEAD_INITIALIZER(ccp_list);
static int ccp_dev_id;
@@ -653,5 +652,5 @@ static int
ccp_probe_device(int ccp_type, struct rte_pci_device *pci_dev)
{
- struct ccp_device *ccp_dev = NULL;
+ struct ccp_device *ccp_dev;
ccp_dev = rte_zmalloc("ccp_device", sizeof(*ccp_dev),
@@ -685,14 +684,8 @@ ccp_probe_devices(struct rte_pci_device *pci_dev,
DIR *dir;
int ret = 0;
- int module_idx = 0;
uint16_t domain;
uint8_t bus, devid, function;
char dirname[PATH_MAX];
- module_idx = ccp_check_pci_uio_module();
- if (module_idx < 0)
- return -1;
-
- iommu_mode = module_idx;
TAILQ_INIT(&ccp_list);
dir = opendir(SYSFS_PCI_DEVICES);
diff --git a/drivers/crypto/ccp/ccp_pci.c b/drivers/crypto/ccp/ccp_pci.c
index c941e222c7..bd1a037f76 100644
--- a/drivers/crypto/ccp/ccp_pci.c
+++ b/drivers/crypto/ccp/ccp_pci.c
@@ -12,38 +12,4 @@
#include "ccp_pci.h"
-#include "ccp_pmd_private.h"
-
-static const char * const uio_module_names[] = {
- "igb_uio",
- "uio_pci_generic",
- "vfio_pci"
-};
-
-int
-ccp_check_pci_uio_module(void)
-{
- FILE *fp;
- int i;
- char buf[BUFSIZ];
-
- fp = fopen(PROC_MODULES, "r");
- if (fp == NULL)
- return -1;
- i = 0;
- while (uio_module_names[i] != NULL) {
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- if (!strncmp(buf, uio_module_names[i],
- strlen(uio_module_names[i]))) {
- fclose(fp);
- return i;
- }
- }
- i++;
- rewind(fp);
- }
- fclose(fp);
- CCP_LOG_DBG("Insert igb_uio or uio_pci_generic kernel module(s)");
- return -1;/* uio not inserted */
-}
/*
diff --git a/drivers/crypto/ccp/ccp_pci.h b/drivers/crypto/ccp/ccp_pci.h
index 7ed3bac406..f393a04d6f 100644
--- a/drivers/crypto/ccp/ccp_pci.h
+++ b/drivers/crypto/ccp/ccp_pci.h
@@ -11,7 +11,4 @@
#define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
-#define PROC_MODULES "/proc/modules"
-
-int ccp_check_pci_uio_module(void);
int ccp_parse_pci_addr_format(const char *buf, int bufsize, uint16_t *domain,
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index c5ec952e36..0d84c8cd0e 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -23,5 +23,4 @@ static unsigned int ccp_pmd_init_done;
uint8_t ccp_cryptodev_driver_id;
uint8_t cryptodev_cnt;
-extern void *sha_ctx;
struct ccp_pmd_init_params {
@@ -214,5 +213,4 @@ cryptodev_ccp_remove(struct rte_pci_device *pci_dev)
ccp_pmd_init_done = 0;
- rte_free(sha_ctx);
RTE_LOG(INFO, PMD, "Closing ccp device %s on numa socket %u\n",
@@ -301,5 +299,4 @@ cryptodev_ccp_probe(struct rte_pci_driver *pci_drv __rte_unused,
};
- sha_ctx = (void *)rte_malloc(NULL, SHA512_DIGEST_SIZE, 64);
if (ccp_pmd_init_done) {
RTE_LOG(INFO, PMD, "CCP PMD already initialized\n");
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.561726299 +0000
+++ 0030-crypto-ccp-fix-IOVA-handling.patch 2023-02-23 14:46:23.745235879 +0000
@@ -1 +1 @@
-From 9631fb8f10dfafb0547fbf9127b162e62b2bef43 Mon Sep 17 00:00:00 2001
+From b2c5b2d8a87130ea095a1b202460927caf0d4d82 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9631fb8f10dfafb0547fbf9127b162e62b2bef43 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index b21b32e507..2758187d93 100644
+index 4bab18323b..351d8ac63e 100644
@@ -98 +99 @@
-@@ -1593,12 +1576,6 @@ ccp_perform_hmac(struct rte_crypto_op *op,
+@@ -1595,12 +1578,6 @@ ccp_perform_hmac(struct rte_crypto_op *op,
@@ -113 +114 @@
-@@ -1682,8 +1659,5 @@ ccp_perform_hmac(struct rte_crypto_op *op,
+@@ -1684,8 +1661,5 @@ ccp_perform_hmac(struct rte_crypto_op *op,
@@ -123 +124 @@
-@@ -1771,12 +1745,6 @@ ccp_perform_sha(struct rte_crypto_op *op,
+@@ -1775,12 +1749,6 @@ ccp_perform_sha(struct rte_crypto_op *op,
@@ -138 +139 @@
-@@ -1866,13 +1834,6 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
+@@ -1872,13 +1840,6 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
@@ -154 +155 @@
-@@ -2010,11 +1971,6 @@ ccp_perform_sha3(struct rte_crypto_op *op,
+@@ -2018,11 +1979,6 @@ ccp_perform_sha3(struct rte_crypto_op *op,
@@ -168 +169 @@
-@@ -2090,11 +2046,5 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
+@@ -2100,11 +2056,5 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
@@ -181 +182 @@
-@@ -2134,10 +2084,5 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
+@@ -2144,10 +2094,5 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
@@ -193 +194 @@
-@@ -2329,10 +2274,5 @@ ccp_perform_3des(struct rte_crypto_op *op,
+@@ -2343,10 +2288,5 @@ ccp_perform_3des(struct rte_crypto_op *op,
@@ -205 +206 @@
-@@ -2357,9 +2297,5 @@ ccp_perform_3des(struct rte_crypto_op *op,
+@@ -2371,9 +2311,5 @@ ccp_perform_3des(struct rte_crypto_op *op,
@@ -216 +217 @@
-@@ -2747,10 +2683,5 @@ process_ops_to_enqueue(struct ccp_qp *qp,
+@@ -2769,10 +2705,5 @@ process_ops_to_enqueue(struct ccp_qp *qp,
@@ -229 +230 @@
-index 410e62121e..14c54929c4 100644
+index 3f00b2522b..54c568afd1 100644
@@ -245 +246 @@
-@@ -684,14 +683,8 @@ ccp_probe_devices(struct rte_pci_device *pci_dev,
+@@ -685,14 +684,8 @@ ccp_probe_devices(struct rte_pci_device *pci_dev,
@@ -304 +305 @@
-index 6736bf8ad3..d9a8b9dcc6 100644
+index 7ed3bac406..f393a04d6f 100644
@@ -316 +317 @@
-index bcb621234c..661a796116 100644
+index c5ec952e36..0d84c8cd0e 100644
@@ -325 +326 @@
-@@ -201,5 +200,4 @@ cryptodev_ccp_remove(struct rte_pci_device *pci_dev)
+@@ -214,5 +213,4 @@ cryptodev_ccp_remove(struct rte_pci_device *pci_dev)
@@ -331 +332 @@
-@@ -288,5 +286,4 @@ cryptodev_ccp_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -301,5 +299,4 @@ cryptodev_ccp_probe(struct rte_pci_driver *pci_drv __rte_unused,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'test/crypto: fix typo in AES test' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (28 preceding siblings ...)
2023-02-23 15:05 ` patch 'crypto/ccp: fix IOVA handling' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'test/crypto: add missing MAC-I to PDCP vectors' " Kevin Traynor
` (67 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Vikash Poddar; +Cc: Kai Ji, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/af7f9481e187d3fa4e2eae56e0b6acca92d86418
Thanks.
Kevin
---
From af7f9481e187d3fa4e2eae56e0b6acca92d86418 Mon Sep 17 00:00:00 2001
From: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Date: Mon, 30 Jan 2023 12:03:03 +0000
Subject: [PATCH] test/crypto: fix typo in AES test
[ upstream commit e57cdbec6f94558697e50402e4bfe1dce6186d52 ]
Fix the spelling of scater to scatter in cryptodev AES test vector
header file
Fixes: 2692b02e03b2 ("test/crypto: add multi-segment out-of-place AES-XTS")
Signed-off-by: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
app/test/test_cryptodev_aes_test_vectors.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
index a797af1b00..6c4f6b6f13 100644
--- a/app/test/test_cryptodev_aes_test_vectors.h
+++ b/app/test/test_cryptodev_aes_test_vectors.h
@@ -4690,5 +4690,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Encryption (512-byte plaintext"
- " Dataunit 512) Scater gather OOP",
+ " Dataunit 512) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_512,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
@@ -4698,5 +4698,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Decryption (512-byte plaintext"
- " Dataunit 512) Scater gather OOP",
+ " Dataunit 512) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_512,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
@@ -4706,5 +4706,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Encryption (512-byte plaintext"
- " Dataunit 0) Scater gather OOP",
+ " Dataunit 0) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_0,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
@@ -4714,5 +4714,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Decryption (512-byte plaintext"
- " Dataunit 0) Scater gather OOP",
+ " Dataunit 0) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_0,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
@@ -4722,5 +4722,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Encryption (4096-byte plaintext"
- " Dataunit 4096) Scater gather OOP",
+ " Dataunit 4096) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_4096,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
@@ -4730,5 +4730,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Decryption (4096-byte plaintext"
- " Dataunit 4096) Scater gather OOP",
+ " Dataunit 4096) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_4096,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
@@ -4738,5 +4738,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Encryption (4096-byte plaintext"
- " Dataunit 0) Scater gather OOP",
+ " Dataunit 0) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_0,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
@@ -4746,5 +4746,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
{
.test_descr = "AES-256-XTS Decryption (4096-byte plaintext"
- " Dataunit 0) Scater gather OOP",
+ " Dataunit 0) Scatter gather OOP",
.test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_0,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.586594403 +0000
+++ 0031-test-crypto-fix-typo-in-AES-test.patch 2023-02-23 14:46:23.748235889 +0000
@@ -1 +1 @@
-From e57cdbec6f94558697e50402e4bfe1dce6186d52 Mon Sep 17 00:00:00 2001
+From af7f9481e187d3fa4e2eae56e0b6acca92d86418 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e57cdbec6f94558697e50402e4bfe1dce6186d52 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +15,0 @@
- .mailmap | 1 +
@@ -17 +17 @@
- 2 files changed, 9 insertions(+), 8 deletions(-)
+ 1 file changed, 8 insertions(+), 8 deletions(-)
@@ -19,10 +18,0 @@
-diff --git a/.mailmap b/.mailmap
-index 6a91c11be4..5015494210 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -1390,4 +1390,5 @@ Vijay Srivastava <vijays@solarflare.com>
- Vikas Aggarwal <vikas.aggarwal@caviumnetworks.com>
- Vikas Gupta <vikas.gupta@broadcom.com>
-+Vikash Poddar <vikash.chandrax.poddar@intel.com>
- Vimal Chungath <vcchunga@amazon.com>
- Vincent Guo <guopengfei160@163.com>
@@ -30 +20 @@
-index ea7b21ce53..f3686beeb5 100644
+index a797af1b00..6c4f6b6f13 100644
@@ -33 +23 @@
-@@ -4970,5 +4970,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4690,5 +4690,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
@@ -40 +30 @@
-@@ -4980,5 +4980,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4698,5 +4698,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
@@ -47 +37 @@
-@@ -4990,5 +4990,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4706,5 +4706,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
@@ -54 +44 @@
-@@ -5000,5 +5000,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4714,5 +4714,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
@@ -61 +51 @@
-@@ -5010,5 +5010,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4722,5 +4722,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
@@ -68 +58 @@
-@@ -5020,5 +5020,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4730,5 +4730,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
@@ -75 +65 @@
-@@ -5030,5 +5030,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4738,5 +4738,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
@@ -82 +72 @@
-@@ -5040,5 +5040,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -4746,5 +4746,5 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'test/crypto: add missing MAC-I to PDCP vectors' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (29 preceding siblings ...)
2023-02-23 15:05 ` patch 'test/crypto: fix typo in AES test' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'compressdev: fix end of driver list' " Kevin Traynor
` (66 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Volodymyr Fialko; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/af78ee860e18accfeba4dfbad72c14d6a759e7cd
Thanks.
Kevin
---
From af78ee860e18accfeba4dfbad72c14d6a759e7cd Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko@marvell.com>
Date: Tue, 24 Jan 2023 17:39:24 +0100
Subject: [PATCH] test/crypto: add missing MAC-I to PDCP vectors
[ upstream commit 7b2ae9efa223b220f4699c1940a6ed530e063bf8 ]
Existing PDCP 12-bit C/U-plane output vectors with NULL encryption + NULL
integrity do not contain the MAC-I (32-bit of all zeros according to the
specification).
Vectors for other SN length (5, 18 bits) have the MAC-I set.
Fixes: d883e6e7131b ("test/crypto: add PDCP C-Plane encap cases")
Fixes: cca7d1f78524 ("test/crypto: add PDCP U-Plane encap with integrity cases")
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev_security_pdcp_test_vectors.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/test/test_cryptodev_security_pdcp_test_vectors.h b/app/test/test_cryptodev_security_pdcp_test_vectors.h
index c82bc50631..54c7e2420a 100644
--- a/app/test/test_cryptodev_security_pdcp_test_vectors.h
+++ b/app/test/test_cryptodev_security_pdcp_test_vectors.h
@@ -5545,5 +5545,5 @@ static uint8_t *pdcp_test_data_out[] = {
0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
/* Control Plane w/NULL enc. + NULL int. DL LONG SN */
(uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
@@ -5553,5 +5553,5 @@ static uint8_t *pdcp_test_data_out[] = {
0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
/* Control Plane w/NULL enc. + SNOW f9 int. UL LONG SN */
(uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
@@ -5939,5 +5939,5 @@ static uint8_t *pdcp_test_data_out[] = {
0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
/* User Plane w/NULL enc. + NULL int. DL for 12-bit SN */
(uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
@@ -5947,5 +5947,5 @@ static uint8_t *pdcp_test_data_out[] = {
0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
/* User Plane w/NULL enc. + SNOW f9 int. UL for 12-bit SN */
(uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.612444488 +0000
+++ 0032-test-crypto-add-missing-MAC-I-to-PDCP-vectors.patch 2023-02-23 14:46:23.752235903 +0000
@@ -1 +1 @@
-From 7b2ae9efa223b220f4699c1940a6ed530e063bf8 Mon Sep 17 00:00:00 2001
+From af78ee860e18accfeba4dfbad72c14d6a759e7cd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b2ae9efa223b220f4699c1940a6ed530e063bf8 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 6fdc4cd9e3..56d4884529 100644
+index c82bc50631..54c7e2420a 100644
@@ -25 +26 @@
-@@ -5561,5 +5561,5 @@ static uint8_t *pdcp_test_data_out[] = {
+@@ -5545,5 +5545,5 @@ static uint8_t *pdcp_test_data_out[] = {
@@ -32 +33 @@
-@@ -5569,5 +5569,5 @@ static uint8_t *pdcp_test_data_out[] = {
+@@ -5553,5 +5553,5 @@ static uint8_t *pdcp_test_data_out[] = {
@@ -39 +40 @@
-@@ -5955,5 +5955,5 @@ static uint8_t *pdcp_test_data_out[] = {
+@@ -5939,5 +5939,5 @@ static uint8_t *pdcp_test_data_out[] = {
@@ -46 +47 @@
-@@ -5963,5 +5963,5 @@ static uint8_t *pdcp_test_data_out[] = {
+@@ -5947,5 +5947,5 @@ static uint8_t *pdcp_test_data_out[] = {
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'compressdev: fix end of driver list' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (30 preceding siblings ...)
2023-02-23 15:05 ` patch 'test/crypto: add missing MAC-I to PDCP vectors' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/bnxt: fix Tx queue stats after queue stop and start' " Kevin Traynor
` (65 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Michael Baum; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/1ac27321977d54e6d2568afb753840c824fa1303
Thanks.
Kevin
---
From 1ac27321977d54e6d2568afb753840c824fa1303 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 1 Feb 2023 17:35:30 +0200
Subject: [PATCH] compressdev: fix end of driver list
[ upstream commit 33b84a2efca7ac188def108ba8b981daa7572b9a ]
The "rte_compressdev_info_get()" function retrieves the contextual
information of a device.
The output structure "dev_info" contains a list of devices supported
capabilities for each supported algorithm.
In this function description, it says the element after the last valid
element has op field set to "RTE_COMP_ALGO_LIST_END".
On the other hand, when this function used by
"rte_compressdev_capability_get()" function, it uses
"RTE_COMP_ALGO_UNSPECIFIED" as end of list as same as the
"RTE_COMP_END_OF_CAPABILITIES_LIST()".
The mlx5 and qat PMDs use "RTE_COMP_ALGO_LIST_END" as the end of
capabilities list. When "rte_compressdev_capability_get()" function is
called with unsupported algorithm, it might read memory out of bound.
This patch change the "rte_compressdev_info_get()" function description
to say using "RTE_COMP_ALGO_UNSPECIFIED" as the end of capabilities
list.
In addition, it moves both mlx5 and qat PMDs to use
"RTE_COMP_ALGO_UNSPECIFIED" through
"RTE_COMP_END_OF_CAPABILITIES_LIST()" macro.
Fixes: 5d432f364078 ("compressdev: add device capabilities")
Fixes: 2d148597ce76 ("compress/qat: add gen-specific implementation")
Fixes: 384bac8d6555 ("compress/mlx5: add supported capabilities")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/compress/mlx5/mlx5_compress.c | 4 +---
drivers/compress/qat/dev/qat_comp_pmd_gen1.c | 2 +-
drivers/compress/qat/dev/qat_comp_pmd_gen4.c | 2 +-
lib/compressdev/rte_compressdev.h | 2 +-
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index a18ec8a6cf..14365ec020 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -97,7 +97,5 @@ static const struct rte_compressdev_capabilities mlx5_caps[] = {
.window_size = {.min = 10, .max = 15, .increment = 1},
},
- {
- .algo = RTE_COMP_ALGO_LIST_END,
- }
+ RTE_COMP_END_OF_CAPABILITIES_LIST()
};
diff --git a/drivers/compress/qat/dev/qat_comp_pmd_gen1.c b/drivers/compress/qat/dev/qat_comp_pmd_gen1.c
index 12d9d89072..3a8484eef1 100644
--- a/drivers/compress/qat/dev/qat_comp_pmd_gen1.c
+++ b/drivers/compress/qat/dev/qat_comp_pmd_gen1.c
@@ -27,5 +27,5 @@ const struct rte_compressdev_capabilities qat_gen1_comp_capabilities[] = {
RTE_COMP_FF_STATEFUL_DECOMPRESSION,
.window_size = {.min = 15, .max = 15, .increment = 0} },
- {RTE_COMP_ALGO_LIST_END, 0, {0, 0, 0} } };
+ RTE_COMP_END_OF_CAPABILITIES_LIST() };
static int
diff --git a/drivers/compress/qat/dev/qat_comp_pmd_gen4.c b/drivers/compress/qat/dev/qat_comp_pmd_gen4.c
index 79b2ceb414..05906f13e0 100644
--- a/drivers/compress/qat/dev/qat_comp_pmd_gen4.c
+++ b/drivers/compress/qat/dev/qat_comp_pmd_gen4.c
@@ -26,5 +26,5 @@ qat_gen4_comp_capabilities[] = {
RTE_COMP_FF_OOP_LB_IN_SGL_OUT,
.window_size = {.min = 15, .max = 15, .increment = 0} },
- {RTE_COMP_ALGO_LIST_END, 0, {0, 0, 0} } };
+ RTE_COMP_END_OF_CAPABILITIES_LIST() };
static int
diff --git a/lib/compressdev/rte_compressdev.h b/lib/compressdev/rte_compressdev.h
index 2840c27c6c..d9b2fe40dc 100644
--- a/lib/compressdev/rte_compressdev.h
+++ b/lib/compressdev/rte_compressdev.h
@@ -354,5 +354,5 @@ rte_compressdev_stats_reset(uint8_t dev_id);
* element of an array of struct rte_compressdev_capabilities.
* The element after the last valid element has it's op field set to
- * RTE_COMP_ALGO_LIST_END.
+ * RTE_COMP_ALGO_UNSPECIFIED.
*/
__rte_experimental
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.638114361 +0000
+++ 0033-compressdev-fix-end-of-driver-list.patch 2023-02-23 14:46:23.754235910 +0000
@@ -1 +1 @@
-From 33b84a2efca7ac188def108ba8b981daa7572b9a Mon Sep 17 00:00:00 2001
+From 1ac27321977d54e6d2568afb753840c824fa1303 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 33b84a2efca7ac188def108ba8b981daa7572b9a ]
+
@@ -32 +33,0 @@
-Cc: stable@dpdk.org
@@ -44 +45 @@
-index fb2bda9745..459e4b5e8a 100644
+index a18ec8a6cf..14365ec020 100644
@@ -79 +80 @@
-index 42bda9fc79..7eb5c58798 100644
+index 2840c27c6c..d9b2fe40dc 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/bnxt: fix Tx queue stats after queue stop and start' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (31 preceding siblings ...)
2023-02-23 15:05 ` patch 'compressdev: fix end of driver list' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/bnxt: fix Rx " Kevin Traynor
` (64 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/aa0ecc4f913ab016eb48b508d01d2f4355027d2d
Thanks.
Kevin
---
From aa0ecc4f913ab016eb48b508d01d2f4355027d2d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 1 Feb 2023 09:50:12 +0530
Subject: [PATCH] net/bnxt: fix Tx queue stats after queue stop and start
[ upstream commit 9bd8998fe09736a048e367e1ef7543dd8b5dfd2c ]
The Tx queue stats are being reported incorrectly due to a workaround
for ring counters sometimes being reported as zero. When a queue is
stopped and started, the ring counter is reset to zero. The workaround
interprets the zero as incorrect, and sets the reported ring count as
the previously read value (from before the queue being restared). This
shows up as negative counters in testpmd's "show fwd stats" command.
The fix clears the prev counter for the queue when the queue is started.
Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_txr.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 3b8f2382f9..ec63b97fe2 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -552,4 +552,10 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
return rc;
+ /* reset the previous stats for the tx_queue since the counters
+ * will be cleared when the queue is started.
+ */
+ memset(&bp->prev_tx_ring_stats[tx_queue_id], 0,
+ sizeof(struct bnxt_ring_stats));
+
bnxt_free_hwrm_tx_ring(bp, tx_queue_id);
rc = bnxt_alloc_hwrm_tx_ring(bp, tx_queue_id);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.660667100 +0000
+++ 0034-net-bnxt-fix-Tx-queue-stats-after-queue-stop-and-sta.patch 2023-02-23 14:46:23.755235914 +0000
@@ -1 +1 @@
-From 9bd8998fe09736a048e367e1ef7543dd8b5dfd2c Mon Sep 17 00:00:00 2001
+From aa0ecc4f913ab016eb48b508d01d2f4355027d2d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9bd8998fe09736a048e367e1ef7543dd8b5dfd2c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 67e016775c..21c2217092 100644
+index 3b8f2382f9..ec63b97fe2 100644
@@ -27 +28 @@
-@@ -561,4 +561,10 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -552,4 +552,10 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/bnxt: fix Rx queue stats after queue stop and start' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (32 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/bnxt: fix Tx queue stats after queue stop and start' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/bnxt: fix RSS hash in mbuf' " Kevin Traynor
` (63 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Mike Baucom
Cc: Somnath Kotur, Kishore Padmanabha, Randy Schacher, Ajit Khaparde,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/20189c4886d0a3f08b1627289df6cef81ceedb5a
Thanks.
Kevin
---
From 20189c4886d0a3f08b1627289df6cef81ceedb5a Mon Sep 17 00:00:00 2001
From: Mike Baucom <michael.baucom@broadcom.com>
Date: Wed, 1 Feb 2023 09:50:13 +0530
Subject: [PATCH] net/bnxt: fix Rx queue stats after queue stop and start
[ upstream commit 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c ]
The Rx queue stats are being reported incorrectly due to a workaround
for ring counters sometimes being reported as zero. When a queue is
stopped and started, the ring counter is reset to zero. The workaround
interprets the zero as incorrect, and sets the reported ring count as
the previously read value (from before the queue being restared). This
shows up as negative counters in testpmd's "show fwd stats" command.
The fix clears the prev counter for the queue when the queue is started.
Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor")
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 4f2e0e7376..c38be2f348 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -473,4 +473,10 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
}
+ /* reset the previous stats for the rx_queue since the counters
+ * will be cleared when the queue is started.
+ */
+ memset(&bp->prev_rx_ring_stats[rx_queue_id], 0,
+ sizeof(struct bnxt_ring_stats));
+
/* Set the queue state to started here.
* We check the status of the queue while posting buffer.
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.682344415 +0000
+++ 0035-net-bnxt-fix-Rx-queue-stats-after-queue-stop-and-sta.patch 2023-02-23 14:46:23.755235914 +0000
@@ -1 +1 @@
-From 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c Mon Sep 17 00:00:00 2001
+From 20189c4886d0a3f08b1627289df6cef81ceedb5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index fabbbd4560..99758dd304 100644
+index 4f2e0e7376..c38be2f348 100644
@@ -30 +31 @@
-@@ -472,4 +472,10 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -473,4 +473,10 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/bnxt: fix RSS hash in mbuf' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (33 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/bnxt: fix Rx " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'event/cnxk: wait for CPT flow control on WQE path' " Kevin Traynor
` (62 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Venkat Duvvuru; +Cc: Kalesh AP, Kishore Padmanabha, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/2b15b1cd4a3994d5a09aa31990d7075d4caf9057
Thanks.
Kevin
---
From 2b15b1cd4a3994d5a09aa31990d7075d4caf9057 Mon Sep 17 00:00:00 2001
From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Date: Wed, 1 Feb 2023 09:50:14 +0530
Subject: [PATCH] net/bnxt: fix RSS hash in mbuf
[ upstream commit 031102f531e87e25174d4744c4ced92e5b291891 ]
By clearing mbuf->hash.fdir.id in the data path, the driver is
corrupting the RSS hash value populated in the mbuf as they
are defined as a union.
This patch fixes the problem by removing the code that clears
mbuf->hash.fdir.id.
Fixes: 17b6c8386d73 ("net/bnxt: fix mark handling")
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index b60c2470f3..4e56c7c99f 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -814,5 +814,4 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1,
skip_mark:
mbuf->hash.fdir.hi = 0;
- mbuf->hash.fdir.id = 0;
return 0;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.704875077 +0000
+++ 0036-net-bnxt-fix-RSS-hash-in-mbuf.patch 2023-02-23 14:46:23.757235921 +0000
@@ -1 +1 @@
-From 031102f531e87e25174d4744c4ced92e5b291891 Mon Sep 17 00:00:00 2001
+From 2b15b1cd4a3994d5a09aa31990d7075d4caf9057 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 031102f531e87e25174d4744c4ced92e5b291891 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index daaf9ffc1e..0eebddb05d 100644
+index b60c2470f3..4e56c7c99f 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'event/cnxk: wait for CPT flow control on WQE path' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (34 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/bnxt: fix RSS hash in mbuf' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'event/cnxk: fix burst timer arm' " Kevin Traynor
` (61 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Rahul Bhansali; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/da4a271c759b7107ca241d5302bb00017b3e4472
Thanks.
Kevin
---
From da4a271c759b7107ca241d5302bb00017b3e4472 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Thu, 19 Jan 2023 11:23:15 +0530
Subject: [PATCH] event/cnxk: wait for CPT flow control on WQE path
[ upstream commit d6ef4695c3b449259b29225e62bb6116ad420227 ]
Wait for CPT flow control on WQE path to avoid CPT queue
overflow and thereby a CPT misc interrupt.
Fixes: 1a7da795f64a ("net/cnxk: support Tx security offload on cn9k")
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
drivers/event/cnxk/cn9k_worker.h | 1 +
drivers/net/cnxk/cn9k_tx.h | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h
index 8abdd13b66..695e3ae429 100644
--- a/drivers/event/cnxk/cn9k_worker.h
+++ b/drivers/event/cnxk/cn9k_worker.h
@@ -586,4 +586,5 @@ cn9k_sso_hws_xmit_sec_one(const struct cn9k_eth_txq *txq, uint64_t base,
rte_io_wmb();
cn9k_sso_txq_fc_wait(txq);
+ cn9k_nix_sec_fc_wait_one(txq);
/* Write CPT instruction to lmt line */
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 66a59ab533..fe44ff4290 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -343,4 +343,14 @@ cn9k_nix_xmit_prep_lmt(uint64_t *cmd, void *lmt_addr, const uint32_t flags)
}
+static __rte_always_inline void
+cn9k_nix_sec_fc_wait_one(const struct cn9k_eth_txq *txq)
+{
+ uint64_t nb_desc = txq->cpt_desc;
+ uint64_t *fc = txq->cpt_fc;
+
+ while (nb_desc <= __atomic_load_n(fc, __ATOMIC_RELAXED))
+ ;
+}
+
static __rte_always_inline uint64_t
cn9k_nix_xmit_submit_lmt(const rte_iova_t io_addr)
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.726897048 +0000
+++ 0037-event-cnxk-wait-for-CPT-flow-control-on-WQE-path.patch 2023-02-23 14:46:23.759235928 +0000
@@ -1 +1 @@
-From d6ef4695c3b449259b29225e62bb6116ad420227 Mon Sep 17 00:00:00 2001
+From da4a271c759b7107ca241d5302bb00017b3e4472 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d6ef4695c3b449259b29225e62bb6116ad420227 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4c3932da47..d3c5180fbc 100644
+index 8abdd13b66..695e3ae429 100644
@@ -22 +23 @@
-@@ -731,4 +731,5 @@ cn9k_sso_hws_xmit_sec_one(const struct cn9k_eth_txq *txq, uint64_t base,
+@@ -586,4 +586,5 @@ cn9k_sso_hws_xmit_sec_one(const struct cn9k_eth_txq *txq, uint64_t base,
@@ -29 +30 @@
-index 404edd6aed..7362025a34 100644
+index 66a59ab533..fe44ff4290 100644
@@ -32 +33 @@
-@@ -389,4 +389,14 @@ cn9k_nix_xmit_prep_lmt(uint64_t *cmd, void *lmt_addr, const uint32_t flags)
+@@ -343,4 +343,14 @@ cn9k_nix_xmit_prep_lmt(uint64_t *cmd, void *lmt_addr, const uint32_t flags)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'event/cnxk: fix burst timer arm' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (35 preceding siblings ...)
2023-02-23 15:05 ` patch 'event/cnxk: wait for CPT flow control on WQE path' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'event/cnxk: fix timer operations in secondary process' " Kevin Traynor
` (60 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/45fb6a4f8af322609d5d41d95dbe2c38c9e7b38e
Thanks.
Kevin
---
From 45fb6a4f8af322609d5d41d95dbe2c38c9e7b38e Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Thu, 2 Feb 2023 13:40:24 +0530
Subject: [PATCH] event/cnxk: fix burst timer arm
[ upstream commit d8ae421431312a966e924a3064fdc43a92b3264e ]
Fix timer burst arm routine writing improper updates to the bucket.
Fixes: 5f644e1bd14c ("event/cnxk: add timer arm timeout burst")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/cnxk/cnxk_tim_worker.h | 91 ++++++++++++++--------------
1 file changed, 47 insertions(+), 44 deletions(-)
diff --git a/drivers/event/cnxk/cnxk_tim_worker.h b/drivers/event/cnxk/cnxk_tim_worker.h
index 2a6aa9eab2..24088ca05b 100644
--- a/drivers/event/cnxk/cnxk_tim_worker.h
+++ b/drivers/event/cnxk/cnxk_tim_worker.h
@@ -270,5 +270,6 @@ __retry:
#endif
- if (!(hbt_state & BIT_ULL(34))) {
+ if (!(hbt_state & BIT_ULL(34)) ||
+ !(hbt_state & GENMASK(31, 0))) {
cnxk_tim_bkt_dec_lock(bkt);
goto __retry;
@@ -352,5 +353,6 @@ __retry:
#endif
- if (!(hbt_state & BIT_ULL(34))) {
+ if (!(hbt_state & BIT_ULL(34)) ||
+ !(hbt_state & GENMASK(31, 0))) {
cnxk_tim_bkt_dec_lock(bkt);
goto __retry;
@@ -449,8 +451,8 @@ cnxk_tim_add_entry_brst(struct cnxk_tim_ring *const tim_ring,
struct cnxk_tim_bkt *mirr_bkt;
struct cnxk_tim_bkt *bkt;
- uint16_t chunk_remainder;
+ int16_t chunk_remainder;
uint16_t index = 0;
uint64_t lock_sema;
- int16_t rem, crem;
+ int16_t rem;
uint8_t lock_cnt;
@@ -460,7 +462,38 @@ __retry:
/* Only one thread beyond this. */
lock_sema = cnxk_tim_bkt_inc_lock(bkt);
+
+ /* Bucket related checks. */
+ if (unlikely(cnxk_tim_bkt_get_hbt(lock_sema))) {
+ if (cnxk_tim_bkt_get_nent(lock_sema) != 0) {
+ uint64_t hbt_state;
+#ifdef RTE_ARCH_ARM64
+ asm volatile(PLT_CPU_FEATURE_PREAMBLE
+ " ldxr %[hbt], [%[w1]] \n"
+ " tbz %[hbt], 33, dne%= \n"
+ " sevl \n"
+ "rty%=: wfe \n"
+ " ldxr %[hbt], [%[w1]] \n"
+ " tbnz %[hbt], 33, rty%= \n"
+ "dne%=: \n"
+ : [hbt] "=&r"(hbt_state)
+ : [w1] "r"((&bkt->w1))
+ : "memory");
+#else
+ do {
+ hbt_state = __atomic_load_n(&bkt->w1,
+ __ATOMIC_RELAXED);
+ } while (hbt_state & BIT_ULL(33));
+#endif
+
+ if (!(hbt_state & BIT_ULL(34)) ||
+ !(hbt_state & GENMASK(31, 0))) {
+ cnxk_tim_bkt_dec_lock(bkt);
+ goto __retry;
+ }
+ }
+ }
+
lock_cnt = (uint8_t)((lock_sema >> TIM_BUCKET_W1_S_LOCK) &
TIM_BUCKET_W1_M_LOCK);
-
if (lock_cnt) {
cnxk_tim_bkt_dec_lock(bkt);
@@ -486,42 +519,11 @@ __retry:
}
- /* Bucket related checks. */
- if (unlikely(cnxk_tim_bkt_get_hbt(lock_sema))) {
- if (cnxk_tim_bkt_get_nent(lock_sema) != 0) {
- uint64_t hbt_state;
-#ifdef RTE_ARCH_ARM64
- asm volatile(PLT_CPU_FEATURE_PREAMBLE
- " ldxr %[hbt], [%[w1]] \n"
- " tbz %[hbt], 33, dne%= \n"
- " sevl \n"
- "rty%=: wfe \n"
- " ldxr %[hbt], [%[w1]] \n"
- " tbnz %[hbt], 33, rty%= \n"
- "dne%=: \n"
- : [hbt] "=&r"(hbt_state)
- : [w1] "r"((&bkt->w1))
- : "memory");
-#else
- do {
- hbt_state = __atomic_load_n(&bkt->w1,
- __ATOMIC_RELAXED);
- } while (hbt_state & BIT_ULL(33));
-#endif
-
- if (!(hbt_state & BIT_ULL(34))) {
- cnxk_tim_bkt_dec_lock(bkt);
- goto __retry;
- }
- }
- }
-
chunk_remainder = cnxk_tim_bkt_fetch_rem(lock_sema);
rem = chunk_remainder - nb_timers;
if (rem < 0) {
- crem = tim_ring->nb_chunk_slots - chunk_remainder;
- if (chunk_remainder && crem) {
+ if (chunk_remainder > 0) {
chunk = ((struct cnxk_tim_ent *)
mirr_bkt->current_chunk) +
- crem;
+ tim_ring->nb_chunk_slots - chunk_remainder;
index = cnxk_tim_cpy_wrk(index, chunk_remainder, chunk,
@@ -537,16 +539,17 @@ __retry:
if (unlikely(chunk == NULL)) {
- cnxk_tim_bkt_dec_lock(bkt);
+ cnxk_tim_bkt_dec_lock_relaxed(bkt);
rte_errno = ENOMEM;
tim[index]->state = RTE_EVENT_TIMER_ERROR;
- return crem;
+ return index;
}
*(uint64_t *)(chunk + tim_ring->nb_chunk_slots) = 0;
mirr_bkt->current_chunk = (uintptr_t)chunk;
- cnxk_tim_cpy_wrk(index, nb_timers, chunk, tim, ents, bkt);
+ index = cnxk_tim_cpy_wrk(index, nb_timers, chunk, tim, ents,
+ bkt) -
+ index;
- rem = nb_timers - chunk_remainder;
- cnxk_tim_bkt_set_rem(bkt, tim_ring->nb_chunk_slots - rem);
- cnxk_tim_bkt_add_nent(bkt, rem);
+ cnxk_tim_bkt_set_rem(bkt, tim_ring->nb_chunk_slots - index);
+ cnxk_tim_bkt_add_nent(bkt, index);
} else {
chunk = (struct cnxk_tim_ent *)mirr_bkt->current_chunk;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.750212279 +0000
+++ 0038-event-cnxk-fix-burst-timer-arm.patch 2023-02-23 14:46:23.759235928 +0000
@@ -1 +1 @@
-From d8ae421431312a966e924a3064fdc43a92b3264e Mon Sep 17 00:00:00 2001
+From 45fb6a4f8af322609d5d41d95dbe2c38c9e7b38e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d8ae421431312a966e924a3064fdc43a92b3264e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 16909ef06d..5fa1acca90 100644
+index 2a6aa9eab2..24088ca05b 100644
@@ -20 +21 @@
-@@ -273,5 +273,6 @@ __retry:
+@@ -270,5 +270,6 @@ __retry:
@@ -28 +29 @@
-@@ -355,5 +356,6 @@ __retry:
+@@ -352,5 +353,6 @@ __retry:
@@ -36 +37 @@
-@@ -452,8 +454,8 @@ cnxk_tim_add_entry_brst(struct cnxk_tim_ring *const tim_ring,
+@@ -449,8 +451,8 @@ cnxk_tim_add_entry_brst(struct cnxk_tim_ring *const tim_ring,
@@ -47 +48 @@
-@@ -463,7 +465,38 @@ __retry:
+@@ -460,7 +462,38 @@ __retry:
@@ -87 +88 @@
-@@ -489,42 +522,11 @@ __retry:
+@@ -486,42 +519,11 @@ __retry:
@@ -132 +133 @@
-@@ -540,16 +542,17 @@ __retry:
+@@ -537,16 +539,17 @@ __retry:
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'event/cnxk: fix timer operations in secondary process' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (36 preceding siblings ...)
2023-02-23 15:05 ` patch 'event/cnxk: fix burst timer arm' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'mem: fix hugepage info mapping' " Kevin Traynor
` (59 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/9b7ac0283708ebb7a5372d4d704a4db1f379b827
Thanks.
Kevin
---
From 9b7ac0283708ebb7a5372d4d704a4db1f379b827 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Sun, 5 Feb 2023 12:03:47 +0530
Subject: [PATCH] event/cnxk: fix timer operations in secondary process
[ upstream commit 5f3d1c4ad7c35fb1eeb654b27019798ee6245a4b ]
Fix event timer fast-path ops not being initialized in secondary
process.
Fixes: dd519f83dd96 ("event/cnxk: add timer adapter capabilities")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/cnxk/cnxk_tim_evdev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c
index 99b3acee7c..ffecdb7448 100644
--- a/drivers/event/cnxk/cnxk_tim_evdev.c
+++ b/drivers/event/cnxk/cnxk_tim_evdev.c
@@ -357,4 +357,5 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
{
struct cnxk_tim_evdev *dev = cnxk_tim_priv_get();
+ struct cnxk_tim_ring *tim_ring;
RTE_SET_USED(flags);
@@ -377,4 +378,10 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
dev->event_dev = (struct rte_eventdev *)(uintptr_t)evdev;
*caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT;
+
+ tim_ring = ((struct rte_event_timer_adapter_data
+ *)((char *)caps - offsetof(struct rte_event_timer_adapter_data, caps)))
+ ->adapter_priv;
+ if (tim_ring != NULL && rte_eal_process_type() == RTE_PROC_SECONDARY)
+ cnxk_tim_set_fp_ops(tim_ring);
*ops = &cnxk_tim_ops;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.772153390 +0000
+++ 0039-event-cnxk-fix-timer-operations-in-secondary-process.patch 2023-02-23 14:46:23.760235931 +0000
@@ -1 +1 @@
-From 5f3d1c4ad7c35fb1eeb654b27019798ee6245a4b Mon Sep 17 00:00:00 2001
+From 9b7ac0283708ebb7a5372d4d704a4db1f379b827 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f3d1c4ad7c35fb1eeb654b27019798ee6245a4b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 6ff3ca72f7..f2862f3292 100644
+index 99b3acee7c..ffecdb7448 100644
@@ -21 +22 @@
-@@ -379,4 +379,5 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
+@@ -357,4 +357,5 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
@@ -27,3 +28,3 @@
-@@ -401,4 +402,10 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
- *caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT |
- RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC;
+@@ -377,4 +378,10 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
+ dev->event_dev = (struct rte_eventdev *)(uintptr_t)evdev;
+ *caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT;
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'mem: fix hugepage info mapping' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (37 preceding siblings ...)
2023-02-23 15:05 ` patch 'event/cnxk: fix timer operations in secondary process' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'raw/ifpga/base: fix init with multi-process' " Kevin Traynor
` (58 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Chengwen Feng; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/8a411e66c309ccbc1c5c00f92979a52de1ac794d
Thanks.
Kevin
---
From 8a411e66c309ccbc1c5c00f92979a52de1ac794d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 6 Feb 2023 10:53:10 +0000
Subject: [PATCH] mem: fix hugepage info mapping
[ upstream commit 66e7ac416f3d62c5ee773ff02c115a24da9f1991 ]
The map_shared_memory() function should treat mmap MAP_FAILED as NULL
because callers compare it with NULL to determine whether the map is
failed.
Fixes: 764bf26873b9 ("add FreeBSD support")
Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
lib/eal/freebsd/eal_hugepage_info.c | 2 +-
lib/eal/linux/eal_hugepage_info.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/eal/freebsd/eal_hugepage_info.c b/lib/eal/freebsd/eal_hugepage_info.c
index 9dbe375bd3..e58e618469 100644
--- a/lib/eal/freebsd/eal_hugepage_info.c
+++ b/lib/eal/freebsd/eal_hugepage_info.c
@@ -34,5 +34,5 @@ map_shared_memory(const char *filename, const size_t mem_size, int flags)
retval = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
close(fd);
- return retval;
+ return retval == MAP_FAILED ? NULL : retval;
}
diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c
index 9fb0e968db..682875ce3e 100644
--- a/lib/eal/linux/eal_hugepage_info.c
+++ b/lib/eal/linux/eal_hugepage_info.c
@@ -58,5 +58,5 @@ map_shared_memory(const char *filename, const size_t mem_size, int flags)
MAP_SHARED, fd, 0);
close(fd);
- return retval;
+ return retval == MAP_FAILED ? NULL : retval;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.793557405 +0000
+++ 0040-mem-fix-hugepage-info-mapping.patch 2023-02-23 14:46:23.761235935 +0000
@@ -1 +1 @@
-From 66e7ac416f3d62c5ee773ff02c115a24da9f1991 Mon Sep 17 00:00:00 2001
+From 8a411e66c309ccbc1c5c00f92979a52de1ac794d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66e7ac416f3d62c5ee773ff02c115a24da9f1991 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index a1b6cb31ff..24411d9c5b 100644
+index 9fb0e968db..682875ce3e 100644
@@ -36 +37 @@
-@@ -51,5 +51,5 @@ map_shared_memory(const char *filename, const size_t mem_size, int flags)
+@@ -58,5 +58,5 @@ map_shared_memory(const char *filename, const size_t mem_size, int flags)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'raw/ifpga/base: fix init with multi-process' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (38 preceding siblings ...)
2023-02-23 15:05 ` patch 'mem: fix hugepage info mapping' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'telemetry: fix repeat display when callback don't init dict' " Kevin Traynor
` (57 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/13bf4f461a14c299c699157de8c8ce331194f3a5
Thanks.
Kevin
---
From 13bf4f461a14c299c699157de8c8ce331194f3a5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 6 Feb 2023 10:53:11 +0000
Subject: [PATCH] raw/ifpga/base: fix init with multi-process
[ upstream commit e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 ]
The MAP_FAILED should be used to determine whether the mapping is
successful.
Fixes: e41856b515ce ("raw/ifpga/base: enhance driver reliability in multi-process")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/raw/ifpga/base/opae_hw_api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/raw/ifpga/base/opae_hw_api.c b/drivers/raw/ifpga/base/opae_hw_api.c
index 11c9887c7f..45efe70473 100644
--- a/drivers/raw/ifpga/base/opae_hw_api.c
+++ b/drivers/raw/ifpga/base/opae_hw_api.c
@@ -381,5 +381,5 @@ static pthread_mutex_t *opae_adapter_mutex_open(struct opae_adapter *adapter)
shm_id, 0);
adapter->lock = (pthread_mutex_t *)ptr;
- if (ptr) {
+ if (ptr != MAP_FAILED) {
dev_info(NULL,
"shared memory %s address is %p\n",
@@ -500,5 +500,5 @@ static void *opae_adapter_shm_alloc(struct opae_adapter *adapter)
adapter->shm.ptr = mmap(NULL, size, PROT_READ | PROT_WRITE,
MAP_SHARED, shm_id, 0);
- if (adapter->shm.ptr) {
+ if (adapter->shm.ptr != MAP_FAILED) {
dev_info(NULL,
"shared memory %s address is %p\n",
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.816044049 +0000
+++ 0041-raw-ifpga-base-fix-init-with-multi-process.patch 2023-02-23 14:46:23.762235938 +0000
@@ -1 +1 @@
-From e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 Mon Sep 17 00:00:00 2001
+From 13bf4f461a14c299c699157de8c8ce331194f3a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 1117c3e160..6d48d227d6 100644
+index 11c9887c7f..45efe70473 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'telemetry: fix repeat display when callback don't init dict' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (39 preceding siblings ...)
2023-02-23 15:05 ` patch 'raw/ifpga/base: fix init with multi-process' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'eal/linux: fix hugetlbfs sub-directories discovery' " Kevin Traynor
` (56 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/bb9295b2f3e8a81220f609014b03eb91d2d9e132
Thanks.
Kevin
---
From bb9295b2f3e8a81220f609014b03eb91d2d9e132 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 9 Feb 2023 01:25:33 +0000
Subject: [PATCH] telemetry: fix repeat display when callback don't init dict
[ upstream commit ff50c4f9136781bae9089c596e0a12d113e1d474 ]
When a telemetry callback doesn't initialize the telemetry data
structure and returns a non-negative number, the telemetry will repeat
to display the last result. This patch zero the data structure to avoid
the problem.
Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/telemetry/telemetry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index e5ccfe47f7..9ff0def182 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -329,5 +329,5 @@ static void
perform_command(telemetry_cb fn, const char *cmd, const char *param, int s)
{
- struct rte_tel_data data;
+ struct rte_tel_data data = {0};
int ret = fn(cmd, param, &data);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.837857880 +0000
+++ 0042-telemetry-fix-repeat-display-when-callback-don-t-ini.patch 2023-02-23 14:46:23.762235938 +0000
@@ -1 +1 @@
-From ff50c4f9136781bae9089c596e0a12d113e1d474 Mon Sep 17 00:00:00 2001
+From bb9295b2f3e8a81220f609014b03eb91d2d9e132 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff50c4f9136781bae9089c596e0a12d113e1d474 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 655191bcf1..7bceadcee7 100644
+index e5ccfe47f7..9ff0def182 100644
@@ -24 +25 @@
-@@ -334,5 +334,5 @@ static void
+@@ -329,5 +329,5 @@ static void
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'eal/linux: fix hugetlbfs sub-directories discovery' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (40 preceding siblings ...)
2023-02-23 15:05 ` patch 'telemetry: fix repeat display when callback don't init dict' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'test/mbuf: fix mbuf reset test' " Kevin Traynor
` (55 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Ashish Sadanandan; +Cc: John Levon, Julien Meunier, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/26b4d5a198296b02d4bd4f7f6117149777cc68ab
Thanks.
Kevin
---
From 26b4d5a198296b02d4bd4f7f6117149777cc68ab Mon Sep 17 00:00:00 2001
From: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Date: Sun, 8 Jan 2023 18:52:39 -0700
Subject: [PATCH] eal/linux: fix hugetlbfs sub-directories discovery
[ upstream commit f9d1ef28619a2dd16cafca36f5a5ca6d3315c5fc ]
The code added for allowing --huge-dir to specify hugetlbfs
sub-directories has a bug where it incorrectly matches mounts that
contain a prefix of the specified --huge-dir.
Consider --huge-dir=/dev/hugepages1G is passed to rte_eal_init. Given
the following hugetlbfs mounts
$ mount | grep hugetlbfs
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
hugetlbfs on /dev/hugepages1G type hugetlbfs (rw,relatime,pagesize=1024M)
hugetlbfs on /mnt/huge type hugetlbfs (rw,relatime,pagesize=2M)
get_hugepage_dir is first called with hugepage_sz=2097152. While
iterating over all mount points, /dev/hugepages is incorrectly
determined to be a match because it's a prefix of --huge-dir. The caller
then obtains an exclusive lock on --huge-dir.
In the next call to get_hugepage_dir, hugepage_sz=1073741824. This call
correctly determines /dev/hugepages1G is a match. The caller again
attempts to obtain an exclusive lock on --huge-dir and deadlocks because
it's already holding a lock.
This has been corrected by ensuring any matched mount point is either an
exact match or a parent path of --huge-dir.
Fixes: 24d5a1ce6b85 ("eal/linux: allow hugetlbfs sub-directories")
Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Tested-by: Julien Meunier <julien.meunier@nokia.com>
---
lib/eal/linux/eal_hugepage_info.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c
index 682875ce3e..393e37bfb6 100644
--- a/lib/eal/linux/eal_hugepage_info.c
+++ b/lib/eal/linux/eal_hugepage_info.c
@@ -218,4 +218,6 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
const struct internal_config *internal_conf =
eal_get_internal_configuration();
+ const size_t hugepage_dir_len = (internal_conf->hugepage_dir != NULL) ?
+ strlen(internal_conf->hugepage_dir) : 0;
struct stat st;
@@ -237,4 +239,5 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
while (fgets(buf, sizeof(buf), fd)){
const char *pagesz_str;
+ size_t mountpt_len = 0;
if (rte_strsplit(buf, sizeof(buf), splitstr, _FIELDNAME_MAX,
@@ -269,10 +272,14 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
}
+ mountpt_len = strlen(splitstr[MOUNTPT]);
+
/*
- * Ignore any mount that doesn't contain the --huge-dir
- * directory.
+ * Ignore any mount that doesn't contain the --huge-dir directory
+ * or where mount point is not a parent path of --huge-dir
*/
if (strncmp(internal_conf->hugepage_dir, splitstr[MOUNTPT],
- strlen(splitstr[MOUNTPT])) != 0) {
+ mountpt_len) != 0 ||
+ (hugepage_dir_len > mountpt_len &&
+ internal_conf->hugepage_dir[mountpt_len] != '/')) {
continue;
}
@@ -282,5 +289,5 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
* (so /mnt/1 is preferred over /mnt for matching /mnt/1/2)).
*/
- if (strlen(splitstr[MOUNTPT]) > strlen(found))
+ if (mountpt_len > strlen(found))
strlcpy(found, splitstr[MOUNTPT], len);
} /* end while fgets */
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.859864560 +0000
+++ 0043-eal-linux-fix-hugetlbfs-sub-directories-discovery.patch 2023-02-23 14:46:23.763235942 +0000
@@ -1 +1 @@
-From f9d1ef28619a2dd16cafca36f5a5ca6d3315c5fc Mon Sep 17 00:00:00 2001
+From 26b4d5a198296b02d4bd4f7f6117149777cc68ab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f9d1ef28619a2dd16cafca36f5a5ca6d3315c5fc ]
+
@@ -32 +33,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index 24411d9c5b..581d9dfc91 100644
+index 682875ce3e..393e37bfb6 100644
@@ -45 +46 @@
-@@ -215,4 +215,6 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
+@@ -218,4 +218,6 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
@@ -52 +53 @@
-@@ -234,4 +236,5 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
+@@ -237,4 +239,5 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
@@ -58 +59 @@
-@@ -266,10 +269,14 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
+@@ -269,10 +272,14 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
@@ -76 +77 @@
-@@ -279,5 +286,5 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
+@@ -282,5 +289,5 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'test/mbuf: fix mbuf reset test' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (41 preceding siblings ...)
2023-02-23 15:05 ` patch 'eal/linux: fix hugetlbfs sub-directories discovery' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'eventdev/timer: fix overflow' " Kevin Traynor
` (54 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Jie Hai; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/5f55f9989c731ea37ddf1150ccee3a78daeb4252
Thanks.
Kevin
---
From 5f55f9989c731ea37ddf1150ccee3a78daeb4252 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 31 Jan 2023 10:48:51 +0800
Subject: [PATCH] test/mbuf: fix mbuf reset test
[ upstream commit bf47fb83a61a4bc6bf45e1ec6e3ddd239a856190 ]
Retest "mbuf_autotest" will fail because the mbuf pool was
not freed after previous test successful done.
This patch fixes it.
Fixes: efc6f9104c80 ("mbuf: fix reset on mbuf free")
Signed-off-by: Jie Hai <haijie1@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_mbuf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 2a037a12da..02b4a92db9 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2766,4 +2766,5 @@ test_nb_segs_and_next_reset(void)
GOTO_FAIL("nb_segs or next was not reset properly");
+ rte_mempool_free(pool);
return 0;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.881626609 +0000
+++ 0044-test-mbuf-fix-mbuf-reset-test.patch 2023-02-23 14:46:23.765235948 +0000
@@ -1 +1 @@
-From bf47fb83a61a4bc6bf45e1ec6e3ddd239a856190 Mon Sep 17 00:00:00 2001
+From 5f55f9989c731ea37ddf1150ccee3a78daeb4252 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf47fb83a61a4bc6bf45e1ec6e3ddd239a856190 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 53fe898a38..6cbb03b0af 100644
+index 2a037a12da..02b4a92db9 100644
@@ -23 +24 @@
-@@ -2765,4 +2765,5 @@ test_nb_segs_and_next_reset(void)
+@@ -2766,4 +2766,5 @@ test_nb_segs_and_next_reset(void)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'eventdev/timer: fix overflow' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (42 preceding siblings ...)
2023-02-23 15:05 ` patch 'test/mbuf: fix mbuf reset test' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'vhost: decrease log level for unimplemented requests' " Kevin Traynor
` (53 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Erik Gabriel Carrillo; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/02397094e9874acb172dcba4e4d095d5389b63bd
Thanks.
Kevin
---
From 02397094e9874acb172dcba4e4d095d5389b63bd Mon Sep 17 00:00:00 2001
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Date: Thu, 9 Feb 2023 09:13:49 -0600
Subject: [PATCH] eventdev/timer: fix overflow
[ upstream commit 13aba5f88d2e1bd8644a2d52fd6b1e4fc73fc3ca ]
The software timer adapter converts event timer timeout ticks to a
number of TSC cycles at which an rte_timer should expire. The
computation uses an integer multiplication that can result in overflow.
If necessary, reduce the timeout_nsecs value by the number of whole
seconds it contains to keep the value of the multiplier within a
range that will not result in overflow. Add the saved value back later
to get the final result. Also, move the logic that checks the timeout
range into the function that performs the above computation.
Fixes: 6750b21bd6af ("eventdev: add default software timer adapter")
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
lib/eventdev/rte_event_timer_adapter.c | 97 ++++++++++++++++----------
1 file changed, 59 insertions(+), 38 deletions(-)
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index 9dad170b5a..5fad079be2 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -20,4 +20,5 @@
#include <rte_service_component.h>
#include <rte_cycles.h>
+#include <rte_reciprocal.h>
#include "event_timer_adapter_pmd.h"
@@ -678,11 +679,49 @@ swtim_callback(struct rte_timer *tim)
}
-static __rte_always_inline uint64_t
+static __rte_always_inline int
get_timeout_cycles(struct rte_event_timer *evtim,
- const struct rte_event_timer_adapter *adapter)
+ const struct rte_event_timer_adapter *adapter,
+ uint64_t *timeout_cycles)
{
- struct swtim *sw = swtim_pmd_priv(adapter);
- uint64_t timeout_ns = evtim->timeout_ticks * sw->timer_tick_ns;
- return timeout_ns * rte_get_timer_hz() / NSECPERSEC;
+ static struct rte_reciprocal_u64 nsecpersec_inverse;
+ static uint64_t timer_hz;
+ uint64_t rem_cycles, secs_cycles = 0;
+ uint64_t secs, timeout_nsecs;
+ uint64_t nsecpersec;
+ struct swtim *sw;
+
+ sw = swtim_pmd_priv(adapter);
+ nsecpersec = (uint64_t)NSECPERSEC;
+
+ timeout_nsecs = evtim->timeout_ticks * sw->timer_tick_ns;
+ if (timeout_nsecs > sw->max_tmo_ns)
+ return -1;
+ if (timeout_nsecs < sw->timer_tick_ns)
+ return -2;
+
+ /* Set these values in the first invocation */
+ if (!timer_hz) {
+ timer_hz = rte_get_timer_hz();
+ nsecpersec_inverse = rte_reciprocal_value_u64(nsecpersec);
+ }
+
+ /* If timeout_nsecs > nsecpersec, decrease timeout_nsecs by the number
+ * of whole seconds it contains and convert that value to a number
+ * of cycles. This keeps timeout_nsecs in the interval [0..nsecpersec)
+ * in order to avoid overflow when we later multiply by timer_hz.
+ */
+ if (timeout_nsecs > nsecpersec) {
+ secs = rte_reciprocal_divide_u64(timeout_nsecs,
+ &nsecpersec_inverse);
+ secs_cycles = secs * timer_hz;
+ timeout_nsecs -= secs * nsecpersec;
+ }
+
+ rem_cycles = rte_reciprocal_divide_u64(timeout_nsecs * timer_hz,
+ &nsecpersec_inverse);
+
+ *timeout_cycles = secs_cycles + rem_cycles;
+
+ return 0;
}
@@ -718,21 +757,4 @@ swtim_did_tick(struct swtim *sw)
}
-/* Check that event timer timeout value is in range */
-static __rte_always_inline int
-check_timeout(struct rte_event_timer *evtim,
- const struct rte_event_timer_adapter *adapter)
-{
- uint64_t tmo_nsec;
- struct swtim *sw = swtim_pmd_priv(adapter);
-
- tmo_nsec = evtim->timeout_ticks * sw->timer_tick_ns;
- if (tmo_nsec > sw->max_tmo_ns)
- return -1;
- if (tmo_nsec < sw->timer_tick_ns)
- return -2;
-
- return 0;
-}
-
/* Check that event timer event queue sched type matches destination event queue
* sched type
@@ -1108,19 +1130,4 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
}
- ret = check_timeout(evtims[i], adapter);
- if (unlikely(ret == -1)) {
- __atomic_store_n(&evtims[i]->state,
- RTE_EVENT_TIMER_ERROR_TOOLATE,
- __ATOMIC_RELAXED);
- rte_errno = EINVAL;
- break;
- } else if (unlikely(ret == -2)) {
- __atomic_store_n(&evtims[i]->state,
- RTE_EVENT_TIMER_ERROR_TOOEARLY,
- __ATOMIC_RELAXED);
- rte_errno = EINVAL;
- break;
- }
-
if (unlikely(check_destination_event_queue(evtims[i],
adapter) < 0)) {
@@ -1138,5 +1145,19 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
evtims[i]->impl_opaque[1] = (uintptr_t)adapter;
- cycles = get_timeout_cycles(evtims[i], adapter);
+ ret = get_timeout_cycles(evtims[i], adapter, &cycles);
+ if (unlikely(ret == -1)) {
+ __atomic_store_n(&evtims[i]->state,
+ RTE_EVENT_TIMER_ERROR_TOOLATE,
+ __ATOMIC_RELAXED);
+ rte_errno = EINVAL;
+ break;
+ } else if (unlikely(ret == -2)) {
+ __atomic_store_n(&evtims[i]->state,
+ RTE_EVENT_TIMER_ERROR_TOOEARLY,
+ __ATOMIC_RELAXED);
+ rte_errno = EINVAL;
+ break;
+ }
+
ret = rte_timer_alt_reset(sw->timer_data_id, tim, cycles,
SINGLE, lcore_id, NULL, evtims[i]);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.904932935 +0000
+++ 0045-eventdev-timer-fix-overflow.patch 2023-02-23 14:46:23.766235952 +0000
@@ -1 +1 @@
-From 13aba5f88d2e1bd8644a2d52fd6b1e4fc73fc3ca Mon Sep 17 00:00:00 2001
+From 02397094e9874acb172dcba4e4d095d5389b63bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13aba5f88d2e1bd8644a2d52fd6b1e4fc73fc3ca ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7f4f347369..23eb1d4a7d 100644
+index 9dad170b5a..5fad079be2 100644
@@ -28 +29 @@
-@@ -19,4 +19,5 @@
+@@ -20,4 +20,5 @@
@@ -30 +31 @@
- #include <rte_telemetry.h>
+ #include <rte_cycles.h>
@@ -34 +35 @@
-@@ -735,11 +736,49 @@ swtim_callback(struct rte_timer *tim)
+@@ -678,11 +679,49 @@ swtim_callback(struct rte_timer *tim)
@@ -89 +90 @@
-@@ -775,21 +814,4 @@ swtim_did_tick(struct swtim *sw)
+@@ -718,21 +757,4 @@ swtim_did_tick(struct swtim *sw)
@@ -111 +112 @@
-@@ -1211,19 +1233,4 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1108,19 +1130,4 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
@@ -131 +132 @@
-@@ -1241,5 +1248,19 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1138,5 +1145,19 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
@@ -151 +152 @@
- type, lcore_id, NULL, evtims[i]);
+ SINGLE, lcore_id, NULL, evtims[i]);
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'vhost: decrease log level for unimplemented requests' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (43 preceding siblings ...)
2023-02-23 15:05 ` patch 'eventdev/timer: fix overflow' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'vhost: fix possible FD leaks on truncation' " Kevin Traynor
` (52 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Chenbo Xia, Kevin Traynor, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/f05708ea45fc7511b70590df16155574445955a5
Thanks.
Kevin
---
From f05708ea45fc7511b70590df16155574445955a5 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 6 Feb 2023 16:07:33 +0100
Subject: [PATCH] vhost: decrease log level for unimplemented requests
[ upstream commit 43ccd55fdd6ab34b55060045594cc21aefa74383 ]
This patch changes VHOST_USER_SET_VRING_ERR and
VHOST_USER_SET_LOG_FD "not implemented" log levels from
INFO to DEBUG, as implementing these requests is not
mandatory. Having them being displayed at INFO level
may induce some confusion to the end-user.
Fixes: fd29c33b651a ("vhost: handle unsupported message types in functions")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
lib/vhost/vhost_user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 2b45e35d4a..76c3c27fc1 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1848,5 +1848,5 @@ static int vhost_user_set_vring_err(struct virtio_net **pdev __rte_unused,
if (!(msg->payload.u64 & VHOST_USER_VRING_NOFD_MASK))
close(msg->fds[0]);
- VHOST_LOG_CONFIG(INFO, "not implemented\n");
+ VHOST_LOG_CONFIG(DEBUG, "not implemented\n");
return RTE_VHOST_MSG_RESULT_OK;
@@ -2379,5 +2379,5 @@ static int vhost_user_set_log_fd(struct virtio_net **pdev __rte_unused,
close(msg->fds[0]);
- VHOST_LOG_CONFIG(INFO, "not implemented.\n");
+ VHOST_LOG_CONFIG(DEBUG, "not implemented.\n");
return RTE_VHOST_MSG_RESULT_OK;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.927731072 +0000
+++ 0046-vhost-decrease-log-level-for-unimplemented-requests.patch 2023-02-23 14:46:23.769235962 +0000
@@ -1 +1 @@
-From 43ccd55fdd6ab34b55060045594cc21aefa74383 Mon Sep 17 00:00:00 2001
+From f05708ea45fc7511b70590df16155574445955a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 43ccd55fdd6ab34b55060045594cc21aefa74383 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 8c1d60b76b..b4236820a2 100644
+index 2b45e35d4a..76c3c27fc1 100644
@@ -26,5 +27,5 @@
-@@ -1819,5 +1819,5 @@ static int vhost_user_set_vring_err(struct virtio_net **pdev,
- if (!(ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK))
- close(ctx->fds[0]);
-- VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented\n");
-+ VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented\n");
+@@ -1848,5 +1848,5 @@ static int vhost_user_set_vring_err(struct virtio_net **pdev __rte_unused,
+ if (!(msg->payload.u64 & VHOST_USER_VRING_NOFD_MASK))
+ close(msg->fds[0]);
+- VHOST_LOG_CONFIG(INFO, "not implemented\n");
++ VHOST_LOG_CONFIG(DEBUG, "not implemented\n");
@@ -33 +34 @@
-@@ -2341,5 +2341,5 @@ static int vhost_user_set_log_fd(struct virtio_net **pdev,
+@@ -2379,5 +2379,5 @@ static int vhost_user_set_log_fd(struct virtio_net **pdev __rte_unused,
@@ -35,3 +36,3 @@
- close(ctx->fds[0]);
-- VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented.\n");
-+ VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented.\n");
+ close(msg->fds[0]);
+- VHOST_LOG_CONFIG(INFO, "not implemented.\n");
++ VHOST_LOG_CONFIG(DEBUG, "not implemented.\n");
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'vhost: fix possible FD leaks on truncation' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (44 preceding siblings ...)
2023-02-23 15:05 ` patch 'vhost: decrease log level for unimplemented requests' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/virtio-user: fix device starting failure handling' " Kevin Traynor
` (51 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: David Marchand, Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/6e302e5ede8eac8084867b14766d20ee7b5bf711
Thanks.
Kevin
---
From 6e302e5ede8eac8084867b14766d20ee7b5bf711 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 7 Feb 2023 17:22:40 +0100
Subject: [PATCH] vhost: fix possible FD leaks on truncation
[ upstream commit 218daf1664561eca787369c13e1a9ea5cdaad2a8 ]
This patch fixes possible FDs leaks when truncation happens
on either the message buffer or its control data. Indeed,
by returning early, it did not let a chance to retrieve the
FDs passed as ancillary data, and so caused a potential FDs
leak.
This patch fixes this by extracting the FDs from the
ancillary data as long as recvmsg() call succeeded. It also
improves the logs to differentiate between MSG_TRUNC and
MSG_CTRUNC.
Fixes: bf472259dde6 ("vhost: fix possible denial of service by leaking FDs")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/vhost/socket.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index 33f54a779b..a34aebd50c 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -129,8 +129,10 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
}
- if (msgh.msg_flags & (MSG_TRUNC | MSG_CTRUNC)) {
+ if (msgh.msg_flags & MSG_TRUNC)
VHOST_LOG_CONFIG(ERR, "truncated msg\n");
- return -1;
- }
+
+ /* MSG_CTRUNC may be caused by LSM misconfiguration */
+ if (msgh.msg_flags & MSG_CTRUNC)
+ VHOST_LOG_CONFIG(ERR, "truncated control data (fd %d)\n", sockfd);
for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.952350893 +0000
+++ 0047-vhost-fix-possible-FD-leaks-on-truncation.patch 2023-02-23 14:46:23.770235966 +0000
@@ -1 +1 @@
-From 218daf1664561eca787369c13e1a9ea5cdaad2a8 Mon Sep 17 00:00:00 2001
+From 6e302e5ede8eac8084867b14766d20ee7b5bf711 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 218daf1664561eca787369c13e1a9ea5cdaad2a8 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 863a6f6d52..669c322e12 100644
+index 33f54a779b..a34aebd50c 100644
@@ -31 +32 @@
-@@ -130,8 +130,10 @@ read_fd_message(char *ifname, int sockfd, char *buf, int buflen, int *fds, int m
+@@ -129,8 +129,10 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
@@ -36 +37 @@
- VHOST_LOG_CONFIG(ifname, ERR, "truncated msg (fd %d)\n", sockfd);
+ VHOST_LOG_CONFIG(ERR, "truncated msg\n");
@@ -42 +43 @@
-+ VHOST_LOG_CONFIG(ifname, ERR, "truncated control data (fd %d)\n", sockfd);
++ VHOST_LOG_CONFIG(ERR, "truncated control data (fd %d)\n", sockfd);
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/virtio-user: fix device starting failure handling' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (45 preceding siblings ...)
2023-02-23 15:05 ` patch 'vhost: fix possible FD leaks on truncation' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: declare flow rule keeping capability' " Kevin Traynor
` (50 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/fd950290d121a773a25b75fbc4644764c82570ef
Thanks.
Kevin
---
From fd950290d121a773a25b75fbc4644764c82570ef Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 9 Feb 2023 10:17:01 +0100
Subject: [PATCH] net/virtio-user: fix device starting failure handling
[ upstream commit c1a6f787b04e470ebe9b5a3891022195eb2bc555 ]
If the device fails to start, read the status from the
device and return early.
Fixes: 57912824615f ("net/virtio-user: support vhost status setting")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
drivers/net/virtio/virtio_user_ethdev.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 16eca2f940..9ba4ea3b33 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -90,8 +90,13 @@ virtio_user_set_status(struct virtio_hw *hw, uint8_t status)
~old_status & VIRTIO_CONFIG_STATUS_FEATURES_OK)
virtio_user_dev_set_features(dev);
- if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK)
- virtio_user_start_device(dev);
- else if (status == VIRTIO_CONFIG_STATUS_RESET)
+
+ if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK) {
+ if (virtio_user_start_device(dev)) {
+ virtio_user_dev_update_status(dev);
+ return;
+ }
+ } else if (status == VIRTIO_CONFIG_STATUS_RESET) {
virtio_user_reset(hw);
+ }
virtio_user_dev_set_status(dev, status);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.974697814 +0000
+++ 0048-net-virtio-user-fix-device-starting-failure-handling.patch 2023-02-23 14:46:23.770235966 +0000
@@ -1 +1 @@
-From c1a6f787b04e470ebe9b5a3891022195eb2bc555 Mon Sep 17 00:00:00 2001
+From fd950290d121a773a25b75fbc4644764c82570ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c1a6f787b04e470ebe9b5a3891022195eb2bc555 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d32abec327..78b1ed9ace 100644
+index 16eca2f940..9ba4ea3b33 100644
@@ -22 +23 @@
-@@ -91,8 +91,13 @@ virtio_user_set_status(struct virtio_hw *hw, uint8_t status)
+@@ -90,8 +90,13 @@ virtio_user_set_status(struct virtio_hw *hw, uint8_t status)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: declare flow rule keeping capability' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (46 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/virtio-user: fix device starting failure handling' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'doc: fix description of L2TPV2 flow item' " Kevin Traynor
` (49 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/9c90d1a94504f5336e980a8afefd4445e822bfd1
Thanks.
Kevin
---
From 9c90d1a94504f5336e980a8afefd4445e822bfd1 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 15 Dec 2022 01:41:41 +0000
Subject: [PATCH] net/hns3: declare flow rule keeping capability
[ upstream commit 27fd46521517cae0f456dad850a04f18de0690f8 ]
The driver supports create flow rules when device is stopped, and
re-setup flow rules when restarting, so declare support
RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP.
The driver also supports to create indirect actions when device is
stopped, and keeps the indirect actions when restarting, so declare
support RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_common.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 78158401f2..9b6b18a5bc 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -91,8 +91,9 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+ info->dev_capa = RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP |
+ RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP;
if (hns3_dev_get_support(hw, INDEP_TXRX))
- info->dev_capa = RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
- RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
- info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
+ info->dev_capa |= RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
+ RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
if (hns3_dev_get_support(hw, PTP))
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:24.996611888 +0000
+++ 0049-net-hns3-declare-flow-rule-keeping-capability.patch 2023-02-23 14:46:23.771235969 +0000
@@ -1 +1 @@
-From 27fd46521517cae0f456dad850a04f18de0690f8 Mon Sep 17 00:00:00 2001
+From 9c90d1a94504f5336e980a8afefd4445e822bfd1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 27fd46521517cae0f456dad850a04f18de0690f8 ]
+
@@ -14,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -23 +23 @@
-index 7adc6a4972..da0a481f15 100644
+index 78158401f2..9b6b18a5bc 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'doc: fix description of L2TPV2 flow item' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (47 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: declare flow rule keeping capability' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'app/testpmd: fix forwarding stats for Tx dropped' " Kevin Traynor
` (48 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Ferruh Yigit, Andrew Rybchenko, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/8746dd7d44b2795f5019e37fb6899305b11d1cdb
Thanks.
Kevin
---
From 8746dd7d44b2795f5019e37fb6899305b11d1cdb Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 25 Oct 2022 23:44:09 +0200
Subject: [PATCH] doc: fix description of L2TPV2 flow item
[ upstream commit a7d0dd8693417fbecb0debe7b4aec96dbafed51a ]
The flow item structure includes the protocol definition
from the directory lib/net/, so it is reflected in the guide.
Section title underlining is also fixed around.
Fixes: 3a929df1f286 ("ethdev: support L2TPv2 and PPP procotol")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
doc/guides/prog_guide/rte_flow.rst | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 714769d0e4..7984e889c4 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1611,20 +1611,13 @@ rte_flow_flex_item_create() routine.
Item: ``L2TPV2``
-^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^
Matches a L2TPv2 header.
-- ``flags_version``: flags(12b), version(4b).
-- ``length``: total length of the message.
-- ``tunnel_id``: identifier for the control connection.
-- ``session_id``: identifier for a session within a tunnel.
-- ``ns``: sequence number for this date or control message.
-- ``nr``: sequence number expected in the next control message to be received.
-- ``offset_size``: offset of payload data.
-- ``offset_padding``: offset padding, variable length.
+- ``hdr``: header definition (``rte_l2tpv2.h``).
- Default ``mask`` matches flags_version only.
Item: ``PPP``
-^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^
Matches a PPP header.
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.018858156 +0000
+++ 0050-doc-fix-description-of-L2TPV2-flow-item.patch 2023-02-23 14:46:23.775235983 +0000
@@ -1 +1 @@
-From a7d0dd8693417fbecb0debe7b4aec96dbafed51a Mon Sep 17 00:00:00 2001
+From 8746dd7d44b2795f5019e37fb6899305b11d1cdb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a7d0dd8693417fbecb0debe7b4aec96dbafed51a ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 59dfec1139..e465662da3 100644
+index 714769d0e4..7984e889c4 100644
@@ -26 +27 @@
-@@ -1499,20 +1499,13 @@ rte_flow_flex_item_create() routine.
+@@ -1611,20 +1611,13 @@ rte_flow_flex_item_create() routine.
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/testpmd: fix forwarding stats for Tx dropped' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (48 preceding siblings ...)
2023-02-23 15:05 ` patch 'doc: fix description of L2TPV2 flow item' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/txgbe: fix default signal quality value for KX/KX4' " Kevin Traynor
` (47 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Joshua Washington, Huisong Li, Aman Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/b641ca3033155683a3e3c225dba24e07fd52ea1b
Thanks.
Kevin
---
From b641ca3033155683a3e3c225dba24e07fd52ea1b Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Tue, 31 Jan 2023 11:56:03 +0000
Subject: [PATCH] app/testpmd: fix forwarding stats for Tx dropped
[ upstream commit c3fd1e6089cce14ad3f941ab5df0501e03b3356c ]
There is an inconsistency at displaying Tx dropped value for per port
forwarding stats and accumulated forwarding stats.
While displaying per port TX-dropped value, it only takes
'ports_stats[pt_id].tx_dropped' into account,
but for accumulated TX-dropped results it takes both
'ports_stats[pt_id].tx_dropped' & 'stats.oerrors' into account.
To fix, make both per port and accumulated stats display 'tx_dropped'
and 'stats.oerrors' (ports_stats[pt_id].tx_dropped + stats.oerrors).
Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")
Reported-by: Joshua Washington <joshwash@google.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
app/test-pmd/testpmd.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index f1daa6e09d..4e15c982c8 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2078,4 +2078,6 @@ fwd_stats_display(void)
}
for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
+ uint64_t tx_dropped = 0;
+
pt_id = fwd_ports_ids[i];
port = &ports[pt_id];
@@ -2099,6 +2101,7 @@ fwd_stats_display(void)
total_xmit += stats.opackets;
total_rx_dropped += stats.imissed;
- total_tx_dropped += ports_stats[pt_id].tx_dropped;
- total_tx_dropped += stats.oerrors;
+ tx_dropped += ports_stats[pt_id].tx_dropped;
+ tx_dropped += stats.oerrors;
+ total_tx_dropped += tx_dropped;
total_rx_nombuf += stats.rx_nombuf;
@@ -2127,6 +2130,6 @@ fwd_stats_display(void)
printf(" TX-packets: %-14"PRIu64" TX-dropped: %-14"PRIu64
"TX-total: %-"PRIu64"\n",
- stats.opackets, ports_stats[pt_id].tx_dropped,
- stats.opackets + ports_stats[pt_id].tx_dropped);
+ stats.opackets, tx_dropped,
+ stats.opackets + tx_dropped);
if (record_burst_stats) {
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.043741769 +0000
+++ 0051-app-testpmd-fix-forwarding-stats-for-Tx-dropped.patch 2023-02-23 14:46:23.778235994 +0000
@@ -1 +1 @@
-From c3fd1e6089cce14ad3f941ab5df0501e03b3356c Mon Sep 17 00:00:00 2001
+From b641ca3033155683a3e3c225dba24e07fd52ea1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c3fd1e6089cce14ad3f941ab5df0501e03b3356c ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 86fa9c16ba..f3e29a5b4b 100644
+index f1daa6e09d..4e15c982c8 100644
@@ -32 +33 @@
-@@ -2062,4 +2062,6 @@ fwd_stats_display(void)
+@@ -2078,4 +2078,6 @@ fwd_stats_display(void)
@@ -39 +40 @@
-@@ -2083,6 +2085,7 @@ fwd_stats_display(void)
+@@ -2099,6 +2101,7 @@ fwd_stats_display(void)
@@ -49 +50 @@
-@@ -2111,6 +2114,6 @@ fwd_stats_display(void)
+@@ -2127,6 +2130,6 @@ fwd_stats_display(void)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/txgbe: fix default signal quality value for KX/KX4' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (49 preceding siblings ...)
2023-02-23 15:05 ` patch 'app/testpmd: fix forwarding stats for Tx dropped' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/txgbe: fix packet type to parse from offload flags' " Kevin Traynor
` (46 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/551a0e317c1d1c89c459b182a7424d13349b719d
Thanks.
Kevin
---
From 551a0e317c1d1c89c459b182a7424d13349b719d Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Thu, 2 Feb 2023 17:21:25 +0800
Subject: [PATCH] net/txgbe: fix default signal quality value for KX/KX4
[ upstream commit 7211175417d4f6a7b03a0e7e7355dc62fced8512 ]
On old firmware versions, the default value of signal quality(TX_EQ) is
configured by the driver. Fix it for KX/KX4 mode.
Fixes: 01c3cf5c85a7 ("net/txgbe: add autoneg control read and write")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_phy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index 9f46d5bdb0..87935abdaa 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1694,7 +1694,8 @@ txgbe_set_link_to_kx4(struct txgbe_hw *hw, bool autoneg)
} else if (hw->fw_version <= TXGBE_FW_N_TXEQ) {
value = (0x1804 & ~0x3F3F);
+ value |= 40 << 8;
wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL0, value);
- value = (0x50 & ~0x7F) | 40 | (1 << 6);
+ value = (0x50 & ~0x7F) | (1 << 6);
wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1, value);
}
@@ -1908,8 +1909,8 @@ txgbe_set_link_to_kx(struct txgbe_hw *hw,
wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1, value);
} else if (hw->fw_version <= TXGBE_FW_N_TXEQ) {
- value = (0x1804 & ~0x3F3F) | (24 << 8) | 4;
+ value = (0x1804 & ~0x3F3F) | (40 << 8);
wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL0, value);
- value = (0x50 & ~0x7F) | 16 | (1 << 6);
+ value = (0x50 & ~0x7F) | (1 << 6);
wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1, value);
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.068094153 +0000
+++ 0052-net-txgbe-fix-default-signal-quality-value-for-KX-KX.patch 2023-02-23 14:46:23.780236001 +0000
@@ -1 +1 @@
-From 7211175417d4f6a7b03a0e7e7355dc62fced8512 Mon Sep 17 00:00:00 2001
+From 551a0e317c1d1c89c459b182a7424d13349b719d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7211175417d4f6a7b03a0e7e7355dc62fced8512 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/txgbe: fix packet type to parse from offload flags' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (50 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/txgbe: fix default signal quality value for KX/KX4' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/ngbe: " Kevin Traynor
` (45 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/5d80aae2140965f13971f5567de052ab28974e50
Thanks.
Kevin
---
From 5d80aae2140965f13971f5567de052ab28974e50 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Thu, 2 Feb 2023 17:21:26 +0800
Subject: [PATCH] net/txgbe: fix packet type to parse from offload flags
[ upstream commit 0e32d6edd47914d38857c34d97416b9c91929020 ]
Context descriptors which contains the length of each packet layer and
the packet type are needed when Tx checksum offload or TSO is on. If the
packet type and length do not strictly match, it will cause Tx ring hang.
In some external applications, developers may fill in wrong packet_type
in rte_mbuf for Tx path. For example, they encap/decap the packets but
did not refill the packet_type. To prevent this, change it to parse from
ol_flags.
Fixes: ca46fcd753b1 ("net/txgbe: support Tx with hardware offload")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_rxtx.c | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 35b77cb271..4c63a82fd6 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -517,12 +517,10 @@ tx_desc_ol_flags_to_cmdtype(uint64_t ol_flags)
}
-static inline uint8_t
-tx_desc_ol_flags_to_ptid(uint64_t oflags, uint32_t ptype)
+static inline uint32_t
+tx_desc_ol_flags_to_ptype(uint64_t oflags)
{
+ uint32_t ptype;
bool tun;
- if (ptype)
- return txgbe_encode_ptype(ptype);
-
/* Only support flags in TXGBE_TX_OFFLOAD_MASK */
tun = !!(oflags & RTE_MBUF_F_TX_TUNNEL_MASK);
@@ -531,4 +529,7 @@ tx_desc_ol_flags_to_ptid(uint64_t oflags, uint32_t ptype)
ptype = RTE_PTYPE_L2_ETHER;
if (oflags & RTE_MBUF_F_TX_VLAN)
+ ptype |= (tun ? RTE_PTYPE_INNER_L2_ETHER_VLAN : RTE_PTYPE_L2_ETHER_VLAN);
+
+ if (oflags & RTE_MBUF_F_TX_QINQ) /* tunnel + QINQ is not supported */
ptype |= RTE_PTYPE_L2_ETHER_VLAN;
@@ -588,4 +589,14 @@ tx_desc_ol_flags_to_ptid(uint64_t oflags, uint32_t ptype)
}
+ return ptype;
+}
+
+static inline uint8_t
+tx_desc_ol_flags_to_ptid(uint64_t oflags)
+{
+ uint32_t ptype;
+
+ ptype = tx_desc_ol_flags_to_ptype(oflags);
+
return txgbe_encode_ptype(ptype);
}
@@ -777,6 +788,5 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
tx_ol_req = ol_flags & TXGBE_TX_OFFLOAD_MASK;
if (tx_ol_req) {
- tx_offload.ptid = tx_desc_ol_flags_to_ptid(tx_ol_req,
- tx_pkt->packet_type);
+ tx_offload.ptid = tx_desc_ol_flags_to_ptid(tx_ol_req);
if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.090585218 +0000
+++ 0053-net-txgbe-fix-packet-type-to-parse-from-offload-flag.patch 2023-02-23 14:46:23.783236011 +0000
@@ -1 +1 @@
-From 0e32d6edd47914d38857c34d97416b9c91929020 Mon Sep 17 00:00:00 2001
+From 5d80aae2140965f13971f5567de052ab28974e50 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e32d6edd47914d38857c34d97416b9c91929020 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ac1bba08a3..021f281fbb 100644
+index 35b77cb271..4c63a82fd6 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/ngbe: fix packet type to parse from offload flags' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (51 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/txgbe: fix packet type to parse from offload flags' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/txgbe: fix interrupt loss' " Kevin Traynor
` (44 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/f8e27fb215b6abd12293b6cf16ceeeb2d3c709b1
Thanks.
Kevin
---
From f8e27fb215b6abd12293b6cf16ceeeb2d3c709b1 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Thu, 2 Feb 2023 17:21:27 +0800
Subject: [PATCH] net/ngbe: fix packet type to parse from offload flags
[ upstream commit fa402b1e02b71a20aabef27733cbb75431363620 ]
Context descriptors which contains the length of each packet layer and
the packet type are needed when Tx checksum offload or TSO is on. If the
packet type and length do not strictly match, it will cause Tx ring hang.
In some external applications, developers may fill in wrong packet_type
in rte_mbuf for Tx path. For example, they encap/decap the packets but
did not refill the packet_type. To prevent this, change it to parse from
ol_flags.
And remove redundant tunnel type since the NIC does not support it.
Fixes: 9f3206140274 ("net/ngbe: support TSO")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_rxtx.c | 90 +++++++++---------------------------
1 file changed, 22 insertions(+), 68 deletions(-)
diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index 86a5ef5486..b4f7e6c9d5 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -25,6 +25,4 @@
/* Bit Mask to indicate what bits required for building Tx context */
static const u64 NGBE_TX_OFFLOAD_MASK = (RTE_MBUF_F_TX_IP_CKSUM |
- RTE_MBUF_F_TX_OUTER_IPV6 |
- RTE_MBUF_F_TX_OUTER_IPV4 |
RTE_MBUF_F_TX_IPV6 |
RTE_MBUF_F_TX_IPV4 |
@@ -32,6 +30,4 @@ static const u64 NGBE_TX_OFFLOAD_MASK = (RTE_MBUF_F_TX_IP_CKSUM |
RTE_MBUF_F_TX_L4_MASK |
RTE_MBUF_F_TX_TCP_SEG |
- RTE_MBUF_F_TX_TUNNEL_MASK |
- RTE_MBUF_F_TX_OUTER_IP_CKSUM |
NGBE_TX_IEEE1588_TMST);
@@ -334,26 +330,5 @@ ngbe_set_xmit_ctx(struct ngbe_tx_queue *txq,
vlan_macip_lens = NGBE_TXD_IPLEN(tx_offload.l3_len >> 1);
-
- if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
- tx_offload_mask.outer_tun_len |= ~0;
- tx_offload_mask.outer_l2_len |= ~0;
- tx_offload_mask.outer_l3_len |= ~0;
- tx_offload_mask.l2_len |= ~0;
- tunnel_seed = NGBE_TXD_ETUNLEN(tx_offload.outer_tun_len >> 1);
- tunnel_seed |= NGBE_TXD_EIPLEN(tx_offload.outer_l3_len >> 2);
-
- switch (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
- case RTE_MBUF_F_TX_TUNNEL_IPIP:
- /* for non UDP / GRE tunneling, set to 0b */
- break;
- default:
- PMD_TX_LOG(ERR, "Tunnel type not supported");
- return;
- }
- vlan_macip_lens |= NGBE_TXD_MACLEN(tx_offload.outer_l2_len);
- } else {
- tunnel_seed = 0;
- vlan_macip_lens |= NGBE_TXD_MACLEN(tx_offload.l2_len);
- }
+ vlan_macip_lens |= NGBE_TXD_MACLEN(tx_offload.l2_len);
if (ol_flags & RTE_MBUF_F_TX_VLAN) {
@@ -362,4 +337,6 @@ ngbe_set_xmit_ctx(struct ngbe_tx_queue *txq,
}
+ tunnel_seed = 0;
+
txq->ctx_cache[ctx_idx].flags = ol_flags;
txq->ctx_cache[ctx_idx].tx_offload.data[0] =
@@ -450,14 +427,8 @@ tx_desc_ol_flags_to_cmdtype(uint64_t ol_flags)
}
-static inline uint8_t
-tx_desc_ol_flags_to_ptid(uint64_t oflags, uint32_t ptype)
+static inline uint32_t
+tx_desc_ol_flags_to_ptype(uint64_t oflags)
{
- bool tun;
-
- if (ptype)
- return ngbe_encode_ptype(ptype);
-
- /* Only support flags in NGBE_TX_OFFLOAD_MASK */
- tun = !!(oflags & RTE_MBUF_F_TX_TUNNEL_MASK);
+ uint32_t ptype;
/* L2 level */
@@ -467,39 +438,34 @@ tx_desc_ol_flags_to_ptid(uint64_t oflags, uint32_t ptype)
/* L3 level */
- if (oflags & (RTE_MBUF_F_TX_OUTER_IPV4 | RTE_MBUF_F_TX_OUTER_IP_CKSUM))
- ptype |= RTE_PTYPE_L3_IPV4;
- else if (oflags & (RTE_MBUF_F_TX_OUTER_IPV6))
- ptype |= RTE_PTYPE_L3_IPV6;
-
if (oflags & (RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM))
- ptype |= (tun ? RTE_PTYPE_INNER_L3_IPV4 : RTE_PTYPE_L3_IPV4);
+ ptype |= RTE_PTYPE_L3_IPV4;
else if (oflags & (RTE_MBUF_F_TX_IPV6))
- ptype |= (tun ? RTE_PTYPE_INNER_L3_IPV6 : RTE_PTYPE_L3_IPV6);
+ ptype |= RTE_PTYPE_L3_IPV6;
/* L4 level */
switch (oflags & (RTE_MBUF_F_TX_L4_MASK)) {
case RTE_MBUF_F_TX_TCP_CKSUM:
- ptype |= (tun ? RTE_PTYPE_INNER_L4_TCP : RTE_PTYPE_L4_TCP);
+ ptype |= RTE_PTYPE_L4_TCP;
break;
case RTE_MBUF_F_TX_UDP_CKSUM:
- ptype |= (tun ? RTE_PTYPE_INNER_L4_UDP : RTE_PTYPE_L4_UDP);
+ ptype |= RTE_PTYPE_L4_UDP;
break;
case RTE_MBUF_F_TX_SCTP_CKSUM:
- ptype |= (tun ? RTE_PTYPE_INNER_L4_SCTP : RTE_PTYPE_L4_SCTP);
+ ptype |= RTE_PTYPE_L4_SCTP;
break;
}
if (oflags & RTE_MBUF_F_TX_TCP_SEG)
- ptype |= (tun ? RTE_PTYPE_INNER_L4_TCP : RTE_PTYPE_L4_TCP);
+ ptype |= RTE_PTYPE_L4_TCP;
- /* Tunnel */
- switch (oflags & RTE_MBUF_F_TX_TUNNEL_MASK) {
- case RTE_MBUF_F_TX_TUNNEL_IPIP:
- case RTE_MBUF_F_TX_TUNNEL_IP:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_IP;
- break;
- }
+ return ptype;
+}
+
+static inline uint8_t
+tx_desc_ol_flags_to_ptid(uint64_t oflags)
+{
+ uint32_t ptype;
+
+ ptype = tx_desc_ol_flags_to_ptype(oflags);
return ngbe_encode_ptype(ptype);
@@ -623,6 +589,5 @@ ngbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
tx_ol_req = ol_flags & NGBE_TX_OFFLOAD_MASK;
if (tx_ol_req) {
- tx_offload.ptid = tx_desc_ol_flags_to_ptid(tx_ol_req,
- tx_pkt->packet_type);
+ tx_offload.ptid = tx_desc_ol_flags_to_ptid(tx_ol_req);
tx_offload.l2_len = tx_pkt->l2_len;
tx_offload.l3_len = tx_pkt->l3_len;
@@ -630,7 +595,4 @@ ngbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
tx_offload.vlan_tci = tx_pkt->vlan_tci;
tx_offload.tso_segsz = tx_pkt->tso_segsz;
- tx_offload.outer_l2_len = tx_pkt->outer_l2_len;
- tx_offload.outer_l3_len = tx_pkt->outer_l3_len;
- tx_offload.outer_tun_len = 0;
/* If new context need be built or reuse the exist ctx*/
@@ -753,8 +715,4 @@ ngbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
pkt_len -= (tx_offload.l2_len +
tx_offload.l3_len + tx_offload.l4_len);
- pkt_len -=
- (tx_pkt->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
- ? tx_offload.outer_l2_len +
- tx_offload.outer_l3_len : 0;
}
@@ -1940,10 +1898,6 @@ ngbe_get_tx_port_offloads(struct rte_eth_dev *dev)
RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
- RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
RTE_ETH_TX_OFFLOAD_TCP_TSO |
RTE_ETH_TX_OFFLOAD_UDP_TSO |
- RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO |
- RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |
- RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_MULTI_SEGS;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.115031246 +0000
+++ 0054-net-ngbe-fix-packet-type-to-parse-from-offload-flags.patch 2023-02-23 14:46:23.786236022 +0000
@@ -1 +1 @@
-From fa402b1e02b71a20aabef27733cbb75431363620 Mon Sep 17 00:00:00 2001
+From f8e27fb215b6abd12293b6cf16ceeeb2d3c709b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa402b1e02b71a20aabef27733cbb75431363620 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 9fd24fa444..0c678e1557 100644
+index 86a5ef5486..b4f7e6c9d5 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/txgbe: fix interrupt loss' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (52 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/ngbe: " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: fix log about indirection table size' " Kevin Traynor
` (43 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/489a1c2580f82b2e11878a659d3972c691a4b38f
Thanks.
Kevin
---
From 489a1c2580f82b2e11878a659d3972c691a4b38f Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Thu, 2 Feb 2023 17:21:31 +0800
Subject: [PATCH] net/txgbe: fix interrupt loss
[ upstream commit a4315c1434b6bf78a9e04bf5fa34d02e9b3afd35 ]
Disable interrupt in the interrupt handling process will sometimes cause
interrupts to be lost.
Fixes: 2fc745e6b606 ("net/txgbe: add interrupt operation")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index c229736d85..af2bf00ebd 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2940,7 +2940,4 @@ txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
wr32(hw, TXGBE_PX_INTA, 1);
- /* clear all cause mask */
- txgbe_disable_intr(hw);
-
/* read-on-clear nic registers here */
eicr = ((u32 *)hw->isb_mem)[TXGBE_ISB_MISC];
@@ -2965,4 +2962,6 @@ txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
intr->flags |= TXGBE_FLAG_PHY_INTERRUPT;
+ ((u32 *)hw->isb_mem)[TXGBE_ISB_MISC] = 0;
+
return 0;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.138666790 +0000
+++ 0055-net-txgbe-fix-interrupt-loss.patch 2023-02-23 14:46:23.790236036 +0000
@@ -1 +1 @@
-From a4315c1434b6bf78a9e04bf5fa34d02e9b3afd35 Mon Sep 17 00:00:00 2001
+From 489a1c2580f82b2e11878a659d3972c691a4b38f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a4315c1434b6bf78a9e04bf5fa34d02e9b3afd35 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index ce7cf2506d..6e939b8ce3 100644
+index c229736d85..af2bf00ebd 100644
@@ -21 +22 @@
-@@ -2973,7 +2973,4 @@ txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
+@@ -2940,7 +2940,4 @@ txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
@@ -29,2 +30,2 @@
-@@ -3001,4 +2998,6 @@ txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
- intr->flags |= TXGBE_FLAG_OVERHEAT;
+@@ -2965,4 +2962,6 @@ txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
+ intr->flags |= TXGBE_FLAG_PHY_INTERRUPT;
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: fix log about indirection table size' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (53 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/txgbe: fix interrupt loss' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: extract common function to query device' " Kevin Traynor
` (42 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/81cb3c29c8b00b5275fc70a19b143acbcab4445e
Thanks.
Kevin
---
From 81cb3c29c8b00b5275fc70a19b143acbcab4445e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:51 +0800
Subject: [PATCH] net/hns3: fix log about indirection table size
[ upstream commit b55516a94246364f272db802f5dfb9aeb8d3a2f2 ]
The error log about indirection table size during initialization phase
of PF and VF is unreasonable.
In addition, VF driver should use error level to print this log.
Fixes: 0fce2c46dc16 ("net/hns3: fix RSS indirection table size")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 5 ++---
drivers/net/hns3/hns3_ethdev_vf.c | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index edeb83bbbc..ca59c42f4a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2697,7 +2697,6 @@ hns3_check_dev_specifications(struct hns3_hw *hw)
if (hw->rss_ind_tbl_size == 0 ||
hw->rss_ind_tbl_size > HNS3_RSS_IND_TBL_SIZE_MAX) {
- hns3_err(hw, "the size of hash lookup table configured (%u)"
- " exceeds the maximum(%u)", hw->rss_ind_tbl_size,
- HNS3_RSS_IND_TBL_SIZE_MAX);
+ hns3_err(hw, "the indirection table size obtained (%u) is invalid, and should not be zero or exceed the maximum(%u)",
+ hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
return -EINVAL;
}
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 063633e5ed..87d094a6b4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -719,7 +719,6 @@ hns3vf_check_dev_specifications(struct hns3_hw *hw)
if (hw->rss_ind_tbl_size == 0 ||
hw->rss_ind_tbl_size > HNS3_RSS_IND_TBL_SIZE_MAX) {
- hns3_warn(hw, "the size of hash lookup table configured (%u)"
- " exceeds the maximum(%u)", hw->rss_ind_tbl_size,
- HNS3_RSS_IND_TBL_SIZE_MAX);
+ hns3_err(hw, "the indirection table size obtained (%u) is invalid, and should not be zero or exceed the maximum(%u)",
+ hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
return -EINVAL;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.163665642 +0000
+++ 0056-net-hns3-fix-log-about-indirection-table-size.patch 2023-02-23 14:46:23.795236053 +0000
@@ -1 +1 @@
-From b55516a94246364f272db802f5dfb9aeb8d3a2f2 Mon Sep 17 00:00:00 2001
+From 81cb3c29c8b00b5275fc70a19b143acbcab4445e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b55516a94246364f272db802f5dfb9aeb8d3a2f2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,3 +18,3 @@
- drivers/net/hns3/hns3_ethdev.c | 2 +-
- drivers/net/hns3/hns3_ethdev_vf.c | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
+ drivers/net/hns3/hns3_ethdev.c | 5 ++---
+ drivers/net/hns3/hns3_ethdev_vf.c | 5 ++---
+ 2 files changed, 4 insertions(+), 6 deletions(-)
@@ -22 +23 @@
-index d326f70129..eb809cd8c9 100644
+index edeb83bbbc..ca59c42f4a 100644
@@ -25 +26 @@
-@@ -2680,5 +2680,5 @@ hns3_check_dev_specifications(struct hns3_hw *hw)
+@@ -2697,7 +2697,6 @@ hns3_check_dev_specifications(struct hns3_hw *hw)
@@ -28 +29,3 @@
-- hns3_err(hw, "the size of hash lookup table configured (%u) exceeds the maximum(%u)",
+- hns3_err(hw, "the size of hash lookup table configured (%u)"
+- " exceeds the maximum(%u)", hw->rss_ind_tbl_size,
+- HNS3_RSS_IND_TBL_SIZE_MAX);
@@ -30 +33 @@
- hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
++ hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
@@ -31,0 +35 @@
+ }
@@ -33 +37 @@
-index d220522c43..e43815607a 100644
+index 063633e5ed..87d094a6b4 100644
@@ -36 +40 @@
-@@ -719,6 +719,6 @@ hns3vf_check_dev_specifications(struct hns3_hw *hw)
+@@ -719,7 +719,6 @@ hns3vf_check_dev_specifications(struct hns3_hw *hw)
@@ -39,2 +43,3 @@
-- hns3_warn(hw, "the size of hash lookup table configured (%u) exceeds the maximum(%u)",
-- hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
+- hns3_warn(hw, "the size of hash lookup table configured (%u)"
+- " exceeds the maximum(%u)", hw->rss_ind_tbl_size,
+- HNS3_RSS_IND_TBL_SIZE_MAX);
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: extract common function to query device' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (54 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: fix log about indirection table size' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: refactor set RSS hash algorithm and key interface' " Kevin Traynor
` (41 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/b6328f7feb6691619bcb474d0e920f4aeec3f9fa
Thanks.
Kevin
---
From b6328f7feb6691619bcb474d0e920f4aeec3f9fa Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:52 +0800
Subject: [PATCH] net/hns3: extract common function to query device
[ upstream commit 52a4e960b49c526dd1ad7c1e91ebcfa664a38e6d ]
Extract common function to query device specifications used by VF and
PF.
Fixes: 9c740336f024 ("net/hns3: get device specifications from firmware")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_common.c | 75 +++++++++++++++++++++++++++++++
drivers/net/hns3/hns3_common.h | 5 ++-
drivers/net/hns3/hns3_ethdev.c | 63 --------------------------
drivers/net/hns3/hns3_ethdev_vf.c | 65 +--------------------------
4 files changed, 81 insertions(+), 127 deletions(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 9b6b18a5bc..dc24f7557d 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -12,4 +12,5 @@
#include "hns3_regs.h"
#include "hns3_rxtx.h"
+#include "hns3_dcb.h"
int
@@ -769,2 +770,76 @@ hns3_restore_rx_interrupt(struct hns3_hw *hw)
return 0;
}
+
+void
+hns3_set_default_dev_specifications(struct hns3_hw *hw)
+{
+ struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+
+ hw->max_non_tso_bd_num = HNS3_MAX_NON_TSO_BD_PER_PKT;
+ hw->rss_ind_tbl_size = HNS3_RSS_IND_TBL_SIZE;
+ hw->rss_key_size = HNS3_RSS_KEY_SIZE;
+ hw->intr.int_ql_max = HNS3_INTR_QL_NONE;
+
+ if (hns->is_vf)
+ return;
+
+ hw->max_tm_rate = HNS3_ETHER_MAX_RATE;
+}
+
+static void
+hns3_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
+{
+ struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+ struct hns3_dev_specs_0_cmd *req0;
+ struct hns3_dev_specs_1_cmd *req1;
+
+ req0 = (struct hns3_dev_specs_0_cmd *)desc[0].data;
+ req1 = (struct hns3_dev_specs_1_cmd *)desc[1].data;
+
+ hw->max_non_tso_bd_num = req0->max_non_tso_bd_num;
+ hw->rss_ind_tbl_size = rte_le_to_cpu_16(req0->rss_ind_tbl_size);
+ hw->rss_key_size = rte_le_to_cpu_16(req0->rss_key_size);
+ hw->intr.int_ql_max = rte_le_to_cpu_16(req0->intr_ql_max);
+ hw->min_tx_pkt_len = req1->min_tx_pkt_len;
+
+ if (hns->is_vf)
+ return;
+
+ hw->max_tm_rate = rte_le_to_cpu_32(req0->max_tm_rate);
+}
+
+static int
+hns3_check_dev_specifications(struct hns3_hw *hw)
+{
+ if (hw->rss_ind_tbl_size == 0 ||
+ hw->rss_ind_tbl_size > HNS3_RSS_IND_TBL_SIZE_MAX) {
+ hns3_err(hw, "the indirection table size obtained (%u) is invalid, and should not be zero or exceed the maximum(%u)",
+ hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+int
+hns3_query_dev_specifications(struct hns3_hw *hw)
+{
+ struct hns3_cmd_desc desc[HNS3_QUERY_DEV_SPECS_BD_NUM];
+ int ret;
+ int i;
+
+ for (i = 0; i < HNS3_QUERY_DEV_SPECS_BD_NUM - 1; i++) {
+ hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_QUERY_DEV_SPECS,
+ true);
+ desc[i].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
+ }
+ hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_QUERY_DEV_SPECS, true);
+
+ ret = hns3_cmd_send(hw, desc, HNS3_QUERY_DEV_SPECS_BD_NUM);
+ if (ret)
+ return ret;
+
+ hns3_parse_dev_specifications(hw, desc);
+
+ return hns3_check_dev_specifications(hw);
+}
diff --git a/drivers/net/hns3/hns3_common.h b/drivers/net/hns3/hns3_common.h
index 0dbb1c0413..1d2ca24194 100644
--- a/drivers/net/hns3/hns3_common.h
+++ b/drivers/net/hns3/hns3_common.h
@@ -59,3 +59,6 @@ void hns3_unmap_rx_interrupt(struct rte_eth_dev *dev);
int hns3_restore_rx_interrupt(struct hns3_hw *hw);
-#endif /* _HNS3_COMMON_H_ */
+void hns3_set_default_dev_specifications(struct hns3_hw *hw);
+int hns3_query_dev_specifications(struct hns3_hw *hw);
+
+#endif /* HNS3_COMMON_H */
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ca59c42f4a..be6a92a313 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2665,67 +2665,4 @@ hns3_parse_speed(int speed_cmd, uint32_t *speed)
}
-static void
-hns3_set_default_dev_specifications(struct hns3_hw *hw)
-{
- hw->max_non_tso_bd_num = HNS3_MAX_NON_TSO_BD_PER_PKT;
- hw->rss_ind_tbl_size = HNS3_RSS_IND_TBL_SIZE;
- hw->rss_key_size = HNS3_RSS_KEY_SIZE;
- hw->max_tm_rate = HNS3_ETHER_MAX_RATE;
- hw->intr.int_ql_max = HNS3_INTR_QL_NONE;
-}
-
-static void
-hns3_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
-{
- struct hns3_dev_specs_0_cmd *req0;
- struct hns3_dev_specs_1_cmd *req1;
-
- req0 = (struct hns3_dev_specs_0_cmd *)desc[0].data;
- req1 = (struct hns3_dev_specs_1_cmd *)desc[1].data;
-
- hw->max_non_tso_bd_num = req0->max_non_tso_bd_num;
- hw->rss_ind_tbl_size = rte_le_to_cpu_16(req0->rss_ind_tbl_size);
- hw->rss_key_size = rte_le_to_cpu_16(req0->rss_key_size);
- hw->max_tm_rate = rte_le_to_cpu_32(req0->max_tm_rate);
- hw->intr.int_ql_max = rte_le_to_cpu_16(req0->intr_ql_max);
- hw->min_tx_pkt_len = req1->min_tx_pkt_len;
-}
-
-static int
-hns3_check_dev_specifications(struct hns3_hw *hw)
-{
- if (hw->rss_ind_tbl_size == 0 ||
- hw->rss_ind_tbl_size > HNS3_RSS_IND_TBL_SIZE_MAX) {
- hns3_err(hw, "the indirection table size obtained (%u) is invalid, and should not be zero or exceed the maximum(%u)",
- hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int
-hns3_query_dev_specifications(struct hns3_hw *hw)
-{
- struct hns3_cmd_desc desc[HNS3_QUERY_DEV_SPECS_BD_NUM];
- int ret;
- int i;
-
- for (i = 0; i < HNS3_QUERY_DEV_SPECS_BD_NUM - 1; i++) {
- hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_QUERY_DEV_SPECS,
- true);
- desc[i].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
- }
- hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_QUERY_DEV_SPECS, true);
-
- ret = hns3_cmd_send(hw, desc, HNS3_QUERY_DEV_SPECS_BD_NUM);
- if (ret)
- return ret;
-
- hns3_parse_dev_specifications(hw, desc);
-
- return hns3_check_dev_specifications(hw);
-}
-
static int
hns3_get_capability(struct hns3_hw *hw)
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 87d094a6b4..0e66a82178 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -689,65 +689,4 @@ hns3vf_interrupt_handler(void *param)
}
-static void
-hns3vf_set_default_dev_specifications(struct hns3_hw *hw)
-{
- hw->max_non_tso_bd_num = HNS3_MAX_NON_TSO_BD_PER_PKT;
- hw->rss_ind_tbl_size = HNS3_RSS_IND_TBL_SIZE;
- hw->rss_key_size = HNS3_RSS_KEY_SIZE;
- hw->intr.int_ql_max = HNS3_INTR_QL_NONE;
-}
-
-static void
-hns3vf_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
-{
- struct hns3_dev_specs_0_cmd *req0;
- struct hns3_dev_specs_1_cmd *req1;
-
- req0 = (struct hns3_dev_specs_0_cmd *)desc[0].data;
- req1 = (struct hns3_dev_specs_1_cmd *)desc[1].data;
-
- hw->max_non_tso_bd_num = req0->max_non_tso_bd_num;
- hw->rss_ind_tbl_size = rte_le_to_cpu_16(req0->rss_ind_tbl_size);
- hw->rss_key_size = rte_le_to_cpu_16(req0->rss_key_size);
- hw->intr.int_ql_max = rte_le_to_cpu_16(req0->intr_ql_max);
- hw->min_tx_pkt_len = req1->min_tx_pkt_len;
-}
-
-static int
-hns3vf_check_dev_specifications(struct hns3_hw *hw)
-{
- if (hw->rss_ind_tbl_size == 0 ||
- hw->rss_ind_tbl_size > HNS3_RSS_IND_TBL_SIZE_MAX) {
- hns3_err(hw, "the indirection table size obtained (%u) is invalid, and should not be zero or exceed the maximum(%u)",
- hw->rss_ind_tbl_size, HNS3_RSS_IND_TBL_SIZE_MAX);
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int
-hns3vf_query_dev_specifications(struct hns3_hw *hw)
-{
- struct hns3_cmd_desc desc[HNS3_QUERY_DEV_SPECS_BD_NUM];
- int ret;
- int i;
-
- for (i = 0; i < HNS3_QUERY_DEV_SPECS_BD_NUM - 1; i++) {
- hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_QUERY_DEV_SPECS,
- true);
- desc[i].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
- }
- hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_QUERY_DEV_SPECS, true);
-
- ret = hns3_cmd_send(hw, desc, HNS3_QUERY_DEV_SPECS_BD_NUM);
- if (ret)
- return ret;
-
- hns3vf_parse_dev_specifications(hw, desc);
-
- return hns3vf_check_dev_specifications(hw);
-}
-
void
hns3vf_update_push_lsc_cap(struct hns3_hw *hw, bool supported)
@@ -839,5 +778,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
if (revision < PCI_REVISION_ID_HIP09_A) {
- hns3vf_set_default_dev_specifications(hw);
+ hns3_set_default_dev_specifications(hw);
hw->intr.mapping_mode = HNS3_INTR_MAPPING_VEC_RSV_ONE;
hw->intr.gl_unit = HNS3_INTR_COALESCE_GL_UINT_2US;
@@ -850,5 +789,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
}
- ret = hns3vf_query_dev_specifications(hw);
+ ret = hns3_query_dev_specifications(hw);
if (ret) {
PMD_INIT_LOG(ERR,
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.190492174 +0000
+++ 0057-net-hns3-extract-common-function-to-query-device.patch 2023-02-23 14:46:23.803236081 +0000
@@ -1 +1 @@
-From 52a4e960b49c526dd1ad7c1e91ebcfa664a38e6d Mon Sep 17 00:00:00 2001
+From b6328f7feb6691619bcb474d0e920f4aeec3f9fa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52a4e960b49c526dd1ad7c1e91ebcfa664a38e6d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- drivers/net/hns3/hns3_common.h | 2 +
+ drivers/net/hns3/hns3_common.h | 5 ++-
@@ -19 +20 @@
- 4 files changed, 79 insertions(+), 126 deletions(-)
+ 4 files changed, 81 insertions(+), 127 deletions(-)
@@ -22 +23 @@
-index da0a481f15..74d537d8d0 100644
+index 9b6b18a5bc..dc24f7557d 100644
@@ -25 +26 @@
-@@ -11,4 +11,5 @@
+@@ -12,4 +12,5 @@
@@ -29 +29,0 @@
- #include "hns3_common.h"
@@ -31 +31,2 @@
-@@ -847,2 +848,76 @@ hns3_get_pci_revision_id(struct hns3_hw *hw, uint8_t *revision_id)
+ int
+@@ -769,2 +770,76 @@ hns3_restore_rx_interrupt(struct hns3_hw *hw)
@@ -109 +110 @@
-index 5aa001f0cc..8eaeda26e7 100644
+index 0dbb1c0413..1d2ca24194 100644
@@ -112 +113,2 @@
-@@ -61,4 +61,6 @@ int hns3_restore_rx_interrupt(struct hns3_hw *hw);
+@@ -59,3 +59,6 @@ void hns3_unmap_rx_interrupt(struct rte_eth_dev *dev);
+ int hns3_restore_rx_interrupt(struct hns3_hw *hw);
@@ -114 +116 @@
- int hns3_get_pci_revision_id(struct hns3_hw *hw, uint8_t *revision_id);
+-#endif /* _HNS3_COMMON_H_ */
@@ -117,2 +119,2 @@
-
- #endif /* HNS3_COMMON_H */
++
++#endif /* HNS3_COMMON_H */
@@ -120 +122 @@
-index eb809cd8c9..ab565ce128 100644
+index ca59c42f4a..be6a92a313 100644
@@ -123 +125 @@
-@@ -2648,67 +2648,4 @@ hns3_parse_speed(int speed_cmd, uint32_t *speed)
+@@ -2665,67 +2665,4 @@ hns3_parse_speed(int speed_cmd, uint32_t *speed)
@@ -192 +194 @@
-index e43815607a..d3c1bdf2c5 100644
+index 87d094a6b4..0e66a82178 100644
@@ -261 +263 @@
-@@ -827,5 +766,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -839,5 +778,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
@@ -263 +265 @@
- if (hw->revision < PCI_REVISION_ID_HIP09_A) {
+ if (revision < PCI_REVISION_ID_HIP09_A) {
@@ -268 +270 @@
-@@ -838,5 +777,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -850,5 +789,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: refactor set RSS hash algorithm and key interface' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (55 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: extract common function to query device' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: fix clearing RSS configuration' " Kevin Traynor
` (40 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/abe093c214892f726133e1dc9e66fb58901392ee
Thanks.
Kevin
---
From abe093c214892f726133e1dc9e66fb58901392ee Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:53 +0800
Subject: [PATCH] net/hns3: refactor set RSS hash algorithm and key interface
[ upstream commit 88347111eb53bc54c598dde81715a06ca1dbd132 ]
The hns3_rss_set_algo_key() is used to set RSS hash algorithm and key to
hardware.
The maximum execution time of the command sent to the firmware is
proportional to the length of the key.
However, now this times is fixed, which isn't good for key expansion.
In addition, hash algorithm comes from rss_info::hash_algo maintained in
the driver, which also isn't good for the usage of this function.
Interface is updated to get hash algorithm and key length as input
parameters.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 3 ++-
| 48 ++++++++++++++++--------------------
| 4 ++-
3 files changed, 26 insertions(+), 29 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index a9256569e3..d2eab7e289 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1448,5 +1448,6 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
return ret;
- ret = hns3_rss_set_algo_key(hw, rss_config->key);
+ ret = hns3_rss_set_algo_key(hw, hw->rss_info.hash_algo,
+ rss_config->key, HNS3_RSS_KEY_SIZE);
if (ret)
return ret;
--git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 4560b8522c..23c367d16a 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -278,43 +278,35 @@ static const struct {
/*
* rss_generic_config command function, opcode:0x0D01.
- * Used to set algorithm, key_offset and hash key of rss.
+ * Used to set algorithm and hash key of RSS.
*/
int
-hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key)
+hns3_rss_set_algo_key(struct hns3_hw *hw, uint8_t hash_algo,
+ const uint8_t *key, uint8_t key_len)
{
-#define HNS3_KEY_OFFSET_MAX 3
-#define HNS3_SET_HASH_KEY_BYTE_FOUR 2
-
struct hns3_rss_generic_config_cmd *req;
struct hns3_cmd_desc desc;
- uint32_t key_offset, key_size;
- const uint8_t *key_cur;
- uint8_t cur_offset;
+ const uint8_t *cur_key;
+ uint16_t cur_key_size;
+ uint16_t max_bd_num;
+ uint16_t idx;
int ret;
req = (struct hns3_rss_generic_config_cmd *)desc.data;
- /*
- * key_offset=0, hash key byte0~15 is set to hardware.
- * key_offset=1, hash key byte16~31 is set to hardware.
- * key_offset=2, hash key byte32~39 is set to hardware.
- */
- for (key_offset = 0; key_offset < HNS3_KEY_OFFSET_MAX; key_offset++) {
+ max_bd_num = DIV_ROUND_UP(key_len, HNS3_RSS_HASH_KEY_NUM);
+ for (idx = 0; idx < max_bd_num; idx++) {
hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_GENERIC_CONFIG,
false);
- req->hash_config |=
- (hw->rss_info.hash_algo & HNS3_RSS_HASH_ALGO_MASK);
- req->hash_config |= (key_offset << HNS3_RSS_HASH_KEY_OFFSET_B);
+ req->hash_config |= (hash_algo & HNS3_RSS_HASH_ALGO_MASK);
+ req->hash_config |= (idx << HNS3_RSS_HASH_KEY_OFFSET_B);
- if (key_offset == HNS3_SET_HASH_KEY_BYTE_FOUR)
- key_size = HNS3_RSS_KEY_SIZE - HNS3_RSS_HASH_KEY_NUM *
- HNS3_SET_HASH_KEY_BYTE_FOUR;
+ if (idx == max_bd_num - 1)
+ cur_key_size = key_len % HNS3_RSS_HASH_KEY_NUM;
else
- key_size = HNS3_RSS_HASH_KEY_NUM;
+ cur_key_size = HNS3_RSS_HASH_KEY_NUM;
- cur_offset = key_offset * HNS3_RSS_HASH_KEY_NUM;
- key_cur = key + cur_offset;
- memcpy(req->hash_key, key_cur, key_size);
+ cur_key = key + idx * HNS3_RSS_HASH_KEY_NUM;
+ memcpy(req->hash_key, cur_key, cur_key_size);
ret = hns3_cmd_send(hw, &desc, 1);
@@ -519,5 +511,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
if (key) {
- ret = hns3_rss_set_algo_key(hw, key);
+ ret = hns3_rss_set_algo_key(hw, hw->rss_info.hash_algo,
+ key, HNS3_RSS_KEY_SIZE);
if (ret)
goto set_algo_key_fail;
@@ -796,6 +789,7 @@ hns3_config_rss(struct hns3_adapter *hns)
}
- /* Configure RSS hash algorithm and hash key offset */
- ret = hns3_rss_set_algo_key(hw, hash_key);
+ /* Configure RSS hash algorithm and hash key */
+ ret = hns3_rss_set_algo_key(hw, hw->rss_info.hash_algo, hash_key,
+ HNS3_RSS_KEY_SIZE);
if (ret)
return ret;
--git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 071b47b2ec..bc5b14e17b 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -112,5 +112,7 @@ int hns3_config_rss(struct hns3_adapter *hns);
void hns3_rss_uninit(struct hns3_adapter *hns);
int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf);
-int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key);
+int hns3_rss_set_algo_key(struct hns3_hw *hw, uint8_t hash_algo,
+ const uint8_t *key, uint8_t key_len);
+
#endif /* _HNS3_RSS_H_ */
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.217331947 +0000
+++ 0058-net-hns3-refactor-set-RSS-hash-algorithm-and-key-int.patch 2023-02-23 14:46:23.805236088 +0000
@@ -1 +1 @@
-From 88347111eb53bc54c598dde81715a06ca1dbd132 Mon Sep 17 00:00:00 2001
+From abe093c214892f726133e1dc9e66fb58901392ee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 88347111eb53bc54c598dde81715a06ca1dbd132 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index e88f9b7e45..ac094c839f 100644
+index a9256569e3..d2eab7e289 100644
@@ -33 +34 @@
-@@ -1495,5 +1495,6 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+@@ -1448,5 +1448,6 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
@@ -42 +43 @@
-index ca5a129234..3db7bf0445 100644
+index 4560b8522c..23c367d16a 100644
@@ -124 +125 @@
-index 8e8b056f4e..b7f62ca1ee 100644
+index 071b47b2ec..bc5b14e17b 100644
@@ -127 +128 @@
-@@ -110,5 +110,7 @@ int hns3_config_rss(struct hns3_adapter *hns);
+@@ -112,5 +112,7 @@ int hns3_config_rss(struct hns3_adapter *hns);
@@ -135 +136 @@
- #endif /* HNS3_RSS_H */
+ #endif /* _HNS3_RSS_H_ */
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: fix clearing RSS configuration' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (56 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: refactor set RSS hash algorithm and key interface' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: use RSS filter list to check duplicated rule' " Kevin Traynor
` (39 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/eee8b3cd45b38cedb736984245f5085f307ad2a7
Thanks.
Kevin
---
From eee8b3cd45b38cedb736984245f5085f307ad2a7 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:55 +0800
Subject: [PATCH] net/hns3: fix clearing RSS configuration
[ upstream commit 1aa5222454725001939ff571e685225f6cf85653 ]
When a RSS rule has an unsupported action, the RSS configuration is
cleared by mistake.
Remove clearing RSS configuration in this case.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index d2eab7e289..78d0bd7e5e 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1375,10 +1375,8 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
/* Check if the next not void action is END */
NEXT_ITEM_OF_ACTION(act, actions, act_index);
- if (act->type != RTE_FLOW_ACTION_TYPE_END) {
- memset(rss_conf, 0, sizeof(struct hns3_rss_conf));
+ if (act->type != RTE_FLOW_ACTION_TYPE_END)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
act, "Not supported action.");
- }
return 0;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.240986233 +0000
+++ 0059-net-hns3-fix-clearing-RSS-configuration.patch 2023-02-23 14:46:23.806236091 +0000
@@ -1 +1 @@
-From 1aa5222454725001939ff571e685225f6cf85653 Mon Sep 17 00:00:00 2001
+From eee8b3cd45b38cedb736984245f5085f307ad2a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1aa5222454725001939ff571e685225f6cf85653 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index de38a42048..5711757684 100644
+index d2eab7e289..78d0bd7e5e 100644
@@ -24 +25 @@
-@@ -1422,10 +1422,8 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
+@@ -1375,10 +1375,8 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: use RSS filter list to check duplicated rule' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (57 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: fix clearing RSS configuration' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: remove useless code when destroy valid RSS " Kevin Traynor
` (38 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/8ba1441f48dc4c1d222f90d0da4df3442ddea03e
Thanks.
Kevin
---
From 8ba1441f48dc4c1d222f90d0da4df3442ddea03e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:56 +0800
Subject: [PATCH] net/hns3: use RSS filter list to check duplicated rule
[ upstream commit 6afde23d843ecf67453eaf69924bd79873f6f207 ]
All rules from user are saved in RSS filter list, so use RSS
filter list to check duplicated rule.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 78d0bd7e5e..d0d0c7c636 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1254,5 +1254,5 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
return (func_is_same && rss_key_is_same &&
- comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) &&
+ comp->types == with->types &&
comp->level == with->level &&
comp->queue_num == with->queue_num &&
@@ -1552,13 +1552,5 @@ hns3_config_rss_filter(struct hns3_hw *hw,
/* Set hash algorithm and flow types by the user's config */
- ret = hns3_hw_rss_hash_set(hw, &rss_flow_conf);
- if (ret)
- return ret;
-
- ret = hns3_rss_conf_copy(rss_info, &rss_flow_conf);
- if (ret)
- hns3_err(hw, "RSS config init fail(%d)", ret);
-
- return ret;
+ return hns3_hw_rss_hash_set(hw, &rss_flow_conf);
}
@@ -1633,4 +1625,21 @@ hns3_restore_filter(struct hns3_adapter *hns)
}
+static bool
+hns3_rss_action_is_dup(struct hns3_hw *hw,
+ const struct rte_flow_action_rss *act)
+{
+ struct hns3_rss_conf_ele *filter;
+
+ TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) {
+ if (!filter->filter_info.valid)
+ continue;
+
+ if (hns3_action_rss_same(&filter->filter_info.conf, act))
+ return true;
+ }
+
+ return false;
+}
+
static int
hns3_flow_parse_rss(struct rte_eth_dev *dev,
@@ -1639,9 +1648,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev,
struct hns3_adapter *hns = dev->data->dev_private;
struct hns3_hw *hw = &hns->hw;
- bool ret;
- ret = hns3_action_rss_same(&hw->rss_info.conf, &conf->conf);
- if (ret) {
- hns3_err(hw, "Enter duplicate RSS configuration : %d", ret);
+ if (hns3_rss_action_is_dup(hw, &conf->conf)) {
+ hns3_err(hw, "duplicate RSS configuration");
return -EINVAL;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.264058965 +0000
+++ 0060-net-hns3-use-RSS-filter-list-to-check-duplicated-rul.patch 2023-02-23 14:46:23.808236098 +0000
@@ -1 +1 @@
-From 6afde23d843ecf67453eaf69924bd79873f6f207 Mon Sep 17 00:00:00 2001
+From 8ba1441f48dc4c1d222f90d0da4df3442ddea03e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6afde23d843ecf67453eaf69924bd79873f6f207 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5711757684..4cca675c53 100644
+index 78d0bd7e5e..d0d0c7c636 100644
@@ -22 +23 @@
-@@ -1301,5 +1301,5 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1254,5 +1254,5 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
@@ -29 +30 @@
-@@ -1597,13 +1597,5 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1552,13 +1552,5 @@ hns3_config_rss_filter(struct hns3_hw *hw,
@@ -44 +45 @@
-@@ -1677,4 +1669,21 @@ hns3_restore_filter(struct hns3_adapter *hns)
+@@ -1633,4 +1625,21 @@ hns3_restore_filter(struct hns3_adapter *hns)
@@ -66 +67 @@
-@@ -1683,9 +1692,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev,
+@@ -1639,9 +1648,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: remove useless code when destroy valid RSS rule' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (58 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: use RSS filter list to check duplicated rule' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: fix warning on flush or destroy " Kevin Traynor
` (37 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/2f00c06957fc89f7a3a483d118ef5fcef558b847
Thanks.
Kevin
---
From 2f00c06957fc89f7a3a483d118ef5fcef558b847 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:57 +0800
Subject: [PATCH] net/hns3: remove useless code when destroy valid RSS rule
[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ]
When all rules are flushed the hw::rss_info::conf::func set to
RTE_ETH_HASH_FUNCTION_MAX and hw::rss_info::conf::queue set to NULL
which indicates no flow rules is issued.
See: commit eb158fc756a5 ("net/hns3: fix config when creating RSS rule
after flush").
Actually, the way determining whether there are rules has been changed
by walking the flow RSS list.
See: commit 705a50800334 ("net/hns3: fix RSS filter restore").
In addition, the rte_flow_action_rss from user isn't saved to 'conf' in
hw->rss_info now. So this code can be removed.
Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush")
Fixes: 705a50800334 ("net/hns3: fix RSS filter restore")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 26 ++------------------------
1 file changed, 2 insertions(+), 24 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index d0d0c7c636..5803406ef7 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1233,17 +1233,6 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
bool func_is_same;
- /*
- * When user flush all RSS rule, RSS func is set invalid with
- * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after
- * flushed, any validate RSS func is different with it before
- * flushed. Others, when user create an action RSS with RSS func
- * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same
- * between continuous RSS flow.
- */
- if (comp->func == RTE_ETH_HASH_FUNCTION_MAX)
- func_is_same = false;
- else
- func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
- (comp->func == with->func) : true;
+ func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
+ (comp->func == with->func) : true;
if (with->key_len == 0 || with->key == NULL)
@@ -1489,5 +1478,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
const struct hns3_rss_conf *conf, bool add)
{
- struct hns3_rss_conf *rss_info;
uint64_t flow_types;
uint16_t num;
@@ -1516,5 +1504,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
rss_flow_conf.types = flow_types;
- rss_info = &hw->rss_info;
if (!add) {
if (!conf->valid)
@@ -1527,13 +1514,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
}
- if (rss_flow_conf.queue_num) {
- /*
- * Due the content of queue pointer have been reset to
- * 0, the rss_info->conf.queue should be set to NULL
- */
- rss_info->conf.queue = NULL;
- rss_info->conf.queue_num = 0;
- }
-
return 0;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.287441603 +0000
+++ 0061-net-hns3-remove-useless-code-when-destroy-valid-RSS-.patch 2023-02-23 14:46:23.810236105 +0000
@@ -1 +1 @@
-From 546031ba551485c3e3aa57c3698975c2852cbef1 Mon Sep 17 00:00:00 2001
+From 2f00c06957fc89f7a3a483d118ef5fcef558b847 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 4cca675c53..3809fcc2d7 100644
+index d0d0c7c636..5803406ef7 100644
@@ -33 +34 @@
-@@ -1280,17 +1280,6 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1233,17 +1233,6 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
@@ -53 +54 @@
-@@ -1534,5 +1523,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1489,5 +1478,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
@@ -59 +60 @@
-@@ -1561,5 +1549,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1516,5 +1504,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
@@ -65 +66 @@
-@@ -1572,13 +1559,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1527,13 +1514,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: fix warning on flush or destroy rule' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (59 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: remove useless code when destroy valid RSS " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: fix config struct used for conversion' " Kevin Traynor
` (36 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/c7c798a8f63d321ce23669fd9fe5fd9b6cf5dec2
Thanks.
Kevin
---
From c7c798a8f63d321ce23669fd9fe5fd9b6cf5dec2 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:58 +0800
Subject: [PATCH] net/hns3: fix warning on flush or destroy rule
[ upstream commit a7bf2789168c8d49ca4dec5bb7bb0b3f765fc1bd ]
Although flow rules will no longer be used when user flush all rules
or destroy a rule a warning is generated like:
"modified RSS types based on hardware support, requested:0x137f83fffc
configured:0x3ffc".
Prevent warning for flush or destroy rule case.
Fixes: ec674cb742e5 ("net/hns3: fix flushing RSS rule")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 5803406ef7..cc1a7f5eaa 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1493,15 +1493,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
};
- /* Filter the unsupported flow types */
- flow_types = conf->conf.types ?
- rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT :
- hw->rss_info.conf.types;
- if (flow_types != rss_flow_conf.types)
- hns3_warn(hw, "modified RSS types based on hardware support, "
- "requested:0x%" PRIx64 " configured:0x%" PRIx64,
- rss_flow_conf.types, flow_types);
- /* Update the useful flow types */
- rss_flow_conf.types = flow_types;
-
if (!add) {
if (!conf->valid)
@@ -1529,4 +1518,15 @@ hns3_config_rss_filter(struct hns3_hw *hw,
}
+ /* Filter the unsupported flow types */
+ flow_types = conf->conf.types ?
+ rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT :
+ hw->rss_info.conf.types;
+ if (flow_types != rss_flow_conf.types)
+ hns3_warn(hw, "modified RSS types based on hardware support,"
+ " requested:0x%" PRIx64 " configured:0x%" PRIx64,
+ rss_flow_conf.types, flow_types);
+ /* Update the useful flow types */
+ rss_flow_conf.types = flow_types;
+
/* Set hash algorithm and flow types by the user's config */
return hns3_hw_rss_hash_set(hw, &rss_flow_conf);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.309717819 +0000
+++ 0062-net-hns3-fix-warning-on-flush-or-destroy-rule.patch 2023-02-23 14:46:23.811236109 +0000
@@ -1 +1 @@
-From a7bf2789168c8d49ca4dec5bb7bb0b3f765fc1bd Mon Sep 17 00:00:00 2001
+From c7c798a8f63d321ce23669fd9fe5fd9b6cf5dec2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a7bf2789168c8d49ca4dec5bb7bb0b3f765fc1bd ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 3809fcc2d7..632247b846 100644
+index 5803406ef7..cc1a7f5eaa 100644
@@ -26 +27 @@
-@@ -1538,15 +1538,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1493,15 +1493,4 @@ hns3_config_rss_filter(struct hns3_hw *hw,
@@ -42 +43 @@
-@@ -1574,4 +1563,15 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1529,4 +1518,15 @@ hns3_config_rss_filter(struct hns3_hw *hw,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: fix config struct used for conversion' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (60 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: fix warning on flush or destroy " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: fix duplicate RSS rule check' " Kevin Traynor
` (35 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/69d2be50d9ec4bbad7342d2bf00894b918150b0f
Thanks.
Kevin
---
From 69d2be50d9ec4bbad7342d2bf00894b918150b0f Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:59 +0800
Subject: [PATCH] net/hns3: fix config struct used for conversion
[ upstream commit 815c7db53167f7ee1573dca18fa7f889e44764d4 ]
When the type in 'struct rte_flow_action' is RTE_FLOW_ACTION_TYPE_RSS,
the 'conf' pointer references the 'struct rte_flow_action_rss' instead
of the 'struct hns3_rss_conf' in driver. But driver uses 'struct
hns3_rss_conf' to convert this 'conf' pointer to get RSS action
configuration.
In addition, RSS filter configuration is directly cloned to RSS filter
node instead of coping it after successfully setting to hardware.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 59 ++++++++++++++----------------------
1 file changed, 22 insertions(+), 37 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index cc1a7f5eaa..8ed1e405c0 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -96,6 +96,6 @@ hns3_find_rss_general_action(const struct rte_flow_item pattern[],
const struct rte_flow_action actions[])
{
+ const struct rte_flow_action_rss *rss_act;
const struct rte_flow_action *act = NULL;
- const struct hns3_rss_conf *rss;
bool have_eth = false;
@@ -116,6 +116,6 @@ hns3_find_rss_general_action(const struct rte_flow_item pattern[],
}
- rss = act->conf;
- if (have_eth && rss->conf.queue_num) {
+ rss_act = act->conf;
+ if (have_eth && rss_act->queue_num) {
/*
* Pattern have ETH and action's queue_num > 0, indicate this is
@@ -1250,28 +1250,4 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
}
-static int
-hns3_rss_conf_copy(struct hns3_rss_conf *out,
- const struct rte_flow_action_rss *in)
-{
- if (in->key_len > RTE_DIM(out->key) ||
- in->queue_num > RTE_DIM(out->queue))
- return -EINVAL;
- if (in->key == NULL && in->key_len)
- return -EINVAL;
- out->conf = (struct rte_flow_action_rss) {
- .func = in->func,
- .level = in->level,
- .types = in->types,
- .key_len = in->key_len,
- .queue_num = in->queue_num,
- };
- out->conf.queue = memcpy(out->queue, in->queue,
- sizeof(*in->queue) * in->queue_num);
- if (in->key)
- out->conf.key = memcpy(out->key, in->key, in->key_len);
-
- return 0;
-}
-
static bool
hns3_rss_input_tuple_supported(struct hns3_hw *hw,
@@ -1690,7 +1666,8 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
{
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ const struct rte_flow_action_rss *rss_act;
struct hns3_rss_conf_ele *rss_filter_ptr;
struct hns3_rss_conf_ele *filter_ptr;
- const struct hns3_rss_conf *rss_conf;
+ struct hns3_rss_conf *new_conf;
int ret;
@@ -1702,17 +1679,25 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
}
- /*
- * After all the preceding tasks are successfully configured, configure
- * rules to the hardware to simplify the rollback of rules in the
- * hardware.
- */
- rss_conf = (const struct hns3_rss_conf *)act->conf;
- ret = hns3_flow_parse_rss(dev, rss_conf, true);
+ rss_act = (const struct rte_flow_action_rss *)act->conf;
+ new_conf = &rss_filter_ptr->filter_info;
+ memcpy(&new_conf->conf, rss_act, sizeof(*rss_act));
+ if (rss_act->queue_num > 0) {
+ memcpy(new_conf->queue, rss_act->queue,
+ rss_act->queue_num * sizeof(new_conf->queue[0]));
+ new_conf->conf.queue = new_conf->queue;
+ }
+ if (rss_act->key_len > 0) {
+ if (rss_act->key != NULL) {
+ memcpy(new_conf->key, rss_act->key,
+ rss_act->key_len * sizeof(new_conf->key[0]));
+ new_conf->conf.key = new_conf->key;
+ }
+ }
+
+ ret = hns3_flow_parse_rss(dev, new_conf, true);
if (ret != 0) {
rte_free(rss_filter_ptr);
return ret;
}
-
- hns3_rss_conf_copy(&rss_filter_ptr->filter_info, &rss_conf->conf);
rss_filter_ptr->filter_info.valid = true;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.332714731 +0000
+++ 0063-net-hns3-fix-config-struct-used-for-conversion.patch 2023-02-23 14:46:23.813236116 +0000
@@ -1 +1 @@
-From 815c7db53167f7ee1573dca18fa7f889e44764d4 Mon Sep 17 00:00:00 2001
+From 69d2be50d9ec4bbad7342d2bf00894b918150b0f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 815c7db53167f7ee1573dca18fa7f889e44764d4 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 632247b846..dd762c02cb 100644
+index cc1a7f5eaa..8ed1e405c0 100644
@@ -45 +46 @@
-@@ -1297,28 +1297,4 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1250,28 +1250,4 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
@@ -74 +75 @@
-@@ -1734,7 +1710,8 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
+@@ -1690,7 +1666,8 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
@@ -84 +85 @@
-@@ -1746,17 +1723,25 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
+@@ -1702,17 +1679,25 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: fix duplicate RSS rule check' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (61 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: fix config struct used for conversion' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/sfc: export pick transfer proxy callback to representors' " Kevin Traynor
` (34 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/f6c50b6c5070dadf72b90ebaf2ebd28cbea01c3b
Thanks.
Kevin
---
From f6c50b6c5070dadf72b90ebaf2ebd28cbea01c3b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:03:00 +0800
Subject: [PATCH] net/hns3: fix duplicate RSS rule check
[ upstream commit 150fd8f839e332d68aa7b60646c2033084544cb7 ]
Currently, the interface for verifying duplicate RSS rules has
some problems:
1) If the value of 'func' in configuring RSS rule is default
value, this rule is mistakenly considered as a duplicate rule.
2) If key length is zero or 'key' is NULL in configuring RSS rule
this rule is also mistakenly considered as a duplicate rule.
3) If 'key' or 'queue' in struct rte_flow_action_rss being NULL
is used to memcpy, which may cause segment fault.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 63 +++++++++++++++++++++++++++---------
1 file changed, 47 insertions(+), 16 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 8ed1e405c0..582bf383c9 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1226,26 +1226,57 @@ hns3_filterlist_flush(struct rte_eth_dev *dev)
}
+static bool
+hns3_flow_rule_key_same(const struct rte_flow_action_rss *comp,
+ const struct rte_flow_action_rss *with)
+{
+ if (comp->key_len != with->key_len)
+ return false;
+
+ if (with->key_len == 0)
+ return true;
+
+ if (comp->key == NULL && with->key == NULL)
+ return true;
+
+ if (!(comp->key != NULL && with->key != NULL))
+ return false;
+
+ return !memcmp(comp->key, with->key, with->key_len);
+}
+
+static bool
+hns3_flow_rule_queues_same(const struct rte_flow_action_rss *comp,
+ const struct rte_flow_action_rss *with)
+{
+ if (comp->queue_num != with->queue_num)
+ return false;
+
+ if (with->queue_num == 0)
+ return true;
+
+ if (comp->queue == NULL && with->queue == NULL)
+ return true;
+
+ if (!(comp->queue != NULL && with->queue != NULL))
+ return false;
+
+ return !memcmp(comp->queue, with->queue, with->queue_num);
+}
+
static bool
hns3_action_rss_same(const struct rte_flow_action_rss *comp,
const struct rte_flow_action_rss *with)
{
- bool rss_key_is_same;
- bool func_is_same;
+ bool same_level;
+ bool same_types;
+ bool same_func;
- func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
- (comp->func == with->func) : true;
+ same_level = (comp->level == with->level);
+ same_types = (comp->types == with->types);
+ same_func = (comp->func == with->func);
- if (with->key_len == 0 || with->key == NULL)
- rss_key_is_same = 1;
- else
- rss_key_is_same = comp->key_len == with->key_len &&
- !memcmp(comp->key, with->key, with->key_len);
-
- return (func_is_same && rss_key_is_same &&
- comp->types == with->types &&
- comp->level == with->level &&
- comp->queue_num == with->queue_num &&
- !memcmp(comp->queue, with->queue,
- sizeof(*with->queue) * with->queue_num));
+ return same_level && same_types && same_func &&
+ hns3_flow_rule_key_same(comp, with) &&
+ hns3_flow_rule_queues_same(comp, with);
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.355708123 +0000
+++ 0064-net-hns3-fix-duplicate-RSS-rule-check.patch 2023-02-23 14:46:23.814236119 +0000
@@ -1 +1 @@
-From 150fd8f839e332d68aa7b60646c2033084544cb7 Mon Sep 17 00:00:00 2001
+From f6c50b6c5070dadf72b90ebaf2ebd28cbea01c3b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 150fd8f839e332d68aa7b60646c2033084544cb7 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index dd762c02cb..881d70613c 100644
+index 8ed1e405c0..582bf383c9 100644
@@ -28 +29 @@
-@@ -1273,26 +1273,57 @@ hns3_filterlist_flush(struct rte_eth_dev *dev)
+@@ -1226,26 +1226,57 @@ hns3_filterlist_flush(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/sfc: export pick transfer proxy callback to representors' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (62 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: fix duplicate RSS rule check' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'app/testpmd: fix link check condition on port start' " Kevin Traynor
` (33 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Ivan Malov
Cc: Andy Moreton, Viacheslav Galaktionov, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/a3172b1ab98a7db04be4878ddf9ce020ebf646bf
Thanks.
Kevin
---
From a3172b1ab98a7db04be4878ddf9ce020ebf646bf Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Tue, 31 Jan 2023 15:08:39 +0400
Subject: [PATCH] net/sfc: export pick transfer proxy callback to representors
[ upstream commit d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 ]
Currently, the "pick transfer proxy ethdev" callback is only
advertised for non-representor (in example, main PF) ethdevs.
That does not sit well with the original idea of this method,
which is to let applications discover the privileged port to
use for transfer flow management instead of any given ethdev.
Applications trying to leverage this API on sfc representors
receive an error and cannot configure transfer flow offloads.
Fix the problem by exporting the method to representor ports.
Fixes: 26706314d418 ("net/sfc: implement transfer proxy port callback")
Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_repr.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c
index 9d88d554c1..0669780f86 100644
--- a/drivers/net/sfc/sfc_repr.c
+++ b/drivers/net/sfc/sfc_repr.c
@@ -10,4 +10,6 @@
#include <stdint.h>
+#include <rte_flow_driver.h>
+#include <rte_flow.h>
#include <rte_mbuf.h>
#include <rte_ethdev.h>
@@ -883,4 +885,27 @@ sfc_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
}
+static int
+sfc_repr_flow_pick_transfer_proxy(struct rte_eth_dev *dev,
+ uint16_t *transfer_proxy_port,
+ struct rte_flow_error *error)
+{
+ struct sfc_repr_shared *srs = sfc_repr_shared_by_eth_dev(dev);
+
+ return rte_flow_pick_transfer_proxy(srs->pf_port_id,
+ transfer_proxy_port, error);
+}
+
+const struct rte_flow_ops sfc_repr_flow_ops = {
+ .pick_transfer_proxy = sfc_repr_flow_pick_transfer_proxy,
+};
+
+static int
+sfc_repr_dev_flow_ops_get(struct rte_eth_dev *dev __rte_unused,
+ const struct rte_flow_ops **ops)
+{
+ *ops = &sfc_repr_flow_ops;
+ return 0;
+}
+
static const struct eth_dev_ops sfc_repr_dev_ops = {
.dev_configure = sfc_repr_dev_configure,
@@ -895,4 +920,5 @@ static const struct eth_dev_ops sfc_repr_dev_ops = {
.tx_queue_setup = sfc_repr_tx_queue_setup,
.tx_queue_release = sfc_repr_tx_queue_release,
+ .flow_ops_get = sfc_repr_dev_flow_ops_get,
};
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.378213589 +0000
+++ 0065-net-sfc-export-pick-transfer-proxy-callback-to-repre.patch 2023-02-23 14:46:23.815236123 +0000
@@ -1 +1 @@
-From d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 Mon Sep 17 00:00:00 2001
+From a3172b1ab98a7db04be4878ddf9ce020ebf646bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 417d0073cb..4b03b101d8 100644
+index 9d88d554c1..0669780f86 100644
@@ -38 +39 @@
-@@ -889,4 +891,27 @@ sfc_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -883,4 +885,27 @@ sfc_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -66 +67 @@
-@@ -902,4 +927,5 @@ static const struct eth_dev_ops sfc_repr_dev_ops = {
+@@ -895,4 +920,5 @@ static const struct eth_dev_ops sfc_repr_dev_ops = {
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/testpmd: fix link check condition on port start' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (63 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/sfc: export pick transfer proxy callback to representors' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: add debug info for Rx/Tx dummy function' " Kevin Traynor
` (32 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Aman Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/e0f5e9d162f3d01837a1db231ee852e7e3fb16f8
Thanks.
Kevin
---
From e0f5e9d162f3d01837a1db231ee852e7e3fb16f8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Fri, 27 Jan 2023 22:45:13 +0000
Subject: [PATCH] app/testpmd: fix link check condition on port start
[ upstream commit cdede073a515432fc168d252d93f9a2d333ce8a0 ]
In testpmd port start function, 'need_check_link_status' variable is
used to detect if a link check is required after port is started.
Intention is if at least one port is started, link check should be
called, and initially 'need_check_link_status' used as following:
```
start_port
need_check_link_status <- 0
for each p in port
ret <- config & start p
if ret is failure
break
need_check_link_status <- 1
if need_check_link_status
check link
else
log failure message
```
Later above logic is modified [1] because when there is no port at all,
'need_check_link_status' remains zero and it causes and error message
although this is a valid use case.
For this code updated as following:
```
start_port
need_check_link_status <- -1
for each p in port
need_check_link_status <- 0
ret <- config & start p
if ret is failure
break
need_check_link_status <- 1
if need_check_link_status == 1
check link
else if need_check_link_status == 0
log failure message
```
This modification works fine if 'start_port()' called for a single port,
but function support both single port and all ports with 'RTE_PORT_ALL'
parameter to the function.
When it is called for all ports, above logic is wrong because
'need_check_link_status' value reset on each iteration of the loop.
For multi port case, if last port fails to start,
'need_check_link_status' will be zero and no link check will be done and
it will log a wrong error message.
Overall there are three cases to cover:
* No port exist at all
* All ports are already started
* At least one port started successfully
To cover all three cases, one option is to use 'need_check_link_status'
have multiple values to reflect above cases.
But meaning of values are not obvious which can lead more issues in the
future.
Instead converting 'need_check_link_status' to multiple boolean
variables whose names are self explanatory.
This fixes issue and link check called if at least one port started
successfully as intended.
Also log message only printed when at least one port exists and all
ports are already in started state.
[1]
Fixes: 92d2703e2c43 ("app/testpmd: fix log with no bound device")
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
app/test-pmd/testpmd.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 4e15c982c8..ea5cada21e 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2805,5 +2805,5 @@ int
start_port(portid_t pid)
{
- int diag, need_check_link_status = -1;
+ int diag;
portid_t pi;
portid_t p_pi = RTE_MAX_ETHPORTS;
@@ -2816,4 +2816,7 @@ start_port(portid_t pid)
struct rte_port *port;
struct rte_eth_hairpin_cap cap;
+ bool at_least_one_port_exist = false;
+ bool all_ports_already_started = true;
+ bool at_least_one_port_successfully_started = false;
if (port_id_is_invalid(pid, ENABLED_WARN))
@@ -2831,9 +2834,11 @@ start_port(portid_t pid)
}
- need_check_link_status = 0;
+ at_least_one_port_exist = true;
+
port = &ports[pi];
- if (port->port_status == RTE_PORT_STOPPED)
+ if (port->port_status == RTE_PORT_STOPPED) {
port->port_status = RTE_PORT_HANDLING;
- else {
+ all_ports_already_started = false;
+ } else {
fprintf(stderr, "Port %d is now not stopped\n", pi);
continue;
@@ -3050,13 +3055,12 @@ start_port(portid_t pid)
RTE_ETHER_ADDR_BYTES(&port->eth_addr));
- /* at least one port started, need checking link status */
- need_check_link_status = 1;
+ at_least_one_port_successfully_started = true;
pl[cfg_pi++] = pi;
}
- if (need_check_link_status == 1 && !no_link_check)
+ if (at_least_one_port_successfully_started && !no_link_check)
check_all_ports_link_status(RTE_PORT_ALL);
- else if (need_check_link_status == 0)
+ else if (at_least_one_port_exist & all_ports_already_started)
fprintf(stderr, "Please stop the ports first\n");
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.400266408 +0000
+++ 0066-app-testpmd-fix-link-check-condition-on-port-start.patch 2023-02-23 14:46:23.818236133 +0000
@@ -1 +1 @@
-From cdede073a515432fc168d252d93f9a2d333ce8a0 Mon Sep 17 00:00:00 2001
+From e0f5e9d162f3d01837a1db231ee852e7e3fb16f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cdede073a515432fc168d252d93f9a2d333ce8a0 ]
+
@@ -77 +78,0 @@
-Cc: stable@dpdk.org
@@ -86 +87 @@
-index f3e29a5b4b..d93d07ae09 100644
+index 4e15c982c8..ea5cada21e 100644
@@ -89 +90 @@
-@@ -2921,5 +2921,5 @@ int
+@@ -2805,5 +2805,5 @@ int
@@ -96 +97 @@
-@@ -2932,4 +2932,7 @@ start_port(portid_t pid)
+@@ -2816,4 +2816,7 @@ start_port(portid_t pid)
@@ -104 +105 @@
-@@ -2947,9 +2950,11 @@ start_port(portid_t pid)
+@@ -2831,9 +2834,11 @@ start_port(portid_t pid)
@@ -119 +120 @@
-@@ -3171,13 +3176,12 @@ start_port(portid_t pid)
+@@ -3050,13 +3055,12 @@ start_port(portid_t pid)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: add debug info for Rx/Tx dummy function' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (64 preceding siblings ...)
2023-02-23 15:05 ` patch 'app/testpmd: fix link check condition on port start' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:05 ` patch 'net/hns3: remove debug condition for Tx prepare' " Kevin Traynor
` (31 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/c0862887608906049d9ec592d8beb3d3a2c71cf7
Thanks.
Kevin
---
From c0862887608906049d9ec592d8beb3d3a2c71cf7 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 11 Feb 2023 17:18:26 +0800
Subject: [PATCH] net/hns3: add debug info for Rx/Tx dummy function
[ upstream commit a8f52a5cf13715c61dfe224815c7f4e4858be82f ]
Now dummy function can be report by rte_eth_rx/tx_burst_mode_get.
So this patch adds debug info for Rx/Tx dummy function.
Fixes: 7feb2aee0e2c ("net/hns3: log selected datapath")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index cb388f0acd..b51d64e4de 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4432,5 +4432,4 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
eth_dev->tx_pkt_prepare = prep;
eth_dev->tx_descriptor_status = hns3_dev_tx_descriptor_status;
- hns3_trace_rxtx_function(eth_dev);
} else {
eth_dev->rx_pkt_burst = hns3_dummy_rxtx_burst;
@@ -4439,4 +4438,5 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
}
+ hns3_trace_rxtx_function(eth_dev);
hns3_eth_dev_fp_ops_config(eth_dev);
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.424633713 +0000
+++ 0067-net-hns3-add-debug-info-for-Rx-Tx-dummy-function.patch 2023-02-23 14:46:23.822236147 +0000
@@ -1 +1 @@
-From a8f52a5cf13715c61dfe224815c7f4e4858be82f Mon Sep 17 00:00:00 2001
+From c0862887608906049d9ec592d8beb3d3a2c71cf7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a8f52a5cf13715c61dfe224815c7f4e4858be82f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index feef9e1c7b..2524f4c3c2 100644
+index cb388f0acd..b51d64e4de 100644
@@ -22 +23 @@
-@@ -4421,5 +4421,4 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
+@@ -4432,5 +4432,4 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
@@ -27,2 +28,2 @@
- eth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;
-@@ -4428,4 +4427,5 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
+ eth_dev->rx_pkt_burst = hns3_dummy_rxtx_burst;
+@@ -4439,4 +4438,5 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/hns3: remove debug condition for Tx prepare' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (65 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: add debug info for Rx/Tx dummy function' " Kevin Traynor
@ 2023-02-23 15:05 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/sfc: fix MAC address entry leak in transfer flow parsing' " Kevin Traynor
` (30 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Dongdong Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/483243b873c38cb4a348ceaebad4e322e04761ec
Thanks.
Kevin
---
From 483243b873c38cb4a348ceaebad4e322e04761ec Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 11 Feb 2023 17:18:27 +0800
Subject: [PATCH] net/hns3: remove debug condition for Tx prepare
[ upstream commit a8d240786e1af129fdf789391d574bf4a7fe60e6 ]
The Tx prepare in driver is always needed if RTE_LIBRTE_ETHDEV_DEBUG
is defined. But it doesn't matter with this macro. Let's remove it.
Fixes: d7ec2c076579 ("net/hns3: select Tx prepare based on Tx offload")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index b51d64e4de..5c7de80e7b 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4315,9 +4315,4 @@ static bool
hns3_get_tx_prep_needed(struct rte_eth_dev *dev)
{
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
- RTE_SET_USED(dev);
- /* always perform tx_prepare when debug */
- return true;
-#else
#define HNS3_DEV_TX_CSKUM_TSO_OFFLOAD_MASK (\
RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | \
@@ -4337,5 +4332,4 @@ hns3_get_tx_prep_needed(struct rte_eth_dev *dev)
return false;
-#endif
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.448932404 +0000
+++ 0068-net-hns3-remove-debug-condition-for-Tx-prepare.patch 2023-02-23 14:46:23.825236158 +0000
@@ -1 +1 @@
-From a8d240786e1af129fdf789391d574bf4a7fe60e6 Mon Sep 17 00:00:00 2001
+From 483243b873c38cb4a348ceaebad4e322e04761ec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a8d240786e1af129fdf789391d574bf4a7fe60e6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2524f4c3c2..921d72d69d 100644
+index b51d64e4de..5c7de80e7b 100644
@@ -22 +23 @@
-@@ -4312,9 +4312,4 @@ static bool
+@@ -4315,9 +4315,4 @@ static bool
@@ -32 +33 @@
-@@ -4334,5 +4329,4 @@ hns3_get_tx_prep_needed(struct rte_eth_dev *dev)
+@@ -4337,5 +4332,4 @@ hns3_get_tx_prep_needed(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/sfc: fix MAC address entry leak in transfer flow parsing' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (66 preceding siblings ...)
2023-02-23 15:05 ` patch 'net/hns3: remove debug condition for Tx prepare' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/sfc: enforce fate action in transfer flow rules' " Kevin Traynor
` (29 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Ivan Malov
Cc: Viacheslav Galaktionov, Andy Moreton, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/ef7d2f34a751b11df520655c6a29aa84ca7e8d71
Thanks.
Kevin
---
From ef7d2f34a751b11df520655c6a29aa84ca7e8d71 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Tue, 14 Feb 2023 17:06:59 +0400
Subject: [PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing
[ upstream commit 97f7e36ad946986a14903db68b6770aacaf53ae1 ]
When the action parsing helper discovers it can "attach" to
an existing action set, it must invoke "delete" on the MAC
address(es) that it has "attached" to during parsing. That
is because the action set itself (i.e. not the flow rule
entry) holds a reference of the address(es).
Fixes: 4c6005999e41 ("net/sfc: support MAC address edits in transfer flows")
Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_mae.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index b34c9afd5b..e8ef844427 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -4147,4 +4147,6 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
spec_mae->action_set = sfc_mae_action_set_attach(sa, &ctx);
if (spec_mae->action_set != NULL) {
+ sfc_mae_mac_addr_del(sa, ctx.src_mac);
+ sfc_mae_mac_addr_del(sa, ctx.dst_mac);
sfc_mae_encap_header_del(sa, ctx.encap_header);
efx_mae_action_set_spec_fini(sa->nic, ctx.spec);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.472971353 +0000
+++ 0069-net-sfc-fix-MAC-address-entry-leak-in-transfer-flow-.patch 2023-02-23 14:46:23.828236168 +0000
@@ -1 +1 @@
-From 97f7e36ad946986a14903db68b6770aacaf53ae1 Mon Sep 17 00:00:00 2001
+From ef7d2f34a751b11df520655c6a29aa84ca7e8d71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97f7e36ad946986a14903db68b6770aacaf53ae1 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index aab697b204..c254562696 100644
+index b34c9afd5b..e8ef844427 100644
@@ -27 +28 @@
-@@ -3913,4 +3913,6 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
+@@ -4147,4 +4147,6 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/sfc: enforce fate action in transfer flow rules' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (67 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/sfc: fix MAC address entry leak in transfer flow parsing' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/txgbe: fix Rx buffer size in config register' " Kevin Traynor
` (28 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Ivan Malov
Cc: Viacheslav Galaktionov, Andy Moreton, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/08f5c42a98dcaf2a73cfca4f2353f5d86c8fb050
Thanks.
Kevin
---
From 08f5c42a98dcaf2a73cfca4f2353f5d86c8fb050 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Tue, 14 Feb 2023 17:12:47 +0400
Subject: [PATCH] net/sfc: enforce fate action in transfer flow rules
[ upstream commit 3b8e8f046b6754dfa7157675699ea0f5c65bba36 ]
According to DPDK documentation, not specifying a
fate action in a flow rule results in undefined
behaviour. Define right behaviour in the driver.
Fixes: 0839236d0391 ("net/sfc: support flow action drop in transfer rules")
Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_mae.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index e8ef844427..ca08bd466a 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -4145,4 +4145,19 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
}
+ /*
+ * A DPDK flow entry must specify a fate action, which the parser
+ * converts into a DELIVER action in a libefx action set. An
+ * attempt to replace the action in the action set should
+ * fail. If it succeeds then report an error, as the
+ * parsed flow entry did not contain a fate action.
+ */
+ rc = efx_mae_action_set_populate_drop(ctx.spec);
+ if (rc == 0) {
+ rc = rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+ "no fate action found");
+ goto fail_check_fate_action;
+ }
+
spec_mae->action_set = sfc_mae_action_set_attach(sa, &ctx);
if (spec_mae->action_set != NULL) {
@@ -4161,4 +4176,5 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
fail_action_set_add:
+fail_check_fate_action:
fail_workaround_jump_delivery:
fail_nb_count:
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.496601152 +0000
+++ 0070-net-sfc-enforce-fate-action-in-transfer-flow-rules.patch 2023-02-23 14:46:23.832236182 +0000
@@ -1 +1 @@
-From 3b8e8f046b6754dfa7157675699ea0f5c65bba36 Mon Sep 17 00:00:00 2001
+From 08f5c42a98dcaf2a73cfca4f2353f5d86c8fb050 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b8e8f046b6754dfa7157675699ea0f5c65bba36 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c254562696..3daeed81b9 100644
+index e8ef844427..ca08bd466a 100644
@@ -25 +26 @@
-@@ -3911,4 +3911,19 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
+@@ -4145,4 +4145,19 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
@@ -45 +46 @@
-@@ -3927,4 +3942,5 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
+@@ -4161,4 +4176,5 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
@@ -49 +50 @@
- fail_workaround_tunnel_delivery:
+ fail_workaround_jump_delivery:
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/txgbe: fix Rx buffer size in config register' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (68 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/sfc: enforce fate action in transfer flow rules' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/mlx5: fix flow sample with ConnectX-5' " Kevin Traynor
` (27 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/190d16fb4c5307cae6b08c6aed78219956ff07b9
Thanks.
Kevin
---
From 190d16fb4c5307cae6b08c6aed78219956ff07b9 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 15 Feb 2023 10:00:56 +0800
Subject: [PATCH] net/txgbe: fix Rx buffer size in config register
[ upstream commit 8a3ef4b89e6dd0247355fdf3a77ff7ec1db28d8d ]
When round up buffer size to 1K, to configure the register, hardware
will receive packets exceeding the buffer size in LRO mode. It will
cause a segment fault in the receive function.
Fixes: be797cbf4582 ("net/txgbe: add Rx and Tx init")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 4c63a82fd6..28e5a78cc9 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -4393,5 +4393,5 @@ txgbe_dev_rx_init(struct rte_eth_dev *dev)
buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mb_pool) -
RTE_PKTMBUF_HEADROOM);
- buf_size = ROUND_UP(buf_size, 0x1 << 10);
+ buf_size = ROUND_DOWN(buf_size, 0x1 << 10);
srrctl |= TXGBE_RXCFG_PKTLEN(buf_size);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.520600985 +0000
+++ 0071-net-txgbe-fix-Rx-buffer-size-in-config-register.patch 2023-02-23 14:46:23.836236196 +0000
@@ -1 +1 @@
-From 8a3ef4b89e6dd0247355fdf3a77ff7ec1db28d8d Mon Sep 17 00:00:00 2001
+From 190d16fb4c5307cae6b08c6aed78219956ff07b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a3ef4b89e6dd0247355fdf3a77ff7ec1db28d8d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 021f281fbb..427f8b82ac 100644
+index 4c63a82fd6..28e5a78cc9 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/mlx5: fix flow sample with ConnectX-5' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (69 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/txgbe: fix Rx buffer size in config register' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/mlx5: fix error CQE dumping for vectorized Rx' " Kevin Traynor
` (26 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Jiawei Wang; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/e8b6b06faa7d4f3042c2ff3d0e44e051108fa583
Thanks.
Kevin
---
From e8b6b06faa7d4f3042c2ff3d0e44e051108fa583 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Fri, 9 Dec 2022 16:34:06 +0200
Subject: [PATCH] net/mlx5: fix flow sample with ConnectX-5
[ upstream commit 7aa6d7998a9e59dc510e4e5706f675493855ff27 ]
The sample flow tried to get the reserved metadata register for
the match implicitly, and if the reserved metadata register was
invalid then back to use the application tag.
The assertion failure was caused while getting registered due to
the reserved metadata regC is invalid on CX-5 trusted device(VF/SF).
This patch adds the checking for reserved metadata register before
getting the register, to avoid assertion failure.
Fixes: 9a726360dd30 ("net/mlx5: fix sample flow action on trusted device")
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index eee8c8196e..79b4847f39 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5749,11 +5749,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
append_index++;
set_tag = (void *)(actions_pre + actions_n + append_index);
- ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error);
/* Trust VF/SF on CX5 not supported meter so that the reserved
* metadata regC is REG_NON, back to use application tag
* index 0.
*/
- if (unlikely(ret == REG_NON))
+ if (unlikely(priv->mtr_color_reg == REG_NON))
ret = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, 0, error);
+ else
+ ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error);
if (ret < 0)
return ret;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.544438248 +0000
+++ 0072-net-mlx5-fix-flow-sample-with-ConnectX-5.patch 2023-02-23 14:46:23.842236217 +0000
@@ -1 +1 @@
-From 7aa6d7998a9e59dc510e4e5706f675493855ff27 Mon Sep 17 00:00:00 2001
+From e8b6b06faa7d4f3042c2ff3d0e44e051108fa583 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7aa6d7998a9e59dc510e4e5706f675493855ff27 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 51547aa78f..ea2016598e 100644
+index eee8c8196e..79b4847f39 100644
@@ -29 +30 @@
-@@ -6187,11 +6187,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+@@ -5749,11 +5749,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/mlx5: fix error CQE dumping for vectorized Rx' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (70 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/mlx5: fix flow sample with ConnectX-5' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/mlx5: ignore non-critical syndromes for Rx queue' " Kevin Traynor
` (25 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/0167cd8cf13850ef466a55062d0c248612dd6b7b
Thanks.
Kevin
---
From 0167cd8cf13850ef466a55062d0c248612dd6b7b Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Fri, 27 Jan 2023 05:22:11 +0200
Subject: [PATCH] net/mlx5: fix error CQE dumping for vectorized Rx
[ upstream commit 633684e0d0defdd7649132797cc14329f71f678c ]
There is a dump file with debug information created
for an error CQE to help with troubleshooting later.
It starts with the last CQE, which, presumably is the error CQE.
But this is only true for the scalar Rx burst routing since
we handle CQEs there one by one and detect the error immediately.
For vectorized Rx bursts, we may already move to another CQE
when we detect the error since we handle CQEs in batches there.
Go back to the error CQE in this case to dump proper CQE.
Fixes: 88c0733535 ("net/mlx5: extend Rx completion with error handling")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rx.c | 16 +++++++++++-----
drivers/net/mlx5/mlx5_rx.h | 3 ++-
drivers/net/mlx5/mlx5_rxtx_vec.c | 12 +++++++-----
3 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
index 9fcd039c22..5e982f3011 100644
--- a/drivers/net/mlx5/mlx5_rx.c
+++ b/drivers/net/mlx5/mlx5_rx.c
@@ -408,4 +408,6 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
* 1 when called from vectorized Rx burst, need to prepare mbufs for the RQ.
* 0 when called from non-vectorized Rx burst.
+ * @param[in] err_n
+ * Number of CQEs to check for an error.
*
* @return
@@ -413,5 +415,5 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
*/
int
-mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
+mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
{
const uint16_t cqe_n = 1 << rxq->cqe_n;
@@ -425,11 +427,16 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
volatile struct mlx5_err_cqe *err_cqe;
} u = {
- .cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_mask],
+ .cqe = &(*rxq->cqes)[(rxq->cq_ci - vec) & cqe_mask],
};
struct mlx5_mp_arg_queue_state_modify sm;
- int ret;
+ int ret, i;
switch (rxq->err_state) {
case MLX5_RXQ_ERR_STATE_NO_ERROR:
+ for (i = 0; i < (int)err_n; i++) {
+ u.cqe = &(*rxq->cqes)[(rxq->cq_ci - vec - i) & cqe_mask];
+ if (MLX5_CQE_OPCODE(u.cqe->op_own) == MLX5_CQE_RESP_ERR)
+ break;
+ }
rxq->err_state = MLX5_RXQ_ERR_STATE_NEED_RESET;
/* Fall-through */
@@ -490,5 +497,4 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
uint32_t elt_idx;
struct rte_mbuf **elt;
- int i;
unsigned int n = elts_n - (elts_ci -
rxq->rq_pi);
@@ -611,5 +617,5 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
if (unlikely(ret == MLX5_CQE_STATUS_ERR ||
rxq->err_state)) {
- ret = mlx5_rx_err_handle(rxq, 0);
+ ret = mlx5_rx_err_handle(rxq, 0, 1);
if (ret == MLX5_CQE_STATUS_HW_OWN ||
ret == MLX5_RECOVERY_ERROR_RET)
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index 423d80e4a7..028f0bbb14 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -273,5 +273,6 @@ int mlx5_hrxq_modify(struct rte_eth_dev *dev, uint32_t hxrq_idx,
uint16_t mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n);
void mlx5_rxq_initialize(struct mlx5_rxq_data *rxq);
-__rte_noinline int mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec);
+__rte_noinline int mlx5_rx_err_handle(struct mlx5_rxq_data *rxq,
+ uint8_t vec, uint16_t err_n);
void mlx5_mprq_buf_free(struct mlx5_mprq_buf *buf);
uint16_t mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts,
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index 0e2eab068a..c6be2be763 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -75,5 +75,5 @@ rxq_handle_pending_error(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
rxq->stats.ibytes -= err_bytes;
#endif
- mlx5_rx_err_handle(rxq, 1);
+ mlx5_rx_err_handle(rxq, 1, pkts_n);
return n;
}
@@ -254,6 +254,4 @@ rxq_copy_mprq_mbuf_v(struct mlx5_rxq_data *rxq,
rxq->rq_pi += i;
rxq->cq_ci += i;
- rte_io_wmb();
- *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
if (rq_ci != rxq->rq_ci) {
rxq->rq_ci = rq_ci;
@@ -362,6 +360,4 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
}
}
- rte_io_wmb();
- *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
*no_cq = !rcvd_pkt;
return rcvd_pkt;
@@ -391,4 +387,5 @@ mlx5_rx_burst_vec(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
do {
+ err = 0;
nb_rx = rxq_burst_v(rxq, pkts + tn, pkts_n - tn,
&err, &no_cq);
@@ -398,4 +395,6 @@ mlx5_rx_burst_vec(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (unlikely(no_cq))
break;
+ rte_io_wmb();
+ *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
} while (tn != pkts_n);
return tn;
@@ -525,4 +524,5 @@ mlx5_rx_burst_mprq_vec(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
do {
+ err = 0;
nb_rx = rxq_burst_mprq_v(rxq, pkts + tn, pkts_n - tn,
&err, &no_cq);
@@ -532,4 +532,6 @@ mlx5_rx_burst_mprq_vec(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (unlikely(no_cq))
break;
+ rte_io_wmb();
+ *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
} while (tn != pkts_n);
return tn;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.573208241 +0000
+++ 0073-net-mlx5-fix-error-CQE-dumping-for-vectorized-Rx.patch 2023-02-23 14:46:23.845236227 +0000
@@ -1 +1 @@
-From 633684e0d0defdd7649132797cc14329f71f678c Mon Sep 17 00:00:00 2001
+From 0167cd8cf13850ef466a55062d0c248612dd6b7b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 633684e0d0defdd7649132797cc14329f71f678c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 917c517b83..7612d15f01 100644
+index 9fcd039c22..5e982f3011 100644
@@ -30 +31 @@
-@@ -426,4 +426,6 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
+@@ -408,4 +408,6 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
@@ -37 +38 @@
-@@ -431,5 +433,5 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
+@@ -413,5 +415,5 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
@@ -44 +45 @@
-@@ -443,11 +445,16 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
+@@ -425,11 +427,16 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
@@ -63 +64 @@
-@@ -508,5 +515,4 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
+@@ -490,5 +497,4 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
@@ -69 +70 @@
-@@ -629,5 +635,5 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -611,5 +617,5 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -77 +78 @@
-index e078aaf3dc..4ba53ebc48 100644
+index 423d80e4a7..028f0bbb14 100644
@@ -80 +81 @@
-@@ -287,5 +287,6 @@ int mlx5_hrxq_modify(struct rte_eth_dev *dev, uint32_t hxrq_idx,
+@@ -273,5 +273,6 @@ int mlx5_hrxq_modify(struct rte_eth_dev *dev, uint32_t hxrq_idx,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/mlx5: ignore non-critical syndromes for Rx queue' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (71 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/mlx5: fix error CQE dumping for vectorized Rx' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/mlx5: check compressed CQE opcode in vectorized Rx' " Kevin Traynor
` (24 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/026450013fd8c049384c6e87c51e4efa6f23072a
Thanks.
Kevin
---
From 026450013fd8c049384c6e87c51e4efa6f23072a Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Fri, 27 Jan 2023 05:22:43 +0200
Subject: [PATCH] net/mlx5: ignore non-critical syndromes for Rx queue
[ upstream commit aa67ed3084588e6ca12e9709a6cab021f0ffeba7 ]
For non-fatal syndromes like LOCAL_LENGTH_ERR, the Rx queue reset
shouldn't be triggered. Rx queue could continue with the next packets
without any recovery. Only three syndromes warrant Rx queue reset:
LOCAL_QP_OP_ERR, LOCAL_PROT_ERR and WR_FLUSH_ERR.
Do not initiate a Rx queue reset in any other cases.
Skip all non-critical error CQEs and continue with packet processing.
Fixes: 88c0733535 ("net/mlx5: extend Rx completion with error handling")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rx.c | 123 ++++++++++++++++++++++++-------
drivers/net/mlx5/mlx5_rx.h | 5 +-
drivers/net/mlx5/mlx5_rxtx_vec.c | 3 +-
3 files changed, 102 insertions(+), 29 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
index 5e982f3011..d354862cff 100644
--- a/drivers/net/mlx5/mlx5_rx.c
+++ b/drivers/net/mlx5/mlx5_rx.c
@@ -35,5 +35,6 @@ rxq_cq_to_pkt_type(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
static __rte_always_inline int
mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
- uint16_t cqe_cnt, volatile struct mlx5_mini_cqe8 **mcqe);
+ uint16_t cqe_cnt, volatile struct mlx5_mini_cqe8 **mcqe,
+ uint16_t *skip_cnt, bool mprq);
static __rte_always_inline uint32_t
@@ -391,8 +392,12 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
}
+#define MLX5_ERROR_CQE_MASK 0x40000000
/* Must be negative. */
-#define MLX5_ERROR_CQE_RET (-1)
+#define MLX5_REGULAR_ERROR_CQE_RET (-5)
+#define MLX5_CRITICAL_ERROR_CQE_RET (-4)
/* Must not be negative. */
#define MLX5_RECOVERY_ERROR_RET 0
+#define MLX5_RECOVERY_IGNORE_RET 1
+#define MLX5_RECOVERY_COMPLETED_RET 2
/**
@@ -412,8 +417,12 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
*
* @return
- * MLX5_RECOVERY_ERROR_RET in case of recovery error, otherwise the CQE status.
+ * MLX5_RECOVERY_ERROR_RET in case of recovery error,
+ * MLX5_RECOVERY_IGNORE_RET in case of non-critical error syndrome,
+ * MLX5_RECOVERY_COMPLETED_RET in case of recovery is completed,
+ * otherwise the CQE status after ignored error syndrome or queue reset.
*/
int
-mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
+mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
+ uint16_t err_n, uint16_t *skip_cnt)
{
const uint16_t cqe_n = 1 << rxq->cqe_n;
@@ -430,12 +439,33 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
};
struct mlx5_mp_arg_queue_state_modify sm;
+ bool critical_syndrome = false;
int ret, i;
switch (rxq->err_state) {
+ case MLX5_RXQ_ERR_STATE_IGNORE:
+ ret = check_cqe(u.cqe, cqe_n, rxq->cq_ci - vec);
+ if (ret != MLX5_CQE_STATUS_ERR) {
+ rxq->err_state = MLX5_RXQ_ERR_STATE_NO_ERROR;
+ return ret;
+ }
+ /* Fall-through */
case MLX5_RXQ_ERR_STATE_NO_ERROR:
for (i = 0; i < (int)err_n; i++) {
u.cqe = &(*rxq->cqes)[(rxq->cq_ci - vec - i) & cqe_mask];
- if (MLX5_CQE_OPCODE(u.cqe->op_own) == MLX5_CQE_RESP_ERR)
+ if (MLX5_CQE_OPCODE(u.cqe->op_own) == MLX5_CQE_RESP_ERR) {
+ if (u.err_cqe->syndrome == MLX5_CQE_SYNDROME_LOCAL_QP_OP_ERR ||
+ u.err_cqe->syndrome == MLX5_CQE_SYNDROME_LOCAL_PROT_ERR ||
+ u.err_cqe->syndrome == MLX5_CQE_SYNDROME_WR_FLUSH_ERR)
+ critical_syndrome = true;
break;
+ }
+ }
+ if (!critical_syndrome) {
+ if (rxq->err_state == MLX5_RXQ_ERR_STATE_NO_ERROR) {
+ *skip_cnt = 0;
+ if (i == err_n)
+ rxq->err_state = MLX5_RXQ_ERR_STATE_IGNORE;
+ }
+ return MLX5_RECOVERY_IGNORE_RET;
}
rxq->err_state = MLX5_RXQ_ERR_STATE_NEED_RESET;
@@ -529,4 +559,5 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
mlx5_rxq_initialize(rxq);
rxq->err_state = MLX5_RXQ_ERR_STATE_NO_ERROR;
+ return MLX5_RECOVERY_COMPLETED_RET;
}
return ret;
@@ -548,17 +579,22 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
* Store pointer to mini-CQE if compressed. Otherwise, the pointer is not
* written.
- *
+ * @param[out] skip_cnt
+ * Number of packets skipped due to recoverable errors.
+ * @param mprq
+ * Indication if it is called from MPRQ.
* @return
- * 0 in case of empty CQE, MLX5_ERROR_CQE_RET in case of error CQE,
- * otherwise the packet size in regular RxQ, and striding byte
- * count format in mprq case.
+ * 0 in case of empty CQE, MLX5_REGULAR_ERROR_CQE_RET in case of error CQE,
+ * MLX5_CRITICAL_ERROR_CQE_RET in case of error CQE lead to Rx queue reset,
+ * otherwise the packet size in regular RxQ,
+ * and striding byte count format in mprq case.
*/
static inline int
mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
- uint16_t cqe_cnt, volatile struct mlx5_mini_cqe8 **mcqe)
+ uint16_t cqe_cnt, volatile struct mlx5_mini_cqe8 **mcqe,
+ uint16_t *skip_cnt, bool mprq)
{
struct rxq_zip *zip = &rxq->zip;
uint16_t cqe_n = cqe_cnt + 1;
- int len;
+ int len = 0, ret = 0;
uint16_t idx, end;
@@ -609,5 +645,4 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
*/
} else {
- int ret;
int8_t op_own;
uint32_t cq_ci;
@@ -617,8 +652,10 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
if (unlikely(ret == MLX5_CQE_STATUS_ERR ||
rxq->err_state)) {
- ret = mlx5_rx_err_handle(rxq, 0, 1);
- if (ret == MLX5_CQE_STATUS_HW_OWN ||
- ret == MLX5_RECOVERY_ERROR_RET)
- return MLX5_ERROR_CQE_RET;
+ ret = mlx5_rx_err_handle(rxq, 0, 1, skip_cnt);
+ if (ret == MLX5_CQE_STATUS_HW_OWN)
+ return MLX5_ERROR_CQE_MASK;
+ if (ret == MLX5_RECOVERY_ERROR_RET ||
+ ret == MLX5_RECOVERY_COMPLETED_RET)
+ return MLX5_CRITICAL_ERROR_CQE_RET;
} else {
return 0;
@@ -673,6 +710,13 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
}
if (unlikely(rxq->err_state)) {
+ if (rxq->err_state == MLX5_RXQ_ERR_STATE_IGNORE &&
+ ret == MLX5_CQE_STATUS_SW_OWN) {
+ rxq->err_state = MLX5_RXQ_ERR_STATE_NO_ERROR;
+ return len & MLX5_ERROR_CQE_MASK;
+ }
cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
++rxq->stats.idropped;
+ (*skip_cnt) += mprq ? (len & MLX5_MPRQ_STRIDE_NUM_MASK) >>
+ MLX5_MPRQ_STRIDE_NUM_SHIFT : 1;
} else {
return len;
@@ -826,4 +870,5 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
while (pkts_n) {
+ uint16_t skip_cnt;
unsigned int idx = rq_ci & wqe_cnt;
volatile struct mlx5_wqe_data_seg *wqe =
@@ -864,9 +909,22 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (!pkt) {
cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
- len = mlx5_rx_poll_len(rxq, cqe, cqe_cnt, &mcqe);
- if (len <= 0) {
- rte_mbuf_raw_free(rep);
- if (unlikely(len == MLX5_ERROR_CQE_RET))
+ len = mlx5_rx_poll_len(rxq, cqe, cqe_cnt, &mcqe, &skip_cnt, false);
+ if (unlikely(len & MLX5_ERROR_CQE_MASK)) {
+ if (len == MLX5_CRITICAL_ERROR_CQE_RET) {
+ rte_mbuf_raw_free(rep);
rq_ci = rxq->rq_ci << sges_n;
+ break;
+ }
+ rq_ci >>= sges_n;
+ rq_ci += skip_cnt;
+ rq_ci <<= sges_n;
+ idx = rq_ci & wqe_cnt;
+ wqe = &((volatile struct mlx5_wqe_data_seg *)rxq->wqes)[idx];
+ seg = (*rxq->elts)[idx];
+ cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
+ len = len & ~MLX5_ERROR_CQE_MASK;
+ }
+ if (len == 0) {
+ rte_mbuf_raw_free(rep);
break;
}
@@ -1078,4 +1136,5 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
uint16_t strd_idx;
uint32_t byte_cnt;
+ uint16_t skip_cnt;
volatile struct mlx5_mini_cqe8 *mcqe = NULL;
enum mlx5_rqx_code rxq_code;
@@ -1090,12 +1149,24 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
}
cqe = &(*rxq->cqes)[rxq->cq_ci & cq_mask];
- ret = mlx5_rx_poll_len(rxq, cqe, cq_mask, &mcqe);
+ ret = mlx5_rx_poll_len(rxq, cqe, cq_mask, &mcqe, &skip_cnt, true);
+ if (unlikely(ret & MLX5_ERROR_CQE_MASK)) {
+ if (ret == MLX5_CRITICAL_ERROR_CQE_RET) {
+ rq_ci = rxq->rq_ci;
+ consumed_strd = rxq->consumed_strd;
+ break;
+ }
+ consumed_strd += skip_cnt;
+ while (consumed_strd >= strd_n) {
+ /* Replace WQE if the buffer is still in use. */
+ mprq_buf_replace(rxq, rq_ci & wq_mask);
+ /* Advance to the next WQE. */
+ consumed_strd -= strd_n;
+ ++rq_ci;
+ buf = (*rxq->mprq_bufs)[rq_ci & wq_mask];
+ }
+ cqe = &(*rxq->cqes)[rxq->cq_ci & cq_mask];
+ }
if (ret == 0)
break;
- if (unlikely(ret == MLX5_ERROR_CQE_RET)) {
- rq_ci = rxq->rq_ci;
- consumed_strd = rxq->consumed_strd;
- break;
- }
byte_cnt = ret;
len = (byte_cnt & MLX5_MPRQ_LEN_MASK) >> MLX5_MPRQ_LEN_SHIFT;
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index 028f0bbb14..5bcb6cb03a 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -62,4 +62,5 @@ enum mlx5_rxq_err_state {
MLX5_RXQ_ERR_STATE_NEED_RESET,
MLX5_RXQ_ERR_STATE_NEED_READY,
+ MLX5_RXQ_ERR_STATE_IGNORE,
};
@@ -273,6 +274,6 @@ int mlx5_hrxq_modify(struct rte_eth_dev *dev, uint32_t hxrq_idx,
uint16_t mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n);
void mlx5_rxq_initialize(struct mlx5_rxq_data *rxq);
-__rte_noinline int mlx5_rx_err_handle(struct mlx5_rxq_data *rxq,
- uint8_t vec, uint16_t err_n);
+__rte_noinline int mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
+ uint16_t err_n, uint16_t *skip_cnt);
void mlx5_mprq_buf_free(struct mlx5_mprq_buf *buf);
uint16_t mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts,
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index c6be2be763..667475a93e 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -52,4 +52,5 @@ rxq_handle_pending_error(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
{
uint16_t n = 0;
+ uint16_t skip_cnt;
unsigned int i;
#ifdef MLX5_PMD_SOFT_COUNTERS
@@ -75,5 +76,5 @@ rxq_handle_pending_error(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
rxq->stats.ibytes -= err_bytes;
#endif
- mlx5_rx_err_handle(rxq, 1, pkts_n);
+ mlx5_rx_err_handle(rxq, 1, pkts_n, &skip_cnt);
return n;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.596174790 +0000
+++ 0074-net-mlx5-ignore-non-critical-syndromes-for-Rx-queue.patch 2023-02-23 14:46:23.847236234 +0000
@@ -1 +1 @@
-From aa67ed3084588e6ca12e9709a6cab021f0ffeba7 Mon Sep 17 00:00:00 2001
+From 026450013fd8c049384c6e87c51e4efa6f23072a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa67ed3084588e6ca12e9709a6cab021f0ffeba7 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7612d15f01..99a08ef5f1 100644
+index 5e982f3011..d354862cff 100644
@@ -28 +29 @@
-@@ -40,5 +40,6 @@ rxq_cq_to_pkt_type(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -35,5 +35,6 @@ rxq_cq_to_pkt_type(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -36 +37 @@
-@@ -409,8 +410,12 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
+@@ -391,8 +392,12 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
@@ -50 +51 @@
-@@ -430,8 +435,12 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
+@@ -412,8 +417,12 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
@@ -65 +66 @@
-@@ -448,12 +457,33 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
+@@ -430,12 +439,33 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
@@ -100 +101 @@
-@@ -547,4 +577,5 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
+@@ -529,4 +559,5 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
@@ -106 +107 @@
-@@ -566,17 +597,22 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
+@@ -548,17 +579,22 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, uint16_t err_n)
@@ -135 +136 @@
-@@ -627,5 +663,4 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -609,5 +645,4 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -141 +142 @@
-@@ -635,8 +670,10 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -617,8 +652,10 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -156 +157 @@
-@@ -691,6 +728,13 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -673,6 +710,13 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -170 +171 @@
-@@ -844,4 +888,5 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -826,4 +870,5 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
@@ -176 +177 @@
-@@ -882,9 +927,22 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -864,9 +909,22 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
@@ -203 +204 @@
-@@ -1096,4 +1154,5 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1078,4 +1136,5 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
@@ -209 +210 @@
-@@ -1108,12 +1167,24 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1090,12 +1149,24 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
@@ -241 +242 @@
-index 4ba53ebc48..6b42e27c89 100644
+index 028f0bbb14..5bcb6cb03a 100644
@@ -244 +245 @@
-@@ -63,4 +63,5 @@ enum mlx5_rxq_err_state {
+@@ -62,4 +62,5 @@ enum mlx5_rxq_err_state {
@@ -250 +251 @@
-@@ -287,6 +288,6 @@ int mlx5_hrxq_modify(struct rte_eth_dev *dev, uint32_t hxrq_idx,
+@@ -273,6 +274,6 @@ int mlx5_hrxq_modify(struct rte_eth_dev *dev, uint32_t hxrq_idx,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/mlx5: check compressed CQE opcode in vectorized Rx' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (72 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/mlx5: ignore non-critical syndromes for Rx queue' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/i40e: reduce interrupt interval in multi-driver mode' " Kevin Traynor
` (23 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/0b4592d34787a25cca6e9a7875e5274ab4e31019
Thanks.
Kevin
---
From 0b4592d34787a25cca6e9a7875e5274ab4e31019 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Fri, 27 Jan 2023 05:23:14 +0200
Subject: [PATCH] net/mlx5: check compressed CQE opcode in vectorized Rx
[ upstream commit 1f903ebe2c05366aed6a453b6e7636945fc87285 ]
The CQE opcode is never checked for a compressed CQE in
the vectorized Rx burst routines. It is assumed that
compressed CQEs are always valid and skipped error checking.
This is obviously not the case and error CQEs may be
compressed together as well. Need to check for the
MLX5_CQE_RESP_ERR opcode and mark all the packets as
bad ones in the compression session if it is there.
Note that this issue is not applicable to the scalar Rx burst.
Fixes: 6cb559d67b ("net/mlx5: add vectorized Rx/Tx burst for x86")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 16 +++++++++++++---
drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 10 +++++++---
drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 9 ++++++---
3 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 683a8f9a6c..204d17a8f2 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -784,5 +784,5 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
const uint16_t q_n = 1 << rxq->cqe_n;
const uint16_t q_mask = q_n - 1;
- unsigned int pos;
+ unsigned int pos, adj;
uint64_t n = 0;
uint64_t comp_idx = MLX5_VPMD_DESCS_PER_LOOP;
@@ -867,5 +867,5 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
__vector unsigned char op_own, op_own_tmp1, op_own_tmp2;
__vector unsigned char opcode, owner_mask, invalid_mask;
- __vector unsigned char comp_mask;
+ __vector unsigned char comp_mask, mini_mask;
__vector unsigned char mask;
#ifdef MLX5_PMD_SOFT_COUNTERS
@@ -1175,4 +1175,14 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
/* D.3 check error in opcode. */
+ adj = (comp_idx != MLX5_VPMD_DESCS_PER_LOOP && comp_idx == n);
+ mask = (__vector unsigned char)(__vector unsigned long){
+ (adj * sizeof(uint16_t) * 8), 0};
+ lshift = vec_splat((__vector unsigned long)mask, 0);
+ shmask = vec_cmpgt(shmax, lshift);
+ mini_mask = (__vector unsigned char)
+ vec_sl((__vector unsigned long)invalid_mask, lshift);
+ mini_mask = (__vector unsigned char)
+ vec_sel((__vector unsigned long)shmask,
+ (__vector unsigned long)mini_mask, shmask);
opcode = (__vector unsigned char)
vec_cmpeq((__vector unsigned int)resp_err_check,
@@ -1183,5 +1193,5 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
opcode = (__vector unsigned char)
vec_andc((__vector unsigned long)opcode,
- (__vector unsigned long)invalid_mask);
+ (__vector unsigned long)mini_mask);
/* D.4 mark if any error is set */
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index f7bbde4e0e..41b9cf5444 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -525,5 +525,5 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
const uint16_t q_n = 1 << rxq->cqe_n;
const uint16_t q_mask = q_n - 1;
- unsigned int pos;
+ unsigned int pos, adj;
uint64_t n = 0;
uint64_t comp_idx = MLX5_VPMD_DESCS_PER_LOOP;
@@ -617,5 +617,5 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
uint16x4_t op_own;
uint16x4_t opcode, owner_mask, invalid_mask;
- uint16x4_t comp_mask;
+ uint16x4_t comp_mask, mini_mask;
uint16x4_t mask;
uint16x4_t byte_cnt;
@@ -781,6 +781,10 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
invalid_mask = vorr_u16(invalid_mask, mask);
/* D.3 check error in opcode. */
+ adj = (comp_idx != MLX5_VPMD_DESCS_PER_LOOP && comp_idx == n);
+ mask = vcreate_u16(adj ?
+ -1UL >> ((n + 1) * sizeof(uint16_t) * 8) : -1UL);
+ mini_mask = vand_u16(invalid_mask, mask);
opcode = vceq_u16(resp_err_check, opcode);
- opcode = vbic_u16(opcode, invalid_mask);
+ opcode = vbic_u16(opcode, mini_mask);
/* D.4 mark if any error is set */
*err |= vget_lane_u64(vreinterpret_u64_u16(opcode), 0);
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 185d2695db..ab69af0c55 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -524,5 +524,5 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
const uint16_t q_n = 1 << rxq->cqe_n;
const uint16_t q_mask = q_n - 1;
- unsigned int pos;
+ unsigned int pos, adj;
uint64_t n = 0;
uint64_t comp_idx = MLX5_VPMD_DESCS_PER_LOOP;
@@ -592,5 +592,5 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
__m128i op_own, op_own_tmp1, op_own_tmp2;
__m128i opcode, owner_mask, invalid_mask;
- __m128i comp_mask;
+ __m128i comp_mask, mini_mask;
__m128i mask;
#ifdef MLX5_PMD_SOFT_COUNTERS
@@ -730,7 +730,10 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
invalid_mask = _mm_or_si128(invalid_mask, mask);
/* D.3 check error in opcode. */
+ adj = (comp_idx != MLX5_VPMD_DESCS_PER_LOOP && comp_idx == n);
+ mask = _mm_set_epi64x(0, adj * sizeof(uint16_t) * 8);
+ mini_mask = _mm_sll_epi64(invalid_mask, mask);
opcode = _mm_cmpeq_epi32(resp_err_check, opcode);
opcode = _mm_packs_epi32(opcode, zero);
- opcode = _mm_andnot_si128(invalid_mask, opcode);
+ opcode = _mm_andnot_si128(mini_mask, opcode);
/* D.4 mark if any error is set */
*err |= _mm_cvtsi128_si64(opcode);
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.619517288 +0000
+++ 0075-net-mlx5-check-compressed-CQE-opcode-in-vectorized-R.patch 2023-02-23 14:46:23.849236241 +0000
@@ -1 +1 @@
-From 1f903ebe2c05366aed6a453b6e7636945fc87285 Mon Sep 17 00:00:00 2001
+From 0b4592d34787a25cca6e9a7875e5274ab4e31019 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f903ebe2c05366aed6a453b6e7636945fc87285 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/i40e: reduce interrupt interval in multi-driver mode' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (73 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/mlx5: check compressed CQE opcode in vectorized Rx' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/ixgbe: fix firmware version consistency' " Kevin Traynor
` (22 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Qiming Yang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/c8e4a58ca92208e1b5381171bf4fd31db30a44a8
Thanks.
Kevin
---
From c8e4a58ca92208e1b5381171bf4fd31db30a44a8 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Fri, 16 Dec 2022 03:11:40 +0000
Subject: [PATCH] net/i40e: reduce interrupt interval in multi-driver mode
[ upstream commit d730fd0a9fa98e2600cea53208f60d4d0f2cc301 ]
This patch change the interrupt interval from 8160us to 32us
to improve the performance of multi-driver mode.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index a1ebdc093c..e918771256 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1495,5 +1495,5 @@ i40e_calc_itr_interval(bool is_pf, bool is_multi_drv)
if (is_multi_drv) {
- interval = I40E_QUEUE_ITR_INTERVAL_MAX;
+ interval = I40E_QUEUE_ITR_INTERVAL_DEFAULT;
} else {
if (is_pf)
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.643120737 +0000
+++ 0076-net-i40e-reduce-interrupt-interval-in-multi-driver-m.patch 2023-02-23 14:46:23.850236245 +0000
@@ -1 +1 @@
-From d730fd0a9fa98e2600cea53208f60d4d0f2cc301 Mon Sep 17 00:00:00 2001
+From c8e4a58ca92208e1b5381171bf4fd31db30a44a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d730fd0a9fa98e2600cea53208f60d4d0f2cc301 ]
+
@@ -9,2 +10,0 @@
-Cc: stable@dpdk.org
-
@@ -18 +18 @@
-index fe943a45ff..7c4cc44a27 100644
+index a1ebdc093c..e918771256 100644
@@ -21 +21 @@
-@@ -1498,5 +1498,5 @@ i40e_calc_itr_interval(bool is_pf, bool is_multi_drv)
+@@ -1495,5 +1495,5 @@ i40e_calc_itr_interval(bool is_pf, bool is_multi_drv)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/ixgbe: fix firmware version consistency' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (74 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/i40e: reduce interrupt interval in multi-driver mode' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/iavf: add lock for VF commands' " Kevin Traynor
` (21 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Shiyang He; +Cc: Morten Brørup, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/a13a713ce4785603ade041dc696edfbbd30618d1
Thanks.
Kevin
---
From a13a713ce4785603ade041dc696edfbbd30618d1 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Mon, 9 Jan 2023 06:53:09 +0000
Subject: [PATCH] net/ixgbe: fix firmware version consistency
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ]
This patch follows the code of ixgbe kernel driver so that it keeps the
firmware version obtained by dpdk-ethtool consistent with that obtained
by linux-ethtool.
Fixes: 8b0b56574269 ("net/ixgbe: add firmware version get")
Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index b56ac0e9f9..e9dd243d5b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3857,21 +3857,30 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- u16 eeprom_verh, eeprom_verl;
- u32 etrack_id;
+ struct ixgbe_nvm_version nvm_ver;
int ret;
- ixgbe_read_eeprom(hw, 0x2e, &eeprom_verh);
- ixgbe_read_eeprom(hw, 0x2d, &eeprom_verl);
+ ixgbe_get_oem_prod_version(hw, &nvm_ver);
+ if (nvm_ver.oem_valid) {
+ snprintf(fw_version, fw_size, "%x.%x.%x",
+ nvm_ver.oem_major, nvm_ver.oem_minor,
+ nvm_ver.oem_release);
+ return 0;
+ }
- etrack_id = (eeprom_verh << 16) | eeprom_verl;
- ret = snprintf(fw_version, fw_size, "0x%08x", etrack_id);
+ ixgbe_get_etk_id(hw, &nvm_ver);
+ ixgbe_get_orom_version(hw, &nvm_ver);
+
+ if (nvm_ver.or_valid) {
+ snprintf(fw_version, fw_size, "0x%08x, %d.%d.%d",
+ nvm_ver.etk_id, nvm_ver.or_major,
+ nvm_ver.or_build, nvm_ver.or_patch);
+ return 0;
+ }
+
+ ret = snprintf(fw_version, fw_size, "0x%08x", nvm_ver.etk_id);
if (ret < 0)
return -EINVAL;
- ret += 1; /* add the size of '\0' */
- if (fw_size < (size_t)ret)
- return ret;
- else
- return 0;
+ return (fw_size < (size_t)ret++) ? ret : 0;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.665817164 +0000
+++ 0077-net-ixgbe-fix-firmware-version-consistency.patch 2023-02-23 14:46:23.856236266 +0000
@@ -1 +1 @@
-From b5c4535d5d9a6cf363f548503c2c755be0ab656b Mon Sep 17 00:00:00 2001
+From a13a713ce4785603ade041dc696edfbbd30618d1 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +19,0 @@
- .mailmap | 1 +
@@ -21 +21 @@
- 2 files changed, 21 insertions(+), 11 deletions(-)
+ 1 file changed, 20 insertions(+), 11 deletions(-)
@@ -23,10 +22,0 @@
-diff --git a/.mailmap b/.mailmap
-index b797fec215..cb9bd28bd3 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -1218,4 +1218,5 @@ Shiri Kuzin <shirik@nvidia.com> <shirik@mellanox.com>
- Shivanshu Shukla <shivanshu.shukla@intel.com>
- Shiweixian <shiweixian@huawei.com>
-+Shiyang He <shiyangx.he@intel.com>
- Shlomi Gridish <sgridish@marvell.com>
- Shougang Wang <shougangx.wang@intel.com>
@@ -34 +24 @@
-index 3f8da11bd1..88118bc305 100644
+index b56ac0e9f9..e9dd243d5b 100644
@@ -37 +27 @@
-@@ -3854,21 +3854,30 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+@@ -3857,21 +3857,30 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/iavf: add lock for VF commands' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (75 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/ixgbe: fix firmware version consistency' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/i40e: fix validation of flow transfer attribute' " Kevin Traynor
` (20 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Mike Pattrick; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/22ffbcffdfb7a3b64815857cfeda5a07eb8f1069
Thanks.
Kevin
---
From 22ffbcffdfb7a3b64815857cfeda5a07eb8f1069 Mon Sep 17 00:00:00 2001
From: Mike Pattrick <mkp@redhat.com>
Date: Wed, 28 Dec 2022 18:00:25 -0500
Subject: [PATCH] net/iavf: add lock for VF commands
[ upstream commit 91bf37d250aacfc9512a33ce9ec6d4783766804e ]
iavf admin queue commands aren't thread-safe. Bugs surrounding this
issue can manifest in a variety of ways but frequently pend_cmd is
over written. Simultaneously executing commands can result in a
misconfigured device or DPDK sleeping in a thread for 2 second.
Despite this limitation, vf commands may be executed from both
iavf_dev_alarm_handler() in a control thread and the applications main
thread. This is trivial to simulate in the testpmd application by
creating a bond of vf's in active backup mode, and then turning the
bond off and then on again repeatedly.
Previously [1] was proposed as a potential solution, but this commit did
not resolve all potential issues concerning the admin queue and has been
reverted from the stable branch. I propose adding locks until a more
complete solution is available.
[1] commit cb5c1b91f76f ("net/iavf: add thread for event callbacks")
Fixes: 48de41ca11f0 ("net/avf: enable link status update")
Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message")
Signed-off-by: Mike Pattrick <mkp@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf.h | 1 +
drivers/net/iavf/iavf_vchnl.c | 92 +++++++++++++++++++++--------------
2 files changed, 56 insertions(+), 37 deletions(-)
diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 29692e3994..58c3afe567 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -243,4 +243,5 @@ struct iavf_info {
struct iavf_flow_list flow_list;
rte_spinlock_t flow_ops_lock;
+ rte_spinlock_t aq_lock;
struct iavf_parser_list rss_parser_list;
struct iavf_parser_list dist_parser_list;
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 1bd3559ec2..930a67f517 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -256,4 +256,18 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
}
+static int
+iavf_execute_vf_cmd_safe(struct iavf_adapter *adapter,
+ struct iavf_cmd_info *args, int async)
+{
+ struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
+ int ret;
+
+ rte_spinlock_lock(&vf->aq_lock);
+ ret = iavf_execute_vf_cmd(adapter, args, async);
+ rte_spinlock_unlock(&vf->aq_lock);
+
+ return ret;
+}
+
static void
iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
@@ -404,5 +418,5 @@ iavf_enable_vlan_strip(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- ret = iavf_execute_vf_cmd(adapter, &args, 0);
+ ret = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (ret)
PMD_DRV_LOG(ERR, "Failed to execute command of"
@@ -425,5 +439,5 @@ iavf_disable_vlan_strip(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- ret = iavf_execute_vf_cmd(adapter, &args, 0);
+ ret = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (ret)
PMD_DRV_LOG(ERR, "Failed to execute command of"
@@ -454,5 +468,5 @@ iavf_check_api_version(struct iavf_adapter *adapter)
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_INIT_LOG(ERR, "Fail to execute command of OP_VERSION");
@@ -513,5 +527,5 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
args.in_args_size = sizeof(caps);
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
@@ -558,5 +572,5 @@ iavf_get_supported_rxdid(struct iavf_adapter *adapter)
args.out_size = IAVF_AQ_BUF_SZ;
- ret = iavf_execute_vf_cmd(adapter, &args, 0);
+ ret = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (ret) {
PMD_DRV_LOG(ERR,
@@ -602,5 +616,5 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- ret = iavf_execute_vf_cmd(adapter, &args, 0);
+ ret = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (ret)
PMD_DRV_LOG(ERR, "fail to execute command %s",
@@ -642,5 +656,5 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- ret = iavf_execute_vf_cmd(adapter, &args, 0);
+ ret = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (ret)
PMD_DRV_LOG(ERR, "fail to execute command %s",
@@ -685,5 +699,5 @@ iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid, bool add)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command %s",
@@ -706,5 +720,5 @@ iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter)
args.out_size = IAVF_AQ_BUF_SZ;
- ret = iavf_execute_vf_cmd(adapter, &args, 0);
+ ret = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (ret) {
PMD_DRV_LOG(ERR,
@@ -737,5 +751,5 @@ iavf_enable_queues(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR,
@@ -765,5 +779,5 @@ iavf_disable_queues(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR,
@@ -801,5 +815,5 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid,
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "Failed to execute command of %s",
@@ -843,5 +857,5 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR,
@@ -887,5 +901,5 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR,
@@ -933,5 +947,5 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid,
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "Failed to execute command of %s",
@@ -965,5 +979,5 @@ iavf_configure_rss_lut(struct iavf_adapter *adapter)
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR,
@@ -997,5 +1011,5 @@ iavf_configure_rss_key(struct iavf_adapter *adapter)
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR,
@@ -1089,5 +1103,5 @@ iavf_configure_queues(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "Failed to execute command of"
@@ -1130,5 +1144,5 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command OP_CONFIG_IRQ_MAP");
@@ -1171,5 +1185,5 @@ iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num,
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command OP_MAP_QUEUE_VECTOR");
@@ -1231,5 +1245,5 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command %s",
@@ -1261,5 +1275,5 @@ iavf_query_stats(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR, "fail to execute command OP_GET_STATS");
@@ -1299,5 +1313,5 @@ iavf_config_promisc(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
@@ -1342,5 +1356,5 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command %s",
@@ -1369,5 +1383,5 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command %s",
@@ -1396,5 +1410,5 @@ iavf_fdir_add(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_FDIR_FILTER");
@@ -1456,5 +1470,5 @@ iavf_fdir_del(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR, "fail to execute command OP_DEL_FDIR_FILTER");
@@ -1503,5 +1517,5 @@ iavf_fdir_check(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR, "fail to check flow director rule");
@@ -1544,5 +1558,5 @@ iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR,
@@ -1567,5 +1581,5 @@ iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps)
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR,
@@ -1593,5 +1607,5 @@ iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena)
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR,
@@ -1614,5 +1628,5 @@ iavf_get_qos_cap(struct iavf_adapter *adapter)
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
@@ -1647,5 +1661,5 @@ int iavf_set_q_tc_map(struct rte_eth_dev *dev,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err)
PMD_DRV_LOG(ERR, "Failed to execute command of"
@@ -1692,5 +1706,5 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
args.out_buffer = vf->aq_resp;
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
@@ -1736,11 +1750,15 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
/* disable interrupt to avoid the admin queue message to be read
* before iavf_read_msg_from_pf.
+ *
+ * don't disable interrupt handler until ready to execute vf cmd.
*/
+ rte_spinlock_lock(&vf->aq_lock);
rte_intr_disable(pci_dev->intr_handle);
err = iavf_execute_vf_cmd(adapter, &args, 0);
rte_intr_enable(pci_dev->intr_handle);
+ rte_spinlock_unlock(&vf->aq_lock);
} else {
rte_eal_alarm_cancel(iavf_dev_alarm_handler, dev);
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
rte_eal_alarm_set(IAVF_ALARM_INTERVAL,
iavf_dev_alarm_handler, dev);
@@ -1781,5 +1799,5 @@ iavf_get_max_rss_queue_region(struct iavf_adapter *adapter)
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 0);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
if (err) {
PMD_DRV_LOG(ERR, "Failed to execute command of VIRTCHNL_OP_GET_MAX_RSS_QREGION");
@@ -1812,5 +1830,5 @@ iavf_ipsec_crypto_request(struct iavf_adapter *adapter,
args.out_size = IAVF_AQ_BUF_SZ;
- err = iavf_execute_vf_cmd(adapter, &args, 1);
+ err = iavf_execute_vf_cmd_safe(adapter, &args, 1);
if (err) {
PMD_DRV_LOG(ERR, "fail to execute command %s",
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.693129939 +0000
+++ 0078-net-iavf-add-lock-for-VF-commands.patch 2023-02-23 14:46:23.858236273 +0000
@@ -1 +1 @@
-From 91bf37d250aacfc9512a33ce9ec6d4783766804e Mon Sep 17 00:00:00 2001
+From 22ffbcffdfb7a3b64815857cfeda5a07eb8f1069 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 91bf37d250aacfc9512a33ce9ec6d4783766804e ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -31,3 +32,3 @@
- drivers/net/iavf/iavf.h | 1 +
- drivers/net/iavf/iavf_vchnl.c | 106 ++++++++++++++++++++--------------
- 2 files changed, 63 insertions(+), 44 deletions(-)
+ drivers/net/iavf/iavf.h | 1 +
+ drivers/net/iavf/iavf_vchnl.c | 92 +++++++++++++++++++++--------------
+ 2 files changed, 56 insertions(+), 37 deletions(-)
@@ -36 +37 @@
-index 1edebab8dc..aa18650ffa 100644
+index 29692e3994..58c3afe567 100644
@@ -39 +40 @@
-@@ -263,4 +263,5 @@ struct iavf_info {
+@@ -243,4 +243,5 @@ struct iavf_info {
@@ -46 +47 @@
-index f92daf97f2..9adaadb173 100644
+index 1bd3559ec2..930a67f517 100644
@@ -49 +50 @@
-@@ -398,4 +398,18 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
+@@ -256,4 +256,18 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
@@ -68 +69 @@
-@@ -555,5 +569,5 @@ iavf_enable_vlan_strip(struct iavf_adapter *adapter)
+@@ -404,5 +418,5 @@ iavf_enable_vlan_strip(struct iavf_adapter *adapter)
@@ -75 +76 @@
-@@ -576,5 +590,5 @@ iavf_disable_vlan_strip(struct iavf_adapter *adapter)
+@@ -425,5 +439,5 @@ iavf_disable_vlan_strip(struct iavf_adapter *adapter)
@@ -82 +83 @@
-@@ -605,5 +619,5 @@ iavf_check_api_version(struct iavf_adapter *adapter)
+@@ -454,5 +468,5 @@ iavf_check_api_version(struct iavf_adapter *adapter)
@@ -89 +90 @@
-@@ -666,5 +680,5 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
+@@ -513,5 +527,5 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
@@ -96 +97 @@
-@@ -711,5 +725,5 @@ iavf_get_supported_rxdid(struct iavf_adapter *adapter)
+@@ -558,5 +572,5 @@ iavf_get_supported_rxdid(struct iavf_adapter *adapter)
@@ -103 +104 @@
-@@ -755,5 +769,5 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
+@@ -602,5 +616,5 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
@@ -110 +111 @@
-@@ -795,5 +809,5 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
+@@ -642,5 +656,5 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
@@ -117 +118 @@
-@@ -838,5 +852,5 @@ iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid, bool add)
+@@ -685,5 +699,5 @@ iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid, bool add)
@@ -124 +125 @@
-@@ -859,5 +873,5 @@ iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter)
+@@ -706,5 +720,5 @@ iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter)
@@ -131 +132 @@
-@@ -890,5 +904,5 @@ iavf_enable_queues(struct iavf_adapter *adapter)
+@@ -737,5 +751,5 @@ iavf_enable_queues(struct iavf_adapter *adapter)
@@ -138 +139 @@
-@@ -918,5 +932,5 @@ iavf_disable_queues(struct iavf_adapter *adapter)
+@@ -765,5 +779,5 @@ iavf_disable_queues(struct iavf_adapter *adapter)
@@ -145 +146 @@
-@@ -954,5 +968,5 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid,
+@@ -801,5 +815,5 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid,
@@ -152 +153 @@
-@@ -996,5 +1010,5 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter)
+@@ -843,5 +857,5 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter)
@@ -159 +160 @@
-@@ -1040,5 +1054,5 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter)
+@@ -887,5 +901,5 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter)
@@ -166 +167 @@
-@@ -1086,5 +1100,5 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid,
+@@ -933,5 +947,5 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid,
@@ -173 +174 @@
-@@ -1118,5 +1132,5 @@ iavf_configure_rss_lut(struct iavf_adapter *adapter)
+@@ -965,5 +979,5 @@ iavf_configure_rss_lut(struct iavf_adapter *adapter)
@@ -180 +181 @@
-@@ -1150,5 +1164,5 @@ iavf_configure_rss_key(struct iavf_adapter *adapter)
+@@ -997,5 +1011,5 @@ iavf_configure_rss_key(struct iavf_adapter *adapter)
@@ -187 +188 @@
-@@ -1248,5 +1262,5 @@ iavf_configure_queues(struct iavf_adapter *adapter,
+@@ -1089,5 +1103,5 @@ iavf_configure_queues(struct iavf_adapter *adapter,
@@ -194 +195 @@
-@@ -1289,5 +1303,5 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
+@@ -1130,5 +1144,5 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
@@ -201 +202 @@
-@@ -1330,5 +1344,5 @@ iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num,
+@@ -1171,5 +1185,5 @@ iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num,
@@ -208 +209 @@
-@@ -1390,5 +1404,5 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
+@@ -1231,5 +1245,5 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
@@ -215 +216 @@
-@@ -1420,5 +1434,5 @@ iavf_query_stats(struct iavf_adapter *adapter,
+@@ -1261,5 +1275,5 @@ iavf_query_stats(struct iavf_adapter *adapter,
@@ -222 +223 @@
-@@ -1458,5 +1472,5 @@ iavf_config_promisc(struct iavf_adapter *adapter,
+@@ -1299,5 +1313,5 @@ iavf_config_promisc(struct iavf_adapter *adapter,
@@ -229 +230 @@
-@@ -1501,5 +1515,5 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
+@@ -1342,5 +1356,5 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
@@ -236 +237 @@
-@@ -1528,5 +1542,5 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)
+@@ -1369,5 +1383,5 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)
@@ -243 +244 @@
-@@ -1555,5 +1569,5 @@ iavf_fdir_add(struct iavf_adapter *adapter,
+@@ -1396,5 +1410,5 @@ iavf_fdir_add(struct iavf_adapter *adapter,
@@ -250 +251 @@
-@@ -1615,5 +1629,5 @@ iavf_fdir_del(struct iavf_adapter *adapter,
+@@ -1456,5 +1470,5 @@ iavf_fdir_del(struct iavf_adapter *adapter,
@@ -257 +258 @@
-@@ -1662,5 +1676,5 @@ iavf_fdir_check(struct iavf_adapter *adapter,
+@@ -1503,5 +1517,5 @@ iavf_fdir_check(struct iavf_adapter *adapter,
@@ -264,22 +265 @@
-@@ -1705,5 +1719,5 @@ iavf_flow_sub(struct iavf_adapter *adapter, struct iavf_fsub_conf *filter)
- args.out_size = IAVF_AQ_BUF_SZ;
-
-- err = iavf_execute_vf_cmd(adapter, &args, 0);
-+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
- if (err) {
- PMD_DRV_LOG(ERR, "Failed to execute command of "
-@@ -1756,5 +1770,5 @@ iavf_flow_unsub(struct iavf_adapter *adapter, struct iavf_fsub_conf *filter)
- args.out_size = IAVF_AQ_BUF_SZ;
-
-- err = iavf_execute_vf_cmd(adapter, &args, 0);
-+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
- if (err) {
- PMD_DRV_LOG(ERR, "Failed to execute command of "
-@@ -1799,5 +1813,5 @@ iavf_flow_sub_check(struct iavf_adapter *adapter,
- args.out_size = IAVF_AQ_BUF_SZ;
-
-- err = iavf_execute_vf_cmd(adapter, &args, 0);
-+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
- if (err) {
- PMD_DRV_LOG(ERR, "Failed to check flow subscription rule");
-@@ -1839,5 +1853,5 @@ iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
+@@ -1544,5 +1558,5 @@ iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
@@ -292 +272 @@
-@@ -1862,5 +1876,5 @@ iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps)
+@@ -1567,5 +1581,5 @@ iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps)
@@ -299 +279 @@
-@@ -1888,5 +1902,5 @@ iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena)
+@@ -1593,5 +1607,5 @@ iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena)
@@ -306 +286 @@
-@@ -1909,5 +1923,5 @@ iavf_get_qos_cap(struct iavf_adapter *adapter)
+@@ -1614,5 +1628,5 @@ iavf_get_qos_cap(struct iavf_adapter *adapter)
@@ -313,8 +293 @@
-@@ -1942,5 +1956,5 @@ int iavf_set_q_tc_map(struct rte_eth_dev *dev,
- args.out_size = IAVF_AQ_BUF_SZ;
-
-- err = iavf_execute_vf_cmd(adapter, &args, 0);
-+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
- if (err)
- PMD_DRV_LOG(ERR, "Failed to execute command of"
-@@ -1965,5 +1979,5 @@ int iavf_set_q_bw(struct rte_eth_dev *dev,
+@@ -1647,5 +1661,5 @@ int iavf_set_q_tc_map(struct rte_eth_dev *dev,
@@ -327 +300 @@
-@@ -2010,5 +2024,5 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
+@@ -1692,5 +1706,5 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
@@ -334 +307 @@
-@@ -2054,11 +2068,15 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+@@ -1736,11 +1750,15 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
@@ -351 +324 @@
-@@ -2099,5 +2117,5 @@ iavf_get_max_rss_queue_region(struct iavf_adapter *adapter)
+@@ -1781,5 +1799,5 @@ iavf_get_max_rss_queue_region(struct iavf_adapter *adapter)
@@ -358 +331 @@
-@@ -2130,5 +2148,5 @@ iavf_ipsec_crypto_request(struct iavf_adapter *adapter,
+@@ -1812,5 +1830,5 @@ iavf_ipsec_crypto_request(struct iavf_adapter *adapter,
@@ -365,21 +337,0 @@
-@@ -2164,5 +2182,5 @@ iavf_set_vf_quanta_size(struct iavf_adapter *adapter, u16 start_queue_id, u16 nu
- args.out_size = IAVF_AQ_BUF_SZ;
-
-- err = iavf_execute_vf_cmd(adapter, &args, 0);
-+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
- if (err) {
- PMD_DRV_LOG(ERR, "Failed to execute command VIRTCHNL_OP_CONFIG_QUANTA");
-@@ -2190,5 +2208,5 @@ iavf_get_ptp_cap(struct iavf_adapter *adapter)
- args.out_size = IAVF_AQ_BUF_SZ;
-
-- err = iavf_execute_vf_cmd(adapter, &args, 0);
-+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
- if (err) {
- PMD_DRV_LOG(ERR,
-@@ -2218,5 +2236,5 @@ iavf_get_phc_time(struct iavf_rx_queue *rxq)
-
- rte_spinlock_lock(&vf->phc_time_aq_lock);
-- err = iavf_execute_vf_cmd(adapter, &args, 0);
-+ err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
- if (err) {
- PMD_DRV_LOG(ERR,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/i40e: fix validation of flow transfer attribute' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (76 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/iavf: add lock for VF commands' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/ice: " Kevin Traynor
` (19 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Steve Yang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/cb8f428cfee8f726f1f71a32b00b8c92b0e5ee46
Thanks.
Kevin
---
From cb8f428cfee8f726f1f71a32b00b8c92b0e5ee46 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 26 Dec 2022 00:37:14 +0000
Subject: [PATCH] net/i40e: fix validation of flow transfer attribute
[ upstream commit 74d20de6101f60d3d2b345abcd4ab5bfd2b6076a ]
i40e doesn't support transfer attribute of flow rule,
ignore it when validating rule attributes.
Fixes: 86eb05d6350b ("net/i40e: add flow validate function")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_flow.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 4f3808cb5f..b4cdefafa5 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -1992,4 +1992,12 @@ i40e_flow_parse_attr(const struct rte_flow_attr *attr,
}
+ /* Not supported */
+ if (attr->transfer) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER,
+ attr, "Not support transfer.");
+ return -rte_errno;
+ }
+
/* Not supported */
if (attr->priority) {
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.716484872 +0000
+++ 0079-net-i40e-fix-validation-of-flow-transfer-attribute.patch 2023-02-23 14:46:23.861236283 +0000
@@ -1 +1 @@
-From 74d20de6101f60d3d2b345abcd4ab5bfd2b6076a Mon Sep 17 00:00:00 2001
+From cb8f428cfee8f726f1f71a32b00b8c92b0e5ee46 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 74d20de6101f60d3d2b345abcd4ab5bfd2b6076a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 3c550733f2..877e49151e 100644
+index 4f3808cb5f..b4cdefafa5 100644
@@ -22 +23 @@
-@@ -1237,4 +1237,12 @@ i40e_flow_parse_attr(const struct rte_flow_attr *attr,
+@@ -1992,4 +1992,12 @@ i40e_flow_parse_attr(const struct rte_flow_attr *attr,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/ice: fix validation of flow transfer attribute' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (77 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/i40e: fix validation of flow transfer attribute' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/iavf: protect insertion in flow list' " Kevin Traynor
` (18 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Steve Yang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/1ce8e1d4a819edda8a043f9b4f4c61259a77b9fe
Thanks.
Kevin
---
From 1ce8e1d4a819edda8a043f9b4f4c61259a77b9fe Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 26 Dec 2022 00:37:15 +0000
Subject: [PATCH] net/ice: fix validation of flow transfer attribute
[ upstream commit a6153cf2c3b98bfd4035dc3ad304b5d75a56940b ]
ice doesn't support transfer attribute of flow rule,
ignore it when validating rule attributes.
Fixes: d76116a4678f ("net/ice: add generic flow API")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_generic_flow.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index f9be3a5c94..8293faa4e7 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -2014,4 +2014,12 @@ ice_flow_valid_attr(struct ice_adapter *ad,
}
+ /* Not supported */
+ if (attr->transfer) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER,
+ attr, "Not support transfer.");
+ return -rte_errno;
+ }
+
/* Check pipeline mode support to set classification stage */
if (ad->devargs.pipe_mode_support) {
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.740305412 +0000
+++ 0080-net-ice-fix-validation-of-flow-transfer-attribute.patch 2023-02-23 14:46:23.862236287 +0000
@@ -1 +1 @@
-From a6153cf2c3b98bfd4035dc3ad304b5d75a56940b Mon Sep 17 00:00:00 2001
+From 1ce8e1d4a819edda8a043f9b4f4c61259a77b9fe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a6153cf2c3b98bfd4035dc3ad304b5d75a56940b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d496c28dec..86a32f8cb1 100644
+index f9be3a5c94..8293faa4e7 100644
@@ -22 +23 @@
-@@ -2031,4 +2031,12 @@ ice_flow_valid_attr(struct ice_adapter *ad,
+@@ -2014,4 +2014,12 @@ ice_flow_valid_attr(struct ice_adapter *ad,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/iavf: protect insertion in flow list' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (78 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/ice: " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/iavf: fix building data desc' " Kevin Traynor
` (17 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: David Marchand; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/a6aba6b291f31457ca378e0c7ca251b01ca9da9a
Thanks.
Kevin
---
From a6aba6b291f31457ca378e0c7ca251b01ca9da9a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 5 Jan 2023 14:57:43 +0100
Subject: [PATCH] net/iavf: protect insertion in flow list
[ upstream commit d79c3b264e31465695bc4c6279381522060a22f6 ]
Add missing lock acquire.
Fixes: ff2d0c345c3b ("net/iavf: support generic flow API")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_generic_flow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index 2befa125ac..01e7b8724d 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -2221,9 +2221,10 @@ iavf_flow_create(struct rte_eth_dev *dev,
flow->engine = engine;
+ rte_spinlock_lock(&vf->flow_ops_lock);
TAILQ_INSERT_TAIL(&vf->flow_list, flow, node);
+ rte_spinlock_unlock(&vf->flow_ops_lock);
PMD_DRV_LOG(INFO, "Succeeded to create (%d) flow", engine->type);
free_flow:
- rte_spinlock_unlock(&vf->flow_ops_lock);
return flow;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.763037314 +0000
+++ 0081-net-iavf-protect-insertion-in-flow-list.patch 2023-02-23 14:46:23.864236293 +0000
@@ -1 +1 @@
-From d79c3b264e31465695bc4c6279381522060a22f6 Mon Sep 17 00:00:00 2001
+From a6aba6b291f31457ca378e0c7ca251b01ca9da9a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d79c3b264e31465695bc4c6279381522060a22f6 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f33c764764..6f6e95fc45 100644
+index 2befa125ac..01e7b8724d 100644
@@ -21 +22 @@
-@@ -2279,9 +2279,10 @@ iavf_flow_create(struct rte_eth_dev *dev,
+@@ -2221,9 +2221,10 @@ iavf_flow_create(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/iavf: fix building data desc' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (79 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/iavf: protect insertion in flow list' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/ixgbe: enable IPv6 mask in flow rules' " Kevin Traynor
` (16 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Zhichao Zeng; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/7cdea129b8176d321a112828566f7bc754601c94
Thanks.
Kevin
---
From 7cdea129b8176d321a112828566f7bc754601c94 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Thu, 12 Jan 2023 17:31:51 +0800
Subject: [PATCH] net/iavf: fix building data desc
[ upstream commit d082b37d081e6de467700128f217e14b5e852bf6 ]
Build correct data desc for UFO pkt by adding UDP_SEG flag, and disable
L4 checksum offload when TSO/UFO is enabled to prevent the MDD.
Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index da3f1baabd..2211297220 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2457,8 +2457,19 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
}
- if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
- command |= IAVF_TX_DESC_CMD_L4T_EOFT_TCP;
+ if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
+ if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG)
+ command |= IAVF_TX_DESC_CMD_L4T_EOFT_TCP;
+ else
+ command |= IAVF_TX_DESC_CMD_L4T_EOFT_UDP;
offset |= (m->l4_len >> 2) <<
IAVF_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
+
+ *qw1 = rte_cpu_to_le_64((((uint64_t)command <<
+ IAVF_TXD_DATA_QW1_CMD_SHIFT) & IAVF_TXD_DATA_QW1_CMD_MASK) |
+ (((uint64_t)offset << IAVF_TXD_DATA_QW1_OFFSET_SHIFT) &
+ IAVF_TXD_DATA_QW1_OFFSET_MASK) |
+ ((uint64_t)l2tag1 << IAVF_TXD_DATA_QW1_L2TAG1_SHIFT));
+
+ return;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.785770556 +0000
+++ 0082-net-iavf-fix-building-data-desc.patch 2023-02-23 14:46:23.866236300 +0000
@@ -1 +1 @@
-From d082b37d081e6de467700128f217e14b5e852bf6 Mon Sep 17 00:00:00 2001
+From 7cdea129b8176d321a112828566f7bc754601c94 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d082b37d081e6de467700128f217e14b5e852bf6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 8d49967538..3d9224b38d 100644
+index da3f1baabd..2211297220 100644
@@ -22 +23 @@
-@@ -2620,8 +2620,19 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
+@@ -2457,8 +2457,19 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/ixgbe: enable IPv6 mask in flow rules' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (80 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/iavf: fix building data desc' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/iavf: fix VLAN offload with AVX2' " Kevin Traynor
` (15 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Kaiwen Deng; +Cc: Yuan Peng, Qiming Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/312d7c3eb2cb4476a9c3770e765cad5025e72f5d
Thanks.
Kevin
---
From 312d7c3eb2cb4476a9c3770e765cad5025e72f5d Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Sat, 28 Jan 2023 15:15:19 +0800
Subject: [PATCH] net/ixgbe: enable IPv6 mask in flow rules
[ upstream commit cba954b7bedaa7d0baea1ddc39fd0199015f583c ]
Add IPv6 addr mask and L4 mask support for rte_flow APIs.
IPv6 flow rules do not take effect in ixgbe when set
IPv6 addr mask and L4 mask to default value as 0xFF.
Set IPv6 addr mask and L4 mask as 0 to enable fields
can fix this issue.
Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 368342872a..44486c8e8e 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -1646,4 +1646,8 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
rule->mask.vlan_tci_mask = 0;
rule->mask.flex_bytes_mask = 0;
+ rule->mask.dst_port_mask = 0;
+ rule->mask.src_port_mask = 0;
+ rule->mask.src_ipv6_mask = 0;
+ rule->mask.dst_ipv6_mask = 0;
/**
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.808924519 +0000
+++ 0083-net-ixgbe-enable-IPv6-mask-in-flow-rules.patch 2023-02-23 14:46:23.868236307 +0000
@@ -1 +1 @@
-From cba954b7bedaa7d0baea1ddc39fd0199015f583c Mon Sep 17 00:00:00 2001
+From 312d7c3eb2cb4476a9c3770e765cad5025e72f5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cba954b7bedaa7d0baea1ddc39fd0199015f583c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index fe710b7900..79c84044af 100644
+index 368342872a..44486c8e8e 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/iavf: fix VLAN offload with AVX2' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (81 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/ixgbe: enable IPv6 mask in flow rules' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'app/compress-perf: fix some typos' " Kevin Traynor
` (14 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Michal Schmidt; +Cc: Maxime Coquelin, Wenzhuo Lu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/cc692ab817def9b6b612fb8cb8a2269d4e2c69a9
Thanks.
Kevin
---
From cc692ab817def9b6b612fb8cb8a2269d4e2c69a9 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu, 8 Dec 2022 13:19:16 +0100
Subject: [PATCH] net/iavf: fix VLAN offload with AVX2
[ upstream commit eb24917428a1db11d6736e8c076077a47b991f01 ]
It has been observed that mbufs of some received VLAN packets had the
VLAN tag correctly set in vlan_tci, but ol_flags were missing the
VLAN-indicating flags.
_mm256_shuffle_epi8 operates as two independent 128-bit operations,
not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags
reflected in the resulting vlan_flags for all 8 rx descriptors, the
input l2tag2_flags_shuf must contain the required pattern in both
128-bit halves.
Fixes: 3a1aca384d3a ("net/iavf: fix VLAN tag extraction handling")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/iavf/iavf_rxtx_vec_avx2.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index b915573780..2479c18210 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -1075,5 +1075,8 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,
0, 0, 0, 0,
0, 0, 0, 0,
- 0, 0, 0, 0,
+ 0, 0,
+ RTE_MBUF_F_RX_VLAN |
+ RTE_MBUF_F_RX_VLAN_STRIPPED,
+ 0,
/* end up 128-bits */
0, 0, 0, 0,
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.832514728 +0000
+++ 0084-net-iavf-fix-VLAN-offload-with-AVX2.patch 2023-02-23 14:46:23.870236314 +0000
@@ -1 +1 @@
-From eb24917428a1db11d6736e8c076077a47b991f01 Mon Sep 17 00:00:00 2001
+From cc692ab817def9b6b612fb8cb8a2269d4e2c69a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb24917428a1db11d6736e8c076077a47b991f01 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -23 +23,0 @@
- .mailmap | 1 +
@@ -25 +25 @@
- 2 files changed, 5 insertions(+), 1 deletion(-)
+ 1 file changed, 4 insertions(+), 1 deletion(-)
@@ -27,10 +26,0 @@
-diff --git a/.mailmap b/.mailmap
-index 2cb7f5accb..e111e05bc2 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -895,4 +895,5 @@ Michal Mazurek <maz@semihalf.com>
- Michal Michalik <michal.michalik@intel.com>
- Michał Mirosław <michal.miroslaw@atendesoftware.pl> <mirq-linux@rere.qmqm.pl>
-+Michal Schmidt <mschmidt@redhat.com>
- Michal Swiatkowski <michal.swiatkowski@intel.com>
- Michal Wilczynski <michal.wilczynski@intel.com>
@@ -38 +28 @@
-index 862f6eb0c0..b4ebac9d34 100644
+index b915573780..2479c18210 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/compress-perf: fix some typos' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (82 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/iavf: fix VLAN offload with AVX2' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'app/compress-perf: fix testing single operation' " Kevin Traynor
` (13 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Michael Baum; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/87689a74a4551198a8e2b4f61f88da6abe16ad84
Thanks.
Kevin
---
From 87689a74a4551198a8e2b4f61f88da6abe16ad84 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 14 Feb 2023 19:40:27 +0200
Subject: [PATCH] app/compress-perf: fix some typos
[ upstream commit 1643fc9b077ebb55b13a2c4469b75c251499acdc ]
Fix some typos in comments and prints in this app.
Fixes: e0b6287c035d ("app/compress-perf: add parser")
Fixes: 2695db95a147 ("test/compress: add cycle-count mode to perf tool")
Fixes: 971d89f5116b ("app/compress-perf: prevent output buffer overflow")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
app/test-compress-perf/comp_perf_options_parse.c | 4 ++--
app/test-compress-perf/comp_perf_test_cyclecount.c | 2 +-
app/test-compress-perf/comp_perf_test_verify.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c
index 019eddb7bd..9b9d4e6554 100644
--- a/app/test-compress-perf/comp_perf_options_parse.c
+++ b/app/test-compress-perf/comp_perf_options_parse.c
@@ -492,5 +492,5 @@ parse_huffman_enc(struct comp_test_data *test_data, const char *arg)
RTE_DIM(huffman_namemap), arg);
if (id < 0) {
- RTE_LOG(ERR, USER1, "Invalid Huffmane encoding specified\n");
+ RTE_LOG(ERR, USER1, "Invalid Huffman encoding specified\n");
return -1;
}
@@ -508,5 +508,5 @@ parse_level(struct comp_test_data *test_data, const char *arg)
/*
* Try parsing the argument as a range, if it fails,
- * arse it as a list
+ * parse it as a list
*/
if (parse_range(arg, &test_data->level_lst.min,
diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index a3f6404eb2..c37c1c1ba4 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -562,5 +562,5 @@ cperf_cyclecount_test_runner(void *test_ctx)
" [D-d] - decompression dequeue\n"
" - Cycles section: number of cycles per 'op' for the following operations:\n"
- " setup/op - memory allocation, op configuration and memory dealocation\n"
+ " setup/op - memory allocation, op configuration and memory deallocation\n"
" [C-e] - compression enqueue\n"
" [C-d] - compression dequeue\n"
diff --git a/app/test-compress-perf/comp_perf_test_verify.c b/app/test-compress-perf/comp_perf_test_verify.c
index 7d06029488..2ab519e533 100644
--- a/app/test-compress-perf/comp_perf_test_verify.c
+++ b/app/test-compress-perf/comp_perf_test_verify.c
@@ -225,5 +225,5 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) {
RTE_LOG(ERR, USER1,
-"Out of space error occurred due to uncompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
+"Out of space error occurred due to incompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
res = -1;
goto end;
@@ -310,5 +310,5 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) {
RTE_LOG(ERR, USER1,
-"Out of space error occurred due to uncompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
+"Out of space error occurred due to incompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
res = -1;
goto end;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.856391765 +0000
+++ 0085-app-compress-perf-fix-some-typos.patch 2023-02-23 14:46:23.871236318 +0000
@@ -1 +1 @@
-From 1643fc9b077ebb55b13a2c4469b75c251499acdc Mon Sep 17 00:00:00 2001
+From 87689a74a4551198a8e2b4f61f88da6abe16ad84 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1643fc9b077ebb55b13a2c4469b75c251499acdc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 7473cb6277..ce457fefbb 100644
+index a3f6404eb2..c37c1c1ba4 100644
@@ -42 +43 @@
-@@ -564,5 +564,5 @@ cperf_cyclecount_test_runner(void *test_ctx)
+@@ -562,5 +562,5 @@ cperf_cyclecount_test_runner(void *test_ctx)
@@ -50 +51 @@
-index 8964442891..6b61a9194f 100644
+index 7d06029488..2ab519e533 100644
@@ -53 +54 @@
-@@ -227,5 +227,5 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
+@@ -225,5 +225,5 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
@@ -60 +61 @@
-@@ -312,5 +312,5 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
+@@ -310,5 +310,5 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/compress-perf: fix testing single operation' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (83 preceding siblings ...)
2023-02-23 15:06 ` patch 'app/compress-perf: fix some typos' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'net/bnxt: fix link state change interrupt config' " Kevin Traynor
` (12 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/8b717146ab161de74346fd4631920d7241591f45
Thanks.
Kevin
---
From 8b717146ab161de74346fd4631920d7241591f45 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 14 Feb 2023 19:40:28 +0200
Subject: [PATCH] app/compress-perf: fix testing single operation
[ upstream commit 83cc3b90ad7a63868a43a67d6aa13b55068fbe0c ]
Part of the application options is to test only compress and only
decompress but actually the application ignores this user option and
tries to test always both compress and decompress.
Allow testing only compress and only decompress.
Fixes: e0b6287c035d ("app/compress-perf: add parser")
Signed-off-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
app/test-compress-perf/comp_perf_options.h | 6 +-
.../comp_perf_options_parse.c | 4 +-
.../comp_perf_test_common.c | 126 +++++++++++++-----
.../comp_perf_test_cyclecount.c | 69 ++++++----
.../comp_perf_test_throughput.c | 66 +++++----
.../comp_perf_test_verify.c | 60 ++++++---
app/test-compress-perf/main.c | 8 ++
7 files changed, 224 insertions(+), 115 deletions(-)
diff --git a/app/test-compress-perf/comp_perf_options.h b/app/test-compress-perf/comp_perf_options.h
index 0b777521c5..cfb00bd1ad 100644
--- a/app/test-compress-perf/comp_perf_options.h
+++ b/app/test-compress-perf/comp_perf_options.h
@@ -31,7 +31,7 @@ enum cperf_test_type {
enum comp_operation {
- COMPRESS_ONLY,
- DECOMPRESS_ONLY,
- COMPRESS_DECOMPRESS
+ COMPRESS = (1 << 0),
+ DECOMPRESS = (1 << 1),
+ COMPRESS_DECOMPRESS = (COMPRESS | DECOMPRESS),
};
diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c
index 9b9d4e6554..303e714cda 100644
--- a/app/test-compress-perf/comp_perf_options_parse.c
+++ b/app/test-compress-perf/comp_perf_options_parse.c
@@ -447,9 +447,9 @@ parse_op_type(struct comp_test_data *test_data, const char *arg)
{
"comp",
- COMPRESS_ONLY
+ COMPRESS
},
{
"decomp",
- DECOMPRESS_ONLY
+ DECOMPRESS
},
{
diff --git a/app/test-compress-perf/comp_perf_test_common.c b/app/test-compress-perf/comp_perf_test_common.c
index b402a0d839..cd60958944 100644
--- a/app/test-compress-perf/comp_perf_test_common.c
+++ b/app/test-compress-perf/comp_perf_test_common.c
@@ -228,12 +228,29 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
uint16_t comp_mbuf_size;
uint16_t decomp_mbuf_size;
+ size_t comp_data_size;
+ size_t decomp_data_size;
+ size_t output_data_sz;
test_data->out_seg_sz = find_buf_size(test_data->seg_sz);
- /* Number of segments for input and output
- * (compression and decompression)
- */
- test_data->total_segs = DIV_CEIL(test_data->input_data_sz,
- test_data->seg_sz);
+ if (test_data->test_op & COMPRESS) {
+ /*
+ * Number of segments for input and output
+ * (compression and decompression)
+ */
+ test_data->total_segs = DIV_CEIL(test_data->input_data_sz,
+ test_data->seg_sz);
+ } else {
+ /*
+ * When application does decompression only, input data is
+ * compressed and smaller than the output. The expected size of
+ * uncompressed data given by the user in segment size argument.
+ */
+ test_data->total_segs = test_data->max_sgl_segs;
+ }
+
+ output_data_sz = (size_t) test_data->out_seg_sz * test_data->total_segs;
+ output_data_sz =
+ RTE_MAX(output_data_sz, (size_t) MIN_COMPRESSED_BUF_SIZE);
if (test_data->use_external_mbufs != 0) {
@@ -242,7 +259,10 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
comp_mbuf_size = 0;
decomp_mbuf_size = 0;
- } else {
+ } else if (test_data->test_op & COMPRESS) {
comp_mbuf_size = test_data->out_seg_sz + RTE_PKTMBUF_HEADROOM;
decomp_mbuf_size = test_data->seg_sz + RTE_PKTMBUF_HEADROOM;
+ } else {
+ comp_mbuf_size = test_data->seg_sz + RTE_PKTMBUF_HEADROOM;
+ decomp_mbuf_size = test_data->out_seg_sz + RTE_PKTMBUF_HEADROOM;
}
@@ -288,15 +308,18 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
}
- /*
- * Compressed data might be a bit larger than input data,
- * if data cannot be compressed
- */
- mem->compressed_data = rte_zmalloc_socket(NULL,
- RTE_MAX(
- (size_t) test_data->out_seg_sz *
- test_data->total_segs,
- (size_t) MIN_COMPRESSED_BUF_SIZE),
- 0,
- rte_socket_id());
+ if (test_data->test_op & COMPRESS) {
+ /*
+ * Compressed data might be a bit larger than input data,
+ * if data cannot be compressed
+ */
+ comp_data_size = output_data_sz;
+ decomp_data_size = test_data->input_data_sz;
+ } else {
+ comp_data_size = test_data->input_data_sz;
+ decomp_data_size = output_data_sz;
+ }
+
+ mem->compressed_data = rte_zmalloc_socket(NULL, comp_data_size, 0,
+ rte_socket_id());
if (mem->compressed_data == NULL) {
RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
@@ -305,7 +328,6 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
}
- mem->decompressed_data = rte_zmalloc_socket(NULL,
- test_data->input_data_sz, 0,
- rte_socket_id());
+ mem->decompressed_data = rte_zmalloc_socket(NULL, decomp_data_size, 0,
+ rte_socket_id());
if (mem->decompressed_data == NULL) {
RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
@@ -352,4 +374,5 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
uint32_t cmz = 0;
uint32_t dmz = 0;
+ bool decompress_only = !!(test_data->test_op == DECOMPRESS);
for (i = 0; i < mem->total_bufs; i++) {
@@ -362,6 +385,4 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
- data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
-
if (test_data->use_external_mbufs != 0) {
rte_pktmbuf_attach_extbuf(mem->decomp_bufs[i],
@@ -373,4 +394,9 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
+ if (!decompress_only)
+ data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
+ else
+ data_sz = test_data->out_seg_sz;
+
data_addr = (uint8_t *) rte_pktmbuf_append(
mem->decomp_bufs[i], data_sz);
@@ -379,8 +405,10 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
return -1;
}
- rte_memcpy(data_addr, input_data_ptr, data_sz);
- input_data_ptr += data_sz;
- remaining_data -= data_sz;
+ if (!decompress_only) {
+ rte_memcpy(data_addr, input_data_ptr, data_sz);
+ input_data_ptr += data_sz;
+ remaining_data -= data_sz;
+ }
/* Already one segment in the mbuf */
@@ -399,6 +427,4 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
- data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
-
if (test_data->use_external_mbufs != 0) {
rte_pktmbuf_attach_extbuf(
@@ -411,4 +437,10 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
+ if (!decompress_only)
+ data_sz = RTE_MIN(remaining_data,
+ test_data->seg_sz);
+ else
+ data_sz = test_data->out_seg_sz;
+
data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
data_sz);
@@ -419,7 +451,9 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
- rte_memcpy(data_addr, input_data_ptr, data_sz);
- input_data_ptr += data_sz;
- remaining_data -= data_sz;
+ if (!decompress_only) {
+ rte_memcpy(data_addr, input_data_ptr, data_sz);
+ input_data_ptr += data_sz;
+ remaining_data -= data_sz;
+ }
if (rte_pktmbuf_chain(mem->decomp_bufs[i],
@@ -448,7 +482,11 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
- data_addr = (uint8_t *) rte_pktmbuf_append(
- mem->comp_bufs[i],
- test_data->out_seg_sz);
+ if (decompress_only)
+ data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
+ else
+ data_sz = test_data->out_seg_sz;
+
+ data_addr = (uint8_t *) rte_pktmbuf_append(mem->comp_bufs[i],
+ data_sz);
if (data_addr == NULL) {
RTE_LOG(ERR, USER1, "Could not append data\n");
@@ -456,6 +494,12 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
+ if (decompress_only) {
+ rte_memcpy(data_addr, input_data_ptr, data_sz);
+ input_data_ptr += data_sz;
+ remaining_data -= data_sz;
+ }
+
/* Chain mbufs if needed for output mbufs */
- for (j = 1; j < segs_per_mbuf; j++) {
+ for (j = 1; j < segs_per_mbuf && remaining_data > 0; j++) {
struct rte_mbuf *next_seg =
rte_pktmbuf_alloc(mem->comp_buf_pool);
@@ -477,6 +521,12 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
+ if (decompress_only)
+ data_sz = RTE_MIN(remaining_data,
+ test_data->seg_sz);
+ else
+ data_sz = test_data->out_seg_sz;
+
data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
- test_data->out_seg_sz);
+ data_sz);
if (data_addr == NULL) {
RTE_LOG(ERR, USER1, "Could not append data\n");
@@ -484,4 +534,10 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
}
+ if (decompress_only) {
+ rte_memcpy(data_addr, input_data_ptr, data_sz);
+ input_data_ptr += data_sz;
+ remaining_data -= data_sz;
+ }
+
if (rte_pktmbuf_chain(mem->comp_bufs[i],
next_seg) < 0) {
diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index c37c1c1ba4..7083f8213c 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -513,36 +513,53 @@ cperf_cyclecount_test_runner(void *test_ctx)
return EXIT_FAILURE;
- /*
- * Run the tests twice, discarding the first performance
- * results, before the cache is warmed up
- */
+ if (test_data->test_op & COMPRESS) {
+ /*
+ * Run the test twice, discarding the first performance
+ * results, before the cache is warmed up
+ */
+ for (i = 0; i < 2; i++) {
+ if (main_loop(ctx, RTE_COMP_COMPRESS) < 0)
+ return EXIT_FAILURE;
+ }
- /* C O M P R E S S */
- for (i = 0; i < 2; i++) {
- if (main_loop(ctx, RTE_COMP_COMPRESS) < 0)
- return EXIT_FAILURE;
- }
-
- ops_enq_retries_comp = ctx->ops_enq_retries;
- ops_deq_retries_comp = ctx->ops_deq_retries;
+ ops_enq_retries_comp = ctx->ops_enq_retries;
+ ops_deq_retries_comp = ctx->ops_deq_retries;
- duration_enq_per_op_comp = ctx->duration_enq /
- (ctx->ver.mem.total_bufs * test_data->num_iter);
- duration_deq_per_op_comp = ctx->duration_deq /
- (ctx->ver.mem.total_bufs * test_data->num_iter);
+ duration_enq_per_op_comp = ctx->duration_enq /
+ (ctx->ver.mem.total_bufs * test_data->num_iter);
+ duration_deq_per_op_comp = ctx->duration_deq /
+ (ctx->ver.mem.total_bufs * test_data->num_iter);
+ } else {
+ ops_enq_retries_comp = 0;
+ ops_deq_retries_comp = 0;
- /* D E C O M P R E S S */
- for (i = 0; i < 2; i++) {
- if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0)
- return EXIT_FAILURE;
+ duration_enq_per_op_comp = 0;
+ duration_deq_per_op_comp = 0;
}
- ops_enq_retries_decomp = ctx->ops_enq_retries;
- ops_deq_retries_decomp = ctx->ops_deq_retries;
+ if (test_data->test_op & DECOMPRESS) {
+ /*
+ * Run the test twice, discarding the first performance
+ * results, before the cache is warmed up
+ */
+ for (i = 0; i < 2; i++) {
+ if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0)
+ return EXIT_FAILURE;
+ }
+
+ ops_enq_retries_decomp = ctx->ops_enq_retries;
+ ops_deq_retries_decomp = ctx->ops_deq_retries;
- duration_enq_per_op_decomp = ctx->duration_enq /
- (ctx->ver.mem.total_bufs * test_data->num_iter);
- duration_deq_per_op_decomp = ctx->duration_deq /
- (ctx->ver.mem.total_bufs * test_data->num_iter);
+ duration_enq_per_op_decomp = ctx->duration_enq /
+ (ctx->ver.mem.total_bufs * test_data->num_iter);
+ duration_deq_per_op_decomp = ctx->duration_deq /
+ (ctx->ver.mem.total_bufs * test_data->num_iter);
+ } else {
+ ops_enq_retries_decomp = 0;
+ ops_deq_retries_decomp = 0;
+
+ duration_enq_per_op_decomp = 0;
+ duration_deq_per_op_decomp = 0;
+ }
duration_setup_per_op = ctx->duration_op /
diff --git a/app/test-compress-perf/comp_perf_test_throughput.c b/app/test-compress-perf/comp_perf_test_throughput.c
index 4569599eb9..170beac6f7 100644
--- a/app/test-compress-perf/comp_perf_test_throughput.c
+++ b/app/test-compress-perf/comp_perf_test_throughput.c
@@ -358,39 +358,51 @@ cperf_throughput_test_runner(void *test_ctx)
*/
if (cperf_verify_test_runner(&ctx->ver)) {
- ret = EXIT_FAILURE;
+ ret = EXIT_FAILURE;
goto end;
}
- /*
- * Run the tests twice, discarding the first performance
- * results, before the cache is warmed up
- */
- for (i = 0; i < 2; i++) {
- if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
- ret = EXIT_FAILURE;
- goto end;
+ if (test_data->test_op & COMPRESS) {
+ /*
+ * Run the test twice, discarding the first performance
+ * results, before the cache is warmed up
+ */
+ for (i = 0; i < 2; i++) {
+ if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
+ ret = EXIT_FAILURE;
+ goto end;
+ }
}
- }
- for (i = 0; i < 2; i++) {
- if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
- ret = EXIT_FAILURE;
- goto end;
- }
- }
-
- ctx->comp_tsc_byte =
+ ctx->comp_tsc_byte =
(double)(ctx->comp_tsc_duration[test_data->level]) /
- test_data->input_data_sz;
+ test_data->input_data_sz;
+ ctx->comp_gbps = rte_get_tsc_hz() / ctx->comp_tsc_byte * 8 /
+ 1000000000;
+ } else {
+ ctx->comp_tsc_byte = 0;
+ ctx->comp_gbps = 0;
+ }
- ctx->decomp_tsc_byte =
+ if (test_data->test_op & DECOMPRESS) {
+ /*
+ * Run the test twice, discarding the first performance
+ * results, before the cache is warmed up
+ */
+ for (i = 0; i < 2; i++) {
+ if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
+ ret = EXIT_FAILURE;
+ goto end;
+ }
+ }
+
+ ctx->decomp_tsc_byte =
(double)(ctx->decomp_tsc_duration[test_data->level]) /
- test_data->input_data_sz;
-
- ctx->comp_gbps = rte_get_tsc_hz() / ctx->comp_tsc_byte * 8 /
- 1000000000;
-
- ctx->decomp_gbps = rte_get_tsc_hz() / ctx->decomp_tsc_byte * 8 /
- 1000000000;
+ test_data->input_data_sz;
+ ctx->decomp_gbps = rte_get_tsc_hz() / ctx->decomp_tsc_byte * 8 /
+ 1000000000;
+ } else {
+ ctx->decomp_tsc_byte = 0;
+ ctx->decomp_gbps = 0;
+ }
exp = 0;
diff --git a/app/test-compress-perf/comp_perf_test_verify.c b/app/test-compress-perf/comp_perf_test_verify.c
index 2ab519e533..138819a7f6 100644
--- a/app/test-compress-perf/comp_perf_test_verify.c
+++ b/app/test-compress-perf/comp_perf_test_verify.c
@@ -113,5 +113,6 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
input_bufs = mem->comp_bufs;
output_bufs = mem->decomp_bufs;
- out_seg_sz = test_data->seg_sz;
+ out_seg_sz = (test_data->test_op & COMPRESS) ?
+ test_data->seg_sz : test_data->out_seg_sz;
}
@@ -391,4 +392,5 @@ cperf_verify_test_runner(void *test_ctx)
static uint16_t display_once;
uint32_t lcore = rte_lcore_id();
+ uint16_t exp = 0;
ctx->mem.lcore_id = lcore;
@@ -396,30 +398,45 @@ cperf_verify_test_runner(void *test_ctx)
test_data->ratio = 0;
- if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
- ret = EXIT_FAILURE;
- goto end;
+ if (test_data->test_op & COMPRESS) {
+ if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
+ ret = EXIT_FAILURE;
+ goto end;
+ }
}
- if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
- ret = EXIT_FAILURE;
- goto end;
- }
+ if (test_data->test_op & DECOMPRESS) {
+ if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
+ ret = EXIT_FAILURE;
+ goto end;
+ }
+
+ if (!(test_data->test_op & COMPRESS)) {
+ /*
+ * For DECOMPRESS_ONLY mode there is no more
+ * verifications, reset the 'ratio' and 'comp_data_sz'
+ * fields for other tests report.
+ */
+ ctx->comp_data_sz = 0;
+ ctx->ratio = 0;
+ goto end;
+ }
- if (ctx->decomp_data_sz != test_data->input_data_sz) {
- RTE_LOG(ERR, USER1,
- "Decompressed data length not equal to input data length\n");
- RTE_LOG(ERR, USER1,
- "Decompressed size = %zu, expected = %zu\n",
- ctx->decomp_data_sz, test_data->input_data_sz);
- ret = EXIT_FAILURE;
- goto end;
- } else {
- if (memcmp(ctx->mem.decompressed_data,
- test_data->input_data,
- test_data->input_data_sz) != 0) {
+ if (ctx->decomp_data_sz != test_data->input_data_sz) {
+ RTE_LOG(ERR, USER1,
+ "Decompressed data length not equal to input data length\n");
RTE_LOG(ERR, USER1,
- "Decompressed data is not the same as file data\n");
+ "Decompressed size = %zu, expected = %zu\n",
+ ctx->decomp_data_sz, test_data->input_data_sz);
ret = EXIT_FAILURE;
goto end;
+ } else {
+ if (memcmp(ctx->mem.decompressed_data,
+ test_data->input_data,
+ test_data->input_data_sz) != 0) {
+ RTE_LOG(ERR, USER1,
+ "Decompressed data is not the same as file data\n");
+ ret = EXIT_FAILURE;
+ goto end;
+ }
}
}
@@ -428,5 +445,4 @@ cperf_verify_test_runner(void *test_ctx)
test_data->input_data_sz * 100;
- uint16_t exp = 0;
if (!ctx->silent) {
if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0,
diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index ce9e80bedc..832140f814 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -254,4 +254,12 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)
}
+ if (!(test_data->test_op & COMPRESS) &&
+ test_data->input_data_sz >
+ (size_t) test_data->seg_sz * (size_t) test_data->max_sgl_segs) {
+ RTE_LOG(ERR, USER1,
+ "Size of input must be less than total segments\n");
+ goto end;
+ }
+
test_data->input_data = rte_zmalloc_socket(NULL,
test_data->input_data_sz, 0, rte_socket_id());
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.878983378 +0000
+++ 0086-app-compress-perf-fix-testing-single-operation.patch 2023-02-23 14:46:23.874236328 +0000
@@ -1 +1 @@
-From 83cc3b90ad7a63868a43a67d6aa13b55068fbe0c Mon Sep 17 00:00:00 2001
+From 8b717146ab161de74346fd4631920d7241591f45 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83cc3b90ad7a63868a43a67d6aa13b55068fbe0c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 57dd146330..d00b299247 100644
+index 0b777521c5..cfb00bd1ad 100644
@@ -31 +32 @@
-@@ -33,7 +33,7 @@ enum cperf_test_type {
+@@ -31,7 +31,7 @@ enum cperf_test_type {
@@ -272 +273 @@
-index ce457fefbb..ce6c4d7605 100644
+index c37c1c1ba4..7083f8213c 100644
@@ -275 +276 @@
-@@ -515,36 +515,53 @@ cperf_cyclecount_test_runner(void *test_ctx)
+@@ -513,36 +513,53 @@ cperf_cyclecount_test_runner(void *test_ctx)
@@ -356 +357 @@
-index 79cd2b2bf2..c9f8237626 100644
+index 4569599eb9..170beac6f7 100644
@@ -359 +360 @@
-@@ -360,39 +360,51 @@ cperf_throughput_test_runner(void *test_ctx)
+@@ -358,39 +358,51 @@ cperf_throughput_test_runner(void *test_ctx)
@@ -439 +440 @@
-index 6b61a9194f..7d6b6abecd 100644
+index 2ab519e533..138819a7f6 100644
@@ -442 +443 @@
-@@ -115,5 +115,6 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
+@@ -113,5 +113,6 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
@@ -450 +451 @@
-@@ -393,4 +394,5 @@ cperf_verify_test_runner(void *test_ctx)
+@@ -391,4 +392,5 @@ cperf_verify_test_runner(void *test_ctx)
@@ -456 +457 @@
-@@ -398,30 +400,45 @@ cperf_verify_test_runner(void *test_ctx)
+@@ -396,30 +398,45 @@ cperf_verify_test_runner(void *test_ctx)
@@ -522 +523 @@
-@@ -430,5 +447,4 @@ cperf_verify_test_runner(void *test_ctx)
+@@ -428,5 +445,4 @@ cperf_verify_test_runner(void *test_ctx)
@@ -529 +530 @@
-index 41b8edc2bd..bbb4c7917b 100644
+index ce9e80bedc..832140f814 100644
@@ -532 +533 @@
-@@ -255,4 +255,12 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)
+@@ -254,4 +254,12 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'net/bnxt: fix link state change interrupt config' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (84 preceding siblings ...)
2023-02-23 15:06 ` patch 'app/compress-perf: fix testing single operation' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'app/testpmd: fix crash on cleanup' " Kevin Traynor
` (11 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Edwin Brossette; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/e6152fdf62c58ea5de80a77d6006bc2622645463
Thanks.
Kevin
---
From e6152fdf62c58ea5de80a77d6006bc2622645463 Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Mon, 6 Feb 2023 18:11:13 +0100
Subject: [PATCH] net/bnxt: fix link state change interrupt config
[ upstream commit 60653f4a25bd87a32bc148461f32566af997da8b ]
When getting the device's info via bnxt_dev_info_get_op(), the device
enables interrupts on link state changes because of the following line:
eth_dev->data->dev_conf.intr_conf.lsc = 1;
Enabling this mode might not be wanted by the user.
The flag RTE_ETH_DEV_INTR_LSC can be used to inform the above
application that LSC interrupts are supported. Thus, checking this flag,
the user can decide whether or not to enable these interrupts.
Since there is no reason for a function meant to display config to
actually modify it, remove this line. In addition, raise the dev_flag
associated with this state on the device's initialization to show the
device supports link state change interrupts.
Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f72740752a..31394a0401 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1018,5 +1018,4 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
.tx_rs_thresh = 32,
};
- eth_dev->data->dev_conf.intr_conf.lsc = 1;
dev_info->rx_desc_lim.nb_min = BNXT_MIN_RING_DESC;
@@ -5848,4 +5847,5 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
rte_eth_copy_pci_info(eth_dev, pci_dev);
eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
bp = eth_dev->data->dev_private;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.903298113 +0000
+++ 0087-net-bnxt-fix-link-state-change-interrupt-config.patch 2023-02-23 14:46:23.877236339 +0000
@@ -1 +1 @@
-From 60653f4a25bd87a32bc148461f32566af997da8b Mon Sep 17 00:00:00 2001
+From e6152fdf62c58ea5de80a77d6006bc2622645463 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60653f4a25bd87a32bc148461f32566af997da8b ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -29 +29,0 @@
- .mailmap | 1 +
@@ -31 +31 @@
- 2 files changed, 2 insertions(+), 1 deletion(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -33,10 +32,0 @@
-diff --git a/.mailmap b/.mailmap
-index e111e05bc2..a9f4f28fba 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -340,4 +340,5 @@ Ed Czeck <ed.czeck@atomicrules.com>
- Eduard Serra <eserra@vmware.com>
- Edward Makarov <makarov@kraftway.ru>
-+Edwin Brossette <edwin.brossette@6wind.com>
- Eelco Chaudron <echaudro@redhat.com>
- Elad Nachman <eladv6@gmail.com>
@@ -44 +34 @@
-index b3de490d36..753e86b4b2 100644
+index f72740752a..31394a0401 100644
@@ -53 +43 @@
-@@ -5860,4 +5859,5 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+@@ -5848,4 +5847,5 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'app/testpmd: fix crash on cleanup' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (85 preceding siblings ...)
2023-02-23 15:06 ` patch 'net/bnxt: fix link state change interrupt config' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'sched: fix alignment of structs in subport' " Kevin Traynor
` (10 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: David Marchand; +Cc: Aman Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/058262ec6c8499f57edcc6def99d7ddb56fe6899
Thanks.
Kevin
---
From 058262ec6c8499f57edcc6def99d7ddb56fe6899 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 6 Feb 2023 16:49:46 +0100
Subject: [PATCH] app/testpmd: fix crash on cleanup
[ upstream commit 563fbd084b6b8de866d4fad9582f9eb071e6da0a ]
If allocating the ports[] array fails, a crash will occur when shutting
down testpmd since ethdev emits RTE_ETH_EVENT_DESTROY events.
Move init_port() before registering ethdev event handler.
Fixes: 85c6571c9103 ("app/testpmd: reset port status on close notification")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
app/test-pmd/testpmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index ea5cada21e..61c0200a22 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -4286,4 +4286,7 @@ main(int argc, char** argv)
rte_strerror(rte_errno));
+ /* allocate port structures, and init them */
+ init_port();
+
ret = register_eth_event_callback();
if (ret != 0)
@@ -4304,7 +4307,4 @@ main(int argc, char** argv)
TESTPMD_LOG(WARNING, "No probed ethernet devices\n");
- /* allocate port structures, and init them */
- init_port();
-
set_def_fwd_config();
if (nb_lcores == 0)
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.929634906 +0000
+++ 0088-app-testpmd-fix-crash-on-cleanup.patch 2023-02-23 14:46:23.881236353 +0000
@@ -1 +1 @@
-From 563fbd084b6b8de866d4fad9582f9eb071e6da0a Mon Sep 17 00:00:00 2001
+From 058262ec6c8499f57edcc6def99d7ddb56fe6899 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 563fbd084b6b8de866d4fad9582f9eb071e6da0a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a6c5dec4c0..0c14325b8d 100644
+index ea5cada21e..61c0200a22 100644
@@ -23 +24 @@
-@@ -4430,4 +4430,7 @@ main(int argc, char** argv)
+@@ -4286,4 +4286,7 @@ main(int argc, char** argv)
@@ -31 +32 @@
-@@ -4448,7 +4451,4 @@ main(int argc, char** argv)
+@@ -4304,7 +4307,4 @@ main(int argc, char** argv)
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'sched: fix alignment of structs in subport' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (86 preceding siblings ...)
2023-02-23 15:06 ` patch 'app/testpmd: fix crash on cleanup' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'eal/freebsd: fix lock in alarm callback' " Kevin Traynor
` (9 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Megha Ajmera; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/818b598bfdc8e8885280c6825fcb29b09c5c63b0
Thanks.
Kevin
---
From 818b598bfdc8e8885280c6825fcb29b09c5c63b0 Mon Sep 17 00:00:00 2001
From: Megha Ajmera <megha.ajmera@intel.com>
Date: Tue, 7 Feb 2023 06:10:08 +0000
Subject: [PATCH] sched: fix alignment of structs in subport
[ upstream commit bc3b950d80941420873b40d56ee387867fc34dad ]
Big structures like bitmap, pipes and queues in subport are addressed
using offset of 'memory' field in subport structures. This means no other
variable should be added after 'memory' variable or else addressing of such
structs like bitmap etc. become incorrect.
Realigned tc_ov_enabled variable in subport structure.
Fixes: f5e60154ade ("sched: enable traffic class oversubscription conditionally")
Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/sched/rte_sched.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index f9924d5f2f..b9494ec31e 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -215,4 +215,7 @@ struct rte_sched_subport {
uint32_t qsize_sum;
+ /* TC oversubscription activation */
+ int tc_ov_enabled;
+
struct rte_sched_pipe *pipe;
struct rte_sched_queue *queue;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.954074854 +0000
+++ 0089-sched-fix-alignment-of-structs-in-subport.patch 2023-02-23 14:46:23.883236360 +0000
@@ -1 +1 @@
-From bc3b950d80941420873b40d56ee387867fc34dad Mon Sep 17 00:00:00 2001
+From 818b598bfdc8e8885280c6825fcb29b09c5c63b0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc3b950d80941420873b40d56ee387867fc34dad ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- lib/sched/rte_sched.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ lib/sched/rte_sched.c | 3 +++
+ 1 file changed, 3 insertions(+)
@@ -23 +24 @@
-index c91697131d..19768d8c38 100644
+index f9924d5f2f..b9494ec31e 100644
@@ -26 +27 @@
-@@ -203,4 +203,7 @@ struct rte_sched_subport {
+@@ -215,4 +215,7 @@ struct rte_sched_subport {
@@ -34,8 +34,0 @@
-@@ -210,7 +213,4 @@ struct rte_sched_subport {
- struct rte_mbuf **queue_array;
- uint8_t memory[0] __rte_cache_aligned;
--
-- /* TC oversubscription activation */
-- int tc_ov_enabled;
- } __rte_cache_aligned;
-
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'eal/freebsd: fix lock in alarm callback' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (87 preceding siblings ...)
2023-02-23 15:06 ` patch 'sched: fix alignment of structs in subport' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'dma/ioat: fix device stop if no copies done' " Kevin Traynor
` (8 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/118edbb63464c5cf13f76106fb1b8adf32552763
Thanks.
Kevin
---
From 118edbb63464c5cf13f76106fb1b8adf32552763 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 13 Feb 2023 12:44:52 +0000
Subject: [PATCH] eal/freebsd: fix lock in alarm callback
[ upstream commit fc6bdd5248e843ba1300c8d46d43b263b4a69438 ]
The spinlock should unlock when clock_gettime() failed. This patch
fixes it by invoking clock_gettime() before lock.
Fixes: 26021a715067 ("eal/bsd: support alarm API")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/freebsd/eal_alarm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/freebsd/eal_alarm.c b/lib/eal/freebsd/eal_alarm.c
index 1023c32937..1a3e6c0aad 100644
--- a/lib/eal/freebsd/eal_alarm.c
+++ b/lib/eal/freebsd/eal_alarm.c
@@ -172,10 +172,10 @@ eal_alarm_callback(void *arg __rte_unused)
struct alarm_entry *ap;
- rte_spinlock_lock(&alarm_list_lk);
- ap = LIST_FIRST(&alarm_list);
-
if (clock_gettime(CLOCK_TYPE_ID, &now) < 0)
return;
+ rte_spinlock_lock(&alarm_list_lk);
+ ap = LIST_FIRST(&alarm_list);
+
while (ap != NULL && timespec_cmp(&now, &ap->time) >= 0) {
ap->executing = 1;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.976987694 +0000
+++ 0090-eal-freebsd-fix-lock-in-alarm-callback.patch 2023-02-23 14:46:23.883236360 +0000
@@ -1 +1 @@
-From fc6bdd5248e843ba1300c8d46d43b263b4a69438 Mon Sep 17 00:00:00 2001
+From 118edbb63464c5cf13f76106fb1b8adf32552763 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fc6bdd5248e843ba1300c8d46d43b263b4a69438 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'dma/ioat: fix device stop if no copies done' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (88 preceding siblings ...)
2023-02-23 15:06 ` patch 'eal/freebsd: fix lock in alarm callback' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'dma/ioat: fix indexes after restart' " Kevin Traynor
` (7 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Conor Walsh, Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/7e8fc5d99236ef3a2b08d6244e192bbc49a33854
Thanks.
Kevin
---
From 7e8fc5d99236ef3a2b08d6244e192bbc49a33854 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 16 Feb 2023 11:09:14 +0000
Subject: [PATCH] dma/ioat: fix device stop if no copies done
[ upstream commit 664fa1c3922c7f81047bff55c13fccd3ef6c4131 ]
The HW DMA devices supported by IOAT driver do not transition to
the "active" state until the first operation is started by the HW.
Therefore, if the user calls "rte_dma_stop()" on a device without
triggering any operations, the sequence of commands to be sent to
the HW is different, as is the final device state.
Update the IOAT driver "stop" function to take account of this
difference.
Fixes: 583f046dd404 ("dma/ioat: add start and stop")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
drivers/dma/ioat/ioat_dmadev.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
index a230496b11..644670337a 100644
--- a/drivers/dma/ioat/ioat_dmadev.c
+++ b/drivers/dma/ioat/ioat_dmadev.c
@@ -167,15 +167,26 @@ ioat_dev_stop(struct rte_dma_dev *dev)
{
struct ioat_dmadev *ioat = dev->fp_obj->dev_private;
+ unsigned int chansts;
uint32_t retry = 0;
- ioat->regs->chancmd = IOAT_CHANCMD_SUSPEND;
+ chansts = (unsigned int)(ioat->regs->chansts & IOAT_CHANSTS_STATUS);
+ if (chansts == IOAT_CHANSTS_ACTIVE || chansts == IOAT_CHANSTS_IDLE)
+ ioat->regs->chancmd = IOAT_CHANCMD_SUSPEND;
+ else
+ ioat->regs->chancmd = IOAT_CHANCMD_RESET;
do {
rte_pause();
retry++;
- } while ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) != IOAT_CHANSTS_SUSPENDED
- && retry < 200);
+ chansts = (unsigned int)(ioat->regs->chansts & IOAT_CHANSTS_STATUS);
+ } while (chansts != IOAT_CHANSTS_SUSPENDED &&
+ chansts != IOAT_CHANSTS_HALTED && retry < 200);
- return ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_SUSPENDED) ? 0 : -1;
+ if (chansts == IOAT_CHANSTS_SUSPENDED || chansts == IOAT_CHANSTS_HALTED)
+ return 0;
+
+ IOAT_PMD_WARN("Channel could not be suspended on stop. (chansts = %u [%s])",
+ chansts, chansts_readable[chansts]);
+ return -1;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:25.999174013 +0000
+++ 0091-dma-ioat-fix-device-stop-if-no-copies-done.patch 2023-02-23 14:46:23.884236363 +0000
@@ -1 +1 @@
-From 664fa1c3922c7f81047bff55c13fccd3ef6c4131 Mon Sep 17 00:00:00 2001
+From 7e8fc5d99236ef3a2b08d6244e192bbc49a33854 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 664fa1c3922c7f81047bff55c13fccd3ef6c4131 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 5906eb45aa..aff7bbbfde 100644
+index a230496b11..644670337a 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'dma/ioat: fix indexes after restart' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (89 preceding siblings ...)
2023-02-23 15:06 ` patch 'dma/ioat: fix device stop if no copies done' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'dma/ioat: fix error reporting on " Kevin Traynor
` (6 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Conor Walsh, Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/3d440ae7d319fb4d8d3b513058e6c76686f638fc
Thanks.
Kevin
---
From 3d440ae7d319fb4d8d3b513058e6c76686f638fc Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 16 Feb 2023 11:09:15 +0000
Subject: [PATCH] dma/ioat: fix indexes after restart
[ upstream commit 79ab0f29dd9d734d0caf56e7694d7b0c6ead12e2 ]
As part of the process of restarting a dma instance, the IOAT driver
will reset the HW addresses and state values. The read and write
indexes for SW use need to be similarly reset to keep HW and SW in
sync.
Fixes: 583f046dd404 ("dma/ioat: add start and stop")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
drivers/dma/ioat/ioat_dmadev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
index 644670337a..04f162765a 100644
--- a/drivers/dma/ioat/ioat_dmadev.c
+++ b/drivers/dma/ioat/ioat_dmadev.c
@@ -147,4 +147,11 @@ ioat_dev_start(struct rte_dma_dev *dev)
ioat->status = ioat->ring_addr + ((ioat->qcfg.nb_desc - 1) * DESC_SZ);
+ /* reset all counters */
+ ioat->next_read = 0;
+ ioat->next_write = 0;
+ ioat->last_write = 0;
+ ioat->offset = 0;
+ ioat->failure = 0;
+
printf("IOAT.status: %s [0x%"PRIx64"]\n",
chansts_readable[ioat->status & IOAT_CHANSTS_STATUS],
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.021189601 +0000
+++ 0092-dma-ioat-fix-indexes-after-restart.patch 2023-02-23 14:46:23.884236363 +0000
@@ -1 +1 @@
-From 79ab0f29dd9d734d0caf56e7694d7b0c6ead12e2 Mon Sep 17 00:00:00 2001
+From 3d440ae7d319fb4d8d3b513058e6c76686f638fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79ab0f29dd9d734d0caf56e7694d7b0c6ead12e2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index aff7bbbfde..072eb17cd9 100644
+index 644670337a..04f162765a 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'dma/ioat: fix error reporting on restart' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (90 preceding siblings ...)
2023-02-23 15:06 ` patch 'dma/ioat: fix indexes after restart' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'reorder: invalidate buffer from ready queue in drain' " Kevin Traynor
` (5 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Conor Walsh, Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/5f2d6beac442219ee3e3444208c461112a3eabd4
Thanks.
Kevin
---
From 5f2d6beac442219ee3e3444208c461112a3eabd4 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 16 Feb 2023 11:09:16 +0000
Subject: [PATCH] dma/ioat: fix error reporting on restart
[ upstream commit d486f1dad1df34abb0d64dcc8d192675476581ed ]
When the DMA device was stopped and restarted by the driver, the control
register specifying the behaviour on error was not getting correctly
reset. This caused unit tests to fail as explicitly introduced errors
were got getting reported back.
Fix by moving the setting of the register to the start function from the
probe function.
Fixes: 583f046dd404 ("dma/ioat: add start and stop")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
drivers/dma/ioat/ioat_dmadev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
index 04f162765a..bfc61b3bf3 100644
--- a/drivers/dma/ioat/ioat_dmadev.c
+++ b/drivers/dma/ioat/ioat_dmadev.c
@@ -143,4 +143,7 @@ ioat_dev_start(struct rte_dma_dev *dev)
/* Inform hardware of where to write the status/completions. */
ioat->regs->chancmp = ioat->status_addr;
+ /* Ensure channel control is set to abort on error, so we get status writeback. */
+ ioat->regs->chanctrl = IOAT_CHANCTRL_ANY_ERR_ABORT_EN |
+ IOAT_CHANCTRL_ERR_COMPLETION_EN;
/* Prime the status register to be set to the last element. */
@@ -683,6 +686,4 @@ ioat_dmadev_create(const char *name, struct rte_pci_device *dev)
}
}
- ioat->regs->chanctrl = IOAT_CHANCTRL_ANY_ERR_ABORT_EN |
- IOAT_CHANCTRL_ERR_COMPLETION_EN;
dmadev->fp_obj->dev_private = ioat;
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.043317332 +0000
+++ 0093-dma-ioat-fix-error-reporting-on-restart.patch 2023-02-23 14:46:23.885236367 +0000
@@ -1 +1 @@
-From d486f1dad1df34abb0d64dcc8d192675476581ed Mon Sep 17 00:00:00 2001
+From 5f2d6beac442219ee3e3444208c461112a3eabd4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d486f1dad1df34abb0d64dcc8d192675476581ed ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 072eb17cd9..57c18c081d 100644
+index 04f162765a..bfc61b3bf3 100644
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'reorder: invalidate buffer from ready queue in drain' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (91 preceding siblings ...)
2023-02-23 15:06 ` patch 'dma/ioat: fix error reporting on " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'test/reorder: fix double free of drained buffers' " Kevin Traynor
` (4 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Volodymyr Fialko; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/68bf4f36e948865ffd6890808e1ce7a0827c50b2
Thanks.
Kevin
---
From 68bf4f36e948865ffd6890808e1ce7a0827c50b2 Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko@marvell.com>
Date: Sat, 7 Jan 2023 16:19:38 +0100
Subject: [PATCH] reorder: invalidate buffer from ready queue in drain
[ upstream commit af12092f927d0d230b4dc051529dae88902fba1c ]
Set drained buffers from ready queue to NULL, since their ownership
returned to user. Otherwise it's possible that both user and library
will attempt to free the packet.
Fixes: b70b56032bff ("reorder: new library")
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/reorder/rte_reorder.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c
index 9445853b79..a5b9663aa5 100644
--- a/lib/reorder/rte_reorder.c
+++ b/lib/reorder/rte_reorder.c
@@ -393,4 +393,5 @@ rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs,
while ((drain_cnt < max_mbufs) && (ready_buf->tail != ready_buf->head)) {
mbufs[drain_cnt++] = ready_buf->entries[ready_buf->tail];
+ ready_buf->entries[ready_buf->tail] = NULL;
ready_buf->tail = (ready_buf->tail + 1) & ready_buf->mask;
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.065247576 +0000
+++ 0094-reorder-invalidate-buffer-from-ready-queue-in-drain.patch 2023-02-23 14:46:23.886236370 +0000
@@ -1 +1 @@
-From af12092f927d0d230b4dc051529dae88902fba1c Mon Sep 17 00:00:00 2001
+From 68bf4f36e948865ffd6890808e1ce7a0827c50b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af12092f927d0d230b4dc051529dae88902fba1c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 385ee479da..b38e71f460 100644
+index 9445853b79..a5b9663aa5 100644
@@ -23 +24 @@
-@@ -390,4 +390,5 @@ rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs,
+@@ -393,4 +393,5 @@ rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs,
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'test/reorder: fix double free of drained buffers' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (92 preceding siblings ...)
2023-02-23 15:06 ` patch 'reorder: invalidate buffer from ready queue in drain' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'build: fix toolchain definition' " Kevin Traynor
` (3 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Volodymyr Fialko; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/fa627c973b378a630b52b0e21fd4d743056ff659
Thanks.
Kevin
---
From fa627c973b378a630b52b0e21fd4d743056ff659 Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko@marvell.com>
Date: Sat, 7 Jan 2023 16:19:39 +0100
Subject: [PATCH] test/reorder: fix double free of drained buffers
[ upstream commit d51955ea93fba1873e9c2b86a911e114787bdd4d ]
Set to zero array of drained buffers after free, to prevent freeing them
one more time.
Discovered with enabled `RTE_LIBRTE_MEMPOOL_DEBUG`.
Fixes: ecd867faa860 ("test/reorder: fix freeing mbuf twice")
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_reorder.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c
index 1c4226da65..69b63bceba 100644
--- a/app/test/test_reorder.c
+++ b/app/test/test_reorder.c
@@ -271,4 +271,5 @@ test_reorder_drain(void)
if (robufs[0] != NULL)
rte_pktmbuf_free(robufs[0]);
+ memset(robufs, 0, sizeof(robufs));
/* Insert more packets
@@ -307,4 +308,5 @@ test_reorder_drain(void)
rte_pktmbuf_free(robufs[i]);
}
+ memset(robufs, 0, sizeof(robufs));
/*
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.086706833 +0000
+++ 0095-test-reorder-fix-double-free-of-drained-buffers.patch 2023-02-23 14:46:23.886236370 +0000
@@ -1 +1 @@
-From d51955ea93fba1873e9c2b86a911e114787bdd4d Mon Sep 17 00:00:00 2001
+From fa627c973b378a630b52b0e21fd4d743056ff659 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d51955ea93fba1873e9c2b86a911e114787bdd4d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f0714a5c18..7b5e590bac 100644
+index 1c4226da65..69b63bceba 100644
@@ -23,3 +24,3 @@
-@@ -279,4 +279,5 @@ test_reorder_drain(void)
- }
- rte_pktmbuf_free(robufs[0]);
+@@ -271,4 +271,5 @@ test_reorder_drain(void)
+ if (robufs[0] != NULL)
+ rte_pktmbuf_free(robufs[0]);
@@ -29,2 +30,2 @@
-@@ -314,4 +315,5 @@ test_reorder_drain(void)
- rte_pktmbuf_free(robufs[i]);
+@@ -307,4 +308,5 @@ test_reorder_drain(void)
+ rte_pktmbuf_free(robufs[i]);
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'build: fix toolchain definition' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (93 preceding siblings ...)
2023-02-23 15:06 ` patch 'test/reorder: fix double free of drained buffers' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'eal: use same atomic intrinsics for GCC and clang' " Kevin Traynor
` (2 subsequent siblings)
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Keith Wiles, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/aff575df4669cd22b39666d44341f5cb51a71ccb
Thanks.
Kevin
---
From aff575df4669cd22b39666d44341f5cb51a71ccb Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 7 Feb 2023 15:22:00 +0000
Subject: [PATCH] build: fix toolchain definition
[ upstream commit e08c1645df1f2967b331e132ddb36ba817812dc2 ]
When using "icx" (Intel(R) oneAPI DPC++/C++ Compiler) to build DPDK,
meson reports the toolchain as "intel-llvm"[1]. This value is used
directly to define the RTE_TOOLCHAIN macros, which means that we end up
with the invalid macro name "RTE_TOOLCHAIN_INTEL-LLVM", and getting the
compiler warning:
rte_build_config.h:422:28: warning: ISO C99 requires whitespace after the macro name
This can be fixed, and the macro generation made more robust generally,
by adding "underscorify()" on the string. This replaces the "-", and
any other invalid characters, with "_" [2].
[1] https://mesonbuild.com/Reference-tables.html#compiler-ids
[2] https://mesonbuild.com/Reference-manual_elementary_str.html#strunderscorify
Fixes: afd18fa21b5e ("build: set toolchain info during meson configure")
Reported-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
config/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/meson.build b/config/meson.build
index ee12318d4f..44c0ca15c6 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -138,5 +138,5 @@ endif
toolchain = cc.get_id()
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
-dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper().underscorify(), 1)
dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.109272096 +0000
+++ 0096-build-fix-toolchain-definition.patch 2023-02-23 14:46:23.887236374 +0000
@@ -1 +1 @@
-From e08c1645df1f2967b331e132ddb36ba817812dc2 Mon Sep 17 00:00:00 2001
+From aff575df4669cd22b39666d44341f5cb51a71ccb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e08c1645df1f2967b331e132ddb36ba817812dc2 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 26f3168bc9..fc3ac99a32 100644
+index ee12318d4f..44c0ca15c6 100644
@@ -36 +37 @@
-@@ -140,5 +140,5 @@ endif
+@@ -138,5 +138,5 @@ endif
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'eal: use same atomic intrinsics for GCC and clang' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (94 preceding siblings ...)
2023-02-23 15:06 ` patch 'build: fix toolchain definition' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'examples/cmdline: fix build with GCC 12' " Kevin Traynor
2023-02-23 15:06 ` patch 'examples/qos_sched: fix Tx port config when link down' " Kevin Traynor
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Honnappa Nagarahalli
Cc: Ola Liljedahl, Ruifeng Wang, Morten Brørup, Tyler Retzlaff,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/c791a30249dabb499b5d60b208d437059d151e2c
Thanks.
Kevin
---
From c791a30249dabb499b5d60b208d437059d151e2c Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Fri, 17 Feb 2023 19:58:03 -0600
Subject: [PATCH] eal: use same atomic intrinsics for GCC and clang
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 0c0eb1156e3d52ede4b19d687aa5387d1dca7666 ]
The size generic atomic intrinsics generate the same
code as the size specific intrinsics for gcc. Use size
generic intrinsics for both gcc and clang.
Fixes: 7bdccb93078e ("eal: fix ARM build with clang")
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/eal/include/generic/rte_atomic.h | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/lib/eal/include/generic/rte_atomic.h b/lib/eal/include/generic/rte_atomic.h
index 276272f40b..f73825a3d3 100644
--- a/lib/eal/include/generic/rte_atomic.h
+++ b/lib/eal/include/generic/rte_atomic.h
@@ -176,9 +176,5 @@ static inline uint16_t
rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val)
{
-#if defined(__clang__)
return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
-#else
- return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST);
-#endif
}
#endif
@@ -459,9 +455,5 @@ static inline uint32_t
rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val)
{
-#if defined(__clang__)
return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
-#else
- return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST);
-#endif
}
#endif
@@ -741,9 +733,5 @@ static inline uint64_t
rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
{
-#if defined(__clang__)
return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
-#else
- return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST);
-#endif
}
#endif
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.130901839 +0000
+++ 0097-eal-use-same-atomic-intrinsics-for-GCC-and-clang.patch 2023-02-23 14:46:23.888236377 +0000
@@ -1 +1 @@
-From 0c0eb1156e3d52ede4b19d687aa5387d1dca7666 Mon Sep 17 00:00:00 2001
+From c791a30249dabb499b5d60b208d437059d151e2c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0c0eb1156e3d52ede4b19d687aa5387d1dca7666 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f5c49a9870..234b268b91 100644
+index 276272f40b..f73825a3d3 100644
@@ -29 +30 @@
-@@ -177,9 +177,5 @@ static inline uint16_t
+@@ -176,9 +176,5 @@ static inline uint16_t
@@ -39 +40 @@
-@@ -460,9 +456,5 @@ static inline uint32_t
+@@ -459,9 +455,5 @@ static inline uint32_t
@@ -49 +50 @@
-@@ -742,9 +734,5 @@ static inline uint64_t
+@@ -741,9 +733,5 @@ static inline uint64_t
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'examples/cmdline: fix build with GCC 12' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (95 preceding siblings ...)
2023-02-23 15:06 ` patch 'eal: use same atomic intrinsics for GCC and clang' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
2023-02-23 15:06 ` patch 'examples/qos_sched: fix Tx port config when link down' " Kevin Traynor
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/661f5540c3785104258dc1b9f169ccd6dd770472
Thanks.
Kevin
---
From 661f5540c3785104258dc1b9f169ccd6dd770472 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 18 Jan 2023 16:11:11 +0000
Subject: [PATCH] examples/cmdline: fix build with GCC 12
[ upstream commit 2ba8d0adb06f92ef73bc8e3953ca45b7d322c823 ]
When building the example without libbsd and using the DPDK-provided
strlcpy function, a compiler warning is emitted by GCC 12 about the copy
of the parsed string into the resulting object. This is because the
source from cmdline library is 128 bytes and the destination buffer is
64-bytes.
commands.c: In function 'cmd_obj_add_parsed':
rte_string_fns.h:61:24: warning: '%s' directive output may be truncated
writing up to 127 bytes into a region of size 64 [-Wformat-truncation=]
61 | return (size_t)snprintf(dst, size, "%s", src);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:894,
from commands.c:7:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note:
'__builtin_snprintf' output between 1 and 128 bytes into a destination of size 64
Multiple options are possible to fix this, but the one taken in this
patch is to ensure truncation never occurs by setting the destination
buffer size to be the same as that used by the cmdline library.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
examples/cmdline/parse_obj_list.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/cmdline/parse_obj_list.h b/examples/cmdline/parse_obj_list.h
index 6516d3e2c2..1223ac1e8b 100644
--- a/examples/cmdline/parse_obj_list.h
+++ b/examples/cmdline/parse_obj_list.h
@@ -13,6 +13,7 @@
#include <sys/queue.h>
#include <cmdline_parse.h>
+#include <cmdline_parse_string.h>
-#define OBJ_NAME_LEN_MAX 64
+#define OBJ_NAME_LEN_MAX sizeof(cmdline_fixed_string_t)
struct object {
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.153522525 +0000
+++ 0098-examples-cmdline-fix-build-with-GCC-12.patch 2023-02-23 14:46:23.888236377 +0000
@@ -1 +1 @@
-From 2ba8d0adb06f92ef73bc8e3953ca45b7d322c823 Mon Sep 17 00:00:00 2001
+From 661f5540c3785104258dc1b9f169ccd6dd770472 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ba8d0adb06f92ef73bc8e3953ca45b7d322c823 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 99+ messages in thread
* patch 'examples/qos_sched: fix Tx port config when link down' has been queued to stable release 21.11.4
2023-02-23 15:04 patch 'kni: fix build on RHEL 9.1' has been queued to stable release 21.11.4 Kevin Traynor
` (96 preceding siblings ...)
2023-02-23 15:06 ` patch 'examples/cmdline: fix build with GCC 12' " Kevin Traynor
@ 2023-02-23 15:06 ` Kevin Traynor
97 siblings, 0 replies; 99+ messages in thread
From: Kevin Traynor @ 2023-02-23 15:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. 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/74f84c75584a043cbc7f983579083f01f8b7d225
Thanks.
Kevin
---
From 74f84c75584a043cbc7f983579083f01f8b7d225 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 3 Feb 2023 10:05:30 +0000
Subject: [PATCH] examples/qos_sched: fix Tx port config when link down
[ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ]
The Tx port config will fail if the port is not up,
so wait 10 seconds on startup for it to start.
Fixes: de3cfa2c9823 ("sched: initial import")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
examples/qos_sched/init.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index e912ca4f6c..3a7e7d80a1 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -394,4 +394,6 @@ int app_init(void)
uint32_t socket = rte_lcore_to_socket_id(qos_conf[i].rx_core);
struct rte_ring *ring;
+ struct rte_eth_link link = {0};
+ int retry_count = 100, retry_delay = 100; /* try every 100ms for 10 sec */
snprintf(ring_name, MAX_NAME_LEN, "ring-%u-%u", i, qos_conf[i].rx_core);
@@ -424,4 +426,12 @@ int app_init(void)
app_init_port(qos_conf[i].tx_port, qos_conf[i].mbuf_pool);
+ rte_eth_link_get(qos_conf[i].tx_port, &link);
+ if (link.link_status == 0)
+ printf("Waiting for link on port %u\n", qos_conf[i].tx_port);
+ while (link.link_status == 0 && retry_count--) {
+ rte_delay_ms(retry_delay);
+ rte_eth_link_get(qos_conf[i].tx_port, &link);
+ }
+
qos_conf[i].sched_port = app_init_sched_port(qos_conf[i].tx_port, socket);
}
--
2.39.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-02-23 14:46:26.174589816 +0000
+++ 0099-examples-qos_sched-fix-Tx-port-config-when-link-down.patch 2023-02-23 14:46:23.889236381 +0000
@@ -1 +1 @@
-From 665b49c51639a10c553433bc2bcd85c7331c631e Mon Sep 17 00:00:00 2001
+From 74f84c75584a043cbc7f983579083f01f8b7d225 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d28350e14a..7a27c03b64 100644
+index e912ca4f6c..3a7e7d80a1 100644
@@ -22 +23 @@
-@@ -329,4 +329,6 @@ int app_init(void)
+@@ -394,4 +394,6 @@ int app_init(void)
@@ -29 +30 @@
-@@ -359,4 +361,12 @@ int app_init(void)
+@@ -424,4 +426,12 @@ int app_init(void)
^ permalink raw reply [flat|nested] 99+ messages in thread