patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9
@ 2025-06-12 21:06 luca.boccassi
  2025-06-12 21:06 ` patch 'ci: bump tested distributions in GHA' " luca.boccassi
                   ` (70 more replies)
  0 siblings, 71 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Krzysztof Galazka; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/43864791e80cfa3f86045db151b1dc0dd11ea86e

Thanks.

Luca Boccassi

---
From 43864791e80cfa3f86045db151b1dc0dd11ea86e Mon Sep 17 00:00:00 2001
From: Krzysztof Galazka <krzysztof.galazka@intel.com>
Date: Mon, 2 Sep 2024 10:54:16 +0100
Subject: [PATCH] net/i40e/base: remove unused variables

[ upstream commit d63c0823472340db19aa1103cbfbcd94fefd00ce ]

At one point, there was functionality that was no longer used and was
removed. However, while removing unused logic from the
i40e_validate_filter_settings function, some intermediate variables were
missed and were still being set. Also remove macro definitions for the
registers that were missed during removal.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_common.c   |  5 ----
 drivers/net/i40e/base/i40e_register.h | 33 ---------------------------
 drivers/net/i40e/i40e_regs.h          |  9 --------
 3 files changed, 47 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e5651ad80b..38828e6da5 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -5626,7 +5626,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
 				struct i40e_filter_control_settings *settings)
 {
 	u32 fcoe_cntx_size, fcoe_filt_size;
-	u32 pe_cntx_size, pe_filt_size;
 	u32 fcoe_fmax;
 
 	u32 val;
@@ -5671,8 +5670,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
 	case I40E_HASH_FILTER_SIZE_256K:
 	case I40E_HASH_FILTER_SIZE_512K:
 	case I40E_HASH_FILTER_SIZE_1M:
-		pe_filt_size = I40E_HASH_FILTER_BASE_SIZE;
-		pe_filt_size <<= (u32)settings->pe_filt_num;
 		break;
 	default:
 		return I40E_ERR_PARAM;
@@ -5689,8 +5686,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
 	case I40E_DMA_CNTX_SIZE_64K:
 	case I40E_DMA_CNTX_SIZE_128K:
 	case I40E_DMA_CNTX_SIZE_256K:
-		pe_cntx_size = I40E_DMA_CNTX_BASE_SIZE;
-		pe_cntx_size <<= (u32)settings->pe_cntx_num;
 		break;
 	default:
 		return I40E_ERR_PARAM;
diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
index 75eff845f1..be4700770a 100644
--- a/drivers/net/i40e/base/i40e_register.h
+++ b/drivers/net/i40e/base/i40e_register.h
@@ -3625,27 +3625,6 @@
 #define I40E_GLHMC_PETIMEROBJSZ                      0x000C2080 /* Reset: CORER */
 #define I40E_GLHMC_PETIMEROBJSZ_PMPETIMEROBJSZ_SHIFT 0
 #define I40E_GLHMC_PETIMEROBJSZ_PMPETIMEROBJSZ_MASK  I40E_MASK(0xF, I40E_GLHMC_PETIMEROBJSZ_PMPETIMEROBJSZ_SHIFT)
-#define I40E_GLHMC_PEXFBASE(_i)               (0x000C4e00 + ((_i) * 4)) /* _i=0...15 */ /* Reset: CORER */
-#define I40E_GLHMC_PEXFBASE_MAX_INDEX         15
-#define I40E_GLHMC_PEXFBASE_FPMPEXFBASE_SHIFT 0
-#define I40E_GLHMC_PEXFBASE_FPMPEXFBASE_MASK  I40E_MASK(0xFFFFFF, I40E_GLHMC_PEXFBASE_FPMPEXFBASE_SHIFT)
-#define I40E_GLHMC_PEXFCNT(_i)              (0x000C4f00 + ((_i) * 4)) /* _i=0...15 */ /* Reset: CORER */
-#define I40E_GLHMC_PEXFCNT_MAX_INDEX        15
-#define I40E_GLHMC_PEXFCNT_FPMPEXFCNT_SHIFT 0
-#define I40E_GLHMC_PEXFCNT_FPMPEXFCNT_MASK  I40E_MASK(0x1FFFFFFF, I40E_GLHMC_PEXFCNT_FPMPEXFCNT_SHIFT)
-#define I40E_GLHMC_PEXFFLBASE(_i)                 (0x000C5000 + ((_i) * 4)) /* _i=0...15 */ /* Reset: CORER */
-#define I40E_GLHMC_PEXFFLBASE_MAX_INDEX           15
-#define I40E_GLHMC_PEXFFLBASE_FPMPEXFFLBASE_SHIFT 0
-#define I40E_GLHMC_PEXFFLBASE_FPMPEXFFLBASE_MASK  I40E_MASK(0xFFFFFF, I40E_GLHMC_PEXFFLBASE_FPMPEXFFLBASE_SHIFT)
-#define I40E_GLHMC_PEXFFLMAX                   0x000C204c /* Reset: CORER */
-#define I40E_GLHMC_PEXFFLMAX_PMPEXFFLMAX_SHIFT 0
-#define I40E_GLHMC_PEXFFLMAX_PMPEXFFLMAX_MASK  I40E_MASK(0x1FFFFFF, I40E_GLHMC_PEXFFLMAX_PMPEXFFLMAX_SHIFT)
-#define I40E_GLHMC_PEXFMAX                 0x000C2048 /* Reset: CORER */
-#define I40E_GLHMC_PEXFMAX_PMPEXFMAX_SHIFT 0
-#define I40E_GLHMC_PEXFMAX_PMPEXFMAX_MASK  I40E_MASK(0x3FFFFFF, I40E_GLHMC_PEXFMAX_PMPEXFMAX_SHIFT)
-#define I40E_GLHMC_PEXFOBJSZ                   0x000C2044 /* Reset: CORER */
-#define I40E_GLHMC_PEXFOBJSZ_PMPEXFOBJSZ_SHIFT 0
-#define I40E_GLHMC_PEXFOBJSZ_PMPEXFOBJSZ_MASK  I40E_MASK(0xF, I40E_GLHMC_PEXFOBJSZ_PMPEXFOBJSZ_SHIFT)
 #define I40E_GLHMC_PFPESDPART(_i)            (0x000C0880 + ((_i) * 4)) /* _i=0...15 */ /* Reset: CORER */
 #define I40E_GLHMC_PFPESDPART_MAX_INDEX      15
 #define I40E_GLHMC_PFPESDPART_PMSDBASE_SHIFT 0
@@ -3766,18 +3745,6 @@
 #define I40E_GLHMC_VFPETIMERCNT_MAX_INDEX           31
 #define I40E_GLHMC_VFPETIMERCNT_FPMPETIMERCNT_SHIFT 0
 #define I40E_GLHMC_VFPETIMERCNT_FPMPETIMERCNT_MASK  I40E_MASK(0x1FFFFFFF, I40E_GLHMC_VFPETIMERCNT_FPMPETIMERCNT_SHIFT)
-#define I40E_GLHMC_VFPEXFBASE(_i)               (0x000Cce00 + ((_i) * 4)) /* _i=0...31 */ /* Reset: CORER */
-#define I40E_GLHMC_VFPEXFBASE_MAX_INDEX         31
-#define I40E_GLHMC_VFPEXFBASE_FPMPEXFBASE_SHIFT 0
-#define I40E_GLHMC_VFPEXFBASE_FPMPEXFBASE_MASK  I40E_MASK(0xFFFFFF, I40E_GLHMC_VFPEXFBASE_FPMPEXFBASE_SHIFT)
-#define I40E_GLHMC_VFPEXFCNT(_i)              (0x000Ccf00 + ((_i) * 4)) /* _i=0...31 */ /* Reset: CORER */
-#define I40E_GLHMC_VFPEXFCNT_MAX_INDEX        31
-#define I40E_GLHMC_VFPEXFCNT_FPMPEXFCNT_SHIFT 0
-#define I40E_GLHMC_VFPEXFCNT_FPMPEXFCNT_MASK  I40E_MASK(0x1FFFFFFF, I40E_GLHMC_VFPEXFCNT_FPMPEXFCNT_SHIFT)
-#define I40E_GLHMC_VFPEXFFLBASE(_i)                 (0x000Cd000 + ((_i) * 4)) /* _i=0...31 */ /* Reset: CORER */
-#define I40E_GLHMC_VFPEXFFLBASE_MAX_INDEX           31
-#define I40E_GLHMC_VFPEXFFLBASE_FPMPEXFFLBASE_SHIFT 0
-#define I40E_GLHMC_VFPEXFFLBASE_FPMPEXFFLBASE_MASK  I40E_MASK(0xFFFFFF, I40E_GLHMC_VFPEXFFLBASE_FPMPEXFFLBASE_SHIFT)
 #define I40E_GLHMC_VFSDPART(_i)            (0x000C8800 + ((_i) * 4)) /* _i=0...31 */ /* Reset: CORER */
 #define I40E_GLHMC_VFSDPART_MAX_INDEX      31
 #define I40E_GLHMC_VFSDPART_PMSDBASE_SHIFT 0
diff --git a/drivers/net/i40e/i40e_regs.h b/drivers/net/i40e/i40e_regs.h
index b19bb1d5a5..7e94fca5b1 100644
--- a/drivers/net/i40e/i40e_regs.h
+++ b/drivers/net/i40e/i40e_regs.h
@@ -586,9 +586,6 @@ static const struct i40e_reg_info i40e_regs_others[] = {
 	{I40E_GLHMC_PEARPMAX, 0, 0, 0, 0, "GLHMC_PEARPMAX"},
 	{I40E_GLHMC_PEMROBJSZ, 0, 0, 0, 0, "GLHMC_PEMROBJSZ"},
 	{I40E_GLHMC_PEMRMAX, 0, 0, 0, 0, "GLHMC_PEMRMAX"},
-	{I40E_GLHMC_PEXFOBJSZ, 0, 0, 0, 0, "GLHMC_PEXFOBJSZ"},
-	{I40E_GLHMC_PEXFMAX, 0, 0, 0, 0, "GLHMC_PEXFMAX"},
-	{I40E_GLHMC_PEXFFLMAX, 0, 0, 0, 0, "GLHMC_PEXFFLMAX"},
 	{I40E_GLHMC_PEQ1OBJSZ, 0, 0, 0, 0, "GLHMC_PEQ1OBJSZ"},
 	{I40E_GLHMC_PEQ1MAX, 0, 0, 0, 0, "GLHMC_PEQ1MAX"},
 	{I40E_GLHMC_PEQ1FLMAX, 0, 0, 0, 0, "GLHMC_PEQ1FLMAX"},
@@ -616,9 +613,6 @@ static const struct i40e_reg_info i40e_regs_others[] = {
 	{I40E_GLHMC_APBVTINUSEBASE(0), 15, 4, 0, 0, "GLHMC_APBVTINUSEBASE"},
 	{I40E_GLHMC_PEMRBASE(0), 15, 4, 0, 0, "GLHMC_PEMRBASE"},
 	{I40E_GLHMC_PEMRCNT(0), 15, 4, 0, 0, "GLHMC_PEMRCNT"},
-	{I40E_GLHMC_PEXFBASE(0), 15, 4, 0, 0, "GLHMC_PEXFBASE"},
-	{I40E_GLHMC_PEXFCNT(0), 15, 4, 0, 0, "GLHMC_PEXFCNT"},
-	{I40E_GLHMC_PEXFFLBASE(0), 15, 4, 0, 0, "GLHMC_PEXFFLBASE"},
 	{I40E_GLHMC_PEQ1BASE(0), 15, 4, 0, 0, "GLHMC_PEQ1BASE"},
 	{I40E_GLHMC_PEQ1CNT(0), 15, 4, 0, 0, "GLHMC_PEQ1CNT"},
 	{I40E_GLHMC_PEQ1FLBASE(0), 15, 4, 0, 0, "GLHMC_PEQ1FLBASE"},
@@ -653,9 +647,6 @@ static const struct i40e_reg_info i40e_regs_others[] = {
 	{I40E_GLHMC_VFAPBVTINUSEBASE(0), 31, 4, 0, 0, "GLHMC_VFAPBVTINUSEBASE"},
 	{I40E_GLHMC_VFPEMRBASE(0), 31, 4, 0, 0, "GLHMC_VFPEMRBASE"},
 	{I40E_GLHMC_VFPEMRCNT(0), 31, 4, 0, 0, "GLHMC_VFPEMRCNT"},
-	{I40E_GLHMC_VFPEXFBASE(0), 31, 4, 0, 0, "GLHMC_VFPEXFBASE"},
-	{I40E_GLHMC_VFPEXFCNT(0), 31, 4, 0, 0, "GLHMC_VFPEXFCNT"},
-	{I40E_GLHMC_VFPEXFFLBASE(0), 31, 4, 0, 0, "GLHMC_VFPEXFFLBASE"},
 	{I40E_GLHMC_VFPEQ1BASE(0), 31, 4, 0, 0, "GLHMC_VFPEQ1BASE"},
 	{I40E_GLHMC_VFPEQ1CNT(0), 31, 4, 0, 0, "GLHMC_VFPEQ1CNT"},
 	{I40E_GLHMC_VFPEQ1FLBASE(0), 31, 4, 0, 0, "GLHMC_VFPEQ1FLBASE"},
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:23.940067576 +0100
+++ 0001-net-i40e-base-remove-unused-variables.patch	2025-06-12 22:06:23.778042696 +0100
@@ -1 +1 @@
-From d63c0823472340db19aa1103cbfbcd94fefd00ce Mon Sep 17 00:00:00 2001
+From 43864791e80cfa3f86045db151b1dc0dd11ea86e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d63c0823472340db19aa1103cbfbcd94fefd00ce ]
+
@@ -22 +24 @@
-index 25835a5ecb..e4de508aea 100644
+index e5651ad80b..38828e6da5 100644
@@ -25 +27 @@
-@@ -5619,7 +5619,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
+@@ -5626,7 +5626,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
@@ -33 +35 @@
-@@ -5664,8 +5663,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
+@@ -5671,8 +5670,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
@@ -42 +44 @@
-@@ -5682,8 +5679,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
+@@ -5689,8 +5686,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
@@ -52 +54 @@
-index 51f65d7e5f..b9da69484c 100644
+index 75eff845f1..be4700770a 100644
@@ -55 +57 @@
-@@ -3618,27 +3618,6 @@
+@@ -3625,27 +3625,6 @@
@@ -83 +85 @@
-@@ -3759,18 +3738,6 @@
+@@ -3766,18 +3745,6 @@

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'ci: bump tested distributions in GHA' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/fm10k/base: fix compilation warnings' " luca.boccassi
                   ` (69 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: David Marchand; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/1eba28e72f58e9f73c292c4c800b28f36759e8dd

Thanks.

Luca Boccassi

---
From 1eba28e72f58e9f73c292c4c800b28f36759e8dd Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 31 Jan 2024 18:44:35 +0100
Subject: [PATCH] ci: bump tested distributions in GHA

[ upstream commit 8400093195dd01ddb4398a3649e545a374fd97d2 ]

Fedora 37 has reached end of life in December 2023.
Ubuntu 20.04 is getting quite old.

Switch to more recent versions.

With this move, some packages provided by those distributions are now
recent enough to extend our build coverage.
Install additional dependencies like ipsec-mb, isal and other
libbpf/libxdp devel packages.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .github/workflows/build.yml | 49 ++++++++++++++++++++-----------------
 1 file changed, 26 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dab104c8c4..5ed42c99a4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -34,31 +34,31 @@ jobs:
       fail-fast: false
       matrix:
         config:
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: gcc
             mini: mini
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: gcc
             checks: doc+tests
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: clang
             checks: asan+doc+tests
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: gcc
             library: static
             cross: i386
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: gcc
             library: static
             cross: mingw
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: gcc
             library: shared
             cross: aarch64
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: gcc
             cross: ppc64le
-          - os: ubuntu-20.04
+          - os: ubuntu-22.04
             compiler: gcc
             cross: riscv64
 
@@ -94,10 +94,10 @@ jobs:
     - name: Update APT cache
       run: sudo apt update || true
     - name: Install packages
-      run: sudo apt install -y ccache libnuma-dev python3-setuptools
-        python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
-        libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
-        libarchive-dev
+      run: sudo apt install -y ccache libarchive-dev libbsd-dev libbpf-dev
+        libfdt-dev libibverbs-dev libipsec-mb-dev libisal-dev libjansson-dev
+        libnuma-dev libpcap-dev libssl-dev ninja-build pkg-config python3-pip
+        python3-pyelftools python3-setuptools python3-wheel zlib1g-dev
     - name: Install libabigail build dependencies if no cache is available
       if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
       run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
@@ -152,7 +152,7 @@ jobs:
       fail-fast: false
       matrix:
         config:
-          - image: fedora:35
+          - image: fedora:39
 
     steps:
     - name: Generate various keys
@@ -177,10 +177,11 @@ jobs:
       run: docker exec -i dpdk dnf update -y
     - name: Install packages
       if: steps.image_cache.outputs.cache-hit != 'true'
-      run: docker exec -i dpdk dnf install -y ccache numactl-devel
-        python3-setuptools python3-wheel python3-pip python3-pyelftools
-        ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
-        openssl-devel rdma-core-devel zlib-devel
+      run: docker exec -i dpdk dnf install -y ccache intel-ipsec-mb-devel
+        isa-l-devel jansson-devel libarchive-devel libatomic libbsd-devel
+        libbpf-devel libfdt-devel libpcap-devel libxdp-devel ninja-build
+        numactl-devel openssl-devel python3-pip python3-pyelftools
+        python3-setuptools python3-wheel rdma-core-devel zlib-devel
     - name: Save image in cache
       if: steps.image_cache.outputs.cache-hit != 'true'
       run: |
@@ -200,9 +201,9 @@ jobs:
       fail-fast: false
       matrix:
         config:
-          - image: fedora:35
+          - image: fedora:39
             compiler: gcc
-          - image: fedora:35
+          - image: fedora:39
             compiler: clang
 
     steps:
@@ -250,10 +251,12 @@ jobs:
     - name: Update
       run: docker exec -i dpdk dnf update -y || true
     - name: Install packages
-      run: docker exec -i dpdk dnf install -y ccache numactl-devel
-        python3-setuptools python3-wheel python3-pip python3-pyelftools
-        ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
-        openssl-devel rdma-core-devel zlib-devel ${{ matrix.config.compiler }}
+      run: docker exec -i dpdk dnf install -y ccache intel-ipsec-mb-devel
+        isa-l-devel jansson-devel libarchive-devel libatomic libbsd-devel
+        libbpf-devel libfdt-devel libpcap-devel libxdp-devel ninja-build
+        numactl-devel openssl-devel python3-pip python3-pyelftools
+        python3-setuptools python3-wheel rdma-core-devel zlib-devel
+        ${{ matrix.config.compiler }}
     - name: Run setup
       run: docker exec -i dpdk .ci/linux-setup.sh
     - name: Build
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:23.983785291 +0100
+++ 0002-ci-bump-tested-distributions-in-GHA.patch	2025-06-12 22:06:23.778042696 +0100
@@ -1 +1 @@
-From 8400093195dd01ddb4398a3649e545a374fd97d2 Mon Sep 17 00:00:00 2001
+From 1eba28e72f58e9f73c292c4c800b28f36759e8dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8400093195dd01ddb4398a3649e545a374fd97d2 ]
+
@@ -19,2 +21,2 @@
- .github/workflows/build.yml | 54 ++++++++++++++++++-------------------
- 1 file changed, 27 insertions(+), 27 deletions(-)
+ .github/workflows/build.yml | 49 ++++++++++++++++++++-----------------
+ 1 file changed, 26 insertions(+), 23 deletions(-)
@@ -23 +25 @@
-index af514e9545..421207c241 100644
+index dab104c8c4..5ed42c99a4 100644
@@ -26 +28 @@
-@@ -36,37 +36,37 @@ jobs:
+@@ -34,31 +34,31 @@ jobs:
@@ -37,9 +39 @@
-             checks: stdatomic
--          - os: ubuntu-20.04
-+          - os: ubuntu-22.04
-             compiler: clang
-             checks: stdatomic
--          - os: ubuntu-20.04
-+          - os: ubuntu-22.04
-             compiler: gcc
-             checks: abi+debug+doc+examples+tests
+             checks: doc+tests
@@ -74 +68 @@
-@@ -105,10 +105,10 @@ jobs:
+@@ -94,10 +94,10 @@ jobs:
@@ -78,4 +72,4 @@
--      run: sudo apt install -y ccache libarchive-dev libbsd-dev libfdt-dev
--        libibverbs-dev libjansson-dev libnuma-dev libpcap-dev libssl-dev
--        ninja-build pkg-config python3-pip python3-pyelftools python3-setuptools
--        python3-wheel zlib1g-dev
+-      run: sudo apt install -y ccache libnuma-dev python3-setuptools
+-        python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
+-        libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
+-        libarchive-dev
@@ -88,2 +82,2 @@
-       run: sudo apt install -y autoconf automake libdw-dev libtool libxml2-dev
-@@ -162,7 +162,7 @@ jobs:
+       run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
+@@ -152,7 +152,7 @@ jobs:
@@ -93 +87 @@
--          - image: fedora:37
+-          - image: fedora:35
@@ -98 +92 @@
-@@ -187,11 +187,11 @@ jobs:
+@@ -177,10 +177,11 @@ jobs:
@@ -102,5 +96,4 @@
--      run: docker exec -i dpdk dnf install -y ccache jansson-devel
--        libarchive-devel libatomic libbsd-devel libbpf-devel libfdt-devel
--        libpcap-devel ninja-build numactl-devel openssl-devel python3-pip
--        python3-pyelftools python3-setuptools python3-wheel rdma-core-devel
--        zlib-devel
+-      run: docker exec -i dpdk dnf install -y ccache numactl-devel
+-        python3-setuptools python3-wheel python3-pip python3-pyelftools
+-        ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
+-        openssl-devel rdma-core-devel zlib-devel
@@ -115 +108 @@
-@@ -211,9 +211,9 @@ jobs:
+@@ -200,9 +201,9 @@ jobs:
@@ -119 +112 @@
--          - image: fedora:37
+-          - image: fedora:35
@@ -122 +115 @@
--          - image: fedora:37
+-          - image: fedora:35
@@ -127 +120 @@
-@@ -262,11 +262,11 @@ jobs:
+@@ -250,10 +251,12 @@ jobs:
@@ -131,5 +124,4 @@
--      run: docker exec -i dpdk dnf install -y ccache jansson-devel
--        libarchive-devel libatomic libbsd-devel libxdp-devel libfdt-devel
--        libpcap-devel ninja-build numactl-devel openssl-devel python3-pip
--        python3-pyelftools python3-setuptools python3-wheel rdma-core-devel
--        zlib-devel
+-      run: docker exec -i dpdk dnf install -y ccache numactl-devel
+-        python3-setuptools python3-wheel python3-pip python3-pyelftools
+-        ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
+-        openssl-devel rdma-core-devel zlib-devel ${{ matrix.config.compiler }}
@@ -141 +133 @@
-         ${{ matrix.config.compiler }}
++        ${{ matrix.config.compiler }}
@@ -143,0 +136 @@
+     - name: Build

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/fm10k/base: fix compilation warnings' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
  2025-06-12 21:06 ` patch 'ci: bump tested distributions in GHA' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/ixgbe/base: correct definition of endianness macro' " luca.boccassi
                   ` (68 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/11713936aef12cf6e66203e1ada9b58c1340542e

Thanks.

Luca Boccassi

---
From 11713936aef12cf6e66203e1ada9b58c1340542e Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:13 +0000
Subject: [PATCH] net/fm10k/base: fix compilation warnings

[ upstream commit 48fc5188aa753824a4bd469f9c482e845404c963 ]

The fixes required to re-enable warnings in the fm10k base code are
trivial, so let's make the changes and get a clean compile without any
warning disable flags.

* provide definitions for the UNREFERENCED_PARAMETER macros
* fix the spelling of the work "fallthrough" in comments
* provide a definition of FM10K_READ_PCI_WORD in os_dep.h that marks the
  parameters as used.

Fixes: 7223d200c227 ("fm10k: add base driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/fm10k/base/fm10k_mbx.c   |  2 +-
 drivers/net/fm10k/base/fm10k_osdep.h |  2 +-
 drivers/net/fm10k/base/fm10k_pf.c    |  8 ++++----
 drivers/net/fm10k/base/fm10k_type.h  |  6 +++---
 drivers/net/fm10k/base/meson.build   | 14 +-------------
 5 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/drivers/net/fm10k/base/fm10k_mbx.c b/drivers/net/fm10k/base/fm10k_mbx.c
index 2bb0d82efe..9028403757 100644
--- a/drivers/net/fm10k/base/fm10k_mbx.c
+++ b/drivers/net/fm10k/base/fm10k_mbx.c
@@ -1602,7 +1602,7 @@ s32 fm10k_pfvf_mbx_init(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx,
 			mbx->mbmem_reg = FM10K_MBMEM_VF(id, 0);
 			break;
 		}
-		/* fallthough */
+		/* fallthrough */
 	default:
 		return FM10K_MBX_ERR_NO_MBX;
 	}
diff --git a/drivers/net/fm10k/base/fm10k_osdep.h b/drivers/net/fm10k/base/fm10k_osdep.h
index 019fba5e25..977aa07c4b 100644
--- a/drivers/net/fm10k/base/fm10k_osdep.h
+++ b/drivers/net/fm10k/base/fm10k_osdep.h
@@ -67,7 +67,7 @@ typedef uint64_t   u64;
 #define FM10K_PCI_REG_WRITE(reg, value) rte_write32((value), (reg))
 
 /* not implemented */
-#define FM10K_READ_PCI_WORD(hw, reg)     0
+#define FM10K_READ_PCI_WORD(hw, reg)     ((void)hw, (void)reg, 0)
 
 #define FM10K_WRITE_MBX(hw, reg, value) FM10K_WRITE_REG(hw, reg, value)
 #define FM10K_READ_MBX(hw, reg) FM10K_READ_REG(hw, reg)
diff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c
index 439dd224de..b54116a4b5 100644
--- a/drivers/net/fm10k/base/fm10k_pf.c
+++ b/drivers/net/fm10k/base/fm10k_pf.c
@@ -1362,19 +1362,19 @@ STATIC u8 fm10k_iov_supported_xcast_mode_pf(struct fm10k_vf_info *vf_info,
 	case FM10K_XCAST_MODE_PROMISC:
 		if (vf_flags & FM10K_VF_FLAG_PROMISC_CAPABLE)
 			return FM10K_XCAST_MODE_PROMISC;
-		/* fallthough */
+		/* fallthrough */
 	case FM10K_XCAST_MODE_ALLMULTI:
 		if (vf_flags & FM10K_VF_FLAG_ALLMULTI_CAPABLE)
 			return FM10K_XCAST_MODE_ALLMULTI;
-		/* fallthough */
+		/* fallthrough */
 	case FM10K_XCAST_MODE_MULTI:
 		if (vf_flags & FM10K_VF_FLAG_MULTI_CAPABLE)
 			return FM10K_XCAST_MODE_MULTI;
-		/* fallthough */
+		/* fallthrough */
 	case FM10K_XCAST_MODE_NONE:
 		if (vf_flags & FM10K_VF_FLAG_NONE_CAPABLE)
 			return FM10K_XCAST_MODE_NONE;
-		/* fallthough */
+		/* fallthrough */
 	default:
 		break;
 	}
diff --git a/drivers/net/fm10k/base/fm10k_type.h b/drivers/net/fm10k/base/fm10k_type.h
index 84781ba9b2..437fb1c55e 100644
--- a/drivers/net/fm10k/base/fm10k_type.h
+++ b/drivers/net/fm10k/base/fm10k_type.h
@@ -83,9 +83,9 @@ struct fm10k_hw;
 #define FM10K_NOT_IMPLEMENTED			0x7FFFFFFF
 
 #define UNREFERENCED_XPARAMETER
-#define UNREFERENCED_1PARAMETER(_p) (_p)
-#define UNREFERENCED_2PARAMETER(_p, _q)	    do { (_p); (_q); } while (0)
-#define UNREFERENCED_3PARAMETER(_p, _q, _r) do { (_p); (_q); (_r); } while (0)
+#define UNREFERENCED_1PARAMETER(_p) (void)(_p)
+#define UNREFERENCED_2PARAMETER(_p, _q)	    do { (void)(_p); (void)(_q); } while (0)
+#define UNREFERENCED_3PARAMETER(_p, _q, _r) do { (void)(_p); (void)(_q); (void)(_r); } while (0)
 
 /* Start of PF registers */
 #define FM10K_CTRL		0x0000
diff --git a/drivers/net/fm10k/base/meson.build b/drivers/net/fm10k/base/meson.build
index bd19df27f7..a2640d1ee8 100644
--- a/drivers/net/fm10k/base/meson.build
+++ b/drivers/net/fm10k/base/meson.build
@@ -10,19 +10,7 @@ sources = [
         'fm10k_vf.c',
 ]
 
-error_cflags = ['-Wno-unused-parameter', '-Wno-unused-value',
-    '-Wno-strict-aliasing', '-Wno-format-extra-args',
-    '-Wno-unused-variable',
-    '-Wno-implicit-fallthrough'
-]
-c_args = cflags
-foreach flag: error_cflags
-    if cc.has_argument(flag)
-        c_args += flag
-    endif
-endforeach
-
 base_lib = static_library('fm10k_base', sources,
     dependencies: static_rte_eal,
-    c_args: c_args)
+    c_args: cflags)
 base_objs = base_lib.extract_all_objects(recursive: true)
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.016372433 +0100
+++ 0003-net-fm10k-base-fix-compilation-warnings.patch	2025-06-12 22:06:23.782042779 +0100
@@ -1 +1 @@
-From 48fc5188aa753824a4bd469f9c482e845404c963 Mon Sep 17 00:00:00 2001
+From 11713936aef12cf6e66203e1ada9b58c1340542e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48fc5188aa753824a4bd469f9c482e845404c963 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21,5 +22,5 @@
- drivers/net/intel/fm10k/base/fm10k_mbx.c   |  2 +-
- drivers/net/intel/fm10k/base/fm10k_osdep.h |  2 +-
- drivers/net/intel/fm10k/base/fm10k_pf.c    |  8 ++++----
- drivers/net/intel/fm10k/base/fm10k_type.h  |  6 +++---
- drivers/net/intel/fm10k/base/meson.build   | 14 +-------------
+ drivers/net/fm10k/base/fm10k_mbx.c   |  2 +-
+ drivers/net/fm10k/base/fm10k_osdep.h |  2 +-
+ drivers/net/fm10k/base/fm10k_pf.c    |  8 ++++----
+ drivers/net/fm10k/base/fm10k_type.h  |  6 +++---
+ drivers/net/fm10k/base/meson.build   | 14 +-------------
@@ -28 +29 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_mbx.c b/drivers/net/intel/fm10k/base/fm10k_mbx.c
+diff --git a/drivers/net/fm10k/base/fm10k_mbx.c b/drivers/net/fm10k/base/fm10k_mbx.c
@@ -30,2 +31,2 @@
---- a/drivers/net/intel/fm10k/base/fm10k_mbx.c
-+++ b/drivers/net/intel/fm10k/base/fm10k_mbx.c
+--- a/drivers/net/fm10k/base/fm10k_mbx.c
++++ b/drivers/net/fm10k/base/fm10k_mbx.c
@@ -41,4 +42,4 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_osdep.h b/drivers/net/intel/fm10k/base/fm10k_osdep.h
-index a727a57481..5f8ff10474 100644
---- a/drivers/net/intel/fm10k/base/fm10k_osdep.h
-+++ b/drivers/net/intel/fm10k/base/fm10k_osdep.h
+diff --git a/drivers/net/fm10k/base/fm10k_osdep.h b/drivers/net/fm10k/base/fm10k_osdep.h
+index 019fba5e25..977aa07c4b 100644
+--- a/drivers/net/fm10k/base/fm10k_osdep.h
++++ b/drivers/net/fm10k/base/fm10k_osdep.h
@@ -54 +55 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_pf.c b/drivers/net/intel/fm10k/base/fm10k_pf.c
+diff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c
@@ -56,2 +57,2 @@
---- a/drivers/net/intel/fm10k/base/fm10k_pf.c
-+++ b/drivers/net/intel/fm10k/base/fm10k_pf.c
+--- a/drivers/net/fm10k/base/fm10k_pf.c
++++ b/drivers/net/fm10k/base/fm10k_pf.c
@@ -82 +83 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_type.h b/drivers/net/intel/fm10k/base/fm10k_type.h
+diff --git a/drivers/net/fm10k/base/fm10k_type.h b/drivers/net/fm10k/base/fm10k_type.h
@@ -84,2 +85,2 @@
---- a/drivers/net/intel/fm10k/base/fm10k_type.h
-+++ b/drivers/net/intel/fm10k/base/fm10k_type.h
+--- a/drivers/net/fm10k/base/fm10k_type.h
++++ b/drivers/net/fm10k/base/fm10k_type.h
@@ -99,4 +100,4 @@
-diff --git a/drivers/net/intel/fm10k/base/meson.build b/drivers/net/intel/fm10k/base/meson.build
-index f24e453fd0..a2640d1ee8 100644
---- a/drivers/net/intel/fm10k/base/meson.build
-+++ b/drivers/net/intel/fm10k/base/meson.build
+diff --git a/drivers/net/fm10k/base/meson.build b/drivers/net/fm10k/base/meson.build
+index bd19df27f7..a2640d1ee8 100644
+--- a/drivers/net/fm10k/base/meson.build
++++ b/drivers/net/fm10k/base/meson.build
@@ -107,4 +108,4 @@
--error_cflags = [
--        '-Wno-unused-parameter',
--        '-Wno-unused-value',
--        '-Wno-implicit-fallthrough',
+-error_cflags = ['-Wno-unused-parameter', '-Wno-unused-value',
+-    '-Wno-strict-aliasing', '-Wno-format-extra-args',
+-    '-Wno-unused-variable',
+-    '-Wno-implicit-fallthrough'

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/ixgbe/base: correct definition of endianness macro' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
  2025-06-12 21:06 ` patch 'ci: bump tested distributions in GHA' " luca.boccassi
  2025-06-12 21:06 ` patch 'net/fm10k/base: fix compilation warnings' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/ixgbe/base: fix compilation warnings' " luca.boccassi
                   ` (67 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/63a1721a1bf4f7fec378bbbd051f5f25f327e78d

Thanks.

Luca Boccassi

---
From 63a1721a1bf4f7fec378bbbd051f5f25f327e78d Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:15 +0000
Subject: [PATCH] net/ixgbe/base: correct definition of endianness macro

[ upstream commit 3e7ea9ad5162876583e72de6061752810bdde0fe ]

The definition of IXGBE_LE32_TO_CPUS macro is meant to modify the value
in place - similar to the le32_to_cpus() macro in kernel. Fixing the
definition allows us to remove some warning flags, and removes the need
for the uintptr_t typecasts.

Fixes: aa4fc14d2cee ("ixgbe: update base driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c |  4 ++--
 drivers/net/ixgbe/base/ixgbe_osdep.h  | 14 +++++++-------
 drivers/net/ixgbe/base/meson.build    |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index aa843bd5c4..8c2c69e58f 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4586,7 +4586,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	/* first pull in the header so we know the buffer length */
 	for (bi = 0; bi < dword_len; bi++) {
 		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
-		IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
+		IXGBE_LE32_TO_CPUS(&buffer[bi]);
 	}
 
 	/*
@@ -4622,7 +4622,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	/* Pull in the rest of the buffer (bi is where we left off) */
 	for (; bi <= dword_len; bi++) {
 		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
-		IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
+		IXGBE_LE32_TO_CPUS(&buffer[bi]);
 	}
 
 rel_out:
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index 6c25f608b1..09ea1e1e7e 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -49,19 +49,19 @@
 #define false               0
 #define true                1
 #ifndef RTE_EXEC_ENV_WINDOWS
-#define min(a,b)	RTE_MIN(a,b) 
+#define min(a,b)	RTE_MIN(a,b)
 #endif
 
 #define EWARN(hw, S, args...)     DEBUGOUT1(S, ##args)
 
 /* Bunch of defines for shared code bogosity */
 #ifndef UNREFERENCED_PARAMETER
-#define UNREFERENCED_PARAMETER(_p)  
+#define UNREFERENCED_PARAMETER(_p)
 #endif
-#define UNREFERENCED_1PARAMETER(_p) 
+#define UNREFERENCED_1PARAMETER(_p)
 #define UNREFERENCED_2PARAMETER(_p, _q)
-#define UNREFERENCED_3PARAMETER(_p, _q, _r) 
-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) 
+#define UNREFERENCED_3PARAMETER(_p, _q, _r)
+#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s)
 #define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t)
 
 /* Shared code error reporting */
@@ -80,7 +80,7 @@ enum {
 #define IXGBE_CPU_TO_LE16(_i)  rte_cpu_to_le_16(_i)
 #define IXGBE_CPU_TO_LE32(_i)  rte_cpu_to_le_32(_i)
 #define IXGBE_LE32_TO_CPU(_i)  rte_le_to_cpu_32(_i)
-#define IXGBE_LE32_TO_CPUS(_i) rte_le_to_cpu_32(_i)
+#define IXGBE_LE32_TO_CPUS(_i) do { *_i = rte_le_to_cpu_32(*_i); } while(0)
 #define IXGBE_CPU_TO_BE16(_i)  rte_cpu_to_be_16(_i)
 #define IXGBE_CPU_TO_BE32(_i)  rte_cpu_to_be_32(_i)
 #define IXGBE_BE32_TO_CPU(_i)  rte_be_to_cpu_32(_i)
@@ -127,7 +127,7 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
 	IXGBE_PCI_REG_ADDR((hw), (reg) + ((index) << 2))
 
 /* Not implemented !! */
-#define IXGBE_READ_PCIE_WORD(hw, reg) 0	
+#define IXGBE_READ_PCIE_WORD(hw, reg) 0
 #define IXGBE_WRITE_PCIE_WORD(hw, reg, value) do { } while(0)
 
 #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index f6497014da..ab775d8c66 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -17,7 +17,7 @@ sources = [
         'ixgbe_x550.c',
 ]
 
-error_cflags = ['-Wno-unused-value',
+error_cflags = [
         '-Wno-unused-but-set-variable',
         '-Wno-unused-parameter',
         ]
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.050988134 +0100
+++ 0004-net-ixgbe-base-correct-definition-of-endianness-macr.patch	2025-06-12 22:06:23.782042779 +0100
@@ -1 +1 @@
-From 3e7ea9ad5162876583e72de6061752810bdde0fe Mon Sep 17 00:00:00 2001
+From 63a1721a1bf4f7fec378bbbd051f5f25f327e78d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e7ea9ad5162876583e72de6061752810bdde0fe ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,4 +18,4 @@
- drivers/net/intel/ixgbe/base/ixgbe_common.c | 4 ++--
- drivers/net/intel/ixgbe/base/ixgbe_osdep.h  | 2 +-
- drivers/net/intel/ixgbe/base/meson.build    | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
+ drivers/net/ixgbe/base/ixgbe_common.c |  4 ++--
+ drivers/net/ixgbe/base/ixgbe_osdep.h  | 14 +++++++-------
+ drivers/net/ixgbe/base/meson.build    |  2 +-
+ 3 files changed, 10 insertions(+), 10 deletions(-)
@@ -22,5 +23,5 @@
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_common.c b/drivers/net/intel/ixgbe/base/ixgbe_common.c
-index d6425c5b78..fbc9605e4d 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_common.c
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_common.c
-@@ -4610,7 +4610,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
+diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
+index aa843bd5c4..8c2c69e58f 100644
+--- a/drivers/net/ixgbe/base/ixgbe_common.c
++++ b/drivers/net/ixgbe/base/ixgbe_common.c
+@@ -4586,7 +4586,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
@@ -35 +36 @@
-@@ -4646,7 +4646,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
+@@ -4622,7 +4622,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
@@ -44,6 +45,32 @@
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-index cffc6a4ce8..6e5f7b4ae8 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-@@ -83,7 +83,7 @@ enum {
- #define IXGBE_LE16_TO_CPU(_i)  rte_le_to_cpu_16(_i)
+diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
+index 6c25f608b1..09ea1e1e7e 100644
+--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
++++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
+@@ -49,19 +49,19 @@
+ #define false               0
+ #define true                1
+ #ifndef RTE_EXEC_ENV_WINDOWS
+-#define min(a,b)	RTE_MIN(a,b) 
++#define min(a,b)	RTE_MIN(a,b)
+ #endif
+ 
+ #define EWARN(hw, S, args...)     DEBUGOUT1(S, ##args)
+ 
+ /* Bunch of defines for shared code bogosity */
+ #ifndef UNREFERENCED_PARAMETER
+-#define UNREFERENCED_PARAMETER(_p)  
++#define UNREFERENCED_PARAMETER(_p)
+ #endif
+-#define UNREFERENCED_1PARAMETER(_p) 
++#define UNREFERENCED_1PARAMETER(_p)
+ #define UNREFERENCED_2PARAMETER(_p, _q)
+-#define UNREFERENCED_3PARAMETER(_p, _q, _r) 
+-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) 
++#define UNREFERENCED_3PARAMETER(_p, _q, _r)
++#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s)
+ #define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t)
+ 
+ /* Shared code error reporting */
+@@ -80,7 +80,7 @@ enum {
+ #define IXGBE_CPU_TO_LE16(_i)  rte_cpu_to_le_16(_i)
+ #define IXGBE_CPU_TO_LE32(_i)  rte_cpu_to_le_32(_i)
@@ -51 +77,0 @@
- #define IXGBE_LE64_TO_CPU(_i)  rte_le_to_cpu_64(_i)
@@ -57,5 +83,14 @@
-diff --git a/drivers/net/intel/ixgbe/base/meson.build b/drivers/net/intel/ixgbe/base/meson.build
-index 7e4fbdfa0f..f8b2ee6341 100644
---- a/drivers/net/intel/ixgbe/base/meson.build
-+++ b/drivers/net/intel/ixgbe/base/meson.build
-@@ -19,7 +19,7 @@ sources = [
+@@ -127,7 +127,7 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
+ 	IXGBE_PCI_REG_ADDR((hw), (reg) + ((index) << 2))
+ 
+ /* Not implemented !! */
+-#define IXGBE_READ_PCIE_WORD(hw, reg) 0	
++#define IXGBE_READ_PCIE_WORD(hw, reg) 0
+ #define IXGBE_WRITE_PCIE_WORD(hw, reg, value) do { } while(0)
+ 
+ #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)
+diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
+index f6497014da..ab775d8c66 100644
+--- a/drivers/net/ixgbe/base/meson.build
++++ b/drivers/net/ixgbe/base/meson.build
+@@ -17,7 +17,7 @@ sources = [

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/ixgbe/base: fix compilation warnings' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (2 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/ixgbe/base: correct definition of endianness macro' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/i40e/base: fix unused value " luca.boccassi
                   ` (66 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/6de8266dd87ace17673e7b47e9f1636a1ba465d3

Thanks.

Luca Boccassi

---
From 6de8266dd87ace17673e7b47e9f1636a1ba465d3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:16 +0000
Subject: [PATCH] net/ixgbe/base: fix compilation warnings

[ upstream commit ca361b5ab1ba8ec9191b8376a8be0e3935823596 ]

We can remove almost all of the "unused parameter" and "unused variable"
warnings by just improving the macro definitions in the osdep.h header.
Remaining two instances can be fixed by just one-line additions to the
code, so add those to give us a clean build with the warnings enabled.

Fixes: af75078fece3 ("first public release")
Fixes: c6cb313da739 ("net/ixgbe/base: add link management for E610")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_osdep.h | 19 +++++++++++--------
 drivers/net/ixgbe/base/meson.build   | 11 -----------
 2 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index 09ea1e1e7e..a6f257f015 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -56,13 +56,16 @@
 
 /* Bunch of defines for shared code bogosity */
 #ifndef UNREFERENCED_PARAMETER
-#define UNREFERENCED_PARAMETER(_p)
+#define UNREFERENCED_PARAMETER(_p) (void)(_p)
 #endif
-#define UNREFERENCED_1PARAMETER(_p)
-#define UNREFERENCED_2PARAMETER(_p, _q)
-#define UNREFERENCED_3PARAMETER(_p, _q, _r)
-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s)
-#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t)
+#define UNREFERENCED_1PARAMETER(_p) (void)(_p)
+#define UNREFERENCED_2PARAMETER(_p, _q) do { (void)(_p); (void)(_q); } while(0)
+#define UNREFERENCED_3PARAMETER(_p, _q, _r) \
+	do { (void)(_p); (void)(_q); (void)(_r); } while(0)
+#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) \
+	do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); } while(0)
+#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) \
+	do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); (void)(_t); } while(0)
 
 /* Shared code error reporting */
 enum {
@@ -127,8 +130,8 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
 	IXGBE_PCI_REG_ADDR((hw), (reg) + ((index) << 2))
 
 /* Not implemented !! */
-#define IXGBE_READ_PCIE_WORD(hw, reg) 0
-#define IXGBE_WRITE_PCIE_WORD(hw, reg, value) do { } while(0)
+#define IXGBE_READ_PCIE_WORD(hw, reg)  ((void)hw, (void)(reg), 0)
+#define IXGBE_WRITE_PCIE_WORD(hw, reg, value) do { (void)hw; (void)reg; (void)value; } while(0)
 
 #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)
 
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index ab775d8c66..b3cd74e805 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -17,17 +17,6 @@ sources = [
         'ixgbe_x550.c',
 ]
 
-error_cflags = [
-        '-Wno-unused-but-set-variable',
-        '-Wno-unused-parameter',
-        ]
-c_args = cflags
-foreach flag: error_cflags
-    if cc.has_argument(flag)
-        c_args += flag
-    endif
-endforeach
-
 base_lib = static_library('ixgbe_base', sources,
     dependencies: [static_rte_eal, static_rte_net],
     c_args: c_args)
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.087288931 +0100
+++ 0005-net-ixgbe-base-fix-compilation-warnings.patch	2025-06-12 22:06:23.786042864 +0100
@@ -1 +1 @@
-From ca361b5ab1ba8ec9191b8376a8be0e3935823596 Mon Sep 17 00:00:00 2001
+From 6de8266dd87ace17673e7b47e9f1636a1ba465d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ca361b5ab1ba8ec9191b8376a8be0e3935823596 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18,4 +19,3 @@
- drivers/net/intel/ixgbe/base/ixgbe_e610.c  |  2 ++
- drivers/net/intel/ixgbe/base/ixgbe_osdep.h | 19 +++++++++++--------
- drivers/net/intel/ixgbe/base/meson.build   | 11 -----------
- 3 files changed, 13 insertions(+), 19 deletions(-)
+ drivers/net/ixgbe/base/ixgbe_osdep.h | 19 +++++++++++--------
+ drivers/net/ixgbe/base/meson.build   | 11 -----------
+ 2 files changed, 11 insertions(+), 19 deletions(-)
@@ -23,25 +23,5 @@
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_e610.c b/drivers/net/intel/ixgbe/base/ixgbe_e610.c
-index 5474c3012a..7420c78d07 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_e610.c
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_e610.c
-@@ -1054,6 +1054,7 @@ static void ixgbe_parse_vsi_func_caps(struct ixgbe_hw *hw,
- 				      struct ixgbe_hw_func_caps *func_p,
- 				      struct ixgbe_aci_cmd_list_caps_elem *cap)
- {
-+	UNREFERENCED_PARAMETER(cap);
- 	func_p->guar_num_vsi = ixgbe_get_num_per_func(hw, IXGBE_MAX_VSI);
- }
- 
-@@ -1770,6 +1771,7 @@ s32 ixgbe_aci_set_event_mask(struct ixgbe_hw *hw, u8 port_num, u16 mask)
- 	struct ixgbe_aci_cmd_set_event_mask *cmd;
- 	struct ixgbe_aci_desc desc;
- 
-+	UNREFERENCED_PARAMETER(port_num);
- 	cmd = &desc.params.set_event_mask;
- 
- 	ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_event_mask);
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-index 6e5f7b4ae8..398c38bffd 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-@@ -57,13 +57,16 @@
+diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
+index 09ea1e1e7e..a6f257f015 100644
+--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
++++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
+@@ -56,13 +56,16 @@
@@ -51 +31 @@
--#define UNREFERENCED_PARAMETER(_p)  
+-#define UNREFERENCED_PARAMETER(_p)
@@ -54 +34 @@
--#define UNREFERENCED_1PARAMETER(_p) 
+-#define UNREFERENCED_1PARAMETER(_p)
@@ -56,2 +36,2 @@
--#define UNREFERENCED_3PARAMETER(_p, _q, _r) 
--#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) 
+-#define UNREFERENCED_3PARAMETER(_p, _q, _r)
+-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s)
@@ -70 +50 @@
-@@ -130,8 +133,8 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
+@@ -127,8 +130,8 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
@@ -74 +54 @@
--#define IXGBE_READ_PCIE_WORD(hw, reg) 0	
+-#define IXGBE_READ_PCIE_WORD(hw, reg) 0
@@ -81,5 +61,5 @@
-diff --git a/drivers/net/intel/ixgbe/base/meson.build b/drivers/net/intel/ixgbe/base/meson.build
-index f8b2ee6341..64e0bfd7be 100644
---- a/drivers/net/intel/ixgbe/base/meson.build
-+++ b/drivers/net/intel/ixgbe/base/meson.build
-@@ -19,17 +19,6 @@ sources = [
+diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
+index ab775d8c66..b3cd74e805 100644
+--- a/drivers/net/ixgbe/base/meson.build
++++ b/drivers/net/ixgbe/base/meson.build
+@@ -17,17 +17,6 @@ sources = [

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/i40e/base: fix unused value warnings' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (3 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/ixgbe/base: fix compilation warnings' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/i40e/base: fix compiler " luca.boccassi
                   ` (65 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/4cbf41d0b5741fc55568f26f93893d527d9113a9

Thanks.

Luca Boccassi

---
From 4cbf41d0b5741fc55568f26f93893d527d9113a9 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:18 +0000
Subject: [PATCH] net/i40e/base: fix unused value warnings

[ upstream commit 3c2125852742d46accc3f35f4fa683768ba25e09 ]

Fix warnings about unused values - parameters, variables, etc., and
remove the warning disable flags for them. Although modifying the
base-code files is not ideal, the changes required are minor, and only
affect two files from the imported base code.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c   |  1 +
 drivers/net/i40e/base/i40e_osdep.h |  4 ++--
 drivers/net/i40e/base/i40e_type.h  | 14 +++++++++-----
 drivers/net/i40e/base/meson.build  |  5 ++---
 drivers/net/i40e/i40e_ethdev.c     |  1 +
 5 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 05816a4b79..53bbaa1a12 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -1653,6 +1653,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_event(struct i40e_hw *hw,
 	u32 aq_total_len;
 	u32 aq_desc_len;
 
+	UNREFERENCED_1PARAMETER(perrno);
 	i40e_debug(hw, I40E_DEBUG_NVM, "NVMUPD: %s\n", __func__);
 
 	aq_desc_len = sizeof(struct i40e_aq_desc);
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 51537c5cf3..68fdb9bf80 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -184,8 +184,8 @@ struct i40e_dma_mem {
 	const void *zone;
 } __rte_packed;
 
-#define i40e_allocate_dma_mem(h, m, unused, s, a) \
-			i40e_allocate_dma_mem_d(h, m, s, a)
+#define i40e_allocate_dma_mem(h, m, mt, s, a) \
+			i40e_allocate_dma_mem_d(h, m, mt, s, a)
 #define i40e_free_dma_mem(h, m) i40e_free_dma_mem_d(h, m)
 
 struct i40e_virt_mem {
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index f4a3d66759..198d5f161f 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -14,11 +14,15 @@
 #include "i40e_devids.h"
 
 #define UNREFERENCED_XPARAMETER
-#define UNREFERENCED_1PARAMETER(_p) (_p);
-#define UNREFERENCED_2PARAMETER(_p, _q) (_p); (_q);
-#define UNREFERENCED_3PARAMETER(_p, _q, _r) (_p); (_q); (_r);
-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) (_p); (_q); (_r); (_s);
-#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) (_p); (_q); (_r); (_s); (_t);
+#define UNREFERENCED_1PARAMETER(_p) (void)(_p)
+#define UNREFERENCED_2PARAMETER(_p, _q) \
+	do { (void)(_p); (void)(_q); } while (0)
+#define UNREFERENCED_3PARAMETER(_p, _q, _r) \
+	do { (void)(_p); (void)(_q); (void)(_r); } while (0)
+#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) \
+	do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); } while (0)
+#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) \
+	do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); (void)(_t); } while (0)
 
 #ifndef LINUX_MACROS
 #ifndef BIT
diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
index d94108629b..49d8a7cdd0 100644
--- a/drivers/net/i40e/base/meson.build
+++ b/drivers/net/i40e/base/meson.build
@@ -11,11 +11,10 @@ sources = [
         'i40e_nvm.c',
 ]
 
-error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
+error_cflags = ['-Wno-sign-compare',
         '-Wno-format', '-Wno-format-security',
         '-Wno-format-nonliteral',
-        '-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
-        '-Wno-unused-parameter',
+        '-Wno-strict-aliasing',
 ]
 c_args = cflags
 foreach flag: error_cflags
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2049c32c4e..44cb105bfa 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4547,6 +4547,7 @@ out:
 enum i40e_status_code
 i40e_allocate_dma_mem_d(__rte_unused struct i40e_hw *hw,
 			struct i40e_dma_mem *mem,
+			__rte_unused enum i40e_memory_type mtype,
 			u64 size,
 			u32 alignment)
 {
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.123611559 +0100
+++ 0006-net-i40e-base-fix-unused-value-warnings.patch	2025-06-12 22:06:23.794043032 +0100
@@ -1 +1 @@
-From 3c2125852742d46accc3f35f4fa683768ba25e09 Mon Sep 17 00:00:00 2001
+From 4cbf41d0b5741fc55568f26f93893d527d9113a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c2125852742d46accc3f35f4fa683768ba25e09 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,6 +18,6 @@
- drivers/net/intel/i40e/base/i40e_nvm.c   |  1 +
- drivers/net/intel/i40e/base/i40e_osdep.h |  4 ++--
- drivers/net/intel/i40e/base/i40e_type.h  | 14 +++++++++-----
- drivers/net/intel/i40e/base/meson.build  |  3 ---
- drivers/net/intel/i40e/i40e_ethdev.c     |  1 +
- 5 files changed, 13 insertions(+), 10 deletions(-)
+ drivers/net/i40e/base/i40e_nvm.c   |  1 +
+ drivers/net/i40e/base/i40e_osdep.h |  4 ++--
+ drivers/net/i40e/base/i40e_type.h  | 14 +++++++++-----
+ drivers/net/i40e/base/meson.build  |  5 ++---
+ drivers/net/i40e/i40e_ethdev.c     |  1 +
+ 5 files changed, 15 insertions(+), 10 deletions(-)
@@ -24,5 +25,5 @@
-diff --git a/drivers/net/intel/i40e/base/i40e_nvm.c b/drivers/net/intel/i40e/base/i40e_nvm.c
-index 3e16a0d997..00a207ca81 100644
---- a/drivers/net/intel/i40e/base/i40e_nvm.c
-+++ b/drivers/net/intel/i40e/base/i40e_nvm.c
-@@ -1748,6 +1748,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_event(struct i40e_hw *hw,
+diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
+index 05816a4b79..53bbaa1a12 100644
+--- a/drivers/net/i40e/base/i40e_nvm.c
++++ b/drivers/net/i40e/base/i40e_nvm.c
+@@ -1653,6 +1653,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_event(struct i40e_hw *hw,
@@ -36,5 +37,5 @@
-diff --git a/drivers/net/intel/i40e/base/i40e_osdep.h b/drivers/net/intel/i40e/base/i40e_osdep.h
-index c04f94732a..197f4678bf 100644
---- a/drivers/net/intel/i40e/base/i40e_osdep.h
-+++ b/drivers/net/intel/i40e/base/i40e_osdep.h
-@@ -184,8 +184,8 @@ struct __rte_packed_begin i40e_dma_mem {
+diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
+index 51537c5cf3..68fdb9bf80 100644
+--- a/drivers/net/i40e/base/i40e_osdep.h
++++ b/drivers/net/i40e/base/i40e_osdep.h
+@@ -184,8 +184,8 @@ struct i40e_dma_mem {
@@ -42 +43 @@
- } __rte_packed_end;
+ } __rte_packed;
@@ -50,5 +51,5 @@
- struct __rte_packed_begin i40e_virt_mem {
-diff --git a/drivers/net/intel/i40e/base/i40e_type.h b/drivers/net/intel/i40e/base/i40e_type.h
-index 7cc746f82f..968e1982a6 100644
---- a/drivers/net/intel/i40e/base/i40e_type.h
-+++ b/drivers/net/intel/i40e/base/i40e_type.h
+ struct i40e_virt_mem {
+diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
+index f4a3d66759..198d5f161f 100644
+--- a/drivers/net/i40e/base/i40e_type.h
++++ b/drivers/net/i40e/base/i40e_type.h
@@ -74,13 +75,15 @@
- #define BIT(a) (1UL << (a))
- #define BIT_ULL(a) (1ULL << (a))
-diff --git a/drivers/net/intel/i40e/base/meson.build b/drivers/net/intel/i40e/base/meson.build
-index a0912b1788..2648e5d0c4 100644
---- a/drivers/net/intel/i40e/base/meson.build
-+++ b/drivers/net/intel/i40e/base/meson.build
-@@ -13,10 +13,7 @@ sources = [
- 
- error_cflags = [
-         '-Wno-sign-compare',
--        '-Wno-unused-value',
-         '-Wno-strict-aliasing',
--        '-Wno-unused-but-set-variable',
+ #ifndef LINUX_MACROS
+ #ifndef BIT
+diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
+index d94108629b..49d8a7cdd0 100644
+--- a/drivers/net/i40e/base/meson.build
++++ b/drivers/net/i40e/base/meson.build
+@@ -11,11 +11,10 @@ sources = [
+         'i40e_nvm.c',
+ ]
+ 
+-error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
++error_cflags = ['-Wno-sign-compare',
+         '-Wno-format', '-Wno-format-security',
+         '-Wno-format-nonliteral',
+-        '-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
@@ -87,0 +91 @@
++        '-Wno-strict-aliasing',
@@ -91,5 +95,5 @@
-diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
-index 1c5ab35a8b..90eba3419f 100644
---- a/drivers/net/intel/i40e/i40e_ethdev.c
-+++ b/drivers/net/intel/i40e/i40e_ethdev.c
-@@ -4694,6 +4694,7 @@ out:
+diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
+index 2049c32c4e..44cb105bfa 100644
+--- a/drivers/net/i40e/i40e_ethdev.c
++++ b/drivers/net/i40e/i40e_ethdev.c
+@@ -4547,6 +4547,7 @@ out:

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/i40e/base: fix compiler warnings' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (4 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/i40e/base: fix unused value " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'acl: fix build with GCC 15 on aarch64' " luca.boccassi
                   ` (64 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/a7a9f42dddda1a325bedc3b47acfa000d026ce49

Thanks.

Luca Boccassi

---
From a7a9f42dddda1a325bedc3b47acfa000d026ce49 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:19 +0000
Subject: [PATCH] net/i40e/base: fix compiler warnings

[ upstream commit e0a9cb8b940b539b68acc7d8221f9aeec0f20a82 ]

Add a single-line fix to the base code, and then the remaining two
compiler warning disable flags can be removed from the driver base code
build file.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/i40e/base/i40e_diag.c |  2 +-
 drivers/net/i40e/base/meson.build | 14 +-------------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c
index 4ca102cdd5..71b2e53e85 100644
--- a/drivers/net/i40e/base/i40e_diag.c
+++ b/drivers/net/i40e/base/i40e_diag.c
@@ -34,7 +34,7 @@ static enum i40e_status_code i40e_diag_reg_pattern_test(struct i40e_hw *hw,
 {
 	const u32 patterns[] = {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};
 	u32 pat, val, orig_val;
-	int i;
+	unsigned int i;
 
 	orig_val = rd32(hw, reg);
 	for (i = 0; i < ARRAY_SIZE(patterns); i++) {
diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
index 49d8a7cdd0..766383101b 100644
--- a/drivers/net/i40e/base/meson.build
+++ b/drivers/net/i40e/base/meson.build
@@ -11,19 +11,7 @@ sources = [
         'i40e_nvm.c',
 ]
 
-error_cflags = ['-Wno-sign-compare',
-        '-Wno-format', '-Wno-format-security',
-        '-Wno-format-nonliteral',
-        '-Wno-strict-aliasing',
-]
-c_args = cflags
-foreach flag: error_cflags
-    if cc.has_argument(flag)
-        c_args += flag
-    endif
-endforeach
-
 base_lib = static_library('i40e_base', sources,
     dependencies: static_rte_eal,
-    c_args: c_args)
+    c_args: cflags)
 base_objs = base_lib.extract_all_objects(recursive: true)
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.166085775 +0100
+++ 0007-net-i40e-base-fix-compiler-warnings.patch	2025-06-12 22:06:23.794043032 +0100
@@ -1 +1 @@
-From e0a9cb8b940b539b68acc7d8221f9aeec0f20a82 Mon Sep 17 00:00:00 2001
+From a7a9f42dddda1a325bedc3b47acfa000d026ce49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e0a9cb8b940b539b68acc7d8221f9aeec0f20a82 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,3 +17,3 @@
- drivers/net/intel/i40e/base/i40e_diag.c |  2 +-
- drivers/net/intel/i40e/base/meson.build | 13 +------------
- 2 files changed, 2 insertions(+), 13 deletions(-)
+ drivers/net/i40e/base/i40e_diag.c |  2 +-
+ drivers/net/i40e/base/meson.build | 14 +-------------
+ 2 files changed, 2 insertions(+), 14 deletions(-)
@@ -20 +21 @@
-diff --git a/drivers/net/intel/i40e/base/i40e_diag.c b/drivers/net/intel/i40e/base/i40e_diag.c
+diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c
@@ -22,2 +23,2 @@
---- a/drivers/net/intel/i40e/base/i40e_diag.c
-+++ b/drivers/net/intel/i40e/base/i40e_diag.c
+--- a/drivers/net/i40e/base/i40e_diag.c
++++ b/drivers/net/i40e/base/i40e_diag.c
@@ -33,5 +34,5 @@
-diff --git a/drivers/net/intel/i40e/base/meson.build b/drivers/net/intel/i40e/base/meson.build
-index 2648e5d0c4..766383101b 100644
---- a/drivers/net/intel/i40e/base/meson.build
-+++ b/drivers/net/intel/i40e/base/meson.build
-@@ -11,18 +11,7 @@ sources = [
+diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
+index 49d8a7cdd0..766383101b 100644
+--- a/drivers/net/i40e/base/meson.build
++++ b/drivers/net/i40e/base/meson.build
+@@ -11,19 +11,7 @@ sources = [
@@ -41,2 +42,3 @@
--error_cflags = [
--        '-Wno-sign-compare',
+-error_cflags = ['-Wno-sign-compare',
+-        '-Wno-format', '-Wno-format-security',
+-        '-Wno-format-nonliteral',

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'acl: fix build with GCC 15 on aarch64' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (5 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/i40e/base: fix compiler " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'eal/linux: improve ASLR check' " luca.boccassi
                   ` (63 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: David Marchand; +Cc: Konstantin Ananyev, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/373738b2787fef6aa0a435955674218ecb2280a0

Thanks.

Luca Boccassi

---
From 373738b2787fef6aa0a435955674218ecb2280a0 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 26 Mar 2025 11:29:02 +0100
Subject: [PATCH] acl: fix build with GCC 15 on aarch64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 6cde8a3dda49ad2721ac15faedf1965cdb4980b0 ]

Caught in OBS for Fedora Rawhide on aarch64:

[  198s] In file included from ../lib/acl/acl_run_neon.h:7,
[  198s]                  from ../lib/acl/acl_run_neon.c:5:
[  198s] In function ‘alloc_completion’,
[  198s]     inlined from ‘acl_start_next_trie’ at
	../lib/acl/acl_run.h:140:24,
[  198s]     inlined from ‘search_neon_4.isra’ at
	../lib/acl/acl_run_neon.h:239:20:
[  198s] ../lib/acl/acl_run.h:93:25: error: ‘cmplt’ may be used
	uninitialized [-Werror=maybe-uninitialized]
[  198s]    93 |                 if (p[n].count == 0) {
[  198s]       |                     ~~~~^~~~~~
[  198s] ../lib/acl/acl_run_neon.h: In function ‘search_neon_4.isra’:
[  198s] ../lib/acl/acl_run_neon.h:230:27: note: ‘cmplt’ declared here
[  198s]   230 |         struct completion cmplt[4];
[  198s]       |                           ^~~~~

The code was resetting sequentially cmpl[].count at the exact index that
later call to alloc_completion uses.
While this code seems correct, GCC 15 does not understand this (probably
when applying some optimisations).

Instead, reset cmpl[].count all at once in acl_set_flow, and cleanup the
various vectorized implementations accordingly.

Bugzilla ID: 1678

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/acl/acl_run.h         | 5 +++++
 lib/acl/acl_run_altivec.h | 8 ++------
 lib/acl/acl_run_avx2.h    | 4 +---
 lib/acl/acl_run_neon.h    | 8 ++------
 lib/acl/acl_run_scalar.c  | 4 +---
 lib/acl/acl_run_sse.h     | 8 ++------
 6 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/lib/acl/acl_run.h b/lib/acl/acl_run.h
index 7d215de9d6..533f233f68 100644
--- a/lib/acl/acl_run.h
+++ b/lib/acl/acl_run.h
@@ -176,6 +176,8 @@ acl_set_flow(struct acl_flow_data *flows, struct completion *cmplt,
 	uint32_t cmplt_size, const uint8_t **data, uint32_t *results,
 	uint32_t data_num, uint32_t categories, const uint64_t *trans)
 {
+	unsigned int i;
+
 	flows->num_packets = 0;
 	flows->started = 0;
 	flows->trie = 0;
@@ -187,6 +189,9 @@ acl_set_flow(struct acl_flow_data *flows, struct completion *cmplt,
 	flows->data = data;
 	flows->results = results;
 	flows->trans = trans;
+
+	for (i = 0; i < cmplt_size; i++)
+		cmplt[i].count = 0;
 }
 
 typedef void (*resolve_priority_t)
diff --git a/lib/acl/acl_run_altivec.h b/lib/acl/acl_run_altivec.h
index 4556e1503b..bcf62ee084 100644
--- a/lib/acl/acl_run_altivec.h
+++ b/lib/acl/acl_run_altivec.h
@@ -197,10 +197,8 @@ search_altivec_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
 		total_packets, categories, ctx->trans_table);
 
-	for (n = 0; n < MAX_SEARCHES_ALTIVEC8; n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < MAX_SEARCHES_ALTIVEC8; n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	 /* Check for any matches. */
 	acl_match_check_x4(0, ctx, parms, &flows, (uint64_t *)&index_array[0]);
@@ -268,10 +266,8 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
 		total_packets, categories, ctx->trans_table);
 
-	for (n = 0; n < MAX_SEARCHES_ALTIVEC4; n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < MAX_SEARCHES_ALTIVEC4; n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	/* Check for any matches. */
 	acl_match_check_x4(0, ctx, parms, &flows, index_array);
diff --git a/lib/acl/acl_run_avx2.h b/lib/acl/acl_run_avx2.h
index 0b8967f22e..e069fb85b2 100644
--- a/lib/acl/acl_run_avx2.h
+++ b/lib/acl/acl_run_avx2.h
@@ -171,10 +171,8 @@ search_avx2x16(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
 		total_packets, categories, ctx->trans_table);
 
-	for (n = 0; n < RTE_DIM(cmplt); n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < RTE_DIM(cmplt); n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	t0 = _mm256_set_epi64x(index_array[5], index_array[4],
 		index_array[1], index_array[0]);
diff --git a/lib/acl/acl_run_neon.h b/lib/acl/acl_run_neon.h
index 69d1b6d9e1..e31d56e7d0 100644
--- a/lib/acl/acl_run_neon.h
+++ b/lib/acl/acl_run_neon.h
@@ -170,10 +170,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
 		     total_packets, categories, ctx->trans_table);
 
-	for (n = 0; n < 8; n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < 8; n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	 /* Check for any matches. */
 	acl_match_check_x4(0, ctx, parms, &flows, &index_array[0]);
@@ -232,10 +230,8 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
 		     total_packets, categories, ctx->trans_table);
 
-	for (n = 0; n < 4; n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < 4; n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	/* Check for any matches. */
 	acl_match_check_x4(0, ctx, parms, &flows, index_array);
diff --git a/lib/acl/acl_run_scalar.c b/lib/acl/acl_run_scalar.c
index 3d61e79409..a3661b1b6b 100644
--- a/lib/acl/acl_run_scalar.c
+++ b/lib/acl/acl_run_scalar.c
@@ -121,10 +121,8 @@ rte_acl_classify_scalar(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results, num,
 		categories, ctx->trans_table);
 
-	for (n = 0; n < MAX_SEARCHES_SCALAR; n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < MAX_SEARCHES_SCALAR; n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	transition0 = index_array[0];
 	transition1 = index_array[1];
diff --git a/lib/acl/acl_run_sse.h b/lib/acl/acl_run_sse.h
index 93286a2c38..4ec819a215 100644
--- a/lib/acl/acl_run_sse.h
+++ b/lib/acl/acl_run_sse.h
@@ -205,10 +205,8 @@ search_sse_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
 		total_packets, categories, ctx->trans_table);
 
-	for (n = 0; n < MAX_SEARCHES_SSE8; n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < MAX_SEARCHES_SSE8; n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	/*
 	 * indices1 contains index_array[0,1]
@@ -293,10 +291,8 @@ search_sse_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
 		total_packets, categories, ctx->trans_table);
 
-	for (n = 0; n < MAX_SEARCHES_SSE4; n++) {
-		cmplt[n].count = 0;
+	for (n = 0; n < MAX_SEARCHES_SSE4; n++)
 		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
-	}
 
 	indices1 = _mm_loadu_si128((xmm_t *) &index_array[0]);
 	indices2 = _mm_loadu_si128((xmm_t *) &index_array[2]);
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.200349928 +0100
+++ 0008-acl-fix-build-with-GCC-15-on-aarch64.patch	2025-06-12 22:06:23.794043032 +0100
@@ -1 +1 @@
-From 6cde8a3dda49ad2721ac15faedf1965cdb4980b0 Mon Sep 17 00:00:00 2001
+From 373738b2787fef6aa0a435955674218ecb2280a0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6cde8a3dda49ad2721ac15faedf1965cdb4980b0 ]
+
@@ -36 +37,0 @@
-Cc: stable@dpdk.org
@@ -52 +53 @@
-index 7f092413cd..9fd3e60021 100644
+index 7d215de9d6..533f233f68 100644
@@ -75 +76 @@
-index 2d398ffded..d5ccdb94f0 100644
+index 4556e1503b..bcf62ee084 100644
@@ -78 +79 @@
-@@ -199,10 +199,8 @@ search_altivec_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -197,10 +197,8 @@ search_altivec_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -90 +91 @@
-@@ -270,10 +268,8 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -268,10 +266,8 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -119 +120 @@
-index 63074f871d..3b9bd0cc39 100644
+index 69d1b6d9e1..e31d56e7d0 100644
@@ -122 +123 @@
-@@ -172,10 +172,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -170,10 +170,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -134 +135 @@
-@@ -234,10 +232,8 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -232,10 +230,8 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -147 +148 @@
-index 8ffb40776c..32ebe3119b 100644
+index 3d61e79409..a3661b1b6b 100644
@@ -150 +151 @@
-@@ -124,10 +124,8 @@ rte_acl_classify_scalar(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -121,10 +121,8 @@ rte_acl_classify_scalar(const struct rte_acl_ctx *ctx, const uint8_t **data,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'eal/linux: improve ASLR check' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (6 preceding siblings ...)
  2025-06-12 21:06 ` patch 'acl: fix build with GCC 15 on aarch64' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/e1000: fix xstats name' " luca.boccassi
                   ` (62 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Yang Ming; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/8018291e554d7be93deca317cd0eaaaa2dccbb85

Thanks.

Luca Boccassi

---
From 8018291e554d7be93deca317cd0eaaaa2dccbb85 Mon Sep 17 00:00:00 2001
From: Yang Ming <ming.1.yang@nokia-sbell.com>
Date: Thu, 13 Mar 2025 14:19:03 +0800
Subject: [PATCH] eal/linux: improve ASLR check

[ upstream commit dcf9f9363aa9b4163d241caf8b26a84ca0c0006b ]

This change ensures that the current process is checked for
being run with 'setarch' before verifying the value of
'/proc/sys/kernel/randomize_va_space'. The '-R' or
'--addr-no-randomize' parameter of the 'setarch' command is used
to disable the randomization of the virtual address space.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Yang Ming <ming.1.yang@nokia-sbell.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/eal/linux/eal_memory.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 077f77d406..ffdb836b7e 100644
--- a/lib/eal/linux/eal_memory.c
+++ b/lib/eal/linux/eal_memory.c
@@ -15,6 +15,7 @@
 #include <sys/stat.h>
 #include <sys/file.h>
 #include <sys/resource.h>
+#include <sys/personality.h>
 #include <unistd.h>
 #include <limits.h>
 #include <signal.h>
@@ -200,6 +201,17 @@ static int
 aslr_enabled(void)
 {
 	char c;
+
+	/*
+	 * Check whether the current process is executed with the command line
+	 * "setarch ... --addr-no-randomize ..." or "setarch ... -R ..."
+	 * This complements the sysfs check to ensure comprehensive ASLR status detection.
+	 * This check is necessary to support the functionality of the "setarch" command,
+	 * which can disable ASLR by setting the ADDR_NO_RANDOMIZE personality flag.
+	 */
+	if ((personality(0xffffffff) & ADDR_NO_RANDOMIZE) == ADDR_NO_RANDOMIZE)
+		return 0;
+
 	int retval, fd = open(RANDOMIZE_VA_SPACE_FILE, O_RDONLY);
 	if (fd < 0)
 		return -errno;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.235698259 +0100
+++ 0009-eal-linux-improve-ASLR-check.patch	2025-06-12 22:06:23.794043032 +0100
@@ -1 +1 @@
-From dcf9f9363aa9b4163d241caf8b26a84ca0c0006b Mon Sep 17 00:00:00 2001
+From 8018291e554d7be93deca317cd0eaaaa2dccbb85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dcf9f9363aa9b4163d241caf8b26a84ca0c0006b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 8c896379fe..7f03bb517b 100644
+index 077f77d406..ffdb836b7e 100644
@@ -33 +34 @@
-@@ -203,6 +204,17 @@ static int
+@@ -200,6 +201,17 @@ static int

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/e1000: fix xstats name' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (7 preceding siblings ...)
  2025-06-12 21:06 ` patch 'eal/linux: improve ASLR check' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/e1000: fix EEPROM dump' " luca.boccassi
                   ` (61 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/1a540ead0c9131b2412369634bb4c9b5b2203ee5

Thanks.

Luca Boccassi

---
From 1a540ead0c9131b2412369634bb4c9b5b2203ee5 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 10 Apr 2025 13:52:46 +0800
Subject: [PATCH] net/e1000: fix xstats name

[ upstream commit 9303834c26ec7b3fb91f84d2c953ce4dae3073fb ]

The igb and igc xstats names need to be corrected:
tx_size_1023_to_max_packets should be tx_size_1024_to_max_packets.

Fixes: 38552317dcef ("igb: add extended stats")
Fixes: e6defdfddc3b ("net/igc: enable statistics")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 2 +-
 drivers/net/igc/igc_ethdev.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 79d001e69a..b5df7473cd 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -479,7 +479,7 @@ static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = {
 	{"tx_size_256_to_511_packets", offsetof(struct e1000_hw_stats, ptc511)},
 	{"tx_size_512_to_1023_packets", offsetof(struct e1000_hw_stats,
 		ptc1023)},
-	{"tx_size_1023_to_max_packets", offsetof(struct e1000_hw_stats,
+	{"tx_size_1024_to_max_packets", offsetof(struct e1000_hw_stats,
 		ptc1522)},
 	{"tx_multicast_packets", offsetof(struct e1000_hw_stats, mptc)},
 	{"tx_broadcast_packets", offsetof(struct e1000_hw_stats, bptc)},
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index ce1f425eaf..9c00f8a5f6 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -163,7 +163,7 @@ static const struct rte_igc_xstats_name_off rte_igc_stats_strings[] = {
 	{"tx_size_256_to_511_packets", offsetof(struct igc_hw_stats, ptc511)},
 	{"tx_size_512_to_1023_packets", offsetof(struct igc_hw_stats,
 		ptc1023)},
-	{"tx_size_1023_to_max_packets", offsetof(struct igc_hw_stats,
+	{"tx_size_1024_to_max_packets", offsetof(struct igc_hw_stats,
 		ptc1522)},
 	{"tx_multicast_packets", offsetof(struct igc_hw_stats, mptc)},
 	{"tx_broadcast_packets", offsetof(struct igc_hw_stats, bptc)},
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.269753345 +0100
+++ 0010-net-e1000-fix-xstats-name.patch	2025-06-12 22:06:23.798043117 +0100
@@ -1 +1 @@
-From 9303834c26ec7b3fb91f84d2c953ce4dae3073fb Mon Sep 17 00:00:00 2001
+From 1a540ead0c9131b2412369634bb4c9b5b2203ee5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9303834c26ec7b3fb91f84d2c953ce4dae3073fb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- drivers/net/intel/e1000/igb_ethdev.c | 2 +-
- drivers/net/intel/e1000/igc_ethdev.c | 2 +-
+ drivers/net/e1000/igb_ethdev.c | 2 +-
+ drivers/net/igc/igc_ethdev.c   | 2 +-
@@ -20,5 +21,5 @@
-diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
-index cbd2f15f5f..40f453c8d9 100644
---- a/drivers/net/intel/e1000/igb_ethdev.c
-+++ b/drivers/net/intel/e1000/igb_ethdev.c
-@@ -486,7 +486,7 @@ static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = {
+diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
+index 79d001e69a..b5df7473cd 100644
+--- a/drivers/net/e1000/igb_ethdev.c
++++ b/drivers/net/e1000/igb_ethdev.c
+@@ -479,7 +479,7 @@ static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = {
@@ -33,7 +34,7 @@
-diff --git a/drivers/net/intel/e1000/igc_ethdev.c b/drivers/net/intel/e1000/igc_ethdev.c
-index e712cfcf7c..68444e4fba 100644
---- a/drivers/net/intel/e1000/igc_ethdev.c
-+++ b/drivers/net/intel/e1000/igc_ethdev.c
-@@ -181,7 +181,7 @@ static const struct rte_igc_xstats_name_off rte_igc_stats_strings[] = {
- 	{"tx_size_256_to_511_packets", offsetof(struct e1000_hw_stats, ptc511)},
- 	{"tx_size_512_to_1023_packets", offsetof(struct e1000_hw_stats,
+diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
+index ce1f425eaf..9c00f8a5f6 100644
+--- a/drivers/net/igc/igc_ethdev.c
++++ b/drivers/net/igc/igc_ethdev.c
+@@ -163,7 +163,7 @@ static const struct rte_igc_xstats_name_off rte_igc_stats_strings[] = {
+ 	{"tx_size_256_to_511_packets", offsetof(struct igc_hw_stats, ptc511)},
+ 	{"tx_size_512_to_1023_packets", offsetof(struct igc_hw_stats,
@@ -41,2 +42,2 @@
--	{"tx_size_1023_to_max_packets", offsetof(struct e1000_hw_stats,
-+	{"tx_size_1024_to_max_packets", offsetof(struct e1000_hw_stats,
+-	{"tx_size_1023_to_max_packets", offsetof(struct igc_hw_stats,
++	{"tx_size_1024_to_max_packets", offsetof(struct igc_hw_stats,
@@ -44,2 +45,2 @@
- 	{"tx_multicast_packets", offsetof(struct e1000_hw_stats, mptc)},
- 	{"tx_broadcast_packets", offsetof(struct e1000_hw_stats, bptc)},
+ 	{"tx_multicast_packets", offsetof(struct igc_hw_stats, mptc)},
+ 	{"tx_broadcast_packets", offsetof(struct igc_hw_stats, bptc)},

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/e1000: fix EEPROM dump' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (8 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/e1000: fix xstats name' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/ixgbe: fix port mask default value in filter' " luca.boccassi
                   ` (60 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/9d5f84abd670d5c047d78dd7685b65174d05d6a7

Thanks.

Luca Boccassi

---
From 9d5f84abd670d5c047d78dd7685b65174d05d6a7 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Tue, 15 Apr 2025 15:48:02 +0800
Subject: [PATCH] net/e1000: fix EEPROM dump

[ upstream commit b3855b93dcc890f40dce3b688f5a331dcd8d14e8 ]

There is a incorrect comparison in get_eeprom that cause EEPROM dump
fail. Allow valid case when "first + offset == word_size".

Fixes: 83c314da4c38 ("igb: add access to specific device info")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index b5df7473cd..19ae64af13 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5149,7 +5149,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
 	first = in_eeprom->offset >> 1;
 	length = in_eeprom->length >> 1;
 	if ((first >= hw->nvm.word_size) ||
-	    ((first + length) >= hw->nvm.word_size))
+	    ((first + length) > hw->nvm.word_size))
 		return -EINVAL;
 
 	in_eeprom->magic = hw->vendor_id |
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.308275045 +0100
+++ 0011-net-e1000-fix-EEPROM-dump.patch	2025-06-12 22:06:23.802043202 +0100
@@ -1 +1 @@
-From b3855b93dcc890f40dce3b688f5a331dcd8d14e8 Mon Sep 17 00:00:00 2001
+From 9d5f84abd670d5c047d78dd7685b65174d05d6a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3855b93dcc890f40dce3b688f5a331dcd8d14e8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/net/intel/e1000/igb_ethdev.c | 2 +-
+ drivers/net/e1000/igb_ethdev.c | 2 +-
@@ -18,5 +19,5 @@
-diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
-index 40f453c8d9..cb892fbf91 100644
---- a/drivers/net/intel/e1000/igb_ethdev.c
-+++ b/drivers/net/intel/e1000/igb_ethdev.c
-@@ -5219,7 +5219,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
+diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
+index b5df7473cd..19ae64af13 100644
+--- a/drivers/net/e1000/igb_ethdev.c
++++ b/drivers/net/e1000/igb_ethdev.c
+@@ -5149,7 +5149,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/ixgbe: fix port mask default value in filter' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (9 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/e1000: fix EEPROM dump' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/e1000: fix igb Tx queue offloads capability' " luca.boccassi
                   ` (59 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Hailin Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/c4ff0f8a4b0f778aed8698dda42c32bd8e42052b

Thanks.

Luca Boccassi

---
From c4ff0f8a4b0f778aed8698dda42c32bd8e42052b Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Fri, 18 Apr 2025 15:43:09 +0800
Subject: [PATCH] net/ixgbe: fix port mask default value in filter

[ upstream commit c81daae2383ac655fe503e7da4767959ccc38ab7 ]

The fdir filter should mask L4 protocol in order to process raw IP
packets.  However, the initial value of port mask is 0xFF and the filter
will not process raw IP packets if the flow rule does not change it.

Fixed by setting the default value to 0.

Fixes: 444505f933f1 ("net/ixgbe: fix IPv6 mask in flow director")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Tested-by: Hailin Xu <hailinx.xu@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 7cccbfddb3..ed57f14cc1 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -1645,6 +1645,8 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
 	memset(&rule->mask, 0xFF, sizeof(struct ixgbe_hw_fdir_mask));
 	rule->mask.vlan_tci_mask = 0;
 	rule->mask.flex_bytes_mask = 0;
+	rule->mask.dst_port_mask = 0;
+	rule->mask.src_port_mask = 0;
 
 	/**
 	 * The first not void item should be
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.343660325 +0100
+++ 0012-net-ixgbe-fix-port-mask-default-value-in-filter.patch	2025-06-12 22:06:23.802043202 +0100
@@ -1 +1 @@
-From c81daae2383ac655fe503e7da4767959ccc38ab7 Mon Sep 17 00:00:00 2001
+From c4ff0f8a4b0f778aed8698dda42c32bd8e42052b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c81daae2383ac655fe503e7da4767959ccc38ab7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- drivers/net/intel/ixgbe/ixgbe_flow.c | 2 ++
+ drivers/net/ixgbe/ixgbe_flow.c | 2 ++
@@ -21,5 +22,5 @@
-diff --git a/drivers/net/intel/ixgbe/ixgbe_flow.c b/drivers/net/intel/ixgbe/ixgbe_flow.c
-index 33da2f47ec..1e3804bb15 100644
---- a/drivers/net/intel/ixgbe/ixgbe_flow.c
-+++ b/drivers/net/intel/ixgbe/ixgbe_flow.c
-@@ -1644,6 +1644,8 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
+diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
+index 7cccbfddb3..ed57f14cc1 100644
+--- a/drivers/net/ixgbe/ixgbe_flow.c
++++ b/drivers/net/ixgbe/ixgbe_flow.c
+@@ -1645,6 +1645,8 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/e1000: fix igb Tx queue offloads capability' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (10 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/ixgbe: fix port mask default value in filter' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'vhost/crypto: fix cipher data length' " luca.boccassi
                   ` (58 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/15a91444a347493fbdd020278af227d8d43a786b

Thanks.

Luca Boccassi

---
From 15a91444a347493fbdd020278af227d8d43a786b Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Mon, 14 Apr 2025 16:53:52 +0800
Subject: [PATCH] net/e1000: fix igb Tx queue offloads capability

[ upstream commit c2a1b38d779d8aed009e7f285ae95988bf9661da ]

The igb driver incorrectly assigns the tx port offload capability to the
tx queue offload capability. Return zero, for no queue-specific
capabilities instead.

Fixes: daa3b0833f08 ("net/e1000: fix Tx offload capability typos")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/e1000/igb_rxtx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 6027cfbfb1..cc55b2b4ea 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1472,11 +1472,9 @@ igb_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
 uint64_t
 igb_get_tx_queue_offloads_capa(struct rte_eth_dev *dev)
 {
-	uint64_t tx_queue_offload_capa;
+	RTE_SET_USED(dev);
 
-	tx_queue_offload_capa = igb_get_tx_port_offloads_capa(dev);
-
-	return tx_queue_offload_capa;
+	return 0;
 }
 
 int
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.379532629 +0100
+++ 0013-net-e1000-fix-igb-Tx-queue-offloads-capability.patch	2025-06-12 22:06:23.802043202 +0100
@@ -1 +1 @@
-From c2a1b38d779d8aed009e7f285ae95988bf9661da Mon Sep 17 00:00:00 2001
+From 15a91444a347493fbdd020278af227d8d43a786b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c2a1b38d779d8aed009e7f285ae95988bf9661da ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- drivers/net/intel/e1000/igb_rxtx.c | 6 ++----
+ drivers/net/e1000/igb_rxtx.c | 6 ++----
@@ -19,5 +20,5 @@
-diff --git a/drivers/net/intel/e1000/igb_rxtx.c b/drivers/net/intel/e1000/igb_rxtx.c
-index 4276bb6d31..b63de2354f 100644
---- a/drivers/net/intel/e1000/igb_rxtx.c
-+++ b/drivers/net/intel/e1000/igb_rxtx.c
-@@ -1490,11 +1490,9 @@ igb_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
+diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
+index 6027cfbfb1..cc55b2b4ea 100644
+--- a/drivers/net/e1000/igb_rxtx.c
++++ b/drivers/net/e1000/igb_rxtx.c
+@@ -1472,11 +1472,9 @@ igb_get_tx_port_offloads_capa(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'vhost/crypto: fix cipher data length' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (11 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/e1000: fix igb Tx queue offloads capability' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'crypto/virtio: fix cipher data source " luca.boccassi
                   ` (57 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Rajesh Mudimadugula; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/3e45160789b860effad32a47666d159c4a599c13

Thanks.

Luca Boccassi

---
From 3e45160789b860effad32a47666d159c4a599c13 Mon Sep 17 00:00:00 2001
From: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Date: Thu, 3 Apr 2025 12:22:34 +0000
Subject: [PATCH] vhost/crypto: fix cipher data length

[ upstream commit 7ccd67c4185e1f4f0b975ff954e8685252bc3a18 ]

This patch fixes cipher data length, in the event of algorithm
chaining. When enqueuing crypto op to vhost backend
cipher.data.length is set correctly which is in
virtqueue_crypto_sym_pkt_header_arrange(). This field is computed
and assigned wrongly instead of using passed value. This is
rectified and using correct cipher data length in vhost crypto.

Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")

Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/vhost/vhost_crypto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index bd69d3b46e..198a01aabb 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -1098,8 +1098,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 	op->sess_type = RTE_CRYPTO_OP_WITH_SESSION;
 
 	op->sym->cipher.data.offset = chain->para.cipher_start_src_offset;
-	op->sym->cipher.data.length = chain->para.src_data_len -
-			chain->para.cipher_start_src_offset;
+	op->sym->cipher.data.length = chain->para.len_to_cipher;
 
 	op->sym->auth.data.offset = chain->para.hash_start_src_offset;
 	op->sym->auth.data.length = chain->para.len_to_hash;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.413592735 +0100
+++ 0014-vhost-crypto-fix-cipher-data-length.patch	2025-06-12 22:06:23.806043286 +0100
@@ -1 +1 @@
-From 7ccd67c4185e1f4f0b975ff954e8685252bc3a18 Mon Sep 17 00:00:00 2001
+From 3e45160789b860effad32a47666d159c4a599c13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7ccd67c4185e1f4f0b975ff954e8685252bc3a18 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f78daf98d1..29c9cb613d 100644
+index bd69d3b46e..198a01aabb 100644
@@ -26 +27 @@
-@@ -1359,8 +1359,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
+@@ -1098,8 +1098,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'crypto/virtio: fix cipher data source length' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (12 preceding siblings ...)
  2025-06-12 21:06 ` patch 'vhost/crypto: fix cipher data length' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'app/crypto-perf: fix AAD offset alignment' " luca.boccassi
                   ` (56 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Rajesh Mudimadugula; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/c468e5df1c05e5923ec00aa8f9fb447df4afd959

Thanks.

Luca Boccassi

---
From c468e5df1c05e5923ec00aa8f9fb447df4afd959 Mon Sep 17 00:00:00 2001
From: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Date: Thu, 3 Apr 2025 12:26:03 +0000
Subject: [PATCH] crypto/virtio: fix cipher data source length

[ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ]

In symmetric algorithm chaining, we need to consider both
cipher and auth data length for cipher source.

Fixes: 82adb12a1fce ("crypto/virtio: support burst enqueue/dequeue")

Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/virtio/virtio_rxtx.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index d02486661f..01977c7ec4 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange(
 		req_data->u.sym_req.u.chain.para.aad_len = session->aad.length;
 
 		req_data->u.sym_req.u.chain.para.src_data_len =
-			(sym_op->cipher.data.length +
-				sym_op->cipher.data.offset);
+			RTE_MAX((sym_op->cipher.data.length +
+				 sym_op->cipher.data.offset),
+				(sym_op->auth.data.length +
+				 sym_op->auth.data.offset));
 		req_data->u.sym_req.u.chain.para.dst_data_len =
 			req_data->u.sym_req.u.chain.para.src_data_len;
 		req_data->u.sym_req.u.chain.para.cipher_start_src_offset =
@@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit(
 	uint32_t hash_result_len = 0;
 	struct virtio_crypto_op_cookie *crypto_op_cookie;
 	struct virtio_crypto_alg_chain_session_para *para;
+	uint32_t src_len;
 
 	if (unlikely(sym_op->m_src->nb_segs != 1))
 		return -EMSGSIZE;
@@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit(
 		desc[idx++].flags = VRING_DESC_F_NEXT;
 	}
 
+	src_len = RTE_MAX((sym_op->cipher.data.offset +
+			   sym_op->cipher.data.length),
+			  (sym_op->auth.data.length +
+			   sym_op->auth.data.offset));
 	/* indirect vring: src data */
 	desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
-	desc[idx].len = (sym_op->cipher.data.offset
-		+ sym_op->cipher.data.length);
+	desc[idx].len = src_len;
 	desc[idx++].flags = VRING_DESC_F_NEXT;
 
 	/* indirect vring: dst data */
 	if (sym_op->m_dst) {
 		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_dst, 0);
-		desc[idx].len = (sym_op->cipher.data.offset
-			+ sym_op->cipher.data.length);
+		desc[idx].len = src_len;
 	} else {
 		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
-		desc[idx].len = (sym_op->cipher.data.offset
-			+ sym_op->cipher.data.length);
+		desc[idx].len = src_len;
 	}
 	desc[idx++].flags = VRING_DESC_F_WRITE | VRING_DESC_F_NEXT;
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.457060847 +0100
+++ 0015-crypto-virtio-fix-cipher-data-source-length.patch	2025-06-12 22:06:23.806043286 +0100
@@ -1 +1 @@
-From fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 Mon Sep 17 00:00:00 2001
+From c468e5df1c05e5923ec00aa8f9fb447df4afd959 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0cc904485c..a7f1bd9753 100644
+index d02486661f..01977c7ec4 100644
@@ -22 +23 @@
-@@ -243,8 +243,10 @@ virtqueue_crypto_sym_pkt_header_arrange(
+@@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange(
@@ -35 +36 @@
-@@ -298,6 +300,7 @@ virtqueue_crypto_sym_enqueue_xmit_split(
+@@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit(
@@ -43 +44 @@
-@@ -371,21 +374,22 @@ virtqueue_crypto_sym_enqueue_xmit_split(
+@@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit(

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'app/crypto-perf: fix AAD offset alignment' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (13 preceding siblings ...)
  2025-06-12 21:06 ` patch 'crypto/virtio: fix cipher data source " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' " luca.boccassi
                   ` (55 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Shani Peretz; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/f6a0e5020282eb283fab3dfe5b6a8d642d2c7807

Thanks.

Luca Boccassi

---
From f6a0e5020282eb283fab3dfe5b6a8d642d2c7807 Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz@nvidia.com>
Date: Tue, 11 Mar 2025 11:01:21 +0200
Subject: [PATCH] app/crypto-perf: fix AAD offset alignment

[ upstream commit 7c52aea4e68e0cacc7e41ff08fcddbd513ad7e0a ]

AAD offset in AES-GCM crypto test was calculated by adding
16-byte alignment after the IV, which is only needed in AES-CCM.

The patch correct the AAD offset calculation in AES-GCM algorithm tests.

Fixes: 0b242422d385 ("app/crypto-perf: set AAD after the crypto operation")

Signed-off-by: Shani Peretz <shperetz@nvidia.com>
---
 app/test-crypto-perf/cperf_ops.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 6bbab3289e..c655101ac7 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -535,7 +535,9 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,
 	uint16_t i;
 	/* AAD is placed after the IV */
 	uint16_t aad_offset = iv_offset +
-			RTE_ALIGN_CEIL(test_vector->aead_iv.length, 16);
+			((options->aead_algo == RTE_CRYPTO_AEAD_AES_CCM) ?
+			RTE_ALIGN_CEIL(test_vector->aead_iv.length, 16) :
+			test_vector->aead_iv.length);
 
 	for (i = 0; i < nb_ops; i++) {
 		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.490831274 +0100
+++ 0016-app-crypto-perf-fix-AAD-offset-alignment.patch	2025-06-12 22:06:23.806043286 +0100
@@ -1 +1 @@
-From 7c52aea4e68e0cacc7e41ff08fcddbd513ad7e0a Mon Sep 17 00:00:00 2001
+From f6a0e5020282eb283fab3dfe5b6a8d642d2c7807 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c52aea4e68e0cacc7e41ff08fcddbd513ad7e0a ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 37d06f1dea..47965bbc32 100644
+index 6bbab3289e..c655101ac7 100644
@@ -23 +24 @@
-@@ -722,7 +722,9 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,
+@@ -535,7 +535,9 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (14 preceding siblings ...)
  2025-06-12 21:06 ` patch 'app/crypto-perf: fix AAD offset alignment' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' " luca.boccassi
                   ` (54 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Arkadiusz Kusztal; +Cc: Brian Dooley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/ba810fcd7b21623f285ec3d519e89b8c74b8ecac

Thanks.

Luca Boccassi

---
From ba810fcd7b21623f285ec3d519e89b8c74b8ecac Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 20 Mar 2025 16:57:02 +0000
Subject: [PATCH] crypto/qat: fix out-of-place header bytes in AEAD raw API

[ upstream commit 06597aaac85638eaa92b66f341185cd0ba39aca6 ]

This commit fixes a problem with overwriting data in the OOP header
in RAW API crypto processing when using AEAD algorithms.

Fixes: 85fec6fd9674 ("crypto/qat: unify raw data path functions")

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 | 134 +++++++++++++++++++
 drivers/crypto/qat/dev/qat_sym_pmd_gen1.c    |  13 +-
 2 files changed, 142 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 266ab74a01..739649e793 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -6,9 +6,12 @@
 #define _QAT_CRYPTO_PMD_GENS_H_
 
 #include <rte_cryptodev.h>
+#include <rte_common.h>
+#include <rte_branch_prediction.h>
 #include "qat_crypto.h"
 #include "qat_sym_session.h"
 #include "qat_sym.h"
+#include "icp_qat_fw_la.h"
 
 #define QAT_SYM_DP_GET_MAX_ENQ(q, c, n) \
 	RTE_MIN((q->max_inflights - q->enqueued + q->dequeued - c), n)
@@ -127,6 +130,137 @@ qat_cipher_is_len_in_bits(struct qat_sym_session *ctx,
 	return 0;
 }
 
+static inline
+uint32_t qat_reqs_mid_set(int *error, struct icp_qat_fw_la_bulk_req *const req,
+	struct qat_sym_op_cookie *const cookie, const void *const opaque,
+	const struct rte_crypto_sgl *sgl_src, const struct rte_crypto_sgl *sgl_dst,
+	const union rte_crypto_sym_ofs ofs)
+{
+	uint32_t src_tot_length = 0; /* Returned value */
+	uint32_t dst_tot_length = 0; /* Used only for input validity checks */
+	uint32_t src_length = 0;
+	uint32_t dst_length = 0;
+	uint64_t src_data_addr = 0;
+	uint64_t dst_data_addr = 0;
+	const struct rte_crypto_vec * const vec_src = sgl_src->vec;
+	const struct rte_crypto_vec * const vec_dst = sgl_dst->vec;
+	const uint32_t n_src = sgl_src->num;
+	const uint32_t n_dst = sgl_dst->num;
+	const uint16_t offset = RTE_MAX(ofs.ofs.cipher.head, ofs.ofs.auth.head);
+	const uint8_t is_flat = !(n_src > 1 || n_dst > 1); /* Flat buffer or the SGL */
+	const uint8_t is_in_place = !n_dst; /* In-place or out-of-place */
+
+	*error = 0;
+	if (unlikely((n_src < 1 || n_src > QAT_SYM_SGL_MAX_NUMBER) ||
+			n_dst > QAT_SYM_SGL_MAX_NUMBER)) {
+		QAT_LOG(DEBUG,
+			"Invalid number of sgls, source no: %u, dst no: %u, opaque: %p",
+			n_src, n_dst, opaque);
+		*error = -1;
+		return 0;
+	}
+
+	/* --- Flat buffer --- */
+	if (is_flat) {
+		src_data_addr = vec_src->iova;
+		dst_data_addr = vec_src->iova;
+		src_length = vec_src->len;
+		dst_length = vec_src->len;
+
+		if (is_in_place)
+			goto done;
+		/* Out-of-place
+		 * If OOP, we need to keep in mind that offset needs to
+		 * start where the aead starts
+		 */
+		dst_length = vec_dst->len;
+		/* Integer promotion here, but it does not bother this time */
+		if (unlikely(offset > src_length || offset > dst_length)) {
+			QAT_LOG(DEBUG,
+				"Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+				src_length, dst_length, opaque);
+			*error = -1;
+			return 0;
+		}
+		src_data_addr += offset;
+		dst_data_addr = vec_dst->iova + offset;
+		src_length -= offset;
+		dst_length -= offset;
+		src_tot_length = src_length;
+		dst_tot_length = dst_length;
+		goto check;
+	}
+
+	/* --- Scatter-gather list --- */
+	struct qat_sgl * const qat_sgl_src = (struct qat_sgl *)&cookie->qat_sgl_src;
+	uint16_t i;
+
+	ICP_QAT_FW_COMN_PTR_TYPE_SET(req->comn_hdr.comn_req_flags,
+		QAT_COMN_PTR_TYPE_SGL);
+	qat_sgl_src->num_bufs = n_src;
+	src_data_addr = cookie->qat_sgl_src_phys_addr;
+	/* Fill all the source buffers but the first one */
+	for (i = 1; i < n_src; i++) {
+		qat_sgl_src->buffers[i].len = (vec_src + i)->len;
+		qat_sgl_src->buffers[i].addr = (vec_src + i)->iova;
+		src_tot_length += qat_sgl_src->buffers[i].len;
+	}
+
+	if (is_in_place) {
+		/* SGL source first entry, no OOP */
+		qat_sgl_src->buffers[0].len = vec_src->len;
+		qat_sgl_src->buffers[0].addr = vec_src->iova;
+		dst_data_addr = src_data_addr;
+		goto done;
+	}
+	/* Out-of-place */
+	struct qat_sgl * const qat_sgl_dst =
+			(struct qat_sgl *)&cookie->qat_sgl_dst;
+	/*
+	 * Offset reaching outside of the first buffer is not supported (RAW api).
+	 * Integer promotion here, but it does not bother this time
+	 */
+	if (unlikely(offset > vec_src->len || offset > vec_dst->len)) {
+		QAT_LOG(DEBUG,
+			"Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+			vec_src->len, vec_dst->len, opaque);
+		*error = -1;
+		return 0;
+	}
+	/* SGL source first entry, adjusted to OOP offsets */
+	qat_sgl_src->buffers[0].addr = vec_src->iova + offset;
+	qat_sgl_src->buffers[0].len = vec_src->len - offset;
+	/* SGL destination first entry, adjusted to OOP offsets */
+	qat_sgl_dst->buffers[0].addr = vec_dst->iova + offset;
+	qat_sgl_dst->buffers[0].len = vec_dst->len - offset;
+	/* Fill the remaining destination buffers */
+	for (i = 1; i < n_dst; i++) {
+		qat_sgl_dst->buffers[i].len = (vec_dst + i)->len;
+		qat_sgl_dst->buffers[i].addr = (vec_dst + i)->iova;
+		dst_tot_length += qat_sgl_dst->buffers[i].len;
+	}
+	dst_tot_length += qat_sgl_dst->buffers[0].len;
+	qat_sgl_dst->num_bufs = n_dst;
+	dst_data_addr = cookie->qat_sgl_dst_phys_addr;
+
+check:	/* If error, return directly. If success, jump to one of these labels */
+	if (src_tot_length != dst_tot_length) {
+		QAT_LOG(DEBUG,
+			"Source length is not equal to the destination length %u, dst no: %u, opaque: %p",
+			src_tot_length, dst_tot_length, opaque);
+		*error = -1;
+		return 0;
+	}
+done:
+	req->comn_mid.opaque_data = (uintptr_t)opaque;
+	req->comn_mid.src_data_addr = src_data_addr;
+	req->comn_mid.dest_data_addr = dst_data_addr;
+	req->comn_mid.src_length = src_length;
+	req->comn_mid.dst_length = dst_length;
+
+	return src_tot_length;
+}
+
 static __rte_always_inline int32_t
 qat_sym_build_req_set_data(struct icp_qat_fw_la_bulk_req *req,
 		void *opaque, struct qat_sym_op_cookie *cookie,
diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
index 888dea4ad9..d4eabc009a 100644
--- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
@@ -915,16 +915,19 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 	for (i = 0; i < n; i++) {
 		struct qat_sym_op_cookie *cookie =
 			qp->op_cookies[tail >> tx_queue->trailz];
+		int error = 0;
 
 		req  = (struct icp_qat_fw_la_bulk_req *)(
 			(uint8_t *)tx_queue->base_addr + tail);
 		rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 		if (vec->dest_sgl) {
-			data_len = qat_sym_build_req_set_data(req,
-				user_data[i], cookie,
-				vec->src_sgl[i].vec, vec->src_sgl[i].num,
-				vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+			data_len = qat_reqs_mid_set(&error, req, cookie, user_data[i],
+					&vec->src_sgl[i], &vec->dest_sgl[i], ofs);
+			/* In oop there is no offset, src/dst addresses are moved
+			 * to avoid overwriting the dst header
+			 */
+			ofs.ofs.cipher.head = 0;
 		} else {
 			data_len = qat_sym_build_req_set_data(req,
 				user_data[i], cookie,
@@ -932,7 +935,7 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 				vec->src_sgl[i].num, NULL, 0);
 		}
 
-		if (unlikely(data_len < 0))
+		if (unlikely(data_len < 0) || error)
 			break;
 
 		enqueue_one_aead_job_gen1(ctx, req, &vec->iv[i],
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.525349590 +0100
+++ 0017-crypto-qat-fix-out-of-place-header-bytes-in-AEAD-raw.patch	2025-06-12 22:06:23.806043286 +0100
@@ -1 +1 @@
-From 06597aaac85638eaa92b66f341185cd0ba39aca6 Mon Sep 17 00:00:00 2001
+From ba810fcd7b21623f285ec3d519e89b8c74b8ecac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06597aaac85638eaa92b66f341185cd0ba39aca6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 35c1888082..c447f2cb45 100644
+index 266ab74a01..739649e793 100644
@@ -34,3 +35,3 @@
- #define AES_OR_3DES_MISALIGNED (ctx->qat_mode == ICP_QAT_HW_CIPHER_CBC_MODE && \
- 			((((ctx->qat_cipher_alg == ICP_QAT_HW_CIPHER_ALGO_AES128) || \
-@@ -146,6 +149,137 @@ qat_cipher_is_len_in_bits(struct qat_sym_session *ctx,
+ #define QAT_SYM_DP_GET_MAX_ENQ(q, c, n) \
+ 	RTE_MIN((q->max_inflights - q->enqueued + q->dequeued - c), n)
+@@ -127,6 +130,137 @@ qat_cipher_is_len_in_bits(struct qat_sym_session *ctx,
@@ -175 +176 @@
-index 24e51a9318..3976d03179 100644
+index 888dea4ad9..d4eabc009a 100644
@@ -178 +179 @@
-@@ -942,16 +942,19 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -915,16 +915,19 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -202 +203 @@
-@@ -959,7 +962,7 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -932,7 +935,7 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (15 preceding siblings ...)
  2025-06-12 21:06 ` patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/mlx5: fix header modify action on group 0' " luca.boccassi
                   ` (53 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Arkadiusz Kusztal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/c30b27d67f8e6914eb4278fc4320e84035a76989

Thanks.

Luca Boccassi

---
From c30b27d67f8e6914eb4278fc4320e84035a76989 Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Mon, 28 Apr 2025 06:30:41 +0000
Subject: [PATCH] crypto/qat: fix out-of-place chain/cipher/auth headers

[ upstream commit 317d05f3721c9a740614adf77aa89d00d5302cf7 ]

This commit fixes a problem with overwriting data in the OOP header
in RAW API crypto processing when using chain, cipher and auth algorithms.

Fixes: 85fec6fd9674 ("crypto/qat: unify raw data path functions")

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 146 +++++++++++++++++++
 drivers/crypto/qat/dev/qat_sym_pmd_gen1.c    |  40 +++--
 2 files changed, 171 insertions(+), 15 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 739649e793..6f676a2c44 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -261,6 +261,152 @@ done:
 	return src_tot_length;
 }
 
+struct qat_sym_req_mid_info {
+	uint32_t data_len;
+	union rte_crypto_sym_ofs ofs;
+};
+
+static inline
+struct qat_sym_req_mid_info qat_sym_req_mid_set(
+	int *error, struct icp_qat_fw_la_bulk_req *const req,
+	struct qat_sym_op_cookie *const cookie, const void *const opaque,
+	const struct rte_crypto_sgl *sgl_src, const struct rte_crypto_sgl *sgl_dst,
+	const union rte_crypto_sym_ofs ofs)
+{
+	struct qat_sym_req_mid_info info = { };  /* Returned value */
+	uint32_t src_tot_length = 0;
+	uint32_t dst_tot_length = 0; /* Used only for input validity checks */
+	uint32_t src_length = 0;
+	uint32_t dst_length = 0;
+	uint64_t src_data_addr = 0;
+	uint64_t dst_data_addr = 0;
+	union rte_crypto_sym_ofs out_ofs = ofs;
+	const struct rte_crypto_vec * const vec_src = sgl_src->vec;
+	const struct rte_crypto_vec * const vec_dst = sgl_dst->vec;
+	const uint32_t n_src = sgl_src->num;
+	const uint32_t n_dst = sgl_dst->num;
+	const uint16_t offset = RTE_MIN(ofs.ofs.cipher.head, ofs.ofs.auth.head);
+	const uint8_t is_flat = !(n_src > 1 || n_dst > 1); /* Flat buffer or the SGL */
+	const uint8_t is_in_place = !n_dst; /* In-place or out-of-place */
+
+	*error = 0;
+	if (unlikely((n_src < 1 || n_src > QAT_SYM_SGL_MAX_NUMBER) ||
+			n_dst > QAT_SYM_SGL_MAX_NUMBER)) {
+		QAT_LOG(DEBUG,
+			"Invalid number of sgls, source no: %u, dst no: %u, opaque: %p",
+			n_src, n_dst, opaque);
+		*error = -1;
+		return info;
+	}
+
+	/* --- Flat buffer --- */
+	if (is_flat) {
+		src_data_addr = vec_src->iova;
+		dst_data_addr = vec_src->iova;
+		src_length = vec_src->len;
+		dst_length = vec_src->len;
+
+		if (is_in_place)
+			goto done;
+		/* Out-of-place
+		 * If OOP, we need to keep in mind that offset needs to
+		 * start where the aead starts
+		 */
+		dst_length = vec_dst->len;
+		/* Comparison between different types, intentional */
+		if (unlikely(offset > src_length || offset > dst_length)) {
+			QAT_LOG(DEBUG,
+				"Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+				src_length, dst_length, opaque);
+			*error = -1;
+			return info;
+		}
+		out_ofs.ofs.cipher.head -= offset;
+		out_ofs.ofs.auth.head -= offset;
+		src_data_addr += offset;
+		dst_data_addr = vec_dst->iova + offset;
+		src_length -= offset;
+		dst_length -= offset;
+		src_tot_length = src_length;
+		dst_tot_length = dst_length;
+		goto check;
+	}
+
+	/* --- Scatter-gather list --- */
+	struct qat_sgl * const qat_sgl_src = (struct qat_sgl *)&cookie->qat_sgl_src;
+	uint16_t i;
+
+	ICP_QAT_FW_COMN_PTR_TYPE_SET(req->comn_hdr.comn_req_flags,
+		QAT_COMN_PTR_TYPE_SGL);
+	qat_sgl_src->num_bufs = n_src;
+	src_data_addr = cookie->qat_sgl_src_phys_addr;
+	/* Fill all the source buffers but the first one */
+	for (i = 1; i < n_src; i++) {
+		qat_sgl_src->buffers[i].len = (vec_src + i)->len;
+		qat_sgl_src->buffers[i].addr = (vec_src + i)->iova;
+		src_tot_length += qat_sgl_src->buffers[i].len;
+	}
+
+	if (is_in_place) {
+		/* SGL source first entry, no OOP */
+		qat_sgl_src->buffers[0].len = vec_src->len;
+		qat_sgl_src->buffers[0].addr = vec_src->iova;
+		dst_data_addr = src_data_addr;
+		goto done;
+	}
+	/* Out-of-place */
+	struct qat_sgl * const qat_sgl_dst =
+			(struct qat_sgl *)&cookie->qat_sgl_dst;
+	/*
+	 * Offset reaching outside of the first buffer is not supported (RAW api).
+	 * Integer promotion here, but it does not bother this time
+	 */
+	if (unlikely(offset > vec_src->len || offset > vec_dst->len)) {
+		QAT_LOG(DEBUG,
+			"Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+			vec_src->len, vec_dst->len, opaque);
+		*error = -1;
+		return info;
+	}
+	out_ofs.ofs.cipher.head -= offset;
+	out_ofs.ofs.auth.head -= offset;
+	/* SGL source first entry, adjusted to OOP offsets */
+	qat_sgl_src->buffers[0].addr = vec_src->iova + offset;
+	qat_sgl_src->buffers[0].len = vec_src->len - offset;
+	/* SGL destination first entry, adjusted to OOP offsets */
+	qat_sgl_dst->buffers[0].addr = vec_dst->iova + offset;
+	qat_sgl_dst->buffers[0].len = vec_dst->len - offset;
+	/* Fill the remaining destination buffers */
+	for (i = 1; i < n_dst; i++) {
+		qat_sgl_dst->buffers[i].len = (vec_dst + i)->len;
+		qat_sgl_dst->buffers[i].addr = (vec_dst + i)->iova;
+		dst_tot_length += qat_sgl_dst->buffers[i].len;
+	}
+	dst_tot_length += qat_sgl_dst->buffers[0].len;
+	qat_sgl_dst->num_bufs = n_dst;
+	dst_data_addr = cookie->qat_sgl_dst_phys_addr;
+
+check:	/* If error, return directly. If success, jump to one of these labels */
+	if (src_tot_length != dst_tot_length) {
+		QAT_LOG(DEBUG,
+			"Source length is not equal to the destination length %u, dst no: %u, opaque: %p",
+			src_tot_length, dst_tot_length, opaque);
+		*error = -1;
+		return info;
+	}
+done:
+	req->comn_mid.opaque_data = (uintptr_t)opaque;
+	req->comn_mid.src_data_addr = src_data_addr;
+	req->comn_mid.dest_data_addr = dst_data_addr;
+	req->comn_mid.src_length = src_length;
+	req->comn_mid.dst_length = dst_length;
+
+	info.data_len = src_tot_length;
+	info.ofs = out_ofs;
+
+	return info;
+}
+
 static __rte_always_inline int32_t
 qat_sym_build_req_set_data(struct icp_qat_fw_la_bulk_req *req,
 		void *opaque, struct qat_sym_op_cookie *cookie,
diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
index d4eabc009a..1856770522 100644
--- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
@@ -551,16 +551,20 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 	for (i = 0; i < n; i++) {
 		struct qat_sym_op_cookie *cookie =
 			qp->op_cookies[tail >> tx_queue->trailz];
+		struct qat_sym_req_mid_info info = { };
+		union rte_crypto_sym_ofs temp_ofs = ofs;
+		int error = 0;
 
+		temp_ofs.ofs.auth = temp_ofs.ofs.cipher;
 		req  = (struct icp_qat_fw_la_bulk_req *)(
 			(uint8_t *)tx_queue->base_addr + tail);
 		rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 		if (vec->dest_sgl) {
-			data_len = qat_sym_build_req_set_data(req,
-				user_data[i], cookie,
-				vec->src_sgl[i].vec, vec->src_sgl[i].num,
-				vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+			info = qat_sym_req_mid_set(&error, req, cookie, user_data[i],
+				&vec->src_sgl[i], &vec->dest_sgl[i], temp_ofs);
+			data_len = info.data_len;
+			ofs = info.ofs;
 		} else {
 			data_len = qat_sym_build_req_set_data(req,
 				user_data[i], cookie,
@@ -568,7 +572,7 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 				vec->src_sgl[i].num, NULL, 0);
 		}
 
-		if (unlikely(data_len < 0))
+		if (unlikely(data_len < 0 || error))
 			break;
 		enqueue_one_cipher_job_gen1(ctx, req, &vec->iv[i], ofs,
 			(uint32_t)data_len);
@@ -668,16 +672,20 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 	for (i = 0; i < n; i++) {
 		struct qat_sym_op_cookie *cookie =
 			qp->op_cookies[tail >> tx_queue->trailz];
+		struct qat_sym_req_mid_info info = { };
+		union rte_crypto_sym_ofs temp_ofs = ofs;
+		int error = 0;
 
+		temp_ofs.ofs.cipher = temp_ofs.ofs.auth;
 		req  = (struct icp_qat_fw_la_bulk_req *)(
 			(uint8_t *)tx_queue->base_addr + tail);
 		rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 		if (vec->dest_sgl) {
-			data_len = qat_sym_build_req_set_data(req,
-				user_data[i], cookie,
-				vec->src_sgl[i].vec, vec->src_sgl[i].num,
-				vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+			info = qat_sym_req_mid_set(&error, req, cookie, user_data[i],
+				&vec->src_sgl[i], &vec->dest_sgl[i], temp_ofs);
+			data_len = info.data_len;
+			ofs = info.ofs;
 		} else {
 			data_len = qat_sym_build_req_set_data(req,
 				user_data[i], cookie,
@@ -685,7 +693,7 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 				vec->src_sgl[i].num, NULL, 0);
 		}
 
-		if (unlikely(data_len < 0))
+		if (unlikely(data_len < 0 || error))
 			break;
 
 		if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
@@ -794,16 +802,18 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 	for (i = 0; i < n; i++) {
 		struct qat_sym_op_cookie *cookie =
 			qp->op_cookies[tail >> tx_queue->trailz];
+		struct qat_sym_req_mid_info info = { };
+		int error = 0;
 
 		req  = (struct icp_qat_fw_la_bulk_req *)(
 			(uint8_t *)tx_queue->base_addr + tail);
 		rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 		if (vec->dest_sgl) {
-			data_len = qat_sym_build_req_set_data(req,
-				user_data[i], cookie,
-				vec->src_sgl[i].vec, vec->src_sgl[i].num,
-				vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+			info = qat_sym_req_mid_set(&error, req, cookie, user_data[i],
+				&vec->src_sgl[i], &vec->dest_sgl[i], ofs);
+			data_len = info.data_len;
+			ofs = info.ofs;
 		} else {
 			data_len = qat_sym_build_req_set_data(req,
 				user_data[i], cookie,
@@ -811,7 +821,7 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
 				vec->src_sgl[i].num, NULL, 0);
 		}
 
-		if (unlikely(data_len < 0))
+		if (unlikely(data_len < 0 || error))
 			break;
 
 		if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.559856964 +0100
+++ 0018-crypto-qat-fix-out-of-place-chain-cipher-auth-header.patch	2025-06-12 22:06:23.806043286 +0100
@@ -1 +1 @@
-From 317d05f3721c9a740614adf77aa89d00d5302cf7 Mon Sep 17 00:00:00 2001
+From c30b27d67f8e6914eb4278fc4320e84035a76989 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 317d05f3721c9a740614adf77aa89d00d5302cf7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c447f2cb45..846636f57d 100644
+index 739649e793..6f676a2c44 100644
@@ -22 +23 @@
-@@ -280,6 +280,152 @@ done:
+@@ -261,6 +261,152 @@ done:
@@ -176 +177 @@
-index 3976d03179..561166203c 100644
+index d4eabc009a..1856770522 100644
@@ -179 +180 @@
-@@ -567,16 +567,20 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -551,16 +551,20 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -204 +205 @@
-@@ -584,7 +588,7 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -568,7 +572,7 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -211,3 +212,3 @@
- 
- 		if (ctx->is_zuc256)
-@@ -688,16 +692,20 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+ 		enqueue_one_cipher_job_gen1(ctx, req, &vec->iv[i], ofs,
+ 			(uint32_t)data_len);
+@@ -668,16 +672,20 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -238 +239 @@
-@@ -705,7 +713,7 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -685,7 +693,7 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -246,2 +247,2 @@
- 		if (ctx->is_zuc256)
-@@ -819,16 +827,18 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+ 		if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
+@@ -794,16 +802,18 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -270 +271 @@
-@@ -836,7 +846,7 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -811,7 +821,7 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -278 +279 @@
- 		if (ctx->is_zuc256) {
+ 		if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: fix header modify action on group 0' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (16 preceding siblings ...)
  2025-06-12 21:06 ` patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/mlx5: validate GTP PSC QFI width' " luca.boccassi
                   ` (52 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/0f7cba98cac32c3592272d5d493398df38cfa538

Thanks.

Luca Boccassi

---
From 0f7cba98cac32c3592272d5d493398df38cfa538 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:32:57 +0200
Subject: [PATCH] net/mlx5: fix header modify action on group 0

[ upstream commit f1ebb26d0d9388b6df65d493b06ce3b55adfb893 ]

HW modify header commands generated for multiple modify field
flow actions, which modify/access the same packet fields
do not have to be separated by NOPs when used on group 0.
This is because:

- On group > 0, HW uses Modify Header Pattern objects
  which require NOP explicitly.
- On group 0, modify field action is implemented using
  Modify Header Context object managed by FW.
  FW inserts requires NOPs internally.

mlx5 PMD inserted NOP always, which caused flow/table creation
failures on group 0 flow rules.
This patch addresses that.

Fixes: 0f4aa72b99da ("net/mlx5: support flow modify field with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 0f36700143..7040dd863d 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -856,7 +856,8 @@ flow_hw_action_modify_field_is_shared(const struct rte_flow_action *action,
 
 static __rte_always_inline bool
 flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
-			  const struct mlx5_modification_cmd *cmd)
+			  const struct mlx5_modification_cmd *cmd,
+			  const struct rte_flow_attr *attr)
 {
 	struct mlx5_modification_cmd last_cmd = { { 0 } };
 	struct mlx5_modification_cmd new_cmd = { { 0 } };
@@ -864,6 +865,15 @@ flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
 	unsigned int last_type;
 	bool should_insert = false;
 
+	/*
+	 * Modify header action list does not require NOPs in root table,
+	 * because different type of underlying object is used:
+	 * - in root table - MODIFY_HEADER_CONTEXT (does not require NOPs),
+	 * - in non-root - either inline modify action or based on Modify Header Pattern
+	 *   (which requires NOPs).
+	 */
+	if (attr->group == 0)
+		return false;
 	if (cmds_num == 0)
 		return false;
 	last_cmd = *(&mhdr->mhdr_cmds[cmds_num - 1]);
@@ -939,7 +949,8 @@ flow_hw_mhdr_cmd_append(struct mlx5_hw_modify_header_action *mhdr,
 
 static __rte_always_inline int
 flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
-				   struct mlx5_flow_dv_modify_hdr_resource *resource)
+				   struct mlx5_flow_dv_modify_hdr_resource *resource,
+				   const struct rte_flow_attr *attr)
 {
 	uint32_t idx;
 	int ret;
@@ -947,7 +958,7 @@ flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
 	for (idx = 0; idx < resource->actions_num; ++idx) {
 		struct mlx5_modification_cmd *src = &resource->actions[idx];
 
-		if (flow_hw_should_insert_nop(mhdr, src)) {
+		if (flow_hw_should_insert_nop(mhdr, src, attr)) {
 			ret = flow_hw_mhdr_cmd_nop_append(mhdr);
 			if (ret)
 				return ret;
@@ -1057,14 +1068,14 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,
 	 * This NOP command will not be a part of action's command range used to update commands
 	 * on rule creation.
 	 */
-	if (flow_hw_should_insert_nop(mhdr, &resource->actions[0])) {
+	if (flow_hw_should_insert_nop(mhdr, &resource->actions[0], attr)) {
 		ret = flow_hw_mhdr_cmd_nop_append(mhdr);
 		if (ret)
 			return rte_flow_error_set(error, ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 						  NULL, "too many modify field operations specified");
 	}
 	cmds_start = mhdr->mhdr_cmds_num;
-	ret = flow_hw_converted_mhdr_cmds_append(mhdr, resource);
+	ret = flow_hw_converted_mhdr_cmds_append(mhdr, resource, attr);
 	if (ret)
 		return rte_flow_error_set(error, ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					  NULL, "too many modify field operations specified");
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.592330271 +0100
+++ 0019-net-mlx5-fix-header-modify-action-on-group-0.patch	2025-06-12 22:06:23.814043456 +0100
@@ -1 +1 @@
-From f1ebb26d0d9388b6df65d493b06ce3b55adfb893 Mon Sep 17 00:00:00 2001
+From 0f7cba98cac32c3592272d5d493398df38cfa538 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f1ebb26d0d9388b6df65d493b06ce3b55adfb893 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 2f7b769aec..cbe6bd3ef9 100644
+index 0f36700143..7040dd863d 100644
@@ -34 +35 @@
-@@ -1422,7 +1422,8 @@ flow_hw_action_modify_field_is_shared(const struct rte_flow_action *action,
+@@ -856,7 +856,8 @@ flow_hw_action_modify_field_is_shared(const struct rte_flow_action *action,
@@ -44 +45 @@
-@@ -1430,6 +1431,15 @@ flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
+@@ -864,6 +865,15 @@ flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
@@ -60 +61 @@
-@@ -1508,7 +1518,8 @@ flow_hw_mhdr_cmd_append(struct mlx5_hw_modify_header_action *mhdr,
+@@ -939,7 +949,8 @@ flow_hw_mhdr_cmd_append(struct mlx5_hw_modify_header_action *mhdr,
@@ -70 +71 @@
-@@ -1516,7 +1527,7 @@ flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
+@@ -947,7 +958,7 @@ flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
@@ -79 +80 @@
-@@ -1639,14 +1650,14 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,
+@@ -1057,14 +1068,14 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: validate GTP PSC QFI width' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (17 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/mlx5: fix header modify action on group 0' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/mlx5: fix counter service cleanup on init failure' " luca.boccassi
                   ` (51 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/82a0323b75c18c81f3764b9c788c59c39677638b

Thanks.

Luca Boccassi

---
From 82a0323b75c18c81f3764b9c788c59c39677638b Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:35:07 +0200
Subject: [PATCH] net/mlx5: validate GTP PSC QFI width

[ upstream commit 34471d1645fae0e936c44f2f6d7fea6d22e4173e ]

Add missing validation of GTP PSC QFI flow field width for
modify field flow action.

Fixes: 0f4aa72b99da ("net/mlx5: support flow modify field with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 73f047e41b..d11e39431f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1403,6 +1403,8 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev,
 	case RTE_FLOW_FIELD_META:
 		return (flow_dv_get_metadata_reg(dev, attr, error) == REG_C_0) ?
 			__builtin_popcount(priv->sh->dv_meta_mask) : 32;
+	case RTE_FLOW_FIELD_GTP_PSC_QFI:
+		return 6;
 	case RTE_FLOW_FIELD_POINTER:
 	case RTE_FLOW_FIELD_VALUE:
 		return inherit < 0 ? 0 : inherit;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.635284618 +0100
+++ 0020-net-mlx5-validate-GTP-PSC-QFI-width.patch	2025-06-12 22:06:23.822043624 +0100
@@ -1 +1 @@
-From 34471d1645fae0e936c44f2f6d7fea6d22e4173e Mon Sep 17 00:00:00 2001
+From 82a0323b75c18c81f3764b9c788c59c39677638b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34471d1645fae0e936c44f2f6d7fea6d22e4173e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 608c42db1d..c217634d9b 100644
+index 73f047e41b..d11e39431f 100644
@@ -22 +23 @@
-@@ -1451,6 +1451,8 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev,
+@@ -1403,6 +1403,8 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev,
@@ -25 +26 @@
- 			rte_popcount32(priv->sh->dv_meta_mask) : 32;
+ 			__builtin_popcount(priv->sh->dv_meta_mask) : 32;

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: fix counter service cleanup on init failure' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (18 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/mlx5: validate GTP PSC QFI width' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/mlx5: remove unsupported flow meter action in HWS' " luca.boccassi
                   ` (50 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/588d9e7904d701cda20cdc2d3d75b41d05da5228

Thanks.

Luca Boccassi

---
From 588d9e7904d701cda20cdc2d3d75b41d05da5228 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:41:05 +0200
Subject: [PATCH] net/mlx5: fix counter service cleanup on init failure

[ upstream commit 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc ]

When initializing the counter pool in mlx5_hws_cnt_pool_create(), the
background service thread was started before pool creation completed.
If pool creation failed after the thread was started, the error handling
path did not clean up the running thread, as it assumed no resources
needed cleanup if the pool was not created.

This patch moves the creation of the background service thread to the end
of the counter pool initialization, ensuring resources are released in the
correct order during rollback. It also adds a missing "goto error" in case
the service thread initialization fails.

Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/mlx5_hws_cnt.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index cec0710efe..6e4b093bd8 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -662,12 +662,6 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
 	int ret = 0;
 	size_t sz;
 
-	/* init cnt service if not. */
-	if (priv->sh->cnt_svc == NULL) {
-		ret = mlx5_hws_cnt_svc_init(priv->sh);
-		if (ret != 0)
-			goto error;
-	}
 	cparam.fetch_sz = HWS_CNT_CACHE_FETCH_DEFAULT;
 	cparam.preload_sz = HWS_CNT_CACHE_PRELOAD_DEFAULT;
 	cparam.q_num = nb_queue;
@@ -703,6 +697,12 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
 	ret = mlx5_hws_cnt_pool_action_create(priv, cpool);
 	if (ret != 0)
 		goto error;
+	/* init cnt service if not. */
+	if (priv->sh->cnt_svc == NULL) {
+		ret = mlx5_hws_cnt_svc_init(priv->sh);
+		if (ret != 0)
+			goto error;
+	}
 	priv->sh->cnt_svc->refcnt++;
 	cpool->priv = priv;
 	rte_spinlock_lock(&priv->sh->cpool_lock);
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.680718098 +0100
+++ 0021-net-mlx5-fix-counter-service-cleanup-on-init-failure.patch	2025-06-12 22:06:23.822043624 +0100
@@ -1 +1 @@
-From 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc Mon Sep 17 00:00:00 2001
+From 588d9e7904d701cda20cdc2d3d75b41d05da5228 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index fd12bcd7ec..5c7c0041aa 100644
+index cec0710efe..6e4b093bd8 100644
@@ -30,4 +31,4 @@
-@@ -729,12 +729,6 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
- 		}
- 		goto success;
- 	}
+@@ -662,12 +662,6 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
+ 	int ret = 0;
+ 	size_t sz;
+ 
@@ -36,2 +37,2 @@
--		ret = mlx5_hws_cnt_svc_init(priv->sh, error);
--		if (ret)
+-		ret = mlx5_hws_cnt_svc_init(priv->sh);
+-		if (ret != 0)
@@ -43,2 +44,3 @@
-@@ -769,6 +763,12 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
- 				   NULL, "failed to allocate counter actions");
+@@ -703,6 +697,12 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
+ 	ret = mlx5_hws_cnt_pool_action_create(priv, cpool);
+ 	if (ret != 0)
@@ -46 +47,0 @@
- 	}
@@ -49,2 +50,2 @@
-+		ret = mlx5_hws_cnt_svc_init(priv->sh, error);
-+		if (ret)
++		ret = mlx5_hws_cnt_svc_init(priv->sh);
++		if (ret != 0)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: remove unsupported flow meter action in HWS' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (19 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/mlx5: fix counter service cleanup on init failure' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/mlx5: fix maximal queue size query' " luca.boccassi
                   ` (49 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/4901f59024732fd4bcdc09896e9cde2e91104884

Thanks.

Luca Boccassi

---
From 4901f59024732fd4bcdc09896e9cde2e91104884 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 4 May 2025 08:23:50 +0300
Subject: [PATCH] net/mlx5: remove unsupported flow meter action in HWS

[ upstream commit 645f240d1cd57d0be1b773c739a5845a7663eeed ]

METER flow action is not supported in MLX5 HWS mode.
Application must use METER_MARK flow action.

The patch removes METER action from HWS code.

Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c    |  85 -----
 drivers/net/mlx5/mlx5_flow_meter.c | 545 -----------------------------
 2 files changed, 630 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 7040dd863d..ec44151302 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1167,35 +1167,6 @@ flow_hw_represented_port_compile(struct rte_eth_dev *dev,
 	return 0;
 }
 
-static __rte_always_inline int
-flow_hw_meter_compile(struct rte_eth_dev *dev,
-		      const struct mlx5_flow_template_table_cfg *cfg,
-		      uint16_t aso_mtr_pos,
-		      uint16_t jump_pos,
-		      const struct rte_flow_action *action,
-		      struct mlx5_hw_actions *acts,
-		      struct rte_flow_error *error)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_aso_mtr *aso_mtr;
-	const struct rte_flow_action_meter *meter = action->conf;
-	uint32_t group = cfg->attr.flow_attr.group;
-
-	aso_mtr = mlx5_aso_meter_by_idx(priv, meter->mtr_id);
-	acts->rule_acts[aso_mtr_pos].action = priv->mtr_bulk.action;
-	acts->rule_acts[aso_mtr_pos].aso_meter.offset = aso_mtr->offset;
-	acts->jump = flow_hw_jump_action_register
-		(dev, cfg, aso_mtr->fm.group, error);
-	if (!acts->jump)
-		return -ENOMEM;
-	acts->rule_acts[jump_pos].action = (!!group) ?
-				    acts->jump->hws_action :
-				    acts->jump->root_action;
-	if (mlx5_aso_mtr_wait(priv->sh, MLX5_HW_INV_QUEUE, aso_mtr))
-		return -ENOMEM;
-	return 0;
-}
-
 static __rte_always_inline int
 flow_hw_cnt_compile(struct rte_eth_dev *dev, uint32_t  start_pos,
 		      struct mlx5_hw_actions *acts)
@@ -1389,7 +1360,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
 	bool reformat_used = false;
 	unsigned int of_vlan_offset;
 	uint16_t action_pos;
-	uint16_t jump_pos;
 	uint32_t ct_idx;
 	int err;
 	uint32_t target_grp = 0;
@@ -1605,27 +1575,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
 					 masks, acts, action_pos, &sub_error))
 				goto err;
 			break;
-		case RTE_FLOW_ACTION_TYPE_METER:
-			/*
-			 * METER action is compiled to 2 DR actions - ASO_METER and FT.
-			 * Calculated DR offset is stored only for ASO_METER and FT
-			 * is assumed to be the next action.
-			 */
-			action_pos = at->actions_off[actions - at->actions];
-			jump_pos = action_pos + 1;
-			if (actions->conf && masks->conf &&
-			    ((const struct rte_flow_action_meter *)
-			     masks->conf)->mtr_id) {
-				err = flow_hw_meter_compile(dev, cfg,
-						action_pos, jump_pos, actions, acts, &sub_error);
-				if (err)
-					goto err;
-			} else if (__flow_hw_act_data_general_append(priv, acts,
-							actions->type,
-							actions - action_start,
-							action_pos))
-				goto err;
-			break;
 		case RTE_FLOW_ACTION_TYPE_AGE:
 			flow_hw_translate_group(dev, cfg, attr->group,
 						&target_grp, &sub_error);
@@ -2198,7 +2147,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
 	const struct rte_flow_action_raw_encap *raw_encap_data;
 	const struct rte_flow_item *enc_item = NULL;
 	const struct rte_flow_action_ethdev *port_action = NULL;
-	const struct rte_flow_action_meter *meter = NULL;
 	const struct rte_flow_action_age *age = NULL;
 	uint8_t *buf = job->encap_data;
 	struct rte_flow_attr attr = {
@@ -2348,28 +2296,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
 			rule_acts[act_data->action_dst].action =
 					priv->hw_vport[port_action->port_id];
 			break;
-		case RTE_FLOW_ACTION_TYPE_METER:
-			meter = action->conf;
-			mtr_id = meter->mtr_id;
-			aso_mtr = mlx5_aso_meter_by_idx(priv, mtr_id);
-			rule_acts[act_data->action_dst].action =
-				priv->mtr_bulk.action;
-			rule_acts[act_data->action_dst].aso_meter.offset =
-								aso_mtr->offset;
-			jump = flow_hw_jump_action_register
-				(dev, &table->cfg, aso_mtr->fm.group, NULL);
-			if (!jump)
-				goto error;
-			MLX5_ASSERT
-				(!rule_acts[act_data->action_dst + 1].action);
-			rule_acts[act_data->action_dst + 1].action =
-					(!!attr.group) ? jump->hws_action :
-							 jump->root_action;
-			job->flow->jump = jump;
-			job->flow->fate_type = MLX5_FLOW_FATE_JUMP;
-			if (mlx5_aso_mtr_wait(priv->sh, MLX5_HW_INV_QUEUE, aso_mtr))
-				goto error;
-			break;
 		case RTE_FLOW_ACTION_TYPE_AGE:
 			age = action->conf;
 			/*
@@ -4082,10 +4008,6 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
 			/* TODO: Validation logic */
 			action_flags |= MLX5_FLOW_ACTION_DECAP;
 			break;
-		case RTE_FLOW_ACTION_TYPE_METER:
-			/* TODO: Validation logic */
-			action_flags |= MLX5_FLOW_ACTION_METER;
-			break;
 		case RTE_FLOW_ACTION_TYPE_METER_MARK:
 			ret = flow_hw_validate_action_meter_mark(dev, action,
 								 error);
@@ -4321,13 +4243,6 @@ flow_hw_dr_actions_template_create(struct rte_flow_actions_template *at)
 				action_types[mhdr_off] = type;
 			}
 			break;
-		case RTE_FLOW_ACTION_TYPE_METER:
-			at->actions_off[i] = curr_off;
-			action_types[curr_off++] = MLX5DR_ACTION_TYP_ASO_METER;
-			if (curr_off >= MLX5_HW_MAX_ACTS)
-				goto err_actions_num;
-			action_types[curr_off++] = MLX5DR_ACTION_TYP_FT;
-			break;
 		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
 			type = mlx5_hw_dr_action_types[at->actions[i].type];
 			at->actions_off[i] = curr_off;
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 0ffe738ec5..4dd751f3d9 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -851,45 +851,6 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
 	return 0;
 }
 
-#if defined(HAVE_MLX5_HWS_SUPPORT)
-/**
- * Callback to check MTR policy action validate for HWS
- *
- * @param[in] dev
- *   Pointer to Ethernet device.
- * @param[in] actions
- *   Pointer to meter policy action detail.
- * @param[out] error
- *   Pointer to the error structure.
- *
- * @return
- *   0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_policy_hws_validate(struct rte_eth_dev *dev,
-	struct rte_mtr_meter_policy_params *policy,
-	struct rte_mtr_error *error)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	const struct rte_flow_actions_template_attr attr = {
-		.transfer = priv->sh->config.dv_esw_en ? 1 : 0 };
-	int ret;
-	int i;
-
-	if (!priv->mtr_en || !priv->sh->meter_aso_en)
-		return -rte_mtr_error_set(error, ENOTSUP,
-				RTE_MTR_ERROR_TYPE_METER_POLICY,
-				NULL, "meter policy unsupported.");
-	for (i = 0; i < RTE_COLORS; i++) {
-		ret = mlx5_flow_actions_validate(dev, &attr, policy->actions[i],
-						 policy->actions[i], NULL);
-		if (ret)
-			return ret;
-	}
-	return 0;
-}
-#endif
-
 static int
 __mlx5_flow_meter_policy_delete(struct rte_eth_dev *dev,
 			uint32_t policy_id,
@@ -1215,344 +1176,6 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
 							      &policy_idx);
 }
 
-#if defined(HAVE_MLX5_HWS_SUPPORT)
-/**
- * Callback to delete MTR policy for HWS.
- *
- * @param[in] dev
- *   Pointer to Ethernet device.
- * @param[in] policy_id
- *   Meter policy id.
- * @param[out] error
- *   Pointer to the error structure.
- *
- * @return
- *   0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_policy_hws_delete(struct rte_eth_dev *dev,
-			  uint32_t policy_id,
-			  struct rte_mtr_error *error)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_flow_meter_policy *mtr_policy;
-	uint32_t i, j;
-	uint32_t nb_flows = 0;
-	int ret;
-	struct rte_flow_op_attr op_attr = { .postpone = 1 };
-	struct rte_flow_op_result result[RTE_COLORS * MLX5_MTR_DOMAIN_MAX];
-
-	if (!priv->mtr_policy_arr)
-		return -rte_mtr_error_set(error, ENOTSUP,
-					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
-					  NULL, "Meter policy array is not allocated");
-	/* Meter id must be valid. */
-	if (policy_id >= priv->mtr_config.nb_meter_policies)
-		return -rte_mtr_error_set(error, EINVAL,
-					  RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
-					  &policy_id,
-					  "Meter policy id not valid.");
-	/* Meter policy must exist. */
-	mtr_policy = mlx5_flow_meter_policy_find(dev, policy_id, NULL);
-	if (!mtr_policy->initialized)
-		return -rte_mtr_error_set(error, ENOENT,
-			RTE_MTR_ERROR_TYPE_METER_POLICY_ID, NULL,
-			"Meter policy does not exists.");
-	/* Check policy is unused. */
-	if (mtr_policy->ref_cnt)
-		return -rte_mtr_error_set(error, EBUSY,
-					  RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
-					  NULL, "Meter policy is in use.");
-	rte_spinlock_lock(&priv->hw_ctrl_lock);
-	for (i = 0; i < MLX5_MTR_DOMAIN_MAX; i++) {
-		for (j = 0; j < RTE_COLORS; j++) {
-			if (mtr_policy->hws_flow_rule[i][j]) {
-				ret = rte_flow_async_destroy(dev->data->port_id,
-					CTRL_QUEUE_ID(priv), &op_attr,
-					mtr_policy->hws_flow_rule[i][j],
-					NULL, NULL);
-				if (ret < 0)
-					continue;
-				nb_flows++;
-			}
-		}
-	}
-	ret = rte_flow_push(dev->data->port_id, CTRL_QUEUE_ID(priv), NULL);
-	while (nb_flows && (ret >= 0)) {
-		ret = rte_flow_pull(dev->data->port_id,
-					CTRL_QUEUE_ID(priv), result,
-					nb_flows, NULL);
-		nb_flows -= ret;
-	}
-	for (i = 0; i < MLX5_MTR_DOMAIN_MAX; i++) {
-		if (mtr_policy->hws_flow_table[i])
-			rte_flow_template_table_destroy(dev->data->port_id,
-				 mtr_policy->hws_flow_table[i], NULL);
-	}
-	for (i = 0; i < RTE_COLORS; i++) {
-		if (mtr_policy->hws_act_templ[i])
-			rte_flow_actions_template_destroy(dev->data->port_id,
-				 mtr_policy->hws_act_templ[i], NULL);
-	}
-	if (mtr_policy->hws_item_templ)
-		rte_flow_pattern_template_destroy(dev->data->port_id,
-				mtr_policy->hws_item_templ, NULL);
-	rte_spinlock_unlock(&priv->hw_ctrl_lock);
-	memset(mtr_policy, 0, sizeof(struct mlx5_flow_meter_policy));
-	return 0;
-}
-
-/**
- * Callback to add MTR policy for HWS.
- *
- * @param[in] dev
- *   Pointer to Ethernet device.
- * @param[out] policy_id
- *   Pointer to policy id
- * @param[in] actions
- *   Pointer to meter policy action detail.
- * @param[out] error
- *   Pointer to the error structure.
- *
- * @return
- *   0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_policy_hws_add(struct rte_eth_dev *dev,
-			uint32_t policy_id,
-			struct rte_mtr_meter_policy_params *policy,
-			struct rte_mtr_error *error)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_flow_meter_policy *mtr_policy = NULL;
-	const struct rte_flow_action *act;
-	const struct rte_flow_action_meter *mtr;
-	struct mlx5_flow_meter_info *fm;
-	struct mlx5_flow_meter_policy *plc;
-	uint8_t domain_color = MLX5_MTR_ALL_DOMAIN_BIT;
-	bool is_rss = false;
-	bool is_hierarchy = false;
-	int i, j;
-	uint32_t nb_colors = 0;
-	uint32_t nb_flows = 0;
-	int color;
-	int ret;
-	struct rte_flow_pattern_template_attr pta = {0};
-	struct rte_flow_actions_template_attr ata = {0};
-	struct rte_flow_template_table_attr ta = { {0}, 0 };
-	struct rte_flow_op_attr op_attr = { .postpone = 1 };
-	struct rte_flow_op_result result[RTE_COLORS * MLX5_MTR_DOMAIN_MAX];
-	const uint32_t color_mask = (UINT32_C(1) << MLX5_MTR_COLOR_BITS) - 1;
-	int color_reg_c_idx = mlx5_flow_get_reg_id(dev, MLX5_MTR_COLOR,
-						   0, NULL);
-	struct rte_flow_item_tag tag_spec = {
-		.data = 0,
-		.index = color_reg_c_idx
-	};
-	struct rte_flow_item_tag tag_mask = {
-		.data = color_mask,
-		.index = 0xff};
-	struct rte_flow_item pattern[] = {
-		[0] = {
-			.type = (enum rte_flow_item_type)
-				MLX5_RTE_FLOW_ITEM_TYPE_TAG,
-			.spec = &tag_spec,
-			.mask = &tag_mask,
-		},
-		[1] = { .type = RTE_FLOW_ITEM_TYPE_END }
-	};
-
-	if (!priv->mtr_policy_arr)
-		return -rte_mtr_error_set(error, ENOTSUP,
-					  RTE_MTR_ERROR_TYPE_METER_POLICY,
-					  NULL, "Meter policy array is not allocated.");
-	if (policy_id >= priv->mtr_config.nb_meter_policies)
-		return -rte_mtr_error_set(error, ENOTSUP,
-					  RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
-					  NULL, "Meter policy id not valid.");
-	mtr_policy = mlx5_flow_meter_policy_find(dev, policy_id, NULL);
-	if (mtr_policy->initialized)
-		return -rte_mtr_error_set(error, EEXIST,
-			RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
-			NULL, "Meter policy already exists.");
-	if (!policy ||
-	    (!policy->actions[RTE_COLOR_RED] &&
-	    !policy->actions[RTE_COLOR_YELLOW] &&
-	    !policy->actions[RTE_COLOR_GREEN]))
-		return -rte_mtr_error_set(error, EINVAL,
-					  RTE_MTR_ERROR_TYPE_METER_POLICY,
-					  NULL, "Meter policy actions are not valid.");
-	if (policy->actions[RTE_COLOR_RED] == RTE_FLOW_ACTION_TYPE_END)
-		mtr_policy->skip_r = 1;
-	if (policy->actions[RTE_COLOR_YELLOW] == RTE_FLOW_ACTION_TYPE_END)
-		mtr_policy->skip_y = 1;
-	if (policy->actions[RTE_COLOR_GREEN] == RTE_FLOW_ACTION_TYPE_END)
-		mtr_policy->skip_g = 1;
-	if (mtr_policy->skip_r && mtr_policy->skip_y && mtr_policy->skip_g)
-		return -rte_mtr_error_set(error, ENOTSUP,
-					  RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
-					  NULL, "Meter policy actions are empty.");
-	for (i = 0; i < RTE_COLORS; i++) {
-		act = policy->actions[i];
-		while (act && act->type != RTE_FLOW_ACTION_TYPE_END) {
-			switch (act->type) {
-			case RTE_FLOW_ACTION_TYPE_PORT_ID:
-				/* fall-through. */
-			case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
-				domain_color &= ~(MLX5_MTR_DOMAIN_INGRESS_BIT |
-						  MLX5_MTR_DOMAIN_EGRESS_BIT);
-				break;
-			case RTE_FLOW_ACTION_TYPE_RSS:
-				is_rss = true;
-				/* fall-through. */
-			case RTE_FLOW_ACTION_TYPE_QUEUE:
-				domain_color &= ~(MLX5_MTR_DOMAIN_EGRESS_BIT |
-						  MLX5_MTR_DOMAIN_TRANSFER_BIT);
-				break;
-			case RTE_FLOW_ACTION_TYPE_METER:
-				is_hierarchy = true;
-				mtr = act->conf;
-				fm = mlx5_flow_meter_find(priv,
-							  mtr->mtr_id, NULL);
-				if (!fm)
-					return -rte_mtr_error_set(error, EINVAL,
-						RTE_MTR_ERROR_TYPE_MTR_ID, NULL,
-						"Meter not found in meter hierarchy.");
-				plc = mlx5_flow_meter_policy_find(dev,
-								  fm->policy_id,
-								  NULL);
-				MLX5_ASSERT(plc);
-				domain_color &= MLX5_MTR_ALL_DOMAIN_BIT &
-					(plc->ingress <<
-					 MLX5_MTR_DOMAIN_INGRESS);
-				domain_color &= MLX5_MTR_ALL_DOMAIN_BIT &
-					(plc->egress <<
-					 MLX5_MTR_DOMAIN_EGRESS);
-				domain_color &= MLX5_MTR_ALL_DOMAIN_BIT &
-					(plc->transfer <<
-					 MLX5_MTR_DOMAIN_TRANSFER);
-				break;
-			default:
-				break;
-			}
-			act++;
-		}
-	}
-	if (priv->sh->config.dv_esw_en)
-		domain_color &= ~(MLX5_MTR_DOMAIN_EGRESS_BIT |
-				  MLX5_MTR_DOMAIN_TRANSFER_BIT);
-	else
-		domain_color &= ~MLX5_MTR_DOMAIN_TRANSFER_BIT;
-	if (!domain_color)
-		return -rte_mtr_error_set(error, ENOTSUP,
-					  RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
-					  NULL, "Meter policy domains are conflicting.");
-	mtr_policy->is_rss = is_rss;
-	mtr_policy->ingress = !!(domain_color & MLX5_MTR_DOMAIN_INGRESS_BIT);
-	pta.ingress = mtr_policy->ingress;
-	mtr_policy->egress = !!(domain_color & MLX5_MTR_DOMAIN_EGRESS_BIT);
-	pta.egress = mtr_policy->egress;
-	mtr_policy->transfer = !!(domain_color & MLX5_MTR_DOMAIN_TRANSFER_BIT);
-	pta.transfer = mtr_policy->transfer;
-	mtr_policy->group = MLX5_FLOW_TABLE_HWS_POLICY - policy_id;
-	mtr_policy->is_hierarchy = is_hierarchy;
-	mtr_policy->initialized = 1;
-	rte_spinlock_lock(&priv->hw_ctrl_lock);
-	mtr_policy->hws_item_templ =
-		rte_flow_pattern_template_create(dev->data->port_id,
-						 &pta, pattern, NULL);
-	if (!mtr_policy->hws_item_templ)
-		goto policy_add_err;
-	for (i = 0; i < RTE_COLORS; i++) {
-		if (mtr_policy->skip_g && i == RTE_COLOR_GREEN)
-			continue;
-		if (mtr_policy->skip_y && i == RTE_COLOR_YELLOW)
-			continue;
-		if (mtr_policy->skip_r && i == RTE_COLOR_RED)
-			continue;
-		mtr_policy->hws_act_templ[nb_colors] =
-			rte_flow_actions_template_create(dev->data->port_id,
-						&ata, policy->actions[i],
-						policy->actions[i], NULL);
-		if (!mtr_policy->hws_act_templ[nb_colors])
-			goto policy_add_err;
-		nb_colors++;
-	}
-	for (i = 0; i < MLX5_MTR_DOMAIN_MAX; i++) {
-		memset(&ta, 0, sizeof(ta));
-		ta.nb_flows = RTE_COLORS;
-		ta.flow_attr.group = mtr_policy->group;
-		if (i == MLX5_MTR_DOMAIN_INGRESS) {
-			if (!mtr_policy->ingress)
-				continue;
-			ta.flow_attr.ingress = 1;
-		} else if (i == MLX5_MTR_DOMAIN_EGRESS) {
-			if (!mtr_policy->egress)
-				continue;
-			ta.flow_attr.egress = 1;
-		} else if (i == MLX5_MTR_DOMAIN_TRANSFER) {
-			if (!mtr_policy->transfer)
-				continue;
-			ta.flow_attr.transfer = 1;
-		}
-		mtr_policy->hws_flow_table[i] =
-			rte_flow_template_table_create(dev->data->port_id,
-					&ta, &mtr_policy->hws_item_templ, 1,
-					mtr_policy->hws_act_templ, nb_colors,
-					NULL);
-		if (!mtr_policy->hws_flow_table[i])
-			goto policy_add_err;
-		nb_colors = 0;
-		for (j = 0; j < RTE_COLORS; j++) {
-			if (mtr_policy->skip_g && j == RTE_COLOR_GREEN)
-				continue;
-			if (mtr_policy->skip_y && j == RTE_COLOR_YELLOW)
-				continue;
-			if (mtr_policy->skip_r && j == RTE_COLOR_RED)
-				continue;
-			color = rte_col_2_mlx5_col((enum rte_color)j);
-			tag_spec.data = color;
-			mtr_policy->hws_flow_rule[i][j] =
-				rte_flow_async_create(dev->data->port_id,
-					CTRL_QUEUE_ID(priv), &op_attr,
-					mtr_policy->hws_flow_table[i],
-					pattern, 0, policy->actions[j],
-					nb_colors, NULL, NULL);
-			if (!mtr_policy->hws_flow_rule[i][j])
-				goto policy_add_err;
-			nb_colors++;
-			nb_flows++;
-		}
-		ret = rte_flow_push(dev->data->port_id,
-				    CTRL_QUEUE_ID(priv), NULL);
-		if (ret < 0)
-			goto policy_add_err;
-		while (nb_flows) {
-			ret = rte_flow_pull(dev->data->port_id,
-					    CTRL_QUEUE_ID(priv), result,
-					    nb_flows, NULL);
-			if (ret < 0)
-				goto policy_add_err;
-			for (j = 0; j < ret; j++) {
-				if (result[j].status == RTE_FLOW_OP_ERROR)
-					goto policy_add_err;
-			}
-			nb_flows -= ret;
-		}
-	}
-	rte_spinlock_unlock(&priv->hw_ctrl_lock);
-	return 0;
-policy_add_err:
-	rte_spinlock_unlock(&priv->hw_ctrl_lock);
-	ret = mlx5_flow_meter_policy_hws_delete(dev, policy_id, error);
-	memset(mtr_policy, 0, sizeof(struct mlx5_flow_meter_policy));
-	if (ret)
-		return ret;
-	return -rte_mtr_error_set(error, ENOTSUP,
-				  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
-				  NULL, "Failed to create meter policy.");
-}
-#endif
 /**
  * Check meter validation.
  *
@@ -1922,92 +1545,6 @@ error:
 		NULL, "Failed to create devx meter.");
 }
 
-#if defined(HAVE_MLX5_HWS_SUPPORT)
-/**
- * Create meter rules.
- *
- * @param[in] dev
- *   Pointer to Ethernet device.
- * @param[in] meter_id
- *   Meter id.
- * @param[in] params
- *   Pointer to rte meter parameters.
- * @param[in] shared
- *   Meter shared with other flow or not.
- * @param[out] error
- *   Pointer to rte meter error structure.
- *
- * @return
- *   0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
-		       struct rte_mtr_params *params, int shared,
-		       struct rte_mtr_error *error)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_flow_meter_profile *profile;
-	struct mlx5_flow_meter_info *fm;
-	struct mlx5_flow_meter_policy *policy = NULL;
-	struct mlx5_aso_mtr *aso_mtr;
-	int ret;
-
-	if (!priv->mtr_profile_arr ||
-	    !priv->mtr_policy_arr ||
-	    !priv->mtr_bulk.aso)
-		return -rte_mtr_error_set(error, ENOTSUP,
-			RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-			"Meter bulk array is not allocated.");
-	/* Meter profile must exist. */
-	profile = mlx5_flow_meter_profile_find(priv, params->meter_profile_id);
-	if (!profile->initialized)
-		return -rte_mtr_error_set(error, ENOENT,
-			RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
-			NULL, "Meter profile id not valid.");
-	/* Meter policy must exist. */
-	policy = mlx5_flow_meter_policy_find(dev,
-			params->meter_policy_id, NULL);
-	if (!policy->initialized)
-		return -rte_mtr_error_set(error, ENOENT,
-			RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
-			NULL, "Meter policy id not valid.");
-	/* Meter ID must be valid. */
-	if (meter_id >= priv->mtr_config.nb_meters)
-		return -rte_mtr_error_set(error, EINVAL,
-			RTE_MTR_ERROR_TYPE_MTR_ID,
-			NULL, "Meter id not valid.");
-	/* Find ASO object. */
-	aso_mtr = mlx5_aso_meter_by_idx(priv, meter_id);
-	fm = &aso_mtr->fm;
-	if (fm->initialized)
-		return -rte_mtr_error_set(error, ENOENT,
-					  RTE_MTR_ERROR_TYPE_MTR_ID,
-					  NULL, "Meter object already exists.");
-	/* Fill the flow meter parameters. */
-	fm->meter_id = meter_id;
-	fm->policy_id = params->meter_policy_id;
-	fm->profile = profile;
-	fm->meter_offset = meter_id;
-	fm->group = policy->group;
-	/* Add to the flow meter list. */
-	fm->active_state = 1; /* Config meter starts as active. */
-	fm->is_enable = params->meter_enable;
-	fm->shared = !!shared;
-	fm->initialized = 1;
-	/* Update ASO flow meter by wqe. */
-	ret = mlx5_aso_meter_update_by_wqe(priv->sh, MLX5_HW_INV_QUEUE, aso_mtr,
-					   &priv->mtr_bulk, NULL, true);
-	if (ret)
-		return -rte_mtr_error_set(error, ENOTSUP,
-			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
-			NULL, "Failed to create devx meter.");
-	fm->active_state = params->meter_enable;
-	__atomic_add_fetch(&fm->profile->ref_cnt, 1, __ATOMIC_RELAXED);
-	__atomic_add_fetch(&policy->ref_cnt, 1, __ATOMIC_RELAXED);
-	return 0;
-}
-#endif
-
 static int
 mlx5_flow_meter_params_flush(struct rte_eth_dev *dev,
 			struct mlx5_flow_meter_info *fm,
@@ -2114,58 +1651,6 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
 	return 0;
 }
 
-/**
- * Destroy meter rules.
- *
- * @param[in] dev
- *   Pointer to Ethernet device.
- * @param[in] meter_id
- *   Meter id.
- * @param[out] error
- *   Pointer to rte meter error structure.
- *
- * @return
- *   0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_hws_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
-			struct rte_mtr_error *error)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_aso_mtr *aso_mtr;
-	struct mlx5_flow_meter_info *fm;
-	struct mlx5_flow_meter_policy *policy;
-
-	if (!priv->mtr_profile_arr ||
-	    !priv->mtr_policy_arr ||
-	    !priv->mtr_bulk.aso)
-		return -rte_mtr_error_set(error, ENOTSUP,
-			RTE_MTR_ERROR_TYPE_METER_POLICY, NULL,
-			"Meter bulk array is not allocated.");
-	/* Find ASO object. */
-	aso_mtr = mlx5_aso_meter_by_idx(priv, meter_id);
-	fm = &aso_mtr->fm;
-	if (!fm->initialized)
-		return -rte_mtr_error_set(error, ENOENT,
-					  RTE_MTR_ERROR_TYPE_MTR_ID,
-					  NULL, "Meter object id not valid.");
-	/* Meter object must not have any owner. */
-	if (fm->ref_cnt > 0)
-		return -rte_mtr_error_set(error, EBUSY,
-					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
-					  NULL, "Meter object is being used.");
-	/* Destroy the meter profile. */
-	__atomic_sub_fetch(&fm->profile->ref_cnt,
-						1, __ATOMIC_RELAXED);
-	/* Destroy the meter policy. */
-	policy = mlx5_flow_meter_policy_find(dev,
-			fm->policy_id, NULL);
-	__atomic_sub_fetch(&policy->ref_cnt,
-						1, __ATOMIC_RELAXED);
-	memset(fm, 0, sizeof(struct mlx5_flow_meter_info));
-	return 0;
-}
-
 /**
  * Modify meter state.
  *
@@ -2497,14 +1982,6 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
 	.meter_profile_add = mlx5_flow_meter_profile_hws_add,
 	.meter_profile_delete = mlx5_flow_meter_profile_hws_delete,
 	.meter_profile_get = mlx5_flow_meter_profile_get,
-	.meter_policy_validate = mlx5_flow_meter_policy_hws_validate,
-	.meter_policy_add = mlx5_flow_meter_policy_hws_add,
-	.meter_policy_delete = mlx5_flow_meter_policy_hws_delete,
-	.meter_policy_get = mlx5_flow_meter_policy_get,
-	.create = mlx5_flow_meter_hws_create,
-	.destroy = mlx5_flow_meter_hws_destroy,
-	.meter_enable = mlx5_flow_meter_enable,
-	.meter_disable = mlx5_flow_meter_disable,
 	.meter_profile_update = mlx5_flow_meter_profile_update,
 	.meter_dscp_table_update = NULL,
 	.stats_update = NULL,
@@ -2948,14 +2425,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
 				NULL, "MTR object meter profile invalid.");
 		}
 	}
-	if (priv->mtr_bulk.aso) {
-		for (i = 0; i < priv->mtr_config.nb_meters; i++) {
-			aso_mtr = mlx5_aso_meter_by_idx(priv, i);
-			fm = &aso_mtr->fm;
-			if (fm->initialized)
-				mlx5_flow_meter_hws_destroy(dev, i, error);
-		}
-	}
 	if (priv->policy_idx_tbl) {
 		MLX5_L3T_FOREACH(priv->policy_idx_tbl, i, entry) {
 			policy_idx = *(uint32_t *)entry;
@@ -2981,20 +2450,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
 		mlx5_l3t_destroy(priv->policy_idx_tbl);
 		priv->policy_idx_tbl = NULL;
 	}
-#if defined(HAVE_MLX5_HWS_SUPPORT)
-	if (priv->mtr_policy_arr) {
-		struct mlx5_flow_meter_policy *policy;
-
-		for (i = 0; i < priv->mtr_config.nb_meter_policies; i++) {
-			policy = mlx5_flow_meter_policy_find(dev, i,
-							     &policy_idx);
-			if (policy->initialized) {
-				mlx5_flow_meter_policy_hws_delete(dev, i,
-								  error);
-			}
-		}
-	}
-#endif
 	if (priv->mtr_profile_tbl) {
 		MLX5_L3T_FOREACH(priv->mtr_profile_tbl, i, entry) {
 			fmp = entry;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.712944105 +0100
+++ 0022-net-mlx5-remove-unsupported-flow-meter-action-in-HWS.patch	2025-06-12 22:06:23.830043794 +0100
@@ -1 +1 @@
-From 645f240d1cd57d0be1b773c739a5845a7663eeed Mon Sep 17 00:00:00 2001
+From 4901f59024732fd4bcdc09896e9cde2e91104884 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 645f240d1cd57d0be1b773c739a5845a7663eeed ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/mlx5/mlx5_flow_meter.c | 552 -----------------------------
- 2 files changed, 637 deletions(-)
+ drivers/net/mlx5/mlx5_flow_meter.c | 545 -----------------------------
+ 2 files changed, 630 deletions(-)
@@ -22 +23 @@
-index d58f3d10a1..281f23366f 100644
+index 7040dd863d..ec44151302 100644
@@ -25 +26 @@
-@@ -1795,35 +1795,6 @@ flow_hw_represented_port_compile(struct rte_eth_dev *dev,
+@@ -1167,35 +1167,6 @@ flow_hw_represented_port_compile(struct rte_eth_dev *dev,
@@ -53 +54 @@
--	if (mlx5_aso_mtr_wait(priv, aso_mtr, true))
+-	if (mlx5_aso_mtr_wait(priv->sh, MLX5_HW_INV_QUEUE, aso_mtr))
@@ -61 +62 @@
-@@ -2545,7 +2516,6 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev,
+@@ -1389,7 +1360,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
@@ -63 +63,0 @@
- 	bool recom_used = false;
@@ -64,0 +65 @@
+ 	uint16_t action_pos;
@@ -67 +68 @@
- 	int ret, err;
+ 	int err;
@@ -69,2 +70,2 @@
-@@ -2813,27 +2783,6 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev,
- 					 masks, acts, src_pos, dr_pos, &sub_error))
+@@ -1605,27 +1575,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
+ 					 masks, acts, action_pos, &sub_error))
@@ -79 +80,2 @@
--			jump_pos = dr_pos + 1;
+-			action_pos = at->actions_off[actions - at->actions];
+-			jump_pos = action_pos + 1;
@@ -84,2 +86 @@
--							    dr_pos, jump_pos, actions, acts,
--							    &sub_error);
+-						action_pos, jump_pos, actions, acts, &sub_error);
@@ -89,3 +90,3 @@
--								     actions->type,
--								     src_pos,
--								     dr_pos))
+-							actions->type,
+-							actions - action_start,
+-							action_pos))
@@ -95 +96 @@
- 			ret = flow_hw_translate_group(dev, cfg, attr->group,
+ 			flow_hw_translate_group(dev, cfg, attr->group,
@@ -97,2 +98,2 @@
-@@ -3521,7 +3470,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
- 	const struct rte_flow_action_ipv6_ext_push *ipv6_push;
+@@ -2198,7 +2147,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
+ 	const struct rte_flow_action_raw_encap *raw_encap_data;
@@ -103 +104 @@
- 	const struct rte_flow_action_nat64 *nat64_c = NULL;
+ 	uint8_t *buf = job->encap_data;
@@ -105,3 +106,3 @@
-@@ -3694,28 +3642,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
- 						rule_acts + act_data->action_dst,
- 						act_data->shared_meter.id);
+@@ -2348,28 +2296,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
+ 			rule_acts[act_data->action_dst].action =
+ 					priv->hw_vport[port_action->port_id];
@@ -126,3 +127,3 @@
--			flow->jump = jump;
--			flow->flags |= MLX5_FLOW_HW_FLOW_FLAG_FATE_JUMP;
--			if (mlx5_aso_mtr_wait(priv, aso_mtr, true))
+-			job->flow->jump = jump;
+-			job->flow->fate_type = MLX5_FLOW_FATE_JUMP;
+-			if (mlx5_aso_mtr_wait(priv->sh, MLX5_HW_INV_QUEUE, aso_mtr))
@@ -132 +132,0 @@
- 			aux = mlx5_flow_hw_aux(dev->data->port_id, flow);
@@ -134,3 +134,4 @@
-@@ -7345,10 +7271,6 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
- 			}
- 			action_flags |= MLX5_FLOW_ACTION_IPV6_ROUTING_REMOVE;
+ 			/*
+@@ -4082,10 +4008,6 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
+ 			/* TODO: Validation logic */
+ 			action_flags |= MLX5_FLOW_ACTION_DECAP;
@@ -143,3 +144,3 @@
- 			ret = flow_hw_validate_action_meter_mark(dev, action, false, error);
- 			if (ret < 0)
-@@ -7676,13 +7598,6 @@ flow_hw_parse_flow_actions_to_dr_actions(struct rte_eth_dev *dev,
+ 			ret = flow_hw_validate_action_meter_mark(dev, action,
+ 								 error);
+@@ -4321,13 +4243,6 @@ flow_hw_dr_actions_template_create(struct rte_flow_actions_template *at)
@@ -150 +151 @@
--			at->dr_off[i] = curr_off;
+-			at->actions_off[i] = curr_off;
@@ -154 +155 @@
--			action_types[curr_off++] = MLX5DR_ACTION_TYP_TBL;
+-			action_types[curr_off++] = MLX5DR_ACTION_TYP_FT;
@@ -158 +159 @@
- 			at->dr_off[i] = curr_off;
+ 			at->actions_off[i] = curr_off;
@@ -160 +161 @@
-index dab3c4bf77..cd6a804593 100644
+index 0ffe738ec5..4dd751f3d9 100644
@@ -163 +164 @@
-@@ -1166,49 +1166,6 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
+@@ -851,45 +851,6 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
@@ -192,4 +192,0 @@
--	if (mlx5_hws_active(dev) && !mlx5_hw_ctx_validate(dev, NULL))
--		return -rte_mtr_error_set(error, EINVAL,
--					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
--					  "non-template flow engine was not configured");
@@ -213 +210 @@
-@@ -1540,334 +1497,6 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
+@@ -1215,344 +1176,6 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
@@ -245 +242,9 @@
--		return mlx5_flow_meter_policy_delete(dev, policy_id, error);
+-		return -rte_mtr_error_set(error, ENOTSUP,
+-					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+-					  NULL, "Meter policy array is not allocated");
+-	/* Meter id must be valid. */
+-	if (policy_id >= priv->mtr_config.nb_meter_policies)
+-		return -rte_mtr_error_set(error, EINVAL,
+-					  RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
+-					  &policy_id,
+-					  "Meter policy id not valid.");
@@ -356,4 +360,0 @@
--	if (mlx5_hws_active(dev) && !mlx5_hw_ctx_validate(dev, NULL))
--		return -rte_mtr_error_set(error, EINVAL,
--					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
--					  "non-template flow engine was not configured");
@@ -361 +362,7 @@
--		return mlx5_flow_meter_policy_add(dev, policy_id, policy, error);
+-		return -rte_mtr_error_set(error, ENOTSUP,
+-					  RTE_MTR_ERROR_TYPE_METER_POLICY,
+-					  NULL, "Meter policy array is not allocated.");
+-	if (policy_id >= priv->mtr_config.nb_meter_policies)
+-		return -rte_mtr_error_set(error, ENOTSUP,
+-					  RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
+-					  NULL, "Meter policy id not valid.");
@@ -548 +555 @@
-@@ -2239,105 +1868,6 @@ error:
+@@ -1922,92 +1545,6 @@ error:
@@ -580 +586,0 @@
--	struct mlx5_hw_q_job *job;
@@ -583,4 +588,0 @@
--	if (mlx5_hws_active(dev) && !mlx5_hw_ctx_validate(dev, NULL))
--		return -rte_mtr_error_set(error, EINVAL,
--					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
--					  "non-template flow engine was not configured");
@@ -630,10 +632,3 @@
--	job = mlx5_flow_action_job_init(priv, MLX5_HW_INV_QUEUE, NULL, NULL,
--					NULL, MLX5_HW_Q_JOB_TYPE_CREATE, NULL);
--	if (!job)
--		return -rte_mtr_error_set(error, ENOMEM,
--					  RTE_MTR_ERROR_TYPE_MTR_ID,
--					  NULL, "No job context.");
--	ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE, aso_mtr,
--					   &priv->mtr_bulk, job, true);
--	if (ret) {
--		flow_hw_job_put(priv, job, CTRL_QUEUE_ID(priv));
+-	ret = mlx5_aso_meter_update_by_wqe(priv->sh, MLX5_HW_INV_QUEUE, aso_mtr,
+-					   &priv->mtr_bulk, NULL, true);
+-	if (ret)
@@ -641,3 +636,2 @@
--					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
--					  NULL, "Failed to create devx meter.");
--	}
+-			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+-			NULL, "Failed to create devx meter.");
@@ -645,2 +639,2 @@
--	rte_atomic_fetch_add_explicit(&fm->profile->ref_cnt, 1, rte_memory_order_relaxed);
--	rte_atomic_fetch_add_explicit(&policy->ref_cnt, 1, rte_memory_order_relaxed);
+-	__atomic_add_fetch(&fm->profile->ref_cnt, 1, __ATOMIC_RELAXED);
+-	__atomic_add_fetch(&policy->ref_cnt, 1, __ATOMIC_RELAXED);
@@ -654 +648 @@
-@@ -2444,58 +1974,6 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
+@@ -2114,58 +1651,6 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
@@ -699,2 +693,2 @@
--	rte_atomic_fetch_sub_explicit(&fm->profile->ref_cnt,
--						1, rte_memory_order_relaxed);
+-	__atomic_sub_fetch(&fm->profile->ref_cnt,
+-						1, __ATOMIC_RELAXED);
@@ -704,2 +698,2 @@
--	rte_atomic_fetch_sub_explicit(&policy->ref_cnt,
--						1, rte_memory_order_relaxed);
+-	__atomic_sub_fetch(&policy->ref_cnt,
+-						1, __ATOMIC_RELAXED);
@@ -713 +707 @@
-@@ -2835,14 +2313,6 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
+@@ -2497,14 +1982,6 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
@@ -728 +722 @@
-@@ -3286,14 +2756,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
+@@ -2948,14 +2425,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
@@ -743 +737 @@
-@@ -3319,20 +2781,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
+@@ -2981,20 +2450,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: fix maximal queue size query' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (20 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/mlx5: remove unsupported flow meter action in HWS' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/mlx5: align PF and VF/SF MAC address handling' " luca.boccassi
                   ` (48 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Edwin Brossette, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/e9c54705c3230bcc5eb5585347faec0ed7778c9e

Thanks.

Luca Boccassi

---
From e9c54705c3230bcc5eb5585347faec0ed7778c9e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 14 May 2025 10:55:30 +0300
Subject: [PATCH] net/mlx5: fix maximal queue size query

[ upstream commit 9de8acd30d5adfc5b9703d15a3e1babc7d4ddacc ]

The mlx5 PMD manages the device using two modes: the Verbs API
and the DevX API. Each API offers its own method for querying
the maximum work queue size (in descriptors).

The corrected patch enhanced the rte_eth_dev_info_get() API
support in mlx5 PMD to return the true maximum number of descriptors.
It also implemented a limit check during queue creation, but this
was applied only to "DevX mode." Consequently, the "Verbs mode"
was overlooked, leading to malfunction on legacy NICs that do
not support DevX.

This patch adds support for Verbs mode, and all limit checks are
updated accordingly.

Fixes: 4c3d7961d900 ("net/mlx5: fix reported Rx/Tx descriptor limits")

Reported-by: Edwin Brossette <edwin.brossette@6wind.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/common/mlx5/mlx5_prm.h  |  1 +
 drivers/net/mlx5/mlx5.h         |  1 +
 drivers/net/mlx5/mlx5_devx.c    |  2 +-
 drivers/net/mlx5/mlx5_ethdev.c  | 39 +++++++++++++++++++++++++++++----
 drivers/net/mlx5/mlx5_rxq.c     |  2 +-
 drivers/net/mlx5/mlx5_trigger.c |  4 ++--
 drivers/net/mlx5/mlx5_txq.c     | 12 +++++-----
 7 files changed, 47 insertions(+), 14 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index cf525c14df..a57fb235ec 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -35,6 +35,7 @@
 /* Hardware index widths. */
 #define MLX5_CQ_INDEX_WIDTH 24
 #define MLX5_WQ_INDEX_WIDTH 16
+#define MLX5_WQ_INDEX_MAX (1u << (MLX5_WQ_INDEX_WIDTH - 1))
 
 /* WQE Segment sizes in bytes. */
 #define MLX5_WSEG_SIZE 16u
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 7053db5fa7..8052d8c426 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1941,6 +1941,7 @@ int mlx5_representor_info_get(struct rte_eth_dev *dev,
 		(((repr_id) >> 12) & 3)
 uint16_t mlx5_representor_id_encode(const struct mlx5_switch_info *info,
 				    enum rte_eth_representor_type hpf_type);
+uint16_t mlx5_dev_get_max_wq_size(struct mlx5_dev_ctx_shared *sh);
 int mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info);
 int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size);
 const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 7e0ec91328..cca7b86649 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -1513,7 +1513,7 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 	wqe_size = RTE_ALIGN(wqe_size, MLX5_WQE_SIZE) / MLX5_WQE_SIZE;
 	/* Create Send Queue object with DevX. */
 	wqe_n = RTE_MIN((1UL << txq_data->elts_n) * wqe_size,
-			(uint32_t)priv->sh->dev_cap.max_qp_wr);
+			(uint32_t)mlx5_dev_get_max_wq_size(priv->sh));
 	log_desc_n = log2above(wqe_n);
 	ret = mlx5_txq_create_devx_sq_resources(dev, idx, log_desc_n);
 	if (ret) {
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 08c6b18975..169612ca44 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -306,6 +306,37 @@ mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->tx_desc_lim.nb_mtu_seg_max = nb_max;
 }
 
+/**
+ * Get maximal work queue size in WQEs
+ *
+ * @param sh
+ *   Pointer to the device shared context.
+ * @return
+ *   Maximal number of WQEs in queue
+ */
+uint16_t
+mlx5_dev_get_max_wq_size(struct mlx5_dev_ctx_shared *sh)
+{
+	uint16_t max_wqe = MLX5_WQ_INDEX_MAX;
+
+	if (sh->cdev->config.devx) {
+		/* use HCA properties for DevX config */
+		MLX5_ASSERT(sh->cdev->config.hca_attr.log_max_wq_sz != 0);
+		MLX5_ASSERT(sh->cdev->config.hca_attr.log_max_wq_sz < MLX5_WQ_INDEX_WIDTH);
+		if (sh->cdev->config.hca_attr.log_max_wq_sz != 0 &&
+		    sh->cdev->config.hca_attr.log_max_wq_sz < MLX5_WQ_INDEX_WIDTH)
+			max_wqe = 1u << sh->cdev->config.hca_attr.log_max_wq_sz;
+	} else {
+		/* use IB device capabilities */
+		MLX5_ASSERT(sh->dev_cap.max_qp_wr > 0);
+		MLX5_ASSERT((unsigned int)sh->dev_cap.max_qp_wr <= MLX5_WQ_INDEX_MAX);
+		if (sh->dev_cap.max_qp_wr > 0 &&
+		    (uint32_t)sh->dev_cap.max_qp_wr <= MLX5_WQ_INDEX_MAX)
+			max_wqe = (uint16_t)sh->dev_cap.max_qp_wr;
+	}
+	return max_wqe;
+}
+
 /**
  * DPDK callback to get information about the device.
  *
@@ -319,6 +350,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	unsigned int max;
+	uint16_t max_wqe;
 
 	/* FIXME: we should ask the device for these values. */
 	info->min_rx_bufsize = 32;
@@ -351,10 +383,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->flow_type_rss_offloads = ~MLX5_RSS_HF_MASK;
 	mlx5_set_default_params(dev, info);
 	mlx5_set_txlimit_params(dev, info);
-	info->rx_desc_lim.nb_max =
-		1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz;
-	info->tx_desc_lim.nb_max =
-		1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz;
+	max_wqe = mlx5_dev_get_max_wq_size(priv->sh);
+	info->rx_desc_lim.nb_max = max_wqe;
+	info->tx_desc_lim.nb_max = max_wqe;
 	if (priv->sh->cdev->config.hca_attr.mem_rq_rmp &&
 	    priv->obj_ops.rxq_obj_new == devx_obj_ops.rxq_obj_new)
 		info->dev_capa |= RTE_ETH_DEV_CAPA_RXQ_SHARE;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index fcf6ab54b6..dfbb3b9a16 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -652,7 +652,7 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
 	struct mlx5_rxq_priv *rxq;
 	bool empty;
 
-	if (*desc > 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz) {
+	if (*desc > mlx5_dev_get_max_wq_size(priv->sh)) {
 		DRV_LOG(ERR,
 			"port %u number of descriptors requested for Rx queue"
 			" %u is more than supported",
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 786e638f95..b2e860d149 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -215,8 +215,8 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
 		/* Should not release Rx queues but return immediately. */
 		return -rte_errno;
 	}
-	DRV_LOG(DEBUG, "Port %u dev_cap.max_qp_wr is %d.",
-		dev->data->port_id, priv->sh->dev_cap.max_qp_wr);
+	DRV_LOG(DEBUG, "Port %u max work queue size is %d.",
+		dev->data->port_id, mlx5_dev_get_max_wq_size(priv->sh));
 	DRV_LOG(DEBUG, "Port %u dev_cap.max_sge is %d.",
 		dev->data->port_id, priv->sh->dev_cap.max_sge);
 	for (i = 0; i != priv->rxqs_n; ++i) {
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index cdc9755fe0..9869cd4577 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -332,7 +332,7 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 
-	if (*desc > 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz) {
+	if (*desc > mlx5_dev_get_max_wq_size(priv->sh)) {
 		DRV_LOG(ERR,
 			"port %u number of descriptors requested for Tx queue"
 			" %u is more than supported",
@@ -726,7 +726,7 @@ txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
 	struct mlx5_priv *priv = txq_ctrl->priv;
 	unsigned int wqe_size;
 
-	wqe_size = priv->sh->dev_cap.max_qp_wr / desc;
+	wqe_size = mlx5_dev_get_max_wq_size(priv->sh) / desc;
 	if (!wqe_size)
 		return 0;
 	/*
@@ -1081,6 +1081,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_txq_ctrl *tmpl;
+	uint16_t max_wqe;
 
 	tmpl = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO, sizeof(*tmpl) +
 			   desc * sizeof(struct rte_mbuf *), 0, socket);
@@ -1106,13 +1107,12 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	txq_set_params(tmpl);
 	if (txq_adjust_params(tmpl))
 		goto error;
-	if (txq_calc_wqebb_cnt(tmpl) >
-	    priv->sh->dev_cap.max_qp_wr) {
+	max_wqe = mlx5_dev_get_max_wq_size(priv->sh);
+	if (txq_calc_wqebb_cnt(tmpl) > max_wqe) {
 		DRV_LOG(ERR,
 			"port %u Tx WQEBB count (%d) exceeds the limit (%d),"
 			" try smaller queue size",
-			dev->data->port_id, txq_calc_wqebb_cnt(tmpl),
-			priv->sh->dev_cap.max_qp_wr);
+			dev->data->port_id, txq_calc_wqebb_cnt(tmpl), max_wqe);
 		rte_errno = ENOMEM;
 		goto error;
 	}
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.754365555 +0100
+++ 0023-net-mlx5-fix-maximal-queue-size-query.patch	2025-06-12 22:06:23.838043962 +0100
@@ -1 +1 @@
-From 9de8acd30d5adfc5b9703d15a3e1babc7d4ddacc Mon Sep 17 00:00:00 2001
+From e9c54705c3230bcc5eb5585347faec0ed7778c9e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9de8acd30d5adfc5b9703d15a3e1babc7d4ddacc ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index 742c274a85..7accdeab87 100644
+index cf525c14df..a57fb235ec 100644
@@ -40 +41 @@
-@@ -41,6 +41,7 @@
+@@ -35,6 +35,7 @@
@@ -49 +50 @@
-index 36f11b9c51..5695d0f54a 100644
+index 7053db5fa7..8052d8c426 100644
@@ -52 +53 @@
-@@ -2303,6 +2303,7 @@ int mlx5_representor_info_get(struct rte_eth_dev *dev,
+@@ -1941,6 +1941,7 @@ int mlx5_representor_info_get(struct rte_eth_dev *dev,
@@ -59 +60 @@
- const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev,
+ const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev);
@@ -61 +62 @@
-index a12891a983..9711746edb 100644
+index 7e0ec91328..cca7b86649 100644
@@ -64 +65 @@
-@@ -1593,7 +1593,7 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
+@@ -1513,7 +1513,7 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
@@ -74 +75 @@
-index 7708a0b808..a50320075c 100644
+index 08c6b18975..169612ca44 100644
@@ -77 +78 @@
-@@ -314,6 +314,37 @@ mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -306,6 +306,37 @@ mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -115 +116 @@
-@@ -327,6 +358,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -319,6 +350,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -123 +124 @@
-@@ -359,10 +391,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -351,10 +383,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -138 +139 @@
-index ab29b43875..b676e5394b 100644
+index fcf6ab54b6..dfbb3b9a16 100644
@@ -141 +142 @@
-@@ -656,7 +656,7 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
+@@ -652,7 +652,7 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
@@ -151 +152 @@
-index 4ee44e9165..8145ad4233 100644
+index 786e638f95..b2e860d149 100644
@@ -154 +155 @@
-@@ -217,8 +217,8 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
+@@ -215,8 +215,8 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
@@ -166 +167 @@
-index ddd3a66282..5fee5bc4e8 100644
+index cdc9755fe0..9869cd4577 100644
@@ -169 +170 @@
-@@ -334,7 +334,7 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
+@@ -332,7 +332,7 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
@@ -178 +179 @@
-@@ -728,7 +728,7 @@ txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -726,7 +726,7 @@ txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
@@ -187 +188 @@
-@@ -1054,6 +1054,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1081,6 +1081,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -195,2 +196 @@
-@@ -1078,13 +1079,12 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
- 	tmpl->txq.idx = idx;
+@@ -1106,13 +1107,12 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -198 +198,2 @@
- 	txq_adjust_params(tmpl);
+ 	if (txq_adjust_params(tmpl))
+ 		goto error;

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: align PF and VF/SF MAC address handling' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (21 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/mlx5: fix maximal queue size query' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'app/testpmd: fix RSS hash key update' " luca.boccassi
                   ` (47 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Gavin Li; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/ed3411217b48130b7aa52cf26022a6f00678e72f

Thanks.

Luca Boccassi

---
From ed3411217b48130b7aa52cf26022a6f00678e72f Mon Sep 17 00:00:00 2001
From: Gavin Li <gavinl@nvidia.com>
Date: Fri, 16 May 2025 10:10:32 +0300
Subject: [PATCH] net/mlx5: align PF and VF/SF MAC address handling

[ upstream commit 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a ]

In the mlx5_dev_spawn function, the Virtual Function (VF) synchronizes MAC
addresses from the kernel using netlink. It queries the netdev-configured
MACs and populates the list in the PMD device data, including multicast
MAC addresses. These addresses are later used for control flow creation,
allowing traffic for the listed MACs to be received. However, the Physical
Function (PF) does not synchronize with the kernel and thus does not add
any multicast MAC address rules when enabling traffic. This discrepancy
causes the IFF_ALLMULTI ioctl code to malfunction, as it fails to disable
all multicast traffic, leaving the VF still able to see it.

To align PF and VF behavior, only unicast MAC address flows should be
added.

Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 3 ++-
 drivers/net/mlx5/mlx5_trigger.c  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index b59d559c4f..073d81291a 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1525,7 +1525,8 @@ err_secondary:
 	eth_dev->rx_queue_count = mlx5_rx_queue_count;
 	/* Register MAC address. */
 	claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
-	if (sh->dev_cap.vf && sh->config.vf_nl_en)
+	/* Sync mac addresses for PF or VF/SF if vf_nl_en is true */
+	if ((!sh->dev_cap.vf && !sh->dev_cap.sf) || sh->config.vf_nl_en)
 		mlx5_nl_mac_addr_sync(priv->nl_socket_route,
 				      mlx5_ifindex(eth_dev),
 				      eth_dev->data->mac_addrs,
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index b2e860d149..198eeb019c 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1705,7 +1705,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
 	for (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) {
 		struct rte_ether_addr *mac = &dev->data->mac_addrs[i];
 
-		if (!memcmp(mac, &cmp, sizeof(*mac)))
+		if (!memcmp(mac, &cmp, sizeof(*mac)) || rte_is_multicast_ether_addr(mac))
 			continue;
 		memcpy(&unicast.dst.addr_bytes,
 		       mac->addr_bytes,
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.795576766 +0100
+++ 0024-net-mlx5-align-PF-and-VF-SF-MAC-address-handling.patch	2025-06-12 22:06:23.838043962 +0100
@@ -1 +1 @@
-From 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a Mon Sep 17 00:00:00 2001
+From ed3411217b48130b7aa52cf26022a6f00678e72f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 573e846ed2..696a3e12c7 100644
+index b59d559c4f..073d81291a 100644
@@ -33 +34 @@
-@@ -1603,7 +1603,8 @@ err_secondary:
+@@ -1525,7 +1525,8 @@ err_secondary:
@@ -44 +45 @@
-index 8145ad4233..485984f9b0 100644
+index b2e860d149..198eeb019c 100644
@@ -47 +48 @@
-@@ -1714,7 +1714,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
+@@ -1705,7 +1705,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
@@ -54 +55 @@
- 		memcpy(&unicast.hdr.dst_addr.addr_bytes,
+ 		memcpy(&unicast.dst.addr_bytes,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'app/testpmd: fix RSS hash key update' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (22 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/mlx5: align PF and VF/SF MAC address handling' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/af_xdp: fix use after free in zero-copy Tx' " luca.boccassi
                   ` (46 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 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.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/90f0e78cdc9c1a6c838ff7a4c7f95856dfa20ec5

Thanks.

Luca Boccassi

---
From 90f0e78cdc9c1a6c838ff7a4c7f95856dfa20ec5 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 1 Apr 2025 15:48:36 +0800
Subject: [PATCH] app/testpmd: fix RSS hash key update

[ upstream commit 24e94a4c86c52f45a7a7c139e4e8484f3afe6d8f ]

There has logic problem in 'port_rss_hash_key_update()', the user input
will be overwritten by the call to 'rte_eth_dev_rss_hash_conf_get()',
so the RSS functions will not get update as expected.

------
testpmd> show port 0 rss-hash key
RSS functions:
  ipv4 ipv6
RSS key:
6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B7
3BBEAC01FA
testpmd> port config 0 rss-hash-key ipv6-tcp 6D5A56DA255B0EC24167253D
43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B73BBEAC01FA
testpmd> show port 0 rss-hash key
RSS functions:
  ipv4 ipv6
RSS key:
6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B7
3BBEAC01FA
testpmd>
------

Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")

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>
---
 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 7c58fed413..17c335e625 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4184,11 +4184,12 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
 
 	rss_conf.rss_key = NULL;
 	rss_conf.rss_key_len = 0;
-	rss_conf.rss_hf = str_to_rsstypes(rss_type);
+	rss_conf.rss_hf = 0;
 	diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf);
 	if (diag == 0) {
 		rss_conf.rss_key = hash_key;
 		rss_conf.rss_key_len = hash_key_len;
+		rss_conf.rss_hf = str_to_rsstypes(rss_type);
 		diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf);
 	}
 	if (diag == 0)
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.830451928 +0100
+++ 0025-app-testpmd-fix-RSS-hash-key-update.patch	2025-06-12 22:06:23.842044047 +0100
@@ -1 +1 @@
-From 24e94a4c86c52f45a7a7c139e4e8484f3afe6d8f Mon Sep 17 00:00:00 2001
+From 90f0e78cdc9c1a6c838ff7a4c7f95856dfa20ec5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24e94a4c86c52f45a7a7c139e4e8484f3afe6d8f ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index e89af21cec..c32e011fa6 100644
+index 7c58fed413..17c335e625 100644
@@ -42 +43 @@
-@@ -4806,11 +4806,12 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
+@@ -4184,11 +4184,12 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/af_xdp: fix use after free in zero-copy Tx' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (23 preceding siblings ...)
  2025-06-12 21:06 ` patch 'app/testpmd: fix RSS hash key update' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/hns3: fix integer overflow in interrupt unmap' " luca.boccassi
                   ` (45 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Ariel Otilibili; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/081c838388a346c2145e3c2ad71d375a587d178c

Thanks.

Luca Boccassi

---
From 081c838388a346c2145e3c2ad71d375a587d178c Mon Sep 17 00:00:00 2001
From: Ariel Otilibili <ariel.otilibili@6wind.com>
Date: Wed, 26 Feb 2025 21:08:40 +0100
Subject: [PATCH] net/af_xdp: fix use after free in zero-copy Tx

[ upstream commit a23bf7fde78b10afbbafda252f15495b26e010a9 ]

tx_bytes is computed after both legs are tested. This might
produce a use after memory free.

The computation is now moved into each leg.

Bugzilla ID: 1440
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: Ariel Otilibili <ariel.otilibili@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 .mailmap                            | 1 +
 drivers/net/af_xdp/rte_eth_af_xdp.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index b4cce78ea6..7bbd4bb02e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -121,6 +121,7 @@ Anupam Kapoor <anupam.kapoor@gmail.com>
 Apeksha Gupta <apeksha.gupta@nxp.com>
 Archana Muniganti <marchana@marvell.com> <muniganti.archana@caviumnetworks.com>
 Archit Pandey <architpandeynitk@gmail.com>
+Ariel Otilibili <ariel.otilibili@6wind.com> <otilibil@eurecom.fr>
 Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
 Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
 Arnon Warshavsky <arnon@qwilt.com>
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 343b4c40c9..5b50fd3b6b 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -544,6 +544,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 					umem->mb_pool->header_size;
 			offset = offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT;
 			desc->addr = addr | offset;
+			tx_bytes += desc->len;
 			count++;
 		} else {
 			struct rte_mbuf *local_mbuf =
@@ -571,11 +572,10 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			desc->addr = addr | offset;
 			rte_memcpy(pkt, rte_pktmbuf_mtod(mbuf, void *),
 					desc->len);
+			tx_bytes += desc->len;
 			rte_pktmbuf_free(mbuf);
 			count++;
 		}
-
-		tx_bytes += mbuf->pkt_len;
 	}
 
 out:
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.866146174 +0100
+++ 0026-net-af_xdp-fix-use-after-free-in-zero-copy-Tx.patch	2025-06-12 22:06:23.842044047 +0100
@@ -1 +1 @@
-From a23bf7fde78b10afbbafda252f15495b26e010a9 Mon Sep 17 00:00:00 2001
+From 081c838388a346c2145e3c2ad71d375a587d178c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a23bf7fde78b10afbbafda252f15495b26e010a9 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- .mailmap                            | 2 +-
+ .mailmap                            | 1 +
@@ -20 +21 @@
- 2 files changed, 3 insertions(+), 3 deletions(-)
+ 2 files changed, 3 insertions(+), 2 deletions(-)
@@ -23 +24 @@
-index 4b781bd3fb..822936f615 100644
+index b4cce78ea6..7bbd4bb02e 100644
@@ -26 +27 @@
-@@ -135,7 +135,7 @@ Anupam Kapoor <anupam.kapoor@gmail.com>
+@@ -121,6 +121,7 @@ Anupam Kapoor <anupam.kapoor@gmail.com>
@@ -30 +30,0 @@
--Ariel Otilibili <otilibil@eurecom.fr> <ariel.otilibili@6wind.com>
@@ -34 +34 @@
- Arnaud Fiorini <arnaud.fiorini@polymtl.ca>
+ Arnon Warshavsky <arnon@qwilt.com>
@@ -36 +36 @@
-index 814398ba4b..092bcb73aa 100644
+index 343b4c40c9..5b50fd3b6b 100644
@@ -39 +39 @@
-@@ -574,6 +574,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -544,6 +544,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -47 +47 @@
-@@ -601,11 +602,10 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -571,11 +572,10 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix integer overflow in interrupt unmap' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (24 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/af_xdp: fix use after free in zero-copy Tx' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/hns3: fix memory leak on failure' " luca.boccassi
                   ` (44 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/34a9e04b4743b066c45183c93fc3024dea16dda5

Thanks.

Luca Boccassi

---
From 34a9e04b4743b066c45183c93fc3024dea16dda5 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:54 +0800
Subject: [PATCH] net/hns3: fix integer overflow in interrupt unmap

[ upstream commit e401c04481c7a6a4199504d6f4696c48620ff093 ]

The number of interrupt vector may exceed the range of uint8_t.
So hns3_unmap_rx_interrupt() should use uint16_t for 'vec' variable.

Fixes: 02a7b55657b2 ("net/hns3: support Rx interrupt")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index c51af055d3..812ebca342 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -794,8 +794,8 @@ hns3_unmap_rx_interrupt(struct rte_eth_dev *dev)
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	uint8_t base = RTE_INTR_VEC_ZERO_OFFSET;
-	uint8_t vec = RTE_INTR_VEC_ZERO_OFFSET;
+	uint16_t base = RTE_INTR_VEC_ZERO_OFFSET;
+	uint16_t vec = RTE_INTR_VEC_ZERO_OFFSET;
 	uint16_t q_id;
 
 	if (dev->data->dev_conf.intr_conf.rxq == 0)
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.901233850 +0100
+++ 0027-net-hns3-fix-integer-overflow-in-interrupt-unmap.patch	2025-06-12 22:06:23.846044130 +0100
@@ -1 +1 @@
-From e401c04481c7a6a4199504d6f4696c48620ff093 Mon Sep 17 00:00:00 2001
+From 34a9e04b4743b066c45183c93fc3024dea16dda5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e401c04481c7a6a4199504d6f4696c48620ff093 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 25a45212be..dc70bf3cff 100644
+index c51af055d3..812ebca342 100644
@@ -21 +22 @@
-@@ -882,8 +882,8 @@ hns3_unmap_rx_interrupt(struct rte_eth_dev *dev)
+@@ -794,8 +794,8 @@ hns3_unmap_rx_interrupt(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix memory leak on failure' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (25 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/hns3: fix integer overflow in interrupt unmap' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/hns3: fix extra wait for link up' " luca.boccassi
                   ` (43 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/48ae218283ce18fec7fdb164ea232ba2d86d337a

Thanks.

Luca Boccassi

---
From 48ae218283ce18fec7fdb164ea232ba2d86d337a Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:55 +0800
Subject: [PATCH] net/hns3: fix memory leak on failure

[ upstream commit 1c27385dcef1384a1a10edd86bb843b06547b161 ]

When the hns3_dfx_reg_fetch_data() function returns from processing
failure, cmd_descs is not freed, which leads to leakage.
This patch fit it.

By the way, this patch uses calloc to apply for heap memory instead
of hugepage memory.

Fixes: ef1fbd355451 ("net/hns3: add more registers to dump")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index e92e43959f..816e191808 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -445,7 +445,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
 	for (i = 0; i < opcode_num; i++)
 		max_bd_num = RTE_MAX(bd_num_list[i], max_bd_num);
 
-	cmd_descs = rte_zmalloc(NULL, sizeof(*cmd_descs) * max_bd_num, 0);
+	cmd_descs = calloc(max_bd_num, sizeof(*cmd_descs));
 	if (cmd_descs == NULL)
 		return -ENOMEM;
 
@@ -459,7 +459,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
 			break;
 		reg_val += hns3_dfx_reg_fetch_data(cmd_descs, bd_num, reg_val);
 	}
-	rte_free(cmd_descs);
+	free(cmd_descs);
 	*data = (void *)reg_val;
 
 	return ret;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.933504122 +0100
+++ 0028-net-hns3-fix-memory-leak-on-failure.patch	2025-06-12 22:06:23.846044130 +0100
@@ -1 +1 @@
-From 1c27385dcef1384a1a10edd86bb843b06547b161 Mon Sep 17 00:00:00 2001
+From 48ae218283ce18fec7fdb164ea232ba2d86d337a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c27385dcef1384a1a10edd86bb843b06547b161 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/hns3/hns3_regs.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ drivers/net/hns3/hns3_regs.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -22 +23 @@
-index 8a6ddbfe8c..5c74f9ae2e 100644
+index e92e43959f..816e191808 100644
@@ -25 +26 @@
-@@ -1270,7 +1270,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, struct rte_dev_reg_info *regs, uint32_t mo
+@@ -445,7 +445,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
@@ -34,10 +35,3 @@
-@@ -1290,13 +1290,14 @@ hns3_get_dfx_regs(struct hns3_hw *hw, struct rte_dev_reg_info *regs, uint32_t mo
- 		if (regs_num !=  hns3_reg_lists[i].entry_num) {
- 			hns3_err(hw, "Query register number differ from the list for module %s!",
- 				 hns3_get_name_by_module(i));
-+			free(cmd_descs);
- 			return -EINVAL;
- 		}
- 		hns3_fill_dfx_regs_name(hw, regs, hns3_reg_lists[i].reg_list, regs_num);
- 		regs->length += regs_num;
- 		data += regs_num;
+@@ -459,7 +459,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
+ 			break;
+ 		reg_val += hns3_dfx_reg_fetch_data(cmd_descs, bd_num, reg_val);
@@ -46,0 +41 @@
+ 	*data = (void *)reg_val;
@@ -49 +43,0 @@
- }

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix extra wait for link up' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (26 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/hns3: fix memory leak on failure' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/hns3: fix memory leak for indirect flow action' " luca.boccassi
                   ` (42 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/29b4c863067a3708647ed76db684dfa966b60fd3

Thanks.

Luca Boccassi

---
From 29b4c863067a3708647ed76db684dfa966b60fd3 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:56 +0800
Subject: [PATCH] net/hns3: fix extra wait for link up

[ upstream commit 7c8cbd3c8ae0cec66fbd5acb89a62ee9742c70b4 ]

If the link auto-negotiation of the NIC is disabled,
or the flow control auto-negotiation is not supported,
it's unnecessary to wait for link establishment.

Fixes: 1f411e31a826 ("net/hns3: support flow control autoneg for copper port")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index e39d0fdb21..a98056b0c0 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5342,12 +5342,6 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct hns3_mac *mac = &hw->mac;
 
-	/*
-	 * When the flow control mode is obtained, the device may not complete
-	 * auto-negotiation. It is necessary to wait for link establishment.
-	 */
-	(void)hns3_dev_link_update(dev, 1);
-
 	/*
 	 * If the link auto-negotiation of the nic is disabled, or the flow
 	 * control auto-negotiation is not supported, the forced flow control
@@ -5356,6 +5350,12 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)
 	if (mac->link_autoneg == 0 || !pf->support_fc_autoneg)
 		return hw->requested_fc_mode;
 
+	/*
+	 * When the flow control mode is obtained, the device may not complete
+	 * auto-negotiation. It is necessary to wait for link establishment.
+	 */
+	(void)hns3_dev_link_update(dev, 1);
+
 	return hns3_get_autoneg_fc_mode(hw);
 }
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:24.965746239 +0100
+++ 0029-net-hns3-fix-extra-wait-for-link-up.patch	2025-06-12 22:06:23.846044130 +0100
@@ -1 +1 @@
-From 7c8cbd3c8ae0cec66fbd5acb89a62ee9742c70b4 Mon Sep 17 00:00:00 2001
+From 29b4c863067a3708647ed76db684dfa966b60fd3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c8cbd3c8ae0cec66fbd5acb89a62ee9742c70b4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 9f7119b734..20ad249b8b 100644
+index e39d0fdb21..a98056b0c0 100644
@@ -22 +23 @@
-@@ -5308,12 +5308,6 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)
+@@ -5342,12 +5342,6 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)
@@ -35 +36 @@
-@@ -5322,6 +5316,12 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)
+@@ -5356,6 +5350,12 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix memory leak for indirect flow action' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (27 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/hns3: fix extra wait for link up' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/hns3: fix interrupt rollback' " luca.boccassi
                   ` (41 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/399fda81668431073978e0d58f98ea4e36996648

Thanks.

Luca Boccassi

---
From 399fda81668431073978e0d58f98ea4e36996648 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:57 +0800
Subject: [PATCH] net/hns3: fix memory leak for indirect flow action

[ upstream commit 18596f7be8f93e159e98704af12b1cc8af289dd6 ]

Currently, when the application creates an indirect action,
the hns3 driver allocates a memory for the structure
rte_flow_action_handle and returns this structure pointer to
application. When the application invokes the destroy function
to destroy the indirect action, the driver releases the memory.

However, when the application destroys all flows by using the
flush function before destroying the indirect action, the memory
is not released. This patch fix it by using uint64_t instead of
rte_flow_action_handle* to store indirect action avoids memory
leakage.

Fixes: fdfcb94d8fb3 ("net/hns3: support indirect counter flow action")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 41 ++++++++++++++++--------------------
 drivers/net/hns3/hns3_flow.h |  9 ++++++--
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 9fbdf1dbe9..e1180e4fec 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -470,19 +470,20 @@ hns3_handle_action_indirect(struct rte_eth_dev *dev,
 			    struct hns3_fdir_rule *rule,
 			    struct rte_flow_error *error)
 {
-	const struct rte_flow_action_handle *indir = action->conf;
+	struct rte_flow_action_handle indir;
 
-	if (indir->indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT)
+	indir.val64 = (uint64_t)action->conf;
+	if (indir.indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT)
 		return rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 				action, "Invalid indirect type");
 
-	if (hns3_counter_lookup(dev, indir->counter_id) == NULL)
+	if (hns3_counter_lookup(dev, indir.counter_id) == NULL)
 		return rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 				action, "Counter id not exist");
 
-	rule->act_cnt.id = indir->counter_id;
+	rule->act_cnt.id = indir.counter_id;
 	rule->flags |= (HNS3_RULE_FLAG_COUNTER | HNS3_RULE_FLAG_COUNTER_INDIR);
 
 	return 0;
@@ -2548,20 +2549,12 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	const struct rte_flow_action_count *act_count;
-	struct rte_flow_action_handle *handle = NULL;
+	struct rte_flow_action_handle handle;
 	struct hns3_flow_counter *counter;
 
 	if (hns3_check_indir_action(conf, action, error))
 		return NULL;
 
-	handle = rte_zmalloc("hns3 action handle",
-			     sizeof(struct rte_flow_action_handle), 0);
-	if (handle == NULL) {
-		rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
-				   NULL, "Failed to allocate action memory");
-		return NULL;
-	}
-
 	pthread_mutex_lock(&hw->flows_lock);
 
 	act_count = (const struct rte_flow_action_count *)action->conf;
@@ -2584,15 +2577,14 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
 	}
 
 	counter->indirect = true;
-	handle->indirect_type = HNS3_INDIRECT_ACTION_TYPE_COUNT;
-	handle->counter_id = counter->id;
+	handle.indirect_type = HNS3_INDIRECT_ACTION_TYPE_COUNT;
+	handle.counter_id = counter->id;
 
 	pthread_mutex_unlock(&hw->flows_lock);
-	return handle;
+	return (struct rte_flow_action_handle *)handle.val64;
 
 err_exit:
 	pthread_mutex_unlock(&hw->flows_lock);
-	rte_free(handle);
 	return NULL;
 }
 
@@ -2602,18 +2594,20 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
 			 struct rte_flow_error *error)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_flow_action_handle indir;
 	struct hns3_flow_counter *counter;
 
 	pthread_mutex_lock(&hw->flows_lock);
 
-	if (handle->indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
+	indir.val64 = (uint64_t)handle;
+	if (indir.indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
 		pthread_mutex_unlock(&hw->flows_lock);
 		return rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					handle, "Invalid indirect type");
 	}
 
-	counter = hns3_counter_lookup(dev, handle->counter_id);
+	counter = hns3_counter_lookup(dev, indir.counter_id);
 	if (counter == NULL) {
 		pthread_mutex_unlock(&hw->flows_lock);
 		return rte_flow_error_set(error, EINVAL,
@@ -2628,8 +2622,7 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
 				handle, "Counter id in use");
 	}
 
-	(void)hns3_counter_release(dev, handle->counter_id);
-	rte_free(handle);
+	(void)hns3_counter_release(dev, indir.counter_id);
 
 	pthread_mutex_unlock(&hw->flows_lock);
 	return 0;
@@ -2642,12 +2635,14 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
 		 struct rte_flow_error *error)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_flow_action_handle indir;
 	struct rte_flow flow;
 	int ret;
 
 	pthread_mutex_lock(&hw->flows_lock);
 
-	if (handle->indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
+	indir.val64 = (uint64_t)handle;
+	if (indir.indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
 		pthread_mutex_unlock(&hw->flows_lock);
 		return rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_ACTION_CONF,
@@ -2655,7 +2650,7 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
 	}
 
 	memset(&flow, 0, sizeof(flow));
-	flow.counter_id = handle->counter_id;
+	flow.counter_id = indir.counter_id;
 	ret = hns3_counter_query(dev, &flow,
 				 (struct rte_flow_query_count *)data, error);
 	pthread_mutex_unlock(&hw->flows_lock);
diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h
index 1b49673f11..612890391d 100644
--- a/drivers/net/hns3/hns3_flow.h
+++ b/drivers/net/hns3/hns3_flow.h
@@ -50,8 +50,13 @@ enum {
 };
 
 struct rte_flow_action_handle {
-	int indirect_type;
-	uint32_t counter_id;
+	union {
+		uint64_t val64;
+		struct {
+			int indirect_type;
+			uint32_t counter_id;
+		};
+	};
 };
 
 union hns3_filter_conf {
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.012167212 +0100
+++ 0030-net-hns3-fix-memory-leak-for-indirect-flow-action.patch	2025-06-12 22:06:23.850044215 +0100
@@ -1 +1 @@
-From 18596f7be8f93e159e98704af12b1cc8af289dd6 Mon Sep 17 00:00:00 2001
+From 399fda81668431073978e0d58f98ea4e36996648 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 18596f7be8f93e159e98704af12b1cc8af289dd6 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 266934b45b..c0238d2bfa 100644
+index 9fbdf1dbe9..e1180e4fec 100644
@@ -31 +32 @@
-@@ -473,19 +473,20 @@ hns3_handle_action_indirect(struct rte_eth_dev *dev,
+@@ -470,19 +470,20 @@ hns3_handle_action_indirect(struct rte_eth_dev *dev,
@@ -56 +57 @@
-@@ -2726,20 +2727,12 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
+@@ -2548,20 +2549,12 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
@@ -78 +79 @@
-@@ -2762,15 +2755,14 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
+@@ -2584,15 +2577,14 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
@@ -97 +98 @@
-@@ -2780,18 +2772,20 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
+@@ -2602,18 +2594,20 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
@@ -120 +121 @@
-@@ -2806,8 +2800,7 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
+@@ -2628,8 +2622,7 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
@@ -130 +131 @@
-@@ -2820,12 +2813,14 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
+@@ -2642,12 +2635,14 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
@@ -146 +147 @@
-@@ -2833,7 +2828,7 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
+@@ -2655,7 +2650,7 @@ hns3_flow_action_query(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix interrupt rollback' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (28 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/hns3: fix memory leak for indirect flow action' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/hns3: fix divide by zero' " luca.boccassi
                   ` (40 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/38eb97771c115373ff9aa4a99e53679aad9674bd

Thanks.

Luca Boccassi

---
From 38eb97771c115373ff9aa4a99e53679aad9674bd Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:58 +0800
Subject: [PATCH] net/hns3: fix interrupt rollback

[ upstream commit 9e911049ac5188be7e080aa8699c0d8e97b32110 ]

When the port is started, if the Tx queue fails to be started,
the map interrupt should be rolled back.

Fixes: fdfde7a4a0f8 ("net/hns3: fix mbuf leakage")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index a98056b0c0..91d7dc12d2 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5134,7 +5134,7 @@ hns3_dev_start(struct rte_eth_dev *dev)
 	 */
 	ret = hns3_start_all_txqs(dev);
 	if (ret)
-		goto map_rx_inter_err;
+		goto start_all_txqs_fail;
 
 	ret = hns3_start_all_rxqs(dev);
 	if (ret)
@@ -5167,6 +5167,8 @@ hns3_dev_start(struct rte_eth_dev *dev)
 
 start_all_rxqs_fail:
 	hns3_stop_all_txqs(dev);
+start_all_txqs_fail:
+	hns3_unmap_rx_interrupt(dev);
 map_rx_inter_err:
 	(void)hns3_do_stop(hns);
 do_start_fail:
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.046247567 +0100
+++ 0031-net-hns3-fix-interrupt-rollback.patch	2025-06-12 22:06:23.850044215 +0100
@@ -1 +1 @@
-From 9e911049ac5188be7e080aa8699c0d8e97b32110 Mon Sep 17 00:00:00 2001
+From 38eb97771c115373ff9aa4a99e53679aad9674bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e911049ac5188be7e080aa8699c0d8e97b32110 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 20ad249b8b..2b56b6e44e 100644
+index a98056b0c0..91d7dc12d2 100644
@@ -21 +22 @@
-@@ -5122,7 +5122,7 @@ hns3_dev_start(struct rte_eth_dev *dev)
+@@ -5134,7 +5134,7 @@ hns3_dev_start(struct rte_eth_dev *dev)
@@ -30 +31 @@
-@@ -5155,6 +5155,8 @@ hns3_dev_start(struct rte_eth_dev *dev)
+@@ -5167,6 +5167,8 @@ hns3_dev_start(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix divide by zero' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (29 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/hns3: fix interrupt rollback' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/hns3: fix resources release on reset' " luca.boccassi
                   ` (39 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/077396a3d01ceea19bab0085584c9ceb45819fcc

Thanks.

Luca Boccassi

---
From 077396a3d01ceea19bab0085584c9ceb45819fcc Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:59 +0800
Subject: [PATCH] net/hns3: fix divide by zero

[ upstream commit a88f60f32de6f94a5acbf2101cb5e527fac0b2d2 ]

Driver may encounter divide-by-zero if the total_tqps_num
and rss_size_max in hw structure from firmware are zero.
So add some verification to them.

Fixes: d51867db65c1 ("net/hns3: add initialization")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 91d7dc12d2..2c3a992e1a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2548,6 +2548,10 @@ hns3_query_pf_resource(struct hns3_hw *hw)
 	req = (struct hns3_pf_res_cmd *)desc.data;
 	hw->total_tqps_num = rte_le_to_cpu_16(req->tqp_num) +
 			     rte_le_to_cpu_16(req->ext_tqp_num);
+	if (hw->total_tqps_num == 0) {
+		PMD_INIT_LOG(ERR, "the total tqp number of the port is 0.");
+		return -EINVAL;
+	}
 	ret = hns3_get_pf_max_tqp_num(hw);
 	if (ret)
 		return ret;
@@ -2799,6 +2803,7 @@ hns3_check_media_type(struct hns3_hw *hw, uint8_t media_type)
 static int
 hns3_get_board_configuration(struct hns3_hw *hw)
 {
+#define HNS3_RSS_SIZE_MAX_DEFAULT	64
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_pf *pf = &hns->pf;
 	struct hns3_cfg cfg;
@@ -2817,6 +2822,11 @@ hns3_get_board_configuration(struct hns3_hw *hw)
 
 	hw->mac.media_type = cfg.media_type;
 	hw->rss_size_max = cfg.rss_size_max;
+	if (hw->rss_size_max == 0) {
+		PMD_INIT_LOG(WARNING, "rss_size_max is 0, already adjust to %u.",
+			     HNS3_RSS_SIZE_MAX_DEFAULT);
+		hw->rss_size_max = HNS3_RSS_SIZE_MAX_DEFAULT;
+	}
 	memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
 	hw->mac.phy_addr = cfg.phy_addr;
 	hw->dcb_info.num_pg = 1;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.081578364 +0100
+++ 0032-net-hns3-fix-divide-by-zero.patch	2025-06-12 22:06:23.854044300 +0100
@@ -1 +1 @@
-From a88f60f32de6f94a5acbf2101cb5e527fac0b2d2 Mon Sep 17 00:00:00 2001
+From 077396a3d01ceea19bab0085584c9ceb45819fcc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a88f60f32de6f94a5acbf2101cb5e527fac0b2d2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2b56b6e44e..2d4e348442 100644
+index 91d7dc12d2..2c3a992e1a 100644
@@ -22 +23 @@
-@@ -2544,6 +2544,10 @@ hns3_query_pf_resource(struct hns3_hw *hw)
+@@ -2548,6 +2548,10 @@ hns3_query_pf_resource(struct hns3_hw *hw)
@@ -33 +34 @@
-@@ -2795,6 +2799,7 @@ hns3_check_media_type(struct hns3_hw *hw, uint8_t media_type)
+@@ -2799,6 +2803,7 @@ hns3_check_media_type(struct hns3_hw *hw, uint8_t media_type)
@@ -41 +42 @@
-@@ -2813,6 +2818,11 @@ hns3_get_board_configuration(struct hns3_hw *hw)
+@@ -2817,6 +2822,11 @@ hns3_get_board_configuration(struct hns3_hw *hw)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix resources release on reset' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (30 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/hns3: fix divide by zero' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/qede: fix use after free' " luca.boccassi
                   ` (38 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/e9063c8f242260215659a8719d14f1a0f17311a1

Thanks.

Luca Boccassi

---
From e9063c8f242260215659a8719d14f1a0f17311a1 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:31:00 +0800
Subject: [PATCH] net/hns3: fix resources release on reset

[ upstream commit 361eab82df67c09cb84a9e2e66c0d93a84be610d ]

Some resources, like, unmapping Rx interrupt, doesn't perform
when execute dev_stop on reset. This will lead to other issues.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2c3a992e1a..c31b052b6f 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5231,20 +5231,23 @@ hns3_dev_stop(struct rte_eth_dev *dev)
 	struct hns3_hw *hw = &hns->hw;
 
 	PMD_INIT_FUNC_TRACE();
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) != 0) {
+		hns3_warn(hw, "device is resetting, stop operation is not allowed.");
+		return -EBUSY;
+	}
+
 	dev->data->dev_started = 0;
 
 	hw->adapter_state = HNS3_NIC_STOPPING;
 	hns3_stop_rxtx_datapath(dev);
 
 	rte_spinlock_lock(&hw->lock);
-	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
-		hns3_tm_dev_stop_proc(hw);
-		hns3_config_mac_tnl_int(hw, false);
-		hns3_stop_tqps(hw);
-		hns3_do_stop(hns);
-		hns3_unmap_rx_interrupt(dev);
-		hw->adapter_state = HNS3_NIC_CONFIGURED;
-	}
+	hns3_tm_dev_stop_proc(hw);
+	hns3_config_mac_tnl_int(hw, false);
+	hns3_stop_tqps(hw);
+	hns3_do_stop(hns);
+	hns3_unmap_rx_interrupt(dev);
+	hw->adapter_state = HNS3_NIC_CONFIGURED;
 	hns3_rx_scattered_reset(dev);
 	rte_eal_alarm_cancel(hns3_service_handler, dev);
 	hns3_stop_report_lse(dev);
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.115917009 +0100
+++ 0033-net-hns3-fix-resources-release-on-reset.patch	2025-06-12 22:06:23.854044300 +0100
@@ -1 +1 @@
-From 361eab82df67c09cb84a9e2e66c0d93a84be610d Mon Sep 17 00:00:00 2001
+From e9063c8f242260215659a8719d14f1a0f17311a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 361eab82df67c09cb84a9e2e66c0d93a84be610d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2d4e348442..9f99525e70 100644
+index 2c3a992e1a..c31b052b6f 100644
@@ -21 +22 @@
-@@ -5219,20 +5219,23 @@ hns3_dev_stop(struct rte_eth_dev *dev)
+@@ -5231,20 +5231,23 @@ hns3_dev_stop(struct rte_eth_dev *dev)
@@ -25 +26 @@
-+	if (rte_atomic_load_explicit(&hw->reset.resetting, rte_memory_order_relaxed) != 0) {
++	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) != 0) {
@@ -36 +37 @@
--	if (rte_atomic_load_explicit(&hw->reset.resetting, rte_memory_order_relaxed) == 0) {
+-	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/qede: fix use after free' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (31 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/hns3: fix resources release on reset' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'bus/fslmc: " luca.boccassi
                   ` (37 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/fb9df72195989e710bfea02de8e150bbaec22696

Thanks.

Luca Boccassi

---
From fb9df72195989e710bfea02de8e150bbaec22696 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 13 Mar 2025 10:22:03 -0700
Subject: [PATCH] net/qede: fix use after free

[ upstream commit ab8caba639ee6378055b2d8518e2a97b2212c737 ]

The loop cleaning up flowdir resources was using SLIST_FOREACH
but the inner loop would call rte_free. Found by building with
address sanitizer undefined check.

Also remove needless initialization, and null check.

Fixes: f5765f66f9bb ("net/qede: refactor flow director into generic aRFS")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/qede/qede_filter.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index c5945451e8..de7ca28afd 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -12,6 +12,13 @@
 
 #include "qede_ethdev.h"
 
+#ifndef SLIST_FOREACH_SAFE
+#define	SLIST_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = SLIST_FIRST((head));				\
+	    (var) && ((tvar) = SLIST_NEXT((var), field), 1);		\
+	    (var) = (tvar))
+#endif
+
 /* VXLAN tunnel classification mapping */
 const struct _qede_udp_tunn_types {
 	uint16_t rte_filter_type;
@@ -154,16 +161,12 @@ int qede_check_fdir_support(struct rte_eth_dev *eth_dev)
 void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev)
 {
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
-	struct qede_arfs_entry *tmp = NULL;
+	struct qede_arfs_entry *tmp, *tmp2;
 
-	SLIST_FOREACH(tmp, &qdev->arfs_info.arfs_list_head, list) {
-		if (tmp) {
-			if (tmp->mz)
-				rte_memzone_free(tmp->mz);
-			SLIST_REMOVE(&qdev->arfs_info.arfs_list_head, tmp,
-				     qede_arfs_entry, list);
-			rte_free(tmp);
-		}
+	SLIST_FOREACH_SAFE(tmp, &qdev->arfs_info.arfs_list_head, list, tmp2) {
+		rte_memzone_free(tmp->mz);
+		SLIST_REMOVE(&qdev->arfs_info.arfs_list_head, tmp, qede_arfs_entry, list);
+		rte_free(tmp);
 	}
 }
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.150359440 +0100
+++ 0034-net-qede-fix-use-after-free.patch	2025-06-12 22:06:23.858044384 +0100
@@ -1 +1 @@
-From ab8caba639ee6378055b2d8518e2a97b2212c737 Mon Sep 17 00:00:00 2001
+From fb9df72195989e710bfea02de8e150bbaec22696 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ab8caba639ee6378055b2d8518e2a97b2212c737 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/qede/qede_filter.c | 20 ++++++++++++--------
- 1 file changed, 12 insertions(+), 8 deletions(-)
+ drivers/net/qede/qede_filter.c | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
@@ -21 +22 @@
-index 14fb4338e9..cecb58c997 100644
+index c5945451e8..de7ca28afd 100644
@@ -38 +39 @@
-@@ -154,15 +161,12 @@ int qede_check_fdir_support(struct rte_eth_dev *eth_dev)
+@@ -154,16 +161,12 @@ int qede_check_fdir_support(struct rte_eth_dev *eth_dev)
@@ -47 +48,2 @@
--			rte_memzone_free(tmp->mz);
+-			if (tmp->mz)
+-				rte_memzone_free(tmp->mz);

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'bus/fslmc: fix use after free' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (32 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/qede: fix use after free' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/null: fix packet copy' " luca.boccassi
                   ` (36 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/e2de1b07099f7dc987cd1df4e939e44af3aa6d72

Thanks.

Luca Boccassi

---
From e2de1b07099f7dc987cd1df4e939e44af3aa6d72 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 16 Apr 2025 07:58:14 -0700
Subject: [PATCH] bus/fslmc: fix use after free

[ upstream commit 1cad17c43079268d9e15db62b3a1edd42df8d81e ]

The cleanup loop would dereference the dpio_dev after freeing.
Use TAILQ_FOREACH_SAFE to fix that.
Found by building with sanitizer undefined flag.

Fixes: e55d0494ab98 ("bus/fslmc: support secondary process")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 4aec7b2cd8..6bf3b15be9 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -38,6 +38,13 @@
 #include "dpaa2_hw_dpio.h"
 #include <mc/fsl_dpmng.h>
 
+#ifndef TAILQ_FOREACH_SAFE
+#define	TAILQ_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = TAILQ_FIRST((head));				\
+	    (var) && ((tvar) = TAILQ_NEXT((var), field), 1);		\
+	    (var) = (tvar))
+#endif
+
 #define NUM_HOST_CPUS RTE_MAX_LCORE
 
 struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
@@ -364,6 +371,7 @@ dpaa2_create_dpio_device(int vdev_fd,
 			 int object_id)
 {
 	struct dpaa2_dpio_dev *dpio_dev = NULL;
+	struct dpaa2_dpio_dev *dpio_tmp;
 	struct vfio_region_info reg_info = { .argsz = sizeof(reg_info)};
 	struct qbman_swp_desc p_des;
 	struct dpio_attr attr;
@@ -549,7 +557,7 @@ err:
 	rte_free(dpio_dev);
 
 	/* For each element in the list, cleanup */
-	TAILQ_FOREACH(dpio_dev, &dpio_dev_list, next) {
+	TAILQ_FOREACH_SAFE(dpio_dev, &dpio_dev_list, next, dpio_tmp) {
 		if (dpio_dev->dpio) {
 			dpio_disable(dpio_dev->dpio, CMD_PRI_LOW,
 				dpio_dev->token);
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.183404591 +0100
+++ 0035-bus-fslmc-fix-use-after-free.patch	2025-06-12 22:06:23.858044384 +0100
@@ -1 +1 @@
-From 1cad17c43079268d9e15db62b3a1edd42df8d81e Mon Sep 17 00:00:00 2001
+From e2de1b07099f7dc987cd1df4e939e44af3aa6d72 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1cad17c43079268d9e15db62b3a1edd42df8d81e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bad25a0ec2..e32471d8b5 100644
+index 4aec7b2cd8..6bf3b15be9 100644
@@ -23 +24 @@
-@@ -39,6 +39,13 @@
+@@ -38,6 +38,13 @@
@@ -36,3 +37,3 @@
- RTE_EXPORT_INTERNAL_SYMBOL(dpaa2_io_portal)
-@@ -412,6 +419,7 @@ dpaa2_create_dpio_device(int vdev_fd,
- 	struct rte_dpaa2_device *obj)
+ struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
+@@ -364,6 +371,7 @@ dpaa2_create_dpio_device(int vdev_fd,
+ 			 int object_id)
@@ -45 +46 @@
-@@ -597,7 +605,7 @@ err:
+@@ -549,7 +557,7 @@ err:

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/null: fix packet copy' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (33 preceding siblings ...)
  2025-06-12 21:06 ` patch 'bus/fslmc: " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'bus/vmbus: align ring buffer data to page boundary' " luca.boccassi
                   ` (35 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/f9c5f0b7a3c92b78647337cccacdda29c6655e5e

Thanks.

Luca Boccassi

---
From f9c5f0b7a3c92b78647337cccacdda29c6655e5e Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 1 Apr 2025 16:47:26 -0700
Subject: [PATCH] net/null: fix packet copy

[ upstream commit 0ffd3bc09be5f77b26c16e501e4b4465b1bcb8da ]

If doing copy on transmit, can potentially copy paste the data
in the mbuf. Change to only copy data from that segment.

Fixes: c743e50c475f ("null: new poll mode driver")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/null/rte_eth_null.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 1fbe572bd1..6798714156 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -35,7 +35,7 @@ struct null_queue {
 	struct pmd_internals *internals;
 
 	struct rte_mempool *mb_pool;
-	struct rte_mbuf *dummy_packet;
+	void *dummy_packet;
 
 	rte_atomic64_t rx_pkts;
 	rte_atomic64_t tx_pkts;
@@ -160,17 +160,17 @@ eth_null_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 static uint16_t
 eth_null_copy_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 {
-	int i;
 	struct null_queue *h = q;
-	unsigned int packet_size;
+	unsigned int i;
 
 	if ((q == NULL) || (bufs == NULL))
 		return 0;
 
-	packet_size = h->internals->packet_size;
 	for (i = 0; i < nb_bufs; i++) {
-		rte_memcpy(h->dummy_packet, rte_pktmbuf_mtod(bufs[i], void *),
-					packet_size);
+		struct rte_mbuf *m = bufs[i];
+		size_t len = RTE_MIN(h->internals->packet_size, m->data_len);
+
+		rte_memcpy(h->dummy_packet, rte_pktmbuf_mtod(m, void *), len);
 		rte_pktmbuf_free(bufs[i]);
 	}
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.215660175 +0100
+++ 0036-net-null-fix-packet-copy.patch	2025-06-12 22:06:23.858044384 +0100
@@ -1 +1 @@
-From 0ffd3bc09be5f77b26c16e501e4b4465b1bcb8da Mon Sep 17 00:00:00 2001
+From f9c5f0b7a3c92b78647337cccacdda29c6655e5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ffd3bc09be5f77b26c16e501e4b4465b1bcb8da ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 6764cf2ec1..966748689f 100644
+index 1fbe572bd1..6798714156 100644
@@ -28,3 +29,3 @@
- 	RTE_ATOMIC(uint64_t) rx_pkts;
- 	RTE_ATOMIC(uint64_t) tx_pkts;
-@@ -163,17 +163,17 @@ eth_null_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+ 	rte_atomic64_t rx_pkts;
+ 	rte_atomic64_t tx_pkts;
+@@ -160,17 +160,17 @@ eth_null_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'bus/vmbus: align ring buffer data to page boundary' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (34 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/null: fix packet copy' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'bus/vmbus: use Hyper-V page size' " luca.boccassi
                   ` (34 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/bd19d0b8ddf448274260edc43761924e8831c738

Thanks.

Luca Boccassi

---
From bd19d0b8ddf448274260edc43761924e8831c738 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Apr 2025 12:32:47 -0700
Subject: [PATCH] bus/vmbus: align ring buffer data to page boundary

[ upstream commit c54fa45817932057dd8f275fa1b8e4dcaede7813 ]

The ring buffer data region always starts at the system page boundary
after ring buffer head. The current code assumes the system page size is
4k. This is not always correct.

Fix this by using system page size for addressing ring buffer data.

Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/bus/vmbus/rte_vmbus_reg.h | 9 +++------
 drivers/bus/vmbus/vmbus_bufring.c | 9 ++++++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/vmbus/rte_vmbus_reg.h b/drivers/bus/vmbus/rte_vmbus_reg.h
index a17ce40763..6257774f29 100644
--- a/drivers/bus/vmbus/rte_vmbus_reg.h
+++ b/drivers/bus/vmbus/rte_vmbus_reg.h
@@ -100,14 +100,11 @@ struct vmbus_bufring {
 		uint32_t value;
 	} feature_bits;
 
-	/* Pad it to rte_mem_page_size() so that data starts on page boundary */
-	uint8_t	reserved2[4028];
-
 	/*
-	 * Ring data starts here + RingDataStartOffset
-	 * !!! DO NOT place any fields below this !!!
+	 * This is the end of ring buffer head. The ring buffer data is system
+	 * page aligned and starts at rte_mem_page_size() from the beginning
+	 * of this structure
 	 */
-	uint8_t data[];
 } __rte_packed;
 
 /*
diff --git a/drivers/bus/vmbus/vmbus_bufring.c b/drivers/bus/vmbus/vmbus_bufring.c
index c78619dc44..fcb97287dc 100644
--- a/drivers/bus/vmbus/vmbus_bufring.c
+++ b/drivers/bus/vmbus/vmbus_bufring.c
@@ -36,7 +36,10 @@ void vmbus_br_setup(struct vmbus_br *br, void *buf, unsigned int blen)
 {
 	br->vbr = buf;
 	br->windex = br->vbr->windex;
-	br->dsize = blen - sizeof(struct vmbus_bufring);
+
+	/* The ring buffer data starts at the 2nd page of the ring buffer */
+	RTE_VERIFY(blen > rte_mem_page_size());
+	br->dsize = blen - rte_mem_page_size();
 }
 
 /*
@@ -72,7 +75,7 @@ static inline uint32_t
 vmbus_txbr_copyto(const struct vmbus_br *tbr, uint32_t windex,
 		  const void *src0, uint32_t cplen)
 {
-	uint8_t *br_data = tbr->vbr->data;
+	uint8_t *br_data = (uint8_t *)tbr->vbr + rte_mem_page_size();
 	uint32_t br_dsize = tbr->dsize;
 	const uint8_t *src = src0;
 
@@ -170,7 +173,7 @@ static inline uint32_t
 vmbus_rxbr_copyfrom(const struct vmbus_br *rbr, uint32_t rindex,
 		    void *dst0, size_t cplen)
 {
-	const uint8_t *br_data = rbr->vbr->data;
+	const uint8_t *br_data = (uint8_t *)rbr->vbr + rte_mem_page_size();
 	uint32_t br_dsize = rbr->dsize;
 	uint8_t *dst = dst0;
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.258591068 +0100
+++ 0037-bus-vmbus-align-ring-buffer-data-to-page-boundary.patch	2025-06-12 22:06:23.858044384 +0100
@@ -1 +1 @@
-From c54fa45817932057dd8f275fa1b8e4dcaede7813 Mon Sep 17 00:00:00 2001
+From bd19d0b8ddf448274260edc43761924e8831c738 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c54fa45817932057dd8f275fa1b8e4dcaede7813 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 54a26d12bd..fb7e3043ec 100644
+index a17ce40763..6257774f29 100644
@@ -25 +26 @@
-@@ -100,14 +100,11 @@ struct __rte_packed_begin vmbus_bufring {
+@@ -100,14 +100,11 @@ struct vmbus_bufring {
@@ -40 +41 @@
- } __rte_packed_end;
+ } __rte_packed;

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'bus/vmbus: use Hyper-V page size' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (35 preceding siblings ...)
  2025-06-12 21:06 ` patch 'bus/vmbus: align ring buffer data to page boundary' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/netvsc: " luca.boccassi
                   ` (33 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/2da70953f668415fb325af744a5eff15b612dfc3

Thanks.

Luca Boccassi

---
From 2da70953f668415fb325af744a5eff15b612dfc3 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Apr 2025 12:32:48 -0700
Subject: [PATCH] bus/vmbus: use Hyper-V page size

[ upstream commit 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 ]

Hyper-V uses 4k page size, regardless of the system page size used.
Define Hyper-V page size for use in drivers.

The interrupt and monitor pages mapped from Hyper-V via kernel are always
4k in sizes. Use Hyper-V page size to map them.

Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/bus/vmbus/bus_vmbus_driver.h | 4 ++++
 drivers/bus/vmbus/linux/vmbus_uio.c  | 2 +-
 drivers/bus/vmbus/vmbus_common_uio.c | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index e2475a642d..879cbd5bbf 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -14,6 +14,10 @@ extern "C" {
 #include <rte_compat.h>
 #include <dev_driver.h>
 
+#define HYPERV_PAGE_SHIFT 12
+#define HYPERV_PAGE_SIZE (1 << HYPERV_PAGE_SHIFT)
+#define HYPERV_PAGE_MASK (HYPERV_PAGE_SIZE - 1)
+
 struct vmbus_channel;
 struct vmbus_mon_page;
 
diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 26edef342d..d4522f2e21 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -268,7 +268,7 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
 	}
 	file_size = sb.st_size;
 
-	if (file_size == 0 || (file_size & (rte_mem_page_size() - 1))) {
+	if (file_size == 0 || (file_size & (HYPERV_PAGE_SIZE - 1))) {
 		VMBUS_LOG(ERR, "incorrect size %s: %zu",
 			  ring_path, file_size);
 
diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c
index 4d4613513c..13289cd9a4 100644
--- a/drivers/bus/vmbus/vmbus_common_uio.c
+++ b/drivers/bus/vmbus/vmbus_common_uio.c
@@ -201,7 +201,7 @@ vmbus_uio_map_resource(struct rte_vmbus_device *dev)
 	}
 
 	dev->int_page = (uint32_t *)((char *)uio_res->maps[HV_INT_PAGE_MAP].addr
-				     + (rte_mem_page_size() >> 1));
+				     + (HYPERV_PAGE_SIZE >> 1));
 	dev->monitor_page = uio_res->maps[HV_MON_PAGE_MAP].addr;
 	return 0;
 }
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.291881223 +0100
+++ 0038-bus-vmbus-use-Hyper-V-page-size.patch	2025-06-12 22:06:23.858044384 +0100
@@ -1 +1 @@
-From 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 Mon Sep 17 00:00:00 2001
+From 2da70953f668415fb325af744a5eff15b612dfc3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index bc394208de..0a56275437 100644
+index e2475a642d..879cbd5bbf 100644
@@ -26,3 +27,3 @@
-@@ -14,6 +14,10 @@
- extern "C" {
- #endif
+@@ -14,6 +14,10 @@ extern "C" {
+ #include <rte_compat.h>
+ #include <dev_driver.h>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/netvsc: use Hyper-V page size' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (36 preceding siblings ...)
  2025-06-12 21:06 ` patch 'bus/vmbus: use Hyper-V page size' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/netvsc: add stats counters from VF' " luca.boccassi
                   ` (32 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/632a9feb6ea69c37e794e16219655748ace0c35f

Thanks.

Luca Boccassi

---
From 632a9feb6ea69c37e794e16219655748ace0c35f Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Apr 2025 12:32:50 -0700
Subject: [PATCH] net/netvsc: use Hyper-V page size

[ upstream commit 2e81551053fcfc7d57b8907a2a8720805298d723 ]

The driver should always use Hyper-V page size for implementing RNDIS and
calculating PFN (Page Frame Number) for communicating with Hyper-V VSP.

It should not use system page size as it may be different to the Hyper-V
page size.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_rndis.c | 14 +++++++-------
 drivers/net/netvsc/hn_rxtx.c  | 16 ++++++++--------
 drivers/net/netvsc/hn_var.h   |  4 ----
 3 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index fe36274df8..0ac02e98b2 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -67,7 +67,7 @@ hn_rndis_rid(struct hn_data *hv)
 
 static void *hn_rndis_alloc(size_t size)
 {
-	return rte_zmalloc("RNDIS", size, rte_mem_page_size());
+	return rte_zmalloc("RNDIS", size, HYPERV_PAGE_SIZE);
 }
 
 #ifdef RTE_LIBRTE_NETVSC_DEBUG_DUMP
@@ -265,17 +265,17 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
 		return -EINVAL;
 	}
 
-	if (unlikely(reqlen > rte_mem_page_size())) {
+	if (unlikely(reqlen > HYPERV_PAGE_SIZE)) {
 		PMD_DRV_LOG(ERR, "RNDIS request %u greater than page size",
 			    reqlen);
 		return -EINVAL;
 	}
 
-	sg.page = addr / rte_mem_page_size();
-	sg.ofs  = addr & PAGE_MASK;
+	sg.page = addr / HYPERV_PAGE_SIZE;
+	sg.ofs  = addr & HYPERV_PAGE_MASK;
 	sg.len  = reqlen;
 
-	if (sg.ofs + reqlen >  rte_mem_page_size()) {
+	if (sg.ofs + reqlen >  HYPERV_PAGE_SIZE) {
 		PMD_DRV_LOG(ERR, "RNDIS request crosses page boundary");
 		return -EINVAL;
 	}
@@ -480,7 +480,7 @@ hn_rndis_query(struct hn_data *hv, uint32_t oid,
 		return -ENOMEM;
 
 	comp_len = sizeof(*comp) + odlen;
-	comp = rte_zmalloc("QUERY", comp_len, rte_mem_page_size());
+	comp = rte_zmalloc("QUERY", comp_len, HYPERV_PAGE_SIZE);
 	if (!comp) {
 		error = -ENOMEM;
 		goto done;
@@ -737,7 +737,7 @@ hn_rndis_set(struct hn_data *hv, uint32_t oid, const void *data, uint32_t dlen)
 	int error;
 
 	reqlen = sizeof(*req) + dlen;
-	req = rte_zmalloc("RNDIS_SET", reqlen, rte_mem_page_size());
+	req = rte_zmalloc("RNDIS_SET", reqlen, HYPERV_PAGE_SIZE);
 	if (!req)
 		return -ENOMEM;
 
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 080cab4464..f87bc8aaa0 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1443,10 +1443,10 @@ static unsigned int hn_get_slots(const struct rte_mbuf *m)
 
 	while (m) {
 		unsigned int size = rte_pktmbuf_data_len(m);
-		unsigned int offs = rte_mbuf_data_iova(m) & PAGE_MASK;
+		unsigned int offs = rte_mbuf_data_iova(m) & HYPERV_PAGE_MASK;
 
-		slots += (offs + size + rte_mem_page_size() - 1) /
-				rte_mem_page_size();
+		slots += (offs + size + HYPERV_PAGE_SIZE - 1) /
+				HYPERV_PAGE_SIZE;
 		m = m->next;
 	}
 
@@ -1461,13 +1461,13 @@ static unsigned int hn_fill_sg(struct vmbus_gpa *sg,
 
 	while (m) {
 		rte_iova_t addr = rte_mbuf_data_iova(m);
-		unsigned int page = addr / rte_mem_page_size();
-		unsigned int offset = addr & PAGE_MASK;
+		unsigned int page = addr / HYPERV_PAGE_SIZE;
+		unsigned int offset = addr & HYPERV_PAGE_MASK;
 		unsigned int len = rte_pktmbuf_data_len(m);
 
 		while (len > 0) {
 			unsigned int bytes = RTE_MIN(len,
-					rte_mem_page_size() - offset);
+					HYPERV_PAGE_SIZE - offset);
 
 			sg[segs].page = page;
 			sg[segs].ofs = offset;
@@ -1510,8 +1510,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
 	addr = txq->tx_rndis_iova +
 		((char *)txd->rndis_pkt - (char *)txq->tx_rndis);
 
-	sg[0].page = addr / rte_mem_page_size();
-	sg[0].ofs = addr & PAGE_MASK;
+	sg[0].page = addr / HYPERV_PAGE_SIZE;
+	sg[0].ofs = addr & HYPERV_PAGE_MASK;
 	sg[0].len = RNDIS_PACKET_MSG_OFFSET_ABS(hn_rndis_pktlen(txd->rndis_pkt));
 	segs = 1;
 
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index 98a3b83033..c37bac01f8 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -31,10 +31,6 @@
 
 #define HN_RX_EXTMBUF_ENABLE	0
 
-#ifndef PAGE_MASK
-#define PAGE_MASK (rte_mem_page_size() - 1)
-#endif
-
 struct hn_data;
 struct hn_txdesc;
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.326468510 +0100
+++ 0039-net-netvsc-use-Hyper-V-page-size.patch	2025-06-12 22:06:23.862044468 +0100
@@ -1 +1 @@
-From 2e81551053fcfc7d57b8907a2a8720805298d723 Mon Sep 17 00:00:00 2001
+From 632a9feb6ea69c37e794e16219655748ace0c35f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e81551053fcfc7d57b8907a2a8720805298d723 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b2dae6474a..24723ff842 100644
+index fe36274df8..0ac02e98b2 100644
@@ -76 +77 @@
-index 9d3948e03d..c79d971904 100644
+index 080cab4464..f87bc8aaa0 100644
@@ -79 +80 @@
-@@ -1431,10 +1431,10 @@ static unsigned int hn_get_slots(const struct rte_mbuf *m)
+@@ -1443,10 +1443,10 @@ static unsigned int hn_get_slots(const struct rte_mbuf *m)
@@ -93 +94 @@
-@@ -1449,13 +1449,13 @@ static unsigned int hn_fill_sg(struct vmbus_gpa *sg,
+@@ -1461,13 +1461,13 @@ static unsigned int hn_fill_sg(struct vmbus_gpa *sg,
@@ -110 +111 @@
-@@ -1498,8 +1498,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
+@@ -1510,8 +1510,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
@@ -122 +123 @@
-index 0f638bc5fd..f946b3d8ef 100644
+index 98a3b83033..c37bac01f8 100644

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/netvsc: add stats counters from VF' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (37 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/netvsc: " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'app/testpmd: relax number of TCs in DCB command' " luca.boccassi
                   ` (31 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/702a05d5442c1a27af84eed57fff8569b067aff8

Thanks.

Luca Boccassi

---
From 702a05d5442c1a27af84eed57fff8569b067aff8 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 23 Apr 2025 11:57:32 -0700
Subject: [PATCH] net/netvsc: add stats counters from VF

[ upstream commit 0bb9b5aef16d3ba83066e03a87faf96da292c042 ]

The netvsc driver should add per-queue and rx_nombuf counters from VF.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index fc47979766..2d676a6bc5 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -809,8 +809,8 @@ static int hn_dev_stats_get(struct rte_eth_dev *dev,
 		stats->oerrors += txq->stats.errors;
 
 		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
-			stats->q_opackets[i] = txq->stats.packets;
-			stats->q_obytes[i] = txq->stats.bytes;
+			stats->q_opackets[i] += txq->stats.packets;
+			stats->q_obytes[i] += txq->stats.bytes;
 		}
 	}
 
@@ -826,12 +826,12 @@ static int hn_dev_stats_get(struct rte_eth_dev *dev,
 		stats->imissed += rxq->stats.ring_full;
 
 		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
-			stats->q_ipackets[i] = rxq->stats.packets;
-			stats->q_ibytes[i] = rxq->stats.bytes;
+			stats->q_ipackets[i] += rxq->stats.packets;
+			stats->q_ibytes[i] += rxq->stats.bytes;
 		}
 	}
 
-	stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed;
+	stats->rx_nombuf += dev->data->rx_mbuf_alloc_failed;
 	return 0;
 }
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.361839944 +0100
+++ 0040-net-netvsc-add-stats-counters-from-VF.patch	2025-06-12 22:06:23.862044468 +0100
@@ -1 +1 @@
-From 0bb9b5aef16d3ba83066e03a87faf96da292c042 Mon Sep 17 00:00:00 2001
+From 702a05d5442c1a27af84eed57fff8569b067aff8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0bb9b5aef16d3ba83066e03a87faf96da292c042 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index e5b052d569..ca626ccf60 100644
+index fc47979766..2d676a6bc5 100644

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'app/testpmd: relax number of TCs in DCB command' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (38 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/netvsc: add stats counters from VF' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:06 ` patch 'net/mana: check vendor ID when probing RDMA device' " luca.boccassi
                   ` (30 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/5d3b84f55ffab4e9a376fcf3692320133ac3e40b

Thanks.

Luca Boccassi

---
From 5d3b84f55ffab4e9a376fcf3692320133ac3e40b Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 24 Apr 2025 14:17:46 +0800
Subject: [PATCH] app/testpmd: relax number of TCs in DCB command

[ upstream commit 5f2695ee948ddaf36050f2d6b58a3437248c1663 ]

Currently, the "port config 0 dcb ..." command only supports 4 or 8
TCs. Other number of TCs may be used in actual applications.

This commit removes this restriction.

Fixes: 900550de04a7 ("app/testpmd: add dcb support")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test-pmd/cmdline.c                      | 4 ++--
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b955803123..c4aab4defa 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3056,9 +3056,9 @@ cmd_config_dcb_parsed(void *parsed_result,
 		return;
 	}
 
-	if ((res->num_tcs != RTE_ETH_4_TCS) && (res->num_tcs != RTE_ETH_8_TCS)) {
+	if (res->num_tcs <= 1 || res->num_tcs > RTE_ETH_8_TCS) {
 		fprintf(stderr,
-			"The invalid number of traffic class, only 4 or 8 allowed.\n");
+			"The invalid number of traffic class, only 2~8 allowed.\n");
 		return;
 	}
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index b46c574325..9ff0af1f0e 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2104,7 +2104,7 @@ Set the DCB mode for an individual port::
 
    testpmd> port config (port_id) dcb vt (on|off) (traffic_class) pfc (on|off)
 
-The traffic class should be 4 or 8.
+The traffic class could be 2~8.
 
 port config - Burst
 ~~~~~~~~~~~~~~~~~~~
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.394275148 +0100
+++ 0041-app-testpmd-relax-number-of-TCs-in-DCB-command.patch	2025-06-12 22:06:23.870044637 +0100
@@ -1 +1 @@
-From 5f2695ee948ddaf36050f2d6b58a3437248c1663 Mon Sep 17 00:00:00 2001
+From 5d3b84f55ffab4e9a376fcf3692320133ac3e40b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f2695ee948ddaf36050f2d6b58a3437248c1663 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index b4089d281b..44fae89821 100644
+index b955803123..c4aab4defa 100644
@@ -24 +25 @@
-@@ -3472,9 +3472,9 @@ cmd_config_dcb_parsed(void *parsed_result,
+@@ -3056,9 +3056,9 @@ cmd_config_dcb_parsed(void *parsed_result,
@@ -37 +38 @@
-index eeef49500f..38bc00705f 100644
+index b46c574325..9ff0af1f0e 100644
@@ -40 +41 @@
-@@ -2167,7 +2167,7 @@ Set the DCB mode for an individual port::
+@@ -2104,7 +2104,7 @@ Set the DCB mode for an individual port::

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mana: check vendor ID when probing RDMA device' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (39 preceding siblings ...)
  2025-06-12 21:06 ` patch 'app/testpmd: relax number of TCs in DCB command' " luca.boccassi
@ 2025-06-12 21:06 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/hns3: fix CRC data segment' " luca.boccassi
                   ` (29 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:06 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/f3f71fde2d06d028bc41f3a70a958a79a3c19fe5

Thanks.

Luca Boccassi

---
From f3f71fde2d06d028bc41f3a70a958a79a3c19fe5 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Mon, 12 May 2025 14:52:02 -0700
Subject: [PATCH] net/mana: check vendor ID when probing RDMA device

[ upstream commit be4ed96378811e572860cac558bff54b5c361992 ]

The RDMA kernel driver may expose two MANA RDMA devices, for RC and RAW
QP types. The purpose is to support fast service mode at SOC. Depending
on kernel version, the probe may fail if DPDK picks up the wrong device.

Add check for vendor_part_id and RAW QP capability when probing the MANA
device. This check is compatible with all kernel versions.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mana.c | 14 ++++++++++++++
 drivers/net/mana/mana.h |  4 ++++
 2 files changed, 18 insertions(+)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 57325eb528..3412ad586b 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -1393,6 +1393,20 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
 			continue;
 		}
 
+		if (dev_attr.orig_attr.vendor_part_id) {
+			if (dev_attr.orig_attr.vendor_part_id !=
+			    GDMA_DEVICE_MANA) {
+				DRV_LOG(INFO, "Skip device vendor part id %x",
+					dev_attr.orig_attr.vendor_part_id);
+				continue;
+			}
+			if (!dev_attr.raw_packet_caps) {
+				DRV_LOG(INFO,
+					"Skip device without RAW support");
+				continue;
+			}
+		}
+
 		for (port = 1; port <= dev_attr.orig_attr.phys_port_cnt;
 		     port++) {
 			struct rte_ether_addr addr;
diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index 579e6063ab..ffeef6e533 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -12,6 +12,10 @@ struct mana_shared_data {
 	rte_atomic32_t secondary_cnt;
 };
 
+/* vendor_part_id returned from ibv_query_device */
+#define GDMA_DEVICE_MANA	2
+#define GDMA_DEVICE_MANA_IB	3
+
 #define MIN_RX_BUF_SIZE	1024
 #define MAX_FRAME_SIZE	RTE_ETHER_MAX_LEN
 #define MANA_MAX_MAC_ADDR 1
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.437754411 +0100
+++ 0042-net-mana-check-vendor-ID-when-probing-RDMA-device.patch	2025-06-12 22:06:23.870044637 +0100
@@ -1 +1 @@
-From be4ed96378811e572860cac558bff54b5c361992 Mon Sep 17 00:00:00 2001
+From f3f71fde2d06d028bc41f3a70a958a79a3c19fe5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be4ed96378811e572860cac558bff54b5c361992 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 2934da29f7..c42a987a30 100644
+index 57325eb528..3412ad586b 100644
@@ -26 +27 @@
-@@ -1490,6 +1490,20 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
+@@ -1393,6 +1393,20 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
@@ -48 +49 @@
-index 855d98911b..6309cae76b 100644
+index 579e6063ab..ffeef6e533 100644
@@ -52 +53 @@
- 	RTE_ATOMIC(uint32_t) secondary_cnt;
+ 	rte_atomic32_t secondary_cnt;
@@ -59 +59,0 @@
- #define MANA_MAX_MTU	9000
@@ -60,0 +61 @@
+ #define MAX_FRAME_SIZE	RTE_ETHER_MAX_LEN

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: fix CRC data segment' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (40 preceding siblings ...)
  2025-06-12 21:06 ` patch 'net/mana: check vendor ID when probing RDMA device' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/tap: fix qdisc add failure handling' " luca.boccassi
                   ` (28 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/25432eed5d2feed29c46760c1d392e343e952935

Thanks.

Luca Boccassi

---
From 25432eed5d2feed29c46760c1d392e343e952935 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 16 May 2025 15:15:18 +0800
Subject: [PATCH] net/hns3: fix CRC data segment

[ upstream commit 7a99b6ca9d079e9364ba61d3fe802a4761739c8f ]

When the packet is received into a multisegment mbuf and
the last segment contains only CRC data, the driver should
not release this segment. Otherwise, the application cannot
look the CRC data. This patch fixes it.

Fixes: 8973d7c4ca12 ("net/hns3: support keeping CRC")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 3c866103ef..b9ae838642 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2387,18 +2387,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb,
 }
 
 static inline void
-recalculate_data_len(struct rte_mbuf *first_seg, struct rte_mbuf *last_seg,
-		    struct rte_mbuf *rxm, struct hns3_rx_queue *rxq,
-		    uint16_t data_len)
+recalculate_data_len(struct rte_mbuf *last_seg, struct rte_mbuf *rxm,
+		     struct hns3_rx_queue *rxq)
 {
+	uint16_t data_len = rxm->data_len;
 	uint8_t crc_len = rxq->crc_len;
 
 	if (data_len <= crc_len) {
-		rte_pktmbuf_free_seg(rxm);
-		first_seg->nb_segs--;
+		rxm->data_len = 0;
 		last_seg->data_len = (uint16_t)(last_seg->data_len -
 			(crc_len - data_len));
-		last_seg->next = NULL;
 	} else
 		rxm->data_len = (uint16_t)(data_len - crc_len);
 }
@@ -2728,8 +2726,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
 		rxm->next = NULL;
 		if (unlikely(rxq->crc_len > 0)) {
 			first_seg->pkt_len -= rxq->crc_len;
-			recalculate_data_len(first_seg, last_seg, rxm, rxq,
-				rxm->data_len);
+			recalculate_data_len(last_seg, rxm, rxq);
 		}
 
 		first_seg->port = rxq->port_id;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.471097217 +0100
+++ 0043-net-hns3-fix-CRC-data-segment.patch	2025-06-12 22:06:23.874044722 +0100
@@ -1 +1 @@
-From 7a99b6ca9d079e9364ba61d3fe802a4761739c8f Mon Sep 17 00:00:00 2001
+From 25432eed5d2feed29c46760c1d392e343e952935 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a99b6ca9d079e9364ba61d3fe802a4761739c8f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bb7ffee12c..49b6f16ccd 100644
+index 3c866103ef..b9ae838642 100644
@@ -23 +24 @@
-@@ -2386,18 +2386,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb,
+@@ -2387,18 +2387,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/tap: fix qdisc add failure handling' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (41 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/hns3: fix CRC data segment' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/mlx5: fix VLAN stripping on hairpin queue' " luca.boccassi
                   ` (27 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Yan Lu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/ad22d940fa5d8c4a2dd6cd118bc200fa213e3d52

Thanks.

Luca Boccassi

---
From ad22d940fa5d8c4a2dd6cd118bc200fa213e3d52 Mon Sep 17 00:00:00 2001
From: Yan Lu <luyan@cmss.chinamobile.com>
Date: Wed, 21 May 2025 09:33:13 +0800
Subject: [PATCH] net/tap: fix qdisc add failure handling

[ upstream commit 02a68649e6fb55d8975c726e3073ee9d12c20bac ]

The errno variable was assigned a positive value in the previous handling,
but here it is compared against -EEXIST,
When the tap already exists, this would falsely report an error.

Fixes: 6fc6de7e0eaf ("net/tap: update netlink error code management")

Signed-off-by: Yan Lu <luyan@cmss.chinamobile.com>
---
 .mailmap                     | 1 +
 drivers/net/tap/tap_tcmsgs.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 7bbd4bb02e..8cd91eff62 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1569,6 +1569,7 @@ Yanglong Wu <yanglong.wu@intel.com>
 Yang Ming <ming.1.yang@nokia-sbell.com>
 Yang Zhang <zy107165@alibaba-inc.com>
 Yanjie Xu <yanjie.xu@intel.com>
+Yan Lu <luyan@cmss.chinamobile.com>
 Yan Xia <yanx.xia@intel.com>
 Yao-Po Wang <blue119@gmail.com>
 Yao Zhao <yao.zhao@windriver.com>
diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c
index a3aae3c814..24a0423a0e 100644
--- a/drivers/net/tap/tap_tcmsgs.c
+++ b/drivers/net/tap/tap_tcmsgs.c
@@ -261,7 +261,7 @@ qdisc_create_multiq(int nlsk_fd, unsigned int ifindex)
 	int err = 0;
 
 	err = qdisc_add_multiq(nlsk_fd, ifindex);
-	if (err < 0 && errno != -EEXIST) {
+	if (err < 0 && errno != EEXIST) {
 		TAP_LOG(ERR, "Could not add multiq qdisc (%d): %s",
 			errno, strerror(errno));
 		return -1;
@@ -287,7 +287,7 @@ qdisc_create_ingress(int nlsk_fd, unsigned int ifindex)
 	int err = 0;
 
 	err = qdisc_add_ingress(nlsk_fd, ifindex);
-	if (err < 0 && errno != -EEXIST) {
+	if (err < 0 && errno != EEXIST) {
 		TAP_LOG(ERR, "Could not add ingress qdisc (%d): %s",
 			errno, strerror(errno));
 		return -1;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.509599259 +0100
+++ 0044-net-tap-fix-qdisc-add-failure-handling.patch	2025-06-12 22:06:23.874044722 +0100
@@ -1 +1 @@
-From 02a68649e6fb55d8975c726e3073ee9d12c20bac Mon Sep 17 00:00:00 2001
+From ad22d940fa5d8c4a2dd6cd118bc200fa213e3d52 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 02a68649e6fb55d8975c726e3073ee9d12c20bac ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 59ee5f7d30..df3674cc7f 100644
+index 7bbd4bb02e..8cd91eff62 100644
@@ -23 +24,2 @@
-@@ -1746,6 +1746,7 @@ Yang Ming <ming.1.yang@nokia-sbell.com>
+@@ -1569,6 +1569,7 @@ Yanglong Wu <yanglong.wu@intel.com>
+ Yang Ming <ming.1.yang@nokia-sbell.com>
@@ -25 +26,0 @@
- Yaniv Rosner <yrosner@nvidia.com>
@@ -32 +33 @@
-index 1755b57519..caca9445c8 100644
+index a3aae3c814..24a0423a0e 100644

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: fix VLAN stripping on hairpin queue' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (42 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/tap: fix qdisc add failure handling' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'mem: fix lockup on address space shortage' " luca.boccassi
                   ` (26 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/e1c3914301a026f18af9180d39bda1f17efd39f6

Thanks.

Luca Boccassi

---
From e1c3914301a026f18af9180d39bda1f17efd39f6 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:49:13 +0200
Subject: [PATCH] net/mlx5: fix VLAN stripping on hairpin queue

[ upstream commit 468334f07a9298fb4ff05e6cdcbbde64b0da4aa2 ]

Rx hairpin queues support VLAN stripping,
but if port was started and application attempted
to configure stripping on hairpin queue,
segfault was triggered because of NULL dereference.
Underlying function, which was updating the RQ was passing
wrong object handle for hairpin queues.
This patch fixes that.

Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/mlx5_devx.c | 2 ++
 drivers/net/mlx5/mlx5_vlan.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index cca7b86649..b329e40891 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -48,6 +48,8 @@ mlx5_rxq_obj_modify_rq_vlan_strip(struct mlx5_rxq_priv *rxq, int on)
 	rq_attr.state = MLX5_RQC_STATE_RDY;
 	rq_attr.vsd = (on ? 0 : 1);
 	rq_attr.modify_bitmask = MLX5_MODIFY_RQ_IN_MODIFY_BITMASK_VSD;
+	if (rxq->ctrl->is_hairpin)
+		return mlx5_devx_cmd_modify_rq(rxq->ctrl->obj->rq, &rq_attr);
 	return mlx5_devx_cmd_modify_rq(rxq->devx_rq.rq, &rq_attr);
 }
 
diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c
index e7161b66fe..d0459024f1 100644
--- a/drivers/net/mlx5/mlx5_vlan.c
+++ b/drivers/net/mlx5/mlx5_vlan.c
@@ -108,7 +108,7 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
 			dev->data->port_id, queue);
 		return;
 	}
-	DRV_LOG(DEBUG, "port %u set VLAN stripping offloads %d for port %uqueue %d",
+	DRV_LOG(DEBUG, "port %u set VLAN stripping offloads %d for port %u queue %d",
 		dev->data->port_id, on, rxq_data->port_id, queue);
 	if (rxq->ctrl->obj == NULL) {
 		/* Update related bits in RX queue. */
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.543003170 +0100
+++ 0045-net-mlx5-fix-VLAN-stripping-on-hairpin-queue.patch	2025-06-12 22:06:23.874044722 +0100
@@ -1 +1 @@
-From 468334f07a9298fb4ff05e6cdcbbde64b0da4aa2 Mon Sep 17 00:00:00 2001
+From e1c3914301a026f18af9180d39bda1f17efd39f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 468334f07a9298fb4ff05e6cdcbbde64b0da4aa2 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 9711746edb..6c79a634f9 100644
+index cca7b86649..b329e40891 100644
@@ -28 +29 @@
-@@ -88,6 +88,8 @@ mlx5_rxq_obj_modify_rq_vlan_strip(struct mlx5_rxq_priv *rxq, int on)
+@@ -48,6 +48,8 @@ mlx5_rxq_obj_modify_rq_vlan_strip(struct mlx5_rxq_priv *rxq, int on)
@@ -38 +39 @@
-index 43a314a679..7c7ac78dfe 100644
+index e7161b66fe..d0459024f1 100644
@@ -41 +42 @@
-@@ -107,7 +107,7 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+@@ -108,7 +108,7 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'mem: fix lockup on address space shortage' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (43 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/mlx5: fix VLAN stripping on hairpin queue' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'test/malloc: improve resiliency' " luca.boccassi
                   ` (25 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Dmitry Kozlyuk, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/d1423b3880669f8817741d02362796831d8f02c8

Thanks.

Luca Boccassi

---
From d1423b3880669f8817741d02362796831d8f02c8 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Thu, 3 Apr 2025 10:57:36 +0800
Subject: [PATCH] mem: fix lockup on address space shortage

[ upstream commit 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e ]

When the process address space is insufficient, mmap will fail,
which will cause an infinite loop.
This patch stops attempting mmap if it fails and
the requested size cannot be reduced.

Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/common/eal_common_memory.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
index da6711d129..dab4f4cde1 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -99,8 +99,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 
 		mapped_addr = eal_mem_reserve(
 			requested_addr, (size_t)map_sz, reserve_flags);
-		if ((mapped_addr == NULL) && allow_shrink)
-			*size -= page_sz;
+		if (mapped_addr == NULL) {
+			if (allow_shrink)
+				*size -= page_sz;
+			else
+				break;
+		}
 
 		if ((mapped_addr != NULL) && addr_is_hint &&
 				(mapped_addr != requested_addr)) {
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.576283738 +0100
+++ 0046-mem-fix-lockup-on-address-space-shortage.patch	2025-06-12 22:06:23.874044722 +0100
@@ -1 +1 @@
-From 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e Mon Sep 17 00:00:00 2001
+From d1423b3880669f8817741d02362796831d8f02c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a2f64408f4..bfa36b8268 100644
+index da6711d129..dab4f4cde1 100644
@@ -25 +26 @@
-@@ -102,8 +102,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
+@@ -99,8 +99,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'test/malloc: improve resiliency' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (44 preceding siblings ...)
  2025-06-12 21:07 ` patch 'mem: fix lockup on address space shortage' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'trace: fix overflow in per-lcore trace buffer' " luca.boccassi
                   ` (24 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/7d1be9cbb9be54c004526f3032093d8e906d10e2

Thanks.

Luca Boccassi

---
From 7d1be9cbb9be54c004526f3032093d8e906d10e2 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 26 Mar 2025 17:13:24 +0000
Subject: [PATCH] test/malloc: improve resiliency

[ upstream commit 7777215715d475b5e884179de39ff4bc6b8cbf72 ]

The test case "test_multi_alloc_statistics" was brittle in that it did
some allocations and frees and then checked statistics without
considering the initial state of the malloc heaps. This meant that,
depending on what allocations/frees were done beforehand, the test can
sometimes fail.

We can improve resiliency by running the test using a new malloc heap,
which means it is unaffected by any previous allocations.

Bugzilla ID: 1579
Fixes: a40a1f8231b4 ("app: various tests update")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test/test_malloc.c | 77 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 64 insertions(+), 13 deletions(-)

diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index ff081dd931..08a6ca8a26 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -25,6 +25,7 @@
 #include <rte_malloc.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
+#include <rte_eal_paging.h>
 #include <rte_string_fns.h>
 
 #define N 10000
@@ -267,11 +268,48 @@ test_str_to_size(void)
 static int
 test_multi_alloc_statistics(void)
 {
+	int ret = -1;  /* default return is error, cleared at end on success */
 	int socket = 0;
 	struct rte_malloc_socket_stats pre_stats, post_stats ,first_stats, second_stats;
 	size_t size = 2048;
 	int align = 1024;
 	int overhead = 0;
+	const size_t pgsz = rte_mem_page_size();
+	const size_t heap_size = (1 << 22);
+
+	if (pgsz > heap_size) {
+		printf("Page size (%zu) is bigger than heap size, skipping alloc stats test\n",
+				pgsz);
+		return TEST_SKIPPED;
+	}
+	if (heap_size % pgsz != 0) {
+		printf("Heap size (%zu) is not a multiple of page size (%zu), skipping alloc stats test\n",
+				heap_size, pgsz);
+		return TEST_SKIPPED;
+	}
+
+	if (rte_malloc_heap_create(__func__) != 0) {
+		printf("Failed to create test malloc heap\n");
+		goto end;
+	}
+
+	/* Allocate some memory using malloc and add it to our test heap. */
+	void *unaligned_memory = malloc(heap_size + pgsz);
+	if (unaligned_memory == NULL) {
+		printf("Failed to allocate memory\n");
+		goto cleanup_empty_heap;
+	}
+	void *memory = RTE_PTR_ALIGN(unaligned_memory, pgsz);
+	if (rte_malloc_heap_memory_add(__func__, memory, heap_size, NULL,
+			heap_size / pgsz, pgsz) != 0) {
+		printf("Failed to add memory to heap\n");
+		goto cleanup_allocated_memory;
+	}
+	socket = rte_malloc_heap_get_socket(__func__);
+	if (socket < 0) {
+		printf("Failed to get socket for test malloc heap.\n");
+		goto cleanup_all;
+	}
 
 	/* Dynamically calculate the overhead by allocating one cacheline and
 	 * then comparing what was allocated from the heap.
@@ -280,7 +318,7 @@ test_multi_alloc_statistics(void)
 
 	void *dummy = rte_malloc_socket(NULL, RTE_CACHE_LINE_SIZE, 0, socket);
 	if (dummy == NULL)
-		return -1;
+		goto cleanup_all;
 
 	rte_malloc_get_socket_stats(socket, &post_stats);
 
@@ -295,7 +333,8 @@ test_multi_alloc_statistics(void)
 
 	void *p1 = rte_malloc_socket("stats", size , align, socket);
 	if (!p1)
-		return -1;
+		goto cleanup_all;
+
 	rte_free(p1);
 	rte_malloc_dump_stats(stdout, "stats");
 
@@ -308,7 +347,7 @@ test_multi_alloc_statistics(void)
 			(post_stats.alloc_count != pre_stats.alloc_count) ||
 			(post_stats.free_count != pre_stats.free_count)) {
 		printf("Malloc statistics are incorrect - freed alloc\n");
-		return -1;
+		goto cleanup_all;
 	}
 	/* Check two consecutive allocations */
 	size = 1024;
@@ -316,12 +355,12 @@ test_multi_alloc_statistics(void)
 	rte_malloc_get_socket_stats(socket,&pre_stats);
 	void *p2 = rte_malloc_socket("add", size ,align, socket);
 	if (!p2)
-		return -1;
+		goto cleanup_all;
 	rte_malloc_get_socket_stats(socket,&first_stats);
 
 	void *p3 = rte_malloc_socket("add2", size,align, socket);
 	if (!p3)
-		return -1;
+		goto cleanup_all;
 
 	rte_malloc_get_socket_stats(socket,&second_stats);
 
@@ -333,34 +372,34 @@ test_multi_alloc_statistics(void)
 
 	if(second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) {
 		printf("Incorrect heap statistics: Total size \n");
-		return -1;
+		goto cleanup_all;
 	}
 	/* Check allocated size is equal to two additions plus overhead */
 	if(second_stats.heap_allocsz_bytes !=
 			size + overhead + first_stats.heap_allocsz_bytes) {
 		printf("Incorrect heap statistics: Allocated size \n");
-		return -1;
+		goto cleanup_all;
 	}
 	/* Check that allocation count increments correctly i.e. +1 */
 	if (second_stats.alloc_count != first_stats.alloc_count + 1) {
 		printf("Incorrect heap statistics: Allocated count \n");
-		return -1;
+		goto cleanup_all;
 	}
 
 	if (second_stats.free_count != first_stats.free_count){
 		printf("Incorrect heap statistics: Free count \n");
-		return -1;
+		goto cleanup_all;
 	}
 
 	/* Make sure that we didn't touch our greatest chunk: 2 * 11M)  */
 	if (post_stats.greatest_free_size != pre_stats.greatest_free_size) {
 		printf("Incorrect heap statistics: Greatest free size \n");
-		return -1;
+		goto cleanup_all;
 	}
 	/* Free size must equal the original free size minus the new allocation*/
 	if (first_stats.heap_freesz_bytes <= second_stats.heap_freesz_bytes) {
 		printf("Incorrect heap statistics: Free size \n");
-		return -1;
+		goto cleanup_all;
 	}
 
 	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) ||
@@ -369,9 +408,21 @@ test_multi_alloc_statistics(void)
 			(post_stats.alloc_count != pre_stats.alloc_count) ||
 			(post_stats.free_count != pre_stats.free_count)) {
 		printf("Malloc statistics are incorrect - freed alloc\n");
-		return -1;
+		goto cleanup_all;
 	}
-	return 0;
+
+	/* set return value as success before cleanup */
+	ret = 0;
+
+	/* cleanup */
+cleanup_all:
+	rte_malloc_heap_memory_remove(__func__, memory, heap_size);
+cleanup_allocated_memory:
+	free(unaligned_memory);
+cleanup_empty_heap:
+	rte_malloc_heap_destroy(__func__);
+end:
+	return ret;
 }
 
 #ifdef RTE_EXEC_ENV_WINDOWS
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.609934478 +0100
+++ 0047-test-malloc-improve-resiliency.patch	2025-06-12 22:06:23.878044807 +0100
@@ -1 +1 @@
-From 7777215715d475b5e884179de39ff4bc6b8cbf72 Mon Sep 17 00:00:00 2001
+From 7d1be9cbb9be54c004526f3032093d8e906d10e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7777215715d475b5e884179de39ff4bc6b8cbf72 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 02a7d8ef20..d6f8da3b24 100644
+index ff081dd931..08a6ca8a26 100644

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'trace: fix overflow in per-lcore trace buffer' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (45 preceding siblings ...)
  2025-06-12 21:07 ` patch 'test/malloc: improve resiliency' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'common/cnxk: fix E-tag pattern parsing' " luca.boccassi
                   ` (23 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Oleksandr Nahnybida; +Cc: Sunil Kumar Kori, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/d55ea085e282c18503f831ccee2a408dc469afa3

Thanks.

Luca Boccassi

---
From d55ea085e282c18503f831ccee2a408dc469afa3 Mon Sep 17 00:00:00 2001
From: Oleksandr Nahnybida <oleksandrn@interfacemasters.com>
Date: Thu, 24 Apr 2025 20:08:18 +0300
Subject: [PATCH] trace: fix overflow in per-lcore trace buffer

[ upstream commit 3c440cdfe87a2925af1be023e66bdf0bffc423a4 ]

Offset should be aligned first before checking if there is free space for
another write.

Bugzilla ID: 1665
Fixes: 032a7e5499a0 ("trace: implement provider payload")

Signed-off-by: Oleksandr Nahnybida <oleksandrn@interfacemasters.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
---
 lib/eal/include/rte_trace_point.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/eal/include/rte_trace_point.h b/lib/eal/include/rte_trace_point.h
index 0f8700974f..ffcb14cc1b 100644
--- a/lib/eal/include/rte_trace_point.h
+++ b/lib/eal/include/rte_trace_point.h
@@ -310,7 +310,7 @@ __rte_trace_mem_get(uint64_t in)
 			return NULL;
 	}
 	/* Check the wrap around case */
-	uint32_t offset = trace->offset;
+	uint32_t offset = RTE_ALIGN_CEIL(trace->offset, __RTE_TRACE_EVENT_HEADER_SZ);
 	if (unlikely((offset + sz) >= trace->len)) {
 		/* Disable the trace event if it in DISCARD mode */
 		if (unlikely(in & __RTE_TRACE_FIELD_ENABLE_DISCARD))
@@ -318,8 +318,6 @@ __rte_trace_mem_get(uint64_t in)
 
 		offset = 0;
 	}
-	/* Align to event header size */
-	offset = RTE_ALIGN_CEIL(offset, __RTE_TRACE_EVENT_HEADER_SZ);
 	void *mem = RTE_PTR_ADD(&trace->mem[0], offset);
 	offset += sz;
 	trace->offset = offset;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.643153910 +0100
+++ 0048-trace-fix-overflow-in-per-lcore-trace-buffer.patch	2025-06-12 22:06:23.878044807 +0100
@@ -1 +1 @@
-From 3c440cdfe87a2925af1be023e66bdf0bffc423a4 Mon Sep 17 00:00:00 2001
+From d55ea085e282c18503f831ccee2a408dc469afa3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c440cdfe87a2925af1be023e66bdf0bffc423a4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8a317d31d2..343e0271b3 100644
+index 0f8700974f..ffcb14cc1b 100644
@@ -23 +24 @@
-@@ -328,7 +328,7 @@ __rte_trace_mem_get(uint64_t in)
+@@ -310,7 +310,7 @@ __rte_trace_mem_get(uint64_t in)
@@ -32 +33 @@
-@@ -336,8 +336,6 @@ __rte_trace_mem_get(uint64_t in)
+@@ -318,8 +318,6 @@ __rte_trace_mem_get(uint64_t in)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'common/cnxk: fix E-tag pattern parsing' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (46 preceding siblings ...)
  2025-06-12 21:07 ` patch 'trace: fix overflow in per-lcore trace buffer' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'common/cnxk: fix CQ tail drop' " luca.boccassi
                   ` (22 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/6545751f4d31b383a9e352d0a0b277ded2e00728

Thanks.

Luca Boccassi

---
From 6545751f4d31b383a9e352d0a0b277ded2e00728 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Thu, 22 May 2025 15:41:16 +0530
Subject: [PATCH] common/cnxk: fix E-tag pattern parsing

[ upstream commit a610e32b96768b84436ba523bc97af88df4d6963 ]

E-tag pattern parsing was using wrong length leading
to a segfault. Fixing this by using the correct length
of the pattern item.

Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc.c       | 5 +++--
 drivers/common/cnxk/roc_npc_parse.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index a5b5f95dec..a6b62074f0 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -712,10 +712,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
 	pst->mcam_data = (uint8_t *)flow->mcam_data;
 	pst->mcam_mask = (uint8_t *)flow->mcam_mask;
 
-	while (pattern->type != ROC_NPC_ITEM_TYPE_END &&
-	       layer < PLT_DIM(parse_stage_funcs)) {
+	while (pattern->type != ROC_NPC_ITEM_TYPE_END && layer < PLT_DIM(parse_stage_funcs)) {
 		/* Skip place-holders */
 		pattern = npc_parse_skip_void_and_any_items(pattern);
+		if (pattern->type == ROC_NPC_ITEM_TYPE_END)
+			break;
 
 		pst->pattern = pattern;
 		rc = parse_stage_funcs[layer](pst);
diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index ce66d2a7d8..79fc7b3bf6 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -453,6 +453,7 @@ npc_parse_lb(struct npc_parse_state *pst)
 		 */
 		lt = NPC_LT_LB_ETAG;
 		lflags = 0;
+		info.len = pattern->size;
 
 		last_pattern = pst->pattern;
 		pattern = npc_parse_skip_void_and_any_items(pst->pattern + 1);
@@ -467,7 +468,6 @@ npc_parse_lb(struct npc_parse_state *pst)
 			lflags = NPC_F_ETAG_CTAG;
 			last_pattern = pattern;
 		}
-		info.len = pattern->size;
 	} else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_QINQ) {
 		info.hw_mask = NULL;
 		info.len = pattern->size;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.675737255 +0100
+++ 0049-common-cnxk-fix-E-tag-pattern-parsing.patch	2025-06-12 22:06:23.878044807 +0100
@@ -1 +1 @@
-From a610e32b96768b84436ba523bc97af88df4d6963 Mon Sep 17 00:00:00 2001
+From 6545751f4d31b383a9e352d0a0b277ded2e00728 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a610e32b96768b84436ba523bc97af88df4d6963 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1f2461e026..50106b8773 100644
+index a5b5f95dec..a6b62074f0 100644
@@ -24 +25 @@
-@@ -995,10 +995,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
+@@ -712,10 +712,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
@@ -39 +40 @@
-index b52024f434..37b43995db 100644
+index ce66d2a7d8..79fc7b3bf6 100644
@@ -42 +43 @@
-@@ -531,6 +531,7 @@ npc_parse_lb(struct npc_parse_state *pst)
+@@ -453,6 +453,7 @@ npc_parse_lb(struct npc_parse_state *pst)
@@ -50 +51 @@
-@@ -545,7 +546,6 @@ npc_parse_lb(struct npc_parse_state *pst)
+@@ -467,7 +468,6 @@ npc_parse_lb(struct npc_parse_state *pst)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'common/cnxk: fix CQ tail drop' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (47 preceding siblings ...)
  2025-06-12 21:07 ` patch 'common/cnxk: fix E-tag pattern parsing' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/cnxk: fix descriptor count update on reconfig' " luca.boccassi
                   ` (21 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/dd587a6b20ccf9e2a7f604d0a6e9e532fdc0b179

Thanks.

Luca Boccassi

---
From dd587a6b20ccf9e2a7f604d0a6e9e532fdc0b179 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Wed, 28 May 2025 17:21:16 +0530
Subject: [PATCH] common/cnxk: fix CQ tail drop

[ upstream commit dc8f10bb36bbd9dd961e4baba693181add66c962 ]

CQ tail drop feature is currently supposed to be enabled
when inline IPsec is disabled. But since XQE drop is not
enabled, CQ tail drop is implicitly disabled. Fix the same.

Fixes: c8c967e11717 ("common/cnxk: support enabling AURA tail drop for RQ")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_nix.h       |  2 ++
 drivers/common/cnxk/roc_nix_queue.c | 11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 1125fff020..fc4126f5bb 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -322,6 +322,8 @@ struct roc_nix_rq {
 	bool lpb_drop_ena;
 	/* SPB aura drop enable */
 	bool spb_drop_ena;
+	/* XQE drop enable */
+	bool xqe_drop_ena;
 	/* End of Input parameters */
 	struct roc_nix *roc_nix;
 	uint64_t meta_aura_handle;
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index 1cb1fd2101..965ebc7a1f 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -333,7 +333,7 @@ nix_rq_cn9k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints,
 	aq->rq.rq_int_ena = 0;
 	/* Many to one reduction */
 	aq->rq.qint_idx = rq->qid % qints;
-	aq->rq.xqe_drop_ena = 1;
+	aq->rq.xqe_drop_ena = rq->xqe_drop_ena;
 
 	/* If RED enabled, then fill enable for all cases */
 	if (rq->red_pass && (rq->red_pass >= rq->red_drop)) {
@@ -417,6 +417,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
 		aq->rq.wqe_skip = rq->wqe_skip;
 		aq->rq.wqe_caching = 1;
 
+		aq->rq.xqe_drop_ena = 0;
 		aq->rq.good_utag = rq->tag_mask >> 24;
 		aq->rq.bad_utag = rq->tag_mask >> 24;
 		aq->rq.ltag = rq->tag_mask & BITMASK_ULL(24, 0);
@@ -436,6 +437,8 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
 		aq->rq.bad_utag = rq->tag_mask >> 24;
 		aq->rq.ltag = rq->tag_mask & BITMASK_ULL(24, 0);
 		aq->rq.cq = rq->cqid;
+		if (rq->xqe_drop_ena)
+			aq->rq.xqe_drop_ena = 1;
 	}
 
 	if (rq->ipsech_ena) {
@@ -481,7 +484,6 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
 	aq->rq.rq_int_ena = 0;
 	/* Many to one reduction */
 	aq->rq.qint_idx = rq->qid % qints;
-	aq->rq.xqe_drop_ena = 0;
 	aq->rq.lpb_drop_ena = rq->lpb_drop_ena;
 	aq->rq.spb_drop_ena = rq->spb_drop_ena;
 
@@ -526,6 +528,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
 			aq->rq_mask.bad_utag = ~aq->rq_mask.bad_utag;
 			aq->rq_mask.ltag = ~aq->rq_mask.ltag;
 			aq->rq_mask.cq = ~aq->rq_mask.cq;
+			aq->rq_mask.xqe_drop_ena = ~aq->rq_mask.xqe_drop_ena;
 		}
 
 		if (rq->ipsech_ena)
@@ -626,6 +629,10 @@ roc_nix_rq_init(struct roc_nix *roc_nix, struct roc_nix_rq *rq, bool ena)
 
 	rq->roc_nix = roc_nix;
 
+	/* Enable XQE/CQ drop on cn10k to count pkt drops only when inline is disabled */
+	if (roc_model_is_cn10k() && !roc_nix_inl_inb_is_enabled(roc_nix))
+		rq->xqe_drop_ena = true;
+
 	if (is_cn9k)
 		rc = nix_rq_cn9k_cfg(dev, rq, nix->qints, false, ena);
 	else
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.709938028 +0100
+++ 0050-common-cnxk-fix-CQ-tail-drop.patch	2025-06-12 22:06:23.878044807 +0100
@@ -1 +1 @@
-From dc8f10bb36bbd9dd961e4baba693181add66c962 Mon Sep 17 00:00:00 2001
+From dd587a6b20ccf9e2a7f604d0a6e9e532fdc0b179 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dc8f10bb36bbd9dd961e4baba693181add66c962 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 80392e7e1b..1e543d8f11 100644
+index 1125fff020..fc4126f5bb 100644
@@ -23 +24 @@
-@@ -355,6 +355,8 @@ struct roc_nix_rq {
+@@ -322,6 +322,8 @@ struct roc_nix_rq {
@@ -33 +34 @@
-index e852211ba4..39bd051c94 100644
+index 1cb1fd2101..965ebc7a1f 100644
@@ -36 +37 @@
-@@ -530,7 +530,7 @@ nix_rq_cn9k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints,
+@@ -333,7 +333,7 @@ nix_rq_cn9k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints,
@@ -45 +46 @@
-@@ -613,6 +613,7 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -417,6 +417,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -53 +54 @@
-@@ -632,6 +633,8 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -436,6 +437,8 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -62 +63 @@
-@@ -680,7 +683,6 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -481,7 +484,6 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -70 +71 @@
-@@ -725,6 +727,7 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -526,6 +528,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -78 +79,2 @@
-@@ -950,6 +953,10 @@ roc_nix_rq_init(struct roc_nix *roc_nix, struct roc_nix_rq *rq, bool ena)
+@@ -626,6 +629,10 @@ roc_nix_rq_init(struct roc_nix *roc_nix, struct roc_nix_rq *rq, bool ena)
+ 
@@ -80 +81,0 @@
- 	rq->tc = ROC_NIX_PFC_CLASS_INVALID;
@@ -88 +89 @@
- 	else if (roc_model_is_cn10k())
+ 	else

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/cnxk: fix descriptor count update on reconfig' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (48 preceding siblings ...)
  2025-06-12 21:07 ` patch 'common/cnxk: fix CQ tail drop' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'ethdev: fix error struct in flow configure' " luca.boccassi
                   ` (20 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/12296df8a2395117d1027c9883691a9ad167fb5a

Thanks.

Luca Boccassi

---
From 12296df8a2395117d1027c9883691a9ad167fb5a Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Wed, 28 May 2025 17:21:19 +0530
Subject: [PATCH] net/cnxk: fix descriptor count update on reconfig

[ upstream commit ad23295cb8217390b9f966ad5ee10a4e21f9c20b ]

In Rx queue setup, input descriptors count is updated as per
requirement, and stored. But during port reconfig , this
descriptor count will change again in rx queue setup.
Hence, will need to store the initial input descriptor count.

Fixes: a86144cd9ded ("net/cnxk: add Rx queue setup and release")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 73f59dede1..f5097c7fae 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -603,6 +603,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
 	struct roc_nix *nix = &dev->nix;
 	struct cnxk_eth_rxq_sp *rxq_sp;
 	struct rte_mempool_ops *ops;
+	uint32_t desc_cnt = nb_desc;
 	const char *platform_ops;
 	struct roc_nix_rq *rq;
 	struct roc_nix_cq *cq;
@@ -716,7 +717,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
 	rxq_sp->qconf.conf.rx = *rx_conf;
 	/* Queue config should reflect global offloads */
 	rxq_sp->qconf.conf.rx.offloads = dev->rx_offloads;
-	rxq_sp->qconf.nb_desc = nb_desc;
+	rxq_sp->qconf.nb_desc = desc_cnt;
 	rxq_sp->qconf.mp = lpb_pool;
 	rxq_sp->tc = 0;
 	rxq_sp->tx_pause = (dev->fc_cfg.mode == RTE_ETH_FC_FULL ||
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.743822933 +0100
+++ 0051-net-cnxk-fix-descriptor-count-update-on-reconfig.patch	2025-06-12 22:06:23.878044807 +0100
@@ -1 +1 @@
-From ad23295cb8217390b9f966ad5ee10a4e21f9c20b Mon Sep 17 00:00:00 2001
+From 12296df8a2395117d1027c9883691a9ad167fb5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ad23295cb8217390b9f966ad5ee10a4e21f9c20b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 85fdb4dc91..fc17841bca 100644
+index 73f59dede1..f5097c7fae 100644
@@ -23 +24 @@
-@@ -653,6 +653,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
+@@ -603,6 +603,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
@@ -31 +32 @@
-@@ -778,7 +779,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
+@@ -716,7 +717,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'ethdev: fix error struct in flow configure' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (49 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/cnxk: fix descriptor count update on reconfig' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/ice/base: fix integer overflow' " luca.boccassi
                   ` (19 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/b1c902f71ae72b489603351887544562e50ffed8

Thanks.

Luca Boccassi

---
From b1c902f71ae72b489603351887544562e50ffed8 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Thu, 29 May 2025 08:56:10 +0300
Subject: [PATCH] ethdev: fix error struct in flow configure

[ upstream commit af7ac22d8da82398065d5f3c799c17a7cec3a6af ]

rte_flow_configure() returned error value w/o filling the
error struct which caused a crash on complain function.

Filling the error struct fixed the issue.

Fixes: 4ff58b734bc9 ("ethdev: introduce flow engine configuration")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
---
 lib/ethdev/rte_flow.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index aa43b8034d..93dfa29df8 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -1489,21 +1489,21 @@ rte_flow_configure(uint16_t port_id,
 		RTE_FLOW_LOG(INFO,
 			"Device with port_id=%"PRIu16" is not configured.\n",
 			port_id);
-		return -EINVAL;
+		goto error;
 	}
 	if (dev->data->dev_started != 0) {
 		RTE_FLOW_LOG(INFO,
 			"Device with port_id=%"PRIu16" already started.\n",
 			port_id);
-		return -EINVAL;
+		goto error;
 	}
 	if (port_attr == NULL) {
 		RTE_FLOW_LOG(ERR, "Port %"PRIu16" info is NULL.\n", port_id);
-		return -EINVAL;
+		goto error;
 	}
 	if (queue_attr == NULL) {
 		RTE_FLOW_LOG(ERR, "Port %"PRIu16" queue info is NULL.\n", port_id);
-		return -EINVAL;
+		goto error;
 	}
 	if (likely(!!ops->configure)) {
 		ret = ops->configure(dev, port_attr, nb_queue, queue_attr, error);
@@ -1514,6 +1514,10 @@ rte_flow_configure(uint16_t port_id,
 	return rte_flow_error_set(error, ENOTSUP,
 				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				  NULL, rte_strerror(ENOTSUP));
+error:
+	return rte_flow_error_set(error, EINVAL,
+				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				  NULL, rte_strerror(EINVAL));
 }
 
 struct rte_flow_pattern_template *
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.777059948 +0100
+++ 0052-ethdev-fix-error-struct-in-flow-configure.patch	2025-06-12 22:06:23.882044892 +0100
@@ -1 +1 @@
-From af7ac22d8da82398065d5f3c799c17a7cec3a6af Mon Sep 17 00:00:00 2001
+From b1c902f71ae72b489603351887544562e50ffed8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af7ac22d8da82398065d5f3c799c17a7cec3a6af ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9f8d8f3dc2..fe8f43caff 100644
+index aa43b8034d..93dfa29df8 100644
@@ -23,3 +24,3 @@
-@@ -1725,21 +1725,21 @@ rte_flow_configure(uint16_t port_id,
- 		FLOW_LOG(INFO,
- 			"Device with port_id=%"PRIu16" is not configured.",
+@@ -1489,21 +1489,21 @@ rte_flow_configure(uint16_t port_id,
+ 		RTE_FLOW_LOG(INFO,
+ 			"Device with port_id=%"PRIu16" is not configured.\n",
@@ -31,2 +32,2 @@
- 		FLOW_LOG(INFO,
- 			"Device with port_id=%"PRIu16" already started.",
+ 		RTE_FLOW_LOG(INFO,
+ 			"Device with port_id=%"PRIu16" already started.\n",
@@ -38 +39 @@
- 		FLOW_LOG(ERR, "Port %"PRIu16" info is NULL.", port_id);
+ 		RTE_FLOW_LOG(ERR, "Port %"PRIu16" info is NULL.\n", port_id);
@@ -43 +44 @@
- 		FLOW_LOG(ERR, "Port %"PRIu16" queue info is NULL.", port_id);
+ 		RTE_FLOW_LOG(ERR, "Port %"PRIu16" queue info is NULL.\n", port_id);
@@ -47,3 +48,3 @@
- 	if ((port_attr->flags & RTE_FLOW_PORT_FLAG_SHARE_INDIRECT) &&
- 	     !rte_eth_dev_is_valid_port(port_attr->host_port_id)) {
-@@ -1760,6 +1760,10 @@ rte_flow_configure(uint16_t port_id,
+ 	if (likely(!!ops->configure)) {
+ 		ret = ops->configure(dev, port_attr, nb_queue, queue_attr, error);
+@@ -1514,6 +1514,10 @@ rte_flow_configure(uint16_t port_id,
@@ -59 +60 @@
- RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_flow_pattern_template_create, 22.03)
+ struct rte_flow_pattern_template *

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/ice/base: fix integer overflow' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (50 preceding siblings ...)
  2025-06-12 21:07 ` patch 'ethdev: fix error struct in flow configure' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/ice/base: fix typo in device ID description' " luca.boccassi
                   ` (18 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Lukasz Krakowiak; +Cc: Dhanya Pillai, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/4da4dcd383ddc38564e6802e9ed2ae2b86d25fa2

Thanks.

Luca Boccassi

---
From 4da4dcd383ddc38564e6802e9ed2ae2b86d25fa2 Mon Sep 17 00:00:00 2001
From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Date: Tue, 27 May 2025 13:17:22 +0000
Subject: [PATCH] net/ice/base: fix integer overflow

[ upstream commit 152ebcea022feb1498fed591f92ebcf394a16ea7 ]

Fix integer overflow in power of two calculation. Flagged by internal
static analysis.

Fixes: aa1cd410fa64 ("net/ice/base: add flow module")

Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index 54a753545e..0b4fe7a5bc 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -25,7 +25,7 @@
  */
 static inline bool ice_is_pow2(u64 val)
 {
-	return (val && !(val & (val - 1)));
+	return val != 0 && (val & (val - 1)) == 0;
 }
 
 /**
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.810641857 +0100
+++ 0053-net-ice-base-fix-integer-overflow.patch	2025-06-12 22:06:23.882044892 +0100
@@ -1 +1 @@
-From 152ebcea022feb1498fed591f92ebcf394a16ea7 Mon Sep 17 00:00:00 2001
+From 4da4dcd383ddc38564e6802e9ed2ae2b86d25fa2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 152ebcea022feb1498fed591f92ebcf394a16ea7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- drivers/net/intel/ice/base/ice_type.h | 2 +-
+ drivers/net/ice/base/ice_type.h | 2 +-
@@ -19,4 +20,4 @@
-diff --git a/drivers/net/intel/ice/base/ice_type.h b/drivers/net/intel/ice/base/ice_type.h
-index 297a5ea890..ae3b944d6e 100644
---- a/drivers/net/intel/ice/base/ice_type.h
-+++ b/drivers/net/intel/ice/base/ice_type.h
+diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
+index 54a753545e..0b4fe7a5bc 100644
+--- a/drivers/net/ice/base/ice_type.h
++++ b/drivers/net/ice/base/ice_type.h

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/ice/base: fix typo in device ID description' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (51 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/ice/base: fix integer overflow' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'common/dpaax: fix PDCP key command race condition' " luca.boccassi
                   ` (17 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Lukasz Krakowiak; +Cc: Dhanya Pillai, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/12b57006e7da57d18850244ec4f4dff40426710d

Thanks.

Luca Boccassi

---
From 12b57006e7da57d18850244ec4f4dff40426710d Mon Sep 17 00:00:00 2001
From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Date: Tue, 27 May 2025 13:17:24 +0000
Subject: [PATCH] net/ice/base: fix typo in device ID description

[ upstream commit e54cf1fec8517f9ec1ec6bdca6fd9e6b0dd2c307 ]

Fix typo in desc for dev ID 579F.

Fixes: 6fd3889c1779 ("net/ice/base: support E824S and E825 devices")

Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_devids.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h
index 13a4b16402..c322235c8f 100644
--- a/drivers/net/ice/base/ice_devids.h
+++ b/drivers/net/ice/base/ice_devids.h
@@ -71,7 +71,7 @@
 #define ICE_DEV_ID_E825C_QSFP	        0x579D
 /* Intel(R) Ethernet Connection E825-C for SFP */
 #define ICE_DEV_ID_E825C_SFP	        0x579E
-/* Intel(R) Ethernet Connection E825-C 1GbE */
+/* Intel(R) Ethernet Connection E825-C 10GbE */
 #define ICE_DEV_ID_E825C_1GBE	        0x579F
 /* Intel(R) Ethernet Connection E825-X */
 #define ICE_DEV_ID_E825X	        0x0DCD
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.844433504 +0100
+++ 0054-net-ice-base-fix-typo-in-device-ID-description.patch	2025-06-12 22:06:23.882044892 +0100
@@ -1 +1 @@
-From e54cf1fec8517f9ec1ec6bdca6fd9e6b0dd2c307 Mon Sep 17 00:00:00 2001
+From 12b57006e7da57d18850244ec4f4dff40426710d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e54cf1fec8517f9ec1ec6bdca6fd9e6b0dd2c307 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/net/intel/ice/base/ice_devids.h | 2 +-
+ drivers/net/ice/base/ice_devids.h | 2 +-
@@ -18,6 +19,6 @@
-diff --git a/drivers/net/intel/ice/base/ice_devids.h b/drivers/net/intel/ice/base/ice_devids.h
-index 807b5d0c29..20c6dbd4a5 100644
---- a/drivers/net/intel/ice/base/ice_devids.h
-+++ b/drivers/net/intel/ice/base/ice_devids.h
-@@ -90,7 +90,7 @@
- #define ICE_DEV_ID_E825C_QSFP		0x579D
+diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h
+index 13a4b16402..c322235c8f 100644
+--- a/drivers/net/ice/base/ice_devids.h
++++ b/drivers/net/ice/base/ice_devids.h
+@@ -71,7 +71,7 @@
+ #define ICE_DEV_ID_E825C_QSFP	        0x579D
@@ -25 +26 @@
- #define ICE_DEV_ID_E825C_SFP		0x579E
+ #define ICE_DEV_ID_E825C_SFP	        0x579E
@@ -28,3 +29,3 @@
- #define ICE_DEV_ID_E825C_SGMII		0x579F
- #define ICE_DEV_ID_C825X		0x0DCD
- #endif /* _ICE_DEVIDS_H_ */
+ #define ICE_DEV_ID_E825C_1GBE	        0x579F
+ /* Intel(R) Ethernet Connection E825-X */
+ #define ICE_DEV_ID_E825X	        0x0DCD

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'common/dpaax: fix PDCP key command race condition' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (52 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/ice/base: fix typo in device ID description' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'common/dpaax: fix PDCP AES only 12-bit SN' " luca.boccassi
                   ` (16 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/dce7e9ed56759203c755ace16c51beb6e200086b

Thanks.

Luca Boccassi

---
From dce7e9ed56759203c755ace16c51beb6e200086b Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 21 May 2025 12:26:50 +0530
Subject: [PATCH] common/dpaax: fix PDCP key command race condition
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 684faacc0fde7110c31c640669381dbf19f447f8 ]

A race condition between loading the key into CAAM’s internal
memory and initiating cryptographic operations can cause SEC
errors in PDCP AES algorithm combinations.

To mitigate this, the CALM instruction is added for the
12-bit SN case, and the older version of the descriptor
is used for the 18-bit SN case.

Fixes: 6127fff842a7 ("common/dpaax: remove outdated caamflib code")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 328b307ae9..4eff326738 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+
  * Copyright 2008-2013 Freescale Semiconductor, Inc.
- * Copyright 2019-2022 NXP
+ * Copyright 2019-2025 NXP
  */
 
 #ifndef __DESC_PDCP_H__
@@ -1981,8 +1981,7 @@ pdcp_insert_uplane_no_int_op(struct program *p,
 	KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
 	    cipherdata->keylen, INLINE_KEY(cipherdata));
 
-	if ((sn_size == PDCP_SN_SIZE_15) ||
-			(rta_sec_era >= RTA_SEC_ERA_10)) {
+	if (sn_size == PDCP_SN_SIZE_15) {
 		PROTOCOL(p, dir, OP_PCLID_LTE_PDCP_USER,
 			 (uint16_t)cipherdata->algtype);
 		return 0;
@@ -2747,6 +2746,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,
 			    (uint64_t)cipherdata->key, cipherdata->keylen,
 			    INLINE_KEY(cipherdata));
 
+			JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
 			if (authdata)
 				PROTOCOL(p, OP_TYPE_ENCAP_PROTOCOL,
 					 OP_PCLID_LTE_PDCP_USER_RN,
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.885592917 +0100
+++ 0055-common-dpaax-fix-PDCP-key-command-race-condition.patch	2025-06-12 22:06:23.882044892 +0100
@@ -1 +1 @@
-From 684faacc0fde7110c31c640669381dbf19f447f8 Mon Sep 17 00:00:00 2001
+From dce7e9ed56759203c755ace16c51beb6e200086b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 684faacc0fde7110c31c640669381dbf19f447f8 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 9ada3905c5..f4379ede2c 100644
+index 328b307ae9..4eff326738 100644
@@ -32 +33 @@
-- * Copyright 2019-2023 NXP
+- * Copyright 2019-2022 NXP

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'common/dpaax: fix PDCP AES only 12-bit SN' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (53 preceding siblings ...)
  2025-06-12 21:07 ` patch 'common/dpaax: fix PDCP key command race condition' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'crypto/virtio: add request check on request side' " luca.boccassi
                   ` (15 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/31557339dfd6496a3fd4aee2b065c4bcd913c7a6

Thanks.

Luca Boccassi

---
From 31557339dfd6496a3fd4aee2b065c4bcd913c7a6 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 21 May 2025 12:26:51 +0530
Subject: [PATCH] common/dpaax: fix PDCP AES only 12-bit SN

[ upstream commit f0ccfc4ddc7a01f4544b8a2913cc3d3f7c8b8832 ]

This workaround fixes the invalid key command SEC error.

Fixes: 6127fff842a7 ("common/dpaax: remove outdated caamflib code")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 4eff326738..dbeb013f1c 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -619,7 +619,7 @@ pdcp_insert_cplane_enc_only_op(struct program *p,
 	KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
 	    cipherdata->keylen, INLINE_KEY(cipherdata));
 
-	if ((sn_size != PDCP_SN_SIZE_18 &&
+	if ((authdata && sn_size != PDCP_SN_SIZE_18 &&
 			!(rta_sec_era == RTA_SEC_ERA_8 &&
 				authdata->algtype == 0))
 			|| (rta_sec_era == RTA_SEC_ERA_10)) {
@@ -631,6 +631,7 @@ pdcp_insert_cplane_enc_only_op(struct program *p,
 				 (uint16_t)cipherdata->algtype << 8);
 		return 0;
 	}
+
 	/* Non-proto is supported only for 5bit cplane and 18bit uplane */
 	switch (sn_size) {
 	case PDCP_SN_SIZE_5:
@@ -2719,7 +2720,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,
 		case PDCP_CIPHER_TYPE_AES:
 		case PDCP_CIPHER_TYPE_SNOW:
 		case PDCP_CIPHER_TYPE_NULL:
-			if (rta_sec_era == RTA_SEC_ERA_8 &&
+			if (rta_sec_era >= RTA_SEC_ERA_8 &&
 					authdata && authdata->algtype == 0){
 				err = pdcp_insert_uplane_with_int_op(p, swap,
 						cipherdata, authdata,
@@ -2729,6 +2730,17 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,
 					return err;
 				break;
 			}
+			if (rta_sec_era >= RTA_SEC_ERA_8 &&
+					cipherdata->algtype == PDCP_CIPHER_TYPE_AES
+					&& !authdata
+					&& sn_size == PDCP_SN_SIZE_12) {
+				err = pdcp_insert_cplane_enc_only_op(p, swap, cipherdata,
+						authdata,
+						OP_TYPE_ENCAP_PROTOCOL, sn_size);
+				if (err)
+					return err;
+				break;
+			}
 
 			if (pdb_type != PDCP_PDB_TYPE_FULL_PDB) {
 				pr_err("PDB type must be FULL for PROTO desc\n");
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.919861769 +0100
+++ 0056-common-dpaax-fix-PDCP-AES-only-12-bit-SN.patch	2025-06-12 22:06:23.886044975 +0100
@@ -1 +1 @@
-From f0ccfc4ddc7a01f4544b8a2913cc3d3f7c8b8832 Mon Sep 17 00:00:00 2001
+From 31557339dfd6496a3fd4aee2b065c4bcd913c7a6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0ccfc4ddc7a01f4544b8a2913cc3d3f7c8b8832 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index f4379ede2c..c90eff26a8 100644
+index 4eff326738..dbeb013f1c 100644

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'crypto/virtio: add request check on request side' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (54 preceding siblings ...)
  2025-06-12 21:07 ` patch 'common/dpaax: fix PDCP AES only 12-bit SN' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'crypto/virtio: fix driver cleanup' " luca.boccassi
                   ` (14 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Fan Zhang, Yu Jiang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/1bb460c2f84aecae79002005fd5a5b1196e817ac

Thanks.

Luca Boccassi

---
From 1bb460c2f84aecae79002005fd5a5b1196e817ac Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Fri, 23 May 2025 14:04:50 +0000
Subject: [PATCH] crypto/virtio: add request check on request side

[ upstream commit 9771f037ec8c6592126be49ca50953d1a14a0335 ]

Add same request checks on the request side.

Fixes: b2866f473369 ("vhost/crypto: fix missed request check for copy mode")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <fanzhang.oss@gmail.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
---
 drivers/crypto/virtio/virtio_rxtx.c | 41 +++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 01977c7ec4..b18b50428d 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -107,6 +107,41 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq,
 	return i;
 }
 
+
+static __rte_always_inline uint8_t
+virtqueue_crypto_check_cipher_request(struct virtio_crypto_cipher_data_req *req)
+{
+	if (likely((req->para.iv_len <= VIRTIO_CRYPTO_MAX_IV_SIZE) &&
+		(req->para.src_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+		(req->para.dst_data_len >= req->para.src_data_len) &&
+		(req->para.dst_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE)))
+		return VIRTIO_CRYPTO_OK;
+	return VIRTIO_CRYPTO_BADMSG;
+}
+
+static __rte_always_inline uint8_t
+virtqueue_crypto_check_chain_request(struct virtio_crypto_alg_chain_data_req *req)
+{
+	if (likely((req->para.iv_len <= VIRTIO_CRYPTO_MAX_IV_SIZE) &&
+		(req->para.src_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+		(req->para.dst_data_len >= req->para.src_data_len) &&
+		(req->para.dst_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+		(req->para.cipher_start_src_offset <
+			RTE_MBUF_DEFAULT_BUF_SIZE) &&
+		(req->para.len_to_cipher <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+		(req->para.hash_start_src_offset <
+			RTE_MBUF_DEFAULT_BUF_SIZE) &&
+		(req->para.len_to_hash <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+		(req->para.cipher_start_src_offset + req->para.len_to_cipher <=
+			req->para.src_data_len) &&
+		(req->para.hash_start_src_offset + req->para.len_to_hash <=
+			req->para.src_data_len) &&
+		(req->para.dst_data_len + req->para.hash_result_len <=
+			RTE_MBUF_DEFAULT_BUF_SIZE)))
+		return VIRTIO_CRYPTO_OK;
+	return VIRTIO_CRYPTO_BADMSG;
+}
+
 static int
 virtqueue_crypto_sym_pkt_header_arrange(
 		struct rte_crypto_op *cop,
@@ -142,6 +177,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
 				sym_op->cipher.data.offset);
 		req_data->u.sym_req.u.cipher.para.dst_data_len =
 			req_data->u.sym_req.u.cipher.para.src_data_len;
+		if (virtqueue_crypto_check_cipher_request(
+			&req_data->u.sym_req.u.cipher) != VIRTIO_CRYPTO_OK)
+			return -1;
 		break;
 	case VIRTIO_CRYPTO_SYM_OP_ALGORITHM_CHAINING:
 		req_data->u.sym_req.op_type =
@@ -181,6 +219,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
 			VIRTIO_CRYPTO_SYM_HASH_MODE_AUTH)
 			req_data->u.sym_req.u.chain.para.hash_result_len =
 				chain_para->u.mac_param.hash_result_len;
+		if (virtqueue_crypto_check_chain_request(
+			&req_data->u.sym_req.u.chain) != VIRTIO_CRYPTO_OK)
+			return -1;
 		break;
 	default:
 		return -1;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.953490628 +0100
+++ 0057-crypto-virtio-add-request-check-on-request-side.patch	2025-06-12 22:06:23.886044975 +0100
@@ -1 +1 @@
-From 9771f037ec8c6592126be49ca50953d1a14a0335 Mon Sep 17 00:00:00 2001
+From 1bb460c2f84aecae79002005fd5a5b1196e817ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9771f037ec8c6592126be49ca50953d1a14a0335 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- drivers/crypto/virtio/virtio_rxtx.c | 40 +++++++++++++++++++++++++++++
- 1 file changed, 40 insertions(+)
+ drivers/crypto/virtio/virtio_rxtx.c | 41 +++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
@@ -19 +20 @@
-index a7f1bd9753..00988e18b1 100644
+index 01977c7ec4..b18b50428d 100644
@@ -22 +23 @@
-@@ -193,6 +193,40 @@ virtqueue_dequeue_burst_rx_packed(struct virtqueue *vq,
+@@ -107,6 +107,41 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq,
@@ -25,0 +27 @@
++
@@ -60 +62 @@
- static inline int
+ static int
@@ -63 +65 @@
-@@ -228,6 +262,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
+@@ -142,6 +177,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
@@ -73 +75 @@
-@@ -267,6 +304,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
+@@ -181,6 +219,9 @@ virtqueue_crypto_sym_pkt_header_arrange(

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'crypto/virtio: fix driver cleanup' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (55 preceding siblings ...)
  2025-06-12 21:07 ` patch 'crypto/virtio: add request check on request side' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'ethdev: keep promiscuous/allmulti value before disabling' " luca.boccassi
                   ` (13 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/fed8ce8b288a7a124d84a6f245beffc198e4c416

Thanks.

Luca Boccassi

---
From fed8ce8b288a7a124d84a6f245beffc198e4c416 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Thu, 29 May 2025 11:45:53 +0000
Subject: [PATCH] crypto/virtio: fix driver cleanup

[ upstream commit 6adb7f4ae156341958463db80951d8f528932e9f ]

Improper cleanup resulted in a segfault when more
than 1 device was used

Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/virtio/virtio_cryptodev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 51e560e045..6020e70a5a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -779,8 +779,7 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
 	cryptodev->enqueue_burst = NULL;
 	cryptodev->dequeue_burst = NULL;
 
-	rte_free(cryptodev->data);
-	cryptodev->data = NULL;
+	rte_cryptodev_pmd_release_device(cryptodev);
 
 	VIRTIO_CRYPTO_DRV_LOG_INFO("dev_uninit completed");
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:25.986510180 +0100
+++ 0058-crypto-virtio-fix-driver-cleanup.patch	2025-06-12 22:06:23.886044975 +0100
@@ -1 +1 @@
-From 6adb7f4ae156341958463db80951d8f528932e9f Mon Sep 17 00:00:00 2001
+From fed8ce8b288a7a124d84a6f245beffc198e4c416 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6adb7f4ae156341958463db80951d8f528932e9f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f591cf0c7a..299898e585 100644
+index 51e560e045..6020e70a5a 100644
@@ -22 +23 @@
-@@ -625,8 +625,7 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
+@@ -779,8 +779,7 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'ethdev: keep promiscuous/allmulti value before disabling' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (56 preceding siblings ...)
  2025-06-12 21:07 ` patch 'crypto/virtio: fix driver cleanup' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'eal: fix return value of lcore role' " luca.boccassi
                   ` (12 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Sunyang Wu; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/b4656b4697bf63efa148d24660e7354c72a65787

Thanks.

Luca Boccassi

---
From b4656b4697bf63efa148d24660e7354c72a65787 Mon Sep 17 00:00:00 2001
From: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Date: Thu, 22 May 2025 15:42:42 +0800
Subject: [PATCH] ethdev: keep promiscuous/allmulti value before disabling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 00add16978762a8bcd98cd9465503194dc4c1e9a ]

The values were reset to 0 before calling the driver function
for disabling promiscuous or allmulticast,
which could lead the driver to skip disabling.

The values of the promiscuous and allmulticast variables
are set after calling the driver, according to the return value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/ethdev/rte_ethdev.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index f08cf5ccad..75bfc8a299 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -2550,10 +2550,9 @@ rte_eth_promiscuous_disable(uint16_t port_id)
 	if (*dev->dev_ops->promiscuous_disable == NULL)
 		return -ENOTSUP;
 
-	dev->data->promiscuous = 0;
 	diag = (*dev->dev_ops->promiscuous_disable)(dev);
-	if (diag != 0)
-		dev->data->promiscuous = 1;
+	if (diag == 0)
+		dev->data->promiscuous = 0;
 
 	return eth_err(port_id, diag);
 }
@@ -2603,10 +2602,10 @@ rte_eth_allmulticast_disable(uint16_t port_id)
 
 	if (*dev->dev_ops->allmulticast_disable == NULL)
 		return -ENOTSUP;
-	dev->data->all_multicast = 0;
+
 	diag = (*dev->dev_ops->allmulticast_disable)(dev);
-	if (diag != 0)
-		dev->data->all_multicast = 1;
+	if (diag == 0)
+		dev->data->all_multicast = 0;
 
 	return eth_err(port_id, diag);
 }
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.018999467 +0100
+++ 0059-ethdev-keep-promiscuous-allmulti-value-before-disabl.patch	2025-06-12 22:06:23.886044975 +0100
@@ -1 +1 @@
-From 00add16978762a8bcd98cd9465503194dc4c1e9a Mon Sep 17 00:00:00 2001
+From b4656b4697bf63efa148d24660e7354c72a65787 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 00add16978762a8bcd98cd9465503194dc4c1e9a ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index d4197322a0..dd7c00bc94 100644
+index f08cf5ccad..75bfc8a299 100644
@@ -29,2 +30,2 @@
-@@ -3044,10 +3044,9 @@ rte_eth_promiscuous_disable(uint16_t port_id)
- 	if (dev->dev_ops->promiscuous_disable == NULL)
+@@ -2550,10 +2550,9 @@ rte_eth_promiscuous_disable(uint16_t port_id)
+ 	if (*dev->dev_ops->promiscuous_disable == NULL)
@@ -34 +35 @@
- 	diag = dev->dev_ops->promiscuous_disable(dev);
+ 	diag = (*dev->dev_ops->promiscuous_disable)(dev);
@@ -40,3 +41,3 @@
- 	diag = eth_err(port_id, diag);
- 
-@@ -3112,10 +3111,10 @@ rte_eth_allmulticast_disable(uint16_t port_id)
+ 	return eth_err(port_id, diag);
+ }
+@@ -2603,10 +2602,10 @@ rte_eth_allmulticast_disable(uint16_t port_id)
@@ -44 +45 @@
- 	if (dev->dev_ops->allmulticast_disable == NULL)
+ 	if (*dev->dev_ops->allmulticast_disable == NULL)
@@ -48 +49 @@
- 	diag = dev->dev_ops->allmulticast_disable(dev);
+ 	diag = (*dev->dev_ops->allmulticast_disable)(dev);
@@ -54,2 +55,2 @@
- 	diag = eth_err(port_id, diag);
- 
+ 	return eth_err(port_id, diag);
+ }

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'eal: fix return value of lcore role' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (57 preceding siblings ...)
  2025-06-12 21:07 ` patch 'ethdev: keep promiscuous/allmulti value before disabling' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'eal: warn if no lcore is available' " luca.boccassi
                   ` (11 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Morten Brørup, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/8d1e36fc3b8ccc621ad53aa5208ab0555b970dc8

Thanks.

Luca Boccassi

---
From 8d1e36fc3b8ccc621ad53aa5208ab0555b970dc8 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 21 May 2025 01:47:26 +0530
Subject: [PATCH] eal: fix return value of lcore role
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 65e03bc2f35109cb33ad4a6e244d5ea90e78fcde ]

Update rte_lcore_has_role() to return false instead of a
negative value for invalid lcore IDs, removing the need
for callers to pre-validate the ID.

Fixes: b0a1502a277c ("eal: make semantics of lcore role function more intuitive")

Suggested-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
 lib/eal/common/eal_common_lcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_common_lcore.c
index 787dbaff36..9bcfadcf9e 100644
--- a/lib/eal/common/eal_common_lcore.c
+++ b/lib/eal/common/eal_common_lcore.c
@@ -75,7 +75,7 @@ rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role)
 	struct rte_config *cfg = rte_eal_get_configuration();
 
 	if (lcore_id >= RTE_MAX_LCORE)
-		return -EINVAL;
+		return 0;
 
 	return cfg->lcore_role[lcore_id] == role;
 }
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.054207351 +0100
+++ 0060-eal-fix-return-value-of-lcore-role.patch	2025-06-12 22:06:23.886044975 +0100
@@ -1 +1 @@
-From 65e03bc2f35109cb33ad4a6e244d5ea90e78fcde Mon Sep 17 00:00:00 2001
+From 8d1e36fc3b8ccc621ad53aa5208ab0555b970dc8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 65e03bc2f35109cb33ad4a6e244d5ea90e78fcde ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 294267177d..9dd6c72055 100644
+index 787dbaff36..9bcfadcf9e 100644
@@ -28 +29 @@
-@@ -87,7 +87,7 @@ rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role)
+@@ -75,7 +75,7 @@ rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'eal: warn if no lcore is available' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (58 preceding siblings ...)
  2025-06-12 21:07 ` patch 'eal: fix return value of lcore role' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'bus: cleanup device lists' " luca.boccassi
                   ` (10 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: David Marchand; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/2109b0ee034637cda55febebfdeb5c66ee4f060b

Thanks.

Luca Boccassi

---
From 2109b0ee034637cda55febebfdeb5c66ee4f060b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 8 May 2025 07:19:15 +0200
Subject: [PATCH] eal: warn if no lcore is available

[ upstream commit 2ea1d30dc938866a983156473579d10bddb4951e ]

On systems with more cpu than RTE_MAX_LCORE, starting DPDK with
cores >= RTE_MAX_LCORE ends up with an ambiguous error log.

Example with RTE_MAX_LCORE=8:
$ taskset -c 8 ./build/app/dpdk-testpmd
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
Cannot init EAL: Invalid argument

Add a better hint to help the user.

Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/common/eal_common_options.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index 5312d03552..828fa2698b 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -2026,6 +2026,11 @@ eal_adjust_config(struct internal_config *internal_cfg)
 	if (!core_parsed)
 		eal_auto_detect_cores(cfg);
 
+	if (cfg->lcore_count == 0) {
+		RTE_LOG(ERR, EAL, "No detected lcore is enabled, please check the core list\n");
+		return -1;
+	}
+
 	if (internal_conf->process_type == RTE_PROC_AUTO)
 		internal_conf->process_type = eal_proc_type_detect();
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.087751729 +0100
+++ 0061-eal-warn-if-no-lcore-is-available.patch	2025-06-12 22:06:23.890045060 +0100
@@ -1 +1 @@
-From 2ea1d30dc938866a983156473579d10bddb4951e Mon Sep 17 00:00:00 2001
+From 2109b0ee034637cda55febebfdeb5c66ee4f060b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ea1d30dc938866a983156473579d10bddb4951e ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index b6fff7ec05..b194d0ee06 100644
+index 5312d03552..828fa2698b 100644
@@ -32 +33 @@
-@@ -2052,6 +2052,11 @@ eal_adjust_config(struct internal_config *internal_cfg)
+@@ -2026,6 +2026,11 @@ eal_adjust_config(struct internal_config *internal_cfg)
@@ -37 +38 @@
-+		EAL_LOG(ERR, "No detected lcore is enabled, please check the core list");
++		RTE_LOG(ERR, EAL, "No detected lcore is enabled, please check the core list\n");

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'bus: cleanup device lists' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (59 preceding siblings ...)
  2025-06-12 21:07 ` patch 'eal: warn if no lcore is available' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'eal/linux: unregister alarm callback before free' " luca.boccassi
                   ` (9 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/a025a6346bc564be08c5314cbd63242156af512c

Thanks.

Luca Boccassi

---
From a025a6346bc564be08c5314cbd63242156af512c Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 20 Feb 2025 16:09:06 +0800
Subject: [PATCH] bus: cleanup device lists
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 398bb775edc5434ad94578a5e6c49fa1328acc0f ]

Although eal_bus_cleanup() is not invoked for multiple times, this is a
good programming habit to remove the device object from list when
cleanup bus.

Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown")
Fixes: 62b906cf06ba ("bus/uacce: introduce UACCE bus")
Fixes: 65780eada9d9 ("bus/vmbus: support cleanup")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 drivers/bus/pci/pci_common.c | 1 +
 drivers/bus/vdev/vdev.c      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 465f9258af..4c1c09843c 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -455,6 +455,7 @@ free:
 		rte_intr_instance_free(dev->vfio_req_intr_handle);
 		dev->vfio_req_intr_handle = NULL;
 
+		TAILQ_REMOVE(&rte_pci_bus.device_list, dev, next);
 		pci_free(dev);
 	}
 
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index ec7abe7cda..ae79cfd049 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -596,6 +596,7 @@ vdev_cleanup(void)
 
 		dev->device.driver = NULL;
 free:
+		TAILQ_REMOVE(&vdev_device_list, dev, next);
 		free(dev);
 	}
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.121495826 +0100
+++ 0062-bus-cleanup-device-lists.patch	2025-06-12 22:06:23.890045060 +0100
@@ -1 +1 @@
-From 398bb775edc5434ad94578a5e6c49fa1328acc0f Mon Sep 17 00:00:00 2001
+From a025a6346bc564be08c5314cbd63242156af512c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 398bb775edc5434ad94578a5e6c49fa1328acc0f ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21,5 +22,3 @@
- drivers/bus/pci/pci_common.c     | 1 +
- drivers/bus/uacce/uacce.c        | 1 +
- drivers/bus/vdev/vdev.c          | 1 +
- drivers/bus/vmbus/vmbus_common.c | 1 +
- 4 files changed, 4 insertions(+)
+ drivers/bus/pci/pci_common.c | 1 +
+ drivers/bus/vdev/vdev.c      | 1 +
+ 2 files changed, 2 insertions(+)
@@ -28 +27 @@
-index 5df4086f31..c88634f790 100644
+index 465f9258af..4c1c09843c 100644
@@ -31 +30 @@
-@@ -451,6 +451,7 @@ free:
+@@ -455,6 +455,7 @@ free:
@@ -36 +35 @@
- 		pci_free(RTE_PCI_DEVICE_INTERNAL(dev));
+ 		pci_free(dev);
@@ -39,12 +37,0 @@
-diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
-index 9b8ac23952..f5343ed87a 100644
---- a/drivers/bus/uacce/uacce.c
-+++ b/drivers/bus/uacce/uacce.c
-@@ -455,6 +455,7 @@ uacce_cleanup(void)
- 		dev->device.driver = NULL;
- 
- free:
-+		TAILQ_REMOVE(&uacce_bus.device_list, dev, next);
- 		memset(dev, 0, sizeof(*dev));
- 		free(dev);
- 	}
@@ -52 +39 @@
-index beee8c4033..be375f63dc 100644
+index ec7abe7cda..ae79cfd049 100644
@@ -55 +42 @@
-@@ -603,6 +603,7 @@ vdev_cleanup(void)
+@@ -596,6 +596,7 @@ vdev_cleanup(void)
@@ -60,12 +46,0 @@
- 		free(dev);
- 	}
- 
-diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
-index ac04ee11f8..a787d8b18d 100644
---- a/drivers/bus/vmbus/vmbus_common.c
-+++ b/drivers/bus/vmbus/vmbus_common.c
-@@ -240,6 +240,7 @@ rte_vmbus_cleanup(void)
- 
- 		dev->driver = NULL;
- 		dev->device.driver = NULL;
-+		TAILQ_REMOVE(&rte_vmbus_bus.device_list, dev, next);

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'eal/linux: unregister alarm callback before free' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (60 preceding siblings ...)
  2025-06-12 21:07 ` patch 'bus: cleanup device lists' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'eal/freebsd: " luca.boccassi
                   ` (8 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Rui Ferreira; +Cc: Konstantin Ananyev, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/cbb840f586dfe10ea619dd94a97336fd09d621e7

Thanks.

Luca Boccassi

---
From cbb840f586dfe10ea619dd94a97336fd09d621e7 Mon Sep 17 00:00:00 2001
From: Rui Ferreira <rui.ferreira1@h-partners.com>
Date: Fri, 30 May 2025 09:18:43 +0100
Subject: [PATCH] eal/linux: unregister alarm callback before free

[ upstream commit d84bf0d9aeb474d89a412b6af8e947b16bfcb895 ]

This was flagged by Address sanitizer as a use after free. The
intr_handle ptr is shared between the main thread and the interrupt
thread. The interrupt thread can dereference the ptr after free (from
the alarm callback). free is called when the main thread cleans up.

The interrupt thread never terminates (eal_intr_thread_main) so
use rte_intr_callback_unregister_sync during cleanup to
ensure the callback is removed before freeing the ptr.

To be more defensive clear out the pointer and registration
variable if we can unregister.

rte_intr_callback_unregister_sync may (optionally) use traces
so the alarm cleanup must happen before eal_trace_fini to avoid
accessing freed memory.

Bugzilla ID: 1683
Fixes: 90b13ab8d4f7 ("alarm: remove direct access to interrupt handle")

Signed-off-by: Rui Ferreira <rui.ferreira1@h-partners.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 .mailmap                  | 1 +
 lib/eal/linux/eal.c       | 2 +-
 lib/eal/linux/eal_alarm.c | 9 ++++++++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 8cd91eff62..c29ac7d334 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1206,6 +1206,7 @@ Rosen Xu <rosen.xu@intel.com>
 Roy Franz <roy.franz@cavium.com>
 Roy Pledge <roy.pledge@nxp.com>
 Roy Shterman <roy.shterman@vastdata.com>
+Rui Ferreira <rui.ferreira1@h-partners.com>
 Ruifeng Wang <ruifeng.wang@arm.com>
 Rushil Gupta <rushilg@google.com>
 Ryan E Hall <ryan.e.hall@intel.com>
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 336698379f..f6ac970ed9 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1380,10 +1380,10 @@ rte_eal_cleanup(void)
 #endif
 	rte_mp_channel_cleanup();
 	eal_bus_cleanup();
+	rte_eal_alarm_cleanup();
 	rte_trace_save();
 	eal_trace_fini();
 	eal_mp_dev_hotplug_cleanup();
-	rte_eal_alarm_cleanup();
 	/* after this point, any DPDK pointers will become dangling */
 	rte_eal_memory_detach();
 	rte_eal_malloc_heap_cleanup();
diff --git a/lib/eal/linux/eal_alarm.c b/lib/eal/linux/eal_alarm.c
index 9a68e4ce68..a1103a7f7c 100644
--- a/lib/eal/linux/eal_alarm.c
+++ b/lib/eal/linux/eal_alarm.c
@@ -55,7 +55,14 @@ static void eal_alarm_callback(void *arg);
 void
 rte_eal_alarm_cleanup(void)
 {
-	rte_intr_instance_free(intr_handle);
+	/* unregister callback using intr_handle in interrupt thread */
+	int ret = rte_intr_callback_unregister_sync(intr_handle,
+						eal_alarm_callback, (void *)-1);
+	if (ret >= 0) {
+		rte_intr_instance_free(intr_handle);
+		intr_handle = NULL;
+		handler_registered = 0;
+	}
 }
 
 int
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.155286300 +0100
+++ 0063-eal-linux-unregister-alarm-callback-before-free.patch	2025-06-12 22:06:23.890045060 +0100
@@ -1 +1 @@
-From d84bf0d9aeb474d89a412b6af8e947b16bfcb895 Mon Sep 17 00:00:00 2001
+From cbb840f586dfe10ea619dd94a97336fd09d621e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d84bf0d9aeb474d89a412b6af8e947b16bfcb895 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index fb90483bee..9135f06efc 100644
+index 8cd91eff62..c29ac7d334 100644
@@ -39 +40 @@
-@@ -1339,6 +1339,7 @@ Rosen Xu <rosen.xu@altera.com> <rosen.xu@intel.com>
+@@ -1206,6 +1206,7 @@ Rosen Xu <rosen.xu@intel.com>
@@ -45 +45,0 @@
- Rupesh Chiluka <rchiluka@marvell.com>
@@ -46,0 +47 @@
+ Ryan E Hall <ryan.e.hall@intel.com>
@@ -48 +49 @@
-index 20f777b8b0..de90ab3b86 100644
+index 336698379f..f6ac970ed9 100644
@@ -51 +52 @@
-@@ -1328,10 +1328,10 @@ rte_eal_cleanup(void)
+@@ -1380,10 +1380,10 @@ rte_eal_cleanup(void)
@@ -64 +65 @@
-index b216a007a3..eb6a21d4f0 100644
+index 9a68e4ce68..a1103a7f7c 100644
@@ -67 +68 @@
-@@ -57,7 +57,14 @@ static void eal_alarm_callback(void *arg);
+@@ -55,7 +55,14 @@ static void eal_alarm_callback(void *arg);

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'eal/freebsd: unregister alarm callback before free' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (61 preceding siblings ...)
  2025-06-12 21:07 ` patch 'eal/linux: unregister alarm callback before free' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'bus/pci/bsd: fix device existence check' " luca.boccassi
                   ` (7 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Rui Ferreira; +Cc: Bruce Richardson, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/8254c4d5c935e94ecc8f574d545319653d623d49

Thanks.

Luca Boccassi

---
From 8254c4d5c935e94ecc8f574d545319653d623d49 Mon Sep 17 00:00:00 2001
From: Rui Ferreira <rui.ferreira1@h-partners.com>
Date: Fri, 30 May 2025 09:18:44 +0100
Subject: [PATCH] eal/freebsd: unregister alarm callback before free

[ upstream commit cf1937a96dcf63f6e00e3181654a845edb1fd682 ]

Unregister callback on cleanup to avoid use after free from the
interrupt thread (eal_intr_thread_main).

To be more defensive, set ptr to NULL if we can unregister.

rte_intr_callback_unregister_sync may (optionally) use traces
so the alarm cleanup must happen before eal_trace_fini to avoid
accessing freed memory.

Bugzilla ID: 1683
Fixes: 90b13ab8d4f7 ("alarm: remove direct access to interrupt handle")

Signed-off-by: Rui Ferreira <rui.ferreira1@h-partners.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/eal/freebsd/eal.c       | 2 +-
 lib/eal/freebsd/eal_alarm.c | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index 122daf6c1f..008a6c68e4 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -904,9 +904,9 @@ rte_eal_cleanup(void)
 	rte_service_finalize();
 	rte_mp_channel_cleanup();
 	eal_bus_cleanup();
+	rte_eal_alarm_cleanup();
 	rte_trace_save();
 	eal_trace_fini();
-	rte_eal_alarm_cleanup();
 	/* after this point, any DPDK pointers will become dangling */
 	rte_eal_memory_detach();
 	eal_cleanup_config(internal_conf);
diff --git a/lib/eal/freebsd/eal_alarm.c b/lib/eal/freebsd/eal_alarm.c
index 1a3e6c0aad..d598f6aaf5 100644
--- a/lib/eal/freebsd/eal_alarm.c
+++ b/lib/eal/freebsd/eal_alarm.c
@@ -48,7 +48,13 @@ static void eal_alarm_callback(void *arg);
 void
 rte_eal_alarm_cleanup(void)
 {
-	rte_intr_instance_free(intr_handle);
+	/* unregister callback using intr_handle in interrupt thread */
+	int ret = rte_intr_callback_unregister_sync(intr_handle,
+			eal_alarm_callback, (void *)-1);
+	if (ret >= 0) {
+		rte_intr_instance_free(intr_handle);
+		intr_handle = NULL;
+	}
 }
 
 int
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.189443151 +0100
+++ 0064-eal-freebsd-unregister-alarm-callback-before-free.patch	2025-06-12 22:06:23.894045145 +0100
@@ -1 +1 @@
-From cf1937a96dcf63f6e00e3181654a845edb1fd682 Mon Sep 17 00:00:00 2001
+From 8254c4d5c935e94ecc8f574d545319653d623d49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf1937a96dcf63f6e00e3181654a845edb1fd682 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index d6fffa2170..45adfad668 100644
+index 122daf6c1f..008a6c68e4 100644
@@ -31 +32 @@
-@@ -906,9 +906,9 @@ rte_eal_cleanup(void)
+@@ -904,9 +904,9 @@ rte_eal_cleanup(void)
@@ -43 +44 @@
-index 28f285fdef..c03e281e67 100644
+index 1a3e6c0aad..d598f6aaf5 100644
@@ -46 +47 @@
-@@ -50,7 +50,13 @@ static void eal_alarm_callback(void *arg);
+@@ -48,7 +48,13 @@ static void eal_alarm_callback(void *arg);

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'bus/pci/bsd: fix device existence check' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (62 preceding siblings ...)
  2025-06-12 21:07 ` patch 'eal/freebsd: " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'power/intel_uncore: fix crash closing uninitialized driver' " luca.boccassi
                   ` (6 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Jake Freeland; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/605117a0ccd604b73b4de19fadd24e228329a930

Thanks.

Luca Boccassi

---
From 605117a0ccd604b73b4de19fadd24e228329a930 Mon Sep 17 00:00:00 2001
From: Jake Freeland <jfree@freebsd.org>
Date: Tue, 6 May 2025 12:40:44 -0500
Subject: [PATCH] bus/pci/bsd: fix device existence check

[ upstream commit 6d4e6dbccc3bd965bfd5e5836d7cb21c1b1f9c6c ]

Use open(2) instead of access(2) to check for the existence of the target
device. This avoids a possible race condition where the device file is
removed after a successful call to access(2) but before open(2).

This also fixes any potential bugs associated with passing open(2)-style
flags into access(2). i.e. access(2) does not formally support the O_RDWR
flag.

Fixes: 764bf26873b9 ("add FreeBSD support")

Signed-off-by: Jake Freeland <jfree@freebsd.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/pci/bsd/pci.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c
index 7459d15c7e..b11cfdd450 100644
--- a/drivers/bus/pci/bsd/pci.c
+++ b/drivers/bus/pci/bsd/pci.c
@@ -105,20 +105,27 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
 {
 	char devname[PATH_MAX]; /* contains the /dev/uioX */
 	struct rte_pci_addr *loc;
+	int fd;
 
 	loc = &dev->addr;
 
 	snprintf(devname, sizeof(devname), "/dev/uio@pci:%u:%u:%u",
 			dev->addr.bus, dev->addr.devid, dev->addr.function);
 
-	if (access(devname, O_RDWR) < 0) {
-		RTE_LOG(WARNING, EAL, "  "PCI_PRI_FMT" not managed by UIO driver, "
-				"skipping\n", loc->domain, loc->bus, loc->devid, loc->function);
-		return 1;
+	fd = open(devname, O_RDWR);
+	if (fd < 0) {
+		if (errno == ENOENT) {
+			RTE_LOG(WARNING, EAL, PCI_PRI_FMT" not managed by UIO driver, skipping\n",
+					loc->domain, loc->bus, loc->devid, loc->function);
+			return 1;
+		}
+		RTE_LOG(ERR, EAL, "Failed to open device file for " PCI_PRI_FMT " (%s)\n",
+				loc->domain, loc->bus, loc->devid, loc->function, devname);
+		return -1;
 	}
 
 	/* save fd if in primary process */
-	if (rte_intr_fd_set(dev->intr_handle, open(devname, O_RDWR))) {
+	if (rte_intr_fd_set(dev->intr_handle, fd)) {
 		RTE_LOG(WARNING, EAL, "Failed to save fd");
 		goto error;
 	}
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.221212201 +0100
+++ 0065-bus-pci-bsd-fix-device-existence-check.patch	2025-06-12 22:06:23.894045145 +0100
@@ -1 +1 @@
-From 6d4e6dbccc3bd965bfd5e5836d7cb21c1b1f9c6c Mon Sep 17 00:00:00 2001
+From 605117a0ccd604b73b4de19fadd24e228329a930 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6d4e6dbccc3bd965bfd5e5836d7cb21c1b1f9c6c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 2508e36a85..3f13e1d6ac 100644
+index 7459d15c7e..b11cfdd450 100644
@@ -27 +28 @@
-@@ -106,20 +106,27 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+@@ -105,20 +105,27 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -39,2 +40,2 @@
--		PCI_LOG(WARNING, "  "PCI_PRI_FMT" not managed by UIO driver, skipping",
--			loc->domain, loc->bus, loc->devid, loc->function);
+-		RTE_LOG(WARNING, EAL, "  "PCI_PRI_FMT" not managed by UIO driver, "
+-				"skipping\n", loc->domain, loc->bus, loc->devid, loc->function);
@@ -45 +46 @@
-+			PCI_LOG(WARNING, PCI_PRI_FMT" not managed by UIO driver, skipping",
++			RTE_LOG(WARNING, EAL, PCI_PRI_FMT" not managed by UIO driver, skipping\n",
@@ -49 +50 @@
-+		PCI_LOG(ERR, "Failed to open device file for " PCI_PRI_FMT " (%s)",
++		RTE_LOG(ERR, EAL, "Failed to open device file for " PCI_PRI_FMT " (%s)\n",
@@ -57 +58 @@
- 		PCI_LOG(WARNING, "Failed to save fd");
+ 		RTE_LOG(WARNING, EAL, "Failed to save fd");

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'power/intel_uncore: fix crash closing uninitialized driver' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (63 preceding siblings ...)
  2025-06-12 21:07 ` patch 'bus/pci/bsd: fix device existence check' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'pcapng: fix null dereference in close' " luca.boccassi
                   ` (5 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Kevin Laatz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/c93af8c2daead715e99bc0b846aa2214e05f0112

Thanks.

Luca Boccassi

---
From c93af8c2daead715e99bc0b846aa2214e05f0112 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 15 May 2025 17:58:53 +0100
Subject: [PATCH] power/intel_uncore: fix crash closing uninitialized driver

[ upstream commit 74c4b081825123350578f18dc838ec0bf69ba03b ]

When the power_intel_uncore_autotest unit test is run as an unprivileged
user which cannot init the power library, it crashes the unit test
binary due to calling "rte_power_uncore_exit" after the first test case
(initialization) fails. This crash is due to trying to write to NULL
file handles.

Fix the crash by checking each file handle is non-null before writing to
it and closing it.

Fixes: 60b8a661a957 ("power: add Intel uncore frequency control")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/power/rte_power_intel_uncore.c | 35 +++++++++++++++---------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/lib/power/rte_power_intel_uncore.c b/lib/power/rte_power_intel_uncore.c
index 7193b86516..8780bc38a2 100644
--- a/lib/power/rte_power_intel_uncore.c
+++ b/lib/power/rte_power_intel_uncore.c
@@ -308,27 +308,28 @@ rte_power_uncore_exit(unsigned int pkg, unsigned int die)
 
 	ui = &uncore_info[pkg][die];
 
-	if (fprintf(ui->f_cur_min, "%u", ui->org_min_freq) < 0) {
-		RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
-				"pkg %02u die %02u\n", ui->pkg, ui->die);
-		return -1;
+	if (ui->f_cur_min != NULL) {
+		if (fprintf(ui->f_cur_min, "%u", ui->org_min_freq) < 0) {
+			RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for pkg %02u die %02u",
+					 ui->pkg, ui->die);
+			return -1;
+		}
+		fflush(ui->f_cur_min);
+		fclose(ui->f_cur_min);
+		ui->f_cur_min = NULL;
 	}
 
-	if (fprintf(ui->f_cur_max, "%u", ui->org_max_freq) < 0) {
-		RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
-				"pkg %02u die %02u\n", ui->pkg, ui->die);
-		return -1;
+	if (ui->f_cur_max != NULL) {
+		if (fprintf(ui->f_cur_max, "%u", ui->org_max_freq) < 0) {
+			RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for pkg %02u die %02u",
+					 ui->pkg, ui->die);
+			return -1;
+		}
+		fflush(ui->f_cur_max);
+		fclose(ui->f_cur_max);
+		ui->f_cur_max = NULL;
 	}
 
-	fflush(ui->f_cur_min);
-	fflush(ui->f_cur_max);
-
-	/* Close FD of setting freq */
-	fclose(ui->f_cur_min);
-	fclose(ui->f_cur_max);
-	ui->f_cur_min = NULL;
-	ui->f_cur_max = NULL;
-
 	return 0;
 }
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.254333367 +0100
+++ 0066-power-intel_uncore-fix-crash-closing-uninitialized-d.patch	2025-06-12 22:06:23.894045145 +0100
@@ -1 +1 @@
-From 74c4b081825123350578f18dc838ec0bf69ba03b Mon Sep 17 00:00:00 2001
+From c93af8c2daead715e99bc0b846aa2214e05f0112 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 74c4b081825123350578f18dc838ec0bf69ba03b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- drivers/power/intel_uncore/intel_uncore.c | 35 ++++++++++++-----------
+ lib/power/rte_power_intel_uncore.c | 35 +++++++++++++++---------------
@@ -24,5 +25,5 @@
-diff --git a/drivers/power/intel_uncore/intel_uncore.c b/drivers/power/intel_uncore/intel_uncore.c
-index 804ad5d755..6759ea1445 100644
---- a/drivers/power/intel_uncore/intel_uncore.c
-+++ b/drivers/power/intel_uncore/intel_uncore.c
-@@ -307,27 +307,28 @@ power_intel_uncore_exit(unsigned int pkg, unsigned int die)
+diff --git a/lib/power/rte_power_intel_uncore.c b/lib/power/rte_power_intel_uncore.c
+index 7193b86516..8780bc38a2 100644
+--- a/lib/power/rte_power_intel_uncore.c
++++ b/lib/power/rte_power_intel_uncore.c
+@@ -308,27 +308,28 @@ rte_power_uncore_exit(unsigned int pkg, unsigned int die)
@@ -33,2 +34,2 @@
--		POWER_LOG(ERR, "Fail to write original uncore frequency for "
--				"pkg %02u die %02u", ui->pkg, ui->die);
+-		RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
+-				"pkg %02u die %02u\n", ui->pkg, ui->die);
@@ -38 +39 @@
-+			POWER_LOG(ERR, "Fail to write original uncore frequency for pkg %02u die %02u",
++			RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for pkg %02u die %02u",
@@ -48,2 +49,2 @@
--		POWER_LOG(ERR, "Fail to write original uncore frequency for "
--				"pkg %02u die %02u", ui->pkg, ui->die);
+-		RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
+-				"pkg %02u die %02u\n", ui->pkg, ui->die);
@@ -53 +54 @@
-+			POWER_LOG(ERR, "Fail to write original uncore frequency for pkg %02u die %02u",
++			RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for pkg %02u die %02u",

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'pcapng: fix null dereference in close' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (64 preceding siblings ...)
  2025-06-12 21:07 ` patch 'power/intel_uncore: fix crash closing uninitialized driver' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/mlx5: avoid setting kernel MTU if not needed' " luca.boccassi
                   ` (4 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Ariel Otilibili; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/cc22066925ac875b42db4ccf0f740337db0134e8

Thanks.

Luca Boccassi

---
From cc22066925ac875b42db4ccf0f740337db0134e8 Mon Sep 17 00:00:00 2001
From: Ariel Otilibili <ariel.otilibili@6wind.com>
Date: Mon, 24 Feb 2025 17:40:31 +0100
Subject: [PATCH] pcapng: fix null dereference in close

[ upstream commit b24a6349ae1d56b947186c9545349fca1ca87614 ]

rte_pcapng_close() might dereference a null pointer; as example,
PVS-Studio gives its usage in test_pcapng.c: indeed, that call to
rte_pcapng_close() might receive a null pointer.

Link: https://pvs-studio.com/en/docs/warnings/v522/
Link: https://github.com/DPDK/dpdk/blob/e5176f23ae8b31437c3e5eb875c81f95bf3a9942/app/test/test_pcapng.c#L438

Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")

Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ariel Otilibili <ariel.otilibili@6wind.com>
---
 lib/pcapng/rte_pcapng.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 3f5e08379a..d82f992ffd 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -664,6 +664,8 @@ fail:
 void
 rte_pcapng_close(rte_pcapng_t *self)
 {
-	close(self->outfd);
-	free(self);
+	if (self) {
+		close(self->outfd);
+		free(self);
+	}
 }
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.286521742 +0100
+++ 0067-pcapng-fix-null-dereference-in-close.patch	2025-06-12 22:06:23.894045145 +0100
@@ -1 +1 @@
-From b24a6349ae1d56b947186c9545349fca1ca87614 Mon Sep 17 00:00:00 2001
+From cc22066925ac875b42db4ccf0f740337db0134e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b24a6349ae1d56b947186c9545349fca1ca87614 ]
+
@@ -22 +24 @@
-index cacbefdc50..2a07b4c1f5 100644
+index 3f5e08379a..d82f992ffd 100644
@@ -25 +27 @@
-@@ -724,6 +724,8 @@ RTE_EXPORT_SYMBOL(rte_pcapng_close)
+@@ -664,6 +664,8 @@ fail:

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: avoid setting kernel MTU if not needed' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (65 preceding siblings ...)
  2025-06-12 21:07 ` patch 'pcapng: fix null dereference in close' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/mlx5: fix hypervisor detection in VLAN workaround' " luca.boccassi
                   ` (3 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/0ccb9e319ea392ae075e5ab646264c28eeeed16c

Thanks.

Luca Boccassi

---
From 0ccb9e319ea392ae075e5ab646264c28eeeed16c Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 28 May 2025 11:36:44 +0200
Subject: [PATCH] net/mlx5: avoid setting kernel MTU if not needed

[ upstream commit f1f9113a08b202d302ba9448d351c04da48ff46d ]

This patch checks whether the Kernel MTU has the same value
as the requested one at port configuration time, and skip
setting it if it is the same.

Doing this, we can avoid the application to require
NET_ADMIN capability, as in v23.11.

Fixes: 10859ecf09c4 ("net/mlx5: fix MTU configuration")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 169612ca44..f998e2ace9 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -634,6 +634,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	ret = mlx5_get_mtu(dev, &kern_mtu);
 	if (ret)
 		return ret;
+
+	if (kern_mtu == mtu) {
+		priv->mtu = mtu;
+		DRV_LOG(DEBUG, "port %u adapter MTU was already set to %u",
+			dev->data->port_id, mtu);
+		return 0;
+	}
+
 	/* Set kernel interface MTU first. */
 	ret = mlx5_set_mtu(dev, mtu);
 	if (ret)
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.319542047 +0100
+++ 0068-net-mlx5-avoid-setting-kernel-MTU-if-not-needed.patch	2025-06-12 22:06:23.894045145 +0100
@@ -1 +1 @@
-From f1f9113a08b202d302ba9448d351c04da48ff46d Mon Sep 17 00:00:00 2001
+From 0ccb9e319ea392ae075e5ab646264c28eeeed16c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f1f9113a08b202d302ba9448d351c04da48ff46d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a50320075c..b7df39ace9 100644
+index 169612ca44..f998e2ace9 100644
@@ -26 +27 @@
-@@ -678,6 +678,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -634,6 +634,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/mlx5: fix hypervisor detection in VLAN workaround' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (66 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/mlx5: avoid setting kernel MTU if not needed' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/hns3: check requirement for hardware GRO' " luca.boccassi
                   ` (2 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/001b42efadfcb1967be621fb26ca622c264f3351

Thanks.

Luca Boccassi

---
From 001b42efadfcb1967be621fb26ca622c264f3351 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 6 Dec 2024 16:26:05 +0200
Subject: [PATCH] net/mlx5: fix hypervisor detection in VLAN workaround

[ upstream commit 8518a4e55980b23dfc7d855aefbef0df02e450e0 ]

The mlx5 PMD provides a specific workaround for the VMware ESXi
hypervisor, enabling on-demand routing configuration to virtual
machines. This workaround activates when the device type is
a Virtual Function and either an ESXi hypervisor is detected
or the hypervisor type is unknown.

For non-x86 architectures the function rte_hypervisor_get()
consistently returns an unknown type, which triggers the workaround
automatically without any actual needs. If there are VLAN support
requirements, this can lead to failures in inserting default control
flows.

Do not trigger the workaround for unknown hypervisor type
in non-x86 environments.

Fixes: dfedf3e3f9d2 ("net/mlx5: add workaround for VLAN in virtual machine")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_vlan_os.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c
index 81611a8d3f..353484de3f 100644
--- a/drivers/net/mlx5/linux/mlx5_vlan_os.c
+++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c
@@ -112,16 +112,16 @@ mlx5_vlan_vmwa_init(struct rte_eth_dev *dev, uint32_t ifindex)
 	/* Check whether there is desired virtual environment */
 	hv_type = rte_hypervisor_get();
 	switch (hv_type) {
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_X86_64)
+	/* Always misdetected on ARM archs, let's ignore this */
 	case RTE_HYPERVISOR_UNKNOWN:
+#endif
 	case RTE_HYPERVISOR_VMWARE:
-		/*
-		 * The "white list" of configurations
-		 * to engage the workaround.
-		 */
+		/* The list of configurations to engage the workaround. */
 		break;
 	default:
 		/*
-		 * The configuration is not found in the "white list".
+		 * The configuration is not found in the list.
 		 * We should not engage the VLAN workaround.
 		 */
 		return NULL;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.351564859 +0100
+++ 0069-net-mlx5-fix-hypervisor-detection-in-VLAN-workaround.patch	2025-06-12 22:06:23.894045145 +0100
@@ -1 +1 @@
-From 8518a4e55980b23dfc7d855aefbef0df02e450e0 Mon Sep 17 00:00:00 2001
+From 001b42efadfcb1967be621fb26ca622c264f3351 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8518a4e55980b23dfc7d855aefbef0df02e450e0 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: check requirement for hardware GRO' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (67 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/mlx5: fix hypervisor detection in VLAN workaround' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/hns3: allow Tx vector when fast free not enabled' " luca.boccassi
  2025-06-12 21:07 ` patch 'net/hns3: allow Rx vector mode with VLAN filter' " luca.boccassi
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/1f2d5af25220d38a45926840e7d8e49dd9f234cc

Thanks.

Luca Boccassi

---
From 1f2d5af25220d38a45926840e7d8e49dd9f234cc Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 9 Jun 2025 21:06:49 +0800
Subject: [PATCH] net/hns3: check requirement for hardware GRO

[ upstream commit ae68b5d91c632a1dde839123f27b0317cf094170 ]

The HIP08 platform requires that data address be 64-byte aligned
for the GRO feature.

Most applications already use 64-byte aligned. So a check is added
to avoid using the GRO function when 64-byte aligned is used.

Fixes: d14c995b775a ("net/hns3: check Rx DMA address alignmnent")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index b9ae838642..83837e5c9a 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -276,12 +276,25 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
 static int
 hns3_check_rx_dma_addr(struct hns3_hw *hw, uint64_t dma_addr)
 {
+	uint64_t rx_offload = hw->data->dev_conf.rxmode.offloads;
 	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);
+		hns3_err(hw,
+			 "mbuf DMA address must be %u-byte aligned",
+			 hw->rx_dma_addr_align);
+		return -EINVAL;
+	}
+
+	/*
+	 * This check is for HIP08 network engine. The GRO function
+	 * requires that mbuf DMA address is 64-byte aligned.
+	 */
+	rem = dma_addr & (HNS3_RX_DMA_ADDR_ALIGN_128 - 1);
+	if ((rx_offload & RTE_ETH_RX_OFFLOAD_TCP_LRO) && rem > 0) {
+		hns3_err(hw,
+			 "GRO requires that mbuf DMA address be 64-byte aligned");
 		return -EINVAL;
 	}
 	return 0;
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.385080793 +0100
+++ 0070-net-hns3-check-requirement-for-hardware-GRO.patch	2025-06-12 22:06:23.898045229 +0100
@@ -1 +1 @@
-From ae68b5d91c632a1dde839123f27b0317cf094170 Mon Sep 17 00:00:00 2001
+From 1f2d5af25220d38a45926840e7d8e49dd9f234cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ae68b5d91c632a1dde839123f27b0317cf094170 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index bde46733b0..f9fde3948a 100644
+index b9ae838642..83837e5c9a 100644
@@ -24 +25 @@
-@@ -281,12 +281,25 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
+@@ -276,12 +276,25 @@ hns3_free_all_queues(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: allow Tx vector when fast free not enabled' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (68 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/hns3: check requirement for hardware GRO' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  2025-06-12 21:07 ` patch 'net/hns3: allow Rx vector mode with VLAN filter' " luca.boccassi
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/cf8d97141b2f57ac6419a0c5cd97e27b1d4e4333

Thanks.

Luca Boccassi

---
From cf8d97141b2f57ac6419a0c5cd97e27b1d4e4333 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 9 Jun 2025 21:06:50 +0800
Subject: [PATCH] net/hns3: allow Tx vector when fast free not enabled

[ upstream commit e05cb702ca70aecdf01041274cd6ffc9233a726d ]

Currently, the Tx vector algorithm is only enabled
when tx_offload is RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE.
If no offloads are enabled, then vector algorithm can also be used.
The vector algorithm does not support other transmit offloads.

Fixes: e31f123db06b ("net/hns3: support NEON Tx")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_rxtx_vec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index b6aee9af67..a4435bf477 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -16,11 +16,11 @@
 int
 hns3_tx_check_vec_support(struct rte_eth_dev *dev)
 {
-	struct rte_eth_txmode *txmode = &dev->data->dev_conf.txmode;
+	uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads;
 	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 
-	/* Only support RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE */
-	if (txmode->offloads != RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
+	/* Only support when Tx offloads is RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE or 0. */
+	if (tx_offloads != RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE && tx_offloads != 0)
 		return -ENOTSUP;
 
 	/*
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.419860985 +0100
+++ 0071-net-hns3-allow-Tx-vector-when-fast-free-not-enabled.patch	2025-06-12 22:06:23.898045229 +0100
@@ -1 +1 @@
-From e05cb702ca70aecdf01041274cd6ffc9233a726d Mon Sep 17 00:00:00 2001
+From cf8d97141b2f57ac6419a0c5cd97e27b1d4e4333 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e05cb702ca70aecdf01041274cd6ffc9233a726d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bf37ce51b1..9fb66ea2de 100644
+index b6aee9af67..a4435bf477 100644

^ permalink raw reply	[flat|nested] 72+ messages in thread

* patch 'net/hns3: allow Rx vector mode with VLAN filter' has been queued to stable release 22.11.9
  2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
                   ` (69 preceding siblings ...)
  2025-06-12 21:07 ` patch 'net/hns3: allow Tx vector when fast free not enabled' " luca.boccassi
@ 2025-06-12 21:07 ` luca.boccassi
  70 siblings, 0 replies; 72+ messages in thread
From: luca.boccassi @ 2025-06-12 21:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/b2fd25b85588ba71a6a21e5e62e5125e66a5bb80

Thanks.

Luca Boccassi

---
From b2fd25b85588ba71a6a21e5e62e5125e66a5bb80 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 9 Jun 2025 21:06:51 +0800
Subject: [PATCH] net/hns3: allow Rx vector mode with VLAN filter

[ upstream commit 4d345eb5ef9827aec1547d7dfc9afcf363359b46 ]

When the RTE_ETH_RX_OFFLOAD_VLAN_FILTER offload flag was set,
the driver would not select the Rx vector algorithm.
But VLAN filtering does not impact data layout so it
is possible to use Rx vector algorithm in this case.

Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_rxtx_vec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index a4435bf477..2265804fda 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -240,7 +240,9 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
 {
 	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 	uint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |
-				 RTE_ETH_RX_OFFLOAD_VLAN |
+				 RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
+				 RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
+				 RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
 				 RTE_ETH_RX_OFFLOAD_TIMESTAMP;
 
 	if (dev->data->scattered_rx)
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.452386401 +0100
+++ 0072-net-hns3-allow-Rx-vector-mode-with-VLAN-filter.patch	2025-06-12 22:06:23.898045229 +0100
@@ -1 +1 @@
-From 4d345eb5ef9827aec1547d7dfc9afcf363359b46 Mon Sep 17 00:00:00 2001
+From b2fd25b85588ba71a6a21e5e62e5125e66a5bb80 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d345eb5ef9827aec1547d7dfc9afcf363359b46 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9fb66ea2de..daadd7e19f 100644
+index a4435bf477..2265804fda 100644
@@ -23 +24 @@
-@@ -184,7 +184,9 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
+@@ -240,7 +240,9 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
@@ -31,2 +32 @@
- 				 RTE_ETH_RX_OFFLOAD_TIMESTAMP |
- 				 RTE_ETH_RX_OFFLOAD_KEEP_CRC;
+ 				 RTE_ETH_RX_OFFLOAD_TIMESTAMP;
@@ -33,0 +34 @@
+ 	if (dev->data->scattered_rx)

^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2025-06-12 21:11 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-12 21:06 patch 'net/i40e/base: remove unused variables' has been queued to stable release 22.11.9 luca.boccassi
2025-06-12 21:06 ` patch 'ci: bump tested distributions in GHA' " luca.boccassi
2025-06-12 21:06 ` patch 'net/fm10k/base: fix compilation warnings' " luca.boccassi
2025-06-12 21:06 ` patch 'net/ixgbe/base: correct definition of endianness macro' " luca.boccassi
2025-06-12 21:06 ` patch 'net/ixgbe/base: fix compilation warnings' " luca.boccassi
2025-06-12 21:06 ` patch 'net/i40e/base: fix unused value " luca.boccassi
2025-06-12 21:06 ` patch 'net/i40e/base: fix compiler " luca.boccassi
2025-06-12 21:06 ` patch 'acl: fix build with GCC 15 on aarch64' " luca.boccassi
2025-06-12 21:06 ` patch 'eal/linux: improve ASLR check' " luca.boccassi
2025-06-12 21:06 ` patch 'net/e1000: fix xstats name' " luca.boccassi
2025-06-12 21:06 ` patch 'net/e1000: fix EEPROM dump' " luca.boccassi
2025-06-12 21:06 ` patch 'net/ixgbe: fix port mask default value in filter' " luca.boccassi
2025-06-12 21:06 ` patch 'net/e1000: fix igb Tx queue offloads capability' " luca.boccassi
2025-06-12 21:06 ` patch 'vhost/crypto: fix cipher data length' " luca.boccassi
2025-06-12 21:06 ` patch 'crypto/virtio: fix cipher data source " luca.boccassi
2025-06-12 21:06 ` patch 'app/crypto-perf: fix AAD offset alignment' " luca.boccassi
2025-06-12 21:06 ` patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' " luca.boccassi
2025-06-12 21:06 ` patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' " luca.boccassi
2025-06-12 21:06 ` patch 'net/mlx5: fix header modify action on group 0' " luca.boccassi
2025-06-12 21:06 ` patch 'net/mlx5: validate GTP PSC QFI width' " luca.boccassi
2025-06-12 21:06 ` patch 'net/mlx5: fix counter service cleanup on init failure' " luca.boccassi
2025-06-12 21:06 ` patch 'net/mlx5: remove unsupported flow meter action in HWS' " luca.boccassi
2025-06-12 21:06 ` patch 'net/mlx5: fix maximal queue size query' " luca.boccassi
2025-06-12 21:06 ` patch 'net/mlx5: align PF and VF/SF MAC address handling' " luca.boccassi
2025-06-12 21:06 ` patch 'app/testpmd: fix RSS hash key update' " luca.boccassi
2025-06-12 21:06 ` patch 'net/af_xdp: fix use after free in zero-copy Tx' " luca.boccassi
2025-06-12 21:06 ` patch 'net/hns3: fix integer overflow in interrupt unmap' " luca.boccassi
2025-06-12 21:06 ` patch 'net/hns3: fix memory leak on failure' " luca.boccassi
2025-06-12 21:06 ` patch 'net/hns3: fix extra wait for link up' " luca.boccassi
2025-06-12 21:06 ` patch 'net/hns3: fix memory leak for indirect flow action' " luca.boccassi
2025-06-12 21:06 ` patch 'net/hns3: fix interrupt rollback' " luca.boccassi
2025-06-12 21:06 ` patch 'net/hns3: fix divide by zero' " luca.boccassi
2025-06-12 21:06 ` patch 'net/hns3: fix resources release on reset' " luca.boccassi
2025-06-12 21:06 ` patch 'net/qede: fix use after free' " luca.boccassi
2025-06-12 21:06 ` patch 'bus/fslmc: " luca.boccassi
2025-06-12 21:06 ` patch 'net/null: fix packet copy' " luca.boccassi
2025-06-12 21:06 ` patch 'bus/vmbus: align ring buffer data to page boundary' " luca.boccassi
2025-06-12 21:06 ` patch 'bus/vmbus: use Hyper-V page size' " luca.boccassi
2025-06-12 21:06 ` patch 'net/netvsc: " luca.boccassi
2025-06-12 21:06 ` patch 'net/netvsc: add stats counters from VF' " luca.boccassi
2025-06-12 21:06 ` patch 'app/testpmd: relax number of TCs in DCB command' " luca.boccassi
2025-06-12 21:06 ` patch 'net/mana: check vendor ID when probing RDMA device' " luca.boccassi
2025-06-12 21:07 ` patch 'net/hns3: fix CRC data segment' " luca.boccassi
2025-06-12 21:07 ` patch 'net/tap: fix qdisc add failure handling' " luca.boccassi
2025-06-12 21:07 ` patch 'net/mlx5: fix VLAN stripping on hairpin queue' " luca.boccassi
2025-06-12 21:07 ` patch 'mem: fix lockup on address space shortage' " luca.boccassi
2025-06-12 21:07 ` patch 'test/malloc: improve resiliency' " luca.boccassi
2025-06-12 21:07 ` patch 'trace: fix overflow in per-lcore trace buffer' " luca.boccassi
2025-06-12 21:07 ` patch 'common/cnxk: fix E-tag pattern parsing' " luca.boccassi
2025-06-12 21:07 ` patch 'common/cnxk: fix CQ tail drop' " luca.boccassi
2025-06-12 21:07 ` patch 'net/cnxk: fix descriptor count update on reconfig' " luca.boccassi
2025-06-12 21:07 ` patch 'ethdev: fix error struct in flow configure' " luca.boccassi
2025-06-12 21:07 ` patch 'net/ice/base: fix integer overflow' " luca.boccassi
2025-06-12 21:07 ` patch 'net/ice/base: fix typo in device ID description' " luca.boccassi
2025-06-12 21:07 ` patch 'common/dpaax: fix PDCP key command race condition' " luca.boccassi
2025-06-12 21:07 ` patch 'common/dpaax: fix PDCP AES only 12-bit SN' " luca.boccassi
2025-06-12 21:07 ` patch 'crypto/virtio: add request check on request side' " luca.boccassi
2025-06-12 21:07 ` patch 'crypto/virtio: fix driver cleanup' " luca.boccassi
2025-06-12 21:07 ` patch 'ethdev: keep promiscuous/allmulti value before disabling' " luca.boccassi
2025-06-12 21:07 ` patch 'eal: fix return value of lcore role' " luca.boccassi
2025-06-12 21:07 ` patch 'eal: warn if no lcore is available' " luca.boccassi
2025-06-12 21:07 ` patch 'bus: cleanup device lists' " luca.boccassi
2025-06-12 21:07 ` patch 'eal/linux: unregister alarm callback before free' " luca.boccassi
2025-06-12 21:07 ` patch 'eal/freebsd: " luca.boccassi
2025-06-12 21:07 ` patch 'bus/pci/bsd: fix device existence check' " luca.boccassi
2025-06-12 21:07 ` patch 'power/intel_uncore: fix crash closing uninitialized driver' " luca.boccassi
2025-06-12 21:07 ` patch 'pcapng: fix null dereference in close' " luca.boccassi
2025-06-12 21:07 ` patch 'net/mlx5: avoid setting kernel MTU if not needed' " luca.boccassi
2025-06-12 21:07 ` patch 'net/mlx5: fix hypervisor detection in VLAN workaround' " luca.boccassi
2025-06-12 21:07 ` patch 'net/hns3: check requirement for hardware GRO' " luca.boccassi
2025-06-12 21:07 ` patch 'net/hns3: allow Tx vector when fast free not enabled' " luca.boccassi
2025-06-12 21:07 ` patch 'net/hns3: allow Rx vector mode with VLAN filter' " luca.boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).