* patch 'build: use builtin helper for python dependencies' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'app/bbdev: fix interrupt tests' " luca.boccassi
` (83 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Luca Boccassi; +Cc: Dmitry Kozlyuk, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fcfe871790d34c1a3b4eaa5d3d3eed732b79def0
Thanks.
Luca Boccassi
---
From fcfe871790d34c1a3b4eaa5d3d3eed732b79def0 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Sun, 23 Jun 2024 13:30:23 +0100
Subject: [PATCH] build: use builtin helper for python dependencies
[ upstream commit 9ab7baa5c14b1ba928c09bda4734827d6d367d6b ]
We now require Meson 0.53 or later, so we can use this feature introduced
in 0.51.
This also fixes a build failure on SUSE Leap 15.6 where the manual check
fails to detect the pyelftools module.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
buildtools/meson.build | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/buildtools/meson.build b/buildtools/meson.build
index e1c600e40f..c4f6fe9271 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -6,7 +6,11 @@ check_symbols = find_program('check-symbols.sh')
ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
objdump = find_program('objdump', 'llvm-objdump')
-python3 = import('python').find_installation(required: false)
+python3_required_modules = []
+if host_machine.system() != 'windows'
+ python3_required_modules = ['elftools']
+endif
+python3 = import('python').find_installation('python3', required: false, modules: python3_required_modules)
if python3.found()
py3 = [python3]
else
@@ -39,16 +43,3 @@ else
pmdinfogen += 'elf'
endif
-# TODO: starting from Meson 0.51.0 use
-# python3 = import('python').find_installation('python',
-# modules : python3_required_modules)
-python3_required_modules = []
-if host_machine.system() != 'windows'
- python3_required_modules = ['elftools']
-endif
-foreach module : python3_required_modules
- script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
- if run_command(py3, '-c', script.format(module), check: false).returncode() != 0
- error('missing python module: @0@'.format(module))
- endif
-endforeach
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:34.877654052 +0100
+++ 0002-build-use-builtin-helper-for-python-dependencies.patch 2024-07-15 16:19:34.432203559 +0100
@@ -1 +1 @@
-From 9ab7baa5c14b1ba928c09bda4734827d6d367d6b Mon Sep 17 00:00:00 2001
+From fcfe871790d34c1a3b4eaa5d3d3eed732b79def0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ab7baa5c14b1ba928c09bda4734827d6d367d6b ]
+
@@ -11,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -21 +21 @@
-index 72447b60a0..3adf34e1a8 100644
+index e1c600e40f..c4f6fe9271 100644
@@ -24,2 +24 @@
-@@ -5,7 +5,11 @@ pkgconf = find_program('pkg-config', 'pkgconf', required: false)
- check_symbols = find_program('check-symbols.sh')
+@@ -6,7 +6,11 @@ check_symbols = find_program('check-symbols.sh')
@@ -26,0 +26 @@
+ objdump = find_program('objdump', 'llvm-objdump')
@@ -37 +37 @@
-@@ -45,16 +49,3 @@ else
+@@ -39,16 +43,3 @@ else
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/bbdev: fix interrupt tests' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
2024-07-15 15:25 ` patch 'build: use builtin helper for python dependencies' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'dmadev: fix structure alignment' " luca.boccassi
` (82 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cdb1114156bfa7a8893904ad0368a312591428f0
Thanks.
Luca Boccassi
---
From cdb1114156bfa7a8893904ad0368a312591428f0 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Mon, 24 Jun 2024 08:02:31 -0700
Subject: [PATCH] app/bbdev: fix interrupt tests
[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]
Fix possible error with regards to setting the burst size from the
enqueue thread.
Fixes: b2e2aec3239e ("app/bbdev: enhance interrupt test")
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev_perf.c | 90 ++++++++++++++++----------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index f77ebc4b47..66d14ff502 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -3125,6 +3125,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_dec_ops(
@@ -3134,15 +3143,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
} while (unlikely(num_to_enq != enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3218,6 +3218,15 @@ throughput_intr_lcore_dec(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
@@ -3226,15 +3235,6 @@ throughput_intr_lcore_dec(void *arg)
} while (unlikely(num_to_enq != enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3304,6 +3304,15 @@ throughput_intr_lcore_enc(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
@@ -3312,15 +3321,6 @@ throughput_intr_lcore_enc(void *arg)
} while (unlikely(enq != num_to_enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3392,6 +3392,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_enc_ops(
@@ -3401,15 +3410,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
} while (unlikely(enq != num_to_enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3480,6 +3480,15 @@ throughput_intr_lcore_fft(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
@@ -3488,15 +3497,6 @@ throughput_intr_lcore_fft(void *arg)
} while (unlikely(enq != num_to_enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:34.931310201 +0100
+++ 0003-app-bbdev-fix-interrupt-tests.patch 2024-07-15 16:19:34.440203731 +0100
@@ -1 +1 @@
-From fdcee665c5066cd1300d08b85d159ccabf9f3657 Mon Sep 17 00:00:00 2001
+From cdb1114156bfa7a8893904ad0368a312591428f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/test-bbdev/test_bbdev_perf.c | 120 +++++++++++++++----------------
- 1 file changed, 60 insertions(+), 60 deletions(-)
+ app/test-bbdev/test_bbdev_perf.c | 90 ++++++++++++++++----------------
+ 1 file changed, 45 insertions(+), 45 deletions(-)
@@ -19 +20 @@
-index 9841464922..20cd8df19b 100644
+index f77ebc4b47..66d14ff502 100644
@@ -22 +23 @@
-@@ -3419,6 +3419,16 @@ throughput_intr_lcore_ldpc_dec(void *arg)
+@@ -3125,6 +3125,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
@@ -33,2 +34 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -39 +39 @@
-@@ -3428,16 +3438,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
+@@ -3134,15 +3143,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
@@ -50,2 +50 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -56 +55 @@
-@@ -3514,6 +3514,16 @@ throughput_intr_lcore_dec(void *arg)
+@@ -3218,6 +3218,15 @@ throughput_intr_lcore_dec(void *arg)
@@ -67,2 +66 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -73 +71 @@
-@@ -3522,16 +3532,6 @@ throughput_intr_lcore_dec(void *arg)
+@@ -3226,15 +3235,6 @@ throughput_intr_lcore_dec(void *arg)
@@ -84,2 +82 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -90 +87 @@
-@@ -3603,6 +3603,16 @@ throughput_intr_lcore_enc(void *arg)
+@@ -3304,6 +3304,15 @@ throughput_intr_lcore_enc(void *arg)
@@ -101,2 +98 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -107 +103 @@
-@@ -3611,16 +3621,6 @@ throughput_intr_lcore_enc(void *arg)
+@@ -3312,15 +3321,6 @@ throughput_intr_lcore_enc(void *arg)
@@ -118,2 +114 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -124 +119 @@
-@@ -3694,6 +3694,16 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+@@ -3392,6 +3392,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
@@ -135,2 +130 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -141 +135 @@
-@@ -3703,16 +3713,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+@@ -3401,15 +3410,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
@@ -152,2 +146 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -158 +151 @@
-@@ -3786,6 +3786,16 @@ throughput_intr_lcore_fft(void *arg)
+@@ -3480,6 +3480,15 @@ throughput_intr_lcore_fft(void *arg)
@@ -169,2 +162 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -175,35 +167 @@
-@@ -3794,16 +3804,6 @@ throughput_intr_lcore_fft(void *arg)
- } while (unlikely(enq != num_to_enq));
- enqueued += enq;
-
-- /* Write to thread burst_sz current number of enqueued
-- * descriptors. It ensures that proper number of
-- * descriptors will be dequeued in callback
-- * function - needed for last batch in case where
-- * the number of operations is not a multiple of
-- * burst size.
-- */
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
--
- /* Wait until processing of previous batch is
- * completed
- */
-@@ -3872,6 +3872,16 @@ throughput_intr_lcore_mldts(void *arg)
- if (unlikely(num_to_process - enqueued < num_to_enq))
- num_to_enq = num_to_process - enqueued;
-
-+ /* Write to thread burst_sz current number of enqueued
-+ * descriptors. It ensures that proper number of
-+ * descriptors will be dequeued in callback
-+ * function - needed for last batch in case where
-+ * the number of operations is not a multiple of
-+ * burst size.
-+ */
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
-+
- enq = 0;
- do {
- enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,
-@@ -3879,16 +3889,6 @@ throughput_intr_lcore_mldts(void *arg)
+@@ -3488,15 +3497,6 @@ throughput_intr_lcore_fft(void *arg)
@@ -220,2 +178 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'dmadev: fix structure alignment' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
2024-07-15 15:25 ` patch 'build: use builtin helper for python dependencies' " luca.boccassi
2024-07-15 15:25 ` patch 'app/bbdev: fix interrupt tests' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'vdpa/sfc: remove dead code' " luca.boccassi
` (81 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Wenwu Ma; +Cc: Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e35ccc8804b944595fa531f69b48c5f240dad59e
Thanks.
Luca Boccassi
---
From e35ccc8804b944595fa531f69b48c5f240dad59e Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Wed, 20 Mar 2024 15:23:32 +0800
Subject: [PATCH] dmadev: fix structure alignment
[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]
The structure rte_dma_dev needs to be aligned to the cache line, but
the return value of malloc may not be aligned to the cache line. When
we use memset to clear the rte_dma_dev object, it may cause a segmentation
fault in clang-x86-platform.
This is because clang uses the "vmovaps" assembly instruction for
memset, which requires that the operands (rte_dma_dev objects) must
aligned on a 16-byte boundary or a general-protection exception (#GP)
is generated.
Therefore, either additional memory is applied for re-alignment, or the
rte_dma_dev object does not require cache line alignment. The patch
chooses the former option to fix the issue.
Fixes: b36970f2e13e ("dmadev: introduce DMA device library")
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/dmadev/rte_dmadev.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index b48b915edc..d94f85ea9a 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -157,15 +157,24 @@ static int
dma_dev_data_prepare(void)
{
size_t size;
+ void *ptr;
if (rte_dma_devices != NULL)
return 0;
- size = dma_devices_max * sizeof(struct rte_dma_dev);
- rte_dma_devices = malloc(size);
- if (rte_dma_devices == NULL)
+ /* The DMA device object is expected to align cacheline,
+ * but the return value of malloc may not be aligned to the cache line.
+ * Therefore, extra memory is applied for realignment.
+ * Note: posix_memalign/aligned_alloc are not used
+ * because not always available, depending on libc.
+ */
+ size = dma_devices_max * sizeof(struct rte_dma_dev) + RTE_CACHE_LINE_SIZE;
+ ptr = malloc(size);
+ if (ptr == NULL)
return -ENOMEM;
- memset(rte_dma_devices, 0, size);
+ memset(ptr, 0, size);
+
+ rte_dma_devices = RTE_PTR_ALIGN(ptr, RTE_CACHE_LINE_SIZE);
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:34.992740818 +0100
+++ 0004-dmadev-fix-structure-alignment.patch 2024-07-15 16:19:34.440203731 +0100
@@ -1 +1 @@
-From c15902587b538ff02cfb0fbb4dd481f1503d936b Mon Sep 17 00:00:00 2001
+From e35ccc8804b944595fa531f69b48c5f240dad59e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index e64b279bac..845727210f 100644
+index b48b915edc..d94f85ea9a 100644
@@ -33 +34 @@
-@@ -159,15 +159,24 @@ static int
+@@ -157,15 +157,24 @@ static int
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'vdpa/sfc: remove dead code' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (2 preceding siblings ...)
2024-07-15 15:25 ` patch 'dmadev: fix structure alignment' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'mbuf: fix dynamic fields copy' " luca.boccassi
` (80 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: David Marchand; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2db5746bc8ff22b8c879e5516602cd82070f0681
Thanks.
Luca Boccassi
---
From 2db5746bc8ff22b8c879e5516602cd82070f0681 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:24:09 +0200
Subject: [PATCH] vdpa/sfc: remove dead code
[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]
This is probably a copy/paste from the net/sfc driver.
sfc_logtype_driver is not a logtype variable from the sfc vDPA driver.
Remove it.
Fixes: 6dad9a7353d4 ("vdpa/sfc: support device initialization")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/vdpa/sfc/sfc_vdpa_hw.c b/drivers/vdpa/sfc/sfc_vdpa_hw.c
index edb7e35c2c..7e43719f53 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_hw.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_hw.c
@@ -13,8 +13,6 @@
#include "sfc_vdpa.h"
#include "sfc_vdpa_ops.h"
-extern uint32_t sfc_logtype_driver;
-
#ifndef PAGE_SIZE
#define PAGE_SIZE (sysconf(_SC_PAGESIZE))
#endif
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.044354925 +0100
+++ 0005-vdpa-sfc-remove-dead-code.patch 2024-07-15 16:19:34.440203731 +0100
@@ -1 +1 @@
-From 4ea22410ea9c0235db40313bb810582b25e845b3 Mon Sep 17 00:00:00 2001
+From 2db5746bc8ff22b8c879e5516602cd82070f0681 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'mbuf: fix dynamic fields copy' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (3 preceding siblings ...)
2024-07-15 15:25 ` patch 'vdpa/sfc: remove dead code' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'bpf: fix MOV instruction evaluation' " luca.boccassi
` (79 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Shijith Thotton; +Cc: Morten Brørup, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f172fd7567fa2b1f7c4825ddc6cbc33403f1b74c
Thanks.
Luca Boccassi
---
From f172fd7567fa2b1f7c4825ddc6cbc33403f1b74c Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Thu, 27 Jun 2024 13:27:56 +0530
Subject: [PATCH] mbuf: fix dynamic fields copy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 95bea772528d316c969a170e6206f3b05ac39413 ]
Fixed rte_mbuf_dynfield_copy() API to copy dynamic fields from one mbuf
to another. When RTE_IOVA_AS_PA is not defined during the build, an
additional dynamic field (dynfield2) becomes available. This field
should be conditionally copied to ensure the complete duplication of
dynamic fields between mbufs. This patch fixes the same.
Bugzilla ID: 1472
Fixes: 03b57eb7ab9a ("mbuf: add second dynamic field member")
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/mbuf/rte_mbuf.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
index 3a82eb136d..a1b4c2b31d 100644
--- a/lib/mbuf/rte_mbuf.h
+++ b/lib/mbuf/rte_mbuf.h
@@ -1120,6 +1120,9 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
static inline void
rte_mbuf_dynfield_copy(struct rte_mbuf *mdst, const struct rte_mbuf *msrc)
{
+#if !RTE_IOVA_AS_PA
+ mdst->dynfield2 = msrc->dynfield2;
+#endif
memcpy(&mdst->dynfield1, msrc->dynfield1, sizeof(mdst->dynfield1));
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.093517065 +0100
+++ 0006-mbuf-fix-dynamic-fields-copy.patch 2024-07-15 16:19:34.444203816 +0100
@@ -1 +1 @@
-From 95bea772528d316c969a170e6206f3b05ac39413 Mon Sep 17 00:00:00 2001
+From f172fd7567fa2b1f7c4825ddc6cbc33403f1b74c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 95bea772528d316c969a170e6206f3b05ac39413 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 4c4722e002..babe16c72c 100644
+index 3a82eb136d..a1b4c2b31d 100644
@@ -30 +31 @@
-@@ -1119,6 +1119,9 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
+@@ -1120,6 +1120,9 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
@@ -34 +35 @@
-+#if !RTE_IOVA_IN_MBUF
++#if !RTE_IOVA_AS_PA
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bpf: fix MOV instruction evaluation' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (4 preceding siblings ...)
2024-07-15 15:25 ` patch 'mbuf: fix dynamic fields copy' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'bpf: fix load hangs with six IPv6 addresses' " luca.boccassi
` (78 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: Morten Brørup, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d7a549306d92869a80230f51b51d1e7e36fccfad
Thanks.
Luca Boccassi
---
From d7a549306d92869a80230f51b51d1e7e36fccfad Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:40 +0100
Subject: [PATCH] bpf: fix MOV instruction evaluation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]
Verifier might left some register-state values uninitialized while
evaluating MOV instructions.
Add explicit initialization.
Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/bpf/bpf_validate.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 61cbb42216..1bf91fa05b 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -636,14 +636,14 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
{
uint64_t msk;
uint32_t op;
- size_t opsz;
+ size_t opsz, sz;
const char *err;
struct bpf_eval_state *st;
struct bpf_reg_val *rd, rs;
- opsz = (BPF_CLASS(ins->code) == BPF_ALU) ?
+ sz = (BPF_CLASS(ins->code) == BPF_ALU) ?
sizeof(uint32_t) : sizeof(uint64_t);
- opsz = opsz * CHAR_BIT;
+ opsz = sz * CHAR_BIT;
msk = RTE_LEN2MASK(opsz, uint64_t);
st = bvf->evst;
@@ -652,8 +652,10 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
if (BPF_SRC(ins->code) == BPF_X) {
rs = st->rv[ins->src_reg];
eval_apply_mask(&rs, msk);
- } else
+ } else {
+ rs = (struct bpf_reg_val){.v = {.size = sz,},};
eval_fill_imm(&rs, msk, ins->imm);
+ }
eval_apply_mask(rd, msk);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.145803899 +0100
+++ 0007-bpf-fix-MOV-instruction-evaluation.patch 2024-07-15 16:19:34.444203816 +0100
@@ -1 +1 @@
-From 3eef64655bfe3602f4e3235e2533932205f24569 Mon Sep 17 00:00:00 2001
+From d7a549306d92869a80230f51b51d1e7e36fccfad Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 79be5e917d..11344fff4d 100644
+index 61cbb42216..1bf91fa05b 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bpf: fix load hangs with six IPv6 addresses' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (5 preceding siblings ...)
2024-07-15 15:25 ` patch 'bpf: fix MOV instruction evaluation' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'telemetry: fix connection parameter parsing' " luca.boccassi
` (77 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Konstantin Ananyev
Cc: Isaac Boukris, Morten Brørup, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e03493d52e9d59c40d1ccb31e27578be841d034e
Thanks.
Luca Boccassi
---
From e03493d52e9d59c40d1ccb31e27578be841d034e Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:41 +0100
Subject: [PATCH] bpf: fix load hangs with six IPv6 addresses
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]
As described in https://bugs.dpdk.org/show_bug.cgi?id=1465, converting
from following cBPF filter:
"host 1::1 or host 1::1 or host 1::1 or host 1::1 or
host 1::1 or host 1::1"
takes too long for BPF verifier to complete (up to 25 seconds).
Looking at it, I didn't find any actual functional bug.
In fact, it does what is expected: go through each possible path of
BPF program and evaluate register/stack state for each instruction.
The problem is that, for program with a lot of conditional branches,
number of possible paths starts to grow exponentially and such walk
becomes very excessive.
So to minimize number of evaluations, this patch implements heuristic
similar to what Linux kernel does: state pruning.
If from given instruction for given program state, we explore all possible
paths and for each of them reach bpf_exit() without any complaints and a
valid R0 value, then for that instruction this program state can be
marked as 'safe'.
When we later arrive at the same instruction with a state equivalent to
an earlier instruction 'safe' state, we can prune the search.
For now, only states for JCC targets are saved/examined.
Plus add few extra logging for DEBUG level.
Bugzilla ID: 1465
Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
Reported-by: Isaac Boukris <iboukris@gmail.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/bpf/bpf_validate.c | 305 ++++++++++++++++++++++++++++++++++-------
1 file changed, 255 insertions(+), 50 deletions(-)
diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 1bf91fa05b..ae2dad46bb 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -29,10 +29,13 @@ struct bpf_reg_val {
};
struct bpf_eval_state {
+ SLIST_ENTRY(bpf_eval_state) next; /* for @safe list traversal */
struct bpf_reg_val rv[EBPF_REG_NUM];
struct bpf_reg_val sv[MAX_BPF_STACK_SIZE / sizeof(uint64_t)];
};
+SLIST_HEAD(bpf_evst_head, bpf_eval_state);
+
/* possible instruction node colour */
enum {
WHITE,
@@ -52,6 +55,9 @@ enum {
#define MAX_EDGES 2
+/* max number of 'safe' evaluated states to track per node */
+#define NODE_EVST_MAX 32
+
struct inst_node {
uint8_t colour;
uint8_t nb_edge:4;
@@ -59,7 +65,18 @@ struct inst_node {
uint8_t edge_type[MAX_EDGES];
uint32_t edge_dest[MAX_EDGES];
uint32_t prev_node;
- struct bpf_eval_state *evst;
+ struct {
+ struct bpf_eval_state *cur; /* save/restore for jcc targets */
+ struct bpf_eval_state *start;
+ struct bpf_evst_head safe; /* safe states for track/prune */
+ uint32_t nb_safe;
+ } evst;
+};
+
+struct evst_pool {
+ uint32_t num;
+ uint32_t cur;
+ struct bpf_eval_state *ent;
};
struct bpf_verifier {
@@ -73,11 +90,8 @@ struct bpf_verifier {
uint32_t edge_type[MAX_EDGE_TYPE];
struct bpf_eval_state *evst;
struct inst_node *evin;
- struct {
- uint32_t num;
- uint32_t cur;
- struct bpf_eval_state *ent;
- } evst_pool;
+ struct evst_pool evst_sr_pool; /* for evst save/restore */
+ struct evst_pool evst_tp_pool; /* for evst track/prune */
};
struct bpf_ins_check {
@@ -1085,7 +1099,7 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
struct bpf_reg_val rvf, rvt;
tst = bvf->evst;
- fst = bvf->evin->evst;
+ fst = bvf->evin->evst.cur;
frd = fst->rv + ins->dst_reg;
trd = tst->rv + ins->dst_reg;
@@ -1814,8 +1828,8 @@ add_edge(struct bpf_verifier *bvf, struct inst_node *node, uint32_t nidx)
uint32_t ne;
if (nidx > bvf->prm->nb_ins) {
- RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
- "next pc: %u\n",
+ RTE_BPF_LOG(ERR,
+ "%s: program boundary violation at pc: %u, next pc: %u\n",
__func__, get_node_idx(bvf, node), nidx);
return -EINVAL;
}
@@ -2091,60 +2105,114 @@ validate(struct bpf_verifier *bvf)
* helper functions get/free eval states.
*/
static struct bpf_eval_state *
-pull_eval_state(struct bpf_verifier *bvf)
+pull_eval_state(struct evst_pool *pool)
{
uint32_t n;
- n = bvf->evst_pool.cur;
- if (n == bvf->evst_pool.num)
+ n = pool->cur;
+ if (n == pool->num)
return NULL;
- bvf->evst_pool.cur = n + 1;
- return bvf->evst_pool.ent + n;
+ pool->cur = n + 1;
+ return pool->ent + n;
}
static void
-push_eval_state(struct bpf_verifier *bvf)
+push_eval_state(struct evst_pool *pool)
{
- bvf->evst_pool.cur--;
+ RTE_ASSERT(pool->cur != 0);
+ pool->cur--;
}
static void
evst_pool_fini(struct bpf_verifier *bvf)
{
bvf->evst = NULL;
- free(bvf->evst_pool.ent);
- memset(&bvf->evst_pool, 0, sizeof(bvf->evst_pool));
+ free(bvf->evst_sr_pool.ent);
+ memset(&bvf->evst_sr_pool, 0, sizeof(bvf->evst_sr_pool));
+ memset(&bvf->evst_tp_pool, 0, sizeof(bvf->evst_tp_pool));
}
static int
evst_pool_init(struct bpf_verifier *bvf)
{
- uint32_t n;
+ uint32_t k, n;
- n = bvf->nb_jcc_nodes + 1;
+ /*
+ * We need nb_jcc_nodes + 1 for save_cur/restore_cur
+ * remaining ones will be used for state tracking/pruning.
+ */
+ k = bvf->nb_jcc_nodes + 1;
+ n = k * 3;
- bvf->evst_pool.ent = calloc(n, sizeof(bvf->evst_pool.ent[0]));
- if (bvf->evst_pool.ent == NULL)
+ bvf->evst_sr_pool.ent = calloc(n, sizeof(bvf->evst_sr_pool.ent[0]));
+ if (bvf->evst_sr_pool.ent == NULL)
return -ENOMEM;
- bvf->evst_pool.num = n;
- bvf->evst_pool.cur = 0;
+ bvf->evst_sr_pool.num = k;
+ bvf->evst_sr_pool.cur = 0;
- bvf->evst = pull_eval_state(bvf);
+ bvf->evst_tp_pool.ent = bvf->evst_sr_pool.ent + k;
+ bvf->evst_tp_pool.num = n - k;
+ bvf->evst_tp_pool.cur = 0;
+
+ bvf->evst = pull_eval_state(&bvf->evst_sr_pool);
return 0;
}
+/*
+ * try to allocate and initialise new eval state for given node.
+ * later if no errors will be encountered, this state will be accepted as
+ * one of the possible 'safe' states for that node.
+ */
+static void
+save_start_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+ RTE_ASSERT(node->evst.start == NULL);
+
+ /* limit number of states for one node with some reasonable value */
+ if (node->evst.nb_safe >= NODE_EVST_MAX)
+ return;
+
+ /* try to get new eval_state */
+ node->evst.start = pull_eval_state(&bvf->evst_tp_pool);
+
+ /* make a copy of current state */
+ if (node->evst.start != NULL) {
+ memcpy(node->evst.start, bvf->evst, sizeof(*node->evst.start));
+ SLIST_NEXT(node->evst.start, next) = NULL;
+ }
+}
+
+/*
+ * add @start state to the list of @safe states.
+ */
+static void
+save_safe_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+ if (node->evst.start == NULL)
+ return;
+
+ SLIST_INSERT_HEAD(&node->evst.safe, node->evst.start, next);
+ node->evst.nb_safe++;
+
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
+ __func__, bvf, get_node_idx(bvf, node), node->evst.start,
+ node->evst.nb_safe);
+
+ node->evst.start = NULL;
+}
+
/*
* Save current eval state.
*/
static int
-save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+save_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
{
struct bpf_eval_state *st;
/* get new eval_state for this node */
- st = pull_eval_state(bvf);
+ st = pull_eval_state(&bvf->evst_sr_pool);
if (st == NULL) {
RTE_BPF_LOG(ERR,
"%s: internal error (out of space) at pc: %u\n",
@@ -2156,11 +2224,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
memcpy(st, bvf->evst, sizeof(*st));
/* swap current state with new one */
- node->evst = bvf->evst;
+ RTE_ASSERT(node->evst.cur == NULL);
+ node->evst.cur = bvf->evst;
bvf->evst = st;
RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
- __func__, bvf, get_node_idx(bvf, node), node->evst, bvf->evst);
+ __func__, bvf, get_node_idx(bvf, node), node->evst.cur,
+ bvf->evst);
return 0;
}
@@ -2169,14 +2239,15 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
* Restore previous eval state and mark current eval state as free.
*/
static void
-restore_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+restore_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
{
RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
- __func__, bvf, get_node_idx(bvf, node), bvf->evst, node->evst);
+ __func__, bvf, get_node_idx(bvf, node), bvf->evst,
+ node->evst.cur);
- bvf->evst = node->evst;
- node->evst = NULL;
- push_eval_state(bvf);
+ bvf->evst = node->evst.cur;
+ node->evst.cur = NULL;
+ push_eval_state(&bvf->evst_sr_pool);
}
static void
@@ -2193,26 +2264,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
rte_log(loglvl, rte_bpf_logtype,
"r%u={\n"
- "\tv={type=%u, size=%zu},\n"
+ "\tv={type=%u, size=%zu, buf_size=%zu},\n"
"\tmask=0x%" PRIx64 ",\n"
"\tu={min=0x%" PRIx64 ", max=0x%" PRIx64 "},\n"
"\ts={min=%" PRId64 ", max=%" PRId64 "},\n"
"};\n",
ins->dst_reg,
- rv->v.type, rv->v.size,
+ rv->v.type, rv->v.size, rv->v.buf_size,
rv->mask,
rv->u.min, rv->u.max,
rv->s.min, rv->s.max);
}
/*
- * Do second pass through CFG and try to evaluate instructions
- * via each possible path.
- * Right now evaluation functionality is quite limited.
- * Still need to add extra checks for:
- * - use/return uninitialized registers.
- * - use uninitialized data from the stack.
- * - memory boundaries violation.
+ * compare two evaluation states.
+ * returns zero if @lv is more conservative (safer) then @rv.
+ * returns non-zero value otherwise.
+ */
+static int
+cmp_reg_val_within(const struct bpf_reg_val *lv, const struct bpf_reg_val *rv)
+{
+ /* expect @v and @mask to be identical */
+ if (memcmp(&lv->v, &rv->v, sizeof(lv->v)) != 0 || lv->mask != rv->mask)
+ return -1;
+
+ /* exact match only for mbuf and stack pointers */
+ if (lv->v.type == RTE_BPF_ARG_PTR_MBUF ||
+ lv->v.type == BPF_ARG_PTR_STACK)
+ return -1;
+
+ if (lv->u.min <= rv->u.min && lv->u.max >= rv->u.max &&
+ lv->s.min <= rv->s.min && lv->s.max >= rv->s.max)
+ return 0;
+
+ return -1;
+}
+
+/*
+ * compare two evaluation states.
+ * returns zero if they are identical.
+ * returns positive value if @lv is more conservative (safer) then @rv.
+ * returns negative value otherwise.
+ */
+static int
+cmp_eval_state(const struct bpf_eval_state *lv, const struct bpf_eval_state *rv)
+{
+ int32_t rc;
+ uint32_t i, k;
+
+ /* for stack expect identical values */
+ rc = memcmp(lv->sv, rv->sv, sizeof(lv->sv));
+ if (rc != 0)
+ return -(2 * EBPF_REG_NUM);
+
+ k = 0;
+ /* check register values */
+ for (i = 0; i != RTE_DIM(lv->rv); i++) {
+ rc = memcmp(&lv->rv[i], &rv->rv[i], sizeof(lv->rv[i]));
+ if (rc != 0 && cmp_reg_val_within(&lv->rv[i], &rv->rv[i]) != 0)
+ return -(i + 1);
+ k += (rc != 0);
+ }
+
+ return k;
+}
+
+/*
+ * check did we already evaluated that path and can it be pruned that time.
+ */
+static int
+prune_eval_state(struct bpf_verifier *bvf, const struct inst_node *node,
+ struct inst_node *next)
+{
+ int32_t rc;
+ struct bpf_eval_state *safe;
+
+ rc = INT32_MIN;
+ SLIST_FOREACH(safe, &next->evst.safe, next) {
+ rc = cmp_eval_state(safe, bvf->evst);
+ if (rc >= 0)
+ break;
+ }
+
+ rc = (rc >= 0) ? 0 : -1;
+
+ /*
+ * current state doesn't match any safe states,
+ * so no prunning is possible right now,
+ * track current state for future references.
+ */
+ if (rc != 0)
+ save_start_eval_state(bvf, next);
+
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
+ "next->evst.start=%p, next->evst.nb_safe=%u\n",
+ __func__, bvf, get_node_idx(bvf, node),
+ get_node_idx(bvf, next), rc,
+ next->evst.start, next->evst.nb_safe);
+ return rc;
+}
+
+/* Do second pass through CFG and try to evaluate instructions
+ * via each possible path. The verifier will try all paths, tracking types of
+ * registers used as input to instructions, and updating resulting type via
+ * register state values. Plus for each register and possible stack value it
+ * tries to estimate possible max/min value.
+ * For conditional jumps, a stack is used to save evaluation state, so one
+ * path is explored while the state for the other path is pushed onto the stack.
+ * Then later, we backtrack to the first pushed instruction and repeat the cycle
+ * until the stack is empty and we're done.
+ * For program with many conditional branches walking through all possible path
+ * could be very excessive. So to minimize number of evaluations we use
+ * heuristic similar to what Linux kernel does - state pruning:
+ * If from given instruction for given program state we explore all possible
+ * paths and for each of them reach _exit() without any complaints and a valid
+ * R0 value, then for that instruction, that program state can be marked as
+ * 'safe'. When we later arrive at the same instruction with a state
+ * equivalent to an earlier instruction's 'safe' state, we can prune the search.
+ * For now, only states for JCC targets are saved/examined.
*/
static int
evaluate(struct bpf_verifier *bvf)
@@ -2223,6 +2392,13 @@ evaluate(struct bpf_verifier *bvf)
const struct ebpf_insn *ins;
struct inst_node *next, *node;
+ struct {
+ uint32_t nb_eval;
+ uint32_t nb_prune;
+ uint32_t nb_save;
+ uint32_t nb_restore;
+ } stats;
+
/* initial state of frame pointer */
static const struct bpf_reg_val rvfp = {
.v = {
@@ -2246,6 +2422,8 @@ evaluate(struct bpf_verifier *bvf)
next = node;
rc = 0;
+ memset(&stats, 0, sizeof(stats));
+
while (node != NULL && rc == 0) {
/*
@@ -2259,11 +2437,14 @@ evaluate(struct bpf_verifier *bvf)
op = ins[idx].code;
/* for jcc node make a copy of evaluation state */
- if (node->nb_edge > 1)
- rc |= save_eval_state(bvf, node);
+ if (node->nb_edge > 1) {
+ rc |= save_cur_eval_state(bvf, node);
+ stats.nb_save++;
+ }
if (ins_chk[op].eval != NULL && rc == 0) {
err = ins_chk[op].eval(bvf, ins + idx);
+ stats.nb_eval++;
if (err != NULL) {
RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
__func__, err, idx);
@@ -2277,21 +2458,37 @@ evaluate(struct bpf_verifier *bvf)
/* proceed through CFG */
next = get_next_node(bvf, node);
+
if (next != NULL) {
/* proceed with next child */
if (node->cur_edge == node->nb_edge &&
- node->evst != NULL)
- restore_eval_state(bvf, node);
+ node->evst.cur != NULL) {
+ restore_cur_eval_state(bvf, node);
+ stats.nb_restore++;
+ }
- next->prev_node = get_node_idx(bvf, node);
- node = next;
+ /*
+ * for jcc targets: check did we already evaluated
+ * that path and can it's evaluation be skipped that
+ * time.
+ */
+ if (node->nb_edge > 1 && prune_eval_state(bvf, node,
+ next) == 0) {
+ next = NULL;
+ stats.nb_prune++;
+ } else {
+ next->prev_node = get_node_idx(bvf, node);
+ node = next;
+ }
} else {
/*
* finished with current node and all it's kids,
- * proceed with parent
+ * mark it's @start state as safe for future references,
+ * and proceed with parent.
*/
node->cur_edge = 0;
+ save_safe_eval_state(bvf, node);
node = get_prev_node(bvf, node);
/* finished */
@@ -2300,6 +2497,14 @@ evaluate(struct bpf_verifier *bvf)
}
}
+ RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"
+ "node evaluations=%u;\n"
+ "state pruned=%u;\n"
+ "state saves=%u;\n"
+ "state restores=%u;\n",
+ __func__, bvf, rc,
+ stats.nb_eval, stats.nb_prune, stats.nb_save, stats.nb_restore);
+
return rc;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.197489954 +0100
+++ 0008-bpf-fix-load-hangs-with-six-IPv6-addresses.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From a258eebdfb22f95a8a44d31b0eab639aed0a0c4b Mon Sep 17 00:00:00 2001
+From e03493d52e9d59c40d1ccb31e27578be841d034e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]
+
@@ -38 +39,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index 11344fff4d..4f47d6dc7b 100644
+index 1bf91fa05b..ae2dad46bb 100644
@@ -123,4 +124,4 @@
-- RTE_BPF_LOG_LINE(ERR, "%s: program boundary violation at pc: %u, "
-- "next pc: %u",
-+ RTE_BPF_LOG_LINE(ERR,
-+ "%s: program boundary violation at pc: %u, next pc: %u",
+- RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
+- "next pc: %u\n",
++ RTE_BPF_LOG(ERR,
++ "%s: program boundary violation at pc: %u, next pc: %u\n",
@@ -241 +242 @@
-+ RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;",
++ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
@@ -261,2 +262,2 @@
- RTE_BPF_LOG_LINE(ERR,
- "%s: internal error (out of space) at pc: %u",
+ RTE_BPF_LOG(ERR,
+ "%s: internal error (out of space) at pc: %u\n",
@@ -272 +273 @@
- RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -286 +287 @@
- RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -300 +301 @@
-@@ -2193,26 +2264,124 @@ log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+@@ -2193,26 +2264,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
@@ -302 +303 @@
- RTE_LOG(DEBUG, BPF,
+ rte_log(loglvl, rte_bpf_logtype,
@@ -405,2 +406,2 @@
-+ RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
-+ "next->evst.start=%p, next->evst.nb_safe=%u",
++ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
++ "next->evst.start=%p, next->evst.nb_safe=%u\n",
@@ -472 +473 @@
- RTE_BPF_LOG_LINE(ERR, "%s: %s at pc: %u",
+ RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
@@ -521 +522 @@
-+ RTE_LOG(DEBUG, BPF, "%s(%p) returns %d, stats:\n"
++ RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'telemetry: fix connection parameter parsing' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (6 preceding siblings ...)
2024-07-15 15:25 ` patch 'bpf: fix load hangs with six IPv6 addresses' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'baseband/la12xx: forbid secondary process' " luca.boccassi
` (76 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Zhichao Zeng; +Cc: Song Jiale, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/63cc1ddb1b3feea8a9c7b7a76a0e562f32fe99e2
Thanks.
Luca Boccassi
---
From 63cc1ddb1b3feea8a9c7b7a76a0e562f32fe99e2 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Fri, 21 Jun 2024 10:40:37 +0800
Subject: [PATCH] telemetry: fix connection parameter parsing
[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]
For calling memcpy when the source and destination addresses are the same,
there is a small probability that there will be a copy error issue in some
environments, resulting in a failure to connect.
This patch uses memmove instead of memcpy to avoid this issue.
Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
lib/telemetry/telemetry_legacy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/telemetry/telemetry_legacy.c b/lib/telemetry/telemetry_legacy.c
index 4c1d1c353a..578230732c 100644
--- a/lib/telemetry/telemetry_legacy.c
+++ b/lib/telemetry/telemetry_legacy.c
@@ -94,7 +94,7 @@ register_client(const char *cmd __rte_unused, const char *params,
}
#ifndef RTE_EXEC_ENV_WINDOWS
strlcpy(data, strchr(params, ':'), sizeof(data));
- memcpy(data, &data[strlen(":\"")], strlen(data));
+ memmove(data, &data[strlen(":\"")], strlen(data));
if (!strchr(data, '\"')) {
fprintf(stderr, "Invalid client data\n");
return -1;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.250141450 +0100
+++ 0009-telemetry-fix-connection-parameter-parsing.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From efdf81829076198189ba6ccbb2e5c50270f56992 Mon Sep 17 00:00:00 2001
+From 63cc1ddb1b3feea8a9c7b7a76a0e562f32fe99e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'baseband/la12xx: forbid secondary process' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (7 preceding siblings ...)
2024-07-15 15:25 ` patch 'telemetry: fix connection parameter parsing' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'app/crypto-perf: remove redundant local variable' " luca.boccassi
` (75 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cbe35e02f95454b3f698af10e41ee6d1fb95b903
Thanks.
Luca Boccassi
---
From cbe35e02f95454b3f698af10e41ee6d1fb95b903 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 2 Jul 2024 11:39:21 +0530
Subject: [PATCH] baseband/la12xx: forbid secondary process
[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]
The la12xx driver do not have any checks for secondary process
and it causes the system to try to initialize the driver, causing
segmentation faults.
LA12xx driver do not support multi-processing.
Return when not called from Primary process.
Fixes: f218a1f92017 ("baseband/la12xx: introduce NXP LA12xx driver")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/la12xx/bbdev_la12xx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index bb754a5395..1a56e73abd 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -1084,6 +1084,9 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
PMD_INIT_FUNC_TRACE();
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
if (vdev == NULL)
return -EINVAL;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.311188712 +0100
+++ 0010-baseband-la12xx-forbid-secondary-process.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From 95547dc69119154c85abfa7e8523e83a7ac05c9e Mon Sep 17 00:00:00 2001
+From cbe35e02f95454b3f698af10e41ee6d1fb95b903 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/crypto-perf: remove redundant local variable' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (8 preceding siblings ...)
2024-07-15 15:25 ` patch 'baseband/la12xx: forbid secondary process' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'app/crypto-perf: fix result for asymmetric' " luca.boccassi
` (74 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d581598df3592eedba82152da56b365b91713a71
Thanks.
Luca Boccassi
---
From d581598df3592eedba82152da56b365b91713a71 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 14:17:41 +0530
Subject: [PATCH] app/crypto-perf: remove redundant local variable
[ upstream commit 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d ]
Remove redundant local variable used for asym session.
Fixes: a29bb2489886 ("cryptodev: hide asymmetric session structure")
Fixes: 2973dbf93b44 ("security: hide session structure")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_ops.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 93b9bfb240..6bbab3289e 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -21,7 +21,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
uint64_t *tsc_start __rte_unused)
{
uint16_t i;
- void *asym_sess = (void *)sess;
for (i = 0; i < nb_ops; i++) {
struct rte_crypto_asym_op *asym_op = ops[i]->asym;
@@ -31,7 +30,7 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
asym_op->modex.base.length = options->modex_data->base.len;
asym_op->modex.result.data = options->modex_data->result.data;
asym_op->modex.result.length = options->modex_data->result.len;
- rte_crypto_op_attach_asym_session(ops[i], asym_sess);
+ rte_crypto_op_attach_asym_session(ops[i], sess);
}
}
@@ -64,7 +63,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
for (i = 0; i < nb_ops; i++) {
struct rte_crypto_sym_op *sym_op = ops[i]->sym;
- void *sec_sess = (void *)sess;
uint32_t buf_sz;
uint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ops[i],
@@ -72,7 +70,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
*per_pkt_hfn = options->pdcp_ses_hfn_en ? 0 : PDCP_DEFAULT_HFN;
ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
- rte_security_attach_session(ops[i], sec_sess);
+ rte_security_attach_session(ops[i], sess);
sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
src_buf_offset);
@@ -129,7 +127,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
uint16_t iv_offset __rte_unused, uint32_t *imix_idx,
uint64_t *tsc_start)
{
- void *sec_sess = sess;
const uint32_t test_buffer_size = options->test_buffer_size;
const uint32_t headroom_sz = options->headroom_sz;
const uint32_t segment_sz = options->segment_sz;
@@ -143,7 +140,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
struct rte_mbuf *m = sym_op->m_src;
ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
- rte_security_attach_session(ops[i], sec_sess);
+ rte_security_attach_session(ops[i], sess);
sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
src_buf_offset);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.362937866 +0100
+++ 0011-app-crypto-perf-remove-redundant-local-variable.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d Mon Sep 17 00:00:00 2001
+From d581598df3592eedba82152da56b365b91713a71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4ca001b721..a802281a71 100644
+index 93b9bfb240..6bbab3289e 100644
@@ -39 +40 @@
-@@ -62,7 +61,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
+@@ -64,7 +63,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
@@ -47 +48 @@
-@@ -70,7 +68,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
+@@ -72,7 +70,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
@@ -56 +57 @@
-@@ -127,7 +125,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
+@@ -129,7 +127,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
@@ -62,4 +63,4 @@
- uint64_t tsc_start_temp, tsc_end_temp;
- uint16_t i = 0;
-@@ -140,7 +137,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
- uint32_t offset = test_buffer_size;
+ const uint32_t headroom_sz = options->headroom_sz;
+ const uint32_t segment_sz = options->segment_sz;
+@@ -143,7 +140,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
+ struct rte_mbuf *m = sym_op->m_src;
@@ -70,2 +71,2 @@
- sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset);
- sym_op->m_src->pkt_len = test_buffer_size;
+ sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
+ src_buf_offset);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/crypto-perf: fix result for asymmetric' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (9 preceding siblings ...)
2024-07-15 15:25 ` patch 'app/crypto-perf: remove redundant local variable' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/cnxk: fix minimal input normalization' " luca.boccassi
` (73 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/528f8f36a88277ecdaee24c26447de59def3841d
Thanks.
Luca Boccassi
---
From 528f8f36a88277ecdaee24c26447de59def3841d Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 14:17:42 +0530
Subject: [PATCH] app/crypto-perf: fix result for asymmetric
[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]
For asymmetric op, private test data should be stored after
rte_crypto_asym_op struct.
Fixes: a538d1d2d01e ("test/crypto-perf: extend asymmetric crypto throughput test")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_test_common.c | 6 ++++--
app/test-crypto-perf/cperf_test_latency.c | 14 +++++++++++---
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 94d39fb177..6b8ab65731 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -149,11 +149,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
int ret;
/* Calculate the object size */
- uint16_t crypto_op_size = sizeof(struct rte_crypto_op) +
- sizeof(struct rte_crypto_sym_op);
+ uint16_t crypto_op_size = sizeof(struct rte_crypto_op);
uint16_t crypto_op_private_size;
if (options->op_type == CPERF_ASYM_MODEX) {
+ crypto_op_size += sizeof(struct rte_crypto_asym_op);
snprintf(pool_name, RTE_MEMPOOL_NAMESIZE, "perf_asym_op_pool%u",
rte_socket_id());
*pool = rte_crypto_op_pool_create(
@@ -170,6 +170,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
return 0;
}
+ crypto_op_size += sizeof(struct rte_crypto_sym_op);
+
/*
* If doing AES-CCM, IV field needs to be 16 bytes long,
* and AAD field needs to be long enough to have 18 bytes,
diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 406e082e4e..1c5fca0a55 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -122,7 +122,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
{
struct priv_op_data *priv_data;
- priv_data = (struct priv_op_data *) (op->sym + 1);
+ if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ priv_data = (struct priv_op_data *) (op->sym + 1);
+ else
+ priv_data = (struct priv_op_data *) (op->asym + 1);
+
priv_data->result->status = op->status;
priv_data->result->tsc_end = timestamp;
}
@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)
ctx->res[tsc_idx].tsc_start = tsc_start;
/*
* Private data structure starts after the end of the
- * rte_crypto_sym_op structure.
+ * rte_crypto_sym_op (or rte_crypto_asym_op) structure.
*/
- priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+ if (ops[i]->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+ else
+ priv_data = (struct priv_op_data *) (ops[i]->asym + 1);
+
priv_data->result = (void *)&ctx->res[tsc_idx];
tsc_idx++;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.413000464 +0100
+++ 0012-app-crypto-perf-fix-result-for-asymmetric.patch 2024-07-15 16:19:34.452203987 +0100
@@ -1 +1 @@
-From 022f9bf9d4571092be6bb98cea12efb1aa8fe0af Mon Sep 17 00:00:00 2001
+From 528f8f36a88277ecdaee24c26447de59def3841d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -47 +48 @@
-index b8ad6bf4d4..376847e761 100644
+index 406e082e4e..1c5fca0a55 100644
@@ -63 +64 @@
-@@ -251,9 +255,13 @@ cperf_latency_test_runner(void *arg)
+@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/cnxk: fix minimal input normalization' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (10 preceding siblings ...)
2024-07-15 15:25 ` patch 'app/crypto-perf: fix result for asymmetric' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'cryptodev: fix build without crypto callbacks' " luca.boccassi
` (72 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/734137651508036d90198aa057d06b20186391f7
Thanks.
Luca Boccassi
---
From 734137651508036d90198aa057d06b20186391f7 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:48:18 +0530
Subject: [PATCH] crypto/cnxk: fix minimal input normalization
[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]
Fix modex to nomalize input only when MSW is zero.
Fixes: 5a3513caeb45 ("crypto/cnxk: add asymmetric session")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
drivers/crypto/cnxk/cnxk_ae.h | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index adf719da73..156bd2e94f 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -27,13 +27,22 @@ struct cnxk_ae_sess {
};
static __rte_always_inline void
-cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len)
+cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len, size_t max)
{
+ uint8_t msw_len = *len % 8;
+ uint64_t msw_val = 0;
size_t i;
- /* Strip leading NUL bytes */
- for (i = 0; i < *len; i++) {
- if ((*data)[i] != 0)
+ if (*len <= 8)
+ return;
+
+ memcpy(&msw_val, *data, msw_len);
+ if (msw_val != 0)
+ return;
+
+ for (i = msw_len; i < *len && (*len - i) < max; i += 8) {
+ memcpy(&msw_val, &(*data)[i], 8);
+ if (msw_val != 0)
break;
}
*data += i;
@@ -50,8 +59,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
uint8_t *exp = xform->modex.exponent.data;
uint8_t *mod = xform->modex.modulus.data;
- cnxk_ae_modex_param_normalize(&mod, &mod_len);
- cnxk_ae_modex_param_normalize(&exp, &exp_len);
+ cnxk_ae_modex_param_normalize(&mod, &mod_len, SIZE_MAX);
+ cnxk_ae_modex_param_normalize(&exp, &exp_len, mod_len);
if (unlikely(exp_len == 0 || mod_len == 0))
return -EINVAL;
@@ -240,7 +249,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
struct rte_crypto_mod_op_param mod_op;
uint64_t total_key_len;
union cpt_inst_w4 w4;
- uint32_t base_len;
+ size_t base_len;
uint32_t dlen;
uint8_t *dptr;
@@ -248,8 +257,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
base_len = mod_op.base.length;
if (unlikely(base_len > mod_len)) {
- op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
- return -ENOTSUP;
+ cnxk_ae_modex_param_normalize(&mod_op.base.data, &base_len, mod_len);
+ if (base_len > mod_len) {
+ op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
+ return -ENOTSUP;
+ }
}
total_key_len = mod_len + exp_len;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.462262863 +0100
+++ 0013-crypto-cnxk-fix-minimal-input-normalization.patch 2024-07-15 16:19:34.452203987 +0100
@@ -1 +1 @@
-From 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad Mon Sep 17 00:00:00 2001
+From 734137651508036d90198aa057d06b20186391f7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index a843d6b5ef..ef9cb5eb91 100644
+index adf719da73..156bd2e94f 100644
@@ -20 +21 @@
-@@ -49,13 +49,22 @@ struct cnxk_ae_sess {
+@@ -27,13 +27,22 @@ struct cnxk_ae_sess {
@@ -47 +48 @@
-@@ -72,8 +81,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
+@@ -50,8 +59,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
@@ -58 +59 @@
-@@ -288,7 +297,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
+@@ -240,7 +249,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
@@ -67 +68 @@
-@@ -296,8 +305,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
+@@ -248,8 +257,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'cryptodev: fix build without crypto callbacks' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (11 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/cnxk: fix minimal input normalization' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'cryptodev: validate crypto callbacks from next node' " luca.boccassi
` (71 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Ganapati Kundapura; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff0ffd5338b388ba7f4a362a16872a6ec2c1c2e7
Thanks.
Luca Boccassi
---
From ff0ffd5338b388ba7f4a362a16872a6ec2c1c2e7 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:25 -0500
Subject: [PATCH] cryptodev: fix build without crypto callbacks
[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]
Crypto callbacks APIs are available in header files but when
the macro RTE_CRYPTO_CALLBACKS unset, test application need to
put #ifdef in its code.
The test application should be able to build and run, regardless
DPDK library is built with RTE_CRYPTO_CALLBACKS defined or not.
Added ENOTSUP from the beginning of the APIs implementation
if RTE_CRYPTO_CALLBACKS macro is unset/undefined.
Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue callbacks")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev.c | 12 ++++++++++++
lib/cryptodev/rte_cryptodev.c | 14 ++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 96cd9ef7dc..68c82771a1 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -12730,6 +12730,12 @@ test_enq_callback_setup(void)
/* Test with invalid crypto device */
cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_enq_callback, NULL);
+ if (rte_errno == ENOTSUP) {
+ RTE_LOG(ERR, USER1, "%s line %d: "
+ "rte_cryptodev_add_enq_callback() "
+ "Not supported, skipped\n", __func__, __LINE__);
+ return TEST_SKIPPED;
+ }
TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
"cryptodev %u did not fail",
qp_id, RTE_CRYPTO_MAX_DEVS);
@@ -12845,6 +12851,12 @@ test_deq_callback_setup(void)
/* Test with invalid crypto device */
cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_deq_callback, NULL);
+ if (rte_errno == ENOTSUP) {
+ RTE_LOG(ERR, USER1, "%s line %d: "
+ "rte_cryptodev_add_deq_callback() "
+ "Not supported, skipped\n", __func__, __LINE__);
+ return TEST_SKIPPED;
+ }
TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
"cryptodev %u did not fail",
qp_id, RTE_CRYPTO_MAX_DEVS);
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index d2b7e1c4cb..6c11881ab8 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1407,6 +1407,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
rte_cryptodev_callback_fn cb_fn,
void *cb_arg)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ rte_errno = ENOTSUP;
+ return NULL;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb, *tail;
@@ -1472,6 +1476,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
uint16_t qp_id,
struct rte_cryptodev_cb *cb)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ return -ENOTSUP;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb **prev_cb, *curr_cb;
struct rte_cryptodev_cb_rcu *list;
@@ -1545,6 +1552,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
rte_cryptodev_callback_fn cb_fn,
void *cb_arg)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ rte_errno = ENOTSUP;
+ return NULL;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb, *tail;
@@ -1611,6 +1622,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
uint16_t qp_id,
struct rte_cryptodev_cb *cb)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ return -ENOTSUP;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb **prev_cb, *curr_cb;
struct rte_cryptodev_cb_rcu *list;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.512563961 +0100
+++ 0014-cryptodev-fix-build-without-crypto-callbacks.patch 2024-07-15 16:19:34.472204413 +0100
@@ -1 +1 @@
-From cfa443351ef581b7189467842ca102ab710cb7d2 Mon Sep 17 00:00:00 2001
+From ff0ffd5338b388ba7f4a362a16872a6ec2c1c2e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 75f98b6744..6042db36a4 100644
+index 96cd9ef7dc..68c82771a1 100644
@@ -31 +32 @@
-@@ -14920,6 +14920,12 @@ test_enq_callback_setup(void)
+@@ -12730,6 +12730,12 @@ test_enq_callback_setup(void)
@@ -44 +45 @@
-@@ -15035,6 +15041,12 @@ test_deq_callback_setup(void)
+@@ -12845,6 +12851,12 @@ test_deq_callback_setup(void)
@@ -58 +59 @@
-index 886eb7adc4..682c9f49d0 100644
+index d2b7e1c4cb..6c11881ab8 100644
@@ -61 +62 @@
-@@ -1491,6 +1491,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
+@@ -1407,6 +1407,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
@@ -72 +73 @@
-@@ -1556,6 +1560,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
+@@ -1472,6 +1476,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
@@ -80,3 +81,3 @@
- RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
- struct rte_cryptodev_cb *curr_cb;
-@@ -1630,6 +1637,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
+ struct rte_cryptodev_cb **prev_cb, *curr_cb;
+ struct rte_cryptodev_cb_rcu *list;
+@@ -1545,6 +1552,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
@@ -93 +94 @@
-@@ -1696,6 +1707,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
+@@ -1611,6 +1622,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
@@ -101,2 +102,2 @@
- RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
- struct rte_cryptodev_cb *curr_cb;
+ struct rte_cryptodev_cb **prev_cb, *curr_cb;
+ struct rte_cryptodev_cb_rcu *list;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'cryptodev: validate crypto callbacks from next node' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (12 preceding siblings ...)
2024-07-15 15:25 ` patch 'cryptodev: fix build without crypto callbacks' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'examples/fips_validation: fix dereference and out-of-bound' " luca.boccassi
` (70 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Ganapati Kundapura; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5
Thanks.
Luca Boccassi
---
From 3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:26 -0500
Subject: [PATCH] cryptodev: validate crypto callbacks from next node
[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]
Crypto callbacks are invoked on checking from head node
which is always valid pointer.
This patch checks next node from the head node if callbacks
registered before invoking callbacks.
Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
lib/cryptodev/rte_cryptodev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index f955d96e23..cef9f2b3cb 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1851,7 +1851,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
nb_ops = fp_ops->dequeue_burst(qp, ops, nb_ops);
#ifdef RTE_CRYPTO_CALLBACKS
- if (unlikely(fp_ops->qp.deq_cb != NULL)) {
+ if (unlikely(fp_ops->qp.deq_cb[qp_id].next != NULL)) {
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb;
@@ -1918,7 +1918,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
fp_ops = &rte_crypto_fp_ops[dev_id];
qp = fp_ops->qp.data[qp_id];
#ifdef RTE_CRYPTO_CALLBACKS
- if (unlikely(fp_ops->qp.enq_cb != NULL)) {
+ if (unlikely(fp_ops->qp.enq_cb[qp_id].next != NULL)) {
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.572331136 +0100
+++ 0015-cryptodev-validate-crypto-callbacks-from-next-node.patch 2024-07-15 16:19:34.472204413 +0100
@@ -1 +1 @@
-From e858d0c9612211ba43d6703cb7834697214a3fe1 Mon Sep 17 00:00:00 2001
+From 3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c946f747fc..bec947f6d5 100644
+index f955d96e23..cef9f2b3cb 100644
@@ -25 +26 @@
-@@ -1910,7 +1910,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
+@@ -1851,7 +1851,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
@@ -34 +35 @@
-@@ -1977,7 +1977,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
+@@ -1918,7 +1918,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/fips_validation: fix dereference and out-of-bound' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (13 preceding siblings ...)
2024-07-15 15:25 ` patch 'cryptodev: validate crypto callbacks from next node' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " luca.boccassi
` (69 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Brian Dooley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7e6b9c068617106e9e0896894ba5b70356976ca9
Thanks.
Luca Boccassi
---
From 7e6b9c068617106e9e0896894ba5b70356976ca9 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:56:23 +0530
Subject: [PATCH] examples/fips_validation: fix dereference and out-of-bound
[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]
Fix NULL dereference, out-of-bound, bad bit shift issues
reported by coverity scan.
Coverity issue: 384440, 384435, 384433, 384429
Fixes: 36128a67c27e ("examples/fips_validation: add asymmetric validation")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
examples/fips_validation/fips_validation_rsa.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/examples/fips_validation/fips_validation_rsa.c b/examples/fips_validation/fips_validation_rsa.c
index f675b51051..55f81860a0 100644
--- a/examples/fips_validation/fips_validation_rsa.c
+++ b/examples/fips_validation/fips_validation_rsa.c
@@ -328,6 +328,9 @@ parse_test_rsa_json_interim_writeback(struct fips_val *val)
if (prepare_vec_rsa() < 0)
return -1;
+ if (!vec.rsa.e.val)
+ return -1;
+
writeback_hex_str("", info.one_line_text, &vec.rsa.n);
obj = json_string(info.one_line_text);
json_object_set_new(json_info.json_write_group, "n", obj);
@@ -474,7 +477,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
uint16_t rv_len;
if (!msg->val || !rand->val || rand->len > RV_BUF_LEN
- || msg->len > FIPS_TEST_JSON_BUF_LEN)
+ || msg->len > (FIPS_TEST_JSON_BUF_LEN - 1))
return -EINVAL;
memset(rv, 0, sizeof(rv));
@@ -503,7 +506,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
m[i + j] ^= rv[j];
m[i + j] = ((uint8_t *)&rv_bitlen)[0];
- m[i + j + 1] = (((uint8_t *)&rv_bitlen)[1] >> 8) & 0xFF;
+ m[i + j + 1] = ((uint8_t *)&rv_bitlen)[1];
rte_free(msg->val);
msg->len = (rv_bitlen + m_bitlen + 16) / 8;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.615184763 +0100
+++ 0016-examples-fips_validation-fix-dereference-and-out-of-.patch 2024-07-15 16:19:34.476204499 +0100
@@ -1 +1 @@
-From 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c Mon Sep 17 00:00:00 2001
+From 7e6b9c068617106e9e0896894ba5b70356976ca9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (14 preceding siblings ...)
2024-07-15 15:25 ` patch 'examples/fips_validation: fix dereference and out-of-bound' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " luca.boccassi
` (68 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5154afdce867b5eca45e9239581dc2eca7b07777
Thanks.
Luca Boccassi
---
From 5154afdce867b5eca45e9239581dc2eca7b07777 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:47 +0000
Subject: [PATCH] crypto/openssl: fix GCM and CCM thread unsafe contexts
[ upstream commit 78d7765f0acbb23168b7b25e25d775bea22c48ab ]
Commit 67ab783b5d70 ("crypto/openssl: use local copy for session
contexts") introduced a fix for concurrency bugs which could occur when
using one OpenSSL PMD session across multiple cores simultaneously. The
solution was to clone the EVP contexts per-buffer to avoid them being
used concurrently.
However, part of commit 75adf1eae44f ("crypto/openssl: update HMAC
routine with 3.0 EVP API") reverted this fix, only for combined ops
(AES-GCM and AES-CCM).
Fix the concurrency issue by cloning EVP contexts per-buffer. An extra
workaround is required for OpenSSL versions which are >= 3.0.0, and
<= 3.2.0. This is because, prior to OpenSSL 3.2.0, EVP_CIPHER_CTX_copy()
is not implemented for AES-GCM or AES-CCM. When using these OpenSSL
versions, create and initialise the context from scratch, per-buffer.
Throughput performance uplift measurements for AES-GCM-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 2.60 | 1.31 | -49.5% |
| 256 | 7.69 | 4.45 | -42.1% |
| 1024 | 15.33 | 11.30 | -26.3% |
| 2048 | 18.74 | 15.37 | -18.0% |
| 4096 | 21.11 | 18.80 | -10.9% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 19.94 | 2.83 | -85.8% |
| 256 | 58.84 | 11.00 | -81.3% |
| 1024 | 119.71 | 42.46 | -64.5% |
| 2048 | 147.69 | 80.91 | -45.2% |
| 4096 | 167.39 | 121.25 | -27.6% |
Fixes: 75adf1eae44f ("crypto/openssl: update HMAC routine with 3.0 EVP API")
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 84 ++++++++++++++++++------
1 file changed, 64 insertions(+), 20 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 6ae31cb5cd..bf9a546f48 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -349,7 +349,8 @@ get_aead_algo(enum rte_crypto_aead_algorithm sess_algo, size_t keylen,
static int
openssl_set_sess_aead_enc_param(struct openssl_session *sess,
enum rte_crypto_aead_algorithm algo,
- uint8_t tag_len, const uint8_t *key)
+ uint8_t tag_len, const uint8_t *key,
+ EVP_CIPHER_CTX **ctx)
{
int iv_type = 0;
unsigned int do_ccm;
@@ -377,7 +378,7 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
}
sess->cipher.mode = OPENSSL_CIPHER_LIB;
- sess->cipher.ctx = EVP_CIPHER_CTX_new();
+ *ctx = EVP_CIPHER_CTX_new();
if (get_aead_algo(algo, sess->cipher.key.length,
&sess->cipher.evp_algo) != 0)
@@ -387,19 +388,19 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
sess->chain_order = OPENSSL_CHAIN_COMBINED;
- if (EVP_EncryptInit_ex(sess->cipher.ctx, sess->cipher.evp_algo,
+ if (EVP_EncryptInit_ex(*ctx, sess->cipher.evp_algo,
NULL, NULL, NULL) <= 0)
return -EINVAL;
- if (EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, iv_type, sess->iv.length,
+ if (EVP_CIPHER_CTX_ctrl(*ctx, iv_type, sess->iv.length,
NULL) <= 0)
return -EINVAL;
if (do_ccm)
- EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, EVP_CTRL_CCM_SET_TAG,
+ EVP_CIPHER_CTX_ctrl(*ctx, EVP_CTRL_CCM_SET_TAG,
tag_len, NULL);
- if (EVP_EncryptInit_ex(sess->cipher.ctx, NULL, NULL, key, NULL) <= 0)
+ if (EVP_EncryptInit_ex(*ctx, NULL, NULL, key, NULL) <= 0)
return -EINVAL;
return 0;
@@ -409,7 +410,8 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
static int
openssl_set_sess_aead_dec_param(struct openssl_session *sess,
enum rte_crypto_aead_algorithm algo,
- uint8_t tag_len, const uint8_t *key)
+ uint8_t tag_len, const uint8_t *key,
+ EVP_CIPHER_CTX **ctx)
{
int iv_type = 0;
unsigned int do_ccm = 0;
@@ -436,7 +438,7 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
}
sess->cipher.mode = OPENSSL_CIPHER_LIB;
- sess->cipher.ctx = EVP_CIPHER_CTX_new();
+ *ctx = EVP_CIPHER_CTX_new();
if (get_aead_algo(algo, sess->cipher.key.length,
&sess->cipher.evp_algo) != 0)
@@ -446,24 +448,54 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
sess->chain_order = OPENSSL_CHAIN_COMBINED;
- if (EVP_DecryptInit_ex(sess->cipher.ctx, sess->cipher.evp_algo,
+ if (EVP_DecryptInit_ex(*ctx, sess->cipher.evp_algo,
NULL, NULL, NULL) <= 0)
return -EINVAL;
- if (EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, iv_type,
+ if (EVP_CIPHER_CTX_ctrl(*ctx, iv_type,
sess->iv.length, NULL) <= 0)
return -EINVAL;
if (do_ccm)
- EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, EVP_CTRL_CCM_SET_TAG,
+ EVP_CIPHER_CTX_ctrl(*ctx, EVP_CTRL_CCM_SET_TAG,
tag_len, NULL);
- if (EVP_DecryptInit_ex(sess->cipher.ctx, NULL, NULL, key, NULL) <= 0)
+ if (EVP_DecryptInit_ex(*ctx, NULL, NULL, key, NULL) <= 0)
return -EINVAL;
return 0;
}
+static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
+ struct openssl_session *sess)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30200000L)
+ *dest = EVP_CIPHER_CTX_dup(sess->ctx);
+ return 0;
+#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ /* OpenSSL versions 3.0.0 <= V < 3.2.0 have no dupctx() implementation
+ * for AES-GCM and AES-CCM. In this case, we have to create new empty
+ * contexts and initialise, as we did the original context.
+ */
+ if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC)
+ sess->aead_algo = RTE_CRYPTO_AEAD_AES_GCM;
+
+ if (sess->cipher.direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
+ return openssl_set_sess_aead_enc_param(sess, sess->aead_algo,
+ sess->auth.digest_length, sess->cipher.key.data,
+ dest);
+ else
+ return openssl_set_sess_aead_dec_param(sess, sess->aead_algo,
+ sess->auth.digest_length, sess->cipher.key.data,
+ dest);
+#else
+ *dest = EVP_CIPHER_CTX_new();
+ if (EVP_CIPHER_CTX_copy(*dest, sess->cipher.ctx) != 1)
+ return -EINVAL;
+ return 0;
+#endif
+}
+
/** Set session cipher parameters */
static int
openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -622,12 +654,14 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
return openssl_set_sess_aead_enc_param(sess,
RTE_CRYPTO_AEAD_AES_GCM,
xform->auth.digest_length,
- xform->auth.key.data);
+ xform->auth.key.data,
+ &sess->cipher.ctx);
else
return openssl_set_sess_aead_dec_param(sess,
RTE_CRYPTO_AEAD_AES_GCM,
xform->auth.digest_length,
- xform->auth.key.data);
+ xform->auth.key.data,
+ &sess->cipher.ctx);
break;
case RTE_CRYPTO_AUTH_MD5:
@@ -769,10 +803,12 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
/* Select cipher direction */
if (xform->aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT)
return openssl_set_sess_aead_enc_param(sess, xform->aead.algo,
- xform->aead.digest_length, xform->aead.key.data);
+ xform->aead.digest_length, xform->aead.key.data,
+ &sess->cipher.ctx);
else
return openssl_set_sess_aead_dec_param(sess, xform->aead.algo,
- xform->aead.digest_length, xform->aead.key.data);
+ xform->aead.digest_length, xform->aead.key.data,
+ &sess->cipher.ctx);
}
/** Parse crypto xform chain and set private session parameters */
@@ -1589,6 +1625,12 @@ process_openssl_combined_op
return;
}
+ EVP_CIPHER_CTX *ctx;
+ if (openssl_aesni_ctx_clone(&ctx, sess) != 0) {
+ op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+ return;
+ }
+
iv = rte_crypto_op_ctod_offset(op, uint8_t *,
sess->iv.offset);
if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC) {
@@ -1622,12 +1664,12 @@ process_openssl_combined_op
status = process_openssl_auth_encryption_gcm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, sess->cipher.ctx);
+ dst, tag, ctx);
else
status = process_openssl_auth_encryption_ccm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, taglen, sess->cipher.ctx);
+ dst, tag, taglen, ctx);
} else {
if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC ||
@@ -1635,14 +1677,16 @@ process_openssl_combined_op
status = process_openssl_auth_decryption_gcm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, sess->cipher.ctx);
+ dst, tag, ctx);
else
status = process_openssl_auth_decryption_ccm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, taglen, sess->cipher.ctx);
+ dst, tag, taglen, ctx);
}
+ EVP_CIPHER_CTX_free(ctx);
+
if (status != 0) {
if (status == (-EFAULT) &&
sess->auth.operation ==
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.657083047 +0100
+++ 0017-crypto-openssl-fix-GCM-and-CCM-thread-unsafe-context.patch 2024-07-15 16:19:34.476204499 +0100
@@ -1 +1 @@
-From 78d7765f0acbb23168b7b25e25d775bea22c48ab Mon Sep 17 00:00:00 2001
+From 5154afdce867b5eca45e9239581dc2eca7b07777 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78d7765f0acbb23168b7b25e25d775bea22c48ab ]
+
@@ -43 +44,0 @@
-Cc: stable@dpdk.org
@@ -53 +54 @@
-index e8cb09defc..3e547c2039 100644
+index 6ae31cb5cd..bf9a546f48 100644
@@ -56 +57 @@
-@@ -350,7 +350,8 @@ get_aead_algo(enum rte_crypto_aead_algorithm sess_algo, size_t keylen,
+@@ -349,7 +349,8 @@ get_aead_algo(enum rte_crypto_aead_algorithm sess_algo, size_t keylen,
@@ -66 +67 @@
-@@ -378,7 +379,7 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
+@@ -377,7 +378,7 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
@@ -75 +76 @@
-@@ -388,19 +389,19 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
+@@ -387,19 +388,19 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
@@ -99 +100 @@
-@@ -410,7 +411,8 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
+@@ -409,7 +410,8 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
@@ -109 +110 @@
-@@ -437,7 +439,7 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
+@@ -436,7 +438,7 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
@@ -118 +119 @@
-@@ -447,24 +449,54 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
+@@ -446,24 +448,54 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
@@ -177 +178 @@
-@@ -623,12 +655,14 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
+@@ -622,12 +654,14 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
@@ -194 +195 @@
-@@ -770,10 +804,12 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
+@@ -769,10 +803,12 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
@@ -209 +210 @@
-@@ -1590,6 +1626,12 @@ process_openssl_combined_op
+@@ -1589,6 +1625,12 @@ process_openssl_combined_op
@@ -222 +223 @@
-@@ -1623,12 +1665,12 @@ process_openssl_combined_op
+@@ -1622,12 +1664,12 @@ process_openssl_combined_op
@@ -237 +238 @@
-@@ -1636,14 +1678,16 @@ process_openssl_combined_op
+@@ -1635,14 +1677,16 @@ process_openssl_combined_op
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: optimize 3DES-CTR context init' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (15 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP cipher context clones' " luca.boccassi
` (67 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8e32c3a94a8b8d312acb1170ee601cafc7475f4f
Thanks.
Luca Boccassi
---
From 8e32c3a94a8b8d312acb1170ee601cafc7475f4f Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:48 +0000
Subject: [PATCH] crypto/openssl: optimize 3DES-CTR context init
[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]
Currently the 3DES-CTR cipher context is initialised for every buffer,
setting the cipher implementation and key - even though for every
buffer in the session these values will be the same.
Change to initialising the cipher context once, before any buffers are
processed, instead.
Throughput performance uplift measurements for 3DES-CTR encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 0.16 | 0.21 | 35.3% |
| 256 | 0.20 | 0.22 | 9.4% |
| 1024 | 0.22 | 0.23 | 2.3% |
| 2048 | 0.22 | 0.23 | 0.9% |
| 4096 | 0.22 | 0.23 | 0.9% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 1.01 | 1.34 | 32.9% |
| 256 | 1.51 | 1.66 | 9.9% |
| 1024 | 1.72 | 1.77 | 2.6% |
| 2048 | 1.76 | 1.78 | 1.1% |
| 4096 | 1.79 | 1.80 | 0.6% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bf9a546f48..bfdcda8841 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -552,6 +552,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
sess->cipher.key.length,
sess->cipher.key.data) != 0)
return -EINVAL;
+
+
+ /* We use 3DES encryption also for decryption.
+ * IV is not important for 3DES ECB.
+ */
+ if (EVP_EncryptInit_ex(sess->cipher.ctx, EVP_des_ede3_ecb(),
+ NULL, sess->cipher.key.data, NULL) != 1)
+ return -EINVAL;
+
break;
case RTE_CRYPTO_CIPHER_DES_CBC:
@@ -1171,8 +1180,7 @@ process_cipher_decrypt_err:
/** Process cipher des 3 ctr encryption, decryption algorithm */
static int
process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
- int offset, uint8_t *iv, uint8_t *key, int srclen,
- EVP_CIPHER_CTX *ctx)
+ int offset, uint8_t *iv, int srclen, EVP_CIPHER_CTX *ctx)
{
uint8_t ebuf[8], ctr[8];
int unused, n;
@@ -1190,12 +1198,6 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
l = rte_pktmbuf_data_len(m) - offset;
- /* We use 3DES encryption also for decryption.
- * IV is not important for 3DES ecb
- */
- if (EVP_EncryptInit_ex(ctx, EVP_des_ede3_ecb(), NULL, key, NULL) <= 0)
- goto process_cipher_des3ctr_err;
-
memcpy(ctr, iv, 8);
for (n = 0; n < srclen; n++) {
@@ -1739,8 +1741,7 @@ process_openssl_cipher_op
srclen, ctx_copy, inplace);
else
status = process_openssl_cipher_des3ctr(mbuf_src, dst,
- op->sym->cipher.data.offset, iv,
- sess->cipher.key.data, srclen,
+ op->sym->cipher.data.offset, iv, srclen,
ctx_copy);
EVP_CIPHER_CTX_free(ctx_copy);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.700839877 +0100
+++ 0018-crypto-openssl-optimize-3DES-CTR-context-init.patch 2024-07-15 16:19:34.480204585 +0100
@@ -1 +1 @@
-From 08917edd8b110f9819301ee4f9b152de7c79ddd4 Mon Sep 17 00:00:00 2001
+From 8e32c3a94a8b8d312acb1170ee601cafc7475f4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]
+
@@ -33,2 +34,0 @@
-Cc: stable@dpdk.org
-
@@ -43 +43 @@
-index 3e547c2039..bd09d58d88 100644
+index bf9a546f48..bfdcda8841 100644
@@ -46 +46 @@
-@@ -553,6 +553,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
+@@ -552,6 +552,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -62 +62 @@
-@@ -1172,8 +1181,7 @@ process_cipher_decrypt_err:
+@@ -1171,8 +1180,7 @@ process_cipher_decrypt_err:
@@ -72 +72 @@
-@@ -1191,12 +1199,6 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1190,12 +1198,6 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
@@ -85 +85 @@
-@@ -1740,8 +1742,7 @@ process_openssl_cipher_op
+@@ -1739,8 +1741,7 @@ process_openssl_cipher_op
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: make per-QP cipher context clones' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (16 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP auth " luca.boccassi
` (66 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/26e1e90724f9ab34120d25bba9a3cc47c9234540
Thanks.
Luca Boccassi
---
From 26e1e90724f9ab34120d25bba9a3cc47c9234540 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:49 +0000
Subject: [PATCH] crypto/openssl: make per-QP cipher context clones
[ upstream commit b1d71126023521fe740ec473abfe5b295035b859 ]
Currently EVP_CIPHER_CTXs are allocated, copied to (from
openssl_session), and then freed for every cipher operation (ie. per
packet). This is very inefficient, and avoidable.
Make each openssl_session hold an array of pointers to per-queue-pair
cipher context copies. These are populated on first use by allocating a
new context and copying from the main context. These copies can then be
used in a thread-safe manner by different worker lcores simultaneously.
Consequently the cipher context allocation and copy only has to happen
once - the first time a given qp uses an openssl_session. This brings
about a large performance boost.
Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 1.51 | 2.94 | 94.4% |
| 256 | 4.90 | 8.05 | 64.3% |
| 1024 | 11.07 | 14.21 | 28.3% |
| 2048 | 14.03 | 16.28 | 16.0% |
| 4096 | 16.20 | 17.59 | 8.6% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 3.05 | 23.74 | 678.8% |
| 256 | 10.46 | 64.86 | 520.3% |
| 1024 | 40.97 | 113.80 | 177.7% |
| 2048 | 73.25 | 130.21 | 77.8% |
| 4096 | 103.89 | 140.62 | 35.4% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/openssl_pmd_private.h | 11 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 105 ++++++++++++-------
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 34 +++++-
3 files changed, 108 insertions(+), 42 deletions(-)
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index 4e224b040b..810b539f10 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -165,6 +165,14 @@ struct openssl_session {
/**< digest length */
} auth;
+ uint16_t ctx_copies_len;
+ /* < number of entries in ctx_copies */
+ EVP_CIPHER_CTX *qp_ctx[];
+ /**< Flexible array member of per-queue-pair pointers to copies of EVP
+ * context structure. Cipher contexts are not safe to use from multiple
+ * cores simultaneously, so maintaining these copies allows avoiding
+ * per-buffer copying into a temporary context.
+ */
} __rte_cache_aligned;
/** OPENSSL crypto private asymmetric session structure */
@@ -211,7 +219,8 @@ struct openssl_asym_session {
/** Set and validate OPENSSL crypto session parameters */
extern int
openssl_set_session_parameters(struct openssl_session *sess,
- const struct rte_crypto_sym_xform *xform);
+ const struct rte_crypto_sym_xform *xform,
+ uint16_t nb_queue_pairs);
/** Reset OPENSSL crypto session parameters */
extern void
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bfdcda8841..62a179b6b6 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -466,13 +466,10 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
return 0;
}
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30200000L)
static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
struct openssl_session *sess)
{
-#if (OPENSSL_VERSION_NUMBER >= 0x30200000L)
- *dest = EVP_CIPHER_CTX_dup(sess->ctx);
- return 0;
-#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
/* OpenSSL versions 3.0.0 <= V < 3.2.0 have no dupctx() implementation
* for AES-GCM and AES-CCM. In this case, we have to create new empty
* contexts and initialise, as we did the original context.
@@ -488,13 +485,8 @@ static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
return openssl_set_sess_aead_dec_param(sess, sess->aead_algo,
sess->auth.digest_length, sess->cipher.key.data,
dest);
-#else
- *dest = EVP_CIPHER_CTX_new();
- if (EVP_CIPHER_CTX_copy(*dest, sess->cipher.ctx) != 1)
- return -EINVAL;
- return 0;
-#endif
}
+#endif
/** Set session cipher parameters */
static int
@@ -823,7 +815,8 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
/** Parse crypto xform chain and set private session parameters */
int
openssl_set_session_parameters(struct openssl_session *sess,
- const struct rte_crypto_sym_xform *xform)
+ const struct rte_crypto_sym_xform *xform,
+ uint16_t nb_queue_pairs)
{
const struct rte_crypto_sym_xform *cipher_xform = NULL;
const struct rte_crypto_sym_xform *auth_xform = NULL;
@@ -885,6 +878,12 @@ openssl_set_session_parameters(struct openssl_session *sess,
}
}
+ /*
+ * With only one queue pair, the array of copies is not needed.
+ * Otherwise, one entry per queue pair is required.
+ */
+ sess->ctx_copies_len = nb_queue_pairs > 1 ? nb_queue_pairs : 0;
+
return 0;
}
@@ -892,6 +891,13 @@ openssl_set_session_parameters(struct openssl_session *sess,
void
openssl_reset_session(struct openssl_session *sess)
{
+ for (uint16_t i = 0; i < sess->ctx_copies_len; i++) {
+ if (sess->qp_ctx[i] != NULL) {
+ EVP_CIPHER_CTX_free(sess->qp_ctx[i]);
+ sess->qp_ctx[i] = NULL;
+ }
+ }
+
EVP_CIPHER_CTX_free(sess->cipher.ctx);
if (sess->chain_order == OPENSSL_CHAIN_CIPHER_BPI)
@@ -958,7 +964,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
sess = (struct openssl_session *)_sess->driver_priv_data;
if (unlikely(openssl_set_session_parameters(sess,
- op->sym->xform) != 0)) {
+ op->sym->xform, 1) != 0)) {
rte_mempool_put(qp->sess_mp, _sess);
sess = NULL;
}
@@ -1606,11 +1612,45 @@ process_auth_err:
# endif
/*----------------------------------------------------------------------------*/
+static inline EVP_CIPHER_CTX *
+get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+ /* If the array is not being used, just return the main context. */
+ if (sess->ctx_copies_len == 0)
+ return sess->cipher.ctx;
+
+ EVP_CIPHER_CTX **lctx = &sess->qp_ctx[qp->id];
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30200000L
+ /* EVP_CIPHER_CTX_dup() added in OSSL 3.2 */
+ *lctx = EVP_CIPHER_CTX_dup(sess->cipher.ctx);
+ return *lctx;
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
+ if (sess->chain_order == OPENSSL_CHAIN_COMBINED) {
+ /* AESNI special-cased to use openssl_aesni_ctx_clone()
+ * to allow for working around lack of
+ * EVP_CIPHER_CTX_copy support for 3.0.0 <= OSSL Version
+ * < 3.2.0.
+ */
+ if (openssl_aesni_ctx_clone(lctx, sess) != 0)
+ *lctx = NULL;
+ return *lctx;
+ }
+#endif
+
+ *lctx = EVP_CIPHER_CTX_new();
+ EVP_CIPHER_CTX_copy(*lctx, sess->cipher.ctx);
+ }
+
+ return *lctx;
+}
+
/** Process auth/cipher combined operation */
static void
-process_openssl_combined_op
- (struct rte_crypto_op *op, struct openssl_session *sess,
- struct rte_mbuf *mbuf_src, struct rte_mbuf *mbuf_dst)
+process_openssl_combined_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+ struct openssl_session *sess, struct rte_mbuf *mbuf_src,
+ struct rte_mbuf *mbuf_dst)
{
/* cipher */
uint8_t *dst = NULL, *iv, *tag, *aad;
@@ -1627,11 +1667,7 @@ process_openssl_combined_op
return;
}
- EVP_CIPHER_CTX *ctx;
- if (openssl_aesni_ctx_clone(&ctx, sess) != 0) {
- op->status = RTE_CRYPTO_OP_STATUS_ERROR;
- return;
- }
+ EVP_CIPHER_CTX *ctx = get_local_cipher_ctx(sess, qp);
iv = rte_crypto_op_ctod_offset(op, uint8_t *,
sess->iv.offset);
@@ -1687,8 +1723,6 @@ process_openssl_combined_op
dst, tag, taglen, ctx);
}
- EVP_CIPHER_CTX_free(ctx);
-
if (status != 0) {
if (status == (-EFAULT) &&
sess->auth.operation ==
@@ -1701,14 +1735,13 @@ process_openssl_combined_op
/** Process cipher operation */
static void
-process_openssl_cipher_op
- (struct rte_crypto_op *op, struct openssl_session *sess,
- struct rte_mbuf *mbuf_src, struct rte_mbuf *mbuf_dst)
+process_openssl_cipher_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+ struct openssl_session *sess, struct rte_mbuf *mbuf_src,
+ struct rte_mbuf *mbuf_dst)
{
uint8_t *dst, *iv;
int srclen, status;
uint8_t inplace = (mbuf_src == mbuf_dst) ? 1 : 0;
- EVP_CIPHER_CTX *ctx_copy;
/*
* Segmented OOP destination buffer is not supported for encryption/
@@ -1727,24 +1760,22 @@ process_openssl_cipher_op
iv = rte_crypto_op_ctod_offset(op, uint8_t *,
sess->iv.offset);
- ctx_copy = EVP_CIPHER_CTX_new();
- EVP_CIPHER_CTX_copy(ctx_copy, sess->cipher.ctx);
+
+ EVP_CIPHER_CTX *ctx = get_local_cipher_ctx(sess, qp);
if (sess->cipher.mode == OPENSSL_CIPHER_LIB)
if (sess->cipher.direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
status = process_openssl_cipher_encrypt(mbuf_src, dst,
op->sym->cipher.data.offset, iv,
- srclen, ctx_copy, inplace);
+ srclen, ctx, inplace);
else
status = process_openssl_cipher_decrypt(mbuf_src, dst,
op->sym->cipher.data.offset, iv,
- srclen, ctx_copy, inplace);
+ srclen, ctx, inplace);
else
status = process_openssl_cipher_des3ctr(mbuf_src, dst,
- op->sym->cipher.data.offset, iv, srclen,
- ctx_copy);
+ op->sym->cipher.data.offset, iv, srclen, ctx);
- EVP_CIPHER_CTX_free(ctx_copy);
if (status != 0)
op->status = RTE_CRYPTO_OP_STATUS_ERROR;
}
@@ -2910,13 +2941,13 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
switch (sess->chain_order) {
case OPENSSL_CHAIN_ONLY_CIPHER:
- process_openssl_cipher_op(op, sess, msrc, mdst);
+ process_openssl_cipher_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_ONLY_AUTH:
process_openssl_auth_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_CIPHER_AUTH:
- process_openssl_cipher_op(op, sess, msrc, mdst);
+ process_openssl_cipher_op(qp, op, sess, msrc, mdst);
/* OOP */
if (msrc != mdst)
copy_plaintext(msrc, mdst, op);
@@ -2924,10 +2955,10 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
break;
case OPENSSL_CHAIN_AUTH_CIPHER:
process_openssl_auth_op(qp, op, sess, msrc, mdst);
- process_openssl_cipher_op(op, sess, msrc, mdst);
+ process_openssl_cipher_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_COMBINED:
- process_openssl_combined_op(op, sess, msrc, mdst);
+ process_openssl_combined_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_CIPHER_BPI:
process_openssl_docsis_bpi_op(op, sess, msrc, mdst);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 24d6d48262..a448279029 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -777,9 +777,34 @@ qp_setup_cleanup:
/** Returns the size of the symmetric session structure */
static unsigned
-openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
{
- return sizeof(struct openssl_session);
+ /*
+ * For 0 qps, return the max size of the session - this is necessary if
+ * the user calls into this function to create the session mempool,
+ * without first configuring the number of qps for the cryptodev.
+ */
+ if (dev->data->nb_queue_pairs == 0) {
+ unsigned int max_nb_qps = ((struct openssl_private *)
+ dev->data->dev_private)->max_nb_qpairs;
+ return sizeof(struct openssl_session) +
+ (sizeof(void *) * max_nb_qps);
+ }
+
+ /*
+ * With only one queue pair, the thread safety of multiple context
+ * copies is not necessary, so don't allocate extra memory for the
+ * array.
+ */
+ if (dev->data->nb_queue_pairs == 1)
+ return sizeof(struct openssl_session);
+
+ /*
+ * Otherwise, the size of the flexible array member should be enough to
+ * fit pointers to per-qp contexts.
+ */
+ return sizeof(struct openssl_session) +
+ (sizeof(void *) * dev->data->nb_queue_pairs);
}
/** Returns the size of the asymmetric session structure */
@@ -791,7 +816,7 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
/** Configure the session from a crypto xform chain */
static int
-openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
struct rte_cryptodev_sym_session *sess)
{
@@ -803,7 +828,8 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
return -EINVAL;
}
- ret = openssl_set_session_parameters(sess_private_data, xform);
+ ret = openssl_set_session_parameters(sess_private_data, xform,
+ dev->data->nb_queue_pairs);
if (ret != 0) {
OPENSSL_LOG(ERR, "failed configure session parameters");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.745313284 +0100
+++ 0019-crypto-openssl-make-per-QP-cipher-context-clones.patch 2024-07-15 16:19:34.488204755 +0100
@@ -1 +1 @@
-From b1d71126023521fe740ec473abfe5b295035b859 Mon Sep 17 00:00:00 2001
+From 26e1e90724f9ab34120d25bba9a3cc47c9234540 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b1d71126023521fe740ec473abfe5b295035b859 ]
+
@@ -38,2 +39,0 @@
-Cc: stable@dpdk.org
-
@@ -50 +50 @@
-index 0f038b218c..bad7dcf2f5 100644
+index 4e224b040b..810b539f10 100644
@@ -53 +53 @@
-@@ -166,6 +166,14 @@ struct __rte_cache_aligned openssl_session {
+@@ -165,6 +165,14 @@ struct openssl_session {
@@ -65 +65 @@
- };
+ } __rte_cache_aligned;
@@ -68 +68 @@
-@@ -217,7 +225,8 @@ struct __rte_cache_aligned openssl_asym_session {
+@@ -211,7 +219,8 @@ struct openssl_asym_session {
@@ -79 +79 @@
-index bd09d58d88..df44cc097e 100644
+index bfdcda8841..62a179b6b6 100644
@@ -82 +82 @@
-@@ -467,13 +467,10 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
+@@ -466,13 +466,10 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
@@ -97 +97 @@
-@@ -489,13 +486,8 @@ static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
+@@ -488,13 +485,8 @@ static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
@@ -112 +112 @@
-@@ -824,7 +816,8 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
+@@ -823,7 +815,8 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
@@ -122 +122 @@
-@@ -886,6 +879,12 @@ openssl_set_session_parameters(struct openssl_session *sess,
+@@ -885,6 +878,12 @@ openssl_set_session_parameters(struct openssl_session *sess,
@@ -135 +135 @@
-@@ -893,6 +892,13 @@ openssl_set_session_parameters(struct openssl_session *sess,
+@@ -892,6 +891,13 @@ openssl_set_session_parameters(struct openssl_session *sess,
@@ -149 +149 @@
-@@ -959,7 +965,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
+@@ -958,7 +964,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
@@ -158 +158 @@
-@@ -1607,11 +1613,45 @@ process_auth_err:
+@@ -1606,11 +1612,45 @@ process_auth_err:
@@ -207 +207 @@
-@@ -1628,11 +1668,7 @@ process_openssl_combined_op
+@@ -1627,11 +1667,7 @@ process_openssl_combined_op
@@ -220 +220 @@
-@@ -1688,8 +1724,6 @@ process_openssl_combined_op
+@@ -1687,8 +1723,6 @@ process_openssl_combined_op
@@ -229 +229 @@
-@@ -1702,14 +1736,13 @@ process_openssl_combined_op
+@@ -1701,14 +1735,13 @@ process_openssl_combined_op
@@ -247 +247 @@
-@@ -1728,24 +1761,22 @@ process_openssl_cipher_op
+@@ -1727,24 +1760,22 @@ process_openssl_cipher_op
@@ -277 +277 @@
-@@ -3150,13 +3181,13 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -2910,13 +2941,13 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -293 +293 @@
-@@ -3164,10 +3195,10 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -2924,10 +2955,10 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -307 +307 @@
-index b16baaa08f..4209c6ab6f 100644
+index 24d6d48262..a448279029 100644
@@ -310 +310 @@
-@@ -794,9 +794,34 @@ qp_setup_cleanup:
+@@ -777,9 +777,34 @@ qp_setup_cleanup:
@@ -347 +347 @@
-@@ -808,7 +833,7 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
+@@ -791,7 +816,7 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
@@ -356 +356 @@
-@@ -820,7 +845,8 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
+@@ -803,7 +828,8 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: make per-QP auth context clones' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (17 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP cipher context clones' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: set cipher padding once' " luca.boccassi
` (65 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ccb65683980ca885fa3b85420fee2d2434a96834
Thanks.
Luca Boccassi
---
From ccb65683980ca885fa3b85420fee2d2434a96834 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:50 +0000
Subject: [PATCH] crypto/openssl: make per-QP auth context clones
[ upstream commit 17d5bc6135afdb38ddf02595bfa15aa5142d80b1 ]
Currently EVP auth ctxs (e.g. EVP_MD_CTX, EVP_MAC_CTX) are allocated,
copied to (from openssl_session), and then freed for every auth
operation (ie. per packet). This is very inefficient, and avoidable.
Make each openssl_session hold an array of structures, containing
pointers to per-queue-pair cipher and auth context copies. These are
populated on first use by allocating a new context and copying from the
main context. These copies can then be used in a thread-safe manner by
different worker lcores simultaneously. Consequently the auth context
allocation and copy only has to happen once - the first time a given qp
uses an openssl_session. This brings about a large performance boost.
Throughput performance uplift measurements for HMAC-SHA1 generate on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 0.63 | 1.42 | 123.5% |
| 256 | 2.24 | 4.40 | 96.4% |
| 1024 | 6.15 | 9.26 | 50.6% |
| 2048 | 8.68 | 11.38 | 31.1% |
| 4096 | 10.92 | 12.84 | 17.6% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 0.93 | 11.35 | 1122.5% |
| 256 | 3.70 | 35.30 | 853.7% |
| 1024 | 15.22 | 74.27 | 387.8% |
| 2048 | 30.20 | 91.08 | 201.6% |
| 4096 | 56.92 | 102.76 | 80.5% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/compat.h | 26 +++
drivers/crypto/openssl/openssl_pmd_private.h | 25 ++-
drivers/crypto/openssl/rte_openssl_pmd.c | 190 +++++++++++++++----
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 7 +-
4 files changed, 200 insertions(+), 48 deletions(-)
diff --git a/drivers/crypto/openssl/compat.h b/drivers/crypto/openssl/compat.h
index 9f9167c4f1..e1814fea8c 100644
--- a/drivers/crypto/openssl/compat.h
+++ b/drivers/crypto/openssl/compat.h
@@ -5,6 +5,32 @@
#ifndef __RTA_COMPAT_H__
#define __RTA_COMPAT_H__
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+static __rte_always_inline void
+free_hmac_ctx(EVP_MAC_CTX *ctx)
+{
+ EVP_MAC_CTX_free(ctx);
+}
+
+static __rte_always_inline void
+free_cmac_ctx(EVP_MAC_CTX *ctx)
+{
+ EVP_MAC_CTX_free(ctx);
+}
+#else
+static __rte_always_inline void
+free_hmac_ctx(HMAC_CTX *ctx)
+{
+ HMAC_CTX_free(ctx);
+}
+
+static __rte_always_inline void
+free_cmac_ctx(CMAC_CTX *ctx)
+{
+ CMAC_CTX_free(ctx);
+}
+#endif
+
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
static __rte_always_inline int
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index 810b539f10..d67e39cddb 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -79,6 +79,20 @@ struct openssl_qp {
*/
} __rte_cache_aligned;
+struct evp_ctx_pair {
+ EVP_CIPHER_CTX *cipher;
+ union {
+ EVP_MD_CTX *auth;
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ EVP_MAC_CTX *hmac;
+ EVP_MAC_CTX *cmac;
+#else
+ HMAC_CTX *hmac;
+ CMAC_CTX *cmac;
+#endif
+ };
+};
+
/** OPENSSL crypto private session structure */
struct openssl_session {
enum openssl_chain_order chain_order;
@@ -167,11 +181,12 @@ struct openssl_session {
uint16_t ctx_copies_len;
/* < number of entries in ctx_copies */
- EVP_CIPHER_CTX *qp_ctx[];
- /**< Flexible array member of per-queue-pair pointers to copies of EVP
- * context structure. Cipher contexts are not safe to use from multiple
- * cores simultaneously, so maintaining these copies allows avoiding
- * per-buffer copying into a temporary context.
+ struct evp_ctx_pair qp_ctx[];
+ /**< Flexible array member of per-queue-pair structures, each containing
+ * pointers to copies of the cipher and auth EVP contexts. Cipher
+ * contexts are not safe to use from multiple cores simultaneously, so
+ * maintaining these copies allows avoiding per-buffer copying into a
+ * temporary context.
*/
} __rte_cache_aligned;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 62a179b6b6..72db0fd40f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -891,40 +891,45 @@ openssl_set_session_parameters(struct openssl_session *sess,
void
openssl_reset_session(struct openssl_session *sess)
{
+ /* Free all the qp_ctx entries. */
for (uint16_t i = 0; i < sess->ctx_copies_len; i++) {
- if (sess->qp_ctx[i] != NULL) {
- EVP_CIPHER_CTX_free(sess->qp_ctx[i]);
- sess->qp_ctx[i] = NULL;
+ if (sess->qp_ctx[i].cipher != NULL) {
+ EVP_CIPHER_CTX_free(sess->qp_ctx[i].cipher);
+ sess->qp_ctx[i].cipher = NULL;
+ }
+
+ switch (sess->auth.mode) {
+ case OPENSSL_AUTH_AS_AUTH:
+ EVP_MD_CTX_destroy(sess->qp_ctx[i].auth);
+ sess->qp_ctx[i].auth = NULL;
+ break;
+ case OPENSSL_AUTH_AS_HMAC:
+ free_hmac_ctx(sess->qp_ctx[i].hmac);
+ sess->qp_ctx[i].hmac = NULL;
+ break;
+ case OPENSSL_AUTH_AS_CMAC:
+ free_cmac_ctx(sess->qp_ctx[i].cmac);
+ sess->qp_ctx[i].cmac = NULL;
+ break;
}
}
EVP_CIPHER_CTX_free(sess->cipher.ctx);
+ switch (sess->auth.mode) {
+ case OPENSSL_AUTH_AS_AUTH:
+ EVP_MD_CTX_destroy(sess->auth.auth.ctx);
+ break;
+ case OPENSSL_AUTH_AS_HMAC:
+ free_hmac_ctx(sess->auth.hmac.ctx);
+ break;
+ case OPENSSL_AUTH_AS_CMAC:
+ free_cmac_ctx(sess->auth.cmac.ctx);
+ break;
+ }
+
if (sess->chain_order == OPENSSL_CHAIN_CIPHER_BPI)
EVP_CIPHER_CTX_free(sess->cipher.bpi_ctx);
-
- switch (sess->auth.mode) {
- case OPENSSL_AUTH_AS_AUTH:
- EVP_MD_CTX_destroy(sess->auth.auth.ctx);
- break;
- case OPENSSL_AUTH_AS_HMAC:
- EVP_PKEY_free(sess->auth.hmac.pkey);
-# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- EVP_MAC_CTX_free(sess->auth.hmac.ctx);
-# else
- HMAC_CTX_free(sess->auth.hmac.ctx);
-# endif
- break;
- case OPENSSL_AUTH_AS_CMAC:
-# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- EVP_MAC_CTX_free(sess->auth.cmac.ctx);
-# else
- CMAC_CTX_free(sess->auth.cmac.ctx);
-# endif
- break;
- default:
- break;
- }
}
/** Provide session for operation */
@@ -1470,6 +1475,9 @@ process_openssl_auth_mac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
if (m == 0)
goto process_auth_err;
+ if (EVP_MAC_init(ctx, NULL, 0, NULL) <= 0)
+ goto process_auth_err;
+
src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
l = rte_pktmbuf_data_len(m) - offset;
@@ -1496,11 +1504,9 @@ process_auth_final:
if (EVP_MAC_final(ctx, dst, &dstlen, DIGEST_LENGTH_MAX) != 1)
goto process_auth_err;
- EVP_MAC_CTX_free(ctx);
return 0;
process_auth_err:
- EVP_MAC_CTX_free(ctx);
OPENSSL_LOG(ERR, "Process openssl auth failed");
return -EINVAL;
}
@@ -1619,7 +1625,7 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
if (sess->ctx_copies_len == 0)
return sess->cipher.ctx;
- EVP_CIPHER_CTX **lctx = &sess->qp_ctx[qp->id];
+ EVP_CIPHER_CTX **lctx = &sess->qp_ctx[qp->id].cipher;
if (unlikely(*lctx == NULL)) {
#if OPENSSL_VERSION_NUMBER >= 0x30200000L
@@ -1646,6 +1652,112 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
return *lctx;
}
+static inline EVP_MD_CTX *
+get_local_auth_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+ /* If the array is not being used, just return the main context. */
+ if (sess->ctx_copies_len == 0)
+ return sess->auth.auth.ctx;
+
+ EVP_MD_CTX **lctx = &sess->qp_ctx[qp->id].auth;
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30100000L
+ /* EVP_MD_CTX_dup() added in OSSL 3.1 */
+ *lctx = EVP_MD_CTX_dup(sess->auth.auth.ctx);
+#else
+ *lctx = EVP_MD_CTX_new();
+ EVP_MD_CTX_copy(*lctx, sess->auth.auth.ctx);
+#endif
+ }
+
+ return *lctx;
+}
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+static inline EVP_MAC_CTX *
+#else
+static inline HMAC_CTX *
+#endif
+get_local_hmac_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ /* For OpenSSL versions 3.0.0 <= v < 3.0.3, re-initing of
+ * EVP_MAC_CTXs is broken, and doesn't actually reset their
+ * state. This was fixed in OSSL commit c9ddc5af5199 ("Avoid
+ * undefined behavior of provided macs on EVP_MAC
+ * reinitialization"). In cases where the fix is not present,
+ * fall back to duplicating the context every buffer as a
+ * workaround, at the cost of performance.
+ */
+ RTE_SET_USED(qp);
+ return EVP_MAC_CTX_dup(sess->auth.hmac.ctx);
+#else
+ if (sess->ctx_copies_len == 0)
+ return sess->auth.hmac.ctx;
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ EVP_MAC_CTX **lctx =
+#else
+ HMAC_CTX **lctx =
+#endif
+ &sess->qp_ctx[qp->id].hmac;
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ *lctx = EVP_MAC_CTX_dup(sess->auth.hmac.ctx);
+#else
+ *lctx = HMAC_CTX_new();
+ HMAC_CTX_copy(*lctx, sess->auth.hmac.ctx);
+#endif
+ }
+
+ return *lctx;
+#endif
+}
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+static inline EVP_MAC_CTX *
+#else
+static inline CMAC_CTX *
+#endif
+get_local_cmac_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ /* For OpenSSL versions 3.0.0 <= v < 3.0.3, re-initing of
+ * EVP_MAC_CTXs is broken, and doesn't actually reset their
+ * state. This was fixed in OSSL commit c9ddc5af5199 ("Avoid
+ * undefined behavior of provided macs on EVP_MAC
+ * reinitialization"). In cases where the fix is not present,
+ * fall back to duplicating the context every buffer as a
+ * workaround, at the cost of performance.
+ */
+ RTE_SET_USED(qp);
+ return EVP_MAC_CTX_dup(sess->auth.cmac.ctx);
+#else
+ if (sess->ctx_copies_len == 0)
+ return sess->auth.cmac.ctx;
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ EVP_MAC_CTX **lctx =
+#else
+ CMAC_CTX **lctx =
+#endif
+ &sess->qp_ctx[qp->id].cmac;
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ *lctx = EVP_MAC_CTX_dup(sess->auth.cmac.ctx);
+#else
+ *lctx = CMAC_CTX_new();
+ CMAC_CTX_copy(*lctx, sess->auth.cmac.ctx);
+#endif
+ }
+
+ return *lctx;
+#endif
+}
+
/** Process auth/cipher combined operation */
static void
process_openssl_combined_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -1894,42 +2006,40 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
switch (sess->auth.mode) {
case OPENSSL_AUTH_AS_AUTH:
- ctx_a = EVP_MD_CTX_create();
- EVP_MD_CTX_copy_ex(ctx_a, sess->auth.auth.ctx);
+ ctx_a = get_local_auth_ctx(sess, qp);
status = process_openssl_auth(mbuf_src, dst,
op->sym->auth.data.offset, NULL, NULL, srclen,
ctx_a, sess->auth.auth.evp_algo);
- EVP_MD_CTX_destroy(ctx_a);
break;
case OPENSSL_AUTH_AS_HMAC:
+ ctx_h = get_local_hmac_ctx(sess, qp);
# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- ctx_h = EVP_MAC_CTX_dup(sess->auth.hmac.ctx);
status = process_openssl_auth_mac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_h);
# else
- ctx_h = HMAC_CTX_new();
- HMAC_CTX_copy(ctx_h, sess->auth.hmac.ctx);
status = process_openssl_auth_hmac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_h);
- HMAC_CTX_free(ctx_h);
# endif
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ EVP_MAC_CTX_free(ctx_h);
+#endif
break;
case OPENSSL_AUTH_AS_CMAC:
+ ctx_c = get_local_cmac_ctx(sess, qp);
# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- ctx_c = EVP_MAC_CTX_dup(sess->auth.cmac.ctx);
status = process_openssl_auth_mac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_c);
# else
- ctx_c = CMAC_CTX_new();
- CMAC_CTX_copy(ctx_c, sess->auth.cmac.ctx);
status = process_openssl_auth_cmac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_c);
- CMAC_CTX_free(ctx_c);
# endif
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ EVP_MAC_CTX_free(ctx_c);
+#endif
break;
default:
status = -1;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a448279029..18a8095ba2 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -788,7 +788,7 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
unsigned int max_nb_qps = ((struct openssl_private *)
dev->data->dev_private)->max_nb_qpairs;
return sizeof(struct openssl_session) +
- (sizeof(void *) * max_nb_qps);
+ (sizeof(struct evp_ctx_pair) * max_nb_qps);
}
/*
@@ -801,10 +801,11 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
/*
* Otherwise, the size of the flexible array member should be enough to
- * fit pointers to per-qp contexts.
+ * fit pointers to per-qp contexts. This is twice the number of queue
+ * pairs, to allow for auth and cipher contexts.
*/
return sizeof(struct openssl_session) +
- (sizeof(void *) * dev->data->nb_queue_pairs);
+ (sizeof(struct evp_ctx_pair) * dev->data->nb_queue_pairs);
}
/** Returns the size of the asymmetric session structure */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.790373889 +0100
+++ 0020-crypto-openssl-make-per-QP-auth-context-clones.patch 2024-07-15 16:19:34.492204841 +0100
@@ -1 +1 @@
-From 17d5bc6135afdb38ddf02595bfa15aa5142d80b1 Mon Sep 17 00:00:00 2001
+From ccb65683980ca885fa3b85420fee2d2434a96834 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 17d5bc6135afdb38ddf02595bfa15aa5142d80b1 ]
+
@@ -38,2 +39,0 @@
-Cc: stable@dpdk.org
-
@@ -88 +88 @@
-index bad7dcf2f5..a50e4d4918 100644
+index 810b539f10..d67e39cddb 100644
@@ -91 +91 @@
-@@ -80,6 +80,20 @@ struct __rte_cache_aligned openssl_qp {
+@@ -79,6 +79,20 @@ struct openssl_qp {
@@ -93 +93 @@
- };
+ } __rte_cache_aligned;
@@ -110 +110 @@
- struct __rte_cache_aligned openssl_session {
+ struct openssl_session {
@@ -112 +112 @@
-@@ -168,11 +182,12 @@ struct __rte_cache_aligned openssl_session {
+@@ -167,11 +181,12 @@ struct openssl_session {
@@ -128 +128 @@
- };
+ } __rte_cache_aligned;
@@ -131 +131 @@
-index df44cc097e..7e2e505222 100644
+index 62a179b6b6..72db0fd40f 100644
@@ -134 +134 @@
-@@ -892,40 +892,45 @@ openssl_set_session_parameters(struct openssl_session *sess,
+@@ -891,40 +891,45 @@ openssl_set_session_parameters(struct openssl_session *sess,
@@ -206 +206 @@
-@@ -1471,6 +1476,9 @@ process_openssl_auth_mac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
+@@ -1470,6 +1475,9 @@ process_openssl_auth_mac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
@@ -216 +216 @@
-@@ -1497,11 +1505,9 @@ process_auth_final:
+@@ -1496,11 +1504,9 @@ process_auth_final:
@@ -228 +228 @@
-@@ -1620,7 +1626,7 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+@@ -1619,7 +1625,7 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
@@ -237 +237 @@
-@@ -1647,6 +1653,112 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+@@ -1646,6 +1652,112 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
@@ -350 +350 @@
-@@ -1895,42 +2007,40 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -1894,42 +2006,40 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -403 +403 @@
-index 4209c6ab6f..1bbb855a59 100644
+index a448279029..18a8095ba2 100644
@@ -406 +406 @@
-@@ -805,7 +805,7 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
+@@ -788,7 +788,7 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
@@ -415 +415 @@
-@@ -818,10 +818,11 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
+@@ -801,10 +801,11 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: set cipher padding once' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (18 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP auth " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " luca.boccassi
` (64 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d0aee3876f98d0da3fb7f35eea208fc91c7a5cf2
Thanks.
Luca Boccassi
---
From d0aee3876f98d0da3fb7f35eea208fc91c7a5cf2 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:51 +0000
Subject: [PATCH] crypto/openssl: set cipher padding once
[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]
Setting the cipher padding has a noticeable performance footprint,
and it doesn't need to be done for every call to
process_openssl_cipher_{en,de}crypt(). Setting it causes OpenSSL to set
it on every future context re-init. Thus, for every buffer after the
first one, the padding is being set twice.
Instead, just set the cipher padding once - when configuring the session
parameters - avoiding the unnecessary double setting behaviour. This is
skipped for AEAD ciphers, where disabling padding is not necessary.
Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 2.97 | 3.72 | 25.2% |
| 256 | 8.10 | 9.42 | 16.3% |
| 1024 | 14.22 | 15.18 | 6.8% |
| 2048 | 16.28 | 16.93 | 4.0% |
| 4096 | 17.58 | 17.97 | 2.2% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 21.27 | 29.85 | 40.3% |
| 256 | 60.05 | 75.53 | 25.8% |
| 1024 | 110.11 | 121.56 | 10.4% |
| 2048 | 128.05 | 135.40 | 5.7% |
| 4096 | 139.45 | 143.76 | 3.1% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 72db0fd40f..9fc8194366 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -618,6 +618,8 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
return -ENOTSUP;
}
+ EVP_CIPHER_CTX_set_padding(sess->cipher.ctx, 0);
+
return 0;
}
@@ -1123,8 +1125,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
goto process_cipher_encrypt_err;
- EVP_CIPHER_CTX_set_padding(ctx, 0);
-
if (process_openssl_encryption_update(mbuf_src, offset, &dst,
srclen, ctx, inplace))
goto process_cipher_encrypt_err;
@@ -1173,8 +1173,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
if (EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
goto process_cipher_decrypt_err;
- EVP_CIPHER_CTX_set_padding(ctx, 0);
-
if (process_openssl_decryption_update(mbuf_src, offset, &dst,
srclen, ctx, inplace))
goto process_cipher_decrypt_err;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.836107340 +0100
+++ 0021-crypto-openssl-set-cipher-padding-once.patch 2024-07-15 16:19:34.492204841 +0100
@@ -1 +1 @@
-From d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e Mon Sep 17 00:00:00 2001
+From d0aee3876f98d0da3fb7f35eea208fc91c7a5cf2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]
+
@@ -36,2 +37,0 @@
-Cc: stable@dpdk.org
-
@@ -46 +46 @@
-index 7e2e505222..101111e85b 100644
+index 72db0fd40f..9fc8194366 100644
@@ -49 +49 @@
-@@ -619,6 +619,8 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
+@@ -618,6 +618,8 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -58 +58 @@
-@@ -1124,8 +1126,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1123,8 +1125,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
@@ -67 +67 @@
-@@ -1174,8 +1174,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1173,8 +1173,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (19 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: set cipher padding once' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " luca.boccassi
` (63 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09ca25c2931d2860c9533d298230768dfee2a03a
Thanks.
Luca Boccassi
---
From 09ca25c2931d2860c9533d298230768dfee2a03a Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 3 Jul 2024 15:56:39 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP-SDAP watchdog error
[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]
Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.
Fixes: 3ba2e519eafa ("common/dpaax/caamflib: support PDCP-SDAP")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/sdap.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h
index b38c15a24f..d41bacf8f9 100644
--- a/drivers/common/dpaax/caamflib/desc/sdap.h
+++ b/drivers/common/dpaax/caamflib/desc/sdap.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2020-2022 NXP
+ * Copyright 2020-2023 NXP
*/
#ifndef __DESC_SDAP_H__
@@ -628,6 +628,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
/* Save the ICV generated */
MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
/* The CHA will be reused so we need to clear it */
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
@@ -718,6 +722,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
/* Save the ICV which is stalling in output FIFO to MATH3 */
MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
/* Reset class 1 CHA */
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.880050277 +0100
+++ 0022-common-dpaax-caamflib-fix-PDCP-SDAP-watchdog-error.patch 2024-07-15 16:19:34.496204926 +0100
@@ -1 +1 @@
-From 6671e82e5c6b4858573f4dae665e7f2442913d93 Mon Sep 17 00:00:00 2001
+From 09ca25c2931d2860c9533d298230768dfee2a03a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax/caamflib: fix PDCP AES-AES watchdog error' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (20 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " luca.boccassi
` (62 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Varun Sethi; +Cc: Gagandeep Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6182babbe7ba38a0da6482c5573a69513771faba
Thanks.
Luca Boccassi
---
From 6182babbe7ba38a0da6482c5573a69513771faba Mon Sep 17 00:00:00 2001
From: Varun Sethi <v.sethi@nxp.com>
Date: Wed, 3 Jul 2024 15:56:40 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP AES-AES watchdog error
[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]
Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.
Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Varun Sethi <v.sethi@nxp.com>
---
.mailmap | 1 +
drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/.mailmap b/.mailmap
index 5941400f42..0798312a63 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1418,6 +1418,7 @@ Vadim Suraev <vadim.suraev@gmail.com>
Vakul Garg <vakul.garg@nxp.com>
Vamsi Attunuru <vattunuru@marvell.com>
Vanshika Shukla <vanshika.shukla@nxp.com>
+Varun Sethi <v.sethi@nxp.com>
Vasily Philipov <vasilyf@mellanox.com>
Veerasenareddy Burru <vburru@marvell.com>
Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 289ee2a7d5..070cad0147 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1023,6 +1023,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);
MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
CLRW_CLR_C1CTX |
@@ -1070,6 +1075,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
CLRW_CLR_C1CTX |
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.923678443 +0100
+++ 0023-common-dpaax-caamflib-fix-PDCP-AES-AES-watchdog-erro.patch 2024-07-15 16:19:34.500205011 +0100
@@ -1 +1 @@
-From ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 Mon Sep 17 00:00:00 2001
+From 6182babbe7ba38a0da6482c5573a69513771faba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 502791e0bc..74739ec9be 100644
+index 5941400f42..0798312a63 100644
@@ -23 +24,2 @@
-@@ -1503,6 +1503,7 @@ Vakul Garg <vakul.garg@nxp.com>
+@@ -1418,6 +1418,7 @@ Vadim Suraev <vadim.suraev@gmail.com>
+ Vakul Garg <vakul.garg@nxp.com>
@@ -25 +26,0 @@
- Vamsi Krishna Atluri <vamsi.atluri@amd.com>
@@ -32 +33 @@
-index 7d16c66d79..0ed9eec816 100644
+index 289ee2a7d5..070cad0147 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/dpaa_sec: fix IPsec descriptor' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (21 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'crypto/dpaa2_sec: fix event queue user context' " luca.boccassi
` (61 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ac47aa31a1b2330b2c3dc5de71850826e2cf26fe
Thanks.
Luca Boccassi
---
From ac47aa31a1b2330b2c3dc5de71850826e2cf26fe Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 3 Jul 2024 15:56:41 +0530
Subject: [PATCH] crypto/dpaa_sec: fix IPsec descriptor
[ upstream commit 046341575bd6e1210d6c12b595405ede41150da7 ]
During IPsec operations, driver code pre-check
whether KEYS can be inlined to limited size descriptor
or not and based on that it decides to copy the complete
KEY in descriptor or just give the memory pointer of
KEY in descriptor.
This pre-check code does not take care of padding required
for security engine to make the KEYs inline which results
in incorrect length descriptor for some algorithms.
This patch fixes this issue by updating the pre-check code
with proper padding size included for each supported
algorithm.
Fixes: 453b9593a3cf ("crypto/dpaax_sec: fix inline query for descriptors")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/ipsec.h | 68 ++++++++++++++++++++++
drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +-
2 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h
index 8ec6aac915..26bf52827e 100644
--- a/drivers/common/dpaax/caamflib/desc/ipsec.h
+++ b/drivers/common/dpaax/caamflib/desc/ipsec.h
@@ -726,6 +726,74 @@ static inline void __gen_auth_key(struct program *program,
authdata->key, authdata->key_type);
}
+/**
+ * rta_inline_ipsec_query() - Provide indications on which data items can be inlined
+ * and which shall be referenced in IPsec shared descriptor.
+ * @sd_base_len: Shared descriptor base length - bytes consumed by the commands,
+ * excluding the data items to be inlined (or corresponding
+ * pointer if an item is not inlined). Each cnstr_* function that
+ * generates descriptors should have a define mentioning
+ * corresponding length.
+ * @jd_len: Maximum length of the job descriptor(s) that will be used
+ * together with the shared descriptor.
+ * @data_len: Array of lengths of the data items trying to be inlined
+ * @inl_mask: 32bit mask with bit x = 1 if data item x can be inlined, 0
+ * otherwise.
+ * @count: Number of data items (size of @data_len array); must be <= 32
+ * @auth_algtype: Authentication algorithm type.
+ * @auth_index: Index value of data_len for authentication key length.
+ * -1 if authentication key length is not present in data_len.
+ *
+ * Return: 0 if data can be inlined / referenced, negative value if not. If 0,
+ * check @inl_mask for details.
+ */
+static inline int
+rta_inline_ipsec_query(unsigned int sd_base_len,
+ unsigned int jd_len,
+ unsigned int *data_len,
+ uint32_t *inl_mask,
+ unsigned int count,
+ uint32_t auth_algtype,
+ int32_t auth_index)
+{
+ uint32_t dkp_protid;
+
+ switch (auth_algtype & OP_PCL_IPSEC_AUTH_MASK) {
+ case OP_PCL_IPSEC_HMAC_MD5_96:
+ case OP_PCL_IPSEC_HMAC_MD5_128:
+ dkp_protid = OP_PCLID_DKP_MD5;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA1_96:
+ case OP_PCL_IPSEC_HMAC_SHA1_160:
+ dkp_protid = OP_PCLID_DKP_SHA1;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA2_256_128:
+ dkp_protid = OP_PCLID_DKP_SHA256;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA2_384_192:
+ dkp_protid = OP_PCLID_DKP_SHA384;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA2_512_256:
+ dkp_protid = OP_PCLID_DKP_SHA512;
+ break;
+ default:
+ return rta_inline_query(sd_base_len,
+ jd_len,
+ data_len,
+ inl_mask, count);
+ }
+
+ /* Updating the maximum supported inline key length */
+ if (auth_index != -1) {
+ if (split_key_len(dkp_protid) > data_len[auth_index])
+ data_len[auth_index] = split_key_len(dkp_protid);
+ }
+ return rta_inline_query(sd_base_len,
+ jd_len,
+ data_len,
+ inl_mask, count);
+}
+
/**
* cnstr_shdsc_ipsec_encap - IPSec ESP encapsulation protocol-level shared
* descriptor.
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 7807c83e54..8687e3e75e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -398,10 +398,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
cdb->sh_desc[0] = cipherdata.keylen;
cdb->sh_desc[1] = authdata.keylen;
- err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
+ err = rta_inline_ipsec_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
DESC_JOB_IO_LEN,
(unsigned int *)cdb->sh_desc,
- &cdb->sh_desc[2], 2);
+ &cdb->sh_desc[2], 2, authdata.algtype, 1);
if (err < 0) {
DPAA_SEC_ERR("Crypto: Incorrect key lengths");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.969416915 +0100
+++ 0024-crypto-dpaa_sec-fix-IPsec-descriptor.patch 2024-07-15 16:19:34.508205182 +0100
@@ -1 +1 @@
-From 046341575bd6e1210d6c12b595405ede41150da7 Mon Sep 17 00:00:00 2001
+From ac47aa31a1b2330b2c3dc5de71850826e2cf26fe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 046341575bd6e1210d6c12b595405ede41150da7 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- drivers/common/dpaax/caamflib/desc/ipsec.h | 73 ++++++++++++++++++++++
+ drivers/common/dpaax/caamflib/desc/ipsec.h | 68 ++++++++++++++++++++++
@@ -26 +27 @@
- 2 files changed, 75 insertions(+), 2 deletions(-)
+ 2 files changed, 70 insertions(+), 2 deletions(-)
@@ -29 +30 @@
-index eff26f6f8b..b902873970 100644
+index 8ec6aac915..26bf52827e 100644
@@ -32 +33 @@
-@@ -728,6 +728,79 @@ static inline void __gen_auth_key(struct program *program,
+@@ -726,6 +726,74 @@ static inline void __gen_auth_key(struct program *program,
@@ -86,5 +86,0 @@
-+ case OP_PCL_IPSEC_HMAC_SHA2_224_96:
-+ case OP_PCL_IPSEC_HMAC_SHA2_224_112:
-+ case OP_PCL_IPSEC_HMAC_SHA2_224_224:
-+ dkp_protid = OP_PCLID_DKP_SHA224;
-+ break;
@@ -113 +109 @@
-index 7aa163330a..bf2a11a4d4 100644
+index 7807c83e54..8687e3e75e 100644
@@ -116 +112 @@
-@@ -395,10 +395,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
+@@ -398,10 +398,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/dpaa2_sec: fix event queue user context' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (22 preceding siblings ...)
2024-07-15 15:26 ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " luca.boccassi
` (60 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jun Yang; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6530bf0f6de87a62a8056905dbbafbeb000d9b03
Thanks.
Luca Boccassi
---
From 6530bf0f6de87a62a8056905dbbafbeb000d9b03 Mon Sep 17 00:00:00 2001
From: Jun Yang <jun.yang@nxp.com>
Date: Wed, 3 Jul 2024 15:56:49 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix event queue user context
[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]
Context configured should be aligned with context got in dq process.
Here the rx_vq is just the first element of qp which covers the issue.
Fixes: bffc7d561c81 ("crypto/dpaa2_sec: support event crypto adapter")
Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index cf1339f266..eab7091251 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -4093,7 +4093,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
cfg.dest_cfg.priority = priority;
cfg.options |= DPSECI_QUEUE_OPT_USER_CTX;
- cfg.user_ctx = (size_t)(qp);
+ cfg.user_ctx = (size_t)(&qp->rx_vq);
if (event->sched_type == RTE_SCHED_TYPE_ATOMIC) {
cfg.options |= DPSECI_QUEUE_OPT_ORDER_PRESERVATION;
cfg.order_preservation_en = 1;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.015463587 +0100
+++ 0025-crypto-dpaa2_sec-fix-event-queue-user-context.patch 2024-07-15 16:19:34.512205267 +0100
@@ -1 +1 @@
-From 70d3ba14391a33585a739421c6e7300bb50f53aa Mon Sep 17 00:00:00 2001
+From 6530bf0f6de87a62a8056905dbbafbeb000d9b03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 07369a383f..c1f7181d55 100644
+index cf1339f266..eab7091251 100644
@@ -21 +22 @@
-@@ -4103,7 +4103,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+@@ -4093,7 +4093,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (23 preceding siblings ...)
2024-07-15 15:26 ` patch 'crypto/dpaa2_sec: fix event queue user context' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookahead behavior' " luca.boccassi
` (59 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Shihong Wang; +Cc: Chaoyong He, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e8f3418f6405784a614cb1d527bee20213770082
Thanks.
Luca Boccassi
---
From e8f3418f6405784a614cb1d527bee20213770082 Mon Sep 17 00:00:00 2001
From: Shihong Wang <shihong.wang@corigine.com>
Date: Thu, 14 Mar 2024 10:00:52 +0800
Subject: [PATCH] examples/ipsec-secgw: fix SA salt endianness
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
The SA salt of struct ipsec_sa is a CPU-endian u32 variable, but it’s
value is stored in an array of encryption or authentication keys
according to big-endian. So it maybe need to convert the endianness
order to ensure that the value assigned to the SA salt is CPU-endian.
Fixes: 50d75cae2a2c ("examples/ipsec-secgw: initialize SA salt")
Fixes: 9413c3901f31 ("examples/ipsec-secgw: support additional algorithms")
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
examples/ipsec-secgw/sa.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 45cd29f18b..c7a655003f 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -373,6 +373,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
uint32_t ti; /*token index*/
uint32_t *ri /*rule index*/;
struct ipsec_sa_cnt *sa_cnt;
+ rte_be32_t salt; /*big-endian salt*/
uint32_t cipher_algo_p = 0;
uint32_t auth_algo_p = 0;
uint32_t aead_algo_p = 0;
@@ -507,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
if (algo->algo == RTE_CRYPTO_CIPHER_AES_CTR) {
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&rule->salt,
- &rule->cipher_key[key_len], 4);
+ memcpy(&salt, &rule->cipher_key[key_len], 4);
+ rule->salt = rte_be_to_cpu_32(salt);
}
cipher_algo_p = 1;
@@ -572,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->auth_key_len = key_len;
rule->iv_len = algo->iv_len;
- memcpy(&rule->salt,
- &rule->auth_key[key_len], 4);
+ memcpy(&salt, &rule->auth_key[key_len], 4);
+ rule->salt = rte_be_to_cpu_32(salt);
}
auth_algo_p = 1;
@@ -631,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&rule->salt,
- &rule->cipher_key[key_len], 4);
+ memcpy(&salt, &rule->cipher_key[key_len], 4);
+ rule->salt = rte_be_to_cpu_32(salt);
aead_algo_p = 1;
continue;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.060115685 +0100
+++ 0026-examples-ipsec-secgw-fix-SA-salt-endianness.patch 2024-07-15 16:19:34.512205267 +0100
@@ -1 +1 @@
-From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001
+From e8f3418f6405784a614cb1d527bee20213770082 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index c4bac17cd7..8aa9aca739 100644
+index 45cd29f18b..c7a655003f 100644
@@ -30 +31 @@
-@@ -374,6 +374,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -373,6 +373,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -38 +39 @@
-@@ -508,8 +509,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -507,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -49 +50 @@
-@@ -573,8 +574,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -572,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -60 +61 @@
-@@ -632,8 +633,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -631,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix incorrect lookahead behavior' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (24 preceding siblings ...)
2024-07-15 15:26 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookbehind " luca.boccassi
` (58 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e67654ca812a801dbb5665b36aeeedc1665336ee
Thanks.
Luca Boccassi
---
From e67654ca812a801dbb5665b36aeeedc1665336ee Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:32 +0100
Subject: [PATCH] fbarray: fix incorrect lookahead behavior
[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]
Currently, whenever last bit of current index mask is set
(meaning, there is potentially a run starting at the end of the mask),
lookahead loop is entered.
In that loop, if the first bit of lookahead mask is not set,
the lookahead is stopped, and the current lookahead mask index is
assigned to current index mask.
However, because at that point we are inside a for-loop that increments
current index mask after each iteration, this results in erroneous mask
index increment.
Fix lookahead to avoid erroneous increment,
and add corresponding unit test.
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
.mailmap | 1 +
app/test/test_fbarray.c | 23 +++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 3 ++-
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 0798312a63..95826dac6c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1448,6 +1448,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
Vincent Li <vincent.mc.li@gmail.com>
Vincent S. Cojot <vcojot@redhat.com>
Vinh Tran <vinh.t.tran10@gmail.com>
+Vipin Padmam Ramesh <vipinp@vmware.com>
Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>
Vipul Ashri <vipul.ashri@oracle.com>
Visa Hankala <visa@hankala.org>
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index a691bf4458..fff44816a1 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -103,6 +103,14 @@ static int empty_msk_test_setup(void)
return 0;
}
+static int lookahead_test_setup(void)
+{
+ /* set index 64 as used */
+ param.start = 64;
+ param.end = 64;
+ return init_array();
+}
+
static int test_invalid(void)
{
struct rte_fbarray dummy;
@@ -709,6 +717,20 @@ static int test_empty(void)
return TEST_SUCCESS;
}
+static int test_lookahead(void)
+{
+ int ret;
+
+ /* run regular test first */
+ ret = test_find();
+ if (ret != TEST_SUCCESS)
+ return ret;
+
+ /* test if we can find free chunk while not starting with 0 */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(¶m.arr, 1, param.start),
+ param.start + 1, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
@@ -723,6 +745,7 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
+ TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 169e66e04b..842073ae1c 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -236,7 +236,8 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
* as well, so skip that on next iteration.
*/
ignore_msk = ~((1ULL << need) - 1);
- msk_idx = lookahead_idx;
+ /* outer loop will increment msk_idx so add 1 */
+ msk_idx = lookahead_idx - 1;
break;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.102188106 +0100
+++ 0027-fbarray-fix-incorrect-lookahead-behavior.patch 2024-07-15 16:19:34.520205439 +0100
@@ -1 +1 @@
-From 8c03a149ce957b10d7792a2a78339496dd156e9f Mon Sep 17 00:00:00 2001
+From e67654ca812a801dbb5665b36aeeedc1665336ee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 74739ec9be..085e5f0004 100644
+index 0798312a63..95826dac6c 100644
@@ -34 +35 @@
-@@ -1534,6 +1534,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
+@@ -1448,6 +1448,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
@@ -43 +44 @@
-index 26a51e2a3e..bf89b99e5b 100644
+index a691bf4458..fff44816a1 100644
@@ -91 +92 @@
-index 0fe5bcfe06..2680b34823 100644
+index 169e66e04b..842073ae1c 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix incorrect lookbehind behavior' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (25 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookahead behavior' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix lookahead ignore mask handling' " luca.boccassi
` (57 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8f3876f8666456adebafd3a60b3378a96019ba1b
Thanks.
Luca Boccassi
---
From 8f3876f8666456adebafd3a60b3378a96019ba1b Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:33 +0100
Subject: [PATCH] fbarray: fix incorrect lookbehind behavior
[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]
Currently, whenever first bit of current index mask is set
(meaning, there is potentially a run starting at the start of the mask),
lookbehind loop is entered.
In that loop, if the last bit of lookbehind mask is not set,
the lookbehind is stopped, and the current lookbehind mask index
is assigned to current index mask.
However, because at that point we are inside a while-loop that
decrements current index mask after each iteration,
this results in erroneous mask index decrement.
Fix lookbehind to avoid erroneous decrement, and add corresponding
unit test.
Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 24 ++++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 3 ++-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index fff44816a1..f448d4f196 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -111,6 +111,14 @@ static int lookahead_test_setup(void)
return init_array();
}
+static int lookbehind_test_setup(void)
+{
+ /* set index 63 as used */
+ param.start = 63;
+ param.end = 63;
+ return init_array();
+}
+
static int test_invalid(void)
{
struct rte_fbarray dummy;
@@ -732,6 +740,21 @@ static int test_lookahead(void)
return TEST_SUCCESS;
}
+static int test_lookbehind(void)
+{
+ int ret, free_len = 2;
+
+ /* run regular test first */
+ ret = test_find();
+ if (ret != TEST_SUCCESS)
+ return ret;
+
+ /* test if we can find free chunk while crossing mask boundary */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(¶m.arr, param.start + 1, free_len),
+ param.start - free_len, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
+
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
.setup = autotest_setup,
@@ -746,6 +769,7 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
+ TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 842073ae1c..374103dc15 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -512,7 +512,8 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
* as well, so skip that on next iteration.
*/
ignore_msk = UINT64_MAX << need;
- msk_idx = lookbehind_idx;
+ /* outer loop will decrement msk_idx so add 1 */
+ msk_idx = lookbehind_idx + 1;
break;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.145663955 +0100
+++ 0028-fbarray-fix-incorrect-lookbehind-behavior.patch 2024-07-15 16:19:34.520205439 +0100
@@ -1 +1 @@
-From 8e3712928716a1deb8857c971865aa15dc436b04 Mon Sep 17 00:00:00 2001
+From 8f3876f8666456adebafd3a60b3378a96019ba1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index bf89b99e5b..147d6e2a07 100644
+index fff44816a1..f448d4f196 100644
@@ -79 +80 @@
-index 2680b34823..b4f0b0b0c3 100644
+index 842073ae1c..374103dc15 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix lookahead ignore mask handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (26 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookbehind " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix lookbehind " luca.boccassi
` (56 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2050d2ea0146e2ffd93742eb9105e039e5f6eb1e
Thanks.
Luca Boccassi
---
From 2050d2ea0146e2ffd93742eb9105e039e5f6eb1e Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:34 +0100
Subject: [PATCH] fbarray: fix lookahead ignore mask handling
[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]
When lookahead mask does not have its first bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore `need` number of bits,
which is incorrect because while there is no *current* run
within those bits, we might still be able to start a new run
within those ignored bits later.
This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 28 ++++++++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 13 ++++++++++---
2 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index f448d4f196..38a62cd456 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -755,6 +755,32 @@ static int test_lookbehind(void)
return TEST_SUCCESS;
}
+static int test_lookahead_mask(void)
+{
+ /*
+ * There is a certain type of lookahead behavior we want to test here,
+ * namely masking of bits that were scanned with lookahead but that we
+ * know do not match our criteria. This is achieved in following steps:
+ *
+ * 0. Look for a big enough chunk of free space (say, 62 elements)
+ * 1. Trigger lookahead by breaking a run somewhere inside mask 0
+ * (indices 0-63)
+ * 2. Fail lookahead by breaking the run somewhere inside mask 1
+ * (indices 64-127)
+ * 3. Ensure that we can still find free space in mask 1 afterwards
+ */
+
+ /* break run on first mask */
+ rte_fbarray_set_used(¶m.arr, 61);
+ /* break run on second mask */
+ rte_fbarray_set_used(¶m.arr, 70);
+
+ /* we expect to find free space at 71 */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(¶m.arr, 0, 62),
+ 71, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
+
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
.setup = autotest_setup,
@@ -770,6 +796,8 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+ /* setup for these tests is more complex so do it in test func */
+ TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 374103dc15..1909615187 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -216,6 +216,8 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
for (lookahead_idx = msk_idx + 1; lookahead_idx < msk->n_masks;
lookahead_idx++) {
unsigned int s_idx, need;
+ uint64_t first_bit = 1;
+
lookahead_msk = msk->data[lookahead_idx];
/* if we're looking for free space, invert the mask */
@@ -225,17 +227,22 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
/* figure out how many consecutive bits we need here */
need = RTE_MIN(left, MASK_ALIGN);
- for (s_idx = 0; s_idx < need - 1; s_idx++)
+ /* count number of shifts we performed */
+ for (s_idx = 0; s_idx < need - 1; s_idx++) {
lookahead_msk &= lookahead_msk >> 1ULL;
+ /* did we lose the run yet? */
+ if ((lookahead_msk & first_bit) == 0)
+ break;
+ }
/* if first bit is not set, we've lost the run */
- if ((lookahead_msk & 1) == 0) {
+ if ((lookahead_msk & first_bit) == 0) {
/*
* we've scanned this far, so we know there are
* no runs in the space we've lookahead-scanned
* as well, so skip that on next iteration.
*/
- ignore_msk = ~((1ULL << need) - 1);
+ ignore_msk = ~((1ULL << (s_idx + 1)) - 1);
/* outer loop will increment msk_idx so add 1 */
msk_idx = lookahead_idx - 1;
break;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.189873104 +0100
+++ 0029-fbarray-fix-lookahead-ignore-mask-handling.patch 2024-07-15 16:19:34.524205524 +0100
@@ -1 +1 @@
-From a344719c181aac28cb2ada0d2ddbfee8ad737a1a Mon Sep 17 00:00:00 2001
+From 2050d2ea0146e2ffd93742eb9105e039e5f6eb1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 147d6e2a07..4b17ef6be3 100644
+index f448d4f196..38a62cd456 100644
@@ -75 +76 @@
-index b4f0b0b0c3..195f8394be 100644
+index 374103dc15..1909615187 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix lookbehind ignore mask handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (27 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix lookahead ignore mask handling' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'usertools/devbind: fix indentation' " luca.boccassi
` (55 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/58dd24b4666b3254b8acce9b7ae113d69c38d3a0
Thanks.
Luca Boccassi
---
From 58dd24b4666b3254b8acce9b7ae113d69c38d3a0 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:35 +0100
Subject: [PATCH] fbarray: fix lookbehind ignore mask handling
[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]
When lookahead mask does not have its last bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore first `need` bits,
which is incorrect for two reasons: first, using `need` bits as
ignore bit count means we might miss opportunities to start a new run
within those bits, and more importantly when doing lookbehind,
we start looking from the top, so we should be ignoring *last* N bits,
not *first* N bits of the mask.
This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore from the top
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.
Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 27 +++++++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 9 +++++++--
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 38a62cd456..3be9e19e78 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -781,6 +781,32 @@ static int test_lookahead_mask(void)
return TEST_SUCCESS;
}
+static int test_lookbehind_mask(void)
+{
+ /*
+ * There is a certain type of lookbehind behavior we want to test here,
+ * namely masking of bits that were scanned with lookbehind but that we
+ * know do not match our criteria. This is achieved in two steps:
+ *
+ * 0. Look for a big enough chunk of free space (say, 62 elements)
+ * 1. Trigger lookbehind by breaking a run somewhere inside mask 2
+ * (indices 128-191)
+ * 2. Fail lookbehind by breaking the run somewhere inside mask 1
+ * (indices 64-127)
+ * 3. Ensure that we can still find free space in mask 1 afterwards
+ */
+
+ /* break run on mask 2 */
+ rte_fbarray_set_used(¶m.arr, 130);
+ /* break run on mask 1 */
+ rte_fbarray_set_used(¶m.arr, 70);
+
+ /* start from 190, we expect to find free space at 8 */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(¶m.arr, 190, 62),
+ 8, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
+
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
.setup = autotest_setup,
@@ -798,6 +824,7 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
/* setup for these tests is more complex so do it in test func */
TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
+ TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 1909615187..34f51d8530 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -508,8 +508,13 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
/* figure out how many consecutive bits we need here */
need = RTE_MIN(left, MASK_ALIGN);
- for (s_idx = 0; s_idx < need - 1; s_idx++)
+ /* count number of shifts we performed */
+ for (s_idx = 0; s_idx < need - 1; s_idx++) {
lookbehind_msk &= lookbehind_msk << 1ULL;
+ /* did we lose the run yet? */
+ if ((lookbehind_msk & last_bit) == 0)
+ break;
+ }
/* if last bit is not set, we've lost the run */
if ((lookbehind_msk & last_bit) == 0) {
@@ -518,7 +523,7 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
* no runs in the space we've lookbehind-scanned
* as well, so skip that on next iteration.
*/
- ignore_msk = UINT64_MAX << need;
+ ignore_msk = ~(UINT64_MAX << (MASK_ALIGN - s_idx - 1));
/* outer loop will decrement msk_idx so add 1 */
msk_idx = lookbehind_idx + 1;
break;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.233590416 +0100
+++ 0030-fbarray-fix-lookbehind-ignore-mask-handling.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 0c6e2781578f37d0497c225acf68ce5ffe31bd8e Mon Sep 17 00:00:00 2001
+From 58dd24b4666b3254b8acce9b7ae113d69c38d3a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 4b17ef6be3..13c6691e50 100644
+index 38a62cd456..3be9e19e78 100644
@@ -76 +77 @@
-index 195f8394be..63d8b731f5 100644
+index 1909615187..34f51d8530 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'usertools/devbind: fix indentation' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (28 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix lookbehind " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'eal/linux: lower log level on allocation attempt failure' " luca.boccassi
` (54 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Robin Jarry, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/49fc31bc8b1eee29c396b025088dca7a65cf663a
Thanks.
Luca Boccassi
---
From 49fc31bc8b1eee29c396b025088dca7a65cf663a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 1 Jul 2024 10:45:44 -0700
Subject: [PATCH] usertools/devbind: fix indentation
[ upstream commit 04f14ad7e0a829354b58e0b2efcfd906e51327d9 ]
The python check tool (flake8) is picky about the indentation
of continuation lines, and dpdk-devbind was not following standard.
Error is:
E127 continuation line over-indented for visual indent
Fixes: 2ff801515e49 ("usertools/devbind: update octeontx2 DMA device")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Robin Jarry <rjarry@redhat.com>
---
usertools/dpdk-devbind.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 4d9c1be666..d9aff74873 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -66,14 +66,14 @@ intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e',
'SVendor': None, 'SDevice': None}
cnxk_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f9,a0fa',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
cnxk_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
cn9k_ree = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f4',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
virtio_blk = {'Class': '01', 'Vendor': "1af4", 'Device': '1001,1042',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class]
baseband_devices = [acceleration_class]
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.275415613 +0100
+++ 0031-usertools-devbind-fix-indentation.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 04f14ad7e0a829354b58e0b2efcfd906e51327d9 Mon Sep 17 00:00:00 2001
+From 49fc31bc8b1eee29c396b025088dca7a65cf663a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04f14ad7e0a829354b58e0b2efcfd906e51327d9 ]
+
@@ -17,2 +19,2 @@
- usertools/dpdk-devbind.py | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ usertools/dpdk-devbind.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -21 +23 @@
-index a278f5e7f3..5dc42d8fe2 100755
+index 4d9c1be666..d9aff74873 100755
@@ -24 +26 @@
-@@ -66,17 +66,17 @@ intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e',
+@@ -66,14 +66,14 @@ intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e',
@@ -40,4 +41,0 @@
-
- cnxk_ml = {'Class': '08', 'Vendor': '177d', 'Device': 'a092',
-- 'SVendor': None, 'SDevice': None}
-+ 'SVendor': None, 'SDevice': None}
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'eal/linux: lower log level on allocation attempt failure' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (29 preceding siblings ...)
2024-07-15 15:26 ` patch 'usertools/devbind: fix indentation' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " luca.boccassi
` (53 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: David Marchand; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b929a370ef2064f97a3e37810f2331e552dde220
Thanks.
Luca Boccassi
---
From b929a370ef2064f97a3e37810f2331e552dde220 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 26 Jun 2024 16:51:42 +0200
Subject: [PATCH] eal/linux: lower log level on allocation attempt failure
[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]
On a ARM system with only 2MB hugepages configured, EAL emits an error
log with allocations larger than 512MB.
Example with testpmd:
$ dpdk-testpmd --in-memory --no-pci --log-level=*:debug -- -i
...
EAL: In-memory mode enabled, hugepages of size 33554432 bytes will be
allocated anonymously
EAL: No free 32768 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 65536 bytes will be
allocated anonymously
EAL: No free 64 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 1073741824 bytes will be
allocated anonymously
EAL: No free 1048576 kB hugepages reported on node 0
...
EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824
EAL: Detected memory type: socket_id:0 hugepage_sz:33554432
EAL: Detected memory type: socket_id:0 hugepage_sz:2097152
EAL: Detected memory type: socket_id:0 hugepage_sz:65536
EAL: Creating 2 segment lists: n_segs:32 socket_id:0
hugepage_sz:1073741824
...
EAL: Creating 2 segment lists: n_segs:1024 socket_id:0
hugepage_sz:33554432
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
hugepage_sz:2097152
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
hugepage_sz:65536
...
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: alloc_seg(): mmap() failed: Cannot allocate memory
EAL: Ask a virtual area of 0x40000000 bytes
EAL: Virtual area found at 0x140000000 (size = 0x40000000)
EAL: attempted to allocate 2 segments, but only 0 were allocated
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: eal_memalloc_alloc_seg_bulk(): couldn't find suitable memseg_list
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: Restoring previous memory policy: 4
EAL: request: mp_malloc_sync
EAL: No shared files mode enabled, IPC is disabled
EAL: Heap on socket 0 was expanded by 1064MB
...
The reason is that the memzone allocation (~1GB large) would require
17017 (32kB) segments. However, as displayed in the early logs, a 32kB
memory segment list can only host 8192 segments (controlled by the build
option RTE_MAX_MEMSEG_PER_LIST).
This log message is misleading as there is no issue in the end: the
allocation succeeded with 2MB hugepages.
Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/linux/eal_memalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index 9853ec78a2..b9fc83fe6a 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -1061,7 +1061,7 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz,
/* memalloc is locked, so it's safe to use thread-unsafe version */
ret = rte_memseg_list_walk_thread_unsafe(alloc_seg_walk, &wa);
if (ret == 0) {
- RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
+ RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",
__func__);
ret = -1;
} else if (ret > 0) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.321854357 +0100
+++ 0032-eal-linux-lower-log-level-on-allocation-attempt-fail.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 8f4611d893b4eeffb942fffdadc4cde394e4c309 Mon Sep 17 00:00:00 2001
+From b929a370ef2064f97a3e37810f2331e552dde220 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]
+
@@ -66 +67,0 @@
-Cc: stable@dpdk.org
@@ -75 +76 @@
-index 0cc3295994..e354efc95d 100644
+index 9853ec78a2..b9fc83fe6a 100644
@@ -82,2 +83,2 @@
-- EAL_LOG(ERR, "%s(): couldn't find suitable memseg_list",
-+ EAL_LOG(DEBUG, "%s(): couldn't find suitable memseg_list",
+- RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
++ RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'dma/idxd: fix setup with Ubuntu 24.04' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (30 preceding siblings ...)
2024-07-15 15:26 ` patch 'eal/linux: lower log level on allocation attempt failure' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: fix help string of BPF load command' " luca.boccassi
` (52 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Wenwu Ma; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c74c897cfed45faaec981b9d31ee40b203aad7f4
Thanks.
Luca Boccassi
---
From c74c897cfed45faaec981b9d31ee40b203aad7f4 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Fri, 28 Jun 2024 17:54:00 +0800
Subject: [PATCH] dma/idxd: fix setup with Ubuntu 24.04
[ upstream commit d569af3d4e8ef896591f4e50f7bd1c1274c86e15 ]
In Ubuntu 24.04 and with Linux kernel >= v6.7, DSA's workqueue has a
driver_name file in sysfs.
DPDK needs to write a correct value to this file when configuring a device
instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
configured, this patch fixes the issue.
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7af1e0aceeb3
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index 41b4d13b9c..3f0de59e91 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -98,8 +98,10 @@ def configure_dsa(dsa_id, args):
"priority": 1,
"max_batch_size": 1024,
"size": int(max_work_queues_size / nb_queues)}
- wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
+ if os.path.exists(os.path.join(wq_dir.path, f"driver_name")):
+ wqcfg.update({"driver_name": "user"})
+ wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir.write_values(wqcfg)
# enable device and then queues
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.364946782 +0100
+++ 0033-dma-idxd-fix-setup-with-Ubuntu-24.04.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From d569af3d4e8ef896591f4e50f7bd1c1274c86e15 Mon Sep 17 00:00:00 2001
+From c74c897cfed45faaec981b9d31ee40b203aad7f4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d569af3d4e8ef896591f4e50f7bd1c1274c86e15 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -22 +22 @@
-index c0c833ade9..5c9572b49d 100755
+index 41b4d13b9c..3f0de59e91 100755
@@ -25 +25 @@
-@@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
+@@ -98,8 +98,10 @@ def configure_dsa(dsa_id, args):
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix help string of BPF load command' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (31 preceding siblings ...)
2024-07-15 15:26 ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: fix bus scan for DMA devices' " luca.boccassi
` (51 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e922a98a21a315f0a7eaa08207bcd5c66942defb
Thanks.
Luca Boccassi
---
From e922a98a21a315f0a7eaa08207bcd5c66942defb Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:58:52 +0800
Subject: [PATCH] app/testpmd: fix help string of BPF load command
[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]
Based on the logic of 'bpf_parse_flags()' and the 'bpf-load' section of
'testpmd_funcs.rst' document, the 'B' flag in the help string of
bpf-load command should be '-'.
Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
app/test-pmd/bpf_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 46f6b7d6d2..24d34f983e 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -139,7 +139,7 @@ static cmdline_parse_token_string_t cmd_load_bpf_prm =
cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
.f = cmd_operate_bpf_ld_parsed,
.data = NULL,
- .help_str = "bpf-load rx|tx <port> <queue> <J|M|B> <file_name>",
+ .help_str = "bpf-load rx|tx <port> <queue> <J|M|-> <file_name>",
.tokens = {
(void *)&cmd_load_bpf_start,
(void *)&cmd_load_bpf_dir,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.407658167 +0100
+++ 0034-app-testpmd-fix-help-string-of-BPF-load-command.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 34890bfa6e11bae143064825c22755d842531e40 Mon Sep 17 00:00:00 2001
+From e922a98a21a315f0a7eaa08207bcd5c66942defb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/dpaa: fix bus scan for DMA devices' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (32 preceding siblings ...)
2024-07-15 15:26 ` patch 'app/testpmd: fix help string of BPF load command' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: fix memory leak in bus scan' " luca.boccassi
` (50 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b82122e2ab8e7baf6516e68a917399107d333b48
Thanks.
Luca Boccassi
---
From b82122e2ab8e7baf6516e68a917399107d333b48 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:27 +0530
Subject: [PATCH] bus/dpaa: fix bus scan for DMA devices
[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]
If there is no sec device available, code is not scanning QDMA dev.
This patch fixes this problem by adding a goto statement instead
of return in case no sec device available.
Fixes: 583f3732974f ("dma/dpaa: introduce DPAA DMA driver skeleton")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/bus/dpaa/dpaa_bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index a67f5c9ab5..0823553398 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -220,7 +220,7 @@ dpaa_create_device_list(void)
if (dpaa_sec_available()) {
DPAA_BUS_LOG(INFO, "DPAA SEC devices are not available");
- return 0;
+ goto qdma_dpaa;
}
/* Creating SEC Devices */
@@ -259,6 +259,7 @@ dpaa_create_device_list(void)
rte_dpaa_bus.device_count += i;
+qdma_dpaa:
/* Creating QDMA Device */
for (i = 0; i < RTE_DPAA_QDMA_DEVICES; i++) {
dev = calloc(1, sizeof(struct rte_dpaa_device));
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.449684955 +0100
+++ 0035-bus-dpaa-fix-bus-scan-for-DMA-devices.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From bf62ec7f0c99e861b65f550191b98377ac9dd2f9 Mon Sep 17 00:00:00 2001
+From b82122e2ab8e7baf6516e68a917399107d333b48 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 64b748626b..b8f41ec069 100644
+index a67f5c9ab5..0823553398 100644
@@ -23 +24 @@
-@@ -221,7 +221,7 @@ dpaa_create_device_list(void)
+@@ -220,7 +220,7 @@ dpaa_create_device_list(void)
@@ -32 +33 @@
-@@ -260,6 +260,7 @@ dpaa_create_device_list(void)
+@@ -259,6 +259,7 @@ dpaa_create_device_list(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/dpaa: fix memory leak in bus scan' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (33 preceding siblings ...)
2024-07-15 15:26 ` patch 'bus/dpaa: fix bus scan for DMA devices' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax: fix IOVA table cleanup' " luca.boccassi
` (49 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Apeksha Gupta; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/75332a8da8bfa24d03d24267470feeb38eab0eb8
Thanks.
Luca Boccassi
---
From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:28 +0530
Subject: [PATCH] bus/dpaa: fix memory leak in bus scan
[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
Resource leak:
variable dev is going out of scope leaks the storage.
Coverity issue: 373703
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/bus/dpaa/dpaa_bus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 0823553398..aaf2a5f43e 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -187,6 +187,7 @@ dpaa_create_device_list(void)
if (dev->intr_handle == NULL) {
DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
ret = -ENOMEM;
+ free(dev);
goto cleanup;
}
@@ -238,6 +239,7 @@ dpaa_create_device_list(void)
if (dev->intr_handle == NULL) {
DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
ret = -ENOMEM;
+ free(dev);
goto cleanup;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.502998244 +0100
+++ 0036-bus-dpaa-fix-memory-leak-in-bus-scan.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From de0833ffe31739fd40789b1580025bc849d8871f Mon Sep 17 00:00:00 2001
+From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b8f41ec069..1f6997c77e 100644
+index 0823553398..aaf2a5f43e 100644
@@ -23 +24 @@
-@@ -188,6 +188,7 @@ dpaa_create_device_list(void)
+@@ -187,6 +187,7 @@ dpaa_create_device_list(void)
@@ -31 +32 @@
-@@ -239,6 +240,7 @@ dpaa_create_device_list(void)
+@@ -238,6 +239,7 @@ dpaa_create_device_list(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax: fix IOVA table cleanup' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (34 preceding siblings ...)
2024-07-15 15:26 ` patch 'bus/dpaa: fix memory leak in bus scan' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax: fix node array overrun' " luca.boccassi
` (48 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/041e6663bd8ed4da45cd30e24b96a7494c953c53
Thanks.
Luca Boccassi
---
From 041e6663bd8ed4da45cd30e24b96a7494c953c53 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:29 +0530
Subject: [PATCH] common/dpaax: fix IOVA table cleanup
[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]
Fixes incorrect structure free.
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/common/dpaax/dpaax_iova_table.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 9daac4bc03..d2a78f4c19 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 NXP
+ * Copyright 2018-2023 NXP
*/
#include <rte_memory.h>
@@ -255,10 +255,7 @@ dpaax_iova_table_populate(void)
void
dpaax_iova_table_depopulate(void)
{
- if (dpaax_iova_table_p == NULL)
- return;
-
- rte_free(dpaax_iova_table_p->entries);
+ rte_free(dpaax_iova_table_p);
dpaax_iova_table_p = NULL;
DPAAX_DEBUG("IOVA Table cleaned");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.547200055 +0100
+++ 0037-common-dpaax-fix-IOVA-table-cleanup.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 Mon Sep 17 00:00:00 2001
+From 041e6663bd8ed4da45cd30e24b96a7494c953c53 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax: fix node array overrun' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (35 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax: fix IOVA table cleanup' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: remove redundant file descriptor check' " luca.boccassi
` (47 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Apeksha Gupta; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/55950c7aa54f377fc6de2b3249b323506b96bbda
Thanks.
Luca Boccassi
---
From 55950c7aa54f377fc6de2b3249b323506b96bbda Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:30 +0530
Subject: [PATCH] common/dpaax: fix node array overrun
[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]
Out-of-bounds read, overrunning dynamic array nodes at offset
corresponding to index variable j.
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/common/dpaax/dpaax_iova_table.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index d2a78f4c19..860e702333 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -139,10 +139,12 @@ read_memory_node(unsigned int *count)
}
DPAAX_DEBUG("Device-tree memory node data:");
- do {
+
+ while (j > 0) {
+ --j;
DPAAX_DEBUG(" %08" PRIx64 " %08zu",
nodes[j].addr, nodes[j].len);
- } while (--j);
+ }
cleanup:
close(fd);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.590856580 +0100
+++ 0038-common-dpaax-fix-node-array-overrun.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 Mon Sep 17 00:00:00 2001
+From 55950c7aa54f377fc6de2b3249b323506b96bbda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/dpaa: remove redundant file descriptor check' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (36 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax: fix node array overrun' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/dpaa: forbid MTU configuration for shared interface' " luca.boccassi
` (46 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Rohit Raj; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b7594f8f156098c3e00f7f005f44758f770542f2
Thanks.
Luca Boccassi
---
From b7594f8f156098c3e00f7f005f44758f770542f2 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 10 Jul 2024 14:25:31 +0530
Subject: [PATCH] bus/dpaa: remove redundant file descriptor check
[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]
This patch removes the redundant file descriptor check.
Coverity issue: 425715
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/bus/dpaa/base/qbman/process.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c
index 3504ec97db..3e4622f606 100644
--- a/drivers/bus/dpaa/base/qbman/process.c
+++ b/drivers/bus/dpaa/base/qbman/process.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
*
* Copyright 2011-2016 Freescale Semiconductor Inc.
- * Copyright 2017,2020 NXP
+ * Copyright 2017,2020,2022,2024 NXP
*
*/
#include <assert.h>
@@ -27,15 +27,16 @@ static int check_fd(void)
{
int ret;
- if (fd >= 0)
- return 0;
ret = pthread_mutex_lock(&fd_init_lock);
assert(!ret);
+
/* check again with the lock held */
if (fd < 0)
fd = open(PROCESS_PATH, O_RDWR);
+
ret = pthread_mutex_unlock(&fd_init_lock);
assert(!ret);
+
return (fd >= 0) ? 0 : -ENODEV;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.635580126 +0100
+++ 0039-bus-dpaa-remove-redundant-file-descriptor-check.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From 0ca2093f6b3608467bebe9caf27ce98671fb3381 Mon Sep 17 00:00:00 2001
+From b7594f8f156098c3e00f7f005f44758f770542f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 59e0d641ce..2d805c5bd9 100644
+index 3504ec97db..3e4622f606 100644
@@ -31 +32 @@
-@@ -28,15 +28,16 @@ static int check_fd(void)
+@@ -27,15 +27,16 @@ static int check_fd(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/dpaa: forbid MTU configuration for shared interface' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (37 preceding siblings ...)
2024-07-15 15:26 ` patch 'bus/dpaa: remove redundant file descriptor check' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/mlx5: fix start without duplicate flow patterns' " luca.boccassi
` (45 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Rohit Raj; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c1257d39c700b7bf9fe7c73a23e21adf64193ff7
Thanks.
Luca Boccassi
---
From c1257d39c700b7bf9fe7c73a23e21adf64193ff7 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 10 Jul 2024 14:25:33 +0530
Subject: [PATCH] net/dpaa: forbid MTU configuration for shared interface
[ upstream commit ee0fa7552a0af02e2151414aeec2ce4e12a2e806 ]
Since DPDK was able to configure mtu in VSP/Shared interface mode,
it was causing misconfiguration of the hw which further caused crashes.
This patch allows only kernel to config MTU in such cases.
Fixes: e4abd4ff183c ("net/dpaa: support virtual storage profile")
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 779bdc5860..bcb28f33ee 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -14,6 +14,7 @@
#include <pthread.h>
#include <sys/types.h>
#include <sys/syscall.h>
+#include <sys/ioctl.h>
#include <rte_string_fns.h>
#include <rte_byteorder.h>
@@ -165,9 +166,15 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
uint32_t frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN
+ VLAN_TAG_SIZE;
uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
+ struct fman_if *fif = dev->process_private;
PMD_INIT_FUNC_TRACE();
+ if (fif->is_shared_mac) {
+ DPAA_PMD_ERR("Cannot configure mtu from DPDK in VSP mode.");
+ return -ENOTSUP;
+ }
+
/*
* Refuse mtu that requires the support of scattered packets
* when this feature has not been enabled before.
@@ -206,7 +213,8 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
struct rte_intr_handle *intr_handle;
uint32_t max_rx_pktlen;
int speed, duplex;
- int ret, rx_status;
+ int ret, rx_status, socket_fd;
+ struct ifreq ifr;
PMD_INIT_FUNC_TRACE();
@@ -222,6 +230,26 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
dpaa_intf->name);
return -EHOSTDOWN;
}
+
+ socket_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
+ if (socket_fd == -1) {
+ DPAA_PMD_ERR("Cannot open IF socket");
+ return -errno;
+ }
+
+ strncpy(ifr.ifr_name, dpaa_intf->name, IFNAMSIZ - 1);
+
+ if (ioctl(socket_fd, SIOCGIFMTU, &ifr) < 0) {
+ DPAA_PMD_ERR("Cannot get interface mtu");
+ close(socket_fd);
+ return -errno;
+ }
+
+ close(socket_fd);
+ DPAA_PMD_INFO("Using kernel configured mtu size(%u)",
+ ifr.ifr_mtu);
+
+ eth_conf->rxmode.mtu = ifr.ifr_mtu;
}
/* Rx offloads which are enabled by default */
@@ -249,7 +277,8 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
max_rx_pktlen = DPAA_MAX_RX_PKT_LEN;
}
- fman_if_set_maxfrm(dev->process_private, max_rx_pktlen);
+ if (!fif->is_shared_mac)
+ fman_if_set_maxfrm(dev->process_private, max_rx_pktlen);
if (rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER) {
DPAA_PMD_DEBUG("enabling scatter mode");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.683813201 +0100
+++ 0040-net-dpaa-forbid-MTU-configuration-for-shared-interfa.patch 2024-07-15 16:19:34.536205780 +0100
@@ -1 +1 @@
-From ee0fa7552a0af02e2151414aeec2ce4e12a2e806 Mon Sep 17 00:00:00 2001
+From c1257d39c700b7bf9fe7c73a23e21adf64193ff7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee0fa7552a0af02e2151414aeec2ce4e12a2e806 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 44bac67803..060b8c678f 100644
+index 779bdc5860..bcb28f33ee 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix start without duplicate flow patterns' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (38 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/dpaa: forbid MTU configuration for shared interface' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix finding for unaligned length' " luca.boccassi
` (44 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3a0b6d25c07b19625ef6d6821ff4f1cd34bf81ef
Thanks.
Luca Boccassi
---
From 3a0b6d25c07b19625ef6d6821ff4f1cd34bf81ef Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Thu, 13 Jun 2024 15:45:28 +0300
Subject: [PATCH] net/mlx5: fix start without duplicate flow patterns
[ upstream commit 13b5713a627d313d4717923df4c37158b1cb4019 ]
When devargs "allow_duplicate_pattern=0" is specified, PMD won't
allow duplicated flows to be inserted and return EEXIST as rte_errno.
The queue/RSS split table is shared globally by all representors and
PMD didn't prepend port information into it, so all the following ports
tries to insert the same flows and cause PMD insertion failure.
Using the hash list to manage it can solve the issue.
Fixes: ddb68e47331e ("net/mlx5: add extended metadata mode for HWS")
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 106 +++++++++++++++++--------------
drivers/net/mlx5/mlx5.c | 2 -
drivers/net/mlx5/mlx5.h | 4 +-
drivers/net/mlx5/mlx5_flow.c | 16 ++---
4 files changed, 67 insertions(+), 61 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 8477e83917..bdb2f6fb59 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -455,15 +455,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
* Routine checks the reference counter and does actual
* resources creation/initialization only if counter is zero.
*
- * @param[in] priv
- * Pointer to the private device data structure.
+ * @param[in] eth_dev
+ * Pointer to the device.
*
* @return
* Zero on success, positive error code otherwise.
*/
static int
-mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+mlx5_alloc_shared_dr(struct rte_eth_dev *eth_dev)
{
+ struct mlx5_priv *priv = eth_dev->data->dev_private;
struct mlx5_dev_ctx_shared *sh = priv->sh;
char s[MLX5_NAME_SIZE] __rte_unused;
int err;
@@ -575,6 +576,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
err = errno;
goto error;
}
+
+ if (sh->config.dv_flow_en == 1) {
+ /* Query availability of metadata reg_c's. */
+ if (!priv->sh->metadata_regc_check_flag) {
+ err = mlx5_flow_discover_mreg_c(eth_dev);
+ if (err < 0) {
+ err = -err;
+ goto error;
+ }
+ }
+ if (!mlx5_flow_ext_mreg_supported(eth_dev)) {
+ DRV_LOG(DEBUG,
+ "port %u extensive metadata register is not supported",
+ eth_dev->data->port_id);
+ if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
+ DRV_LOG(ERR, "metadata mode %u is not supported "
+ "(no metadata registers available)",
+ sh->config.dv_xmeta_en);
+ err = ENOTSUP;
+ goto error;
+ }
+ }
+ if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
+ mlx5_flow_ext_mreg_supported(eth_dev) && sh->dv_regc0_mask) {
+ sh->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME,
+ MLX5_FLOW_MREG_HTABLE_SZ,
+ false, true, eth_dev,
+ flow_dv_mreg_create_cb,
+ flow_dv_mreg_match_cb,
+ flow_dv_mreg_remove_cb,
+ flow_dv_mreg_clone_cb,
+ flow_dv_mreg_clone_free_cb);
+ if (!sh->mreg_cp_tbl) {
+ err = ENOMEM;
+ goto error;
+ }
+ }
+ }
#endif
if (!sh->tunnel_hub && sh->config.dv_miss_info)
err = mlx5_alloc_tunnel_hub(sh);
@@ -659,6 +698,10 @@ error:
mlx5_list_destroy(sh->dest_array_list);
sh->dest_array_list = NULL;
}
+ if (sh->mreg_cp_tbl) {
+ mlx5_hlist_destroy(sh->mreg_cp_tbl);
+ sh->mreg_cp_tbl = NULL;
+ }
return err;
}
@@ -751,6 +794,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
mlx5_list_destroy(sh->dest_array_list);
sh->dest_array_list = NULL;
}
+ if (sh->mreg_cp_tbl) {
+ mlx5_hlist_destroy(sh->mreg_cp_tbl);
+ sh->mreg_cp_tbl = NULL;
+ }
}
/**
@@ -1508,13 +1555,6 @@ err_secondary:
}
/* Create context for virtual machine VLAN workaround. */
priv->vmwa_context = mlx5_vlan_vmwa_init(eth_dev, spawn->ifindex);
- if (sh->config.dv_flow_en) {
- err = mlx5_alloc_shared_dr(priv);
- if (err)
- goto error;
- if (mlx5_flex_item_port_init(eth_dev) < 0)
- goto error;
- }
if (mlx5_devx_obj_ops_en(sh)) {
priv->obj_ops = devx_obj_ops;
mlx5_queue_counter_id_prepare(eth_dev);
@@ -1565,6 +1605,13 @@ err_secondary:
goto error;
}
rte_rwlock_init(&priv->ind_tbls_lock);
+ if (sh->config.dv_flow_en) {
+ err = mlx5_alloc_shared_dr(eth_dev);
+ if (err)
+ goto error;
+ if (mlx5_flex_item_port_init(eth_dev) < 0)
+ goto error;
+ }
if (priv->sh->config.dv_flow_en == 2) {
#ifdef HAVE_MLX5_HWS_SUPPORT
if (priv->sh->config.dv_esw_en) {
@@ -1648,43 +1695,6 @@ err_secondary:
err = -err;
goto error;
}
- /* Query availability of metadata reg_c's. */
- if (!priv->sh->metadata_regc_check_flag) {
- err = mlx5_flow_discover_mreg_c(eth_dev);
- if (err < 0) {
- err = -err;
- goto error;
- }
- }
- if (!mlx5_flow_ext_mreg_supported(eth_dev)) {
- DRV_LOG(DEBUG,
- "port %u extensive metadata register is not supported",
- eth_dev->data->port_id);
- if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
- DRV_LOG(ERR, "metadata mode %u is not supported "
- "(no metadata registers available)",
- sh->config.dv_xmeta_en);
- err = ENOTSUP;
- goto error;
- }
- }
- if (sh->config.dv_flow_en &&
- sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
- mlx5_flow_ext_mreg_supported(eth_dev) &&
- priv->sh->dv_regc0_mask) {
- priv->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME,
- MLX5_FLOW_MREG_HTABLE_SZ,
- false, true, eth_dev,
- flow_dv_mreg_create_cb,
- flow_dv_mreg_match_cb,
- flow_dv_mreg_remove_cb,
- flow_dv_mreg_clone_cb,
- flow_dv_mreg_clone_free_cb);
- if (!priv->mreg_cp_tbl) {
- err = ENOMEM;
- goto error;
- }
- }
rte_spinlock_init(&priv->shared_act_sl);
mlx5_flow_counter_mode_config(eth_dev);
mlx5_flow_drop_action_config(eth_dev);
@@ -1703,8 +1713,6 @@ error:
priv->sh->config.dv_esw_en)
flow_hw_destroy_vport_action(eth_dev);
#endif
- if (priv->mreg_cp_tbl)
- mlx5_hlist_destroy(priv->mreg_cp_tbl);
if (priv->sh)
mlx5_os_free_shared_dr(priv);
if (priv->nl_socket_route >= 0)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 96e732950d..d66254740b 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2090,8 +2090,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
mlx5_devx_cmd_destroy(priv->q_counters);
priv->q_counters = NULL;
}
- if (priv->mreg_cp_tbl)
- mlx5_hlist_destroy(priv->mreg_cp_tbl);
mlx5_mprq_free_mp(dev);
mlx5_os_free_shared_dr(priv);
#ifdef HAVE_MLX5_HWS_SUPPORT
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index ca0e9ee647..80dcaf96a3 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1412,6 +1412,8 @@ struct mlx5_dev_ctx_shared {
struct mlx5_hlist *flow_tbls; /* SWS flow table. */
struct mlx5_hlist *groups; /* HWS flow group. */
};
+ struct mlx5_hlist *mreg_cp_tbl;
+ /* Hash table of Rx metadata register copy table. */
struct mlx5_flow_tunnel_hub *tunnel_hub;
/* Direct Rules tables for FDB, NIC TX+RX */
void *dr_drop_action; /* Pointer to DR drop action, any domain. */
@@ -1771,8 +1773,6 @@ struct mlx5_priv {
int nl_socket_rdma; /* Netlink socket (NETLINK_RDMA). */
int nl_socket_route; /* Netlink socket (NETLINK_ROUTE). */
struct mlx5_nl_vlan_vmwa_context *vmwa_context; /* VLAN WA context. */
- struct mlx5_hlist *mreg_cp_tbl;
- /* Hash table of Rx metadata register copy table. */
struct mlx5_mtr_config mtr_config; /* Meter configuration */
uint8_t mtr_sfx_reg; /* Meter prefix-suffix flow match REG_C. */
uint8_t mtr_color_reg; /* Meter color match REG_C. */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 1e8d9ac978..a44ccea436 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4871,8 +4871,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
};
/* Check if already registered. */
- MLX5_ASSERT(priv->mreg_cp_tbl);
- entry = mlx5_hlist_register(priv->mreg_cp_tbl, mark_id, &ctx);
+ MLX5_ASSERT(priv->sh->mreg_cp_tbl);
+ entry = mlx5_hlist_register(priv->sh->mreg_cp_tbl, mark_id, &ctx);
if (!entry)
return NULL;
return container_of(entry, struct mlx5_flow_mreg_copy_resource,
@@ -4911,10 +4911,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
return;
mcp_res = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_MCP],
flow->rix_mreg_copy);
- if (!mcp_res || !priv->mreg_cp_tbl)
+ if (!mcp_res || !priv->sh->mreg_cp_tbl)
return;
MLX5_ASSERT(mcp_res->rix_flow);
- mlx5_hlist_unregister(priv->mreg_cp_tbl, &mcp_res->hlist_ent);
+ mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, &mcp_res->hlist_ent);
flow->rix_mreg_copy = 0;
}
@@ -4936,14 +4936,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
uint32_t mark_id;
/* Check if default flow is registered. */
- if (!priv->mreg_cp_tbl)
+ if (!priv->sh->mreg_cp_tbl)
return;
mark_id = MLX5_DEFAULT_COPY_ID;
ctx.data = &mark_id;
- entry = mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx);
+ entry = mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx);
if (!entry)
return;
- mlx5_hlist_unregister(priv->mreg_cp_tbl, entry);
+ mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, entry);
}
/**
@@ -4981,7 +4981,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
*/
mark_id = MLX5_DEFAULT_COPY_ID;
ctx.data = &mark_id;
- if (mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx))
+ if (mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx))
return 0;
mcp_res = flow_mreg_add_copy_action(dev, mark_id, error);
if (!mcp_res)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.730951647 +0100
+++ 0041-net-mlx5-fix-start-without-duplicate-flow-patterns.patch 2024-07-15 16:19:34.556206207 +0100
@@ -1 +1 @@
-From 13b5713a627d313d4717923df4c37158b1cb4019 Mon Sep 17 00:00:00 2001
+From 3a0b6d25c07b19625ef6d6821ff4f1cd34bf81ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13b5713a627d313d4717923df4c37158b1cb4019 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 1753acd050..50f4810bff 100644
+index 8477e83917..bdb2f6fb59 100644
@@ -31 +32 @@
-@@ -467,15 +467,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
+@@ -455,15 +455,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
@@ -51 +52 @@
-@@ -590,6 +591,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+@@ -575,6 +576,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
@@ -96 +97 @@
-@@ -674,6 +713,10 @@ error:
+@@ -659,6 +698,10 @@ error:
@@ -107 +108 @@
-@@ -771,6 +814,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
+@@ -751,6 +794,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
@@ -118 +119 @@
-@@ -1572,13 +1619,6 @@ err_secondary:
+@@ -1508,13 +1555,6 @@ err_secondary:
@@ -132 +133 @@
-@@ -1629,6 +1669,13 @@ err_secondary:
+@@ -1565,6 +1605,13 @@ err_secondary:
@@ -143,4 +144,4 @@
- if (sh->phdev->config.ipv6_tc_fallback == MLX5_IPV6_TC_UNKNOWN) {
- sh->phdev->config.ipv6_tc_fallback = MLX5_IPV6_TC_OK;
- if (!sh->cdev->config.hca_attr.modify_outer_ipv6_traffic_class ||
-@@ -1715,43 +1762,6 @@ err_secondary:
+ if (priv->sh->config.dv_flow_en == 2) {
+ #ifdef HAVE_MLX5_HWS_SUPPORT
+ if (priv->sh->config.dv_esw_en) {
+@@ -1648,43 +1695,6 @@ err_secondary:
@@ -190 +191 @@
-@@ -1770,8 +1780,6 @@ error:
+@@ -1703,8 +1713,6 @@ error:
@@ -200 +201 @@
-index 997b02c571..e482f7f0e5 100644
+index 96e732950d..d66254740b 100644
@@ -203 +204 @@
-@@ -2394,8 +2394,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -2090,8 +2090,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -213 +214 @@
-index c9a3837bd2..bd149b43e5 100644
+index ca0e9ee647..80dcaf96a3 100644
@@ -216 +217 @@
-@@ -1542,6 +1542,8 @@ struct mlx5_dev_ctx_shared {
+@@ -1412,6 +1412,8 @@ struct mlx5_dev_ctx_shared {
@@ -225 +226 @@
-@@ -1968,8 +1970,6 @@ struct mlx5_priv {
+@@ -1771,8 +1773,6 @@ struct mlx5_priv {
@@ -233 +234 @@
- struct mlx5_legacy_flow_meters flow_meters; /* MTR list. */
+ uint8_t mtr_color_reg; /* Meter color match REG_C. */
@@ -235 +236 @@
-index daf0e41c6f..833db1f320 100644
+index 1e8d9ac978..a44ccea436 100644
@@ -238 +239 @@
-@@ -5201,8 +5201,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
+@@ -4871,8 +4871,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
@@ -249 +250 @@
-@@ -5241,10 +5241,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
+@@ -4911,10 +4911,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
@@ -262 +263 @@
-@@ -5266,14 +5266,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
+@@ -4936,14 +4936,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
@@ -280 +281 @@
-@@ -5311,7 +5311,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
+@@ -4981,7 +4981,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix finding for unaligned length' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (39 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/mlx5: fix start without duplicate flow patterns' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'buildtools: fix build with clang 17 and ASan' " luca.boccassi
` (43 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73a8315608a79ab9b721d5155e407cb4f6a0499a
Thanks.
Luca Boccassi
---
From 73a8315608a79ab9b721d5155e407cb4f6a0499a Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 10 Jul 2024 12:49:26 +0100
Subject: [PATCH] fbarray: fix finding for unaligned length
[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]
When array length is not aligned on a power of 2, we need to mask out the
unaligned bits from the mask whenever we reach the last mask.
However, when both ignore mask (e.g. due to starting at unaligned bit) and
last index ignore mask are specified, we combine them with an OR,
which is incorrect.
Fix it to combine them with AND instead,
and add a unit test covering this case.
The reverse function does not suffer from this issue
because it does not have to deal with array end,
and array beginning is always aligned.
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 123 +++++++++++++++++++++-------
lib/eal/common/eal_common_fbarray.c | 2 +-
2 files changed, 94 insertions(+), 31 deletions(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 3be9e19e78..8a3a3d77ab 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -21,23 +21,41 @@ struct fbarray_testsuite_params {
};
static struct fbarray_testsuite_params param;
+static struct fbarray_testsuite_params unaligned;
#define FBARRAY_TEST_ARR_NAME "fbarray_autotest"
#define FBARRAY_TEST_LEN 256
+#define FBARRAY_UNALIGNED_TEST_ARR_NAME "fbarray_unaligned_autotest"
+#define FBARRAY_UNALIGNED_TEST_LEN 60
#define FBARRAY_TEST_ELT_SZ (sizeof(int))
static int autotest_setup(void)
{
- return rte_fbarray_init(¶m.arr, FBARRAY_TEST_ARR_NAME,
+ int ret;
+
+ ret = rte_fbarray_init(¶m.arr, FBARRAY_TEST_ARR_NAME,
FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+ if (ret) {
+ printf("Failed to initialize test array\n");
+ return -1;
+ }
+ ret = rte_fbarray_init(&unaligned.arr, FBARRAY_UNALIGNED_TEST_ARR_NAME,
+ FBARRAY_UNALIGNED_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+ if (ret) {
+ printf("Failed to initialize unaligned test array\n");
+ rte_fbarray_destroy(¶m.arr);
+ return -1;
+ }
+ return 0;
}
static void autotest_teardown(void)
{
rte_fbarray_destroy(¶m.arr);
+ rte_fbarray_destroy(&unaligned.arr);
}
-static int init_array(void)
+static int init_aligned(void)
{
int i;
for (i = param.start; i <= param.end; i++) {
@@ -47,11 +65,35 @@ static int init_array(void)
return 0;
}
-static void reset_array(void)
+static int init_unaligned(void)
+{
+ int i;
+ for (i = unaligned.start; i <= unaligned.end; i++) {
+ if (rte_fbarray_set_used(&unaligned.arr, i))
+ return -1;
+ }
+ return 0;
+}
+
+static void reset_aligned(void)
{
int i;
for (i = 0; i < FBARRAY_TEST_LEN; i++)
rte_fbarray_set_free(¶m.arr, i);
+ /* reset param as well */
+ param.start = -1;
+ param.end = -1;
+}
+
+static void reset_unaligned(void)
+{
+ int i;
+ for (i = 0; i < FBARRAY_UNALIGNED_TEST_LEN; i++)
+ rte_fbarray_set_free(&unaligned.arr, i);
+ /* reset param as well */
+ unaligned.start = -1;
+ unaligned.end = -1;
+
}
static int first_msk_test_setup(void)
@@ -59,7 +101,7 @@ static int first_msk_test_setup(void)
/* put all within first mask */
param.start = 3;
param.end = 10;
- return init_array();
+ return init_aligned();
}
static int cross_msk_test_setup(void)
@@ -67,7 +109,7 @@ static int cross_msk_test_setup(void)
/* put all within second and third mask */
param.start = 70;
param.end = 160;
- return init_array();
+ return init_aligned();
}
static int multi_msk_test_setup(void)
@@ -75,7 +117,7 @@ static int multi_msk_test_setup(void)
/* put all within first and last mask */
param.start = 3;
param.end = FBARRAY_TEST_LEN - 20;
- return init_array();
+ return init_aligned();
}
static int last_msk_test_setup(void)
@@ -83,7 +125,7 @@ static int last_msk_test_setup(void)
/* put all within last mask */
param.start = FBARRAY_TEST_LEN - 20;
param.end = FBARRAY_TEST_LEN - 1;
- return init_array();
+ return init_aligned();
}
static int full_msk_test_setup(void)
@@ -91,16 +133,7 @@ static int full_msk_test_setup(void)
/* fill entire mask */
param.start = 0;
param.end = FBARRAY_TEST_LEN - 1;
- return init_array();
-}
-
-static int empty_msk_test_setup(void)
-{
- /* do not fill anything in */
- reset_array();
- param.start = -1;
- param.end = -1;
- return 0;
+ return init_aligned();
}
static int lookahead_test_setup(void)
@@ -108,7 +141,7 @@ static int lookahead_test_setup(void)
/* set index 64 as used */
param.start = 64;
param.end = 64;
- return init_array();
+ return init_aligned();
}
static int lookbehind_test_setup(void)
@@ -116,7 +149,15 @@ static int lookbehind_test_setup(void)
/* set index 63 as used */
param.start = 63;
param.end = 63;
- return init_array();
+ return init_aligned();
+}
+
+static int unaligned_test_setup(void)
+{
+ unaligned.start = 0;
+ /* leave one free bit at the end */
+ unaligned.end = FBARRAY_UNALIGNED_TEST_LEN - 2;
+ return init_unaligned();
}
static int test_invalid(void)
@@ -470,7 +511,7 @@ static int test_basic(void)
if (check_free())
return TEST_FAILED;
- reset_array();
+ reset_aligned();
return TEST_SUCCESS;
}
@@ -713,6 +754,26 @@ static int test_find(void)
return TEST_SUCCESS;
}
+static int test_find_unaligned(void)
+{
+ TEST_ASSERT_EQUAL((int)unaligned.arr.count, unaligned.end - unaligned.start + 1,
+ "Wrong element count\n");
+ /* ensure space is free before start */
+ if (ensure_correct(&unaligned.arr, 0, unaligned.start - 1, false))
+ return TEST_FAILED;
+ /* ensure space is occupied where it's supposed to be */
+ if (ensure_correct(&unaligned.arr, unaligned.start, unaligned.end, true))
+ return TEST_FAILED;
+ /* ensure space after end is free as well */
+ if (ensure_correct(&unaligned.arr, unaligned.end + 1, FBARRAY_UNALIGNED_TEST_LEN - 1,
+ false))
+ return TEST_FAILED;
+ /* test if find_biggest API's work correctly */
+ if (test_biggest(&unaligned.arr, unaligned.start, unaligned.end))
+ return TEST_FAILED;
+ return TEST_SUCCESS;
+}
+
static int test_empty(void)
{
TEST_ASSERT_EQUAL((int)param.arr.count, 0, "Wrong element count\n");
@@ -814,17 +875,19 @@ static struct unit_test_suite fbarray_test_suite = {
.unit_test_cases = {
TEST_CASE(test_invalid),
TEST_CASE(test_basic),
- TEST_CASE_ST(first_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(cross_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(multi_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
- TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
- TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+ TEST_CASE_ST(first_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(cross_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(multi_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(last_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(full_msk_test_setup, reset_aligned, test_find),
+ /* empty test does not need setup */
+ TEST_CASE_ST(NULL, reset_aligned, test_empty),
+ TEST_CASE_ST(lookahead_test_setup, reset_aligned, test_lookahead),
+ TEST_CASE_ST(lookbehind_test_setup, reset_aligned, test_lookbehind),
/* setup for these tests is more complex so do it in test func */
- TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
- TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
+ TEST_CASE_ST(NULL, reset_aligned, test_lookahead_mask),
+ TEST_CASE_ST(NULL, reset_aligned, test_lookbehind_mask),
+ TEST_CASE_ST(unaligned_test_setup, reset_unaligned, test_find_unaligned),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 34f51d8530..4b3b3904c7 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -173,7 +173,7 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
/* combine current ignore mask with last index ignore mask */
if (msk_idx == last)
- ignore_msk |= last_msk;
+ ignore_msk &= last_msk;
/* if we have an ignore mask, ignore once */
if (ignore_msk) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.791681237 +0100
+++ 0042-fbarray-fix-finding-for-unaligned-length.patch 2024-07-15 16:19:34.564206378 +0100
@@ -1 +1 @@
-From a744665d2149ba8707621c1214c798f807ec398e Mon Sep 17 00:00:00 2001
+From 73a8315608a79ab9b721d5155e407cb4f6a0499a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 13c6691e50..09f6907fb1 100644
+index 3be9e19e78..8a3a3d77ab 100644
@@ -259 +260 @@
-index 63d8b731f5..22b43073c6 100644
+index 34f51d8530..4b3b3904c7 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'buildtools: fix build with clang 17 and ASan' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (40 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix finding for unaligned length' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix pointer to variable outside scope' " luca.boccassi
` (42 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: David Marchand; +Cc: Ali Alnubani, Song Jiale, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f7dcc5e44f9a545a5e3edfaa15a2e03516dd25f1
Thanks.
Luca Boccassi
---
From f7dcc5e44f9a545a5e3edfaa15a2e03516dd25f1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 11 Jul 2024 11:35:36 +0200
Subject: [PATCH] buildtools: fix build with clang 17 and ASan
[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]
ASan included in clang 17 and later suffixes symbols.
$ nm build/drivers/libtmp_rte_net_null.a | grep this_pmd
0000000000000000 r this_pmd_name3
0000000000000000 n this_pmd_name3.f2cd16678ab09dba8fd23405d8d11fce
This breaks the detection of driver symbols in pmdinfogen which then
creates duplicate symbols "_pmd_info" in many drivers. Such duplicate
symbols trigger a link error.
$ grep -w _pmd_info build/drivers/rte_net_*.pmd.c
build/drivers/rte_net_af_packet.pmd.c:const char _pmd_info[]
__attribute__((used)) =
"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";
build/drivers/rte_net_null.pmd.c:const char _pmd_info[]
__attribute__((used)) =
"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";
A simple reproducer:
$ CC=clang meson setup build -Denable_apps=test-pmd -Ddisable_libs=* \
-Denable_drivers=net/null,net/af_packet -Dtests=false \
-Db_lundef=false -Db_sanitize=address
$ ninja -C build
Before this patch, the pmdinfogen script was relying on a symbol name
starting with this_pmd_name.
On the other hand, what this script needs is symbols whose names are
this_pmd_name ## __COUNTER__, see below an example for PCI driver
symbols (the same applies to other buses).
$ git grep -w RTE_PMD_EXPORT_NAME drivers/bus/pci/bus_pci_driver.h
drivers/bus/pci/bus_pci_driver.h:RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
$ git grep -B1 this_pmd_name lib/eal/
lib/eal/include/rte_dev.h-#define RTE_PMD_EXPORT_NAME(name, idx) \
lib/eal/include/rte_dev.h:static const char
RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \
$ git grep define.RTE_PMD_EXPORT_NAME_ARRAY lib/eal/include/rte_dev.h
lib/eal/include/rte_dev.h:#define
RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[]
Adjust the symbol filter for both ELF and COFF implementations.
Bugzilla ID: 1466
Reported-by: Ali Alnubani <alialnu@nvidia.com>
Reported-by: Song Jiale <songx.jiale@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
buildtools/pmdinfogen.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
index 2a44f17bda..dfb89500c0 100755
--- a/buildtools/pmdinfogen.py
+++ b/buildtools/pmdinfogen.py
@@ -6,6 +6,7 @@
import argparse
import ctypes
import json
+import re
import sys
import tempfile
@@ -66,11 +67,11 @@ class ELFImage:
return [symbol]
return None
- def find_by_prefix(self, prefix):
- prefix = prefix.encode("utf-8") if self._legacy_elftools else prefix
+ def find_by_pattern(self, pattern):
+ pattern = pattern.encode("utf-8") if self._legacy_elftools else pattern
for i in range(self._symtab.num_symbols()):
symbol = self._symtab.get_symbol(i)
- if symbol.name.startswith(prefix):
+ if re.match(pattern, symbol.name):
yield ELFSymbol(self._image, symbol)
@@ -97,9 +98,9 @@ class COFFImage:
def is_big_endian(self):
return False
- def find_by_prefix(self, prefix):
+ def find_by_pattern(self, pattern):
for symbol in self._image.symbols:
- if symbol.name.startswith(prefix):
+ if re.match(pattern, symbol.name):
yield COFFSymbol(self._image, symbol)
def find_by_name(self, name):
@@ -199,7 +200,7 @@ class Driver:
def load_drivers(image):
drivers = []
- for symbol in image.find_by_prefix("this_pmd_name"):
+ for symbol in image.find_by_pattern("^this_pmd_name[0-9]+$"):
drivers.append(Driver.load(image, symbol))
return drivers
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.833194817 +0100
+++ 0043-buildtools-fix-build-with-clang-17-and-ASan.patch 2024-07-15 16:19:34.564206378 +0100
@@ -1 +1 @@
-From e1d8a879abac499a66801bb8238d59ba52f4fc6b Mon Sep 17 00:00:00 2001
+From f7dcc5e44f9a545a5e3edfaa15a2e03516dd25f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]
+
@@ -49 +50,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix pointer to variable outside scope' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (41 preceding siblings ...)
2024-07-15 15:26 ` patch 'buildtools: fix build with clang 17 and ASan' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix memory leak in firmware version check' " luca.boccassi
` (41 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Stefan Wegrzyn; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1
Thanks.
Luca Boccassi
---
From 7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1 Mon Sep 17 00:00:00 2001
From: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Date: Tue, 25 Jun 2024 12:12:10 +0100
Subject: [PATCH] net/ice/base: fix pointer to variable outside scope
[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]
Currently, the 'temp' variable is in smaller scope than 'first_teid_ptr'
which can point to it. This means on new loop iterations the memory
goes out of scope and we can end up with a dangling pointer.
Move 'temp' to outside of the loop to fix it.
Fixes: 254f19c8c061 ("net/ice/base: modify recursive way of adding nodes")
Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index b16b27dcbf..d505c8d16c 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1057,11 +1057,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
u32 *first_teid_ptr = first_node_teid;
u16 new_num_nodes = num_nodes;
enum ice_status status = ICE_SUCCESS;
+ u32 temp;
*num_nodes_added = 0;
while (*num_nodes_added < num_nodes) {
u16 max_child_nodes, num_added = 0;
- u32 temp;
status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent,
layer, new_num_nodes,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.872273522 +0100
+++ 0044-net-ice-base-fix-pointer-to-variable-outside-scope.patch 2024-07-15 16:19:34.572206549 +0100
@@ -1 +1 @@
-From 794adf885cbbc949b4a292ce98bc57d77ea77391 Mon Sep 17 00:00:00 2001
+From 7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d694bfd414..c9d70fb043 100644
+index b16b27dcbf..d505c8d16c 100644
@@ -25 +26 @@
-@@ -1069,11 +1069,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
+@@ -1057,11 +1057,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
@@ -28 +29 @@
- int status = 0;
+ enum ice_status status = ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix memory leak in firmware version check' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (42 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix pointer to variable outside scope' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix sign extension' " luca.boccassi
` (40 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Eric Joyner; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/64f49919dd07cb0b6d70c32703f0afb61de44139
Thanks.
Luca Boccassi
---
From 64f49919dd07cb0b6d70c32703f0afb61de44139 Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner@intel.com>
Date: Tue, 25 Jun 2024 12:12:25 +0100
Subject: [PATCH] net/ice/base: fix memory leak in firmware version check
[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]
If ice_cfg_phy_fec() goes through case ICE_FEC_DIS_AUTO but the
underlying device firmware isn't the correct version, then the memory
used to hold the PHY capabilities output from the firmware isn't freed.
Fix this by making sure the memory is freed by jumping to the label that
frees the memory instead of returning from the version check
immediately.
Fixes: 4b6ede113f55 ("net/ice/base: support auto FEC with FEC disabled")
Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index a327a4b374..ac67411ebd 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3803,8 +3803,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
break;
case ICE_FEC_DIS_AUTO:
/* Set No FEC and auto FEC */
- if (!ice_fw_supports_fec_dis_auto(hw))
- return ICE_ERR_NOT_SUPPORTED;
+ if (!ice_fw_supports_fec_dis_auto(hw)) {
+ status = ICE_ERR_NOT_SUPPORTED;
+ goto out;
+ }
cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS;
/* fall-through */
case ICE_FEC_AUTO:
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.916273769 +0100
+++ 0045-net-ice-base-fix-memory-leak-in-firmware-version-che.patch 2024-07-15 16:19:34.576206634 +0100
@@ -1 +1 @@
-From 6b75956aacc081d56a36ab8f82c530832b288c01 Mon Sep 17 00:00:00 2001
+From 64f49919dd07cb0b6d70c32703f0afb61de44139 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 3d787d2a29..ef6696cddf 100644
+index a327a4b374..ac67411ebd 100644
@@ -28 +29 @@
-@@ -3843,8 +3843,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
+@@ -3803,8 +3803,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix sign extension' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (43 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix memory leak in firmware version check' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix size when allocating children arrays' " luca.boccassi
` (39 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jesse Brandeburg; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7fdbc3da5bd6a7dac5e933fb70f2864ce108331e
Thanks.
Luca Boccassi
---
From 7fdbc3da5bd6a7dac5e933fb70f2864ce108331e Mon Sep 17 00:00:00 2001
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Wed, 26 Jun 2024 12:41:03 +0100
Subject: [PATCH] net/ice/base: fix sign extension
[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
Fix a static analysis warning where if the 16-bit value in mask has the
high-bit set, it will be sign extended by the shift left (which converts
it to a signed integer). Avoid this by casting to a u32 to make sure the
conversion happens before the shift and that it stays unsigned.
Fixes: 9467486f179f ("net/ice/base: enable masking for RSS and FD field vectors")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_flex_pipe.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index b6bc0062a3..e1c5e00c91 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1534,16 +1534,14 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
switch (blk) {
case ICE_BLK_RSS:
offset = GLQF_HMASK(mask_idx);
- val = (idx << GLQF_HMASK_MSK_INDEX_S) &
- GLQF_HMASK_MSK_INDEX_M;
- val |= (mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
+ val = (idx << GLQF_HMASK_MSK_INDEX_S) & GLQF_HMASK_MSK_INDEX_M;
+ val |= ((u32)mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
break;
case ICE_BLK_FD:
offset = GLQF_FDMASK(mask_idx);
val = (idx << GLQF_FDMASK_MSK_INDEX_S) &
GLQF_FDMASK_MSK_INDEX_M;
- val |= (mask << GLQF_FDMASK_MASK_S) &
- GLQF_FDMASK_MASK_M;
+ val |= ((u32)mask << GLQF_FDMASK_MASK_S) & GLQF_FDMASK_MASK_M;
break;
default:
ice_debug(hw, ICE_DBG_PKG, "No profile masks for block %d\n",
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.964447872 +0100
+++ 0046-net-ice-base-fix-sign-extension.patch 2024-07-15 16:19:34.580206719 +0100
@@ -1 +1 @@
-From 4fe3f901f86243bf2dc5925e870030995f229888 Mon Sep 17 00:00:00 2001
+From 7fdbc3da5bd6a7dac5e933fb70f2864ce108331e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e06dbb0885..413b6f8ece 100644
+index b6bc0062a3..e1c5e00c91 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix size when allocating children arrays' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (44 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix sign extension' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix GCS descriptor field offsets' " luca.boccassi
` (38 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jacob Keller; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f3701c8b98920a64c3774b5a250ba48512c1fda8
Thanks.
Luca Boccassi
---
From f3701c8b98920a64c3774b5a250ba48512c1fda8 Mon Sep 17 00:00:00 2001
From: Jacob Keller <jacob.e.keller@intel.com>
Date: Wed, 26 Jun 2024 12:41:08 +0100
Subject: [PATCH] net/ice/base: fix size when allocating children arrays
[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]
The ice_sched_add_root_node() and ice_sched_add_node() functions have
comments to suppress Coverity warnings about a suspicious sizeof used
when allocating the children array of an struct ice_sched_node.
The size is calculated using the size of the scheduler node, which
overallocates the array by a significant amount.
Fix the code to correctly calculate the size by using *root->children
and *node->children respectively.
This saves some memory and allows us to drop the Coverity suppression
comments.
Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_sched.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index d505c8d16c..25bf3fca76 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -28,9 +28,8 @@ ice_sched_add_root_node(struct ice_port_info *pi,
if (!root)
return ICE_ERR_NO_MEMORY;
- /* coverity[suspicious_sizeof] */
root->children = (struct ice_sched_node **)
- ice_calloc(hw, hw->max_children[0], sizeof(*root));
+ ice_calloc(hw, hw->max_children[0], sizeof(*root->children));
if (!root->children) {
ice_free(hw, root);
return ICE_ERR_NO_MEMORY;
@@ -180,9 +179,9 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
if (!node)
return ICE_ERR_NO_MEMORY;
if (hw->max_children[layer]) {
- /* coverity[suspicious_sizeof] */
node->children = (struct ice_sched_node **)
- ice_calloc(hw, hw->max_children[layer], sizeof(*node));
+ ice_calloc(hw, hw->max_children[layer],
+ sizeof(*node->children));
if (!node->children) {
ice_free(hw, node);
return ICE_ERR_NO_MEMORY;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.009241692 +0100
+++ 0047-net-ice-base-fix-size-when-allocating-children-array.patch 2024-07-15 16:19:34.588206890 +0100
@@ -1 +1 @@
-From 3072e5e2da9870d8cb119f15482eae9d9fb51e98 Mon Sep 17 00:00:00 2001
+From f3701c8b98920a64c3774b5a250ba48512c1fda8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index c9d70fb043..74d57329da 100644
+index d505c8d16c..25bf3fca76 100644
@@ -44 +45 @@
-@@ -186,9 +185,9 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
+@@ -180,9 +179,9 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix GCS descriptor field offsets' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (45 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix size when allocating children arrays' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " luca.boccassi
` (37 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Eric Joyner; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/92938d56d0f7ea32972107db372ee83cb3037421
Thanks.
Luca Boccassi
---
From 92938d56d0f7ea32972107db372ee83cb3037421 Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner@intel.com>
Date: Wed, 26 Jun 2024 12:41:09 +0100
Subject: [PATCH] net/ice/base: fix GCS descriptor field offsets
[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]
Update the offsets, and remove the ICE_TX_GCS_DESC_ENA define since a
non-0 value used for the ICE_TX_GCS_DESC_TYPE field will enable GCS
offload; there is no dedicated bit to enable it anymore.
Fixes: c31095a0b20f ("net/ice/base: add GCO defines and GCO flex descriptor")
Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_lan_tx_rx.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index be6d88f0ca..cd12d47d9b 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1074,10 +1074,9 @@ struct ice_tx_ctx_desc {
__le64 qw1;
};
-#define ICE_TX_GSC_DESC_START 0 /* 7 BITS */
-#define ICE_TX_GSC_DESC_OFFSET 7 /* 4 BITS */
-#define ICE_TX_GSC_DESC_TYPE 11 /* 2 BITS */
-#define ICE_TX_GSC_DESC_ENA 13 /* 1 BIT */
+#define ICE_TX_GCS_DESC_START 0 /* 8 BITS */
+#define ICE_TX_GCS_DESC_OFFSET 8 /* 4 BITS */
+#define ICE_TX_GCS_DESC_TYPE 12 /* 3 BITS */
#define ICE_TXD_CTX_QW1_DTYPE_S 0
#define ICE_TXD_CTX_QW1_DTYPE_M (0xFUL << ICE_TXD_CTX_QW1_DTYPE_S)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.064054551 +0100
+++ 0048-net-ice-base-fix-GCS-descriptor-field-offsets.patch 2024-07-15 16:19:34.588206890 +0100
@@ -1 +1 @@
-From 243ec291b1eba3ddf7554c9c80a173e9aee58b68 Mon Sep 17 00:00:00 2001
+From 92938d56d0f7ea32972107db372ee83cb3037421 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index d816df0ff6..39673e36f7 100644
+index be6d88f0ca..cd12d47d9b 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix return type of bitmap hamming weight' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (46 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix GCS descriptor field offsets' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix check for existing switch rule' " luca.boccassi
` (36 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chinh Cao; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e31db1b871f0cc94a1120e560580c562d8089a23
Thanks.
Luca Boccassi
---
From e31db1b871f0cc94a1120e560580c562d8089a23 Mon Sep 17 00:00:00 2001
From: Chinh Cao <chinh.t.cao@intel.com>
Date: Wed, 26 Jun 2024 12:41:11 +0100
Subject: [PATCH] net/ice/base: fix return type of bitmap hamming weight
[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
"count" is the returned value, and in this function, value of "count"
and "bit" are the same, so there is no reason why these values should be
declared as different types, and for returned value data type to be
different.
Fixes: 6d288fa5f72b ("net/ice/base: introduce and use bitmap hamming weight API")
Signed-off-by: Chinh Cao <chinh.t.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_bitops.h | 4 ++--
drivers/net/ice/base/ice_switch.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h
index c4ae2b9c8e..81f9dadc07 100644
--- a/drivers/net/ice/base/ice_bitops.h
+++ b/drivers/net/ice/base/ice_bitops.h
@@ -411,10 +411,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
* Note that this function assumes it is operating on a bitmap declared using
* ice_declare_bitmap.
*/
-static inline int
+static inline u16
ice_bitmap_hweight(ice_bitmap_t *bm, u16 size)
{
- int count = 0;
+ u16 count = 0;
u16 bit = 0;
while (size > (bit = ice_find_next_bit(bm, size, bit))) {
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index a2581f404d..697b45ccf4 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7124,7 +7124,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
ice_xor_bitmap(free_idx, used_idx, possible_idx, ICE_MAX_FV_WORDS);
/* return number of free indexes */
- return (u16)ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
+ return ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
}
/**
@@ -7822,6 +7822,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
enum ice_status status = ICE_SUCCESS;
struct ice_sw_recipe *rm;
u8 i;
+ u16 cnt;
if (!ice_is_prof_rule(rinfo->tun_type) && !lkups_cnt)
return ICE_ERR_PARAM;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.113619586 +0100
+++ 0049-net-ice-base-fix-return-type-of-bitmap-hamming-weigh.patch 2024-07-15 16:19:34.600207147 +0100
@@ -1 +1 @@
-From 509c55f699d1e13f38abaaf85df7bd9b585f5b87 Mon Sep 17 00:00:00 2001
+From e31db1b871f0cc94a1120e560580c562d8089a23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 3b71c1b7f5..5c17bcb674 100644
+index c4ae2b9c8e..81f9dadc07 100644
@@ -26 +27 @@
-@@ -418,10 +418,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
+@@ -411,10 +411,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
@@ -40 +41 @@
-index 711a6cfbbe..fa5bd94c58 100644
+index a2581f404d..697b45ccf4 100644
@@ -43 +44 @@
-@@ -7467,7 +7467,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
+@@ -7124,7 +7124,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
@@ -51,2 +52,3 @@
- static void ice_set_recipe_index(unsigned long idx, u8 *bitmap)
-@@ -8178,6 +8178,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ /**
+@@ -7822,6 +7822,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ enum ice_status status = ICE_SUCCESS;
@@ -55 +56,0 @@
- int status = ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix check for existing switch rule' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (47 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix potential TLV length overflow' " luca.boccassi
` (35 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Mateusz Pacuszka; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/39696cfa70eccbd5a518dad057bbeb120ea4cc52
Thanks.
Luca Boccassi
---
From 39696cfa70eccbd5a518dad057bbeb120ea4cc52 Mon Sep 17 00:00:00 2001
From: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Date: Wed, 26 Jun 2024 12:41:20 +0100
Subject: [PATCH] net/ice/base: fix check for existing switch rule
[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]
In case the rule already exists and another VSI wants to subscribe to
it, a new VSI list is being created and both VSIs are moved to it.
Currently, the check for already existing VSI with the same rule is done
based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change
it to vsi_handle. This is software VSI ID, but it can be applied here,
because vsi_map itself is also based on it.
Additionally change return status in case the VSI already exists in the
VSI map to "Already exists". Such case should be handled by the caller.
Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Signed-off-by: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_switch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 697b45ccf4..073c139c43 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4339,7 +4339,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
u16 vsi_handle_arr[2];
/* A rule already exists with the new VSI being added */
- if (cur_fltr->fwd_id.hw_vsi_id == new_fltr->fwd_id.hw_vsi_id)
+ if (cur_fltr->vsi_handle == new_fltr->vsi_handle)
return ICE_ERR_ALREADY_EXISTS;
vsi_handle_arr[0] = cur_fltr->vsi_handle;
@@ -4387,7 +4387,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
/* A rule already exists with the new VSI being added */
if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
- return ICE_SUCCESS;
+ return ICE_ERR_ALREADY_EXISTS;
/* Update the previously created VSI list set with
* the new VSI ID passed in
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.164552888 +0100
+++ 0050-net-ice-base-fix-check-for-existing-switch-rule.patch 2024-07-15 16:19:34.608207317 +0100
@@ -1 +1 @@
-From 771db7d9466488135a2899f8809d6e61bc685ed5 Mon Sep 17 00:00:00 2001
+From 39696cfa70eccbd5a518dad057bbeb120ea4cc52 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index fa5bd94c58..f8d98d8a9e 100644
+index 697b45ccf4..073c139c43 100644
@@ -30 +31 @@
-@@ -4624,7 +4624,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4339,7 +4339,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -39 +40 @@
-@@ -4672,7 +4672,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4387,7 +4387,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -43 +44 @@
-- return 0;
+- return ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix potential TLV length overflow' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (48 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix check for existing switch rule' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix board type definition' " luca.boccassi
` (34 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Paul Greenwalt; +Cc: Dan Nowlin, Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ecb6c3285e65e5714c2febb650b21f00f8dbc9af
Thanks.
Luca Boccassi
---
From ecb6c3285e65e5714c2febb650b21f00f8dbc9af Mon Sep 17 00:00:00 2001
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Wed, 26 Jun 2024 12:41:33 +0100
Subject: [PATCH] net/ice/base: fix potential TLV length overflow
[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]
It's possible that an NVM with an invalid tlv_len could cause an integer
overflow of next_tlv which can result an infinite loop.
Fix this issue by changing next_tlv from u16 to u32 to prevent overflow.
Also check that tlv_len is valid and less than pfa_len.
Fix an issue with conversion from 'u32' to 'u16', possible loss
of data compile errors by making appropriate casts.
Fixes: 77a649999047 ("net/ice/base: move functions from common to NVM module")
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_nvm.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 6550dda557..bc1a74460c 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -474,7 +474,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
{
enum ice_status status;
u16 pfa_len, pfa_ptr;
- u16 next_tlv;
+ u32 next_tlv;
status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
if (status != ICE_SUCCESS) {
@@ -490,25 +490,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
* of TLVs to find the requested one.
*/
next_tlv = pfa_ptr + 1;
- while (next_tlv < pfa_ptr + pfa_len) {
+ while (next_tlv < ((u32)pfa_ptr + pfa_len)) {
u16 tlv_sub_module_type;
u16 tlv_len;
/* Read TLV type */
- status = ice_read_sr_word(hw, next_tlv, &tlv_sub_module_type);
+ status = ice_read_sr_word(hw, (u16)next_tlv,
+ &tlv_sub_module_type);
if (status != ICE_SUCCESS) {
ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV type.\n");
break;
}
/* Read TLV length */
- status = ice_read_sr_word(hw, next_tlv + 1, &tlv_len);
+ status = ice_read_sr_word(hw, (u16)(next_tlv + 1), &tlv_len);
if (status != ICE_SUCCESS) {
ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV length.\n");
break;
}
+ if (tlv_len > pfa_len) {
+ ice_debug(hw, ICE_DBG_INIT, "Invalid TLV length.\n");
+ return ICE_ERR_INVAL_SIZE;
+ }
if (tlv_sub_module_type == module_type) {
if (tlv_len) {
- *module_tlv = next_tlv;
+ *module_tlv = (u16)next_tlv;
*module_tlv_len = tlv_len;
return ICE_SUCCESS;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.212962316 +0100
+++ 0051-net-ice-base-fix-potential-TLV-length-overflow.patch 2024-07-15 16:19:34.612207403 +0100
@@ -1 +1 @@
-From 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 Mon Sep 17 00:00:00 2001
+From ecb6c3285e65e5714c2febb650b21f00f8dbc9af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 79b66fa70f..811bbc9bbc 100644
+index 6550dda557..bc1a74460c 100644
@@ -30,2 +31 @@
-@@ -472,7 +472,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
- u16 module_type)
+@@ -474,7 +474,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -32,0 +33 @@
+ enum ice_status status;
@@ -36 +36,0 @@
- int status;
@@ -39 +39,2 @@
-@@ -489,25 +489,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+ if (status != ICE_SUCCESS) {
+@@ -490,25 +490,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -52 +53 @@
- if (status) {
+ if (status != ICE_SUCCESS) {
@@ -59 +60 @@
- if (status) {
+ if (status != ICE_SUCCESS) {
@@ -72 +73 @@
- return 0;
+ return ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix board type definition' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (49 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix potential TLV length overflow' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix preparing PHY for timesync command' " luca.boccassi
` (33 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Waldemar Dworakowski; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8719d11e4bc983a71b4a9dd89681faaa9dff493d
Thanks.
Luca Boccassi
---
From 8719d11e4bc983a71b4a9dd89681faaa9dff493d Mon Sep 17 00:00:00 2001
From: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Date: Wed, 26 Jun 2024 12:41:38 +0100
Subject: [PATCH] net/ice/base: fix board type definition
[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]
The new version is compliant with implementation and documentation.
Fixes: f4f79aa849b5 ("net/ice/base: add AQC get link topology handle support")
Signed-off-by: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 93a3a6007f..534649802f 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1702,8 +1702,8 @@ struct ice_aqc_link_topo_addr {
#define ICE_AQC_LINK_TOPO_HANDLE_M (0x3FF << ICE_AQC_LINK_TOPO_HANDLE_S)
/* Used to decode the handle field */
#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_M BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ 0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM 0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ BIT(9)
#define ICE_AQC_LINK_TOPO_HANDLE_NODE_S 0
/* In case of a Mezzanine type */
#define ICE_AQC_LINK_TOPO_HANDLE_MEZZ_NODE_M \
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.254153299 +0100
+++ 0052-net-ice-base-fix-board-type-definition.patch 2024-07-15 16:19:34.612207403 +0100
@@ -1 +1 @@
-From ee7419d85e4c55559002fdb57ec6dc4959155b2f Mon Sep 17 00:00:00 2001
+From 8719d11e4bc983a71b4a9dd89681faaa9dff493d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c431b82784..d90a5b0d34 100644
+index 93a3a6007f..534649802f 100644
@@ -22 +23 @@
-@@ -1746,8 +1746,8 @@ struct ice_aqc_link_topo_addr {
+@@ -1702,8 +1702,8 @@ struct ice_aqc_link_topo_addr {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix preparing PHY for timesync command' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (50 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix board type definition' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix masking when reading context' " luca.boccassi
` (32 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Tomasz Wakula; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/44cb540275af7023dc6f3f6c24c009ad8af5d429
Thanks.
Luca Boccassi
---
From 44cb540275af7023dc6f3f6c24c009ad8af5d429 Mon Sep 17 00:00:00 2001
From: Tomasz Wakula <tomaszx.wakula@intel.com>
Date: Wed, 26 Jun 2024 12:41:46 +0100
Subject: [PATCH] net/ice/base: fix preparing PHY for timesync command
[ upstream commit df44ba7a3c8e0dfa409b085d153f5473e60c9908 ]
When preparing a port for timesync command SW should provide Rx type,
which indicates the type for the Rx metadata in the ONPI interface.
According to the documentation, Rx type should always equal 0x18.
Fixes: 97f4f78bbd9f ("net/ice/base: add functions for device clock control")
Signed-off-by: Tomasz Wakula <tomaszx.wakula@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_ptp_hw.c | 4 ++--
drivers/net/ice/base/ice_ptp_hw.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c
index a0b8af1b94..0f02d2fcbe 100644
--- a/drivers/net/ice/base/ice_ptp_hw.c
+++ b/drivers/net/ice/base/ice_ptp_hw.c
@@ -2839,8 +2839,8 @@ ice_ptp_one_port_cmd_e822(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd,
val &= ~TS_CMD_MASK;
val |= cmd_val;
- status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val,
- lock_sbq);
+ status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD,
+ val | TS_CMD_RX_TYPE, lock_sbq);
if (status) {
ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, status %d\n",
status);
diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_ptp_hw.h
index 09c236e7e0..c2a3e53103 100644
--- a/drivers/net/ice/base/ice_ptp_hw.h
+++ b/drivers/net/ice/base/ice_ptp_hw.h
@@ -295,6 +295,9 @@ enum ice_status ice_ptp_init_phy_cfg(struct ice_hw *hw);
#define TS_CMD_MASK_E810 0xFF
#define TS_CMD_MASK 0xF
#define SYNC_EXEC_CMD 0x3
+#define TS_CMD_RX_TYPE_S 0x4
+#define TS_CMD_RX_TYPE MAKEMASK(0x18, TS_CMD_RX_TYPE_S)
+
/* Macros to derive port low and high addresses on both quads */
#define P_Q0_L(a, p) ((((a) + (0x2000 * (p)))) & 0xFFFF)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.304930915 +0100
+++ 0053-net-ice-base-fix-preparing-PHY-for-timesync-command.patch 2024-07-15 16:19:34.620207573 +0100
@@ -1 +1 @@
-From df44ba7a3c8e0dfa409b085d153f5473e60c9908 Mon Sep 17 00:00:00 2001
+From 44cb540275af7023dc6f3f6c24c009ad8af5d429 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df44ba7a3c8e0dfa409b085d153f5473e60c9908 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 8ea4e77266..0c8c339022 100644
+index a0b8af1b94..0f02d2fcbe 100644
@@ -25,2 +26,3 @@
-@@ -3164,8 +3164,8 @@ ice_ptp_write_port_cmd_e822(struct ice_hw *hw, u8 port,
- }
+@@ -2839,8 +2839,8 @@ ice_ptp_one_port_cmd_e822(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd,
+ val &= ~TS_CMD_MASK;
+ val |= cmd_val;
@@ -28,8 +30,7 @@
- /* Rx case */
-- err = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val,
-- lock_sbq);
-+ err = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD,
-+ val | TS_CMD_RX_TYPE, lock_sbq);
- if (err) {
- ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, err %d\n",
- err);
+- status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val,
+- lock_sbq);
++ status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD,
++ val | TS_CMD_RX_TYPE, lock_sbq);
+ if (status) {
+ ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, status %d\n",
+ status);
@@ -37 +38 @@
-index 4c63bba722..ff7719f16a 100644
+index 09c236e7e0..c2a3e53103 100644
@@ -40 +41 @@
-@@ -324,6 +324,9 @@ int ice_ptp_init_phy_cfg(struct ice_hw *hw);
+@@ -295,6 +295,9 @@ enum ice_status ice_ptp_init_phy_cfg(struct ice_hw *hw);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix masking when reading context' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (51 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix preparing PHY for timesync command' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/idpf: fix flex descriptor mask' " luca.boccassi
` (31 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Yahui Cao; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e804d4471528425931bd578192ab115780a3ecd6
Thanks.
Luca Boccassi
---
From e804d4471528425931bd578192ab115780a3ecd6 Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Wed, 26 Jun 2024 12:42:14 +0100
Subject: [PATCH] net/ice/base: fix masking when reading context
[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]
No need to invert mask since we only reserve the masked bits instead of
clear them.
Fixes: a03c714bfe0b ("net/ice/base: add two helper functions")
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index ac67411ebd..92a520daf2 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -4819,7 +4819,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
- dest_byte &= ~(mask);
+ dest_byte &= mask;
dest_byte >>= shift_width;
@@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_word &= ~(CPU_TO_LE16(mask));
+ src_word &= CPU_TO_LE16(mask);
/* get the data back into host order before shifting */
dest_word = LE16_TO_CPU(src_word);
@@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_dword &= ~(CPU_TO_LE32(mask));
+ src_dword &= CPU_TO_LE32(mask);
/* get the data back into host order before shifting */
dest_dword = LE32_TO_CPU(src_dword);
@@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_qword &= ~(CPU_TO_LE64(mask));
+ src_qword &= CPU_TO_LE64(mask);
/* get the data back into host order before shifting */
dest_qword = LE64_TO_CPU(src_qword);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.350738786 +0100
+++ 0054-net-ice-base-fix-masking-when-reading-context.patch 2024-07-15 16:19:34.624207659 +0100
@@ -1 +1 @@
-From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001
+From e804d4471528425931bd578192ab115780a3ecd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c14f66d55b..9a9c8f86e5 100644
+index ac67411ebd..92a520daf2 100644
@@ -23 +24 @@
-@@ -5014,7 +5014,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4819,7 +4819,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -25 +26 @@
- ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA);
+ ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
@@ -32 +33 @@
-@@ -5054,7 +5054,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -41 +42 @@
-@@ -5105,7 +5105,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -50 +51 @@
-@@ -5156,7 +5156,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/idpf: fix flex descriptor mask' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (52 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix masking when reading context' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice: fix sizing of filter hash table' " luca.boccassi
` (30 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Soumyadeep Hore; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d0f2f65e1f151fd8191d6d16c1ec3fe8c3524e4e
Thanks.
Luca Boccassi
---
From d0f2f65e1f151fd8191d6d16c1ec3fe8c3524e4e Mon Sep 17 00:00:00 2001
From: Soumyadeep Hore <soumyadeep.hore@intel.com>
Date: Mon, 24 Jun 2024 09:16:32 +0000
Subject: [PATCH] common/idpf: fix flex descriptor mask
[ upstream commit 757addd900598d5a42bfaad9992a305907022680 ]
Mask for VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M was defined wrongly
and this patch fixes it.
Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/common/idpf/base/virtchnl2_lan_desc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/idpf/base/virtchnl2_lan_desc.h b/drivers/common/idpf/base/virtchnl2_lan_desc.h
index b8cb22e474..14b897b777 100644
--- a/drivers/common/idpf/base/virtchnl2_lan_desc.h
+++ b/drivers/common/idpf/base/virtchnl2_lan_desc.h
@@ -110,7 +110,7 @@
BIT_ULL(VIRTCHNL2_RX_FLEX_DESC_ADV_SPH_S)
#define VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S 12
#define VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M \
- MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M)
+ MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S)
#define VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_S 15
#define VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_M \
BIT_ULL(VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_S)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.396574593 +0100
+++ 0055-common-idpf-fix-flex-descriptor-mask.patch 2024-07-15 16:19:34.624207659 +0100
@@ -1 +1 @@
-From 757addd900598d5a42bfaad9992a305907022680 Mon Sep 17 00:00:00 2001
+From d0f2f65e1f151fd8191d6d16c1ec3fe8c3524e4e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 757addd900598d5a42bfaad9992a305907022680 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f632271788..9e04cf8628 100644
+index b8cb22e474..14b897b777 100644
@@ -22 +23 @@
-@@ -111,7 +111,7 @@
+@@ -110,7 +110,7 @@
@@ -26,2 +27,2 @@
-- IDPF_M(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M)
-+ IDPF_M(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S)
+- MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M)
++ MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice: fix sizing of filter hash table' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (53 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/idpf: fix flex descriptor mask' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: handle IEEE1588 init failure' " luca.boccassi
` (29 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Bruce Richardson; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4999f309fb5e219d331854190882883828968924
Thanks.
Luca Boccassi
---
From 4999f309fb5e219d331854190882883828968924 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 11 Jul 2024 17:57:28 +0100
Subject: [PATCH] net/ice: fix sizing of filter hash table
[ upstream commit 15800bfdac939e2056c76e7c634825bb682e334c ]
The hash table used for managing the filter rules in the ice driver was
dimensioned to a hard-coded 16k, which is insufficient for holding all
the filters supported by E830 HW.
Rather than using a hard-coded value which may need updates for new
hardware support, we can query the NIC max filter support from hardware
and scale the hash table size based on that value.
Fixes: 1a2fc1799f09 ("net/ice: reject duplicated flow for flow director")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/ice/ice_ethdev.h | 2 --
drivers/net/ice/ice_fdir_filter.c | 9 +++++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index bfc9140dba..9799cad394 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -351,8 +351,6 @@ struct ice_fdir_filter_conf {
u8 pkt_len;
};
-#define ICE_MAX_FDIR_FILTER_NUM (1024 * 16)
-
struct ice_fdir_fltr_pattern {
enum ice_fltr_ptype flow_type;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 81e88c1dd8..7e97547d8b 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -377,12 +377,17 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
{
struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
struct ice_fdir_info *fdir_info = &pf->fdir;
+ struct ice_hw *hw = &pf->adapter->hw;
char fdir_hash_name[RTE_HASH_NAMESIZE];
+ const uint32_t max_fd_filter_entries =
+ hw->func_caps.fd_fltr_guar + hw->func_caps.fd_fltr_best_effort;
+ /* dimension hash table as max filters + 12.5% to ensure a little headroom */
+ const uint32_t hash_table_entries = max_fd_filter_entries + (max_fd_filter_entries >> 3);
int ret;
struct rte_hash_parameters fdir_hash_params = {
.name = fdir_hash_name,
- .entries = ICE_MAX_FDIR_FILTER_NUM,
+ .entries = hash_table_entries,
.key_len = sizeof(struct ice_fdir_fltr_pattern),
.hash_func = rte_hash_crc,
.hash_func_init_val = 0,
@@ -400,7 +405,7 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
}
fdir_info->hash_map = rte_zmalloc("ice_fdir_hash_map",
sizeof(*fdir_info->hash_map) *
- ICE_MAX_FDIR_FILTER_NUM,
+ hash_table_entries,
0);
if (!fdir_info->hash_map) {
PMD_INIT_LOG(ERR,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.437382729 +0100
+++ 0056-net-ice-fix-sizing-of-filter-hash-table.patch 2024-07-15 16:19:34.628207744 +0100
@@ -1 +1 @@
-From 15800bfdac939e2056c76e7c634825bb682e334c Mon Sep 17 00:00:00 2001
+From 4999f309fb5e219d331854190882883828968924 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 15800bfdac939e2056c76e7c634825bb682e334c ]
+
@@ -24 +26 @@
-index d73faaed49..3ea9f37dc8 100644
+index bfc9140dba..9799cad394 100644
@@ -37 +39 @@
-index 0b7920ad44..edd8cc8f1a 100644
+index 81e88c1dd8..7e97547d8b 100644
@@ -40 +42 @@
-@@ -375,12 +375,17 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
+@@ -377,12 +377,17 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
@@ -59 +61 @@
-@@ -398,7 +403,7 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
+@@ -400,7 +405,7 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: handle IEEE1588 init failure' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (54 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice: fix sizing of filter hash table' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'doc: remove empty section from testpmd guide' " luca.boccassi
` (28 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Aman Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/23e7802fa97b96123910544915d1ef8ef6b7135b
Thanks.
Luca Boccassi
---
From 23e7802fa97b96123910544915d1ef8ef6b7135b Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Sat, 30 Mar 2024 15:44:09 +0800
Subject: [PATCH] app/testpmd: handle IEEE1588 init failure
[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]
When the port's timestamping function failed to initialize
(for example, the device does not support PTP), the packets
received by the hardware do not contain the timestamp.
In this case, IEEE1588 packet forwarding should not start.
This patch fix it.
Plus, adding a failure message when failed to disable PTP.
Fixes: a78040c990cb ("app/testpmd: update forward engine beginning")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
app/test-pmd/ieee1588fwd.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 896d5ef26a..8d9ce4d6ce 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
static int
port_ieee1588_fwd_begin(portid_t pi)
{
- rte_eth_timesync_enable(pi);
- return 0;
+ int ret;
+
+ ret = rte_eth_timesync_enable(pi);
+ if (ret)
+ printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
+
+ return ret;
}
static void
port_ieee1588_fwd_end(portid_t pi)
{
- rte_eth_timesync_disable(pi);
+ int ret;
+
+ ret = rte_eth_timesync_disable(pi);
+ if (ret)
+ printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
}
static void
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.479635703 +0100
+++ 0057-app-testpmd-handle-IEEE1588-init-failure.patch 2024-07-15 16:19:34.628207744 +0100
@@ -1 +1 @@
-From 80071a1c8ed669298434c56efe4ca0839f2a970e Mon Sep 17 00:00:00 2001
+From 23e7802fa97b96123910544915d1ef8ef6b7135b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3371771751..afea7735c7 100644
+index 896d5ef26a..8d9ce4d6ce 100644
@@ -27 +28 @@
-@@ -197,14 +197,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
+@@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: remove empty section from testpmd guide' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (55 preceding siblings ...)
2024-07-15 15:26 ` patch 'app/testpmd: handle IEEE1588 init failure' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: fix parsing for connection tracking item' " luca.boccassi
` (27 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4d92c686d67b29d796c2228b8b9bbd19f9519186
Thanks.
Luca Boccassi
---
From 4d92c686d67b29d796c2228b8b9bbd19f9519186 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 24 May 2024 18:02:09 +0200
Subject: [PATCH] doc: remove empty section from testpmd guide
[ upstream commit 06d8e7da01a7e3095e4ff7a6697693233173dc59 ]
When removing the documentation for the obsolete flow filtering,
the related section was kept almost empty.
It can be safely removed.
Fixes: 5007ac13189d ("ethdev: remove deprecated Flow Director configuration")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 8e7d4f1b86..b46c574325 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2843,14 +2843,6 @@ where:
* ``red`` enable 1, disable 0 marking IP ecn for yellow marked packets with ecn of 2'b01 or 2'b10
to ecn of 2'b11 when IP is caring TCP or SCTP
-Filter Functions
-----------------
-
-This section details the available filter functions that are available.
-
-Note these functions interface the deprecated legacy filtering framework,
-superseded by *rte_flow*. See `Flow rules management`_.
-
.. _testpmd_rte_flow:
Flow rules management
@@ -2860,10 +2852,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
``flow`` command (configuration, validation, creation, destruction, queries
and operation modes).
-Considering *rte_flow* overlaps with all `Filter Functions`_, using both
-features simultaneously may cause undefined side-effects and is therefore
-not recommended.
-
``flow`` syntax
~~~~~~~~~~~~~~~
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.520481799 +0100
+++ 0058-doc-remove-empty-section-from-testpmd-guide.patch 2024-07-15 16:19:34.632207830 +0100
@@ -1 +1 @@
-From 06d8e7da01a7e3095e4ff7a6697693233173dc59 Mon Sep 17 00:00:00 2001
+From 4d92c686d67b29d796c2228b8b9bbd19f9519186 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06d8e7da01a7e3095e4ff7a6697693233173dc59 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1de1420b94..c19b4f8958 100644
+index 8e7d4f1b86..b46c574325 100644
@@ -23,3 +24,3 @@
-@@ -2918,14 +2918,6 @@ for port 0 and queue 0::
-
- testpmd> set port cman config 0 0 obj queue mode red 10 100 1
+@@ -2843,14 +2843,6 @@ where:
+ * ``red`` enable 1, disable 0 marking IP ecn for yellow marked packets with ecn of 2'b01 or 2'b10
+ to ecn of 2'b11 when IP is caring TCP or SCTP
@@ -38 +39 @@
-@@ -2935,10 +2927,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
+@@ -2860,10 +2852,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix parsing for connection tracking item' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (56 preceding siblings ...)
2024-07-15 15:26 ` patch 'doc: remove empty section from testpmd guide' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix tunnel packet parsing' " luca.boccassi
` (26 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Maayan Kashani; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/40700232bad00df0fbc10bcf6138ae9f1dbb2386
Thanks.
Luca Boccassi
---
From 40700232bad00df0fbc10bcf6138ae9f1dbb2386 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 2 Jun 2024 13:23:26 +0300
Subject: [PATCH] app/testpmd: fix parsing for connection tracking item
[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]
In command line translation there were missing fields for
connection tracking item, as a result this item was not parsed
and was missing from the items list received from test-pmd.
Fixes: 4d07cbefe3ba ("app/testpmd: add commands for conntrack")
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
app/test-pmd/cmdline_flow.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 6970f90307..5d97625b05 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -4772,9 +4772,12 @@ static const struct token token_list[] = {
[ITEM_CONNTRACK] = {
.name = "conntrack",
.help = "conntrack state",
+ .priv = PRIV_ITEM(CONNTRACK,
+ sizeof(struct rte_flow_item_conntrack)),
.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
item_param),
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
+ .call = parse_vc,
},
[ITEM_PORT_REPRESENTOR] = {
.name = "port_representor",
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.565083798 +0100
+++ 0059-app-testpmd-fix-parsing-for-connection-tracking-item.patch 2024-07-15 16:19:34.644208086 +0100
@@ -1 +1 @@
-From 944e5f43ffdb847c7a04edd8ae90baa899a8c697 Mon Sep 17 00:00:00 2001
+From 40700232bad00df0fbc10bcf6138ae9f1dbb2386 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index aca3547c74..a76b44bf39 100644
+index 6970f90307..5d97625b05 100644
@@ -23 +24 @@
-@@ -5863,9 +5863,12 @@ static const struct token token_list[] = {
+@@ -4772,9 +4772,12 @@ static const struct token token_list[] = {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix tunnel packet parsing' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (57 preceding siblings ...)
2024-07-15 15:26 ` patch 'app/testpmd: fix parsing for connection tracking item' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix flow filters in VT mode' " luca.boccassi
` (25 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f0b14e140140412d16c5cdd8ee16138fefcb8ba9
Thanks.
Luca Boccassi
---
From f0b14e140140412d16c5cdd8ee16138fefcb8ba9 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:32 +0800
Subject: [PATCH] net/txgbe: fix tunnel packet parsing
[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]
The outer-ipv6 tunnel packet was parsed to the wrong packet type, remove
the default RTE_PTYPE_L2_ETHER and RTE_PTYPE_L3_IPV4 flags for tunnel
packets. And correct the calculation of tunnel length for GRE and GENEVE
packets.
Fixes: ca46fcd753b1 ("net/txgbe: support Tx with hardware offload")
Fixes: e5ece1f467aa ("net/txgbe: fix VXLAN-GPE packet checksum")
Fixes: 0e32d6edd479 ("net/txgbe: fix packet type to parse from offload flags")
Fixes: 5bbaf75ed6df ("net/txgbe: fix GRE tunnel packet checksum")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_rxtx.c | 71 ++++++++++++++++++----------------
1 file changed, 38 insertions(+), 33 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 24fc34d3c4..7c4c448d88 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -564,26 +564,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
switch (oflags & RTE_MBUF_F_TX_TUNNEL_MASK) {
case RTE_MBUF_F_TX_TUNNEL_VXLAN:
case RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_GRENAT;
+ ptype |= RTE_PTYPE_TUNNEL_GRENAT;
break;
case RTE_MBUF_F_TX_TUNNEL_GRE:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_GRE;
+ ptype |= RTE_PTYPE_TUNNEL_GRE;
break;
case RTE_MBUF_F_TX_TUNNEL_GENEVE:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_GENEVE;
- ptype |= RTE_PTYPE_INNER_L2_ETHER;
+ ptype |= RTE_PTYPE_TUNNEL_GENEVE;
break;
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;
+ ptype |= RTE_PTYPE_TUNNEL_IP;
break;
}
@@ -667,11 +658,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
return 0;
}
+#define GRE_CHECKSUM_PRESENT 0x8000
+#define GRE_KEY_PRESENT 0x2000
+#define GRE_SEQUENCE_PRESENT 0x1000
+#define GRE_EXT_LEN 4
+#define GRE_SUPPORTED_FIELDS (GRE_CHECKSUM_PRESENT | GRE_KEY_PRESENT |\
+ GRE_SEQUENCE_PRESENT)
+
static inline uint8_t
txgbe_get_tun_len(struct rte_mbuf *mbuf)
{
struct txgbe_genevehdr genevehdr;
const struct txgbe_genevehdr *gh;
+ const struct txgbe_grehdr *grh;
+ struct txgbe_grehdr grehdr;
uint8_t tun_len;
switch (mbuf->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
@@ -684,11 +684,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+ sizeof(struct txgbe_vxlanhdr);
break;
case RTE_MBUF_F_TX_TUNNEL_GRE:
- tun_len = sizeof(struct txgbe_nvgrehdr);
- break;
- case RTE_MBUF_F_TX_TUNNEL_GENEVE:
- gh = rte_pktmbuf_read(mbuf,
+ tun_len = sizeof(struct txgbe_grehdr);
+ grh = rte_pktmbuf_read(mbuf,
mbuf->outer_l2_len + mbuf->outer_l3_len,
+ sizeof(grehdr), &grehdr);
+ if (grh->flags & rte_cpu_to_be_16(GRE_SUPPORTED_FIELDS))
+ tun_len += GRE_EXT_LEN;
+ break;
+ case RTE_MBUF_F_TX_TUNNEL_GENEVE:
+ gh = rte_pktmbuf_read(mbuf, mbuf->outer_l2_len +
+ mbuf->outer_l3_len + sizeof(struct txgbe_udphdr),
sizeof(genevehdr), &genevehdr);
tun_len = sizeof(struct txgbe_udphdr)
+ sizeof(struct txgbe_genevehdr)
@@ -702,27 +707,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
}
static inline uint8_t
-txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt)
+txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt, uint8_t tun_len)
{
- uint64_t l2_vxlan, l2_vxlan_mac, l2_vxlan_mac_vlan;
- uint64_t l2_gre, l2_gre_mac, l2_gre_mac_vlan;
+ uint64_t inner_l2_len;
uint8_t ptid = 0;
- l2_vxlan = sizeof(struct txgbe_udphdr) + sizeof(struct txgbe_vxlanhdr);
- l2_vxlan_mac = l2_vxlan + sizeof(struct rte_ether_hdr);
- l2_vxlan_mac_vlan = l2_vxlan_mac + sizeof(struct rte_vlan_hdr);
+ inner_l2_len = tx_pkt->l2_len - tun_len;
- l2_gre = sizeof(struct txgbe_grehdr);
- l2_gre_mac = l2_gre + sizeof(struct rte_ether_hdr);
- l2_gre_mac_vlan = l2_gre_mac + sizeof(struct rte_vlan_hdr);
-
- if (tx_pkt->l2_len == l2_vxlan || tx_pkt->l2_len == l2_gre)
+ switch (inner_l2_len) {
+ case 0:
ptid = TXGBE_PTID_TUN_EIG;
- else if (tx_pkt->l2_len == l2_vxlan_mac || tx_pkt->l2_len == l2_gre_mac)
+ break;
+ case sizeof(struct rte_ether_hdr):
ptid = TXGBE_PTID_TUN_EIGM;
- else if (tx_pkt->l2_len == l2_vxlan_mac_vlan ||
- tx_pkt->l2_len == l2_gre_mac_vlan)
+ break;
+ case sizeof(struct rte_ether_hdr) + sizeof(struct rte_vlan_hdr):
ptid = TXGBE_PTID_TUN_EIGMV;
+ break;
+ default:
+ ptid = TXGBE_PTID_TUN_EI;
+ }
return ptid;
}
@@ -789,8 +793,6 @@ 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);
- if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
- tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt);
tx_offload.l2_len = tx_pkt->l2_len;
tx_offload.l3_len = tx_pkt->l3_len;
tx_offload.l4_len = tx_pkt->l4_len;
@@ -799,6 +801,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
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 = txgbe_get_tun_len(tx_pkt);
+ if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
+ tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt,
+ tx_offload.outer_tun_len);
#ifdef RTE_LIB_SECURITY
if (use_ipsec) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.618150963 +0100
+++ 0060-net-txgbe-fix-tunnel-packet-parsing.patch 2024-07-15 16:19:34.648208171 +0100
@@ -1 +1 @@
-From 60847e50b5280effa6e92a452bbb36fa7051db28 Mon Sep 17 00:00:00 2001
+From f0b14e140140412d16c5cdd8ee16138fefcb8ba9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 4b78e68a40..7731ad8491 100644
+index 24fc34d3c4..7c4c448d88 100644
@@ -26 +27 @@
-@@ -586,26 +586,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
+@@ -564,26 +564,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
@@ -57 +58 @@
-@@ -689,11 +680,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
+@@ -667,11 +658,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
@@ -78 +79 @@
-@@ -706,11 +706,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -684,11 +684,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -99 +100 @@
-@@ -724,27 +729,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -702,27 +707,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -140 +141 @@
-@@ -811,8 +815,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -789,8 +793,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -149 +150 @@
-@@ -821,6 +823,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -799,6 +801,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix flow filters in VT mode' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (58 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix tunnel packet parsing' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix Tx hang on queue disable' " luca.boccassi
` (24 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/500f540c7c667139c62853ec1b23e8fcbddc07b4
Thanks.
Luca Boccassi
---
From 500f540c7c667139c62853ec1b23e8fcbddc07b4 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:33 +0800
Subject: [PATCH] net/txgbe: fix flow filters in VT mode
[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]
In virtualization mode, target pool should be determined for the
filters. For ether type filter, virtualization mode must be enabled
to filter broadcast/multicast packets due to hardware limitations.
Fixes: f8e2cfc7702b ("net/txgbe: support ethertype filter add and delete")
Fixes: 77a72b4d9dc0 ("net/txgbe: support ntuple filter add and delete")
Fixes: 983a4ef2265b ("net/txgbe: support syn filter add and delete")
Fixes: 08d61139be0a ("net/txgbe: support flow director filter add and delete")
Fixes: 9fdfed08a5e3 ("net/txgbe: restore RSS filter")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 24 +++++++++++++++++++++---
drivers/net/txgbe/txgbe_fdir.c | 3 +++
drivers/net/txgbe/txgbe_rxtx.c | 8 +++++++-
3 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 001f8c6473..30a2d6495a 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3914,6 +3914,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
struct txgbe_filter_info *filter_info = TXGBE_DEV_FILTER(dev);
uint32_t syn_info;
uint32_t synqf;
+ uint16_t queue;
if (filter->queue >= TXGBE_MAX_RX_QUEUE_NUM)
return -EINVAL;
@@ -3923,7 +3924,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
if (add) {
if (syn_info & TXGBE_SYNCLS_ENA)
return -EINVAL;
- synqf = (uint32_t)TXGBE_SYNCLS_QPID(filter->queue);
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+ else
+ queue = filter->queue;
+ synqf = (uint32_t)TXGBE_SYNCLS_QPID(queue);
synqf |= TXGBE_SYNCLS_ENA;
if (filter->hig_pri)
@@ -3992,7 +3997,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
wr32(hw, TXGBE_5TFPORT(i), sdpqf);
wr32(hw, TXGBE_5TFCTL0(i), ftqf);
- l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ l34timir |= TXGBE_5TFCTL1_QP(RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue);
+ else
+ l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
wr32(hw, TXGBE_5TFCTL1(i), l34timir);
}
@@ -4276,7 +4284,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
if (add) {
etqf = TXGBE_ETFLT_ENA;
etqf |= TXGBE_ETFLT_ETID(filter->ether_type);
- etqs |= TXGBE_ETCLS_QPID(filter->queue);
+ if (RTE_ETH_DEV_SRIOV(dev).active) {
+ int pool, queue;
+
+ pool = RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx;
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+ etqf |= TXGBE_ETFLT_POOLENA;
+ etqf |= TXGBE_ETFLT_POOL(pool);
+ etqs |= TXGBE_ETCLS_QPID(queue);
+ } else {
+ etqs |= TXGBE_ETCLS_QPID(filter->queue);
+ }
etqs |= TXGBE_ETCLS_QENA;
ethertype_filter.ethertype = filter->ether_type;
diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c
index a198b6781b..f627ab681d 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -844,6 +844,9 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,
return -EINVAL;
}
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + queue;
+
node = txgbe_fdir_filter_lookup(info, &rule->input);
if (node) {
if (!update) {
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 7c4c448d88..910d232ab0 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
uint32_t reta;
uint16_t i;
uint16_t j;
+ uint16_t queue;
struct rte_eth_rss_conf rss_conf = {
.rss_key = conf->conf.key_len ?
(void *)(uintptr_t)conf->conf.key : NULL,
@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
for (i = 0, j = 0; i < RTE_ETH_RSS_RETA_SIZE_128; i++, j++) {
if (j == conf->conf.queue_num)
j = 0;
- reta = (reta >> 8) | LS32(conf->conf.queue[j], 24, 0xFF);
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx +
+ conf->conf.queue[j];
+ else
+ queue = conf->conf.queue[j];
+ reta = (reta >> 8) | LS32(queue, 24, 0xFF);
if ((i & 3) == 3)
wr32at(hw, TXGBE_REG_RSSTBL, i >> 2, reta);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.664337877 +0100
+++ 0061-net-txgbe-fix-flow-filters-in-VT-mode.patch 2024-07-15 16:19:34.656208342 +0100
@@ -1 +1 @@
-From af8c90f424ff704578971fb07f5005d4615c9f3e Mon Sep 17 00:00:00 2001
+From 500f540c7c667139c62853ec1b23e8fcbddc07b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 6d11412616..fa68a5d2ca 100644
+index 001f8c6473..30a2d6495a 100644
@@ -28 +29 @@
-@@ -4011,6 +4011,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -3914,6 +3914,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -4020,7 +4021,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -3923,7 +3924,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -49 +50 @@
-@@ -4089,7 +4094,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
+@@ -3992,7 +3997,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
@@ -61 +62 @@
-@@ -4373,7 +4381,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
+@@ -4276,7 +4284,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
@@ -95 +96 @@
-index 7731ad8491..35f80d73ac 100644
+index 7c4c448d88..910d232ab0 100644
@@ -98 +99 @@
-@@ -5160,6 +5160,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
@@ -106 +107 @@
-@@ -5192,7 +5193,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix Tx hang on queue disable' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (59 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix flow filters in VT mode' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " luca.boccassi
` (23 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a96f251defbcc1501cca4da1b7ed6a44137216c6
Thanks.
Luca Boccassi
---
From a96f251defbcc1501cca4da1b7ed6a44137216c6 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:34 +0800
Subject: [PATCH] net/txgbe: fix Tx hang on queue disable
[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]
The problem of Tx hang also occurs on Wangxun 10Gb NICs, when stop
device under heavy traffic.
Refer to commit ac6c5e9af56a ("net/ngbe: fix Tx hang on queue disable")
Disable PCIe bus master to clear BME when stop hardware, and verify
there are no pending requests. Move disabling Tx queue after disabling
PCIe bus master to ensure that there are no packets left to cause Tx
hang.
Fixes: b1f596677d8e ("net/txgbe: support device start")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/meson.build | 2 +-
drivers/net/txgbe/base/txgbe_hw.c | 60 +++++++++++++++++++++++-----
drivers/net/txgbe/base/txgbe_hw.h | 1 +
drivers/net/txgbe/base/txgbe_osdep.h | 1 +
drivers/net/txgbe/base/txgbe_regs.h | 3 ++
drivers/net/txgbe/base/txgbe_type.h | 1 +
drivers/net/txgbe/txgbe_ethdev.c | 7 ++++
7 files changed, 65 insertions(+), 10 deletions(-)
diff --git a/drivers/net/txgbe/base/meson.build b/drivers/net/txgbe/base/meson.build
index a81d6890fe..4cf90a394a 100644
--- a/drivers/net/txgbe/base/meson.build
+++ b/drivers/net/txgbe/base/meson.build
@@ -22,6 +22,6 @@ foreach flag: error_cflags
endforeach
base_lib = static_library('txgbe_base', sources,
- dependencies: [static_rte_eal, static_rte_net],
+ dependencies: [static_rte_eal, static_rte_net, static_rte_bus_pci],
c_args: c_args)
base_objs = base_lib.extract_all_objects(recursive: true)
diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index de96549ae8..b59667f1d7 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -462,7 +462,7 @@ void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
**/
s32 txgbe_stop_hw(struct txgbe_hw *hw)
{
- u32 reg_val;
+ s32 status = 0;
u16 i;
/*
@@ -484,16 +484,26 @@ s32 txgbe_stop_hw(struct txgbe_hw *hw)
wr32(hw, TXGBE_ICR(0), TXGBE_ICR_MASK);
wr32(hw, TXGBE_ICR(1), TXGBE_ICR_MASK);
+ wr32(hw, TXGBE_BMECTL, 0x3);
+
+ /* Disable the receive unit by stopping each queue */
+ for (i = 0; i < hw->mac.max_rx_queues; i++)
+ wr32(hw, TXGBE_RXCFG(i), 0);
+
+ /* flush all queues disables */
+ txgbe_flush(hw);
+ msec_delay(2);
+
+ /* Prevent the PCI-E bus from hanging by disabling PCI-E master
+ * access and verify no pending requests
+ */
+ status = txgbe_set_pcie_master(hw, false);
+ if (status)
+ return status;
+
/* Disable the transmit unit. Each queue must be disabled. */
for (i = 0; i < hw->mac.max_tx_queues; i++)
- wr32(hw, TXGBE_TXCFG(i), TXGBE_TXCFG_FLUSH);
-
- /* Disable the receive unit by stopping each queue */
- for (i = 0; i < hw->mac.max_rx_queues; i++) {
- reg_val = rd32(hw, TXGBE_RXCFG(i));
- reg_val &= ~TXGBE_RXCFG_ENA;
- wr32(hw, TXGBE_RXCFG(i), reg_val);
- }
+ wr32(hw, TXGBE_TXCFG(i), 0);
/* flush all queues disables */
txgbe_flush(hw);
@@ -1174,6 +1184,38 @@ out:
}
}
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable)
+{
+ struct rte_pci_device *pci_dev = (struct rte_pci_device *)hw->back;
+ s32 status = 0;
+ u32 i;
+
+ if (rte_pci_set_bus_master(pci_dev, enable) < 0) {
+ DEBUGOUT("Cannot configure PCI bus master.");
+ return -1;
+ }
+
+ if (enable)
+ goto out;
+
+ /* Exit if master requests are blocked */
+ if (!(rd32(hw, TXGBE_BMEPEND)))
+ goto out;
+
+ /* Poll for master request bit to clear */
+ for (i = 0; i < TXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) {
+ usec_delay(100);
+ if (!(rd32(hw, TXGBE_BMEPEND)))
+ goto out;
+ }
+
+ DEBUGOUT("PCIe transaction pending bit also did not clear.");
+ status = TXGBE_ERR_MASTER_REQUESTS_PENDING;
+
+out:
+ return status;
+}
+
/**
* txgbe_acquire_swfw_sync - Acquire SWFW semaphore
* @hw: pointer to hardware structure
diff --git a/drivers/net/txgbe/base/txgbe_hw.h b/drivers/net/txgbe/base/txgbe_hw.h
index 7031589f7c..4bf9da2d4c 100644
--- a/drivers/net/txgbe/base/txgbe_hw.h
+++ b/drivers/net/txgbe/base/txgbe_hw.h
@@ -40,6 +40,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw);
s32 txgbe_validate_mac_addr(u8 *mac_addr);
s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask);
void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask);
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable);
s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index b62c0b0824..0d9492c3cb 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -19,6 +19,7 @@
#include <rte_config.h>
#include <rte_io.h>
#include <rte_ether.h>
+#include <bus_pci_driver.h>
#include "../txgbe_logs.h"
diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 79290a7afe..86896d11dc 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1236,6 +1236,9 @@ enum txgbe_5tuple_protocol {
#define TXGBE_TCPTMR 0x000170
#define TXGBE_ITRSEL 0x000180
+#define TXGBE_BMECTL 0x012020
+#define TXGBE_BMEPEND 0x000168
+
/* P2V Mailbox */
#define TXGBE_MBMEM(i) (0x005000 + 0x40 * (i)) /* 0-63 */
#define TXGBE_MBCTL(i) (0x000600 + 4 * (i)) /* 0-63 */
diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index 75e839b7de..f52736cae9 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -29,6 +29,7 @@
#define TXGBE_FDIRCMD_CMD_POLL 10
#define TXGBE_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */
#define TXGBE_SPI_TIMEOUT 10000
+#define TXGBE_PCI_MASTER_DISABLE_TIMEOUT 800
#define TXGBE_ALIGN 128 /* as intel did */
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 30a2d6495a..862cdc55cc 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -600,6 +600,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
/* Vendor and Device ID need to be set before init of shared code */
+ hw->back = pci_dev;
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
if (pci_dev->id.subsystem_vendor_id == PCI_VENDOR_ID_WANGXUN) {
@@ -1704,6 +1705,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
hw->mac.get_link_status = true;
hw->dev_start = true;
+ txgbe_set_pcie_master(hw, true);
+
/* workaround for GPIO intr lost when mng_veto bit is set */
if (txgbe_check_reset_blocked(hw))
txgbe_reinit_gpio_intr(hw);
@@ -1966,6 +1969,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
adapter->rss_reta_updated = 0;
wr32m(hw, TXGBE_LEDCTL, 0xFFFFFFFF, TXGBE_LEDCTL_SEL_MASK);
+ txgbe_set_pcie_master(hw, true);
+
hw->adapter_stopped = true;
dev->data->dev_started = 0;
hw->dev_start = false;
@@ -2048,6 +2053,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
txgbe_dev_free_queues(dev);
+ txgbe_set_pcie_master(hw, false);
+
/* reprogram the RAR[0] in case user changed it. */
txgbe_set_rar(hw, 0, hw->mac.addr, 0, true);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.715791505 +0100
+++ 0062-net-txgbe-fix-Tx-hang-on-queue-disable.patch 2024-07-15 16:19:34.668208598 +0100
@@ -1 +1 @@
-From 8a31f4bbbbb73baf77297f00887f4b267feb7b8e Mon Sep 17 00:00:00 2001
+From a96f251defbcc1501cca4da1b7ed6a44137216c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index d19fd0065d..7094551fee 100644
+index de96549ae8..b59667f1d7 100644
@@ -142 +143 @@
-index 4fce355000..62d16a6abb 100644
+index b62c0b0824..0d9492c3cb 100644
@@ -180 +181 @@
-index fa68a5d2ca..121dccb5eb 100644
+index 30a2d6495a..862cdc55cc 100644
@@ -183 +184 @@
-@@ -601,6 +601,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -600,6 +600,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -191 +192 @@
-@@ -1717,6 +1718,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1704,6 +1705,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -200 +201 @@
-@@ -1980,6 +1983,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -1966,6 +1969,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
@@ -209 +210 @@
-@@ -2062,6 +2067,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
+@@ -2048,6 +2053,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: restrict configuration of VLAN strip offload' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (60 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix Tx hang on queue disable' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " luca.boccassi
` (22 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7b6163ebfad77fd4f2ce33b7bbb32cfc34294b81
Thanks.
Luca Boccassi
---
From 7b6163ebfad77fd4f2ce33b7bbb32cfc34294b81 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:35 +0800
Subject: [PATCH] net/txgbe: restrict configuration of VLAN strip offload
[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]
There is a hardware limitation that Rx ring config register is not
writable when Rx ring is enabled, i.e. the TXGBE_RXCFG_ENA bit is set.
But disabling the ring when there is traffic will cause ring get stuck.
So restrict the configuration of VLAN strip offload only if device is
started.
Fixes: 220b0e49bc47 ("net/txgbe: support VLAN")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 49 +++++++++++++-------------------
1 file changed, 20 insertions(+), 29 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 862cdc55cc..def3202ce8 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -999,41 +999,25 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
}
static void
-txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+txgbe_vlan_strip_q_set(struct rte_eth_dev *dev, uint16_t queue, int on)
{
- struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
- struct txgbe_rx_queue *rxq;
- bool restart;
- uint32_t rxcfg, rxbal, rxbah;
-
if (on)
txgbe_vlan_hw_strip_enable(dev, queue);
else
txgbe_vlan_hw_strip_disable(dev, queue);
+}
- rxq = dev->data->rx_queues[queue];
- rxbal = rd32(hw, TXGBE_RXBAL(rxq->reg_idx));
- rxbah = rd32(hw, TXGBE_RXBAH(rxq->reg_idx));
- rxcfg = rd32(hw, TXGBE_RXCFG(rxq->reg_idx));
- if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
- restart = (rxcfg & TXGBE_RXCFG_ENA) &&
- !(rxcfg & TXGBE_RXCFG_VLAN);
- rxcfg |= TXGBE_RXCFG_VLAN;
- } else {
- restart = (rxcfg & TXGBE_RXCFG_ENA) &&
- (rxcfg & TXGBE_RXCFG_VLAN);
- rxcfg &= ~TXGBE_RXCFG_VLAN;
- }
- rxcfg &= ~TXGBE_RXCFG_ENA;
+static void
+txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+{
+ struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
- if (restart) {
- /* set vlan strip for ring */
- txgbe_dev_rx_queue_stop(dev, queue);
- wr32(hw, TXGBE_RXBAL(rxq->reg_idx), rxbal);
- wr32(hw, TXGBE_RXBAH(rxq->reg_idx), rxbah);
- wr32(hw, TXGBE_RXCFG(rxq->reg_idx), rxcfg);
- txgbe_dev_rx_queue_start(dev, queue);
+ if (!hw->adapter_stopped) {
+ PMD_DRV_LOG(ERR, "Please stop port first");
+ return;
}
+
+ txgbe_vlan_strip_q_set(dev, queue, on);
}
static int
@@ -1258,9 +1242,9 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
rxq = dev->data->rx_queues[i];
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
- txgbe_vlan_strip_queue_set(dev, i, 1);
+ txgbe_vlan_strip_q_set(dev, i, 1);
else
- txgbe_vlan_strip_queue_set(dev, i, 0);
+ txgbe_vlan_strip_q_set(dev, i, 0);
}
}
@@ -1322,6 +1306,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
static int
txgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
{
+ struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+
+ if (!hw->adapter_stopped && (mask & RTE_ETH_VLAN_STRIP_MASK)) {
+ PMD_DRV_LOG(ERR, "Please stop port first");
+ return -EPERM;
+ }
+
txgbe_config_vlan_strip_on_all_queues(dev, mask);
txgbe_vlan_offload_config(dev, mask);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.768383592 +0100
+++ 0063-net-txgbe-restrict-configuration-of-VLAN-strip-offlo.patch 2024-07-15 16:19:34.672208684 +0100
@@ -1 +1 @@
-From 66364efcf95884b97b71aaff697f8597a286f52e Mon Sep 17 00:00:00 2001
+From 7b6163ebfad77fd4f2ce33b7bbb32cfc34294b81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 121dccb5eb..a59d964a5b 100644
+index 862cdc55cc..def3202ce8 100644
@@ -24 +25 @@
-@@ -1000,41 +1000,25 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -999,41 +999,25 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
@@ -77 +78 @@
-@@ -1259,9 +1243,9 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
+@@ -1258,9 +1242,9 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
@@ -89 +90 @@
-@@ -1323,6 +1307,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
+@@ -1322,6 +1306,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: reconfigure more MAC Rx registers' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (61 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " luca.boccassi
` (21 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/13909e4ba2cd08b6477e8b8d2f5f42c459e7215b
Thanks.
Luca Boccassi
---
From 13909e4ba2cd08b6477e8b8d2f5f42c459e7215b Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:36 +0800
Subject: [PATCH] net/txgbe: reconfigure more MAC Rx registers
[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]
When link status changes, there is a probability that no more packets
can be received on the port, due to hardware defects. These MAC Rx
registers should be reconfigured to fix this problem.
Fixes: 950a6954df13 ("net/txgbe: reconfigure MAC Rx when link update")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_regs.h | 2 ++
drivers/net/txgbe/txgbe_ethdev.c | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 86896d11dc..a2984f1106 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1022,6 +1022,8 @@ enum txgbe_5tuple_protocol {
#define TXGBE_MACRXFLT_CTL_PASS LS(3, 6, 0x3)
#define TXGBE_MACRXFLT_RXALL MS(31, 0x1)
+#define TXGBE_MAC_WDG_TIMEOUT 0x01100C
+
/******************************************************************************
* Statistic Registers
******************************************************************************/
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index def3202ce8..24e779c02c 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2793,6 +2793,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
bool link_up;
int err;
int wait = 1;
+ u32 reg;
memset(&link, 0, sizeof(link));
link.link_status = RTE_ETH_LINK_DOWN;
@@ -2879,9 +2880,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
}
/* Re configure MAC RX */
- if (hw->mac.type == txgbe_mac_raptor)
+ if (hw->mac.type == txgbe_mac_raptor) {
+ reg = rd32(hw, TXGBE_MACRXCFG);
+ wr32(hw, TXGBE_MACRXCFG, reg);
wr32m(hw, TXGBE_MACRXFLT, TXGBE_MACRXFLT_PROMISC,
TXGBE_MACRXFLT_PROMISC);
+ reg = rd32(hw, TXGBE_MAC_WDG_TIMEOUT);
+ wr32(hw, TXGBE_MAC_WDG_TIMEOUT, reg);
+ }
return rte_eth_linkstatus_set(dev, &link);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.813963967 +0100
+++ 0064-net-txgbe-reconfigure-more-MAC-Rx-registers.patch 2024-07-15 16:19:34.676208769 +0100
@@ -1 +1 @@
-From 3056288933f06afa72f8611ab7c4accdd01899fa Mon Sep 17 00:00:00 2001
+From 13909e4ba2cd08b6477e8b8d2f5f42c459e7215b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index a59d964a5b..699ff1c920 100644
+index def3202ce8..24e779c02c 100644
@@ -36 +37 @@
-@@ -2879,6 +2879,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2793,6 +2793,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -44 +45 @@
-@@ -2968,9 +2969,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2879,9 +2880,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix VF promiscuous and allmulticast' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (62 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " luca.boccassi
` (20 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ee530d3ee42218d887a596d1f6df4fbff9074f13
Thanks.
Luca Boccassi
---
From ee530d3ee42218d887a596d1f6df4fbff9074f13 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:37 +0800
Subject: [PATCH] net/txgbe: fix VF promiscuous and allmulticast
[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]
The configuration of allmulti and promiscuous modes conflicts
together. For instance, if we enable promiscuous mode, then enable and
disable allmulti, then the promiscuous mode is wrongly disabled.
Fix this behavior by:
- doing nothing when we set/unset allmulti if promiscuous mode is on
- restorting the proper mode (none or allmulti) when we disable
promiscuous mode
Fixes: 29072d593fe4 ("net/txgbe: support VF promiscuous and allmulticast")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev_vf.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index f1341fbf7e..1d7f1dcd15 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -1201,9 +1201,13 @@ static int
txgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
{
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+ int mode = TXGBEVF_XCAST_MODE_NONE;
int ret;
- switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_NONE)) {
+ if (dev->data->all_multicast)
+ mode = TXGBEVF_XCAST_MODE_ALLMULTI;
+
+ switch (hw->mac.update_xcast_mode(hw, mode)) {
case 0:
ret = 0;
break;
@@ -1224,6 +1228,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
int ret;
+ if (dev->data->promiscuous)
+ return 0;
+
switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_ALLMULTI)) {
case 0:
ret = 0;
@@ -1245,6 +1252,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
int ret;
+ if (dev->data->promiscuous)
+ return 0;
+
switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_MULTI)) {
case 0:
ret = 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.862151928 +0100
+++ 0065-net-txgbe-fix-VF-promiscuous-and-allmulticast.patch 2024-07-15 16:19:34.676208769 +0100
@@ -1 +1 @@
-From 055a51ff85112200706a07e99b92c9459774080a Mon Sep 17 00:00:00 2001
+From ee530d3ee42218d887a596d1f6df4fbff9074f13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ec40419289..6ac34058ab 100644
+index f1341fbf7e..1d7f1dcd15 100644
@@ -27 +28 @@
-@@ -1202,9 +1202,13 @@ static int
+@@ -1201,9 +1201,13 @@ static int
@@ -42 +43 @@
-@@ -1225,6 +1229,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -1224,6 +1228,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
@@ -52 +53 @@
-@@ -1246,6 +1253,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -1245,6 +1252,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: add special config for YT8531SH-CA PHY' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (63 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: keep PHY power down while device probing' " luca.boccassi
` (19 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8b161ee9179e028aa632d53d9015add2eae79c87
Thanks.
Luca Boccassi
---
From 8b161ee9179e028aa632d53d9015add2eae79c87 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:38 +0800
Subject: [PATCH] net/ngbe: add special config for YT8531SH-CA PHY
[ upstream commit 79be49dd2d655f2f5e830f33115528276a994bae ]
YT8531SH-CA PHY will switch to SDS space automatically when UTP and
SDS media are not present, causing failure to link up. Add the special
configuration to fix it.
Fixes: 3d0af7066759 ("net/ngbe: setup PHY link")
Fixes: 1c44384fce76 ("net/ngbe: support custom PHY interfaces")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_phy_yt.c | 4 ++++
drivers/net/ngbe/base/ngbe_phy_yt.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.c b/drivers/net/ngbe/base/ngbe_phy_yt.c
index 754faadd6a..f6c979b1e7 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.c
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.c
@@ -290,6 +290,10 @@ skip_an:
value |= value_r4;
ngbe_write_phy_reg_mdi(hw, YT_ANA, 0, value);
+ /* config for yt8531sh-ca */
+ ngbe_write_phy_reg_ext_yt(hw, YT_SPEC_CONF, 0,
+ YT_SPEC_CONF_8531SH_CA);
+
/* software reset to make the above configuration
* take effect
*/
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.h b/drivers/net/ngbe/base/ngbe_phy_yt.h
index ddf992e79a..c45bec7ce7 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.h
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.h
@@ -32,6 +32,8 @@
#define YT_MISC 0xA006
#define YT_MISC_FIBER_PRIO MS16(8, 0x1) /* 0 for UTP */
#define YT_MISC_RESV MS16(0, 0x1)
+#define YT_SPEC_CONF 0xA023
+#define YT_SPEC_CONF_8531SH_CA 0x4031
/* SDS EXT */
#define YT_AUTO 0xA5
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.904117635 +0100
+++ 0066-net-ngbe-add-special-config-for-YT8531SH-CA-PHY.patch 2024-07-15 16:19:34.680208855 +0100
@@ -1 +1 @@
-From 79be49dd2d655f2f5e830f33115528276a994bae Mon Sep 17 00:00:00 2001
+From 8b161ee9179e028aa632d53d9015add2eae79c87 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79be49dd2d655f2f5e830f33115528276a994bae ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ea313cd9a5..a374b015fd 100644
+index 754faadd6a..f6c979b1e7 100644
@@ -24 +25 @@
-@@ -320,6 +320,10 @@ skip_an_fiber:
+@@ -290,6 +290,10 @@ skip_an:
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: keep PHY power down while device probing' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (64 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix hotplug remove' " luca.boccassi
` (18 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e8d10f45d668ab89068f902466b32b00396dd75e
Thanks.
Luca Boccassi
---
From e8d10f45d668ab89068f902466b32b00396dd75e Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:39 +0800
Subject: [PATCH] net/ngbe: keep PHY power down while device probing
[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]
The internal PHY will be set to default power down after LAN reset,
but the external PHY will not. To keep the PHY behavior consistent,
set PHY power down uniformly here.
Fixes: 708ebe7d0399 ("net/ngbe: fix external PHY power down")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_devids.h | 1 +
drivers/net/ngbe/base/ngbe_hw.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_devids.h b/drivers/net/ngbe/base/ngbe_devids.h
index 83eedf423e..e1efa62015 100644
--- a/drivers/net/ngbe/base/ngbe_devids.h
+++ b/drivers/net/ngbe/base/ngbe_devids.h
@@ -83,6 +83,7 @@
#define NGBE_YT8521S_SFP_GPIO 0x0062
#define NGBE_INTERNAL_YT8521S_SFP_GPIO 0x0064
#define NGBE_LY_YT8521S_SFP 0x0070
+#define NGBE_RGMII_FPGA 0x0080
#define NGBE_WOL_SUP 0x4000
#define NGBE_NCSI_SUP 0x8000
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 27243d85c8..b9bb861adc 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -173,6 +173,9 @@ s32 ngbe_reset_hw_em(struct ngbe_hw *hw)
ngbe_reset_misc_em(hw);
hw->mac.clear_hw_cntrs(hw);
+ if (!((hw->sub_device_id & NGBE_OEM_MASK) == NGBE_RGMII_FPGA))
+ hw->phy.set_phy_power(hw, false);
+
msec_delay(50);
/* Store the permanent mac address */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.947690814 +0100
+++ 0067-net-ngbe-keep-PHY-power-down-while-device-probing.patch 2024-07-15 16:19:34.680208855 +0100
@@ -1 +1 @@
-From 01d94f0fb04cbb59e77b8b045616aeb11722bacf Mon Sep 17 00:00:00 2001
+From e8d10f45d668ab89068f902466b32b00396dd75e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 22ccdb0b7d..4dced0d328 100644
+index 27243d85c8..b9bb861adc 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix hotplug remove' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (65 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: keep PHY power down while device probing' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
` (17 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4d4117d9d959b699ec43460e79b3c77c912884d3
Thanks.
Luca Boccassi
---
From 4d4117d9d959b699ec43460e79b3c77c912884d3 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:41 +0800
Subject: [PATCH] net/txgbe: fix hotplug remove
[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]
This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.
Fixes: 7dc117068a7c ("net/txgbe: support probe and remove")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 24e779c02c..acfdb65eaf 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -963,7 +963,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
if (!ethdev)
return 0;
- return rte_eth_dev_destroy(ethdev, eth_txgbe_dev_uninit);
+ return rte_eth_dev_pci_generic_remove(pci_dev, eth_txgbe_dev_uninit);
}
static struct rte_pci_driver rte_txgbe_pmd = {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.997423964 +0100
+++ 0068-net-txgbe-fix-hotplug-remove.patch 2024-07-15 16:19:34.684208940 +0100
@@ -1 +1 @@
-From 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f Mon Sep 17 00:00:00 2001
+From 4d4117d9d959b699ec43460e79b3c77c912884d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 699ff1c920..20fa0a5b05 100644
+index 24e779c02c..acfdb65eaf 100644
@@ -22 +23 @@
-@@ -964,7 +964,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
+@@ -963,7 +963,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: fix hotplug remove' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (66 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix hotplug remove' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix MTU range' " luca.boccassi
` (16 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0ce675d4cfc603944e43a087cc23a6cf62148c3d
Thanks.
Luca Boccassi
---
From 0ce675d4cfc603944e43a087cc23a6cf62148c3d Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:42 +0800
Subject: [PATCH] net/ngbe: fix hotplug remove
[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]
This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.
Fixes: 6ee7e574cd48 ("net/ngbe: support probe and remove")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 08e14a05c9..edb3c73f8b 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -546,7 +546,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
if (ethdev == NULL)
return 0;
- return rte_eth_dev_destroy(ethdev, eth_ngbe_dev_uninit);
+ return rte_eth_dev_pci_generic_remove(pci_dev, eth_ngbe_dev_uninit);
}
static struct rte_pci_driver rte_ngbe_pmd = {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.047855854 +0100
+++ 0069-net-ngbe-fix-hotplug-remove.patch 2024-07-15 16:19:34.688209025 +0100
@@ -1 +1 @@
-From c602202c346663572043b408a27cb98e20f31886 Mon Sep 17 00:00:00 2001
+From 0ce675d4cfc603944e43a087cc23a6cf62148c3d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2a858b76d0..9d75e222c3 100644
+index 08e14a05c9..edb3c73f8b 100644
@@ -22 +23 @@
-@@ -547,7 +547,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
+@@ -546,7 +546,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix MTU range' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (67 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
` (15 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e
Thanks.
Luca Boccassi
---
From c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:43 +0800
Subject: [PATCH] net/txgbe: fix MTU range
[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]
The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.
Fixes: 3926214fd80d ("net/txgbe: support MTU set")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 12 +++++-------
drivers/net/txgbe/txgbe_ethdev.h | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index acfdb65eaf..d116bbd978 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2655,7 +2655,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
dev_info->min_rx_bufsize = 1024;
- dev_info->max_rx_pktlen = 15872;
+ dev_info->max_rx_pktlen = TXGBE_MAX_MTU + TXGBE_ETH_OVERHEAD;
+ dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+ dev_info->max_mtu = TXGBE_MAX_MTU;
dev_info->max_mac_addrs = hw->mac.num_rar_entries;
dev_info->max_hash_mac_addrs = TXGBE_VMDQ_NUM_UC_MAC;
dev_info->max_vfs = pci_dev->max_vfs;
@@ -3597,12 +3599,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
return -EINVAL;
}
- if (hw->mode)
- wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
- TXGBE_FRAME_SIZE_MAX);
- else
- wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
- TXGBE_FRMSZ_MAX(frame_size));
+ wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
+ TXGBE_FRMSZ_MAX(frame_size));
return 0;
}
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index 545ce4c9e1..4625236cb7 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -55,7 +55,7 @@
#define TXGBE_5TUPLE_MAX_PRI 7
#define TXGBE_5TUPLE_MIN_PRI 1
-
+#define TXGBE_MAX_MTU 9414
/* The overhead from MTU to max frame size. */
#define TXGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.095376025 +0100
+++ 0070-net-txgbe-fix-MTU-range.patch 2024-07-15 16:19:34.692209111 +0100
@@ -1 +1 @@
-From af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf Mon Sep 17 00:00:00 2001
+From c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 20fa0a5b05..c2df5a314b 100644
+index acfdb65eaf..d116bbd978 100644
@@ -22 +23 @@
-@@ -2670,7 +2670,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -2655,7 +2655,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -33 +34 @@
-@@ -3694,12 +3696,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -3597,12 +3599,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -49 +50 @@
-index 050acd967f..f0f4ced5b0 100644
+index 545ce4c9e1..4625236cb7 100644
@@ -52 +53 @@
-@@ -56,7 +56,7 @@
+@@ -55,7 +55,7 @@
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: fix MTU range' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (68 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix MTU range' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix memory leaks' " luca.boccassi
` (14 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a51a250cc5bdfae4479d6fc1a38a041877045811
Thanks.
Luca Boccassi
---
From a51a250cc5bdfae4479d6fc1a38a041877045811 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:44 +0800
Subject: [PATCH] net/ngbe: fix MTU range
[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]
The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.
Fixes: 07baabb6a51a ("net/ngbe: support MTU set")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_ethdev.c | 4 +++-
drivers/net/ngbe/ngbe_ethdev.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index edb3c73f8b..443bd9fef9 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1811,7 +1811,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
dev_info->min_rx_bufsize = 1024;
- dev_info->max_rx_pktlen = 15872;
+ dev_info->max_rx_pktlen = NGBE_MAX_MTU + NGBE_ETH_OVERHEAD;
+ dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+ dev_info->max_mtu = NGBE_MAX_MTU;
dev_info->max_mac_addrs = hw->mac.num_rar_entries;
dev_info->max_hash_mac_addrs = NGBE_VMDQ_NUM_UC_MAC;
dev_info->max_vfs = pci_dev->max_vfs;
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index bb96f6a5e7..d6c56dcce4 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -31,6 +31,7 @@
#define NGBE_QUEUE_ITR_INTERVAL_DEFAULT 500 /* 500us */
+#define NGBE_MAX_MTU 9414
/* The overhead from MTU to max frame size. */
#define NGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.145648524 +0100
+++ 0071-net-ngbe-fix-MTU-range.patch 2024-07-15 16:19:34.696209196 +0100
@@ -1 +1 @@
-From df2075eb681111637d5340c9abaf60e0aefab615 Mon Sep 17 00:00:00 2001
+From a51a250cc5bdfae4479d6fc1a38a041877045811 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 9d75e222c3..d7fc4bc70b 100644
+index edb3c73f8b..443bd9fef9 100644
@@ -22 +23 @@
-@@ -1818,7 +1818,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1811,7 +1811,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -34 +35 @@
-index c748bfbe4d..7af58a57ac 100644
+index bb96f6a5e7..d6c56dcce4 100644
@@ -37 +38 @@
-@@ -32,6 +32,7 @@
+@@ -31,6 +31,7 @@
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix memory leaks' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (69 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
` (13 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c14e0d31df0b0503fa7ccaf3642c7a92a093b8d1
Thanks.
Luca Boccassi
---
From c14e0d31df0b0503fa7ccaf3642c7a92a093b8d1 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:45 +0800
Subject: [PATCH] net/txgbe: fix memory leaks
[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]
Fix some memory leaks caused by not release resource in time.
Fixes: e1698e383c2a ("net/txgbe: add device init and uninit")
Fixes: 635c21354f9a ("net/txgbe: add flow director filter init and uninit")
Fixes: c13f84a71b2d ("net/txgbe: add L2 tunnel filter init and uninit")
Fixes: 3a123ba60a71 ("net/txgbe: support VF start and stop")
Fixes: 039b769f7c01 ("net/txgbe: support VF MAC address")
Fixes: 226bf98eda87 ("net/txgbe: add Rx and Tx queues setup and release")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 4 ++++
drivers/net/txgbe/txgbe_ethdev_vf.c | 7 ++++++-
drivers/net/txgbe/txgbe_rxtx.c | 5 +++++
drivers/net/txgbe/txgbe_rxtx.h | 2 ++
4 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index d116bbd978..a99178ff45 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -734,6 +734,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
PMD_INIT_LOG(ERR,
"Failed to allocate %d bytes needed to store MAC addresses",
RTE_ETHER_ADDR_LEN * TXGBE_VMDQ_NUM_UC_MAC);
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
return -ENOMEM;
}
@@ -901,6 +903,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
if (!fdir_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for fdir hash map!");
+ rte_hash_free(fdir_info->hash_handle);
return -ENOMEM;
}
fdir_info->mask_added = FALSE;
@@ -936,6 +939,7 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
if (!l2_tn_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for L2 TN hash map!");
+ rte_hash_free(l2_tn_info->hash_handle);
return -ENOMEM;
}
l2_tn_info->e_tag_en = FALSE;
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index 1d7f1dcd15..b42c94adc1 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -295,6 +295,8 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
err = hw->mac.start_hw(hw);
if (err) {
PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", err);
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
return -EIO;
}
@@ -670,8 +672,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
* now only one vector is used for Rx queue
*/
intr_vector = 1;
- if (rte_intr_efd_enable(intr_handle, intr_vector))
+ if (rte_intr_efd_enable(intr_handle, intr_vector)) {
+ txgbe_dev_clear_queues(dev);
return -1;
+ }
}
if (rte_intr_dp_is_en(intr_handle)) {
@@ -679,6 +683,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
dev->data->nb_rx_queues)) {
PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
" intr_vec", dev->data->nb_rx_queues);
+ txgbe_dev_clear_queues(dev);
return -ENOMEM;
}
}
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 910d232ab0..b0ec1c96d7 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -2135,6 +2135,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
if (txq != NULL && txq->ops != NULL) {
txq->ops->release_mbufs(txq);
txq->ops->free_swring(txq);
+ rte_memzone_free(txq->mz);
rte_free(txq);
}
}
@@ -2346,6 +2347,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->tx_free_thresh = tx_free_thresh;
txq->pthresh = tx_conf->tx_thresh.pthresh;
@@ -2463,6 +2465,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
txgbe_rx_queue_release_mbufs(rxq);
rte_free(rxq->sw_ring);
rte_free(rxq->sw_sc_ring);
+ rte_memzone_free(rxq->mz);
rte_free(rxq);
}
}
@@ -2556,6 +2559,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
+ rte_pktmbuf_free(rxq->pkt_first_seg);
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;
}
@@ -2636,6 +2640,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ rxq->mz = rz;
/*
* Zero init all the descriptors in the ring.
*/
diff --git a/drivers/net/txgbe/txgbe_rxtx.h b/drivers/net/txgbe/txgbe_rxtx.h
index 27d4c842c0..c579e1a9f2 100644
--- a/drivers/net/txgbe/txgbe_rxtx.h
+++ b/drivers/net/txgbe/txgbe_rxtx.h
@@ -314,6 +314,7 @@ struct txgbe_rx_queue {
struct rte_mbuf fake_mbuf;
/** hold packets to return to application */
struct rte_mbuf *rx_stage[RTE_PMD_TXGBE_RX_MAX_BURST * 2];
+ const struct rte_memzone *mz;
};
/**
@@ -402,6 +403,7 @@ struct txgbe_tx_queue {
uint8_t using_ipsec;
/**< indicates that IPsec TX feature is in use */
#endif
+ const struct rte_memzone *mz;
};
struct txgbe_txq_ops {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.191775608 +0100
+++ 0072-net-txgbe-fix-memory-leaks.patch 2024-07-15 16:19:34.704209367 +0100
@@ -1 +1 @@
-From 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 Mon Sep 17 00:00:00 2001
+From c14e0d31df0b0503fa7ccaf3642c7a92a093b8d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index c2df5a314b..26cf7632c3 100644
+index d116bbd978..a99178ff45 100644
@@ -28 +29 @@
-@@ -735,6 +735,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -734,6 +734,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -37 +38 @@
-@@ -902,6 +904,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
+@@ -901,6 +903,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
@@ -45 +46 @@
-@@ -937,6 +940,7 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
+@@ -936,6 +939,7 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
@@ -54 +55 @@
-index 6ac34058ab..87f76673d7 100644
+index 1d7f1dcd15..b42c94adc1 100644
@@ -66 +67 @@
-@@ -671,8 +673,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -670,8 +672,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -78 +79 @@
-@@ -680,6 +684,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -679,6 +683,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -87 +88 @@
-index 35f80d73ac..5bc0f8772f 100644
+index 910d232ab0..b0ec1c96d7 100644
@@ -90 +91 @@
-@@ -2157,6 +2157,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
+@@ -2135,6 +2135,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
@@ -98 +99 @@
-@@ -2376,6 +2377,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2346,6 +2347,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -106 +107 @@
-@@ -2499,6 +2501,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
+@@ -2463,6 +2465,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
@@ -114 +115 @@
-@@ -2592,6 +2595,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
+@@ -2556,6 +2559,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
@@ -121,2 +122,2 @@
-
-@@ -2677,6 +2681,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+ }
+@@ -2636,6 +2640,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -131 +132 @@
-index 336f060633..9155eb1f70 100644
+index 27d4c842c0..c579e1a9f2 100644
@@ -134 +135 @@
-@@ -322,6 +322,7 @@ struct txgbe_rx_queue {
+@@ -314,6 +314,7 @@ struct txgbe_rx_queue {
@@ -142 +143 @@
-@@ -410,6 +411,7 @@ struct txgbe_tx_queue {
+@@ -402,6 +403,7 @@ struct txgbe_tx_queue {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: fix memory leaks' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (70 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix memory leaks' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix Rx interrupt' " luca.boccassi
` (12 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bd6f2422df5e1232fff9ffacfcadf89b35ce6380
Thanks.
Luca Boccassi
---
From bd6f2422df5e1232fff9ffacfcadf89b35ce6380 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:46 +0800
Subject: [PATCH] net/ngbe: fix memory leaks
[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]
Fix some memory leaks caused by not release resource in time.
Fixes: 43b7e5ea60ac ("net/ngbe: support Rx queue setup/release")
Fixes: a58e7c312c6b ("net/ngbe: support Tx queue setup/release")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_rxtx.c | 5 +++++
drivers/net/ngbe/ngbe_rxtx.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index 54a6f6a887..8490b08318 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -1791,6 +1791,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
if (txq->ops != NULL) {
txq->ops->release_mbufs(txq);
txq->ops->free_swring(txq);
+ rte_memzone_free(txq->mz);
}
rte_free(txq);
}
@@ -1995,6 +1996,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->tx_free_thresh = tx_free_thresh;
txq->pthresh = tx_conf->tx_thresh.pthresh;
@@ -2097,6 +2099,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
ngbe_rx_queue_release_mbufs(rxq);
rte_free(rxq->sw_ring);
rte_free(rxq->sw_sc_ring);
+ rte_memzone_free(rxq->mz);
rte_free(rxq);
}
}
@@ -2187,6 +2190,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
+ rte_pktmbuf_free(rxq->pkt_first_seg);
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;
}
@@ -2277,6 +2281,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ rxq->mz = rz;
/*
* Zero init all the descriptors in the ring.
*/
diff --git a/drivers/net/ngbe/ngbe_rxtx.h b/drivers/net/ngbe/ngbe_rxtx.h
index 9130f9d0df..2914b9a756 100644
--- a/drivers/net/ngbe/ngbe_rxtx.h
+++ b/drivers/net/ngbe/ngbe_rxtx.h
@@ -276,6 +276,7 @@ struct ngbe_rx_queue {
struct rte_mbuf fake_mbuf;
/** hold packets to return to application */
struct rte_mbuf *rx_stage[RTE_PMD_NGBE_RX_MAX_BURST * 2];
+ const struct rte_memzone *mz;
};
/**
@@ -353,6 +354,7 @@ struct ngbe_tx_queue {
uint8_t tx_deferred_start; /**< not in global dev start */
const struct ngbe_txq_ops *ops; /**< txq ops */
+ const struct rte_memzone *mz;
};
struct ngbe_txq_ops {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.250661800 +0100
+++ 0073-net-ngbe-fix-memory-leaks.patch 2024-07-15 16:19:34.708209452 +0100
@@ -1 +1 @@
-From fea7422f7a4ec2b4c406865629b5ebea699f6588 Mon Sep 17 00:00:00 2001
+From bd6f2422df5e1232fff9ffacfcadf89b35ce6380 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c54c67f7ee..f3eb797d0c 100644
+index 54a6f6a887..8490b08318 100644
@@ -22 +23 @@
-@@ -1813,6 +1813,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
+@@ -1791,6 +1791,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
@@ -30 +31 @@
-@@ -2030,6 +2031,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -1995,6 +1996,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -38 +39 @@
-@@ -2138,6 +2140,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
+@@ -2097,6 +2099,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
@@ -46 +47 @@
-@@ -2228,6 +2231,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
+@@ -2187,6 +2190,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
@@ -53,2 +54,2 @@
-
-@@ -2323,6 +2327,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+ }
+@@ -2277,6 +2281,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -63 +64 @@
-index 41580ba0b9..7574db32d8 100644
+index 9130f9d0df..2914b9a756 100644
@@ -66 +67 @@
-@@ -291,6 +291,7 @@ struct ngbe_rx_queue {
+@@ -276,6 +276,7 @@ struct ngbe_rx_queue {
@@ -74 +75 @@
-@@ -373,6 +374,7 @@ struct ngbe_tx_queue {
+@@ -353,6 +354,7 @@ struct ngbe_tx_queue {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix Rx interrupt' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (71 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/vmxnet3: fix init logs' " luca.boccassi
` (11 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48d15a5ef2691310b599404a157456594299f118
Thanks.
Luca Boccassi
---
From 48d15a5ef2691310b599404a157456594299f118 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:47 +0800
Subject: [PATCH] net/txgbe: fix Rx interrupt
[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]
Fix Rx interrupt enable failure.
Fixes: a5682d28f134 ("net/txgbe: support Rx interrupt")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 18 +++++++++---------
drivers/net/txgbe/txgbe_ethdev_vf.c | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index a99178ff45..2ed5ee683f 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3755,13 +3755,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
if (queue_id < 32) {
- mask = rd32(hw, TXGBE_IMS(0));
- mask &= (1 << queue_id);
- wr32(hw, TXGBE_IMS(0), mask);
+ mask = rd32(hw, TXGBE_IMC(0));
+ mask |= (1 << queue_id);
+ wr32(hw, TXGBE_IMC(0), mask);
} else if (queue_id < 64) {
- mask = rd32(hw, TXGBE_IMS(1));
- mask &= (1 << (queue_id - 32));
- wr32(hw, TXGBE_IMS(1), mask);
+ mask = rd32(hw, TXGBE_IMC(1));
+ mask |= (1 << (queue_id - 32));
+ wr32(hw, TXGBE_IMC(1), mask);
}
rte_intr_enable(intr_handle);
@@ -3776,11 +3776,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
if (queue_id < 32) {
mask = rd32(hw, TXGBE_IMS(0));
- mask &= ~(1 << queue_id);
+ mask |= (1 << queue_id);
wr32(hw, TXGBE_IMS(0), mask);
} else if (queue_id < 64) {
mask = rd32(hw, TXGBE_IMS(1));
- mask &= ~(1 << (queue_id - 32));
+ mask |= (1 << (queue_id - 32));
wr32(hw, TXGBE_IMS(1), mask);
}
@@ -3814,7 +3814,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
wr32(hw, TXGBE_IVARMISC, tmp);
} else {
/* rx or tx causes */
- /* Workaround for ICR lost */
+ msix_vector |= TXGBE_IVAR_VLD; /* Workaround for ICR lost */
idx = ((16 * (queue & 1)) + (8 * direction));
tmp = rd32(hw, TXGBE_IVAR(queue >> 1));
tmp &= ~(0xFF << idx);
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index b42c94adc1..92603fccc2 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -970,7 +970,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
wr32(hw, TXGBE_VFIVARMISC, tmp);
} else {
/* rx or tx cause */
- /* Workaround for ICR lost */
+ msix_vector |= TXGBE_VFIVAR_VLD; /* Workaround for ICR lost */
idx = ((16 * (queue & 1)) + (8 * direction));
tmp = rd32(hw, TXGBE_VFIVAR(queue >> 1));
tmp &= ~(0xFF << idx);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.303649669 +0100
+++ 0074-net-txgbe-fix-Rx-interrupt.patch 2024-07-15 16:19:34.716209623 +0100
@@ -1 +1 @@
-From 37af8751f2726cd49881d2cf8089302893ea0f41 Mon Sep 17 00:00:00 2001
+From 48d15a5ef2691310b599404a157456594299f118 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 26cf7632c3..700be8f83c 100644
+index a99178ff45..2ed5ee683f 100644
@@ -21 +22 @@
-@@ -3852,13 +3852,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3755,13 +3755,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -41 +42 @@
-@@ -3873,11 +3873,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3776,11 +3776,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -55 +56 @@
-@@ -3911,7 +3911,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -3814,7 +3814,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
@@ -65 +66 @@
-index 87f76673d7..d075f9d232 100644
+index b42c94adc1..92603fccc2 100644
@@ -68 +69 @@
-@@ -971,7 +971,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -970,7 +970,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/vmxnet3: fix init logs' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (72 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix Rx interrupt' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " luca.boccassi
` (10 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: David Marchand; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a91148a6fe4b4d54a0f3b56a82bcf947e1adc202
Thanks.
Luca Boccassi
---
From a91148a6fe4b4d54a0f3b56a82bcf947e1adc202 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:22:52 +0200
Subject: [PATCH] net/vmxnet3: fix init logs
[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]
All logs for this driver are emitted under pmd.net.vmxnet3.driver while
two logtypes exist.
This issue comes from the conversion to dynamic logtypes change.
Redirect PMD_INIT_LOG to pmd.net.vmxnet3.init.
Fixes: 79daffdcb6ac ("net/vmxnet3: implement dynamic logging")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/vmxnet3/vmxnet3_logs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 74154e3a1a..ae8542811a 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -7,7 +7,7 @@
extern int vmxnet3_logtype_init;
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
+ rte_log(RTE_LOG_ ## level, vmxnet3_logtype_init, \
"%s(): " fmt "\n", __func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.350789860 +0100
+++ 0075-net-vmxnet3-fix-init-logs.patch 2024-07-15 16:19:34.716209623 +0100
@@ -1 +1 @@
-From e095395a416d33e45cb626bf8fbdee7a2ce355af Mon Sep 17 00:00:00 2001
+From a91148a6fe4b4d54a0f3b56a82bcf947e1adc202 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e2127988f6..5962325d62 100644
+index 74154e3a1a..ae8542811a 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: fix IPv6 TTL and DSCP flow action' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (73 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/vmxnet3: fix init logs' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: fix allocation of switch domain' " luca.boccassi
` (9 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f4affbfda7292608bf4d2fa4b53d77a5fc3d6683
Thanks.
Luca Boccassi
---
From f4affbfda7292608bf4d2fa4b53d77a5fc3d6683 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Wed, 19 Jun 2024 17:13:38 +0800
Subject: [PATCH] net/nfp: fix IPv6 TTL and DSCP flow action
[ upstream commit 76caca76bf62efb041642194adf47181f9fe1bc2 ]
The IPv6 TTL and DSCP flow action logic use 'ttl_tos_flag' wrongly,
actually it should use 'tc_hl_flag'.
Fixes: ac12e126c482 ("net/nfp: support TTL flow action")
Fixes: 3202b003bec1 ("net/nfp: support IPv6 DSCP flow action")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_flow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index faa0eda325..2635ba4cea 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3445,7 +3445,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
ttl_tos_flag = true;
}
} else {
- nfp_flow_action_set_hl(position, action, ttl_tos_flag);
+ nfp_flow_action_set_hl(position, action, tc_hl_flag);
if (!tc_hl_flag) {
position += sizeof(struct nfp_fl_act_set_ipv6_tc_hl_fl);
tc_hl_flag = true;
@@ -3462,7 +3462,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
break;
case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP");
- nfp_flow_action_set_tc(position, action, ttl_tos_flag);
+ nfp_flow_action_set_tc(position, action, tc_hl_flag);
if (!tc_hl_flag) {
position += sizeof(struct nfp_fl_act_set_ipv6_tc_hl_fl);
tc_hl_flag = true;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.392360594 +0100
+++ 0076-net-nfp-fix-IPv6-TTL-and-DSCP-flow-action.patch 2024-07-15 16:19:34.720209709 +0100
@@ -1 +1 @@
-From 76caca76bf62efb041642194adf47181f9fe1bc2 Mon Sep 17 00:00:00 2001
+From f4affbfda7292608bf4d2fa4b53d77a5fc3d6683 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76caca76bf62efb041642194adf47181f9fe1bc2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 4 ++--
+ drivers/net/nfp/nfp_flow.c | 4 ++--
@@ -20,5 +21,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index bd77807db0..45a020b228 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -3833,7 +3833,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index faa0eda325..2635ba4cea 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -3445,7 +3445,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
@@ -33 +34 @@
-@@ -3850,7 +3850,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+@@ -3462,7 +3462,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: fix allocation of switch domain' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (74 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ionic: fix mbuf double-free when emptying array' " luca.boccassi
` (8 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/087d968fc074cdd4d1177518c6fcd512d6d63db7
Thanks.
Luca Boccassi
---
From 087d968fc074cdd4d1177518c6fcd512d6d63db7 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Wed, 19 Jun 2024 17:51:33 +0800
Subject: [PATCH] net/nfp: fix allocation of switch domain
[ upstream commit e393598fc2967284398fcdfee6c7a75d0ceb95db ]
The check of 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID' cause the following
call of 'rte_eth_switch_domain_alloc()' never trigger.
Fix this by just remove the check logic.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/flower/nfp_flower_representor.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 090c828c18..b6e58d31ff 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -1047,10 +1047,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)
pci_dev = pf_dev->pci_dev;
/* Allocate a switch domain for the flower app */
- if (app_fw_flower->switch_domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID &&
- rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id) != 0) {
+ ret = rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id);
+ if (ret != 0)
PMD_INIT_LOG(WARNING, "failed to allocate switch domain for device");
- }
/* Now parse PCI device args passed for representor info */
if (pci_dev->device.devargs != NULL) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.441155274 +0100
+++ 0077-net-nfp-fix-allocation-of-switch-domain.patch 2024-07-15 16:19:34.720209709 +0100
@@ -1 +1 @@
-From e393598fc2967284398fcdfee6c7a75d0ceb95db Mon Sep 17 00:00:00 2001
+From 087d968fc074cdd4d1177518c6fcd512d6d63db7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e393598fc2967284398fcdfee6c7a75d0ceb95db ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 700957f945..e7550ce9ef 100644
+index 090c828c18..b6e58d31ff 100644
@@ -25 +26 @@
-@@ -907,10 +907,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower,
+@@ -1047,10 +1047,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ionic: fix mbuf double-free when emptying array' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (75 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/nfp: fix allocation of switch domain' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: disable ctrl VNIC queues on close' " luca.boccassi
` (7 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Andrew Boyer; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/047aff2cf1715705748e3cc4b20b28e61340393a
Thanks.
Luca Boccassi
---
From 047aff2cf1715705748e3cc4b20b28e61340393a Mon Sep 17 00:00:00 2001
From: Andrew Boyer <andrew.boyer@amd.com>
Date: Mon, 1 Jul 2024 08:19:43 -0700
Subject: [PATCH] net/ionic: fix mbuf double-free when emptying array
[ upstream commit d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 ]
The bulk-allocation array is used back to front, so we need to free
everything before the marker, not after it. Flip ionic_empty_array()
so that it frees from 0 to the provided index. Adjust the callers
as needed.
Fixes: 218afd825bca ("net/ionic: do bulk allocations of Rx mbufs")
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
drivers/net/ionic/ionic_rxtx.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 2f1ca986b3..170d3b0802 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -26,38 +26,40 @@
#include "ionic_logs.h"
static void
-ionic_empty_array(void **array, uint32_t cnt, uint16_t idx)
+ionic_empty_array(void **array, uint32_t free_idx, uint32_t zero_idx)
{
uint32_t i;
- for (i = idx; i < cnt; i++)
+ for (i = 0; i < free_idx; i++)
if (array[i])
rte_pktmbuf_free_seg(array[i]);
- memset(array, 0, sizeof(void *) * cnt);
+ memset(array, 0, sizeof(void *) * zero_idx);
}
static void __rte_cold
ionic_tx_empty(struct ionic_tx_qcq *txq)
{
struct ionic_queue *q = &txq->qcq.q;
+ uint32_t info_len = q->num_descs * q->num_segs;
- ionic_empty_array(q->info, q->num_descs * q->num_segs, 0);
+ ionic_empty_array(q->info, info_len, info_len);
}
static void __rte_cold
ionic_rx_empty(struct ionic_rx_qcq *rxq)
{
struct ionic_queue *q = &rxq->qcq.q;
+ uint32_t info_len = q->num_descs * q->num_segs;
/*
* Walk the full info array so that the clean up includes any
* fragments that were left dangling for later reuse
*/
- ionic_empty_array(q->info, q->num_descs * q->num_segs, 0);
+ ionic_empty_array(q->info, info_len, info_len);
- ionic_empty_array((void **)rxq->mbs,
- IONIC_MBUF_BULK_ALLOC, rxq->mb_idx);
+ ionic_empty_array((void **)rxq->mbs, rxq->mb_idx,
+ IONIC_MBUF_BULK_ALLOC);
rxq->mb_idx = 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.482283536 +0100
+++ 0078-net-ionic-fix-mbuf-double-free-when-emptying-array.patch 2024-07-15 16:19:34.720209709 +0100
@@ -1 +1 @@
-From d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 Mon Sep 17 00:00:00 2001
+From 047aff2cf1715705748e3cc4b20b28e61340393a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 ]
+
@@ -12 +13,0 @@
-CC: stable@dpdk.org
@@ -20 +21 @@
-index 923f517661..339b20f113 100644
+index 2f1ca986b3..170d3b0802 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: disable ctrl VNIC queues on close' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (76 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ionic: fix mbuf double-free when emptying array' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ena: fix bad checksum handling' " luca.boccassi
` (6 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Peng Zhang; +Cc: Chaoyong He, Long Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/59adabd7873c3c17ad879823612ff22b72a238ef
Thanks.
Luca Boccassi
---
From 59adabd7873c3c17ad879823612ff22b72a238ef Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Wed, 19 Jun 2024 17:58:09 +0800
Subject: [PATCH] net/nfp: disable ctrl VNIC queues on close
[ upstream commit 23a04fe2b8b7775aaa694bb1253c9072b74210fc ]
The logic forgot to disable the ctrl VNIC queues when representor
port close, and this will cause DPDK application restart fail if
not force reload the flower firmware.
Fix this by adding the missing logic to disable the ctrl VNIC
queues.
Fixes: 945441ebdb9c ("net/nfp: add flower ctrl VNIC")
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
drivers/net/nfp/flower/nfp_flower.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index bc1df0d369..360345c50b 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -920,6 +920,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_net_hw *hw)
pci_name = strchr(app_fw_flower->pf_hw->pf_dev->pci_dev->name, ':') + 1;
+ nfp_net_disable_queues(eth_dev);
+
snprintf(ctrl_txring_name, sizeof(ctrl_txring_name), "%s_cttx_ring", pci_name);
for (i = 0; i < hw->max_tx_queues; i++) {
txq = eth_dev->data->tx_queues[i];
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.527030002 +0100
+++ 0079-net-nfp-disable-ctrl-VNIC-queues-on-close.patch 2024-07-15 16:19:34.724209794 +0100
@@ -1 +1 @@
-From 23a04fe2b8b7775aaa694bb1253c9072b74210fc Mon Sep 17 00:00:00 2001
+From 59adabd7873c3c17ad879823612ff22b72a238ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 23a04fe2b8b7775aaa694bb1253c9072b74210fc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 0edebd574a..5caaf9d745 100644
+index bc1df0d369..360345c50b 100644
@@ -27 +28 @@
-@@ -533,6 +533,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_app_fw_flower *app_fw_flower,
+@@ -920,6 +920,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_net_hw *hw)
@@ -29 +30 @@
- pci_name = strchr(hw_priv->pf_dev->pci_dev->name, ':') + 1;
+ pci_name = strchr(app_fw_flower->pf_hw->pf_dev->pci_dev->name, ':') + 1;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ena: fix bad checksum handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (77 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/nfp: disable ctrl VNIC queues on close' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ena: fix return value check' " luca.boccassi
` (5 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Shai Brandes; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/33ddd1e51dfebd10c239b596556d8d3a2153cd4d
Thanks.
Luca Boccassi
---
From 33ddd1e51dfebd10c239b596556d8d3a2153cd4d Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:22 +0300
Subject: [PATCH] net/ena: fix bad checksum handling
[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
Removed a workaround for a false L4 bad Rx csum
indication from the device. The workaround was to set it
as unknown so the application would check it instead.
The issue was fixed in the device, thus the driver bad csum
handling should be fixed in the PMD.
Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 29782a7fb6..2fcd74a0e0 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -595,13 +595,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
} else {
if (unlikely(ena_rx_ctx->l4_csum_err)) {
++rx_stats->l4_csum_bad;
- /*
- * For the L4 Rx checksum offload the HW may indicate
- * bad checksum although it's valid. Because of that,
- * we're setting the UNKNOWN flag to let the app
- * re-verify the checksum.
- */
- ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
+ ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
} else {
++rx_stats->l4_csum_good;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.568469863 +0100
+++ 0080-net-ena-fix-bad-checksum-handling.patch 2024-07-15 16:19:34.724209794 +0100
@@ -1 +1 @@
-From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00 2001
+From 33ddd1e51dfebd10c239b596556d8d3a2153cd4d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 4e7171e629..b43b913903 100644
+index 29782a7fb6..2fcd74a0e0 100644
@@ -24 +25 @@
-@@ -674,13 +674,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
+@@ -595,13 +595,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ena: fix return value check' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (78 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ena: fix bad checksum handling' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/ena: fix checksum handling' " luca.boccassi
` (4 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Shai Brandes; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cf4bb6bffc2193d84dd26be22e1582b4218caf8f
Thanks.
Luca Boccassi
---
From cf4bb6bffc2193d84dd26be22e1582b4218caf8f Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:23 +0300
Subject: [PATCH] net/ena: fix return value check
[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]
Removed the sign inversion for when checking if
ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED.
ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign
inversion is wrong.
Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 2fcd74a0e0..881e2ecdaf 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -733,7 +733,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
rc = ena_com_set_host_attributes(ena_dev);
if (rc) {
- if (rc == -ENA_COM_UNSUPPORTED)
+ if (rc == ENA_COM_UNSUPPORTED)
PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
else
PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
@@ -773,7 +773,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
rc = ena_com_set_host_attributes(&adapter->ena_dev);
if (rc) {
- if (rc == -ENA_COM_UNSUPPORTED)
+ if (rc == ENA_COM_UNSUPPORTED)
PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
else
PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.612557630 +0100
+++ 0081-net-ena-fix-return-value-check.patch 2024-07-15 16:19:34.728209880 +0100
@@ -1 +1 @@
-From 8936b01a512a8e25a7369d282a17b9b09c55728b Mon Sep 17 00:00:00 2001
+From cf4bb6bffc2193d84dd26be22e1582b4218caf8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b43b913903..67a1d86f9a 100644
+index 2fcd74a0e0..881e2ecdaf 100644
@@ -23 +24 @@
-@@ -812,7 +812,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
+@@ -733,7 +733,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
@@ -32 +33 @@
-@@ -856,7 +856,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
+@@ -773,7 +773,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ena: fix checksum handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (79 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ena: fix return value check' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: forbid offload flow rules with empty action list' " luca.boccassi
` (3 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Shai Brandes; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/18b7942cef2ec0c26c7999550d72f4558e456cd3
Thanks.
Luca Boccassi
---
From 18b7942cef2ec0c26c7999550d72f4558e456cd3 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:24 +0300
Subject: [PATCH] net/ena: fix checksum handling
[ upstream commit f66055c7564050e55c7eab147d039bf01048829a ]
This change fixes an issue where a non tcp/udp packet can be indicated
to have an invalid csum. If the device erroneously tries to verify the
csum on a non tcp/udp packet it will result in false indication that
there is a csum error. This change make the driver ignore the
indication for csum error on such packets.
Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 881e2ecdaf..e640bbae3d 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -590,7 +590,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
packet_type |= RTE_PTYPE_L3_IPV6;
}
- if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) {
+ if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag ||
+ !(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) {
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
} else {
if (unlikely(ena_rx_ctx->l4_csum_err)) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.656312875 +0100
+++ 0082-net-ena-fix-checksum-handling.patch 2024-07-15 16:19:34.732209965 +0100
@@ -1 +1 @@
-From f66055c7564050e55c7eab147d039bf01048829a Mon Sep 17 00:00:00 2001
+From 18b7942cef2ec0c26c7999550d72f4558e456cd3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f66055c7564050e55c7eab147d039bf01048829a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 67a1d86f9a..a18c94df28 100644
+index 881e2ecdaf..e640bbae3d 100644
@@ -24 +25 @@
-@@ -669,7 +669,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
+@@ -590,7 +590,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: forbid offload flow rules with empty action list' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (80 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/ena: fix checksum handling' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: remove redundant function call' " luca.boccassi
` (2 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/59cee7032b7101cedd3e3b5eee8248f0cd9f1a20
Thanks.
Luca Boccassi
---
From 59cee7032b7101cedd3e3b5eee8248f0cd9f1a20 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:57:11 +0800
Subject: [PATCH] net/nfp: forbid offload flow rules with empty action list
[ upstream commit 78bbab16282a2b6b8b3983677b7b1a32543b909b ]
The original logic allow offload flow rules with empty action list, but
the matched packets will be drop by the flower firmware.
Fix this by forbidding offload this type flow rules.
Fixes: 4d946034bf9c ("net/nfp: support basic flow actions")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_flow.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 2635ba4cea..17c091ffa0 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3517,6 +3517,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
total_actions++;
}
+ if (nfp_flow->install_flag && total_actions == 0) {
+ PMD_DRV_LOG(ERR, "The action list is empty");
+ return -ENOTSUP;
+ }
+
if (drop_flag)
nfp_flow_meta->shortcut = rte_cpu_to_be_32(NFP_FL_SC_ACT_DROP);
else if (total_actions > 1)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.699568278 +0100
+++ 0083-net-nfp-forbid-offload-flow-rules-with-empty-action-.patch 2024-07-15 16:19:34.736210050 +0100
@@ -1 +1 @@
-From 78bbab16282a2b6b8b3983677b7b1a32543b909b Mon Sep 17 00:00:00 2001
+From 59cee7032b7101cedd3e3b5eee8248f0cd9f1a20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78bbab16282a2b6b8b3983677b7b1a32543b909b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 5 +++++
+ drivers/net/nfp/nfp_flow.c | 5 +++++
@@ -21,5 +22,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index f6a520248b..cf2b919e7e 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -4803,6 +4803,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index 2635ba4cea..17c091ffa0 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -3517,6 +3517,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
@@ -34,2 +35 @@
- nfp_flow_meta = nfp_flow->payload.meta;
- if (flag.drop_flag)
+ if (drop_flag)
@@ -36,0 +37 @@
+ else if (total_actions > 1)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: remove redundant function call' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (81 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/nfp: forbid offload flow rules with empty action list' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: adapt reverse sequence card' " luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0c73b671c88aaef8fabf1ce5622ab6ce2b9a42b5
Thanks.
Luca Boccassi
---
From 0c73b671c88aaef8fabf1ce5622ab6ce2b9a42b5 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:57:12 +0800
Subject: [PATCH] net/nfp: remove redundant function call
[ upstream commit d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 ]
Remove the redundancy call of 'rte_eth_copy_pci_info()' as the API
'rte_eth_dev_pci_allocate()' already done that.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_ethdev_vf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index 435127604a..60e90cd5cb 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -320,8 +320,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- rte_eth_copy_pci_info(eth_dev, pci_dev);
-
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
hw->subsystem_device_id = pci_dev->id.subsystem_device_id;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.745739001 +0100
+++ 0084-net-nfp-remove-redundant-function-call.patch 2024-07-15 16:19:34.736210050 +0100
@@ -1 +1 @@
-From d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 Mon Sep 17 00:00:00 2001
+From 0c73b671c88aaef8fabf1ce5622ab6ce2b9a42b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a422bcd057..e7c18fe90a 100644
+index 435127604a..60e90cd5cb 100644
@@ -23 +24 @@
-@@ -302,8 +302,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
+@@ -320,8 +320,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
@@ -29,3 +30,3 @@
- net_hw->eth_xstats_base = rte_malloc("rte_eth_xstat",
- sizeof(struct rte_eth_xstat) * nfp_net_xstats_size(eth_dev), 0);
- if (net_hw->eth_xstats_base == NULL) {
+ hw->device_id = pci_dev->id.device_id;
+ hw->vendor_id = pci_dev->id.vendor_id;
+ hw->subsystem_device_id = pci_dev->id.subsystem_device_id;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: adapt reverse sequence card' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (82 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/nfp: remove redundant function call' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Peng Zhang; +Cc: Chaoyong He, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f0e36f585baa5f80a93c3bc50a81c62fa657ffb8
Thanks.
Luca Boccassi
---
From f0e36f585baa5f80a93c3bc50a81c62fa657ffb8 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Mon, 24 Jun 2024 09:57:21 +0800
Subject: [PATCH] net/nfp: adapt reverse sequence card
[ upstream commit 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 ]
The NFP chip-wide port index is 'eth_port->index'.
In the normal card, it uses 'eth_port->eth_index', but because
'eth_port->eth_index' and 'eth_port->index' have the same value,
it doesn't have any problem.
But in the reverse sequence card, the value is different,
so it will lead the 'nfp_eth_config_start()' failed.
In this commit, fix this bug by using 'eth_port->index'.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
drivers/net/nfp/flower/nfp_flower_representor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index b6e58d31ff..d5aed8791a 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -970,7 +970,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
eth_port = &nfp_eth_table->ports[i];
flower_repr.repr_type = NFP_REPR_TYPE_PHYS_PORT;
flower_repr.port_id = nfp_flower_get_phys_port_id(eth_port->index);
- flower_repr.nfp_idx = eth_port->eth_index;
+ flower_repr.nfp_idx = eth_port->index;
flower_repr.vf_id = i + 1;
/* Copy the real mac of the interface to the representor struct */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.784601749 +0100
+++ 0085-net-nfp-adapt-reverse-sequence-card.patch 2024-07-15 16:19:34.740210136 +0100
@@ -1 +1 @@
-From 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 Mon Sep 17 00:00:00 2001
+From f0e36f585baa5f80a93c3bc50a81c62fa657ffb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 086dbc58e3..b1589cf78c 100644
+index b6e58d31ff..d5aed8791a 100644
@@ -28,2 +29,2 @@
-@@ -845,7 +845,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower,
- eth_port = &nfp_eth_table->ports[id];
+@@ -970,7 +970,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+ eth_port = &nfp_eth_table->ports[i];
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: fix disabling 32-bit build' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (83 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/nfp: adapt reverse sequence card' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
84 siblings, 1 reply; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a0bb9efc615dd2753788826b1a6ad86024dd298e
Thanks.
Luca Boccassi
---
From a0bb9efc615dd2753788826b1a6ad86024dd298e Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Tue, 9 Jul 2024 16:24:01 +0800
Subject: [PATCH] net/nfp: fix disabling 32-bit build
[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]
NFP PMD only support compile on 64-bit linux OS, add exit logic in
other conditions.
Fixes: 8741a9074536 ("net/nfp: disable for 32-bit meson builds")
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/nfp/meson.build b/drivers/net/nfp/meson.build
index 7416fd3706..bc3bc737a0 100644
--- a/drivers/net/nfp/meson.build
+++ b/drivers/net/nfp/meson.build
@@ -4,6 +4,7 @@
if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
build = false
reason = 'only supported on 64-bit Linux'
+ subdir_done()
endif
sources = files(
'flower/nfp_flower.c',
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.825489437 +0100
+++ 0086-net-nfp-fix-disabling-32-bit-build.patch 2024-07-15 16:19:34.740210136 +0100
@@ -1 +1 @@
-From c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 Mon Sep 17 00:00:00 2001
+From a0bb9efc615dd2753788826b1a6ad86024dd298e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d805644ec5..7216c8dff9 100644
+index 7416fd3706..bc3bc737a0 100644
@@ -29 +29,0 @@
-
@@ -30,0 +31 @@
+ 'flower/nfp_flower.c',
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/qat: fix GEN4 write' has been queued to stable release 22.11.6
2024-07-15 15:27 ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
` (38 more replies)
0 siblings, 39 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Brian Dooley; +Cc: Arkadiusz Kusztal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e793a7063f95d32916301282a820ffb16933b25e
Thanks.
Luca Boccassi
---
From e793a7063f95d32916301282a820ffb16933b25e Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Fri, 12 Jul 2024 15:48:51 +0100
Subject: [PATCH] crypto/qat: fix GEN4 write
[ upstream commit c355c2d8e65f02fa9621249c9b2a111477230c89 ]
All generations of QAT use the same Gen1 raw datapath.
Gen4 needs a different WRITE function than other generations.
Added separation for configuration of raw ctx for Gen4 from
the Gen1 codepath.
Fixes: 85fec6fd9674 ("crypto/qat: unify raw data path functions")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 121 ++++++++++++++++++-
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 6 +
2 files changed, 123 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
index b219a418ba..52218e5a0a 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
@@ -9,6 +9,7 @@
#include "qat_asym.h"
#include "qat_crypto.h"
#include "qat_crypto_pmd_gens.h"
+#include "adf_transport_access_macros_gen4vf.h"
static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen4[] = {
QAT_SYM_CIPHER_CAP(AES_CBC,
@@ -223,6 +224,78 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx,
return 0;
}
+int
+qat_sym_dp_enqueue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n)
+{
+ struct qat_qp *qp = qp_data;
+ struct qat_queue *tx_queue = &qp->tx_q;
+ struct qat_sym_dp_ctx *dp_ctx = (void *)drv_ctx;
+
+ if (unlikely(dp_ctx->cached_enqueue != n))
+ return -1;
+
+ qp->enqueued += n;
+ qp->stats.enqueued_count += n;
+
+ tx_queue->tail = dp_ctx->tail;
+
+ WRITE_CSR_RING_TAIL_GEN4VF(qp->mmap_bar_addr,
+ tx_queue->hw_bundle_number,
+ tx_queue->hw_queue_number, tx_queue->tail);
+
+ tx_queue->csr_tail = tx_queue->tail;
+ dp_ctx->cached_enqueue = 0;
+
+ return 0;
+}
+
+int
+qat_sym_dp_dequeue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n)
+{
+ struct qat_qp *qp = qp_data;
+ struct qat_queue *rx_queue = &qp->rx_q;
+ struct qat_sym_dp_ctx *dp_ctx = (void *)drv_ctx;
+
+ if (unlikely(dp_ctx->cached_dequeue != n))
+ return -1;
+
+ rx_queue->head = dp_ctx->head;
+ rx_queue->nb_processed_responses += n;
+ qp->dequeued += n;
+ qp->stats.dequeued_count += n;
+ if (rx_queue->nb_processed_responses > QAT_CSR_HEAD_WRITE_THRESH) {
+ uint32_t old_head, new_head;
+ uint32_t max_head;
+
+ old_head = rx_queue->csr_head;
+ new_head = rx_queue->head;
+ max_head = qp->nb_descriptors * rx_queue->msg_size;
+
+ /* write out free descriptors */
+ void *cur_desc = (uint8_t *)rx_queue->base_addr + old_head;
+
+ if (new_head < old_head) {
+ memset(cur_desc, ADF_RING_EMPTY_SIG_BYTE,
+ max_head - old_head);
+ memset(rx_queue->base_addr, ADF_RING_EMPTY_SIG_BYTE,
+ new_head);
+ } else {
+ memset(cur_desc, ADF_RING_EMPTY_SIG_BYTE, new_head -
+ old_head);
+ }
+ rx_queue->nb_processed_responses = 0;
+ rx_queue->csr_head = new_head;
+
+ /* write current head to CSR */
+ WRITE_CSR_RING_HEAD_GEN4VF(qp->mmap_bar_addr,
+ rx_queue->hw_bundle_number, rx_queue->hw_queue_number,
+ new_head);
+ }
+
+ dp_ctx->cached_dequeue = 0;
+ return 0;
+}
+
static int
qat_sym_crypto_set_session_gen4(void *cdev, void *session)
{
@@ -383,11 +456,51 @@ qat_sym_configure_raw_dp_ctx_gen4(void *_raw_dp_ctx, void *_ctx)
{
struct rte_crypto_raw_dp_ctx *raw_dp_ctx = _raw_dp_ctx;
struct qat_sym_session *ctx = _ctx;
- int ret;
- ret = qat_sym_configure_raw_dp_ctx_gen1(_raw_dp_ctx, _ctx);
- if (ret < 0)
- return ret;
+ raw_dp_ctx->enqueue_done = qat_sym_dp_enqueue_done_gen4;
+ raw_dp_ctx->dequeue_burst = qat_sym_dp_dequeue_burst_gen1;
+ raw_dp_ctx->dequeue = qat_sym_dp_dequeue_single_gen1;
+ raw_dp_ctx->dequeue_done = qat_sym_dp_dequeue_done_gen4;
+
+ if ((ctx->qat_cmd == ICP_QAT_FW_LA_CMD_HASH_CIPHER ||
+ ctx->qat_cmd == ICP_QAT_FW_LA_CMD_CIPHER_HASH) &&
+ !ctx->is_gmac) {
+ /* AES-GCM or AES-CCM */
+ if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_128 ||
+ ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_64 ||
+ (ctx->qat_cipher_alg == ICP_QAT_HW_CIPHER_ALGO_AES128
+ && ctx->qat_mode == ICP_QAT_HW_CIPHER_CTR_MODE
+ && ctx->qat_hash_alg ==
+ ICP_QAT_HW_AUTH_ALGO_AES_CBC_MAC)) {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_aead_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_aead_gen1;
+ } else {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_chain_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_chain_gen1;
+ }
+ } else if (ctx->qat_cmd == ICP_QAT_FW_LA_CMD_AUTH || ctx->is_gmac) {
+ raw_dp_ctx->enqueue_burst = qat_sym_dp_enqueue_auth_jobs_gen1;
+ raw_dp_ctx->enqueue = qat_sym_dp_enqueue_single_auth_gen1;
+ } else if (ctx->qat_cmd == ICP_QAT_FW_LA_CMD_CIPHER) {
+ if (ctx->qat_mode == ICP_QAT_HW_CIPHER_AEAD_MODE ||
+ ctx->qat_cipher_alg ==
+ ICP_QAT_HW_CIPHER_ALGO_CHACHA20_POLY1305) {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_aead_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_aead_gen1;
+ } else {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_cipher_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_cipher_gen1;
+ }
+ } else
+ return -1;
if (ctx->is_single_pass && ctx->is_ucs) {
raw_dp_ctx->enqueue_burst = qat_sym_dp_enqueue_aead_jobs_gen4;
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 2b1b0eb717..1acb0c4985 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -927,6 +927,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
int
qat_sym_dp_dequeue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+int
+qat_sym_dp_enqueue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+
+int
+qat_sym_dp_dequeue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+
int
qat_sym_configure_raw_dp_ctx_gen1(void *_raw_dp_ctx, void *_ctx);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:20.924881196 +0100
+++ 0001-crypto-qat-fix-GEN4-write.patch 2024-07-24 12:29:20.623023153 +0100
@@ -1 +1 @@
-From c355c2d8e65f02fa9621249c9b2a111477230c89 Mon Sep 17 00:00:00 2001
+From e793a7063f95d32916301282a820ffb16933b25e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c355c2d8e65f02fa9621249c9b2a111477230c89 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 5e808a60bf..6a5d6e78b9 100644
+index b219a418ba..52218e5a0a 100644
@@ -31,3 +32,3 @@
-
- static struct rte_cryptodev_capabilities qat_sym_crypto_legacy_caps_gen4[] = {
-@@ -233,6 +234,78 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx,
+ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen4[] = {
+ QAT_SYM_CIPHER_CAP(AES_CBC,
+@@ -223,6 +224,78 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx,
@@ -109 +110 @@
- int
+ static int
@@ -112 +113 @@
-@@ -390,11 +463,51 @@ qat_sym_configure_raw_dp_ctx_gen4(void *_raw_dp_ctx, void *_ctx)
+@@ -383,11 +456,51 @@ qat_sym_configure_raw_dp_ctx_gen4(void *_raw_dp_ctx, void *_ctx)
@@ -169 +170 @@
-index 1f5d2583c4..2c5816e696 100644
+index 2b1b0eb717..1acb0c4985 100644
@@ -172 +173 @@
-@@ -1040,6 +1040,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+@@ -927,6 +927,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/ipsec_mb: fix function comment' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix allocation " luca.boccassi
` (37 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Brian Dooley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8e373a7f33beb4139c9460e33d8d222942e6fef1
Thanks.
Luca Boccassi
---
From 8e373a7f33beb4139c9460e33d8d222942e6fef1 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:05 +0000
Subject: [PATCH] crypto/ipsec_mb: fix function comment
[ upstream commit 2615a7312153fac0bf2507248c28bc6e1b35289e ]
This patch fixes a typo in the log message for error allocation.
The typo incorrectly spelled 'allocating' as 'allocationg' in the
log message for error allocation.
Fixes: f9dfb59edbcc ("crypto/ipsec_mb: support remaining SGL")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
.mailmap | 3 ++-
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index 95826dac6c..9ee9365f8b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -639,7 +639,8 @@ Jin Liu <jin.liu@corigine.com>
Jin Yu <jin.yu@intel.com>
Jiri Slaby <jslaby@suse.cz>
Job Abraham <job.abraham@intel.com>
-Jochen Behrens <jbehrens@vmware.com>
+Jochen Behrens <jochen.behrens@broadcom.com> <jbehrens@vmware.com>
+Joel Kavanagh <joel.kavanagh@intel.com>
Joey Xing <joey.xing@jaguarmicro.com>
Johan Faltstrom <johan.faltstrom@netinsight.net>
Johan Källström <johan.kallstrom@ericsson.com>
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
index 02d419b587..46da01254b 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
@@ -1249,7 +1249,7 @@ imb_lib_support_sgl_algo(IMB_CIPHER_MODE alg)
*
* @return
* - 0 on success, the IMB_JOB will be filled
- * - -1 if invalid session or errors allocationg SGL linear buffer,
+ * - -1 if invalid session or errors allocating SGL linear buffer,
* IMB_JOB will not be filled
*/
static inline int
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:20.987858980 +0100
+++ 0002-crypto-ipsec_mb-fix-function-comment.patch 2024-07-24 12:29:20.631023314 +0100
@@ -1 +1 @@
-From 2615a7312153fac0bf2507248c28bc6e1b35289e Mon Sep 17 00:00:00 2001
+From 8e373a7f33beb4139c9460e33d8d222942e6fef1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2615a7312153fac0bf2507248c28bc6e1b35289e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- .mailmap | 1 +
+ .mailmap | 3 ++-
@@ -18 +19 @@
- 2 files changed, 2 insertions(+), 1 deletion(-)
+ 2 files changed, 3 insertions(+), 2 deletions(-)
@@ -21 +22 @@
-index 3f3f0442e5..a6088813cc 100644
+index 95826dac6c..9ee9365f8b 100644
@@ -24 +25,2 @@
-@@ -685,6 +685,7 @@ Jin Yu <jin.yu@intel.com>
+@@ -639,7 +639,8 @@ Jin Liu <jin.liu@corigine.com>
+ Jin Yu <jin.yu@intel.com>
@@ -27 +29,2 @@
- Jochen Behrens <jochen.behrens@broadcom.com> <jbehrens@vmware.com>
+-Jochen Behrens <jbehrens@vmware.com>
++Jochen Behrens <jochen.behrens@broadcom.com> <jbehrens@vmware.com>
@@ -33 +36 @@
-index d74946c180..ef4228bd38 100644
+index 02d419b587..46da01254b 100644
@@ -36 +39 @@
-@@ -1534,7 +1534,7 @@ aesni_mb_digest_appended_in_src(struct rte_crypto_op *op, IMB_JOB *job,
+@@ -1249,7 +1249,7 @@ imb_lib_support_sgl_algo(IMB_CIPHER_MODE alg)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'test/crypto: fix allocation comment' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix log message typo' " luca.boccassi
` (36 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5a257288f85d01c4c199ca66c7da1bd8937f39ce
Thanks.
Luca Boccassi
---
From 5a257288f85d01c4c199ca66c7da1bd8937f39ce Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:06 +0000
Subject: [PATCH] test/crypto: fix allocation comment
[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]
This patch fixes a typo in the `test_cryptodev.c` file where "out-op" was
incorrectly used instead of "out-of-place" on three separate occasions.
Fixes: f3dbf94be60c ("app/test: check SGL on QAT")
Fixes: 43220096d66a ("test/crypto: add PDCP cases for scatter gather")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 68c82771a1..2069ccad3b 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8616,7 +8616,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
/* Out of place support */
if (oop) {
/*
- * For out-op-place we need to alloc another mbuf
+ * For out-of-place we need to alloc another mbuf
*/
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
rte_pktmbuf_append(ut_params->obuf, output_vec_len);
@@ -8825,7 +8825,7 @@ test_pdcp_proto_SGL(int i, int oop,
/* Out of place support */
if (oop) {
/*
- * For out-op-place we need to alloc another mbuf
+ * For out-of-place we need to alloc another mbuf
*/
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
rte_pktmbuf_append(ut_params->obuf, frag_size_oop);
@@ -14623,7 +14623,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
}
/*
- * For out-op-place we need to alloc another mbuf
+ * For out-of-place we need to alloc another mbuf
*/
if (oop) {
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.062323515 +0100
+++ 0003-test-crypto-fix-allocation-comment.patch 2024-07-24 12:29:20.659023877 +0100
@@ -1 +1 @@
-From 8020502dde70cabc7f65219d8f8db762b03b0e41 Mon Sep 17 00:00:00 2001
+From 5a257288f85d01c4c199ca66c7da1bd8937f39ce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6042db36a4..c846b26ed1 100644
+index 68c82771a1..2069ccad3b 100644
@@ -23 +24 @@
-@@ -9428,7 +9428,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
+@@ -8616,7 +8616,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
@@ -32 +33 @@
-@@ -9637,7 +9637,7 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -8825,7 +8825,7 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -41 +42 @@
-@@ -16831,7 +16831,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -14623,7 +14623,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/qat: fix log message typo' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix allocation " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'doc: fix typo in l2fwd-crypto guide' " luca.boccassi
` (35 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f4834455b224b08ae9d642323b3043f97cddec1d
Thanks.
Luca Boccassi
---
From f4834455b224b08ae9d642323b3043f97cddec1d Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:07 +0000
Subject: [PATCH] crypto/qat: fix log message typo
[ upstream commit 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 ]
This patch fixes a typo in the log message for rte_security support.
The typo incorrectly spelled 'enabled' as 'ensabled' in the
log message indicating that rte_security support is enabled.
Fixes: fb3b9f492205 ("crypto/qat: rework burst data path")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/qat/qat_sym.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 18f99089e8..f68d96f4f5 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -266,7 +266,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
}
cryptodev->feature_flags |= RTE_CRYPTODEV_FF_SECURITY;
- QAT_LOG(INFO, "Device %s rte_security support ensabled", name);
+ QAT_LOG(INFO, "Device %s rte_security support enabled", name);
} else {
QAT_LOG(INFO, "Device %s rte_security support disabled", name);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.154394270 +0100
+++ 0004-crypto-qat-fix-log-message-typo.patch 2024-07-24 12:29:20.659023877 +0100
@@ -1 +1 @@
-From 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 Mon Sep 17 00:00:00 2001
+From f4834455b224b08ae9d642323b3043f97cddec1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b41d1b1def..d979ae6489 100644
+index 18f99089e8..f68d96f4f5 100644
@@ -23 +24 @@
-@@ -291,7 +291,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
+@@ -266,7 +266,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: fix typo in l2fwd-crypto guide' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (2 preceding siblings ...)
2024-07-24 11:32 ` patch 'crypto/qat: fix log message typo' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: remove unused stats in setup' " luca.boccassi
` (34 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ffc0a0f5d9ba1c59a0f0ab64eb97af14e0fc8d90
Thanks.
Luca Boccassi
---
From ffc0a0f5d9ba1c59a0f0ab64eb97af14e0fc8d90 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:08 +0000
Subject: [PATCH] doc: fix typo in l2fwd-crypto guide
[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]
This patch fixes a typo in the l2fwd-crypto documentation where
the l2fwd-crypt was changed to l2fwd-crypto.
Fixes: 7cacb0565539 ("doc: add generic build instructions for sample apps")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index ce49eab96f..7ff304d05c 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -30,7 +30,7 @@ Compiling the Application
To compile the sample application see :doc:`compiling`.
-The application is located in the ``l2fwd-crypt`` sub-directory.
+The application is located in the ``l2fwd-crypto`` sub-directory.
Running the Application
-----------------------
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.217759525 +0100
+++ 0005-doc-fix-typo-in-l2fwd-crypto-guide.patch 2024-07-24 12:29:20.659023877 +0100
@@ -1 +1 @@
-From cf0556f4a11c1de87f94ed9ba0c14267cb034217 Mon Sep 17 00:00:00 2001
+From ffc0a0f5d9ba1c59a0f0ab64eb97af14e0fc8d90 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'test/crypto: remove unused stats in setup' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (3 preceding siblings ...)
2024-07-24 11:32 ` patch 'doc: fix typo in l2fwd-crypto guide' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix asymmetric capability test' " luca.boccassi
` (33 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5456b47a3a7b4208723f8664a8c6a80293b95723
Thanks.
Luca Boccassi
---
From 5456b47a3a7b4208723f8664a8c6a80293b95723 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:06:10 +0530
Subject: [PATCH] test/crypto: remove unused stats in setup
[ upstream commit cda0736804e1803c0c7176fd0d81e42e50b2d010 ]
Remove unused stats in test setup.
Coverity issue: 373869
Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
app/test/test_cryptodev_asym.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index b3345c0a39..be104b4952 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -953,8 +953,6 @@ ut_setup_asym(void)
qp_id, ts_params->valid_devs[0]);
}
- rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
-
/* Start the device */
TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->valid_devs[0]),
"Failed to start cryptodev %u",
@@ -967,9 +965,6 @@ static void
ut_teardown_asym(void)
{
struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
- struct rte_cryptodev_stats stats;
-
- rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
/* Stop the device */
rte_cryptodev_stop(ts_params->valid_devs[0]);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.284365669 +0100
+++ 0006-test-crypto-remove-unused-stats-in-setup.patch 2024-07-24 12:29:20.663023958 +0100
@@ -1 +1 @@
-From cda0736804e1803c0c7176fd0d81e42e50b2d010 Mon Sep 17 00:00:00 2001
+From 5456b47a3a7b4208723f8664a8c6a80293b95723 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cda0736804e1803c0c7176fd0d81e42e50b2d010 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ef926c6229..3802cf8022 100644
+index b3345c0a39..be104b4952 100644
@@ -22 +23 @@
-@@ -547,8 +547,6 @@ ut_setup_asym(void)
+@@ -953,8 +953,6 @@ ut_setup_asym(void)
@@ -31 +32 @@
-@@ -561,7 +559,6 @@ static void
+@@ -967,9 +965,6 @@ static void
@@ -36,8 +36,0 @@
- uint8_t dev_id = ts_params->valid_devs[0];
-
- if (self->sess != NULL)
-@@ -571,8 +568,6 @@ ut_teardown_asym(void)
- self->op = NULL;
- self->result_op = NULL;
-
-- rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
@@ -44,0 +38,2 @@
+- rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
+
@@ -47 +41,0 @@
- }
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'test/crypto: fix asymmetric capability test' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (4 preceding siblings ...)
2024-07-24 11:32 ` patch 'test/crypto: remove unused stats in setup' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix placement of OOP offset' " luca.boccassi
` (32 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/327b33505c5d49c92847b5c9d8961749060540d8
Thanks.
Luca Boccassi
---
From 327b33505c5d49c92847b5c9d8961749060540d8 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:07:25 +0530
Subject: [PATCH] test/crypto: fix asymmetric capability test
[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]
Updated asymmetric capability test for below issues:
* Skip test if asymmetric crypto feature is not supported by device.
* Assert return value of RTE function to get asymmetric capability.
Coverity issue: 373365
Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
app/test/test_cryptodev_asym.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index be104b4952..4c86a2bcec 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -1023,7 +1023,7 @@ test_capability(void)
RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) {
RTE_LOG(INFO, USER1,
"Device doesn't support asymmetric. Test Skipped\n");
- return TEST_SUCCESS;
+ return TEST_SKIPPED;
}
/* print xform capability */
@@ -1038,6 +1038,7 @@ test_capability(void)
capa = rte_cryptodev_asym_capability_get(dev_id,
(const struct
rte_cryptodev_asym_capability_idx *) &idx);
+ TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability");
print_asym_capa(capa);
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.355112267 +0100
+++ 0007-test-crypto-fix-asymmetric-capability-test.patch 2024-07-24 12:29:20.667024038 +0100
@@ -1 +1 @@
-From 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 Mon Sep 17 00:00:00 2001
+From 327b33505c5d49c92847b5c9d8961749060540d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3802cf8022..1d88832146 100644
+index be104b4952..4c86a2bcec 100644
@@ -24 +25 @@
-@@ -626,7 +626,7 @@ test_capability(void)
+@@ -1023,7 +1023,7 @@ test_capability(void)
@@ -33 +34 @@
-@@ -641,6 +641,7 @@ test_capability(void)
+@@ -1038,6 +1038,7 @@ test_capability(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/qat: fix placement of OOP offset' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (5 preceding siblings ...)
2024-07-24 11:32 ` patch 'test/crypto: fix asymmetric capability test' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " luca.boccassi
` (31 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Arkadiusz Kusztal; +Cc: Brian Dooley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/68d0c242e461594db53f2a9918a59b6fb3f18c5f
Thanks.
Luca Boccassi
---
From 68d0c242e461594db53f2a9918a59b6fb3f18c5f Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 4 Jul 2024 11:26:49 +0100
Subject: [PATCH] crypto/qat: fix placement of OOP offset
[ upstream commit 9f0a50dd2bc4acec586616bf5553de4711451991 ]
This patch fixes incorrect placement of OOP offset.
Data preceding crypto operation is not copied to the output
buffer, which is conformant to the API.
Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 1acb0c4985..266ab74a01 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -375,7 +375,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
struct qat_sym_op_cookie *cookie)
{
union rte_crypto_sym_ofs ofs;
- uint32_t max_len = 0;
+ uint32_t max_len = 0, oop_offset = 0;
uint32_t cipher_len = 0, cipher_ofs = 0;
uint32_t auth_len = 0, auth_ofs = 0;
int is_oop = (op->sym->m_dst != NULL) &&
@@ -438,6 +438,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
max_len = RTE_MAX(cipher_ofs + cipher_len, auth_ofs + auth_len);
+ /* If OOP, we need to keep in mind that offset needs to start where
+ * cipher/auth starts, namely no offset on the smaller one
+ */
+ if (is_oop) {
+ oop_offset = RTE_MIN(auth_ofs, cipher_ofs);
+ auth_ofs -= oop_offset;
+ cipher_ofs -= oop_offset;
+ max_len -= oop_offset;
+ }
+
/* digest in buffer check. Needed only for wireless algos */
if (ret == 1) {
/* Handle digest-encrypted cases, i.e.
@@ -471,9 +481,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
max_len = RTE_MAX(max_len, auth_ofs + auth_len +
ctx->digest_length);
}
-
- /* Passing 0 as cipher & auth offsets are assigned into ofs later */
- n_src = rte_crypto_mbuf_to_vec(op->sym->m_src, 0, max_len,
+ n_src = rte_crypto_mbuf_to_vec(op->sym->m_src, oop_offset, max_len,
in_sgl->vec, QAT_SYM_SGL_MAX_NUMBER);
if (unlikely(n_src < 0 || n_src > op->sym->m_src->nb_segs)) {
op->status = RTE_CRYPTO_OP_STATUS_ERROR;
@@ -483,7 +491,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
if (unlikely((op->sym->m_dst != NULL) &&
(op->sym->m_dst != op->sym->m_src))) {
- int n_dst = rte_crypto_mbuf_to_vec(op->sym->m_dst, 0,
+ int n_dst = rte_crypto_mbuf_to_vec(op->sym->m_dst, oop_offset,
max_len, out_sgl->vec, QAT_SYM_SGL_MAX_NUMBER);
if (n_dst < 0 || n_dst > op->sym->m_dst->nb_segs) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.426236716 +0100
+++ 0008-crypto-qat-fix-placement-of-OOP-offset.patch 2024-07-24 12:29:20.671024119 +0100
@@ -1 +1 @@
-From 9f0a50dd2bc4acec586616bf5553de4711451991 Mon Sep 17 00:00:00 2001
+From 68d0c242e461594db53f2a9918a59b6fb3f18c5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f0a50dd2bc4acec586616bf5553de4711451991 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2c5816e696..35c1888082 100644
+index 1acb0c4985..266ab74a01 100644
@@ -23 +24 @@
-@@ -399,7 +399,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -375,7 +375,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -32 +33 @@
-@@ -473,6 +473,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -438,6 +438,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -46,4 +47,4 @@
- /* digest in buffer check. Needed only for wireless algos
- * or combined cipher-crc operations
- */
-@@ -513,9 +523,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+ /* digest in buffer check. Needed only for wireless algos */
+ if (ret == 1) {
+ /* Handle digest-encrypted cases, i.e.
+@@ -471,9 +481,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -60 +61 @@
-@@ -525,7 +533,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -483,7 +491,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice: fix memory leaks in raw pattern parsing' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (6 preceding siblings ...)
2024-07-24 11:32 ` patch 'crypto/qat: fix placement of OOP offset' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/ice: fix return value for " luca.boccassi
` (30 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Vladimir Medvedkin
Cc: Michael Theodore Stolarchuk, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9928f1ec31182aba956b3d5e6f894eb7e97922b6
Thanks.
Luca Boccassi
---
From 9928f1ec31182aba956b3d5e6f894eb7e97922b6 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:44 +0000
Subject: [PATCH] net/ice: fix memory leaks in raw pattern parsing
[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]
This patch fixes possible memory leaks inside the
ice_hash_parse_raw_pattern() due to the lack of a call to rte_free() for
previously allocated pkt_buf and msk_buf.
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")
Reported-by: Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
.mailmap | 1 +
drivers/net/ice/ice_hash.c | 22 ++++++++++++++--------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/.mailmap b/.mailmap
index 9ee9365f8b..0398b858fb 100644
--- a/.mailmap
+++ b/.mailmap
@@ -915,6 +915,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
Michael Savisko <michaelsav@nvidia.com>
Michael Shamis <michaelsh@marvell.com>
Michael S. Tsirkin <mst@redhat.com>
+Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
Michael Wildt <michael.wildt@broadcom.com>
Michal Berger <michallinuxstuff@gmail.com>
Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 52646e9408..6fcfc5fc4c 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -657,7 +657,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
uint8_t *pkt_buf, *msk_buf;
uint8_t tmp_val = 0;
uint8_t tmp_c = 0;
- int i, j;
+ int i, j, ret = 0;
if (ad->psr == NULL)
return -rte_errno;
@@ -677,8 +677,10 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
return -ENOMEM;
msk_buf = rte_zmalloc(NULL, pkt_len, 0);
- if (!msk_buf)
+ if (!msk_buf) {
+ rte_free(pkt_buf);
return -ENOMEM;
+ }
/* convert string to int array */
for (i = 0, j = 0; i < spec_len; i += 2, j++) {
@@ -715,18 +717,22 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
msk_buf[j] = tmp_val * 16 + tmp_c - '0';
}
- if (ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt))
- return -rte_errno;
+ ret = ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt);
+ if (ret)
+ goto free_mem;
- if (ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
- pkt_len, ICE_BLK_RSS, true, &prof))
- return -rte_errno;
+ ret = ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
+ pkt_len, ICE_BLK_RSS, true, &prof);
+ if (ret)
+ goto free_mem;
rte_memcpy(&meta->raw.prof, &prof, sizeof(prof));
+free_mem:
rte_free(pkt_buf);
rte_free(msk_buf);
- return 0;
+
+ return ret;
}
static void
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.494044552 +0100
+++ 0009-net-ice-fix-memory-leaks-in-raw-pattern-parsing.patch 2024-07-24 12:29:20.675024200 +0100
@@ -1 +1 @@
-From 8044e1d19db3d0012bd1348cb4fcf542d31cd41a Mon Sep 17 00:00:00 2001
+From 9928f1ec31182aba956b3d5e6f894eb7e97922b6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a6088813cc..541ca895a4 100644
+index 9ee9365f8b..0398b858fb 100644
@@ -25 +26 @@
-@@ -978,6 +978,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
+@@ -915,6 +915,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
@@ -34 +35 @@
-index f923641533..6b3095e2c5 100644
+index 52646e9408..6fcfc5fc4c 100644
@@ -37 +38 @@
-@@ -650,7 +650,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -657,7 +657,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
@@ -46 +47 @@
-@@ -670,8 +670,10 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -677,8 +677,10 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
@@ -58 +59 @@
-@@ -708,18 +710,22 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -715,18 +717,22 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice: fix return value for raw pattern parsing' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (7 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " luca.boccassi
` (29 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e4447279159facfeb7f88155e79fd9210a950134
Thanks.
Luca Boccassi
---
From e4447279159facfeb7f88155e79fd9210a950134 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:46 +0000
Subject: [PATCH] net/ice: fix return value for raw pattern parsing
[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]
If the parser was not initialized when calling ice_hash_parse_raw_pattern()
-rte_errno was returned. Replace returning rte_errno with ENOTSUP since
rte_errno is meaningless in the context of ice_hash_parse_raw_pattern().
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/ice_hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 6fcfc5fc4c..94b104fb36 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -660,7 +660,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
int i, j, ret = 0;
if (ad->psr == NULL)
- return -rte_errno;
+ return -ENOTSUP;
raw_spec = item->spec;
raw_mask = item->mask;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.564495951 +0100
+++ 0010-net-ice-fix-return-value-for-raw-pattern-parsing.patch 2024-07-24 12:29:20.675024200 +0100
@@ -1 +1 @@
-From 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 Mon Sep 17 00:00:00 2001
+From e4447279159facfeb7f88155e79fd9210a950134 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index aa76718313..b720e0f755 100644
+index 6fcfc5fc4c..94b104fb36 100644
@@ -23 +24 @@
-@@ -653,7 +653,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -660,7 +660,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix Arm build with GCC 9.1' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (8 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/ice: fix return value for " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix MTU configuration' " luca.boccassi
` (28 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48bfee9777abf382ea28a470fa2591de7096d5da
Thanks.
Luca Boccassi
---
From 48bfee9777abf382ea28a470fa2591de7096d5da Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 7 Jul 2024 12:57:23 +0300
Subject: [PATCH] net/mlx5: fix Arm build with GCC 9.1
[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]
GCC has introduced a bugfix in 9.1 that changed GCC ABI in ARM setups
https://gcc.gnu.org/gcc-9/changes.html
```
On Arm targets (arm*-*-*), a bug in the implementation of the
procedure call standard (AAPCS) in the GCC 6, 7 and 8 releases
has been fixed a structure containing a bit-field based on a 64-bit
integral type and where no other element in a structure required
64-bit alignment could be passed incorrectly to functions.
This is an ABI change. If the option -Wpsabi is enabled
(on by default) the compiler will emit a diagnostic note for code
that might be affected.
```
This fixes the PMD compilation in the INTEGRITY flow item.
Fixes: 23b0a8b298b1 ("net/mlx5: fix integrity item validation and translation")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 2bdca754bc..6521b5b230 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6798,11 +6798,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
}
static int
-validate_integrity_bits(const struct rte_flow_item_integrity *mask,
+validate_integrity_bits(const void *arg,
int64_t pattern_flags, uint64_t l3_flags,
uint64_t l4_flags, uint64_t ip4_flag,
struct rte_flow_error *error)
{
+ const struct rte_flow_item_integrity *mask = arg;
+
if (mask->l3_ok && !(pattern_flags & l3_flags))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.632613162 +0100
+++ 0011-net-mlx5-fix-Arm-build-with-GCC-9.1.patch 2024-07-24 12:29:20.711024924 +0100
@@ -1 +1 @@
-From 42d6a9084f55281a70bece647803cddbeb8aaec8 Mon Sep 17 00:00:00 2001
+From 48bfee9777abf382ea28a470fa2591de7096d5da Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 8a0d58cb05..89057edbcf 100644
+index 2bdca754bc..6521b5b230 100644
@@ -34 +35 @@
-@@ -7396,11 +7396,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -6798,11 +6798,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix MTU configuration' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (9 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix deletion of action vport' " luca.boccassi
` (27 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/57ebce02cd957765c514593516ac3201225f1ed2
Thanks.
Luca Boccassi
---
From 57ebce02cd957765c514593516ac3201225f1ed2 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Mon, 8 Jul 2024 12:59:31 +0200
Subject: [PATCH] net/mlx5: fix MTU configuration
[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]
Apply provided MTU, derived from rte_eth_conf.rxmode.mtu,
on port configuration.
Bugzilla ID: 1483
Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 4a85415ff3..df7cd241a2 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -146,6 +146,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
ret = mlx5_proc_priv_init(dev);
if (ret)
return ret;
+ ret = mlx5_dev_set_mtu(dev, dev->data->mtu);
+ if (ret) {
+ DRV_LOG(ERR, "port %u failed to set MTU to %u", dev->data->port_id,
+ dev->data->mtu);
+ return ret;
+ }
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.731099588 +0100
+++ 0012-net-mlx5-fix-MTU-configuration.patch 2024-07-24 12:29:20.711024924 +0100
@@ -1 +1 @@
-From 10859ecf09c424c0f6a89379f0326a0c51f9cd2f Mon Sep 17 00:00:00 2001
+From 57ebce02cd957765c514593516ac3201225f1ed2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1b721cda5e..6a678d6dcc 100644
+index 4a85415ff3..df7cd241a2 100644
@@ -23 +24 @@
-@@ -154,6 +154,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
+@@ -146,6 +146,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: fix deletion of action vport' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (10 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix MTU configuration' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix port ID on root item convert' " luca.boccassi
` (26 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Erez Shitrit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6da7724d9e8b102d16c24bf390e853c94dacbae4
Thanks.
Luca Boccassi
---
From 6da7724d9e8b102d16c24bf390e853c94dacbae4 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 9 Jul 2024 15:30:59 +0300
Subject: [PATCH] net/mlx5/hws: fix deletion of action vport
[ upstream commit 29cd96c98dd999756f43715c7f3e85c44044b115 ]
No more ignoring this action while destroying it.
Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index b0ae4e7693..4fb9a03d80 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -1593,6 +1593,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
case MLX5DR_ACTION_TYP_ASO_METER:
case MLX5DR_ACTION_TYP_ASO_CT:
case MLX5DR_ACTION_TYP_PUSH_VLAN:
+ case MLX5DR_ACTION_TYP_VPORT:
mlx5dr_action_destroy_stcs(action);
break;
case MLX5DR_ACTION_TYP_POP_VLAN:
@@ -1614,6 +1615,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
mlx5dr_action_destroy_stcs(action);
mlx5dr_cmd_destroy_obj(action->reformat.arg_obj);
break;
+ default:
+ DR_LOG(ERR, "Not supported action type: %d", action->type);
+ assert(false);
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.799867647 +0100
+++ 0013-net-mlx5-hws-fix-deletion-of-action-vport.patch 2024-07-24 12:29:20.715025005 +0100
@@ -1 +1 @@
-From 29cd96c98dd999756f43715c7f3e85c44044b115 Mon Sep 17 00:00:00 2001
+From 6da7724d9e8b102d16c24bf390e853c94dacbae4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29cd96c98dd999756f43715c7f3e85c44044b115 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16 @@
- drivers/net/mlx5/hws/mlx5dr_cmd.c | 3 ++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
+ 1 file changed, 4 insertions(+)
@@ -19 +19 @@
-index b90f18df8a..0d90280a7d 100644
+index b0ae4e7693..4fb9a03d80 100644
@@ -22 +22,2 @@
-@@ -2968,6 +2968,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+@@ -1593,6 +1593,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+ case MLX5DR_ACTION_TYP_ASO_METER:
@@ -25 +25,0 @@
- case MLX5DR_ACTION_TYP_REMOVE_HEADER:
@@ -29,4 +29,4 @@
- case MLX5DR_ACTION_TYP_DEST_ROOT:
-@@ -3027,6 +3028,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
- break;
- case MLX5DR_ACTION_TYP_LAST:
+ case MLX5DR_ACTION_TYP_POP_VLAN:
+@@ -1614,6 +1615,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+ mlx5dr_action_destroy_stcs(action);
+ mlx5dr_cmd_destroy_obj(action->reformat.arg_obj);
@@ -40,14 +39,0 @@
-diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c
-index 72fc9e3d91..a4f778a8a4 100644
---- a/drivers/net/mlx5/hws/mlx5dr_cmd.c
-+++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c
-@@ -1033,7 +1033,8 @@ int mlx5dr_cmd_generate_wqe(struct ibv_context *ctx,
-
- ret = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out, sizeof(out));
- if (ret) {
-- DR_LOG(ERR, "Failed to write GTA WQE using FW");
-+ DR_LOG(ERR, "Failed to write GTA WQE using FW (syndrome: %#x)",
-+ mlx5dr_cmd_get_syndrome(out));
- rte_errno = errno;
- return rte_errno;
- }
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: fix port ID on root item convert' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (11 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix deletion of action vport' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: remove unused variable' " luca.boccassi
` (25 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Alex Vesker; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fdf5a81ff78917f9d3ffb713a1fb7deedb92dfdb
Thanks.
Luca Boccassi
---
From fdf5a81ff78917f9d3ffb713a1fb7deedb92dfdb Mon Sep 17 00:00:00 2001
From: Alex Vesker <valex@nvidia.com>
Date: Tue, 9 Jul 2024 15:31:00 +0300
Subject: [PATCH] net/mlx5/hws: fix port ID on root item convert
[ upstream commit befb138bdd924956375745cb1ae8fe3fd029902f ]
When calling item convert function we need to pass the port_id
in the attributes. This value should be passed not only for cases
that match on PORT related items, to resolve we will always pass it.
Fixes: 572fe9ef2f46 ("net/mlx5/hws: fix port ID for root table")
Signed-off-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_matcher.c | 20 +++++---------------
drivers/net/mlx5/hws/mlx5dr_rule.c | 21 +++++----------------
2 files changed, 10 insertions(+), 31 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index c54bf88e78..e89ebb657a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -711,7 +711,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
struct mlx5dv_flow_match_parameters *mask;
struct mlx5_flow_attr flow_attr = {0};
struct rte_flow_error rte_error;
- struct rte_flow_item *item;
uint8_t match_criteria;
int ret;
@@ -740,20 +739,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
return rte_errno;
}
- /* We need the port id in case of matching representor */
- item = matcher->mt[0]->items;
- while (item->type != RTE_FLOW_ITEM_TYPE_END) {
- if (item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
- item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
- ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
- if (ret) {
- DR_LOG(ERR, "Failed to get port id for dev %s",
- ctx->ibv_ctx->device->name);
- rte_errno = EINVAL;
- return rte_errno;
- }
- }
- ++item;
+ ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
+ if (ret) {
+ DR_LOG(ERR, "Failed to get port id for dev %s", ctx->ibv_ctx->device->name);
+ rte_errno = EINVAL;
+ return rte_errno;
}
mask = simple_calloc(1, MLX5_ST_SZ_BYTES(fte_match_param) +
diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 885a2bcefe..00b6c49b88 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -382,26 +382,15 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
struct mlx5dv_flow_match_parameters *value;
struct mlx5_flow_attr flow_attr = {0};
struct mlx5dv_flow_action_attr *attr;
- const struct rte_flow_item *cur_item;
struct rte_flow_error error;
uint8_t match_criteria;
int ret;
- /* We need the port id in case of matching representor */
- cur_item = items;
- while (cur_item->type != RTE_FLOW_ITEM_TYPE_END) {
- if (cur_item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
- cur_item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
- ret = flow_hw_get_port_id_from_ctx(rule->matcher->tbl->ctx,
- &flow_attr.port_id);
- if (ret) {
- DR_LOG(ERR, "Failed to get port id for dev %s",
- rule->matcher->tbl->ctx->ibv_ctx->device->name);
- rte_errno = EINVAL;
- return rte_errno;
- }
- }
- ++cur_item;
+ ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
+ if (ret) {
+ DR_LOG(ERR, "Failed to get port id for dev %s", ctx->ibv_ctx->device->name);
+ rte_errno = EINVAL;
+ return rte_errno;
}
attr = simple_calloc(num_actions, sizeof(*attr));
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.873226978 +0100
+++ 0014-net-mlx5-hws-fix-port-ID-on-root-item-convert.patch 2024-07-24 12:29:20.719025084 +0100
@@ -1 +1 @@
-From befb138bdd924956375745cb1ae8fe3fd029902f Mon Sep 17 00:00:00 2001
+From fdf5a81ff78917f9d3ffb713a1fb7deedb92dfdb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit befb138bdd924956375745cb1ae8fe3fd029902f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/mlx5/hws/mlx5dr_rule.c | 22 ++++++----------------
- 2 files changed, 11 insertions(+), 31 deletions(-)
+ drivers/net/mlx5/hws/mlx5dr_rule.c | 21 +++++----------------
+ 2 files changed, 10 insertions(+), 31 deletions(-)
@@ -21 +22 @@
-index 6a939eb031..dfa2cd435c 100644
+index c54bf88e78..e89ebb657a 100644
@@ -24 +25 @@
-@@ -1231,7 +1231,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -711,7 +711,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -32 +33 @@
-@@ -1260,20 +1259,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -740,20 +739,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -37 +38 @@
-- item = matcher->mt[0].items;
+- item = matcher->mt[0]->items;
@@ -59 +60 @@
-index 06d8e66f63..1edb7eac74 100644
+index 885a2bcefe..00b6c49b88 100644
@@ -62,5 +63 @@
-@@ -694,29 +694,19 @@ int mlx5dr_rule_create_root_no_comp(struct mlx5dr_rule *rule,
- struct mlx5dr_rule_action rule_actions[])
- {
- struct mlx5dv_flow_matcher *dv_matcher = rule->matcher->dv_matcher;
-+ struct mlx5dr_context *ctx = rule->matcher->tbl->ctx;
+@@ -382,26 +382,15 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: remove unused variable' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (12 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix port ID on root item convert' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix end condition of reading xstats' " luca.boccassi
` (24 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Erez Shitrit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7aa564683c2f3bfbf0d2eeface8f52de58fcd9aa
Thanks.
Luca Boccassi
---
From 7aa564683c2f3bfbf0d2eeface8f52de58fcd9aa Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 9 Jul 2024 15:31:01 +0300
Subject: [PATCH] net/mlx5/hws: remove unused variable
[ upstream commit 168f9cf3455ef0be63ba1593cd7b651d50b2043d ]
Removing a redundant variable.
Was there from day 1, not in use.
Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
index d9353e9a3e..0a1257f98c 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
+++ b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
@@ -31,7 +31,6 @@ struct mlx5dr_pat_cached_pattern {
enum mlx5dr_action_type type;
struct {
struct mlx5dr_devx_obj *pattern_obj;
- struct dr_icm_chunk *chunk;
uint8_t *data;
uint16_t num_of_actions;
} mh_data;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.941170923 +0100
+++ 0015-net-mlx5-hws-remove-unused-variable.patch 2024-07-24 12:29:20.719025084 +0100
@@ -1 +1 @@
-From 168f9cf3455ef0be63ba1593cd7b651d50b2043d Mon Sep 17 00:00:00 2001
+From 7aa564683c2f3bfbf0d2eeface8f52de58fcd9aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 168f9cf3455ef0be63ba1593cd7b651d50b2043d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bbe313102f..c4e0cbc843 100644
+index d9353e9a3e..0a1257f98c 100644
@@ -22,2 +23,2 @@
-@@ -30,7 +30,6 @@ struct mlx5dr_pattern_cache {
- struct mlx5dr_pattern_cache_item {
+@@ -31,7 +31,6 @@ struct mlx5dr_pat_cached_pattern {
+ enum mlx5dr_action_type type;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix end condition of reading xstats' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (13 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5/hws: remove unused variable' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " luca.boccassi
` (23 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f06e1a4e4942098357ea2875b50edcd3a9beb382
Thanks.
Luca Boccassi
---
From f06e1a4e4942098357ea2875b50edcd3a9beb382 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:33:37 +0300
Subject: [PATCH] net/mlx5: fix end condition of reading xstats
[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]
The "mlx5_stats_n" in the "struct mlx5_xstats_ctrl" is the number of
device stats identified by PMD. Right now, the mapping of device
stats to the xstats is not compact. The "input index" of the device
stats would remain UINT16_MAX and be skipped when reading counters.
If some DPDK stats cannot be identified in the middle of the map, the
end condition should be bigger than the "mlx5_stats_n". Or else, some
counters would not be read and calculated.
Using the global const "xstats_n" as the end condition to traverse
the whole array in case some counters are missed. The "xstats_o_idx"
should be used instead of the iteration to check if the statistics
is an IB device counter.
In the meanwhile, adding another field to record the start index of
the IB counters to reduce the redundancy iterations.
Fixes: a687c3e658c2 ("net/mlx5: fix counters map in bonding mode")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 23 +++++++++++++----------
drivers/net/mlx5/mlx5.h | 5 +++++
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 4f3e790c0b..1d999ef66b 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1292,6 +1292,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
struct ethtool_stats *et_stats = (struct ethtool_stats *)et_stat_buf;
int ret;
uint16_t i_idx, o_idx;
+ uint32_t total_stats = xstats_n;
et_stats->cmd = ETHTOOL_GSTATS;
/* Pass the maximum value, the driver may ignore this. */
@@ -1309,19 +1310,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
return ret;
}
if (pf <= 0) {
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ for (i = 0; i != total_stats; i++) {
i_idx = xstats_ctrl->dev_table_idx[i];
- if (i_idx == UINT16_MAX || xstats_ctrl->info[i].dev)
- continue;
o_idx = xstats_ctrl->xstats_o_idx[i];
+ if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+ continue;
stats[o_idx] += (uint64_t)et_stats->data[i_idx];
}
} else {
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ for (i = 0; i != total_stats; i++) {
i_idx = xstats_ctrl->dev_table_idx_2nd[i];
- if (i_idx == UINT16_MAX)
- continue;
o_idx = xstats_ctrl->xstats_o_idx_2nd[i];
+ if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+ continue;
stats[o_idx] += (uint64_t)et_stats->data[i_idx];
}
}
@@ -1364,11 +1365,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
return ret;
}
/*
- * Read IB counters.
- * The counters are unique per IB device but not per net IF.
+ * Read IB dev counters.
+ * The counters are unique per IB device but not per netdev IF.
* In bonding mode, getting the stats name only from 1 port is enough.
*/
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ for (i = xstats_ctrl->dev_cnt_start; i < xstats_ctrl->mlx5_stats_n; i++) {
if (!xstats_ctrl->info[i].dev)
continue;
/* return last xstats counter if fail to read. */
@@ -1618,7 +1619,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
},
};
-static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
+const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
static int
mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -1664,6 +1665,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
}
if (!bond_master) {
/* Add dev counters, unique per IB device. */
+ xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
for (j = 0; j != xstats_n; j++) {
if (mlx5_counters_init[j].dev) {
idx = xstats_ctrl->mlx5_stats_n++;
@@ -1705,6 +1707,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
}
}
/* Dev counters are always at the last now. */
+ xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
for (j = 0; j != xstats_n; j++) {
if (mlx5_counters_init[j].dev) {
idx = xstats_ctrl->mlx5_stats_n++;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 80dcaf96a3..5d826527b2 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -238,6 +238,8 @@ struct mlx5_xstats_ctrl {
uint16_t stats_n_2nd;
/* Number of device stats identified by PMD. */
uint16_t mlx5_stats_n;
+ /* First device counters index. */
+ uint16_t dev_cnt_start;
/* Index in the device counters table. */
uint16_t dev_table_idx[MLX5_MAX_XSTATS];
/* Index in the output table. */
@@ -252,6 +254,9 @@ struct mlx5_xstats_ctrl {
uint16_t xstats_o_idx_2nd[MLX5_MAX_XSTATS];
};
+/* xstats array size. */
+extern const unsigned int xstats_n;
+
struct mlx5_stats_ctrl {
/* Base for imissed counter. */
uint64_t imissed_base;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.008907585 +0100
+++ 0016-net-mlx5-fix-end-condition-of-reading-xstats.patch 2024-07-24 12:29:20.727025246 +0100
@@ -1 +1 @@
-From 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 Mon Sep 17 00:00:00 2001
+From f06e1a4e4942098357ea2875b50edcd3a9beb382 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 82f651f2f3..5d64984022 100644
+index 4f3e790c0b..1d999ef66b 100644
@@ -37 +38 @@
-@@ -1201,6 +1201,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1292,6 +1292,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -45 +46 @@
-@@ -1218,19 +1219,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1309,19 +1310,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -71 +72 @@
-@@ -1273,11 +1274,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
+@@ -1364,11 +1365,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
@@ -86 +87 @@
-@@ -1573,7 +1574,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
+@@ -1618,7 +1619,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
@@ -95 +96 @@
-@@ -1619,6 +1620,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1664,6 +1665,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -103 +104 @@
-@@ -1660,6 +1662,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1705,6 +1707,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -112 +113 @@
-index 75a1e170af..869aac032b 100644
+index 80dcaf96a3..5d826527b2 100644
@@ -115 +116 @@
-@@ -281,6 +281,8 @@ struct mlx5_xstats_ctrl {
+@@ -238,6 +238,8 @@ struct mlx5_xstats_ctrl {
@@ -124 +125 @@
-@@ -295,6 +297,9 @@ struct mlx5_xstats_ctrl {
+@@ -252,6 +254,9 @@ struct mlx5_xstats_ctrl {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix uplink port probing in bonding mode' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (14 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix end condition of reading xstats' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " luca.boccassi
` (22 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/751fa44c5198aa210b58a6335450e06be3569051
Thanks.
Luca Boccassi
---
From 751fa44c5198aa210b58a6335450e06be3569051 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:35:41 +0300
Subject: [PATCH] net/mlx5: fix uplink port probing in bonding mode
[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]
In the HW-LAG bonding mode, the representor port can be from both
slave PFs. When probing a representor (REP), the UPLINK (proxy) port
always needs to be probed firstly before any REP port.
In the current implementation, when probing a device with the
following format:
-a 0000:XX:00.0,dv_flow_en=N,representor=pf1vfy
Since the REP belongs to the 2nd PF in the bonding, the UPLINK would
not be added into the probing ports list.
1. In dv_flow_en=1 mode, the REP itself can be probed. But it didn't
obey the rules and the behaviors were inconsistent.
a. When probing the REP from 1st PFs, the UPLINK was also probed.
b. When detaching the UPLINK, all REPs were detached.
2. In dv_flow_en=2 mode, since some resources can only be allocated /
created on the proxy port, the probing would get a failure.
By removing the unneeded check of the bonding PF device index, the
UPLINK will always try to be probed with any format.
Fixes: 2e569a370395 ("net/mlx5: add VF LAG mode bonding device recognition")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index bdb2f6fb59..b88ae631d9 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2170,8 +2170,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
list[ns].info.master = 0;
list[ns].info.representor = 0;
}
- if (list[ns].info.port_name == bd)
- ns++;
+ ns++;
break;
case MLX5_PHYS_PORT_NAME_TYPE_PFHPF:
/* Fallthrough */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.079860620 +0100
+++ 0017-net-mlx5-fix-uplink-port-probing-in-bonding-mode.patch 2024-07-24 12:29:20.731025327 +0100
@@ -1 +1 @@
-From 39d4ec8f36192b9dafbad4994cbe37f7674c7190 Mon Sep 17 00:00:00 2001
+From 751fa44c5198aa210b58a6335450e06be3569051 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 5e950e9be1..11336c430b 100644
+index bdb2f6fb59..b88ae631d9 100644
@@ -41 +42 @@
-@@ -2473,8 +2473,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
+@@ -2170,8 +2170,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/mlx5: remove unneeded field when modify RQ table' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (15 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " luca.boccassi
` (21 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d69a8b5eb2badb1c7998948c4b80a96f5312dd03
Thanks.
Luca Boccassi
---
From d69a8b5eb2badb1c7998948c4b80a96f5312dd03 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:37:19 +0300
Subject: [PATCH] common/mlx5: remove unneeded field when modify RQ table
[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]
The attribute "rqt_max_size" of the RQT(RQ table) context is only
needed by when creating a new one. When modifying an old one, there
is no need to set this attribute.
The firmware usually ignored this unneeded field. When enabling some
extra check, an error will be returned to prevent the code from
continuing to run.
In the meanwhile, this field will always be set to the maximal one
fetched from the capability without any change. Removing the value
set and leave it to 0 will help to solve the potential failure.
Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index f44be4c230..9a0fc3501d 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1727,7 +1727,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
MLX5_SET64(modify_rqt_in, in, modify_bitmask, 0x1);
rqt_ctx = MLX5_ADDR_OF(modify_rqt_in, in, rqt_context);
MLX5_SET(rqtc, rqt_ctx, list_q_type, rqt_attr->rq_type);
- MLX5_SET(rqtc, rqt_ctx, rqt_max_size, rqt_attr->rqt_max_size);
MLX5_SET(rqtc, rqt_ctx, rqt_actual_size, rqt_attr->rqt_actual_size);
for (i = 0; i < rqt_attr->rqt_actual_size; i++)
MLX5_SET(rqtc, rqt_ctx, rq_num[i], rqt_attr->rq_list[i]);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.150969008 +0100
+++ 0018-common-mlx5-remove-unneeded-field-when-modify-RQ-tab.patch 2024-07-24 12:29:20.735025406 +0100
@@ -1 +1 @@
-From 463e5abe09362f1d20d0ec99b5969549d51167d6 Mon Sep 17 00:00:00 2001
+From d69a8b5eb2badb1c7998948c4b80a96f5312dd03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 8e12ac50de..9710dcedd3 100644
+index f44be4c230..9a0fc3501d 100644
@@ -31 +32 @@
-@@ -1914,7 +1914,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
+@@ -1727,7 +1727,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix disabling E-Switch default flow rules' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (16 preceding siblings ...)
2024-07-24 11:32 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/hns3: check Rx DMA address alignmnent' " luca.boccassi
` (20 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5669dcea46cecc3719837f17b0c34b24647379b4
Thanks.
Luca Boccassi
---
From 5669dcea46cecc3719837f17b0c34b24647379b4 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Thu, 18 Jul 2024 11:57:15 +0200
Subject: [PATCH] net/mlx5: fix disabling E-Switch default flow rules
[ upstream commit cf9a91c67b88071a03beb32a3ea9970e6ee00391 ]
`fdb_def_rule_en` devarg controls whether mlx5 PMD creates default
E-Switch flow rules for:
- Transferring traffic from wire, VFs and SFs to group 1 (default jump).
- Providing default behavior for application traffic (default SQ miss
flow rules).
With these flow rules, applications effectively create transfer flow
rules in group 1 and higher (application group is translated to one
higher) allowing for faster insertion on all groups and providing
ability to forward to VF, SF and wire on any group.
By default, these rules are created (`fdb_def_rule_en` == 1).
When these default flow rules are disabled (`fdb_def_rule_en` == 0)
with HW Steering flow engine (`dv_flow_en` == 2) only creation of
default jump rules was disabled. Also, necessary template table and
pattern/actions templates were created as well,
but they were never used.
SQ miss flow rules were still created.
This is a bug, because with `fdb_def_rule_en` == 0, application should
not expect any default E-Switch flow rules.
This patch fixes that by disabling all default E-Switch flow rules
creation and disabling creating templates for these flow rules,
when `fdb_def_rule_en` == 0.
If an application needs to run with these flow rules disabled,
and requires flow rules providing SQ miss flow rules functionality,
then application must explicitly create similar flow rules.
Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 142 ++++++++++++++++++--------------
drivers/net/mlx5/mlx5_trigger.c | 4 +-
drivers/net/mlx5/mlx5_txq.c | 13 ++-
3 files changed, 91 insertions(+), 68 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 45709c9fd2..aa315c054d 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6469,6 +6469,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
struct mlx5_flow_hw_ctrl_fdb *hw_ctrl_fdb;
uint32_t xmeta = priv->sh->config.dv_xmeta_en;
uint32_t repr_matching = priv->sh->config.repr_matching;
+ uint32_t fdb_def_rule = priv->sh->config.fdb_def_rule;
MLX5_ASSERT(priv->hw_ctrl_fdb == NULL);
hw_ctrl_fdb = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*hw_ctrl_fdb), 0, SOCKET_ID_ANY);
@@ -6479,70 +6480,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
goto err;
}
priv->hw_ctrl_fdb = hw_ctrl_fdb;
- /* Create templates and table for default SQ miss flow rules - root table. */
- hw_ctrl_fdb->esw_mgr_items_tmpl = flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
- if (!hw_ctrl_fdb->esw_mgr_items_tmpl) {
- DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
- " template for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->regc_jump_actions_tmpl = flow_hw_create_ctrl_regc_jump_actions_template
- (dev, error);
- if (!hw_ctrl_fdb->regc_jump_actions_tmpl) {
- DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
- " for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->hw_esw_sq_miss_root_tbl = flow_hw_create_ctrl_sq_miss_root_table
- (dev, hw_ctrl_fdb->esw_mgr_items_tmpl, hw_ctrl_fdb->regc_jump_actions_tmpl,
- error);
- if (!hw_ctrl_fdb->hw_esw_sq_miss_root_tbl) {
- DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
- " for control flows", dev->data->port_id);
- goto err;
- }
- /* Create templates and table for default SQ miss flow rules - non-root table. */
- hw_ctrl_fdb->regc_sq_items_tmpl = flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
- if (!hw_ctrl_fdb->regc_sq_items_tmpl) {
- DRV_LOG(ERR, "port %u failed to create SQ item template for"
- " control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->port_actions_tmpl = flow_hw_create_ctrl_port_actions_template(dev, error);
- if (!hw_ctrl_fdb->port_actions_tmpl) {
- DRV_LOG(ERR, "port %u failed to create port action template"
- " for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->hw_esw_sq_miss_tbl = flow_hw_create_ctrl_sq_miss_table
- (dev, hw_ctrl_fdb->regc_sq_items_tmpl, hw_ctrl_fdb->port_actions_tmpl,
- error);
- if (!hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
- DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
- " for control flows", dev->data->port_id);
- goto err;
- }
- /* Create templates and table for default FDB jump flow rules. */
- hw_ctrl_fdb->port_items_tmpl = flow_hw_create_ctrl_port_pattern_template(dev, error);
- if (!hw_ctrl_fdb->port_items_tmpl) {
- DRV_LOG(ERR, "port %u failed to create SQ item template for"
- " control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->jump_one_actions_tmpl = flow_hw_create_ctrl_jump_actions_template
- (dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
- if (!hw_ctrl_fdb->jump_one_actions_tmpl) {
- DRV_LOG(ERR, "port %u failed to create jump action template"
- " for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table
- (dev, hw_ctrl_fdb->port_items_tmpl, hw_ctrl_fdb->jump_one_actions_tmpl,
- error);
- if (!hw_ctrl_fdb->hw_esw_zero_tbl) {
- DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
- " for control flows", dev->data->port_id);
- goto err;
+ if (fdb_def_rule) {
+ /* Create templates and table for default SQ miss flow rules - root table. */
+ hw_ctrl_fdb->esw_mgr_items_tmpl =
+ flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
+ if (!hw_ctrl_fdb->esw_mgr_items_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
+ " template for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->regc_jump_actions_tmpl =
+ flow_hw_create_ctrl_regc_jump_actions_template(dev, error);
+ if (!hw_ctrl_fdb->regc_jump_actions_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->hw_esw_sq_miss_root_tbl =
+ flow_hw_create_ctrl_sq_miss_root_table
+ (dev, hw_ctrl_fdb->esw_mgr_items_tmpl,
+ hw_ctrl_fdb->regc_jump_actions_tmpl, error);
+ if (!hw_ctrl_fdb->hw_esw_sq_miss_root_tbl) {
+ DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ /* Create templates and table for default SQ miss flow rules - non-root table. */
+ hw_ctrl_fdb->regc_sq_items_tmpl =
+ flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
+ if (!hw_ctrl_fdb->regc_sq_items_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create SQ item template for"
+ " control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->port_actions_tmpl =
+ flow_hw_create_ctrl_port_actions_template(dev, error);
+ if (!hw_ctrl_fdb->port_actions_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create port action template"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->hw_esw_sq_miss_tbl =
+ flow_hw_create_ctrl_sq_miss_table
+ (dev, hw_ctrl_fdb->regc_sq_items_tmpl,
+ hw_ctrl_fdb->port_actions_tmpl, error);
+ if (!hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
+ DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ /* Create templates and table for default FDB jump flow rules. */
+ hw_ctrl_fdb->port_items_tmpl =
+ flow_hw_create_ctrl_port_pattern_template(dev, error);
+ if (!hw_ctrl_fdb->port_items_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create SQ item template for"
+ " control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->jump_one_actions_tmpl =
+ flow_hw_create_ctrl_jump_actions_template
+ (dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
+ if (!hw_ctrl_fdb->jump_one_actions_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create jump action template"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table
+ (dev, hw_ctrl_fdb->port_items_tmpl,
+ hw_ctrl_fdb->jump_one_actions_tmpl, error);
+ if (!hw_ctrl_fdb->hw_esw_zero_tbl) {
+ DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
}
/* Create templates and table for default Tx metadata copy flow rule. */
if (!repr_matching && xmeta == MLX5_XMETA_MODE_META32_HWS) {
@@ -9211,6 +9221,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
}
proxy_dev = &rte_eth_devices[proxy_port_id];
proxy_priv = proxy_dev->data->dev_private;
+ /* FDB default flow rules must be enabled. */
+ MLX5_ASSERT(proxy_priv->sh->config.fdb_def_rule);
if (!proxy_priv->dr_ctx)
return 0;
if (!proxy_priv->hw_ctrl_fdb ||
@@ -9275,6 +9287,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
}
proxy_dev = &rte_eth_devices[proxy_port_id];
proxy_priv = proxy_dev->data->dev_private;
+ /* FDB default flow rules must be enabled. */
+ MLX5_ASSERT(proxy_priv->sh->config.fdb_def_rule);
if (!proxy_priv->dr_ctx) {
DRV_LOG(DEBUG, "Transfer proxy port (port %u) of port %u must be configured "
"for HWS to create default FDB jump rule. Default rule will "
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index dbf5719a7e..1cb0b56ae1 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1498,7 +1498,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
if (!txq)
continue;
queue = mlx5_txq_get_sqn(txq);
- if ((priv->representor || priv->master) && config->dv_esw_en) {
+ if ((priv->representor || priv->master) &&
+ config->dv_esw_en &&
+ config->fdb_def_rule) {
if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, queue, false)) {
mlx5_txq_release(dev, i);
goto error;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index d617784dba..46badcd0cc 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1311,11 +1311,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
}
#ifdef HAVE_MLX5_HWS_SUPPORT
if (priv->sh->config.dv_flow_en == 2) {
- if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, sq_num, true))
- return -rte_errno;
+ bool sq_miss_created = false;
+
+ if (priv->sh->config.fdb_def_rule) {
+ if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, sq_num, true))
+ return -rte_errno;
+ sq_miss_created = true;
+ }
+
if (priv->sh->config.repr_matching &&
mlx5_flow_hw_tx_repr_matching_flow(dev, sq_num, true)) {
- mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num);
+ if (sq_miss_created)
+ mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num);
return -rte_errno;
}
return 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.222031805 +0100
+++ 0019-net-mlx5-fix-disabling-E-Switch-default-flow-rules.patch 2024-07-24 12:29:20.751025728 +0100
@@ -1 +1 @@
-From cf9a91c67b88071a03beb32a3ea9970e6ee00391 Mon Sep 17 00:00:00 2001
+From 5669dcea46cecc3719837f17b0c34b24647379b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf9a91c67b88071a03beb32a3ea9970e6ee00391 ]
+
@@ -37 +38,0 @@
-Cc: stable@dpdk.org
@@ -48 +49 @@
-index e7d8c251a0..fe7df7305f 100644
+index 45709c9fd2..aa315c054d 100644
@@ -51 +52 @@
-@@ -10580,6 +10580,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -6469,6 +6469,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -59 +60 @@
-@@ -10590,70 +10591,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -6479,70 +6480,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -203 +204 @@
-@@ -15383,6 +15393,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
+@@ -9211,6 +9221,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
@@ -212 +213 @@
-@@ -15447,6 +15459,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
+@@ -9275,6 +9287,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
@@ -222 +223 @@
-index 6fa7c01cd0..a65a460731 100644
+index dbf5719a7e..1cb0b56ae1 100644
@@ -225 +226 @@
-@@ -1504,7 +1504,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
+@@ -1498,7 +1498,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
@@ -237 +238 @@
-index 8eb1ae1f03..f05534e168 100644
+index d617784dba..46badcd0cc 100644
@@ -240 +241 @@
-@@ -1363,11 +1363,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
+@@ -1311,11 +1311,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: check Rx DMA address alignmnent' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (17 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/ark: fix index arithmetic' " luca.boccassi
` (19 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Jie Hai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1c9c96641a99c4becca1670a1b07e89dd432c887
Thanks.
Luca Boccassi
---
From 1c9c96641a99c4becca1670a1b07e89dd432c887 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 15 Jul 2024 10:04:39 +0800
Subject: [PATCH] net/hns3: check Rx DMA address alignmnent
[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]
The network engine has Rx DMA address align requirement, if this
requirement is violated, the Rx function will be abnormal. The detail
requirement is:
1) For HIP08 platform, require 64-bytes alignment.
2) For later platform, require 128-bytes alignment.
The setup Rx DMA address exists both on the control and data plane, to
ensure performance, the alignment check is added only on the control
plane.
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 ++
drivers/net/hns3/hns3_ethdev.h | 8 ++++++++
drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
drivers/net/hns3/hns3_rxtx.c | 21 +++++++++++++++++++++
4 files changed, 33 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6672b80c21..2c32f48af6 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2742,6 +2742,7 @@ hns3_get_capability(struct hns3_hw *hw)
hw->rss_info.ipv6_sctp_offload_supported = false;
hw->udp_cksum_mode = HNS3_SPECIAL_PORT_SW_CKSUM_MODE;
pf->support_multi_tc_pause = false;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
return 0;
}
@@ -2762,6 +2763,7 @@ hns3_get_capability(struct hns3_hw *hw)
hw->rss_info.ipv6_sctp_offload_supported = true;
hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE;
pf->support_multi_tc_pause = true;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
return 0;
}
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 9f95a523ec..1afe4c4ff7 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -485,6 +485,9 @@ struct hns3_queue_intr {
#define HNS3_PKTS_DROP_STATS_MODE1 0
#define HNS3_PKTS_DROP_STATS_MODE2 1
+#define HNS3_RX_DMA_ADDR_ALIGN_128 128
+#define HNS3_RX_DMA_ADDR_ALIGN_64 64
+
struct hns3_hw {
struct rte_eth_dev_data *data;
void *io_base;
@@ -552,6 +555,11 @@ struct hns3_hw {
* direction.
*/
uint8_t min_tx_pkt_len;
+ /*
+ * The required alignment of the DMA address of the RX buffer.
+ * See HNS3_RX_DMA_ADDR_ALIGN_XXX for available values.
+ */
+ uint16_t rx_dma_addr_align;
struct hns3_queue_intr intr;
/*
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 9e5d69f485..6d7654206b 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -788,6 +788,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
hw->min_tx_pkt_len = HNS3_HIP08_MIN_TX_PKT_LEN;
hw->rss_info.ipv6_sctp_offload_supported = false;
hw->promisc_mode = HNS3_UNLIMIT_PROMISC_MODE;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
return 0;
}
@@ -805,6 +806,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
hw->drop_stats_mode = HNS3_PKTS_DROP_STATS_MODE2;
hw->rss_info.ipv6_sctp_offload_supported = true;
hw->promisc_mode = HNS3_LIMIT_PROMISC_MODE;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
return 0;
}
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 4343a3e4df..16cb174f4d 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -273,12 +273,27 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
hns3_free_tx_queues(dev);
}
+static int
+hns3_check_rx_dma_addr(struct hns3_hw *hw, uint64_t dma_addr)
+{
+ uint64_t rem;
+
+ rem = dma_addr & (hw->rx_dma_addr_align - 1);
+ if (rem > 0) {
+ hns3_err(hw, "The IO address of the beginning of the mbuf data "
+ "must be %u-byte aligned", hw->rx_dma_addr_align);
+ return -EINVAL;
+ }
+ return 0;
+}
+
static int
hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
{
struct rte_mbuf *mbuf;
uint64_t dma_addr;
uint16_t i;
+ int ret;
for (i = 0; i < rxq->nb_rx_desc; i++) {
mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
@@ -299,6 +314,12 @@ hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
dma_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mbuf));
rxq->rx_ring[i].addr = dma_addr;
rxq->rx_ring[i].rx.bd_base_info = 0;
+
+ ret = hns3_check_rx_dma_addr(hw, dma_addr);
+ if (ret != 0) {
+ hns3_rx_queue_release_mbufs(rxq);
+ return ret;
+ }
}
return 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.315438309 +0100
+++ 0020-net-hns3-check-Rx-DMA-address-alignmnent.patch 2024-07-24 12:29:20.767026050 +0100
@@ -1 +1 @@
-From d14c995b775a9b5910c51c3ab3685b320736f3f6 Mon Sep 17 00:00:00 2001
+From 1c9c96641a99c4becca1670a1b07e89dd432c887 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 327f6fe908..ec1251cb7e 100644
+index 6672b80c21..2c32f48af6 100644
@@ -32 +33 @@
-@@ -2738,6 +2738,7 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -2742,6 +2742,7 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -40 +41 @@
-@@ -2758,6 +2759,7 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -2762,6 +2763,7 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -49 +50 @@
-index a6b652455b..799b61038a 100644
+index 9f95a523ec..1afe4c4ff7 100644
@@ -52 +53 @@
-@@ -487,6 +487,9 @@ struct hns3_queue_intr {
+@@ -485,6 +485,9 @@ struct hns3_queue_intr {
@@ -62 +63 @@
-@@ -554,6 +557,11 @@ struct hns3_hw {
+@@ -552,6 +555,11 @@ struct hns3_hw {
@@ -75 +76 @@
-index b83d5b9589..ea9225cd26 100644
+index 9e5d69f485..6d7654206b 100644
@@ -78 +79 @@
-@@ -707,6 +707,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -788,6 +788,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
@@ -86 +87 @@
-@@ -724,6 +725,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -805,6 +806,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
@@ -95 +96 @@
-index d7f9cff547..5941b966e0 100644
+index 4343a3e4df..16cb174f4d 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ark: fix index arithmetic' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (18 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/hns3: check Rx DMA address alignmnent' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:33 ` patch 'ethdev: fix GENEVE option item conversion' " luca.boccassi
` (18 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Ed Czeck; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/becd25a54aa3ab2765856edd541a2ba78278ce65
Thanks.
Luca Boccassi
---
From becd25a54aa3ab2765856edd541a2ba78278ce65 Mon Sep 17 00:00:00 2001
From: Ed Czeck <ed.czeck@atomicrules.com>
Date: Wed, 17 Jul 2024 16:38:30 -0400
Subject: [PATCH] net/ark: fix index arithmetic
[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]
Behavior for signed integer overflow is not defined which can causes
undesired behavior at values near max and min bounds.
The used of unsigned is defined as to use modulo arithmetic which is the
desired behavior.
This patch replaces int32_t with uint32_t except for necessary casts.
Fixes: 9ee9e0d3b85e ("net/ark: update to reflect FPGA updates")
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/ark/ark_ethdev_tx.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 4792754f19..8f1f90b1a4 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -39,8 +39,8 @@ struct ark_tx_queue {
uint32_t queue_mask;
/* 3 indexes to the paired data rings. */
- int32_t prod_index; /* where to put the next one */
- int32_t free_index; /* mbuf has been freed */
+ uint32_t prod_index; /* where to put the next one */
+ uint32_t free_index; /* mbuf has been freed */
/* The queue Id is used to identify the HW Q */
uint16_t phys_qid;
@@ -49,7 +49,7 @@ struct ark_tx_queue {
/* next cache line - fields written by device */
RTE_MARKER cacheline1 __rte_cache_min_aligned;
- volatile int32_t cons_index; /* hw is done, can be freed */
+ volatile uint32_t cons_index; /* hw is done, can be freed */
} __rte_cache_aligned;
/* Forward declarations */
@@ -108,7 +108,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
uint32_t user_meta[5];
int stat;
- int32_t prod_index_limit;
+ uint32_t prod_index_limit;
uint16_t nb;
uint8_t user_len = 0;
const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
@@ -123,8 +123,13 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/* leave 4 elements mpu data */
prod_index_limit = queue->queue_size + queue->free_index - 4;
+ /* Populate the buffer bringing prod_index up to or slightly beyond
+ * prod_index_limit. Prod_index will increment by 2 or more each
+ * iteration. Note: indexes are uint32_t, cast to (signed) int32_t
+ * to catch the slight overage case; e.g. (200 - 201)
+ */
for (nb = 0;
- (nb < nb_pkts) && (prod_index_limit - queue->prod_index) > 0;
+ (nb < nb_pkts) && (int32_t)(prod_index_limit - queue->prod_index) > 0;
++nb) {
mbuf = tx_pkts[nb];
@@ -194,13 +199,13 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
uint32_t *user_meta, uint8_t meta_cnt)
{
struct rte_mbuf *next;
- int32_t free_queue_space;
+ uint32_t free_queue_space;
uint8_t flags = ARK_DDM_SOP;
free_queue_space = queue->queue_mask -
(queue->prod_index - queue->free_index);
/* We need up to 4 mbufs for first header and 2 for subsequent ones */
- if (unlikely(free_queue_space < (2 + (2 * mbuf->nb_segs))))
+ if (unlikely(free_queue_space < (2U + (2U * mbuf->nb_segs))))
return -1;
while (mbuf != NULL) {
@@ -392,10 +397,11 @@ free_completed_tx(struct ark_tx_queue *queue)
{
struct rte_mbuf *mbuf;
union ark_tx_meta *meta;
- int32_t top_index;
+ uint32_t top_index;
top_index = queue->cons_index; /* read once */
- while ((top_index - queue->free_index) > 0) {
+
+ while ((int32_t)(top_index - queue->free_index) > 0) {
meta = &queue->meta_q[queue->free_index & queue->queue_mask];
if (likely((meta->flags & ARK_DDM_SOP) != 0)) {
mbuf = queue->bufs[queue->free_index &
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.398679084 +0100
+++ 0021-net-ark-fix-index-arithmetic.patch 2024-07-24 12:29:20.771026131 +0100
@@ -1 +1 @@
-From 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 Mon Sep 17 00:00:00 2001
+From becd25a54aa3ab2765856edd541a2ba78278ce65 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9c89c85f50..ca6cd297a1 100644
+index 4792754f19..8f1f90b1a4 100644
@@ -25 +26 @@
-@@ -39,8 +39,8 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -39,8 +39,8 @@ struct ark_tx_queue {
@@ -36 +37 @@
-@@ -49,7 +49,7 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -49,7 +49,7 @@ struct ark_tx_queue {
@@ -39 +40 @@
- alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1;
+ RTE_MARKER cacheline1 __rte_cache_min_aligned;
@@ -42 +43 @@
- };
+ } __rte_cache_aligned;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'ethdev: fix GENEVE option item conversion' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (19 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/ark: fix index arithmetic' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/testpmd: add postpone option to async flow destroy' " luca.boccassi
` (17 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c4f3e79ac58b870825f0db4a386034311995ecde
Thanks.
Luca Boccassi
---
From c4f3e79ac58b870825f0db4a386034311995ecde Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 15 Jul 2024 15:13:16 +0300
Subject: [PATCH] ethdev: fix GENEVE option item conversion
[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]
The "rte_flow_conv()" function, enables, among other things, to copy
item list.
For GENEVE option item, the function copies it without considering deep
copy. It copies the "data" pointer without copying the pointed values.
This patch adds deep copy for after regular copy.
Fixes: 2b4c72b4d10d ("ethdev: introduce GENEVE header TLV option item")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
lib/ethdev/rte_flow.c | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 2aa51f99ee..aa43b8034d 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -547,6 +547,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
switch (item->type) {
union {
const struct rte_flow_item_raw *raw;
+ const struct rte_flow_item_geneve_opt *geneve_opt;
} spec;
union {
const struct rte_flow_item_raw *raw;
@@ -556,10 +557,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
} mask;
union {
const struct rte_flow_item_raw *raw;
+ const struct rte_flow_item_geneve_opt *geneve_opt;
} src;
union {
struct rte_flow_item_raw *raw;
+ struct rte_flow_item_geneve_opt *geneve_opt;
} dst;
+ void *deep_src;
size_t tmp;
case RTE_FLOW_ITEM_TYPE_RAW:
@@ -588,13 +592,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
tmp = last.raw->length & mask.raw->length;
if (tmp) {
off = RTE_ALIGN_CEIL(off, sizeof(*dst.raw->pattern));
- if (size >= off + tmp)
- dst.raw->pattern = rte_memcpy
- ((void *)((uintptr_t)dst.raw + off),
- src.raw->pattern, tmp);
+ if (size >= off + tmp) {
+ deep_src = (void *)((uintptr_t)dst.raw + off);
+ dst.raw->pattern = rte_memcpy(deep_src,
+ src.raw->pattern,
+ tmp);
+ }
off += tmp;
}
break;
+ case RTE_FLOW_ITEM_TYPE_GENEVE_OPT:
+ off = rte_flow_conv_copy(buf, data, size,
+ rte_flow_desc_item, item->type);
+ spec.geneve_opt = item->spec;
+ src.geneve_opt = data;
+ dst.geneve_opt = buf;
+ tmp = spec.geneve_opt->option_len << 2;
+ if (size > 0 && src.geneve_opt->data) {
+ deep_src = (void *)((uintptr_t)(dst.geneve_opt + 1));
+ dst.geneve_opt->data = rte_memcpy(deep_src,
+ src.geneve_opt->data,
+ tmp);
+ }
+ off += tmp;
+ break;
default:
off = rte_flow_conv_copy(buf, data, size,
rte_flow_desc_item, item->type);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.464774480 +0100
+++ 0022-ethdev-fix-GENEVE-option-item-conversion.patch 2024-07-24 12:29:20.771026131 +0100
@@ -1 +1 @@
-From 841a0445442de154441ac2b4700658a9eb83c986 Mon Sep 17 00:00:00 2001
+From c4f3e79ac58b870825f0db4a386034311995ecde Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ca2f85c3fa..4076ae4ee1 100644
+index 2aa51f99ee..aa43b8034d 100644
@@ -27 +28 @@
-@@ -623,6 +623,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -547,6 +547,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -35 +36 @@
-@@ -632,10 +633,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -556,10 +557,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -49 +50 @@
-@@ -664,13 +668,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -588,13 +592,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: add postpone option to async flow destroy' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (20 preceding siblings ...)
2024-07-24 11:33 ` patch 'ethdev: fix GENEVE option item conversion' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'ethdev: fix device init without socket-local memory' " luca.boccassi
` (16 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9c7ae1bf6d950f6bc91f0868285d8aa71e568af5
Thanks.
Luca Boccassi
---
From 9c7ae1bf6d950f6bc91f0868285d8aa71e568af5 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 17 Jul 2024 17:19:54 +0300
Subject: [PATCH] app/testpmd: add postpone option to async flow destroy
[ upstream commit 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 ]
The postpone option is not available in the async flow destroy CLI.
Only flow creation can be postponed in the testpmd application.
Insert this option into the async flow destroy CLI before the rule ID.
Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 5d97625b05..698b4d9601 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -2980,7 +2980,7 @@ static const struct token token_list[] = {
[QUEUE_DESTROY] = {
.name = "destroy",
.help = "destroy a flow rule",
- .next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),
+ .next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_POSTPONE),
NEXT_ENTRY(COMMON_QUEUE_ID)),
.args = ARGS(ARGS_ENTRY(struct buffer, queue)),
.call = parse_qo_destroy,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.533917037 +0100
+++ 0023-app-testpmd-add-postpone-option-to-async-flow-destro.patch 2024-07-24 12:29:20.783026373 +0100
@@ -1 +1 @@
-From 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 Mon Sep 17 00:00:00 2001
+From 9c7ae1bf6d950f6bc91f0868285d8aa71e568af5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a76b44bf39..fb6a552863 100644
+index 5d97625b05..698b4d9601 100644
@@ -23 +24 @@
-@@ -3703,7 +3703,7 @@ static const struct token token_list[] = {
+@@ -2980,7 +2980,7 @@ static const struct token token_list[] = {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'ethdev: fix device init without socket-local memory' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (21 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/testpmd: add postpone option to async flow destroy' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/testpmd: fix build on signed comparison' " luca.boccassi
` (15 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Padraig Connolly, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1092b5655fd49e38ce26368b379b3ec081f082a4
Thanks.
Luca Boccassi
---
From 1092b5655fd49e38ce26368b379b3ec081f082a4 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 22 Jul 2024 11:02:28 +0100
Subject: [PATCH] ethdev: fix device init without socket-local memory
[ upstream commit ed34d87d9cfbae8b908159f60df2008e45e4c39f ]
When allocating memory for an ethdev, the rte_malloc_socket call used
only allocates memory on the NUMA node/socket local to the device. This
means that even if the user wanted to, they could never use a remote NIC
without also having memory on that NIC's socket.
For example, if we change examples/skeleton/basicfwd.c to have
SOCKET_ID_ANY as the socket_id parameter for Rx and Tx rings, we should
be able to run the app cross-numa e.g. as below, where the two PCI
devices are on socket 1, and core 1 is on socket 0:
./build/examples/dpdk-skeleton -l 1 --legacy-mem --socket-mem=1024,0 \
-a a8:00.0 -a b8:00.0
This fails however, with the error:
ETHDEV: failed to allocate private data
PCI_BUS: Requested device 0000:a8:00.0 cannot be used
We can remove this restriction by doing a fallback call to general
rte_malloc after a call to rte_malloc_socket fails. This should be safe
to do because the later ethdev calls to setup Rx/Tx queues all take a
socket_id parameter, which can be used by applications to enforce the
requirement for local-only memory for a device, if so desired. [If
device-local memory is present it will be used as before, while if not
present the rte_eth_dev_configure call will now pass, but the subsequent
queue setup calls requesting local memory will fail].
Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Padraig Connolly <padraig.j.connolly@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
lib/ethdev/ethdev_driver.c | 20 +++++++++++++++-----
lib/ethdev/ethdev_pci.h | 20 +++++++++++++++++---
2 files changed, 32 insertions(+), 8 deletions(-)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 0387c7133d..867c5de3bb 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -275,15 +275,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
return -ENODEV;
if (priv_data_size) {
+ /* try alloc private data on device-local node. */
ethdev->data->dev_private = rte_zmalloc_socket(
name, priv_data_size, RTE_CACHE_LINE_SIZE,
device->numa_node);
- if (!ethdev->data->dev_private) {
- RTE_ETHDEV_LOG(ERR,
- "failed to allocate private data\n");
- retval = -ENOMEM;
- goto probe_failed;
+ /* fall back to alloc on any socket on failure */
+ if (ethdev->data->dev_private == NULL) {
+ ethdev->data->dev_private = rte_zmalloc(name,
+ priv_data_size, RTE_CACHE_LINE_SIZE);
+
+ if (ethdev->data->dev_private == NULL) {
+ RTE_ETHDEV_LOG(ERR, "failed to allocate private data\n");
+ retval = -ENOMEM;
+ goto probe_failed;
+ }
+ /* got memory, but not local, so issue warning */
+ RTE_ETHDEV_LOG(WARNING,
+ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
+ device->name, device->numa_node);
}
}
} else {
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index ddb559aa95..fbe74fdefe 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -93,12 +93,26 @@ rte_eth_dev_pci_allocate(struct rte_pci_device *dev, size_t private_data_size)
return NULL;
if (private_data_size) {
+ /* Try and alloc the private-data structure on socket local to the device */
eth_dev->data->dev_private = rte_zmalloc_socket(name,
private_data_size, RTE_CACHE_LINE_SIZE,
dev->device.numa_node);
- if (!eth_dev->data->dev_private) {
- rte_eth_dev_release_port(eth_dev);
- return NULL;
+
+ /* if cannot allocate memory on the socket local to the device
+ * use rte_malloc to allocate memory on some other socket, if available.
+ */
+ if (eth_dev->data->dev_private == NULL) {
+ eth_dev->data->dev_private = rte_zmalloc(name,
+ private_data_size, RTE_CACHE_LINE_SIZE);
+
+ if (eth_dev->data->dev_private == NULL) {
+ rte_eth_dev_release_port(eth_dev);
+ return NULL;
+ }
+ /* got memory, but not local, so issue warning */
+ RTE_ETHDEV_LOG(WARNING,
+ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
+ dev->device.name, dev->device.numa_node);
}
}
} else {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.619886438 +0100
+++ 0024-ethdev-fix-device-init-without-socket-local-memory.patch 2024-07-24 12:29:20.787026453 +0100
@@ -1 +1 @@
-From ed34d87d9cfbae8b908159f60df2008e45e4c39f Mon Sep 17 00:00:00 2001
+From 1092b5655fd49e38ce26368b379b3ec081f082a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed34d87d9cfbae8b908159f60df2008e45e4c39f ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index f48c0eb8bc..c335a25a82 100644
+index 0387c7133d..867c5de3bb 100644
@@ -49 +50 @@
-@@ -303,15 +303,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -275,15 +275,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
@@ -59,2 +60,2 @@
-- RTE_ETHDEV_LOG_LINE(ERR,
-- "failed to allocate private data");
+- RTE_ETHDEV_LOG(ERR,
+- "failed to allocate private data\n");
@@ -69 +70 @@
-+ RTE_ETHDEV_LOG_LINE(ERR, "failed to allocate private data");
++ RTE_ETHDEV_LOG(ERR, "failed to allocate private data\n");
@@ -74,2 +75,2 @@
-+ RTE_ETHDEV_LOG_LINE(WARNING,
-+ "Private data for ethdev '%s' not allocated on local NUMA node %d",
++ RTE_ETHDEV_LOG(WARNING,
++ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
@@ -81 +82 @@
-index 737fff1833..ec4f731270 100644
+index ddb559aa95..fbe74fdefe 100644
@@ -108,2 +109,2 @@
-+ RTE_ETHDEV_LOG_LINE(WARNING,
-+ "Private data for ethdev '%s' not allocated on local NUMA node %d",
++ RTE_ETHDEV_LOG(WARNING,
++ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix build on signed comparison' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (22 preceding siblings ...)
2024-07-24 11:33 ` patch 'ethdev: fix device init without socket-local memory' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " luca.boccassi
` (14 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Raslan Darawsheh, Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/99b0e4a22c4dd9cd718dc23e2c583bf4b2a21b3e
Thanks.
Luca Boccassi
---
From 99b0e4a22c4dd9cd718dc23e2c583bf4b2a21b3e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Mon, 22 Jul 2024 03:52:29 -0700
Subject: [PATCH] app/testpmd: fix build on signed comparison
[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
Build error:
.../app/test-pmd/config.c: In function 'icmp_echo_config_setup':
.../app/test-pmd/config.c:5159:30:
error: comparison between signed and unsigned integer expressions
[-Werror=sign-compare]
if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
^
All 'nb_txq', 'nb_fwd_ports' & 'nb_fwd_lcores' are unsigned variables,
but the warning is related to the integer promotion rules of C:
'nb_txq' -> uint16_t, promoted to 'int'
'nb_fwd_ports' -> uint16_t, promoted to 'int'
(nb_txq * nb_fwd_ports) -> result 'int'
nb_fwd_lcores -> 'uint32_t'
Ends up comparing 'int' vs 'uint32_t'.
Fixing by adding the casting back which was initially part of the patch.
Fixes: 2bf44dd14fa5 ("app/testpmd: fix lcore ID restriction")
Reported-by: Raslan Darawsheh <rasland@nvidia.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
app/test-pmd/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1a6d791129..4ff0e72115 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4618,7 +4618,7 @@ icmp_echo_config_setup(void)
lcoreid_t lc_id;
uint16_t sm_id;
- if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
+ if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
(nb_txq * nb_fwd_ports);
else
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.694533464 +0100
+++ 0025-app-testpmd-fix-build-on-signed-comparison.patch 2024-07-24 12:29:20.795026614 +0100
@@ -1 +1 @@
-From 1f47f469aac68bc88be24e530b4267d03537de12 Mon Sep 17 00:00:00 2001
+From 99b0e4a22c4dd9cd718dc23e2c583bf4b2a21b3e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 66c3a68c1d..6f0beafa27 100644
+index 1a6d791129..4ff0e72115 100644
@@ -37 +38 @@
-@@ -5156,7 +5156,7 @@ icmp_echo_config_setup(void)
+@@ -4618,7 +4618,7 @@ icmp_echo_config_setup(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/pci: fix UIO resource mapping in secondary process' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (23 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/testpmd: fix build on signed comparison' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'bus/pci: fix FD " luca.boccassi
` (13 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Zerun Fu
Cc: Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov, Chenbo Xia,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6bf6cd51846b6ac69b690a2ccf3b1fe7b838ce47
Thanks.
Luca Boccassi
---
From 6bf6cd51846b6ac69b690a2ccf3b1fe7b838ce47 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:06 +0800
Subject: [PATCH] bus/pci: fix UIO resource mapping in secondary process
[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]
For the primary process, the logic loops all BARs and will skip
the map of BAR with an invalid physical address (0), also will
assign 'uio_res->nb_maps' with the real mapped BARs number. But
for the secondary process, instead of loops all BARs, the logic
using the 'uio_res->nb_map' as index. If the device uses continuous
BARs there will be no problem, whereas if it uses discrete BARs,
it will lead to mapping errors.
Fix this problem by also loops all BARs and skip the map of BAR
with an invalid physical address in secondary process.
Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")
Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
drivers/bus/pci/pci_common_uio.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 76c661f054..f44ccdf27c 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -26,7 +26,7 @@ EAL_REGISTER_TAILQ(rte_uio_tailq)
static int
pci_uio_map_secondary(struct rte_pci_device *dev)
{
- int fd, i, j;
+ int fd, i = 0, j, res_idx;
struct mapped_pci_resource *uio_res;
struct mapped_pci_res_list *uio_res_list =
RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
@@ -37,7 +37,15 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
if (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
continue;
- for (i = 0; i != uio_res->nb_maps; i++) {
+ /* Map all BARs */
+ for (res_idx = 0; res_idx != PCI_MAX_RESOURCE; res_idx++) {
+ /* skip empty BAR */
+ if (dev->mem_resource[res_idx].phys_addr == 0)
+ continue;
+
+ if (i >= uio_res->nb_maps)
+ return -1;
+
/*
* open devname, to mmap it
*/
@@ -71,7 +79,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
}
return -1;
}
- dev->mem_resource[i].addr = mapaddr;
+ dev->mem_resource[res_idx].addr = mapaddr;
+
+ i++;
}
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.774974840 +0100
+++ 0026-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.patch 2024-07-24 12:29:20.795026614 +0100
@@ -1 +1 @@
-From 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 Mon Sep 17 00:00:00 2001
+From 6bf6cd51846b6ac69b690a2ccf3b1fe7b838ce47 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index ff1b02b6bd..65f72b7cc6 100644
+index 76c661f054..f44ccdf27c 100644
@@ -60 +61 @@
-@@ -70,7 +78,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
+@@ -71,7 +79,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/pci: fix FD in secondary process' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (24 preceding siblings ...)
2024-07-24 11:33 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'dma/hisilicon: remove support for HIP09 platform' " luca.boccassi
` (12 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Zerun Fu
Cc: Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov, Chenbo Xia,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/635c7eaa5ee36df3fd2ad6cc727078b8a55cb209
Thanks.
Luca Boccassi
---
From 635c7eaa5ee36df3fd2ad6cc727078b8a55cb209 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:07 +0800
Subject: [PATCH] bus/pci: fix FD in secondary process
[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]
In the previous logic the 'fd' was only saved in the primary process,
but for some devices this value is also used in the secondary logic.
For example, the call of 'rte_pci_find_ext_capability()' will fail in
the secondary process.
Fix this problem by getting and saving the value of 'fd' also in the
secondary process logic.
Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")
Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
drivers/bus/pci/linux/pci_uio.c | 5 ++++-
drivers/bus/pci/pci_common_uio.c | 34 ++++++++++++++++----------------
2 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c
index d52125e49b..81a1ed6fa0 100644
--- a/drivers/bus/pci/linux/pci_uio.c
+++ b/drivers/bus/pci/linux/pci_uio.c
@@ -245,7 +245,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
}
snprintf(devname, sizeof(devname), "/dev/uio%u", uio_num);
- /* save fd if in primary process */
+ /* save fd */
fd = open(devname, O_RDWR);
if (fd < 0) {
RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",
@@ -283,6 +283,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
}
}
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
/* allocate the mapping details for secondary processes*/
*uio_res = rte_zmalloc("UIO_RES", sizeof(**uio_res), 0);
if (*uio_res == NULL) {
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index f44ccdf27c..a06378b239 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -106,15 +106,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
if (rte_intr_dev_fd_set(dev->intr_handle, -1))
return -1;
- /* secondary processes - use already recorded details */
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return pci_uio_map_secondary(dev);
-
/* allocate uio resource */
ret = pci_uio_alloc_resource(dev, &uio_res);
if (ret)
return ret;
+ /* secondary processes - use already recorded details */
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return pci_uio_map_secondary(dev);
+
/* Map all BARs */
for (i = 0; i != PCI_MAX_RESOURCE; i++) {
/* skip empty BAR */
@@ -230,19 +230,7 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
if (uio_res == NULL)
return;
- /* secondary processes - just free maps */
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return pci_uio_unmap(uio_res);
-
- TAILQ_REMOVE(uio_res_list, uio_res, next);
-
- /* unmap all resources */
- pci_uio_unmap(uio_res);
-
- /* free uio resource */
- rte_free(uio_res);
-
- /* close fd if in primary process */
+ /* close fd */
if (rte_intr_fd_get(dev->intr_handle) >= 0)
close(rte_intr_fd_get(dev->intr_handle));
uio_cfg_fd = rte_intr_dev_fd_get(dev->intr_handle);
@@ -253,4 +241,16 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
rte_intr_fd_set(dev->intr_handle, -1);
rte_intr_type_set(dev->intr_handle, RTE_INTR_HANDLE_UNKNOWN);
+
+ /* secondary processes - just free maps */
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return pci_uio_unmap(uio_res);
+
+ TAILQ_REMOVE(uio_res_list, uio_res, next);
+
+ /* unmap all resources */
+ pci_uio_unmap(uio_res);
+
+ /* free uio resource */
+ rte_free(uio_res);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.832583302 +0100
+++ 0027-bus-pci-fix-FD-in-secondary-process.patch 2024-07-24 12:29:20.795026614 +0100
@@ -1 +1 @@
-From 847d78fb9530fff401bf167298aad22766a1f04a Mon Sep 17 00:00:00 2001
+From 635c7eaa5ee36df3fd2ad6cc727078b8a55cb209 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index f7d990d33f..4c1d3327a9 100644
+index d52125e49b..81a1ed6fa0 100644
@@ -33 +34 @@
-@@ -234,7 +234,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+@@ -245,7 +245,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -41,2 +42,2 @@
- PCI_LOG(ERR, "Cannot open %s: %s", devname, strerror(errno));
-@@ -270,6 +270,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+ RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",
+@@ -283,6 +283,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -53 +54 @@
-index 65f72b7cc6..30503bd23a 100644
+index f44ccdf27c..a06378b239 100644
@@ -56 +57 @@
-@@ -105,15 +105,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
+@@ -106,15 +106,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
@@ -76 +77 @@
-@@ -225,19 +225,7 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -230,19 +230,7 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
@@ -97 +98 @@
-@@ -248,4 +236,16 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -253,4 +241,16 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'dma/hisilicon: remove support for HIP09 platform' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (25 preceding siblings ...)
2024-07-24 11:33 ` patch 'bus/pci: fix FD " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " luca.boccassi
` (11 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Chengwen Feng; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1b1337cc9316675d9cd4982d78d4abf5891c965f
Thanks.
Luca Boccassi
---
From 1b1337cc9316675d9cd4982d78d4abf5891c965f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 4 Jul 2024 02:53:17 +0000
Subject: [PATCH] dma/hisilicon: remove support for HIP09 platform
[ upstream commit 2a3f42942a5f4df62108679ef44a34d21b4a2553 ]
The DMA for HIP09 is no longer available, so delete it.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
doc/guides/dmadevs/hisilicon.rst | 1 -
drivers/dma/hisilicon/hisi_dmadev.c | 40 +----------------------------
drivers/dma/hisilicon/hisi_dmadev.h | 35 +------------------------
3 files changed, 2 insertions(+), 74 deletions(-)
diff --git a/doc/guides/dmadevs/hisilicon.rst b/doc/guides/dmadevs/hisilicon.rst
index 8c1f0f8886..974bc49376 100644
--- a/doc/guides/dmadevs/hisilicon.rst
+++ b/doc/guides/dmadevs/hisilicon.rst
@@ -13,7 +13,6 @@ Supported Kunpeng SoCs
----------------------
* Kunpeng 920
-* Kunpeng 930
Device Setup
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index 0e11ca14cc..4db3b0554c 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -39,8 +39,6 @@ hisi_dma_queue_base(struct hisi_dma_dev *hw)
{
if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP08)
return HISI_DMA_HIP08_QUEUE_BASE;
- else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
- return HISI_DMA_HIP09_QUEUE_BASE;
else
return 0;
}
@@ -216,25 +214,6 @@ hisi_dma_init_hw(struct hisi_dma_dev *hw)
HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
- } else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09) {
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_CTRL0_REG,
- HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M, false);
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_STATUS_REG,
- HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
- HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw,
- HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
- hisi_dma_update_queue_bit(hw, HISI_DMA_QUEUE_CTRL1_REG,
- HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B, true);
- hisi_dma_update_bit(hw,
- HISI_DMA_HIP09_QUEUE_CFG_REG(hw->queue_id),
- HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B,
- true);
}
}
@@ -256,8 +235,6 @@ hisi_dma_reg_layout(uint8_t revision)
{
if (revision == HISI_DMA_REVISION_HIP08B)
return HISI_DMA_REG_LAYOUT_HIP08;
- else if (revision >= HISI_DMA_REVISION_HIP09A)
- return HISI_DMA_REG_LAYOUT_HIP09;
else
return HISI_DMA_REG_LAYOUT_INVALID;
}
@@ -328,14 +305,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
struct rte_dma_info *dev_info,
uint32_t info_sz)
{
- struct hisi_dma_dev *hw = dev->data->dev_private;
+ RTE_SET_USED(dev);
RTE_SET_USED(info_sz);
dev_info->dev_capa = RTE_DMA_CAPA_MEM_TO_MEM |
RTE_DMA_CAPA_OPS_COPY;
- if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
- dev_info->dev_capa |= RTE_DMA_CAPA_HANDLES_ERRORS;
-
dev_info->max_vchans = 1;
dev_info->max_desc = HISI_DMA_MAX_DESC_NUM;
dev_info->min_desc = HISI_DMA_MIN_DESC_NUM;
@@ -514,18 +488,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
{ HISI_DMA_REG_LAYOUT_HIP08,
HISI_DMA_HIP08_DUMP_START_REG,
HISI_DMA_HIP08_DUMP_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_A_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_A_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_B_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_B_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_C_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_C_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_D_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_D_END_REG },
};
uint32_t i;
diff --git a/drivers/dma/hisilicon/hisi_dmadev.h b/drivers/dma/hisilicon/hisi_dmadev.h
index 5a17f9f69e..a57b5c759a 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.h
+++ b/drivers/dma/hisilicon/hisi_dmadev.h
@@ -25,22 +25,14 @@
#define HISI_DMA_DEVICE_ID 0xA122
#define HISI_DMA_PCI_REVISION_ID_REG 0x08
#define HISI_DMA_REVISION_HIP08B 0x21
-#define HISI_DMA_REVISION_HIP09A 0x30
#define HISI_DMA_MAX_HW_QUEUES 4
#define HISI_DMA_MAX_DESC_NUM 8192
#define HISI_DMA_MIN_DESC_NUM 32
-/**
- * The HIP08B(HiSilicon IP08) and HIP09B(HiSilicon IP09) are DMA iEPs, they
- * have the same pci device id but different pci revision.
- * Unfortunately, they have different register layouts, so two layout
- * enumerations are defined.
- */
enum {
HISI_DMA_REG_LAYOUT_INVALID = 0,
- HISI_DMA_REG_LAYOUT_HIP08,
- HISI_DMA_REG_LAYOUT_HIP09
+ HISI_DMA_REG_LAYOUT_HIP08
};
/**
@@ -69,9 +61,6 @@ enum {
* length of queue-region. The global offset for a single queue register is
* calculated by:
* offset = queue-base + (queue-id * queue-region) + reg-offset-in-region.
- *
- * The first part of queue region is basically the same for HIP08 and HIP09
- * register layouts, therefore, HISI_QUEUE_* registers are defined for it.
*/
#define HISI_DMA_QUEUE_SQ_BASE_L_REG 0x0
#define HISI_DMA_QUEUE_SQ_BASE_H_REG 0x4
@@ -110,28 +99,6 @@ enum {
#define HISI_DMA_HIP08_DUMP_START_REG 0x2000
#define HISI_DMA_HIP08_DUMP_END_REG 0x2280
-/**
- * HiSilicon IP09 DMA register and field define:
- */
-#define HISI_DMA_HIP09_QUEUE_BASE 0x2000
-#define HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M GENMASK(31, 28)
-#define HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B 2
-#define HISI_DMA_HIP09_QUEUE_INT_MASK_M 0x1
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG 0x48
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG 0x4C
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M GENMASK(18, 1)
-#define HISI_DMA_HIP09_QUEUE_CFG_REG(queue_id) (0x800 + \
- (queue_id) * 0x20)
-#define HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B 16
-#define HISI_DMA_HIP09_DUMP_REGION_A_START_REG 0x0
-#define HISI_DMA_HIP09_DUMP_REGION_A_END_REG 0x368
-#define HISI_DMA_HIP09_DUMP_REGION_B_START_REG 0x800
-#define HISI_DMA_HIP09_DUMP_REGION_B_END_REG 0xA08
-#define HISI_DMA_HIP09_DUMP_REGION_C_START_REG 0x1800
-#define HISI_DMA_HIP09_DUMP_REGION_C_END_REG 0x1A4C
-#define HISI_DMA_HIP09_DUMP_REGION_D_START_REG 0x1C00
-#define HISI_DMA_HIP09_DUMP_REGION_D_END_REG 0x1CC4
-
/**
* In fact, there are multiple states, but it need to pay attention to
* the following three states for the driver:
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.884110361 +0100
+++ 0028-dma-hisilicon-remove-support-for-HIP09-platform.patch 2024-07-24 12:29:20.799026695 +0100
@@ -1 +1 @@
-From 2a3f42942a5f4df62108679ef44a34d21b4a2553 Mon Sep 17 00:00:00 2001
+From 1b1337cc9316675d9cd4982d78d4abf5891c965f Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-The DMA for HIP09 is no longer available, so delete it.
+[ upstream commit 2a3f42942a5f4df62108679ef44a34d21b4a2553 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+The DMA for HIP09 is no longer available, so delete it.
@@ -12,5 +12,4 @@
- doc/guides/dmadevs/hisilicon.rst | 1 -
- doc/guides/rel_notes/release_24_07.rst | 5 ++++
- drivers/dma/hisilicon/hisi_dmadev.c | 40 +-------------------------
- drivers/dma/hisilicon/hisi_dmadev.h | 35 +---------------------
- 4 files changed, 7 insertions(+), 74 deletions(-)
+ doc/guides/dmadevs/hisilicon.rst | 1 -
+ drivers/dma/hisilicon/hisi_dmadev.c | 40 +----------------------------
+ drivers/dma/hisilicon/hisi_dmadev.h | 35 +------------------------
+ 3 files changed, 2 insertions(+), 74 deletions(-)
@@ -30,16 +28,0 @@
-diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
-index 058609b0f3..eb2ed1a55f 100644
---- a/doc/guides/rel_notes/release_24_07.rst
-+++ b/doc/guides/rel_notes/release_24_07.rst
-@@ -204,6 +204,11 @@ Removed Items
- BPF is not supported and the librte-bpf test fails on 32-bit x86 kernels.
- So disable the library and the pmd.
-
-+* **Removed hisilicon DMA support for HIP09 platform.**
-+
-+ The DMA for HIP09 is no longer available,
-+ so the support is removed from hisilicon driver for HIP09 platform.
-+
-
- API Changes
- -----------
@@ -47 +30 @@
-index e96bc1d654..7cd6ebc1e0 100644
+index 0e11ca14cc..4db3b0554c 100644
@@ -94 +77 @@
-@@ -327,14 +304,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
+@@ -328,14 +305,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
@@ -110 +93 @@
-@@ -513,18 +487,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
+@@ -514,18 +488,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/dumpcap: handle SIGTERM and SIGHUP' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (26 preceding siblings ...)
2024-07-24 11:33 ` patch 'dma/hisilicon: remove support for HIP09 platform' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/pdump: " luca.boccassi
` (10 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7ecd214ddab65f29b6ea9bdcb6d9996836e47bd5
Thanks.
Luca Boccassi
---
From 7ecd214ddab65f29b6ea9bdcb6d9996836e47bd5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:43 -0700
Subject: [PATCH] app/dumpcap: handle SIGTERM and SIGHUP
[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]
If the dumpcap is killed it does not cleanup which leaves
the ring buffer and the memory pool behind.
Until resource are exhausted devices will continue to fill the ring.
Fix by having the application handle SIGTERM, SIGHUP, and SIGPIPE.
These are the same signals handled in same way by the wireshark
dumpcap application.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 0039aa1975..81c9d7d2f1 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -805,6 +805,11 @@ int main(int argc, char **argv)
{
struct rte_ring *r;
struct rte_mempool *mp;
+ struct sigaction action = {
+ .sa_flags = SA_RESTART,
+ .sa_handler = signal_handler,
+ };
+ struct sigaction origaction;
dumpcap_out_t out;
char *p;
@@ -832,6 +837,14 @@ int main(int argc, char **argv)
if (TAILQ_EMPTY(&interfaces))
set_default_interface();
+ sigemptyset(&action.sa_mask);
+ sigaction(SIGTERM, &action, NULL);
+ sigaction(SIGINT, &action, NULL);
+ sigaction(SIGPIPE, &action, NULL);
+ sigaction(SIGHUP, NULL, &origaction);
+ if (origaction.sa_handler == SIG_DFL)
+ sigaction(SIGHUP, &action, NULL);
+
r = create_ring();
mp = create_mempool();
out = create_output();
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.934107800 +0100
+++ 0029-app-dumpcap-handle-SIGTERM-and-SIGHUP.patch 2024-07-24 12:29:20.799026695 +0100
@@ -1 +1 @@
-From b04d11bdc672cf8afb7a544077303a941a6a2baa Mon Sep 17 00:00:00 2001
+From 7ecd214ddab65f29b6ea9bdcb6d9996836e47bd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- app/dumpcap/main.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
+ app/dumpcap/main.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
@@ -23 +24 @@
-index b25b95e2fc..ba91ca94d0 100644
+index 0039aa1975..81c9d7d2f1 100644
@@ -26 +27 @@
-@@ -936,6 +936,11 @@ int main(int argc, char **argv)
+@@ -805,6 +805,11 @@ int main(int argc, char **argv)
@@ -38,3 +39,3 @@
-@@ -961,8 +966,13 @@ int main(int argc, char **argv)
-
- compile_filters();
+@@ -832,6 +837,14 @@ int main(int argc, char **argv)
+ if (TAILQ_EMPTY(&interfaces))
+ set_default_interface();
@@ -42,2 +42,0 @@
-- signal(SIGINT, signal_handler);
-- signal(SIGPIPE, SIG_IGN);
@@ -51,3 +50,4 @@
-
- enable_primary_monitor();
-
++
+ r = create_ring();
+ mp = create_mempool();
+ out = create_output();
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/pdump: handle SIGTERM and SIGHUP' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (27 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'malloc: fix multi-process wait condition handling' " luca.boccassi
` (9 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8ea890172ead4d39327a6939114243270ae438c5
Thanks.
Luca Boccassi
---
From 8ea890172ead4d39327a6939114243270ae438c5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:44 -0700
Subject: [PATCH] app/pdump: handle SIGTERM and SIGHUP
[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]
The pdump application will leak ring and memory pool if killed
by SIGTERM. Like dumpcap, the pdump process should cleanup
if process terminates due to being killed or hangup.
Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/pdump/main.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 9ea8ed8943..6216d5454c 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -571,13 +571,9 @@ disable_primary_monitor(void)
}
static void
-signal_handler(int sig_num)
+signal_handler(int sig_num __rte_unused)
{
- if (sig_num == SIGINT) {
- printf("\n\nSignal %d received, preparing to exit...\n",
- sig_num);
- quit_signal = 1;
- }
+ quit_signal = 1;
}
static inline int
@@ -974,6 +970,11 @@ enable_primary_monitor(void)
int
main(int argc, char **argv)
{
+ struct sigaction action = {
+ .sa_flags = SA_RESTART,
+ .sa_handler = signal_handler,
+ };
+ struct sigaction origaction;
int diag;
int ret;
int i;
@@ -982,8 +983,14 @@ main(int argc, char **argv)
char mp_flag[] = "--proc-type=secondary";
char *argp[argc + 2];
- /* catch ctrl-c so we can print on exit */
- signal(SIGINT, signal_handler);
+ /* catch ctrl-c so we can cleanup on exit */
+ sigemptyset(&action.sa_mask);
+ sigaction(SIGTERM, &action, NULL);
+ sigaction(SIGINT, &action, NULL);
+ sigaction(SIGPIPE, &action, NULL);
+ sigaction(SIGHUP, NULL, &origaction);
+ if (origaction.sa_handler == SIG_DFL)
+ sigaction(SIGHUP, &action, NULL);
argp[0] = argv[0];
argp[1] = n_flag;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.974826851 +0100
+++ 0030-app-pdump-handle-SIGTERM-and-SIGHUP.patch 2024-07-24 12:29:20.803026775 +0100
@@ -1 +1 @@
-From e1253df666fdc672bc378722db0da2ce3091a8dd Mon Sep 17 00:00:00 2001
+From 8ea890172ead4d39327a6939114243270ae438c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/pdump/main.c | 21 +++++++++++++++------
- 1 file changed, 15 insertions(+), 6 deletions(-)
+ app/pdump/main.c | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
@@ -19 +20 @@
-index 3bdbb8dc78..fa85859703 100644
+index 9ea8ed8943..6216d5454c 100644
@@ -22 +23 @@
-@@ -571,11 +571,9 @@ disable_primary_monitor(void)
+@@ -571,13 +571,9 @@ disable_primary_monitor(void)
@@ -29,0 +31,2 @@
+- printf("\n\nSignal %d received, preparing to exit...\n",
+- sig_num);
@@ -36 +39 @@
-@@ -975,6 +973,11 @@ enable_primary_monitor(void)
+@@ -974,6 +970,11 @@ enable_primary_monitor(void)
@@ -48 +51 @@
-@@ -983,8 +986,14 @@ main(int argc, char **argv)
+@@ -982,8 +983,14 @@ main(int argc, char **argv)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'malloc: fix multi-process wait condition handling' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (28 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/pdump: " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'bus/vdev: fix device reinitialization' " luca.boccassi
` (8 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0a15aefcc66b8acf00c931f1d5c61a77caabe5ea
coverity's
Thanks.
Luca Boccassi
---
From 0a15aefcc66b8acf00c931f1d5c61a77caabe5ea Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 12 Jul 2024 12:41:35 +0100
Subject: [PATCH] malloc: fix multi-process wait condition handling
[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]
From coverity's point of view, it is theoretically possible to have an
infinite wait on a wait condition because while we do check for timeout,
we do not check for whether the event we are waiting for has already
occurred by the time we get to the first cond_wait call (in this case,
it's state of memory request list entry's state being set to COMPLETE).
This can't really happen as the only time a wait condition is triggered
is when we are receiving a memory event (so the entry we are waiting on
cannot change before wait condition is triggered because it's protected
by a mutex), so either we receive an event and modify entry state, or we
exit wait on a timeout and do not care about request state. However, it's
better to keep coverity happy.
Coverity issue: 425709
Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/common/malloc_mp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
index 7270c2ec90..c95c4635d1 100644
--- a/lib/eal/common/malloc_mp.c
+++ b/lib/eal/common/malloc_mp.c
@@ -755,7 +755,8 @@ request_to_primary(struct malloc_mp_req *user_req)
do {
ret = pthread_cond_timedwait(&entry->cond,
&mp_request_list.lock, &ts);
- } while (ret != 0 && ret != ETIMEDOUT);
+ } while ((ret != 0 && ret != ETIMEDOUT) &&
+ entry->state == REQ_STATE_ACTIVE);
if (entry->state != REQ_STATE_COMPLETE) {
RTE_LOG(ERR, EAL, "Request timed out\n");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.013749866 +0100
+++ 0031-malloc-fix-multi-process-wait-condition-handling.patch 2024-07-24 12:29:20.803026775 +0100
@@ -1 +1 @@
-From 429219adab185909a8127e680d19f7628af62fb2 Mon Sep 17 00:00:00 2001
+From 0a15aefcc66b8acf00c931f1d5c61a77caabe5ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 2d39b0716f..9765277f5d 100644
+index 7270c2ec90..c95c4635d1 100644
@@ -32 +33 @@
-@@ -756,7 +756,8 @@ request_to_primary(struct malloc_mp_req *user_req)
+@@ -755,7 +755,8 @@ request_to_primary(struct malloc_mp_req *user_req)
@@ -41 +42 @@
- EAL_LOG(ERR, "Request timed out");
+ RTE_LOG(ERR, EAL, "Request timed out\n");
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/vdev: fix device reinitialization' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (29 preceding siblings ...)
2024-07-24 11:33 ` patch 'malloc: fix multi-process wait condition handling' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " luca.boccassi
` (7 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Mingjin Ye; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3682872558ec345a9762218eb8f117886bddaab4
Thanks.
Luca Boccassi
---
From 3682872558ec345a9762218eb8f117886bddaab4 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 16 Jul 2024 09:53:28 +0000
Subject: [PATCH] bus/vdev: fix device reinitialization
[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]
In secondary processes, insert_vdev() may be called multiple times on the
same device due to multi-process hot-plugging of the vdev bus and EAL
parameters to add the same vdev.
In this case, when rte_devargs_insert() is called, the devargs->name
reference will be invalidated because rte_devargs_insert() destroys the
just-allocated devargs and replaces the pointer from the devargs list.
As a result, the reference to devargs->name stored in dev->device.name
will be invalid.
This patch fixes the issue by setting the device name after calling
rte_devargs_insert().
Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/bus/vdev/vdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 38d05a9fe9..ec7abe7cda 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -288,7 +288,6 @@ insert_vdev(const char *name, const char *args,
dev->device.bus = &rte_vdev_bus;
dev->device.numa_node = SOCKET_ID_ANY;
- dev->device.name = devargs->name;
if (find_vdev(name)) {
/*
@@ -303,6 +302,7 @@ insert_vdev(const char *name, const char *args,
if (init)
rte_devargs_insert(&devargs);
dev->device.devargs = devargs;
+ dev->device.name = devargs->name;
TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
if (p_dev)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.053065682 +0100
+++ 0032-bus-vdev-fix-device-reinitialization.patch 2024-07-24 12:29:20.803026775 +0100
@@ -1 +1 @@
-From 1bd1ab6fd010837773473d821f9284369b37264c Mon Sep 17 00:00:00 2001
+From 3682872558ec345a9762218eb8f117886bddaab4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (30 preceding siblings ...)
2024-07-24 11:33 ` patch 'bus/vdev: fix device reinitialization' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash on multiple sockets' " luca.boccassi
` (6 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/68b33da50ff2ca8bb79ae9ffaa4aebfff48420f2
Thanks.
Luca Boccassi
---
From 68b33da50ff2ca8bb79ae9ffaa4aebfff48420f2 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 2 May 2024 16:28:15 +0100
Subject: [PATCH] examples/l3fwd: fix crash in ACL mode for mixed traffic
[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]
When running l3fwd in ACL mode, if we'll have mix of IPv4/IPv6 packets in
the same burst, it will most likely cause a crash.
The reason for that is that we split our burst of packets into 2 arrays -
one for ipv4, another for ipv6 for classify().
But then we try to send all packets as one burst again,
not taking into account that acl_search.res_ipv4[] will be set
only for ipv4 packets.
Same story for ipv6.
The fix is straightforward: use two already split arrays for TX.
Bugzilla ID: 1434
Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
examples/l3fwd/l3fwd_acl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index 401692bcec..d9e4ae543f 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -1073,9 +1073,9 @@ acl_main_loop(__rte_unused void *dummy)
l3fwd_acl_send_packets(
qconf,
- pkts_burst,
+ acl_search.m_ipv4,
acl_search.res_ipv4,
- nb_rx);
+ acl_search.num_ipv4);
}
if (acl_search.num_ipv6) {
@@ -1088,9 +1088,9 @@ acl_main_loop(__rte_unused void *dummy)
l3fwd_acl_send_packets(
qconf,
- pkts_burst,
+ acl_search.m_ipv6,
acl_search.res_ipv6,
- nb_rx);
+ acl_search.num_ipv6);
}
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.093106556 +0100
+++ 0033-examples-l3fwd-fix-crash-in-ACL-mode-for-mixed-traff.patch 2024-07-24 12:29:20.807026855 +0100
@@ -1 +1 @@
-From 659ded8eb733315878857f82bc22f0b03be5ce71 Mon Sep 17 00:00:00 2001
+From 68b33da50ff2ca8bb79ae9ffaa4aebfff48420f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/l3fwd: fix crash on multiple sockets' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (31 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'net/hns3: fix uninitialized variable in FEC query' " luca.boccassi
` (5 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Kaiwen Deng; +Cc: Hongbo Li, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b9b793c805de39df6ff9afd5963ffd37ba6f2a07
Thanks.
Luca Boccassi
---
From b9b793c805de39df6ff9afd5963ffd37ba6f2a07 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Wed, 3 Jul 2024 15:50:37 +0800
Subject: [PATCH] examples/l3fwd: fix crash on multiple sockets
[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]
Setting acl will clear the acl config of other sockets, which
will result in core dump.
This commit will no longer clear the acl config when setting acl.
Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Tested-by: Hongbo Li <hongbox.li@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
examples/l3fwd/l3fwd_acl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index d9e4ae543f..a1d87f4a40 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
acl_log("IPv6 ACL entries %u:\n", acl_num_ipv6);
dump_ipv6_rules((struct acl6_rule *)acl_base_ipv6, acl_num_ipv6, 1);
- memset(&acl_config, 0, sizeof(acl_config));
-
/* Check sockets a context should be created on */
if (socket_id >= NB_SOCKETS) {
acl_log("Socket %d is out "
@@ -973,6 +971,9 @@ setup_acl(const int socket_id)
return;
}
+ rte_acl_free(acl_config.acx_ipv4[socket_id]);
+ rte_acl_free(acl_config.acx_ipv6[socket_id]);
+
acl_config.acx_ipv4[socket_id] = app_acl_init(route_base_ipv4,
acl_base_ipv4, route_num_ipv4, acl_num_ipv4,
0, socket_id);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.133220449 +0100
+++ 0034-examples-l3fwd-fix-crash-on-multiple-sockets.patch 2024-07-24 12:29:20.807026855 +0100
@@ -1 +1 @@
-From 0cf06d7d846523abd48307613d429830bfb45ac9 Mon Sep 17 00:00:00 2001
+From b9b793c805de39df6ff9afd5963ffd37ba6f2a07 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index ab8222c9db..2109ab0a8c 100644
+index d9e4ae543f..a1d87f4a40 100644
@@ -25 +26 @@
-@@ -950,8 +950,6 @@ setup_acl(const int socket_id)
+@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
@@ -34 +35 @@
-@@ -961,6 +959,9 @@ setup_acl(const int socket_id)
+@@ -973,6 +971,9 @@ setup_acl(const int socket_id)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: fix uninitialized variable in FEC query' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (32 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash on multiple sockets' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'net/ice/base: fix temporary failures reading NVM' " luca.boccassi
` (4 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Jie Hai; +Cc: Huisong Li, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4568f7b753c55954f947724496ab237dab9feaf9
Thanks.
Luca Boccassi
---
From 4568f7b753c55954f947724496ab237dab9feaf9 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 23 Jul 2024 14:09:00 +0800
Subject: [PATCH] net/hns3: fix uninitialized variable in FEC query
[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]
This patch fixes uninitialized auto_state value when
querying FEC mode of device.
Bugzilla ID: 1498
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2c32f48af6..0050d46ae7 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6080,7 +6080,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
{
struct hns3_sfp_info_cmd *resp;
uint32_t tmp_fec_capa;
- uint8_t auto_state;
+ uint8_t auto_state = 0;
struct hns3_cmd_desc desc;
int ret;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.173870560 +0100
+++ 0035-net-hns3-fix-uninitialized-variable-in-FEC-query.patch 2024-07-24 12:29:20.815027016 +0100
@@ -1 +1 @@
-From 7dfc8e69aa4286854a0ac893d3828eaffee20347 Mon Sep 17 00:00:00 2001
+From 4568f7b753c55954f947724496ab237dab9feaf9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ec1251cb7e..8b43d731ac 100644
+index 2c32f48af6..0050d46ae7 100644
@@ -24 +25 @@
-@@ -6046,7 +6046,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
+@@ -6080,7 +6080,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix temporary failures reading NVM' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (33 preceding siblings ...)
2024-07-24 11:33 ` patch 'net/hns3: fix uninitialized variable in FEC query' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix queue ID restriction' " luca.boccassi
` (3 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Zhichao Zeng; +Cc: Bruce Richardson, Song Jiale, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/15ac04a0680875a2798421672a3c327e86e84bb1
Thanks.
Luca Boccassi
---
From 15ac04a0680875a2798421672a3c327e86e84bb1 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Tue, 23 Jul 2024 14:19:15 +0800
Subject: [PATCH] net/ice/base: fix temporary failures reading NVM
[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]
Reading NVM fails in some scenarios, so follow the approach taken by
kernel driver and add retries on read failures.
Fixes: 2516684aed7a ("net/ice/base: extract logic of flat NVM read to function")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
drivers/net/ice/base/ice_nvm.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index bc1a74460c..6da52f4d58 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
enum ice_status status;
u32 inlen = *length;
u32 bytes_read = 0;
+ int retry_cnt = 0;
bool last_cmd;
ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
@@ -106,11 +107,24 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
offset, (u16)read_size,
data + bytes_read, last_cmd,
read_shadow_ram, NULL);
- if (status)
- break;
-
- bytes_read += read_size;
- offset += read_size;
+ if (status) {
+ if (hw->adminq.sq_last_status != ICE_AQ_RC_EBUSY ||
+ retry_cnt > ICE_SQ_SEND_MAX_EXECUTE)
+ break;
+ ice_debug(hw, ICE_DBG_NVM,
+ "NVM read EBUSY error, retry %d\n",
+ retry_cnt + 1);
+ ice_release_nvm(hw);
+ msleep(ICE_SQ_SEND_DELAY_TIME_MS);
+ status = ice_acquire_nvm(hw, ICE_RES_READ);
+ if (status)
+ break;
+ retry_cnt++;
+ } else {
+ bytes_read += read_size;
+ offset += read_size;
+ retry_cnt = 0;
+ }
} while (!last_cmd);
*length = bytes_read;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.217366976 +0100
+++ 0036-net-ice-base-fix-temporary-failures-reading-NVM.patch 2024-07-24 12:29:20.815027016 +0100
@@ -1 +1 @@
-From 04de5c7d40b24ef391bd5b51be23994a6cfdd867 Mon Sep 17 00:00:00 2001
+From 15ac04a0680875a2798421672a3c327e86e84bb1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 528489929e..5e982de4b5 100644
+index bc1a74460c..6da52f4d58 100644
@@ -23,2 +24,2 @@
-@@ -71,6 +71,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
- {
+@@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
+ enum ice_status status;
@@ -29 +29,0 @@
- int status;
@@ -30,0 +31 @@
+ ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples: fix queue ID restriction' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (34 preceding siblings ...)
2024-07-24 11:33 ` patch 'net/ice/base: fix temporary failures reading NVM' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix lcore " luca.boccassi
` (2 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Sivaprasad Tummala
Cc: Konstantin Ananyev, Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3b8becb93e229a66cbf859c3137a6a7803a20edc
Thanks.
Luca Boccassi
---
From 3b8becb93e229a66cbf859c3137a6a7803a20edc Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:40 +0100
Subject: [PATCH] examples: fix queue ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a ]
Currently application supports Rx queue IDs up to 255
and max queues of 256 irrespective of device support.
This limits the number of active lcores to 256.
The patch fixes these constraints by increasing
the Rx queue IDs to support up to 65535.
Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 19 ++++++-----
examples/ipsec-secgw/ipsec.h | 2 +-
examples/ipsec-secgw/ipsec_worker.c | 10 +++---
examples/l3fwd-graph/main.c | 19 +++++------
examples/l3fwd-power/main.c | 49 ++++++++++++++---------------
examples/l3fwd-power/main.h | 2 +-
examples/l3fwd-power/perf_core.c | 8 +++--
examples/l3fwd/l3fwd.h | 2 +-
examples/l3fwd/l3fwd_acl.c | 4 +--
examples/l3fwd/l3fwd_em.c | 4 +--
examples/l3fwd/l3fwd_event.h | 2 +-
examples/l3fwd/l3fwd_fib.c | 4 +--
examples/l3fwd/l3fwd_lpm.c | 5 ++-
examples/l3fwd/main.c | 24 +++++++-------
14 files changed, 76 insertions(+), 78 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index e4c3482411..8b0dfe76e7 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -220,7 +220,7 @@ static const char *cfgfile;
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
@@ -695,8 +695,7 @@ ipsec_poll_mode_worker(void)
struct rte_mbuf *pkts[MAX_PKT_BURST];
uint32_t lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
- uint16_t i, nb_rx, portid;
- uint8_t queueid;
+ uint16_t i, nb_rx, portid, queueid;
struct lcore_conf *qconf;
int32_t rc, socket_id;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)
@@ -743,7 +742,7 @@ ipsec_poll_mode_worker(void)
portid = rxql[i].port_id;
queueid = rxql[i].queue_id;
RTE_LOG(INFO, IPSEC,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
@@ -788,8 +787,7 @@ int
check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid)
{
uint16_t i;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
for (i = 0; i < nb_lcore_params; ++i) {
portid = lcore_params_array[i].port_id;
@@ -851,7 +849,7 @@ check_poll_mode_params(struct eh_conf *eh_conf)
return 0;
}
-static uint8_t
+static uint16_t
get_port_nb_rx_queues(const uint16_t port)
{
int32_t queue = -1;
@@ -862,7 +860,7 @@ get_port_nb_rx_queues(const uint16_t port)
lcore_params[i].queue_id > queue)
queue = lcore_params[i].queue_id;
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int32_t
@@ -1050,6 +1048,7 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int32_t i;
uint32_t size;
+ uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
nb_lcore_params = 0;
@@ -1070,7 +1069,7 @@ parse_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++) {
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
return -1;
}
if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -1081,7 +1080,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 2890e6e267..c764c9d7b8 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -285,7 +285,7 @@ struct cnt_blk {
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
struct rte_security_ctx *sec_ctx;
} __rte_cache_aligned;
diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c
index 2f02946f86..7e4db87caf 100644
--- a/examples/ipsec-secgw/ipsec_worker.c
+++ b/examples/ipsec-secgw/ipsec_worker.c
@@ -1598,8 +1598,7 @@ ipsec_poll_mode_wrkr_inl_pr(void)
int32_t socket_id;
uint32_t lcore_id;
int32_t i, nb_rx;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
prev_tsc = 0;
lcore_id = rte_lcore_id();
@@ -1633,7 +1632,7 @@ ipsec_poll_mode_wrkr_inl_pr(void)
portid = rxql[i].port_id;
queueid = rxql[i].queue_id;
RTE_LOG(INFO, IPSEC,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
@@ -1729,8 +1728,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void)
uint32_t i, nb_rx, j;
int32_t socket_id;
uint32_t lcore_id;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
prev_tsc = 0;
lcore_id = rte_lcore_id();
@@ -1764,7 +1762,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void)
portid = rxql[i].port_id;
queueid = rxql[i].queue_id;
RTE_LOG(INFO, IPSEC,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 6dcb6ee92b..f9ca0ff23b 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -78,7 +78,7 @@ static uint32_t enabled_port_mask;
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
char node_name[RTE_NODE_NAMESIZE];
};
@@ -96,7 +96,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
@@ -150,14 +150,14 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
static int
check_lcore_params(void)
{
- uint8_t queue, lcore;
+ uint16_t queue, i;
int socketid;
- uint16_t i;
+ uint8_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
if (queue >= MAX_RX_QUEUE_PER_PORT) {
- printf("Invalid queue number: %hhu\n", queue);
+ printf("Invalid queue number: %" PRIu16 "\n", queue);
return -1;
}
lcore = lcore_params[i].lcore_id;
@@ -202,7 +202,7 @@ check_port_config(void)
return 0;
}
-static uint8_t
+static uint16_t
get_port_n_rx_queues(const uint16_t port)
{
int queue = -1;
@@ -220,7 +220,7 @@ get_port_n_rx_queues(const uint16_t port)
}
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int
@@ -356,7 +356,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
@@ -746,7 +746,8 @@ main(int argc, char **argv)
"ethdev_tx-*",
"pkt_drop",
};
- uint8_t nb_rx_queue, queue, socketid;
+ uint8_t socketid;
+ uint16_t nb_rx_queue, queue;
struct rte_graph_param graph_conf;
struct rte_eth_dev_info dev_info;
uint32_t nb_ports, nb_conf = 0;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index fd3ade330f..9f60b784df 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -228,7 +228,7 @@ enum freq_scale_hint_t
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
enum freq_scale_hint_t freq_up_hint;
uint32_t zero_rx_packet_count;
uint32_t idle_hint;
@@ -860,7 +860,7 @@ sleep_until_rx_interrupt(int num, int lcore)
struct rte_epoll_event event[num];
int n, i;
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
void *data;
if (status[lcore].wakeup) {
@@ -872,9 +872,9 @@ sleep_until_rx_interrupt(int num, int lcore)
n = rte_epoll_wait(RTE_EPOLL_PER_THREAD, event, num, 10);
for (i = 0; i < n; i++) {
data = event[i].epdata.data;
- port_id = ((uintptr_t)data) >> CHAR_BIT;
+ port_id = ((uintptr_t)data) >> (sizeof(uint16_t) * CHAR_BIT);
queue_id = ((uintptr_t)data) &
- RTE_LEN2MASK(CHAR_BIT, uint8_t);
+ RTE_LEN2MASK((sizeof(uint16_t) * CHAR_BIT), uint16_t);
RTE_LOG(INFO, L3FWD_POWER,
"lcore %u is waked up from rx interrupt on"
" port %d queue %d\n",
@@ -889,7 +889,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
{
int i;
struct lcore_rx_queue *rx_queue;
- uint8_t queue_id;
+ uint16_t queue_id;
uint16_t port_id;
for (i = 0; i < qconf->n_rx_queue; ++i) {
@@ -909,7 +909,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
static int event_register(struct lcore_conf *qconf)
{
struct lcore_rx_queue *rx_queue;
- uint8_t queueid;
+ uint16_t queueid;
uint16_t portid;
uint32_t data;
int ret;
@@ -919,7 +919,7 @@ static int event_register(struct lcore_conf *qconf)
rx_queue = &(qconf->rx_queue_list[i]);
portid = rx_queue->port_id;
queueid = rx_queue->queue_id;
- data = portid << CHAR_BIT | queueid;
+ data = portid << (sizeof(uint16_t) * CHAR_BIT) | queueid;
ret = rte_eth_dev_rx_intr_ctl_q(portid, queueid,
RTE_EPOLL_PER_THREAD,
@@ -939,8 +939,7 @@ static int main_intr_loop(__rte_unused void *dummy)
unsigned int lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, j, nb_rx;
- uint8_t queueid;
- uint16_t portid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
struct lcore_rx_queue *rx_queue;
uint32_t lcore_rx_idle_count = 0;
@@ -968,7 +967,7 @@ static int main_intr_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD_POWER,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
@@ -1105,8 +1104,7 @@ main_telemetry_loop(__rte_unused void *dummy)
unsigned int lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc, prev_tel_tsc;
int i, j, nb_rx;
- uint8_t queueid;
- uint16_t portid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
struct lcore_rx_queue *rx_queue;
uint64_t ep_nep[2] = {0}, fp_nfp[2] = {0};
@@ -1136,7 +1134,7 @@ main_telemetry_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u "
- "rxqueueid=%hhu\n", lcore_id, portid, queueid);
+ "rxqueueid=%" PRIu16 "\n", lcore_id, portid, queueid);
}
while (!is_done()) {
@@ -1330,8 +1328,7 @@ main_legacy_loop(__rte_unused void *dummy)
uint64_t prev_tsc, diff_tsc, cur_tsc, tim_res_tsc, hz;
uint64_t prev_tsc_power = 0, cur_tsc_power, diff_tsc_power;
int i, j, nb_rx;
- uint8_t queueid;
- uint16_t portid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
struct lcore_rx_queue *rx_queue;
enum freq_scale_hint_t lcore_scaleup_hint;
@@ -1359,7 +1356,7 @@ main_legacy_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u "
- "rxqueueid=%hhu\n", lcore_id, portid, queueid);
+ "rxqueueid=%" PRIu16 "\n", lcore_id, portid, queueid);
}
/* add into event wait list */
@@ -1524,14 +1521,14 @@ start_rx:
static int
check_lcore_params(void)
{
- uint8_t queue, lcore;
- uint16_t i;
+ uint16_t queue, i;
+ uint8_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
if (queue >= MAX_RX_QUEUE_PER_PORT) {
- printf("invalid queue number: %hhu\n", queue);
+ printf("invalid queue number: %" PRIu16 "\n", queue);
return -1;
}
lcore = lcore_params[i].lcore_id;
@@ -1576,7 +1573,7 @@ check_port_config(void)
return 0;
}
-static uint8_t
+static uint16_t
get_port_n_rx_queues(const uint16_t port)
{
int queue = -1;
@@ -1587,7 +1584,7 @@ get_port_n_rx_queues(const uint16_t port)
lcore_params[i].queue_id > queue)
queue = lcore_params[i].queue_id;
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int
@@ -1782,6 +1779,7 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
+ unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
nb_lcore_params = 0;
@@ -1801,8 +1799,7 @@ parse_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++){
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] >
- 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
return -1;
}
if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -1813,7 +1810,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
@@ -2719,8 +2716,8 @@ main(int argc, char **argv)
uint64_t hz;
uint32_t n_tx_queue, nb_lcores;
uint32_t dev_rxq_num, dev_txq_num;
- uint8_t nb_rx_queue, queue, socketid;
- uint16_t portid;
+ uint8_t socketid;
+ uint16_t portid, nb_rx_queue, queue;
const char *ptr_strings[NUM_TELSTATS];
/* init EAL */
diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h
index 258de98f5b..40b5194726 100644
--- a/examples/l3fwd-power/main.h
+++ b/examples/l3fwd-power/main.h
@@ -9,7 +9,7 @@
#define MAX_LCORE_PARAMS 1024
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index 41ef6d0c9a..f34442b9d0 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -22,7 +22,7 @@ static uint16_t nb_hp_lcores;
struct perf_lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t high_perf;
uint8_t lcore_idx;
} __rte_cache_aligned;
@@ -132,6 +132,7 @@ parse_perf_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned int size;
+ unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255};
nb_prf_lc_prms = 0;
@@ -152,7 +153,8 @@ parse_perf_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++) {
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
+
return -1;
}
if (nb_prf_lc_prms >= MAX_LCORE_PARAMS) {
@@ -163,7 +165,7 @@ parse_perf_config(const char *q_arg)
prf_lc_prms[nb_prf_lc_prms].port_id =
(uint8_t)int_fld[FLD_PORT];
prf_lc_prms[nb_prf_lc_prms].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
prf_lc_prms[nb_prf_lc_prms].high_perf =
!!(uint8_t)int_fld[FLD_LCORE_HP];
prf_lc_prms[nb_prf_lc_prms].lcore_idx =
diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h
index b55855c932..e774623b57 100644
--- a/examples/l3fwd/l3fwd.h
+++ b/examples/l3fwd/l3fwd.h
@@ -74,7 +74,7 @@ struct mbuf_table {
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
} __rte_cache_aligned;
struct lcore_conf {
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index a1d87f4a40..31798ccb10 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -998,7 +998,7 @@ acl_main_loop(__rte_unused void *dummy)
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
uint16_t portid;
- uint8_t queueid;
+ uint16_t queueid;
struct lcore_conf *qconf;
int socketid;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)
@@ -1021,7 +1021,7 @@ acl_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 35de31157e..e298fef523 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -584,7 +584,7 @@ em_main_loop(__rte_unused void *dummy)
unsigned lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
- uint8_t queueid;
+ uint16_t queueid;
uint16_t portid;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
@@ -607,7 +607,7 @@ em_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h
index e21817c36b..a7af23b8a0 100644
--- a/examples/l3fwd/l3fwd_event.h
+++ b/examples/l3fwd/l3fwd_event.h
@@ -76,8 +76,8 @@ struct l3fwd_event_resources {
uint8_t deq_depth;
uint8_t has_burst;
uint8_t enabled;
- uint8_t eth_rx_queues;
uint8_t vector_enabled;
+ uint16_t eth_rx_queues;
uint16_t vector_size;
uint64_t vector_tmo_ns;
};
diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index 18398492ae..10fa121942 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -186,7 +186,7 @@ fib_main_loop(__rte_unused void *dummy)
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
uint16_t portid;
- uint8_t queueid;
+ uint16_t queueid;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
US_PER_S * BURST_TX_DRAIN_US;
@@ -208,7 +208,7 @@ fib_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 5172979c72..54b059fe2a 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -148,8 +148,7 @@ lpm_main_loop(__rte_unused void *dummy)
unsigned lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
US_PER_S * BURST_TX_DRAIN_US;
@@ -171,7 +170,7 @@ lpm_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 329427ae4f..b6b105d42b 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -96,7 +96,7 @@ struct parm_cfg parm_config;
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
@@ -288,14 +288,14 @@ setup_l3fwd_lookup_tables(void)
static int
check_lcore_params(void)
{
- uint8_t queue, lcore;
- uint16_t i;
+ uint16_t queue, i;
+ uint8_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
if (queue >= MAX_RX_QUEUE_PER_PORT) {
- printf("invalid queue number: %hhu\n", queue);
+ printf("invalid queue number: %" PRIu16 "\n", queue);
return -1;
}
lcore = lcore_params[i].lcore_id;
@@ -332,7 +332,7 @@ check_port_config(void)
return 0;
}
-static uint8_t
+static uint16_t
get_port_n_rx_queues(const uint16_t port)
{
int queue = -1;
@@ -348,7 +348,7 @@ get_port_n_rx_queues(const uint16_t port)
lcore_params[i].port_id);
}
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int
@@ -492,6 +492,7 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
+ uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
nb_lcore_params = 0;
@@ -510,7 +511,7 @@ parse_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++){
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
return -1;
}
if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -521,7 +522,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
@@ -619,7 +620,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)
{
struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();
char *end = NULL;
- uint8_t num_eth_rx_queues;
+ uint16_t num_eth_rx_queues;
/* parse decimal string */
num_eth_rx_queues = strtoul(eth_rx_queues, &end, 10);
@@ -1169,7 +1170,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf,
static void
l3fwd_poll_resource_setup(void)
{
- uint8_t nb_rx_queue, queue, socketid;
+ uint8_t socketid;
+ uint16_t nb_rx_queue, queue;
struct rte_eth_dev_info dev_info;
uint32_t n_tx_queue, nb_lcores;
struct rte_eth_txconf *txconf;
@@ -1466,7 +1468,7 @@ main(int argc, char **argv)
struct lcore_conf *qconf;
uint16_t queueid, portid;
unsigned int lcore_id;
- uint8_t queue;
+ uint16_t queue;
int i, ret;
/* init EAL */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.257571784 +0100
+++ 0037-examples-fix-queue-ID-restriction.patch 2024-07-24 12:29:20.835027419 +0100
@@ -1 +1 @@
-From b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a Mon Sep 17 00:00:00 2001
+From 3b8becb93e229a66cbf859c3137a6a7803a20edc Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index d7c18bea34..8292a262cd 100644
+index e4c3482411..8b0dfe76e7 100644
@@ -48 +49 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -53 +54 @@
- };
+ } __rte_cache_aligned;
@@ -129 +130 @@
-index 36b6164ab2..6f45fdb166 100644
+index 2890e6e267..c764c9d7b8 100644
@@ -134 +135 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -138,2 +139,2 @@
- void *sec_ctx;
- };
+ struct rte_security_ctx *sec_ctx;
+ } __rte_cache_aligned;
@@ -142 +143 @@
-index 8d122e8519..c9c43ebd2b 100644
+index 2f02946f86..7e4db87caf 100644
@@ -184 +185 @@
-index ec4d8c94c5..0866822e93 100644
+index 6dcb6ee92b..f9ca0ff23b 100644
@@ -187 +188 @@
-@@ -90,7 +90,7 @@ static int pcap_trace_enable;
+@@ -78,7 +78,7 @@ static uint32_t enabled_port_mask;
@@ -196 +197 @@
-@@ -110,7 +110,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
+@@ -96,7 +96,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
@@ -198 +199 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -203 +204 @@
- };
+ } __rte_cache_aligned;
@@ -205 +206 @@
-@@ -205,14 +205,14 @@ check_worker_model_params(void)
+@@ -150,14 +150,14 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
@@ -223 +224 @@
-@@ -257,7 +257,7 @@ check_port_config(void)
+@@ -202,7 +202,7 @@ check_port_config(void)
@@ -232 +233 @@
-@@ -275,7 +275,7 @@ get_port_n_rx_queues(const uint16_t port)
+@@ -220,7 +220,7 @@ get_port_n_rx_queues(const uint16_t port)
@@ -241 +242 @@
-@@ -450,7 +450,7 @@ parse_config(const char *q_arg)
+@@ -356,7 +356,7 @@ parse_config(const char *q_arg)
@@ -250 +251 @@
-@@ -1011,7 +1011,8 @@ main(int argc, char **argv)
+@@ -746,7 +746,8 @@ main(int argc, char **argv)
@@ -261 +262 @@
-index fba11da7ca..74e906cb5d 100644
+index fd3ade330f..9f60b784df 100644
@@ -264 +265 @@
-@@ -214,7 +214,7 @@ enum freq_scale_hint_t
+@@ -228,7 +228,7 @@ enum freq_scale_hint_t
@@ -266 +267 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -273 +274 @@
-@@ -838,7 +838,7 @@ sleep_until_rx_interrupt(int num, int lcore)
+@@ -860,7 +860,7 @@ sleep_until_rx_interrupt(int num, int lcore)
@@ -282 +283 @@
-@@ -850,9 +850,9 @@ sleep_until_rx_interrupt(int num, int lcore)
+@@ -872,9 +872,9 @@ sleep_until_rx_interrupt(int num, int lcore)
@@ -294 +295 @@
-@@ -867,7 +867,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
+@@ -889,7 +889,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
@@ -303 +304 @@
-@@ -887,7 +887,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
+@@ -909,7 +909,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
@@ -312 +313 @@
-@@ -897,7 +897,7 @@ static int event_register(struct lcore_conf *qconf)
+@@ -919,7 +919,7 @@ static int event_register(struct lcore_conf *qconf)
@@ -321 +322 @@
-@@ -917,8 +917,7 @@ static int main_intr_loop(__rte_unused void *dummy)
+@@ -939,8 +939,7 @@ static int main_intr_loop(__rte_unused void *dummy)
@@ -331 +332 @@
-@@ -946,7 +945,7 @@ static int main_intr_loop(__rte_unused void *dummy)
+@@ -968,7 +967,7 @@ static int main_intr_loop(__rte_unused void *dummy)
@@ -340 +341 @@
-@@ -1083,8 +1082,7 @@ main_telemetry_loop(__rte_unused void *dummy)
+@@ -1105,8 +1104,7 @@ main_telemetry_loop(__rte_unused void *dummy)
@@ -350 +351 @@
-@@ -1114,7 +1112,7 @@ main_telemetry_loop(__rte_unused void *dummy)
+@@ -1136,7 +1134,7 @@ main_telemetry_loop(__rte_unused void *dummy)
@@ -359 +360 @@
-@@ -1205,8 +1203,7 @@ main_legacy_loop(__rte_unused void *dummy)
+@@ -1330,8 +1328,7 @@ main_legacy_loop(__rte_unused void *dummy)
@@ -369 +370 @@
-@@ -1234,7 +1231,7 @@ main_legacy_loop(__rte_unused void *dummy)
+@@ -1359,7 +1356,7 @@ main_legacy_loop(__rte_unused void *dummy)
@@ -378 +379 @@
-@@ -1399,14 +1396,14 @@ start_rx:
+@@ -1524,14 +1521,14 @@ start_rx:
@@ -396 +397 @@
-@@ -1451,7 +1448,7 @@ check_port_config(void)
+@@ -1576,7 +1573,7 @@ check_port_config(void)
@@ -405 +406 @@
-@@ -1462,7 +1459,7 @@ get_port_n_rx_queues(const uint16_t port)
+@@ -1587,7 +1584,7 @@ get_port_n_rx_queues(const uint16_t port)
@@ -414 +415 @@
-@@ -1661,6 +1658,7 @@ parse_config(const char *q_arg)
+@@ -1782,6 +1779,7 @@ parse_config(const char *q_arg)
@@ -422 +423 @@
-@@ -1680,8 +1678,7 @@ parse_config(const char *q_arg)
+@@ -1801,8 +1799,7 @@ parse_config(const char *q_arg)
@@ -432 +433 @@
-@@ -1692,7 +1689,7 @@ parse_config(const char *q_arg)
+@@ -1813,7 +1810,7 @@ parse_config(const char *q_arg)
@@ -441 +442 @@
-@@ -2501,8 +2498,8 @@ main(int argc, char **argv)
+@@ -2719,8 +2716,8 @@ main(int argc, char **argv)
@@ -453 +454 @@
-index e85e14bd9d..378f54794c 100644
+index 258de98f5b..40b5194726 100644
@@ -458 +459 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -463 +464 @@
- };
+ } __rte_cache_aligned;
@@ -466 +467 @@
-index c8fc69e6d3..77248889c0 100644
+index 41ef6d0c9a..f34442b9d0 100644
@@ -471 +472 @@
- struct __rte_cache_aligned perf_lcore_params {
+ struct perf_lcore_params {
@@ -477 +478 @@
- };
+ } __rte_cache_aligned;
@@ -506 +507 @@
-index f51da43319..93ce652d02 100644
+index b55855c932..e774623b57 100644
@@ -511 +512 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -515 +516 @@
- };
+ } __rte_cache_aligned;
@@ -517 +518 @@
- struct __rte_cache_aligned lcore_conf {
+ struct lcore_conf {
@@ -519 +520 @@
-index 2109ab0a8c..b635011ef7 100644
+index a1d87f4a40..31798ccb10 100644
@@ -522 +523 @@
-@@ -1061,7 +1061,7 @@ acl_main_loop(__rte_unused void *dummy)
+@@ -998,7 +998,7 @@ acl_main_loop(__rte_unused void *dummy)
@@ -531 +532 @@
-@@ -1084,7 +1084,7 @@ acl_main_loop(__rte_unused void *dummy)
+@@ -1021,7 +1021,7 @@ acl_main_loop(__rte_unused void *dummy)
@@ -541 +542 @@
-index d98e66ea2c..31a7e05e39 100644
+index 35de31157e..e298fef523 100644
@@ -544 +545 @@
-@@ -586,7 +586,7 @@ em_main_loop(__rte_unused void *dummy)
+@@ -584,7 +584,7 @@ em_main_loop(__rte_unused void *dummy)
@@ -553 +554 @@
-@@ -609,7 +609,7 @@ em_main_loop(__rte_unused void *dummy)
+@@ -607,7 +607,7 @@ em_main_loop(__rte_unused void *dummy)
@@ -563 +564 @@
-index 9aad358003..c6a4a89127 100644
+index e21817c36b..a7af23b8a0 100644
@@ -566 +567 @@
-@@ -78,8 +78,8 @@ struct l3fwd_event_resources {
+@@ -76,8 +76,8 @@ struct l3fwd_event_resources {
@@ -577 +578 @@
-index 6a21984415..f38b19af3f 100644
+index 18398492ae..10fa121942 100644
@@ -599 +600 @@
-index a484a33089..e8fd95aae9 100644
+index 5172979c72..54b059fe2a 100644
@@ -622 +623 @@
-index ad28ba9d2e..f5f5f1a7fb 100644
+index 329427ae4f..b6b105d42b 100644
@@ -625 +626 @@
-@@ -98,7 +98,7 @@ struct parm_cfg parm_config;
+@@ -96,7 +96,7 @@ struct parm_cfg parm_config;
@@ -627 +628 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -632 +633 @@
- };
+ } __rte_cache_aligned;
@@ -634 +635 @@
-@@ -292,14 +292,14 @@ setup_l3fwd_lookup_tables(void)
+@@ -288,14 +288,14 @@ setup_l3fwd_lookup_tables(void)
@@ -652 +653 @@
-@@ -336,7 +336,7 @@ check_port_config(void)
+@@ -332,7 +332,7 @@ check_port_config(void)
@@ -661 +662 @@
-@@ -352,7 +352,7 @@ get_port_n_rx_queues(const uint16_t port)
+@@ -348,7 +348,7 @@ get_port_n_rx_queues(const uint16_t port)
@@ -670 +671 @@
-@@ -500,6 +500,7 @@ parse_config(const char *q_arg)
+@@ -492,6 +492,7 @@ parse_config(const char *q_arg)
@@ -678 +679 @@
-@@ -518,7 +519,7 @@ parse_config(const char *q_arg)
+@@ -510,7 +511,7 @@ parse_config(const char *q_arg)
@@ -687 +688 @@
-@@ -529,7 +530,7 @@ parse_config(const char *q_arg)
+@@ -521,7 +522,7 @@ parse_config(const char *q_arg)
@@ -696 +697 @@
-@@ -630,7 +631,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)
+@@ -619,7 +620,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)
@@ -705 +706 @@
-@@ -1211,7 +1212,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf,
+@@ -1169,7 +1170,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf,
@@ -715 +716 @@
-@@ -1535,7 +1537,7 @@ main(int argc, char **argv)
+@@ -1466,7 +1468,7 @@ main(int argc, char **argv)
@@ -721 +722 @@
- int ret;
+ int i, ret;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples: fix lcore ID restriction' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (35 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples: fix queue ID restriction' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix port " luca.boccassi
2024-07-24 11:33 ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Sivaprasad Tummala
Cc: Konstantin Ananyev, Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6a1313b34aa99ae7454e3dbe0aae605406f50e1f
Thanks.
Luca Boccassi
---
From 6a1313b34aa99ae7454e3dbe0aae605406f50e1f Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:44 +0100
Subject: [PATCH] examples: fix lcore ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4b978938168b219346775ff877ac31649a36cba7 ]
Currently the config option allows lcore IDs up to 255,
irrespective of RTE_MAX_LCORES and needs to be fixed.
The patch fixes these constraints by allowing all
lcore IDs up to RTE_MAX_LCORES.
Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Fixes: 0e8f47491f09 ("examples/vm_power: add command to query CPU frequency")
Fixes: de3cfa2c9823 ("sched: initial import")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
examples/ipsec-secgw/event_helper.h | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 21 ++++++++++++-------
examples/ipsec-secgw/ipsec.c | 2 +-
examples/ipsec-secgw/ipsec.h | 4 ++--
examples/l3fwd-graph/main.c | 14 ++++++-------
examples/l3fwd-power/main.c | 18 +++++++++-------
examples/l3fwd-power/main.h | 2 +-
examples/l3fwd-power/perf_core.c | 11 +++++++---
examples/l3fwd/main.c | 20 +++++++++++-------
examples/qos_sched/args.c | 6 +++---
.../guest_cli/vm_power_cli_guest.c | 4 ++--
11 files changed, 61 insertions(+), 43 deletions(-)
diff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h
index af5cfcf794..5c4e260e2c 100644
--- a/examples/ipsec-secgw/event_helper.h
+++ b/examples/ipsec-secgw/event_helper.h
@@ -102,7 +102,7 @@ struct eh_event_link_info {
/**< Event port ID */
uint8_t eventq_id;
/**< Event queue to be linked to the port */
- uint8_t lcore_id;
+ uint32_t lcore_id;
/**< Lcore to be polling on this port */
};
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 8b0dfe76e7..cefea36b13 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -221,7 +221,7 @@ static const char *cfgfile;
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -807,7 +807,7 @@ check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid)
static int32_t
check_poll_mode_params(struct eh_conf *eh_conf)
{
- uint8_t lcore;
+ uint32_t lcore;
uint16_t portid;
uint16_t i;
int32_t socket_id;
@@ -826,13 +826,13 @@ check_poll_mode_params(struct eh_conf *eh_conf)
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("error: lcore %hhu is not enabled in "
+ printf("error: lcore %u is not enabled in "
"lcore mask\n", lcore);
return -1;
}
socket_id = rte_lcore_to_socket_id(lcore);
if (socket_id != 0 && numa_on == 0) {
- printf("warning: lcore %hhu is on socket %d "
+ printf("warning: lcore %u is on socket %d "
"with numa off\n",
lcore, socket_id);
}
@@ -867,7 +867,7 @@ static int32_t
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
@@ -1048,7 +1048,11 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int32_t i;
uint32_t size;
- uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+ uint32_t max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ RTE_MAX_LCORE
+ };
nb_lcore_params = 0;
@@ -1082,7 +1086,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
@@ -1881,7 +1885,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
struct rte_eth_dev_info dev_info;
struct rte_eth_txconf *txconf;
uint16_t nb_tx_queue, nb_rx_queue;
- uint16_t tx_queueid, rx_queueid, queue, lcore_id;
+ uint16_t tx_queueid, rx_queueid, queue;
+ uint32_t lcore_id;
int32_t ret, socket_id;
struct lcore_conf *qconf;
struct rte_ether_addr ethaddr;
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 29cb3c4785..1df5065ed7 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -81,7 +81,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
continue;
/* Looking for cryptodev, which can handle this SA */
- key.lcore_id = (uint8_t)lcore_id;
+ key.lcore_id = lcore_id;
key.cipher_algo = (uint8_t)sa->cipher_algo;
key.auth_algo = (uint8_t)sa->auth_algo;
key.aead_algo = (uint8_t)sa->aead_algo;
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index c764c9d7b8..5217e28f8a 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -256,11 +256,11 @@ extern struct offloads tx_offloads;
* (hash key calculation reads 8 bytes if this struct is size 5 bytes).
*/
struct cdev_key {
- uint16_t lcore_id;
+ uint32_t lcore_id;
uint8_t cipher_algo;
uint8_t auth_algo;
uint8_t aead_algo;
- uint8_t padding[3]; /* padding to 8-byte size should be zeroed */
+ uint8_t padding; /* padding to 8-byte size should be zeroed */
};
struct socket_ctx {
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index f9ca0ff23b..563acce331 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -97,7 +97,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -152,7 +152,7 @@ check_lcore_params(void)
{
uint16_t queue, i;
int socketid;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
@@ -162,7 +162,7 @@ check_lcore_params(void)
}
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("Error: lcore %hhu is not enabled in lcore mask\n",
+ printf("Error: lcore %u is not enabled in lcore mask\n",
lcore);
return -1;
}
@@ -173,7 +173,7 @@ check_lcore_params(void)
}
socketid = rte_lcore_to_socket_id(lcore);
if ((socketid != 0) && (numa_on == 0)) {
- printf("Warning: lcore %hhu is on socket %d with numa off\n",
+ printf("Warning: lcore %u is on socket %d with numa off\n",
lcore, socketid);
}
}
@@ -227,7 +227,7 @@ static int
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
@@ -235,7 +235,7 @@ init_lcore_rx_queues(void)
if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
printf("Error: too many queues (%u) for lcore: %u\n",
(unsigned int)nb_rx_queue + 1,
- (unsigned int)lcore);
+ lcore);
return -1;
}
@@ -358,7 +358,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 9f60b784df..bab35d1839 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1522,7 +1522,7 @@ static int
check_lcore_params(void)
{
uint16_t queue, i;
- uint8_t lcore;
+ uint32_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
@@ -1533,13 +1533,13 @@ check_lcore_params(void)
}
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("error: lcore %hhu is not enabled in lcore "
+ printf("error: lcore %u is not enabled in lcore "
"mask\n", lcore);
return -1;
}
if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
(numa_on == 0)) {
- printf("warning: lcore %hhu is on socket %d with numa "
+ printf("warning: lcore %u is on socket %d with numa "
"off\n", lcore, socketid);
}
if (app_mode == APP_MODE_TELEMETRY && lcore == rte_lcore_id()) {
@@ -1591,14 +1591,14 @@ static int
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
nb_rx_queue = lcore_conf[lcore].n_rx_queue;
if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
printf("error: too many queues (%u) for lcore: %u\n",
- (unsigned)nb_rx_queue + 1, (unsigned)lcore);
+ (unsigned int)nb_rx_queue + 1, lcore);
return -1;
} else {
lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id =
@@ -1779,7 +1779,11 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
- unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+ unsigned int max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ RTE_MAX_LCORE
+ };
nb_lcore_params = 0;
@@ -1812,7 +1816,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h
index 40b5194726..194bd82102 100644
--- a/examples/l3fwd-power/main.h
+++ b/examples/l3fwd-power/main.h
@@ -10,7 +10,7 @@
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
extern struct lcore_params *lcore_params;
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index f34442b9d0..fbd7864cb9 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -24,7 +24,7 @@ struct perf_lcore_params {
uint16_t port_id;
uint16_t queue_id;
uint8_t high_perf;
- uint8_t lcore_idx;
+ uint32_t lcore_idx;
} __rte_cache_aligned;
static struct perf_lcore_params prf_lc_prms[MAX_LCORE_PARAMS];
@@ -132,7 +132,12 @@ parse_perf_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned int size;
- unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255};
+ unsigned int max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ 255,
+ RTE_MAX_LCORE
+ };
nb_prf_lc_prms = 0;
@@ -169,7 +174,7 @@ parse_perf_config(const char *q_arg)
prf_lc_prms[nb_prf_lc_prms].high_perf =
!!(uint8_t)int_fld[FLD_LCORE_HP];
prf_lc_prms[nb_prf_lc_prms].lcore_idx =
- (uint8_t)int_fld[FLD_LCORE_IDX];
+ (uint32_t)int_fld[FLD_LCORE_IDX];
++nb_prf_lc_prms;
}
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index b6b105d42b..dca1beabc8 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -97,7 +97,7 @@ struct parm_cfg parm_config;
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -289,7 +289,7 @@ static int
check_lcore_params(void)
{
uint16_t queue, i;
- uint8_t lcore;
+ uint32_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
@@ -300,12 +300,12 @@ check_lcore_params(void)
}
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("error: lcore %hhu is not enabled in lcore mask\n", lcore);
+ printf("error: lcore %u is not enabled in lcore mask\n", lcore);
return -1;
}
if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
(numa_on == 0)) {
- printf("warning: lcore %hhu is on socket %d with numa off \n",
+ printf("warning: lcore %u is on socket %d with numa off\n",
lcore, socketid);
}
}
@@ -355,14 +355,14 @@ static int
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
nb_rx_queue = lcore_conf[lcore].n_rx_queue;
if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
printf("error: too many queues (%u) for lcore: %u\n",
- (unsigned)nb_rx_queue + 1, (unsigned)lcore);
+ (unsigned int)nb_rx_queue + 1, lcore);
return -1;
} else {
lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id =
@@ -492,7 +492,11 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
- uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+ uint16_t max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ RTE_MAX_LCORE
+ };
nb_lcore_params = 0;
@@ -524,7 +528,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index bccbbe8207..fbdc738d77 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -222,10 +222,10 @@ app_parse_flow_conf(const char *conf_str)
pconf->rx_port = vals[0];
pconf->tx_port = vals[1];
- pconf->rx_core = (uint8_t)vals[2];
- pconf->wt_core = (uint8_t)vals[3];
+ pconf->rx_core = vals[2];
+ pconf->wt_core = vals[3];
if (ret == 5)
- pconf->tx_core = (uint8_t)vals[4];
+ pconf->tx_core = vals[4];
else
pconf->tx_core = pconf->wt_core;
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 94bfbbaf78..5eddb47847 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -401,7 +401,7 @@ check_response_cmd(unsigned int lcore_id, int *result)
struct cmd_set_cpu_freq_result {
cmdline_fixed_string_t set_cpu_freq;
- uint8_t lcore_id;
+ uint32_t lcore_id;
cmdline_fixed_string_t cmd;
};
@@ -444,7 +444,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq =
set_cpu_freq, "set_cpu_freq");
cmdline_parse_token_num_t cmd_set_cpu_freq_core_num =
TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,
- lcore_id, RTE_UINT8);
+ lcore_id, RTE_UINT32);
cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
cmd, "up#down#min#max#enable_turbo#disable_turbo");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.312203961 +0100
+++ 0038-examples-fix-lcore-ID-restriction.patch 2024-07-24 12:29:20.847027660 +0100
@@ -1 +1 @@
-From 4b978938168b219346775ff877ac31649a36cba7 Mon Sep 17 00:00:00 2001
+From 6a1313b34aa99ae7454e3dbe0aae605406f50e1f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4b978938168b219346775ff877ac31649a36cba7 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index dfb81bfcf1..be635685b4 100644
+index af5cfcf794..5c4e260e2c 100644
@@ -55 +56 @@
-index 8292a262cd..5a7e1b220f 100644
+index 8b0dfe76e7..cefea36b13 100644
@@ -59 +60 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -64 +65 @@
- };
+ } __rte_cache_aligned;
@@ -123 +124 @@
-@@ -1918,7 +1922,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
+@@ -1881,7 +1885,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
@@ -134 +135 @@
-index c321108119..b52b0ffc3d 100644
+index 29cb3c4785..1df5065ed7 100644
@@ -137 +138 @@
-@@ -259,7 +259,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
+@@ -81,7 +81,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
@@ -147 +148 @@
-index 6f45fdb166..a83fd2283b 100644
+index c764c9d7b8..5217e28f8a 100644
@@ -165 +166 @@
-index 0866822e93..4396e2bb3c 100644
+index f9ca0ff23b..563acce331 100644
@@ -168,2 +169,2 @@
-@@ -111,7 +111,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
- struct __rte_cache_aligned lcore_params {
+@@ -97,7 +97,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
+ struct lcore_params {
@@ -174 +175 @@
- };
+ } __rte_cache_aligned;
@@ -177 +178 @@
-@@ -207,7 +207,7 @@ check_lcore_params(void)
+@@ -152,7 +152,7 @@ check_lcore_params(void)
@@ -186 +187 @@
-@@ -217,7 +217,7 @@ check_lcore_params(void)
+@@ -162,7 +162,7 @@ check_lcore_params(void)
@@ -195 +196 @@
-@@ -228,7 +228,7 @@ check_lcore_params(void)
+@@ -173,7 +173,7 @@ check_lcore_params(void)
@@ -204 +205 @@
-@@ -282,7 +282,7 @@ static int
+@@ -227,7 +227,7 @@ static int
@@ -213 +214 @@
-@@ -290,7 +290,7 @@ init_lcore_rx_queues(void)
+@@ -235,7 +235,7 @@ init_lcore_rx_queues(void)
@@ -222 +223 @@
-@@ -452,7 +452,7 @@ parse_config(const char *q_arg)
+@@ -358,7 +358,7 @@ parse_config(const char *q_arg)
@@ -232 +233 @@
-index 74e906cb5d..2976058425 100644
+index 9f60b784df..bab35d1839 100644
@@ -235 +236 @@
-@@ -1397,7 +1397,7 @@ static int
+@@ -1522,7 +1522,7 @@ static int
@@ -244 +245 @@
-@@ -1408,13 +1408,13 @@ check_lcore_params(void)
+@@ -1533,13 +1533,13 @@ check_lcore_params(void)
@@ -260 +261 @@
-@@ -1466,14 +1466,14 @@ static int
+@@ -1591,14 +1591,14 @@ static int
@@ -277 +278 @@
-@@ -1658,7 +1658,11 @@ parse_config(const char *q_arg)
+@@ -1779,7 +1779,11 @@ parse_config(const char *q_arg)
@@ -290 +291 @@
-@@ -1691,7 +1695,7 @@ parse_config(const char *q_arg)
+@@ -1812,7 +1816,7 @@ parse_config(const char *q_arg)
@@ -300 +301 @@
-index 378f54794c..2461ab8da7 100644
+index 40b5194726..194bd82102 100644
@@ -304 +305 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -309 +310 @@
- };
+ } __rte_cache_aligned;
@@ -313 +314 @@
-index 77248889c0..a0112b57ff 100644
+index f34442b9d0..fbd7864cb9 100644
@@ -316 +317 @@
-@@ -24,7 +24,7 @@ struct __rte_cache_aligned perf_lcore_params {
+@@ -24,7 +24,7 @@ struct perf_lcore_params {
@@ -322 +323 @@
- };
+ } __rte_cache_aligned;
@@ -349 +350 @@
-index f5f5f1a7fb..ba7083d4f3 100644
+index b6b105d42b..dca1beabc8 100644
@@ -352,2 +353,2 @@
-@@ -99,7 +99,7 @@ struct parm_cfg parm_config;
- struct __rte_cache_aligned lcore_params {
+@@ -97,7 +97,7 @@ struct parm_cfg parm_config;
+ struct lcore_params {
@@ -358 +359 @@
- };
+ } __rte_cache_aligned;
@@ -361 +362 @@
-@@ -293,7 +293,7 @@ static int
+@@ -289,7 +289,7 @@ static int
@@ -370 +371 @@
-@@ -304,12 +304,12 @@ check_lcore_params(void)
+@@ -300,12 +300,12 @@ check_lcore_params(void)
@@ -385 +386 @@
-@@ -359,14 +359,14 @@ static int
+@@ -355,14 +355,14 @@ static int
@@ -402 +403 @@
-@@ -500,7 +500,11 @@ parse_config(const char *q_arg)
+@@ -492,7 +492,11 @@ parse_config(const char *q_arg)
@@ -415 +416 @@
-@@ -532,7 +536,7 @@ parse_config(const char *q_arg)
+@@ -524,7 +528,7 @@ parse_config(const char *q_arg)
@@ -425 +426 @@
-index 8d61d3e454..886542b3c1 100644
+index bccbbe8207..fbdc738d77 100644
@@ -428 +429 @@
-@@ -184,10 +184,10 @@ app_parse_flow_conf(const char *conf_str)
+@@ -222,10 +222,10 @@ app_parse_flow_conf(const char *conf_str)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples: fix port ID restriction' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (36 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples: fix lcore " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Sivaprasad Tummala
Cc: Konstantin Ananyev, Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/28c93c22f7890e8b0adf17b50a2c4b3448c5f27a
Thanks.
Luca Boccassi
---
From 28c93c22f7890e8b0adf17b50a2c4b3448c5f27a Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:50 +0100
Subject: [PATCH] examples: fix port ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]
Currently application supports port IDs up to 255
irrespective of RTE_MAX_ETHPORTS.
The patch fixes these constraints by allowing port
IDs up to RTE_MAX_ETHPORTS.
Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
examples/l3fwd-graph/main.c | 2 +-
examples/l3fwd-power/main.c | 4 ++--
examples/l3fwd-power/perf_core.c | 4 ++--
examples/l3fwd/main.c | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index cefea36b13..9620d73fc8 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1049,7 +1049,7 @@ parse_config(const char *q_arg)
int32_t i;
uint32_t size;
uint32_t max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
RTE_MAX_LCORE
};
@@ -1082,7 +1082,7 @@ parse_config(const char *q_arg)
return -1;
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 563acce331..ec4f156881 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -354,7 +354,7 @@ parse_config(const char *q_arg)
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index bab35d1839..1bcc61e777 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1780,7 +1780,7 @@ parse_config(const char *q_arg)
int i;
unsigned size;
unsigned int max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
RTE_MAX_LCORE
};
@@ -1812,7 +1812,7 @@ parse_config(const char *q_arg)
return -1;
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index fbd7864cb9..e4bdb62121 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -133,7 +133,7 @@ parse_perf_config(const char *q_arg)
int i;
unsigned int size;
unsigned int max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
255,
RTE_MAX_LCORE
@@ -168,7 +168,7 @@ parse_perf_config(const char *q_arg)
return -1;
}
prf_lc_prms[nb_prf_lc_prms].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
prf_lc_prms[nb_prf_lc_prms].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
prf_lc_prms[nb_prf_lc_prms].high_perf =
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index dca1beabc8..9201019711 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -493,7 +493,7 @@ parse_config(const char *q_arg)
int i;
unsigned size;
uint16_t max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
RTE_MAX_LCORE
};
@@ -524,7 +524,7 @@ parse_config(const char *q_arg)
return -1;
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.360773176 +0100
+++ 0039-examples-fix-port-ID-restriction.patch 2024-07-24 12:29:20.859027902 +0100
@@ -1 +1 @@
-From 548de9091c85467bd8f05cecf6d32315869d1461 Mon Sep 17 00:00:00 2001
+From 28c93c22f7890e8b0adf17b50a2c4b3448c5f27a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 5a7e1b220f..e98ad2572e 100644
+index cefea36b13..9620d73fc8 100644
@@ -56 +57 @@
-index 4396e2bb3c..a13dc01138 100644
+index 563acce331..ec4f156881 100644
@@ -59 +60 @@
-@@ -448,7 +448,7 @@ parse_config(const char *q_arg)
+@@ -354,7 +354,7 @@ parse_config(const char *q_arg)
@@ -69 +70 @@
-index 2976058425..2bb6b092c3 100644
+index bab35d1839..1bcc61e777 100644
@@ -72 +73 @@
-@@ -1659,7 +1659,7 @@ parse_config(const char *q_arg)
+@@ -1780,7 +1780,7 @@ parse_config(const char *q_arg)
@@ -81 +82 @@
-@@ -1691,7 +1691,7 @@ parse_config(const char *q_arg)
+@@ -1812,7 +1812,7 @@ parse_config(const char *q_arg)
@@ -91 +92 @@
-index a0112b57ff..6c0f7ea213 100644
+index fbd7864cb9..e4bdb62121 100644
@@ -113 +114 @@
-index ba7083d4f3..01b763e5ba 100644
+index dca1beabc8..9201019711 100644
@@ -116 +117 @@
-@@ -501,7 +501,7 @@ parse_config(const char *q_arg)
+@@ -493,7 +493,7 @@ parse_config(const char *q_arg)
@@ -125 +126 @@
-@@ -532,7 +532,7 @@ parse_config(const char *q_arg)
+@@ -524,7 +524,7 @@ parse_config(const char *q_arg)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: remove reference to mbuf pkt field' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (37 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples: fix port " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-29 23:33 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
38 siblings, 1 reply; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e22481034081e91d5a4dd181b228acf25970933b
Thanks.
Luca Boccassi
---
From e22481034081e91d5a4dd181b228acf25970933b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 18:09:23 -0700
Subject: [PATCH] doc: remove reference to mbuf pkt field
[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]
The pkt union in mbuf was removed way back in 2014 but there
still was one leftover in the mbuf figure.
Fixes: ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/prog_guide/img/mbuf1.svg | 2 +-
doc/guides/prog_guide/img/mbuf2.svg | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/guides/prog_guide/img/mbuf1.svg b/doc/guides/prog_guide/img/mbuf1.svg
index a08bf3b6c0..111a874c00 100644
--- a/doc/guides/prog_guide/img/mbuf1.svg
+++ b/doc/guides/prog_guide/img/mbuf1.svg
@@ -487,7 +487,7 @@
sodipodi:role="line"
id="tspan5256"
x="59.842155"
- y="282.37683">m->pkt.next = NULL</tspan></text>
+ y="282.37683">m->next = NULL</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
diff --git a/doc/guides/prog_guide/img/mbuf2.svg b/doc/guides/prog_guide/img/mbuf2.svg
index f6fdb54002..6a80cbc200 100644
--- a/doc/guides/prog_guide/img/mbuf2.svg
+++ b/doc/guides/prog_guide/img/mbuf2.svg
@@ -1074,7 +1074,7 @@
sodipodi:role="line"
id="tspan5256-8"
x="527.19458"
- y="628.45935">m->pkt.next = NULL</tspan></text>
+ y="628.45935">m->next = NULL</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1084,7 +1084,7 @@
sodipodi:role="line"
id="tspan5256-8-3"
x="330.50363"
- y="628.45935">m->pkt.next = mseg3</tspan></text>
+ y="628.45935">m->next = mseg3</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1094,7 +1094,7 @@
sodipodi:role="line"
id="tspan5256-8-3-4"
x="144.79388"
- y="628.45935">m->pkt.next = mseg2</tspan></text>
+ y="628.45935">m->next = mseg2</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.406138417 +0100
+++ 0040-doc-remove-reference-to-mbuf-pkt-field.patch 2024-07-24 12:29:20.859027902 +0100
@@ -1 +1 @@
-From d9d1be537ea777059711ac313019ecd94840daba Mon Sep 17 00:00:00 2001
+From e22481034081e91d5a4dd181b228acf25970933b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/ipsec-secgw: revert SA salt endianness' has been queued to stable release 22.11.6
2024-07-24 11:33 ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
@ 2024-07-29 23:33 ` luca.boccassi
2024-07-29 23:33 ` patch 'doc: fix mbuf flags' " luca.boccassi
2024-07-29 23:33 ` patch 'doc: add baseline mode in l3fwd-power guide' " luca.boccassi
0 siblings, 2 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-29 23:33 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: Radu Nicolau, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff2d7af17a475be45fc4eb309134f2b12b37c5b7
Thanks.
Luca Boccassi
---
From ff2d7af17a475be45fc4eb309134f2b12b37c5b7 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 29 Jul 2024 12:57:54 +0000
Subject: [PATCH] examples/ipsec-secgw: revert SA salt endianness
[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
The previous commit swapped the bytes of SA salt which
led to incorrect work of the ipsec-secgw application.
This patch reverts the previous commit and changes
the type of the salt field in the ipsec_sa structure.
Fixes: e6bfd9676109 ("examples/ipsec-secgw: fix SA salt endianness")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
examples/ipsec-secgw/ipsec.h | 2 +-
examples/ipsec-secgw/sa.c | 13 ++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 5217e28f8a..13694ee1e0 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -117,7 +117,7 @@ struct ipsec_sa {
uint32_t spi;
struct cdev_qp *cqp[RTE_MAX_LCORE];
uint64_t seq;
- uint32_t salt;
+ rte_be32_t salt;
uint32_t fallback_sessions;
enum rte_crypto_cipher_algorithm cipher_algo;
enum rte_crypto_auth_algorithm auth_algo;
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index c7a655003f..45cd29f18b 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -373,7 +373,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
uint32_t ti; /*token index*/
uint32_t *ri /*rule index*/;
struct ipsec_sa_cnt *sa_cnt;
- rte_be32_t salt; /*big-endian salt*/
uint32_t cipher_algo_p = 0;
uint32_t auth_algo_p = 0;
uint32_t aead_algo_p = 0;
@@ -508,8 +507,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
if (algo->algo == RTE_CRYPTO_CIPHER_AES_CTR) {
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&salt, &rule->cipher_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->cipher_key[key_len], 4);
}
cipher_algo_p = 1;
@@ -573,8 +572,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->auth_key_len = key_len;
rule->iv_len = algo->iv_len;
- memcpy(&salt, &rule->auth_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->auth_key[key_len], 4);
}
auth_algo_p = 1;
@@ -632,8 +631,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&salt, &rule->cipher_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->cipher_key[key_len], 4);
aead_algo_p = 1;
continue;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-30 00:33:03.359903055 +0100
+++ 0001-examples-ipsec-secgw-revert-SA-salt-endianness.patch 2024-07-30 00:33:03.301030141 +0100
@@ -1 +1 @@
-From 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 Mon Sep 17 00:00:00 2001
+From ff2d7af17a475be45fc4eb309134f2b12b37c5b7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a83fd2283b..1fe6b97168 100644
+index 5217e28f8a..13694ee1e0 100644
@@ -25 +26 @@
-@@ -117,7 +117,7 @@ struct __rte_cache_aligned ipsec_sa {
+@@ -117,7 +117,7 @@ struct ipsec_sa {
@@ -35 +36 @@
-index 8aa9aca739..c4bac17cd7 100644
+index c7a655003f..45cd29f18b 100644
@@ -38 +39 @@
-@@ -374,7 +374,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -373,7 +373,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -46 +47 @@
-@@ -509,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -508,8 +507,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -57 +58 @@
-@@ -574,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -573,8 +572,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -68 +69 @@
-@@ -633,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -632,8 +631,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: fix mbuf flags' has been queued to stable release 22.11.6
2024-07-29 23:33 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
@ 2024-07-29 23:33 ` luca.boccassi
2024-07-29 23:33 ` patch 'doc: add baseline mode in l3fwd-power guide' " luca.boccassi
1 sibling, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-29 23:33 UTC (permalink / raw)
To: Yingming Mao; +Cc: Shuo Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b9c8076d92f67cf300f707d3e7fa3f30b207b221
Thanks.
Luca Boccassi
---
From b9c8076d92f67cf300f707d3e7fa3f30b207b221 Mon Sep 17 00:00:00 2001
From: Yingming Mao <maoyingming@baidu.com>
Date: Thu, 18 Apr 2024 14:20:25 +0800
Subject: [PATCH] doc: fix mbuf flags
[ upstream commit 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 ]
Fixes: 2542ad53d867 ("doc: add description of the offload API")
Fixes: ae2c2cb60635 ("net/cnxk: avoid command copy from Tx queue")
Signed-off-by: Yingming Mao <maoyingming@baidu.com>
Reviewed-by: Shuo Li <lishuo02@baidu.com>
---
.mailmap | 3 ++-
doc/guides/prog_guide/mbuf_lib.rst | 8 ++++----
drivers/net/cnxk/cn10k_tx.h | 2 +-
drivers/net/cnxk/cn9k_tx.h | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/.mailmap b/.mailmap
index 0398b858fb..b0d505e36d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -830,7 +830,6 @@ Mandeep Rohilla <mrohilla@brocade.com>
Manish Chopra <manishc@marvell.com>
Manish Tomar <manish.tomar@nxp.com>
Mao Jiang <maox.jiang@intel.com>
-Mao YingMing <maoyingming@baidu.com>
Marcel Apfelbaum <marcel@redhat.com>
Marcel Cornu <marcel.d.cornu@intel.com>
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
@@ -1271,6 +1270,7 @@ Shuanglin Wang <shuanglin.wang@broadcom.com>
Shuki Katzenelson <shuki@lightbitslabs.com>
Shun Hao <shunh@nvidia.com>
Shu Shen <shu.shen@radisys.com>
+Shuo Li <lishuo02@baidu.com>
Shweta Choudaha <shweta.choudaha@att.com>
Shyam Kumar Shrivastav <shrivastav.shyam@gmail.com>
Shy Shyman <shys@nvidia.com> <shys@mellanox.com>
@@ -1567,6 +1567,7 @@ Yi Lu <luyi68@live.com>
Yilun Xu <yilun.xu@intel.com>
Yinan Wang <yinan.wang@intel.com>
Ying A Wang <ying.a.wang@intel.com>
+Yingming Mao <maoyingming@baidu.com>
Yingya Han <yingyax.han@intel.com>
Yinjun Zhang <yinjun.zhang@corigine.com>
Yipeng Wang <yipeng1.wang@intel.com>
diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst
index 049357c755..749f9c97a8 100644
--- a/doc/guides/prog_guide/mbuf_lib.rst
+++ b/doc/guides/prog_guide/mbuf_lib.rst
@@ -134,7 +134,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth)
mb->l3_len = len(out_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
set out_ip checksum to 0 in the packet
This is supported on hardware advertising RTE_ETH_TX_OFFLOAD_IPV4_CKSUM.
@@ -143,7 +143,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth)
mb->l3_len = len(out_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_UDP_CKSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM
set out_ip checksum to 0 in the packet
set out_udp checksum to pseudo header using rte_ipv4_phdr_cksum()
@@ -154,7 +154,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
set in_ip checksum to 0 in the packet
This is similar to case 1), but l2_len is different. It is supported
@@ -165,7 +165,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_TCP_CKSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_TCP_CKSUM
set in_ip checksum to 0 in the packet
set in_tcp checksum to pseudo header using rte_ipv4_phdr_cksum()
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index e96030621b..cd9b1f225e 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -898,7 +898,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
struct nix_send_mem_s *send_mem;
send_mem = (struct nix_send_mem_s *)(lmt + off);
- /* Packets for which PKT_TX_IEEE1588_TMST is not set, tx tstamp
+ /* Packets for which RTE_MBUF_F_TX_IEEE1588_TMST is not set, Tx tstamp
* should not be recorded, hence changing the alg type to
* NIX_SENDMEMALG_SUB and also changing send mem addr field to
* next 8 bytes as it corrupts the actual Tx tstamp registered
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 257f1ce1aa..33db781abe 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -355,7 +355,7 @@ cn9k_nix_xmit_prepare_tstamp(struct cn9k_eth_txq *txq, uint64_t *cmd,
send_mem = (struct nix_send_mem_s *)(cmd + off);
- /* Packets for which PKT_TX_IEEE1588_TMST is not set, tx tstamp
+ /* Packets for which RTE_MBUF_F_TX_IEEE1588_TMST is not set, Tx tstamp
* should not be recorded, hence changing the alg type to
* NIX_SENDMEMALG_SUB and also changing send mem addr field to
* next 8 bytes as it corrupts the actual Tx tstamp registered
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-30 00:33:03.408914046 +0100
+++ 0002-doc-fix-mbuf-flags.patch 2024-07-30 00:33:03.317030472 +0100
@@ -1 +1 @@
-From 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 Mon Sep 17 00:00:00 2001
+From b9c8076d92f67cf300f707d3e7fa3f30b207b221 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 ]
+
@@ -8 +9,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8aef1c59a4..4a508bafad 100644
+index 0398b858fb..b0d505e36d 100644
@@ -23,2 +24,2 @@
-@@ -893,7 +893,6 @@ Manish Chopra <manishc@marvell.com>
- Manish Kurup <manish.kurup@broadcom.com>
+@@ -830,7 +830,6 @@ Mandeep Rohilla <mrohilla@brocade.com>
+ Manish Chopra <manishc@marvell.com>
@@ -31 +32,2 @@
-@@ -1371,6 +1370,7 @@ Shuki Katzenelson <shuki@lightbitslabs.com>
+@@ -1271,6 +1270,7 @@ Shuanglin Wang <shuanglin.wang@broadcom.com>
+ Shuki Katzenelson <shuki@lightbitslabs.com>
@@ -34 +35,0 @@
- Shujing Dong <shujing.dong@corigine.com>
@@ -39 +40 @@
-@@ -1684,6 +1684,7 @@ Yi Lu <luyi68@live.com>
+@@ -1567,6 +1567,7 @@ Yi Lu <luyi68@live.com>
@@ -88 +89 @@
-index 84b08403c0..7d9b259a5f 100644
+index e96030621b..cd9b1f225e 100644
@@ -91 +92 @@
-@@ -1242,7 +1242,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
+@@ -898,7 +898,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
@@ -101 +102 @@
-index b56881c561..9370985864 100644
+index 257f1ce1aa..33db781abe 100644
@@ -104 +105 @@
-@@ -560,7 +560,7 @@ cn9k_nix_xmit_prepare_tstamp(struct cn9k_eth_txq *txq, uint64_t *cmd,
+@@ -355,7 +355,7 @@ cn9k_nix_xmit_prepare_tstamp(struct cn9k_eth_txq *txq, uint64_t *cmd,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: add baseline mode in l3fwd-power guide' has been queued to stable release 22.11.6
2024-07-29 23:33 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
2024-07-29 23:33 ` patch 'doc: fix mbuf flags' " luca.boccassi
@ 2024-07-29 23:33 ` luca.boccassi
1 sibling, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-29 23:33 UTC (permalink / raw)
To: Karen Kelly; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/29857b82e41214504b88989265d077516cd5e985
Thanks.
Luca Boccassi
---
From 29857b82e41214504b88989265d077516cd5e985 Mon Sep 17 00:00:00 2001
From: Karen Kelly <karen.kelly@intel.com>
Date: Tue, 16 Apr 2024 15:20:35 +0200
Subject: [PATCH] doc: add baseline mode in l3fwd-power guide
[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]
Updating PMD Power Management Mode section of the l3fwd-power
sample app to add baseline option as this was missing from the
original commit.
Fixes: a9ea60702ecb ("examples/l3fwd-power: add baseline PMD management mode")
Signed-off-by: Karen Kelly <karen.kelly@intel.com>
---
doc/guides/sample_app_ug/l3_forward_power_man.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index fa3ef67c08..d2192eaa53 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -350,6 +350,9 @@ will use automatic PMD power management.
This mode is limited to one queue per core,
and has three available power management schemes:
+``baseline``
+ This mode will not enable any power saving features.
+
``monitor``
This will use ``rte_power_monitor()`` function to enter
a power-optimized state (subject to platform support).
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-30 00:33:03.465386984 +0100
+++ 0003-doc-add-baseline-mode-in-l3fwd-power-guide.patch 2024-07-30 00:33:03.317030472 +0100
@@ -1 +1 @@
-From 40b46770b0fc5c39b4987067780a6e92e1b30ea8 Mon Sep 17 00:00:00 2001
+From 29857b82e41214504b88989265d077516cd5e985 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4a6f33bf4f..9c9684fea7 100644
+index fa3ef67c08..d2192eaa53 100644
@@ -22 +23 @@
-@@ -280,6 +280,9 @@ will use automatic PMD power management.
+@@ -350,6 +350,9 @@ will use automatic PMD power management.
^ permalink raw reply [flat|nested] 210+ messages in thread