patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8
@ 2024-08-23 16:17 Kevin Traynor
  2024-08-23 16:17 ` patch 'eal/unix: support ZSTD compression for firmware' " Kevin Traynor
                   ` (134 more replies)
  0 siblings, 135 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: David Marchand
  Cc: Bruce Richardson, Patrick Robb, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a7fb1c9784e31cded44345f3347dcadb47777f5c

Thanks.

Kevin

---
From a7fb1c9784e31cded44345f3347dcadb47777f5c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 29 Apr 2024 12:00:59 +0200
Subject: [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19

[ upstream commit 884f83ccf74b5364430d3b21c653d5f6e359e091 ]

Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
anymore. Switch to POSIX pread/pwrite.

Bugzilla ID: 1422

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Patrick Robb <probb@iol.unh.edu>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/pci/linux/pci_vfio.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 822aa41f9e..847b95fe8c 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -54,5 +54,5 @@ pci_vfio_read_config(const struct rte_intr_handle *intr_handle,
 		return -1;
 
-	return pread64(vfio_dev_fd, buf, len,
+	return pread(vfio_dev_fd, buf, len,
 	       VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
 }
@@ -67,5 +67,5 @@ pci_vfio_write_config(const struct rte_intr_handle *intr_handle,
 		return -1;
 
-	return pwrite64(vfio_dev_fd, buf, len,
+	return pwrite(vfio_dev_fd, buf, len,
 	       VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
 }
@@ -81,5 +81,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
 
 	/* read PCI capability pointer from config space */
-	ret = pread64(fd, &reg, sizeof(reg),
+	ret = pread(fd, &reg, sizeof(reg),
 			VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 			PCI_CAPABILITY_LIST);
@@ -96,5 +96,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
 
 		/* read PCI capability ID */
-		ret = pread64(fd, &reg, sizeof(reg),
+		ret = pread(fd, &reg, sizeof(reg),
 				VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 				cap_offset);
@@ -110,5 +110,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
 		/* if we haven't reached MSI-X, check next capability */
 		if (cap_id != PCI_CAP_ID_MSIX) {
-			ret = pread64(fd, &reg, sizeof(reg),
+			ret = pread(fd, &reg, sizeof(reg),
 					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 					cap_offset);
@@ -127,5 +127,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
 		else {
 			/* table offset resides in the next 4 bytes */
-			ret = pread64(fd, &reg, sizeof(reg),
+			ret = pread(fd, &reg, sizeof(reg),
 					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 					cap_offset + 4);
@@ -136,5 +136,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
 			}
 
-			ret = pread64(fd, &flags, sizeof(flags),
+			ret = pread(fd, &flags, sizeof(flags),
 					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 					cap_offset + 2);
@@ -163,5 +163,5 @@ pci_vfio_enable_bus_memory(int dev_fd)
 	int ret;
 
-	ret = pread64(dev_fd, &cmd, sizeof(cmd),
+	ret = pread(dev_fd, &cmd, sizeof(cmd),
 		      VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 		      PCI_COMMAND);
@@ -176,5 +176,5 @@ pci_vfio_enable_bus_memory(int dev_fd)
 
 	cmd |= PCI_COMMAND_MEMORY;
-	ret = pwrite64(dev_fd, &cmd, sizeof(cmd),
+	ret = pwrite(dev_fd, &cmd, sizeof(cmd),
 		       VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 		       PCI_COMMAND);
@@ -195,5 +195,5 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
 	int ret;
 
-	ret = pread64(dev_fd, &reg, sizeof(reg),
+	ret = pread(dev_fd, &reg, sizeof(reg),
 			VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 			PCI_COMMAND);
@@ -209,5 +209,5 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
 		reg &= ~(PCI_COMMAND_MASTER);
 
-	ret = pwrite64(dev_fd, &reg, sizeof(reg),
+	ret = pwrite(dev_fd, &reg, sizeof(reg),
 			VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
 			PCI_COMMAND);
@@ -465,5 +465,5 @@ pci_vfio_is_ioport_bar(int vfio_dev_fd, int bar_index)
 	int ret;
 
-	ret = pread64(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
+	ret = pread(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
 			  VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX)
 			  + PCI_BASE_ADDRESS_0 + bar_index*4);
@@ -1134,5 +1134,5 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
 		return;
 
-	if (pread64(vfio_dev_fd, data,
+	if (pread(vfio_dev_fd, data,
 		    len, p->base + offset) <= 0)
 		RTE_LOG(ERR, EAL,
@@ -1151,5 +1151,5 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
 		return;
 
-	if (pwrite64(vfio_dev_fd, data,
+	if (pwrite(vfio_dev_fd, data,
 		     len, p->base + offset) <= 0)
 		RTE_LOG(ERR, EAL,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:09.943134777 +0100
+++ 0001-bus-pci-fix-build-with-musl-1.2.4-Alpine-3.19.patch	2024-08-23 17:18:09.603429697 +0100
@@ -1 +1 @@
-From 884f83ccf74b5364430d3b21c653d5f6e359e091 Mon Sep 17 00:00:00 2001
+From a7fb1c9784e31cded44345f3347dcadb47777f5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 884f83ccf74b5364430d3b21c653d5f6e359e091 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/bus/pci/linux/pci_vfio.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
+ drivers/bus/pci/linux/pci_vfio.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
@@ -21 +22 @@
-index 87c16e6603..05b03a9667 100644
+index 822aa41f9e..847b95fe8c 100644
@@ -24 +25 @@
-@@ -81,5 +81,5 @@ pci_vfio_read_config(const struct rte_pci_device *dev,
+@@ -54,5 +54,5 @@ pci_vfio_read_config(const struct rte_intr_handle *intr_handle,
@@ -27,2 +28,3 @@
--	return pread64(fd, buf, len, offset + offs);
-+	return pread(fd, buf, len, offset + offs);
+-	return pread64(vfio_dev_fd, buf, len,
++	return pread(vfio_dev_fd, buf, len,
+ 	       VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
@@ -30,2 +32 @@
- 
-@@ -102,5 +102,5 @@ pci_vfio_write_config(const struct rte_pci_device *dev,
+@@ -67,5 +67,5 @@ pci_vfio_write_config(const struct rte_intr_handle *intr_handle,
@@ -34,2 +35,3 @@
--	return pwrite64(fd, buf, len, offset + offs);
-+	return pwrite(fd, buf, len, offset + offs);
+-	return pwrite64(vfio_dev_fd, buf, len,
++	return pwrite(vfio_dev_fd, buf, len,
+ 	       VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
@@ -36,0 +39 @@
+@@ -81,5 +81,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
@@ -38,16 +41,63 @@
-@@ -156,5 +156,5 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
- 	}
- 
--	ret = pread64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
-+	ret = pread(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
- 
- 	if (ret != sizeof(cmd)) {
-@@ -167,5 +167,5 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
- 
- 	cmd |= RTE_PCI_COMMAND_MEMORY;
--	ret = pwrite64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
-+	ret = pwrite(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
- 
- 	if (ret != sizeof(cmd)) {
-@@ -426,5 +426,5 @@ pci_vfio_is_ioport_bar(const struct rte_pci_device *dev, int vfio_dev_fd,
- 	}
+ 	/* read PCI capability pointer from config space */
+-	ret = pread64(fd, &reg, sizeof(reg),
++	ret = pread(fd, &reg, sizeof(reg),
+ 			VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 			PCI_CAPABILITY_LIST);
+@@ -96,5 +96,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ 
+ 		/* read PCI capability ID */
+-		ret = pread64(fd, &reg, sizeof(reg),
++		ret = pread(fd, &reg, sizeof(reg),
+ 				VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 				cap_offset);
+@@ -110,5 +110,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ 		/* if we haven't reached MSI-X, check next capability */
+ 		if (cap_id != PCI_CAP_ID_MSIX) {
+-			ret = pread64(fd, &reg, sizeof(reg),
++			ret = pread(fd, &reg, sizeof(reg),
+ 					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 					cap_offset);
+@@ -127,5 +127,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ 		else {
+ 			/* table offset resides in the next 4 bytes */
+-			ret = pread64(fd, &reg, sizeof(reg),
++			ret = pread(fd, &reg, sizeof(reg),
+ 					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 					cap_offset + 4);
+@@ -136,5 +136,5 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ 			}
+ 
+-			ret = pread64(fd, &flags, sizeof(flags),
++			ret = pread(fd, &flags, sizeof(flags),
+ 					VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 					cap_offset + 2);
+@@ -163,5 +163,5 @@ pci_vfio_enable_bus_memory(int dev_fd)
+ 	int ret;
+ 
+-	ret = pread64(dev_fd, &cmd, sizeof(cmd),
++	ret = pread(dev_fd, &cmd, sizeof(cmd),
+ 		      VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 		      PCI_COMMAND);
+@@ -176,5 +176,5 @@ pci_vfio_enable_bus_memory(int dev_fd)
+ 
+ 	cmd |= PCI_COMMAND_MEMORY;
+-	ret = pwrite64(dev_fd, &cmd, sizeof(cmd),
++	ret = pwrite(dev_fd, &cmd, sizeof(cmd),
+ 		       VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 		       PCI_COMMAND);
+@@ -195,5 +195,5 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
+ 	int ret;
+ 
+-	ret = pread64(dev_fd, &reg, sizeof(reg),
++	ret = pread(dev_fd, &reg, sizeof(reg),
+ 			VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 			PCI_COMMAND);
+@@ -209,5 +209,5 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
+ 		reg &= ~(PCI_COMMAND_MASTER);
+ 
+-	ret = pwrite64(dev_fd, &reg, sizeof(reg),
++	ret = pwrite(dev_fd, &reg, sizeof(reg),
+ 			VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ 			PCI_COMMAND);
+@@ -465,5 +465,5 @@ pci_vfio_is_ioport_bar(int vfio_dev_fd, int bar_index)
+ 	int ret;
@@ -57,3 +107,3 @@
- 			  offset + RTE_PCI_BASE_ADDRESS_0 + bar_index * 4);
- 	if (ret != sizeof(ioport_bar)) {
-@@ -1277,5 +1277,5 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
+ 			  VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX)
+ 			  + PCI_BASE_ADDRESS_0 + bar_index*4);
+@@ -1134,5 +1134,5 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
@@ -66 +116 @@
-@@ -1294,5 +1294,5 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
+@@ -1151,5 +1151,5 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
@@ -73,14 +122,0 @@
-@@ -1325,5 +1325,5 @@ pci_vfio_mmio_read(const struct rte_pci_device *dev, int bar,
- 		return -1;
- 
--	return pread64(fd, buf, len, offset + offs);
-+	return pread(fd, buf, len, offset + offs);
- }
- 
-@@ -1345,5 +1345,5 @@ pci_vfio_mmio_write(const struct rte_pci_device *dev, int bar,
- 		return -1;
- 
--	return pwrite64(fd, buf, len, offset + offs);
-+	return pwrite(fd, buf, len, offset + offs);
- }
- 


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

* patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'pcapng: add memcpy check' " Kevin Traynor
                   ` (133 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/87e7322144bf6f18c31e5f4d6c467f9340796bed

Thanks.

Kevin

---
From 87e7322144bf6f18c31e5f4d6c467f9340796bed Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 7 May 2024 13:01:53 +0200
Subject: [PATCH] eal/unix: support ZSTD compression for firmware

[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]

Ubuntu 24.04 started to compress firmware files with ZSTD compression.

Bugzilla ID: 1437

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eal/unix/eal_firmware.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
index 1a7cf8e7b7..b999420de0 100644
--- a/lib/eal/unix/eal_firmware.c
+++ b/lib/eal/unix/eal_firmware.c
@@ -16,4 +16,6 @@
 #include "eal_firmware.h"
 
+static const char * const compression_suffixes[] = { "xz", "zst" };
+
 #ifdef RTE_HAS_LIBARCHIVE
 
@@ -37,5 +39,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
 	err = archive_read_support_filter_xz(ctx->a);
 	if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
-		goto error;
+		RTE_LOG(DEBUG, EAL,
+                        "could not initialise libarchive for xz compression\n");
+
+	err = archive_read_support_filter_zstd(ctx->a);
+	if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
+		RTE_LOG(DEBUG, EAL,
+                        "could not initialise libarchive for zstd compression\n");
 
 	if (archive_read_open_filename(ctx->a, name, blocksize) != ARCHIVE_OK)
@@ -148,14 +156,19 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
 	ret = firmware_read(name, buf, bufsz);
 	if (ret < 0) {
-		snprintf(path, sizeof(path), "%s.xz", name);
-		path[PATH_MAX - 1] = '\0';
+		unsigned int i;
+
+		for (i = 0; i < RTE_DIM(compression_suffixes); i++) {
+			snprintf(path, sizeof(path), "%s.%s", name, compression_suffixes[i]);
+			path[PATH_MAX - 1] = '\0';
+			if (access(path, F_OK) != 0)
+				continue;
 #ifndef RTE_HAS_LIBARCHIVE
-		if (access(path, F_OK) == 0) {
 			RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",
 				path);
-		}
 #else
-		ret = firmware_read(path, buf, bufsz);
+			ret = firmware_read(path, buf, bufsz);
 #endif
+			break;
+		}
 	}
 	return ret;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.000708928 +0100
+++ 0002-eal-unix-support-ZSTD-compression-for-firmware.patch	2024-08-23 17:18:09.603429697 +0100
@@ -1 +1 @@
-From 6f80df8cb0f889203d7cd27766abcc6ebc720e33 Mon Sep 17 00:00:00 2001
+From 87e7322144bf6f18c31e5f4d6c467f9340796bed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -14,2 +15,2 @@
- lib/eal/unix/eal_firmware.c | 23 +++++++++++++++++------
- 1 file changed, 17 insertions(+), 6 deletions(-)
+ lib/eal/unix/eal_firmware.c | 25 +++++++++++++++++++------
+ 1 file changed, 19 insertions(+), 6 deletions(-)
@@ -18 +19 @@
-index 1d47e879c8..0d69b1e3f0 100644
+index 1a7cf8e7b7..b999420de0 100644
@@ -21,2 +22,2 @@
-@@ -17,4 +17,6 @@
- #include "eal_private.h"
+@@ -16,4 +16,6 @@
+ #include "eal_firmware.h"
@@ -28 +29 @@
-@@ -38,5 +40,9 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
+@@ -37,5 +39,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
@@ -32 +33,2 @@
-+		EAL_LOG(DEBUG, "could not initialise libarchive for xz compression");
++		RTE_LOG(DEBUG, EAL,
++                        "could not initialise libarchive for xz compression\n");
@@ -36 +38,2 @@
-+		EAL_LOG(DEBUG, "could not initialise libarchive for zstd compression");
++		RTE_LOG(DEBUG, EAL,
++                        "could not initialise libarchive for zstd compression\n");
@@ -39 +42 @@
-@@ -149,14 +155,19 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
+@@ -148,14 +156,19 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
@@ -53 +56 @@
- 			EAL_LOG(WARNING, "libarchive not linked, %s cannot be decompressed",
+ 			RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",


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

* patch 'pcapng: add memcpy check' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
  2024-08-23 16:17 ` patch 'eal/unix: support ZSTD compression for firmware' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/virtio-user: " Kevin Traynor
                   ` (132 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d00c0049169b3b63f19e046bb25f61dd7525c428

Thanks.

Kevin

---
From d00c0049169b3b63f19e046bb25f61dd7525c428 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 20 May 2024 18:01:03 -0700
Subject: [PATCH] pcapng: add memcpy check

[ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ]

When adding option with no data, the rte_pcapng_add_option would
call memcpy with src of NULL and size of zero. This generates a
warning if fortify is enabled.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/pcapng/rte_pcapng.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index e914b7b031..600a724bbb 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -110,5 +110,6 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,
 	popt->code = code;
 	popt->length = len;
-	memcpy(popt->data, data, len);
+	if (len > 0)
+		memcpy(popt->data, data, len);
 
 	return (struct pcapng_option *)((uint8_t *)popt + pcapng_optlen(len));
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.053048023 +0100
+++ 0003-pcapng-add-memcpy-check.patch	2024-08-23 17:18:09.605429704 +0100
@@ -1 +1 @@
-From 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd Mon Sep 17 00:00:00 2001
+From d00c0049169b3b63f19e046bb25f61dd7525c428 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f74ec939a9..7254defce7 100644
+index e914b7b031..600a724bbb 100644
@@ -23 +24 @@
-@@ -129,5 +129,6 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,
+@@ -110,5 +110,6 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,


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

* patch 'net/virtio-user: add memcpy check' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
  2024-08-23 16:17 ` patch 'eal/unix: support ZSTD compression for firmware' " Kevin Traynor
  2024-08-23 16:17 ` patch 'pcapng: add memcpy check' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'eal/windows: install sched.h file' " Kevin Traynor
                   ` (131 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bd0e6505202a549377e0049d840409d2e4159d44

Thanks.

Kevin

---
From bd0e6505202a549377e0049d840409d2e4159d44 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 20 May 2024 18:01:04 -0700
Subject: [PATCH] net/virtio-user: add memcpy check

[ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ]

If fortify is enabled, it will generate a warning if memcpy
src is NULL even if size is zero. This happens if the MP message
sync is called with no file descriptors.

Bugzilla ID: 1446
Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/virtio/virtio_user/vhost_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 77820bf967..df383bd8e6 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -130,5 +130,6 @@ vhost_user_write(int fd, struct vhost_user_msg *msg, int *fds, int fd_num)
 	cmsg->cmsg_level = SOL_SOCKET;
 	cmsg->cmsg_type = SCM_RIGHTS;
-	memcpy(CMSG_DATA(cmsg), fds, fd_size);
+	if (fd_size > 0)
+		memcpy(CMSG_DATA(cmsg), fds, fd_size);
 
 	do {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.099093720 +0100
+++ 0004-net-virtio-user-add-memcpy-check.patch	2024-08-23 17:18:09.606429707 +0100
@@ -1 +1 @@
-From 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 Mon Sep 17 00:00:00 2001
+From bd0e6505202a549377e0049d840409d2e4159d44 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3c05ac9cc0..c10252506b 100644
+index 77820bf967..df383bd8e6 100644
@@ -23 +24 @@
-@@ -129,5 +129,6 @@ vhost_user_write(int fd, struct vhost_user_msg *msg, int *fds, int fd_num)
+@@ -130,5 +130,6 @@ vhost_user_write(int fd, struct vhost_user_msg *msg, int *fds, int fd_num)


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

* patch 'eal/windows: install sched.h file' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (2 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/virtio-user: " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'latencystats: fix literal float suffix' " Kevin Traynor
                   ` (130 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/caed4d5e2dc697589b0e8558fd93f3c802aa3948

Thanks.

Kevin

---
From caed4d5e2dc697589b0e8558fd93f3c802aa3948 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Tue, 12 Mar 2024 10:54:37 -0700
Subject: [PATCH] eal/windows: install sched.h file

[ upstream commit ad645a9317bc93c7e4921afa7bf33e1415b531cd ]

rte_os.h includes sched.h so install sched.h to allow DPDK installed to
DESTDIR to be usable.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eal/windows/include/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/eal/windows/include/meson.build b/lib/eal/windows/include/meson.build
index 5fb1962ac7..e985a77d58 100644
--- a/lib/eal/windows/include/meson.build
+++ b/lib/eal/windows/include/meson.build
@@ -7,3 +7,4 @@ headers += files(
         'rte_os.h',
         'rte_windows.h',
+        'sched.h',
 )
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.142600326 +0100
+++ 0005-eal-windows-install-sched.h-file.patch	2024-08-23 17:18:09.607429711 +0100
@@ -1 +1 @@
-From ad645a9317bc93c7e4921afa7bf33e1415b531cd Mon Sep 17 00:00:00 2001
+From caed4d5e2dc697589b0e8558fd93f3c802aa3948 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ad645a9317bc93c7e4921afa7bf33e1415b531cd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'latencystats: fix literal float suffix' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (3 preceding siblings ...)
  2024-08-23 16:17 ` patch 'eal/windows: install sched.h file' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/hns3: fix offload flag of IEEE 1588' " Kevin Traynor
                   ` (129 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/024e9662e7ab5a0b005db54f7bcdb418790fc42e

Thanks.

Kevin

---
From 024e9662e7ab5a0b005db54f7bcdb418790fc42e Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Mon, 15 Apr 2024 14:32:26 -0700
Subject: [PATCH] latencystats: fix literal float suffix

[ upstream commit 792cb874db647e31183ab6680922cd293dd5bfa6 ]

Add missing f suffix to floating point literal to avoid warning about
truncation from double to float.

Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/latencystats/rte_latencystats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c
index ab8db7a139..586e4700ea 100644
--- a/lib/latencystats/rte_latencystats.c
+++ b/lib/latencystats/rte_latencystats.c
@@ -169,5 +169,5 @@ calc_latency(uint16_t pid __rte_unused,
 	 * is used below for measuring average latency.
 	 */
-	const float alpha = 0.2;
+	const float alpha = 0.2f;
 
 	now = rte_rdtsc();
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.185797164 +0100
+++ 0006-latencystats-fix-literal-float-suffix.patch	2024-08-23 17:18:09.608429714 +0100
@@ -1 +1 @@
-From 792cb874db647e31183ab6680922cd293dd5bfa6 Mon Sep 17 00:00:00 2001
+From 024e9662e7ab5a0b005db54f7bcdb418790fc42e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 792cb874db647e31183ab6680922cd293dd5bfa6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 4ea9b0d75b..cae4b50878 100644
+index ab8db7a139..586e4700ea 100644
@@ -21 +22 @@
-@@ -167,5 +167,5 @@ calc_latency(uint16_t pid __rte_unused,
+@@ -169,5 +169,5 @@ calc_latency(uint16_t pid __rte_unused,


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

* patch 'net/hns3: fix offload flag of IEEE 1588' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (4 preceding siblings ...)
  2024-08-23 16:17 ` patch 'latencystats: fix literal float suffix' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/hns3: fix Rx timestamp flag' " Kevin Traynor
                   ` (128 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4b362a6ca1b84d92b2500e52e85f82946b7a1b0e

Thanks.

Kevin

---
From 4b362a6ca1b84d92b2500e52e85f82946b7a1b0e Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:19 +0800
Subject: [PATCH] net/hns3: fix offload flag of IEEE 1588

[ upstream commit bd8f90f0175914bc7df9ef2e9170a850faaa253b ]

Currently, the RTE_MBUF_F_RX_IEEE1588_TMST offload flag will
not be set when the scatter algorithm is used.
This patch fixes it.

Fixes: 4801f0403b58 ("net/hns3: fix IEEE 1588 PTP for scalar scattered Rx")

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

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 3e905f8aac..da6b924eab 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2683,4 +2683,5 @@ hns3_recv_scattered_pkts(void *rx_queue,
 		}
 
+		first_seg->ol_flags = 0;
 		if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B)))
 			hns3_rx_ptp_timestamp_handle(rxq, first_seg, timestamp);
@@ -2712,5 +2713,5 @@ hns3_recv_scattered_pkts(void *rx_queue,
 		first_seg->port = rxq->port_id;
 		first_seg->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);
-		first_seg->ol_flags = RTE_MBUF_F_RX_RSS_HASH;
+		first_seg->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
 		if (unlikely(bd_base_info & BIT(HNS3_RXD_LUM_B))) {
 			first_seg->hash.fdir.hi =
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.226941113 +0100
+++ 0007-net-hns3-fix-offload-flag-of-IEEE-1588.patch	2024-08-23 17:18:09.614429735 +0100
@@ -1 +1 @@
-From bd8f90f0175914bc7df9ef2e9170a850faaa253b Mon Sep 17 00:00:00 2001
+From 4b362a6ca1b84d92b2500e52e85f82946b7a1b0e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd8f90f0175914bc7df9ef2e9170a850faaa253b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 73a388b2fe..e6d277ffad 100644
+index 3e905f8aac..da6b924eab 100644
@@ -23 +24 @@
-@@ -2670,4 +2670,5 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2683,4 +2683,5 @@ hns3_recv_scattered_pkts(void *rx_queue,
@@ -29 +30 @@
-@@ -2699,5 +2700,5 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2712,5 +2713,5 @@ hns3_recv_scattered_pkts(void *rx_queue,


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

* patch 'net/hns3: fix Rx timestamp flag' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (5 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/hns3: fix offload flag of IEEE 1588' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/hns3: fix double free for Rx/Tx queue' " Kevin Traynor
                   ` (127 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7d93896c26a45f52c872367d3e85669de17441bf

Thanks.

Kevin

---
From 7d93896c26a45f52c872367d3e85669de17441bf Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:20 +0800
Subject: [PATCH] net/hns3: fix Rx timestamp flag

[ upstream commit e7141041d3aa74ff49b703424f120a6e2c00dcb4 ]

The flag RTE_MBUF_F_RX_IEEE1588_PTP depends on the packet
type and does not need to be set when reading Rx timestamp.

Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index da6b924eab..deda150a5b 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2402,6 +2402,5 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(rxq->hns);
 
-	mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP |
-			  RTE_MBUF_F_RX_IEEE1588_TMST;
+	mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;
 	if (hns3_timestamp_rx_dynflag > 0) {
 		*RTE_MBUF_DYNFIELD(mbuf, hns3_timestamp_dynfield_offset,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.267588849 +0100
+++ 0008-net-hns3-fix-Rx-timestamp-flag.patch	2024-08-23 17:18:09.618429749 +0100
@@ -1 +1 @@
-From e7141041d3aa74ff49b703424f120a6e2c00dcb4 Mon Sep 17 00:00:00 2001
+From 7d93896c26a45f52c872367d3e85669de17441bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7141041d3aa74ff49b703424f120a6e2c00dcb4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index e6d277ffad..55311402fe 100644
+index da6b924eab..deda150a5b 100644
@@ -22 +23 @@
-@@ -2390,6 +2390,5 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
+@@ -2402,6 +2402,5 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,


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

* patch 'net/hns3: fix double free for Rx/Tx queue' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (6 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/hns3: fix Rx timestamp flag' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/hns3: fix variable overflow' " Kevin Traynor
                   ` (126 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/46ac5a94babb0f2b546b2cb18eeca1fcb7da7f4f

Thanks.

Kevin

---
From 46ac5a94babb0f2b546b2cb18eeca1fcb7da7f4f Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:21 +0800
Subject: [PATCH] net/hns3: fix double free for Rx/Tx queue

[ upstream commit bbf6fcc0cc62031a26517608a471873339423d8c ]

The Pointers to some resources on the Rx/Tx queue need to be set to NULL
after free inside the hns3_rx/tx_queue_release(), as this function is
called from multiple threads (reset thread, device config thread, etc),
leading to double memory free error.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

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

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index deda150a5b..cbd09e69d0 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -87,8 +87,12 @@ hns3_rx_queue_release(void *queue)
 	if (rxq) {
 		hns3_rx_queue_release_mbufs(rxq);
-		if (rxq->mz)
+		if (rxq->mz) {
 			rte_memzone_free(rxq->mz);
-		if (rxq->sw_ring)
+			rxq->mz = NULL;
+		}
+		if (rxq->sw_ring) {
 			rte_free(rxq->sw_ring);
+			rxq->sw_ring = NULL;
+		}
 		rte_free(rxq);
 	}
@@ -101,10 +105,16 @@ hns3_tx_queue_release(void *queue)
 	if (txq) {
 		hns3_tx_queue_release_mbufs(txq);
-		if (txq->mz)
+		if (txq->mz) {
 			rte_memzone_free(txq->mz);
-		if (txq->sw_ring)
+			txq->mz = NULL;
+		}
+		if (txq->sw_ring) {
 			rte_free(txq->sw_ring);
-		if (txq->free)
+			txq->sw_ring = NULL;
+		}
+		if (txq->free) {
 			rte_free(txq->free);
+			txq->free = NULL;
+		}
 		rte_free(txq);
 	}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.303464061 +0100
+++ 0009-net-hns3-fix-double-free-for-Rx-Tx-queue.patch	2024-08-23 17:18:09.622429763 +0100
@@ -1 +1 @@
-From bbf6fcc0cc62031a26517608a471873339423d8c Mon Sep 17 00:00:00 2001
+From 46ac5a94babb0f2b546b2cb18eeca1fcb7da7f4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bbf6fcc0cc62031a26517608a471873339423d8c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/hns3/hns3_rxtx.c | 23 ++++++++++++++++++-----
- 1 file changed, 18 insertions(+), 5 deletions(-)
+ drivers/net/hns3/hns3_rxtx.c | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
@@ -21 +22 @@
-index 55311402fe..bf10da1928 100644
+index deda150a5b..cbd09e69d0 100644
@@ -24 +25 @@
-@@ -87,7 +87,12 @@ hns3_rx_queue_release(void *queue)
+@@ -87,8 +87,12 @@ hns3_rx_queue_release(void *queue)
@@ -30 +31 @@
--		rte_free(rxq->sw_ring);
+-		if (rxq->sw_ring)
@@ -34 +35 @@
-+			rte_free(rxq->sw_ring);
+ 			rte_free(rxq->sw_ring);
@@ -39 +40 @@
-@@ -100,8 +105,16 @@ hns3_tx_queue_release(void *queue)
+@@ -101,10 +105,16 @@ hns3_tx_queue_release(void *queue)
@@ -45,2 +46 @@
--		rte_free(txq->sw_ring);
--		rte_free(txq->free);
+-		if (txq->sw_ring)
@@ -50 +50,2 @@
-+			rte_free(txq->sw_ring);
+ 			rte_free(txq->sw_ring);
+-		if (txq->free)
@@ -54 +55 @@
-+			rte_free(txq->free);
+ 			rte_free(txq->free);


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

* patch 'net/hns3: fix variable overflow' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (7 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/hns3: fix double free for Rx/Tx queue' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " Kevin Traynor
                   ` (125 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2cd371c2b22ba2391d5d0bf1dbae7c5a4f45d2f0

Thanks.

Kevin

---
From 2cd371c2b22ba2391d5d0bf1dbae7c5a4f45d2f0 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:22 +0800
Subject: [PATCH] net/hns3: fix variable overflow

[ upstream commit d7a0698ce704852cfb3b3b541107477d9b4bd2fd ]

The function strtoul() returns an unsigned long, which should
be received using the variable uint64_t.

Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 02328d18bc..ca029be6e5 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -218,5 +218,5 @@ static int
 hns3_parse_mbx_time_limit(const char *key, const char *value, void *extra_args)
 {
-	uint32_t val;
+	uint64_t val;
 
 	RTE_SET_USED(key);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.331542895 +0100
+++ 0010-net-hns3-fix-variable-overflow.patch	2024-08-23 17:18:09.623429766 +0100
@@ -1 +1 @@
-From d7a0698ce704852cfb3b3b541107477d9b4bd2fd Mon Sep 17 00:00:00 2001
+From 2cd371c2b22ba2391d5d0bf1dbae7c5a4f45d2f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7a0698ce704852cfb3b3b541107477d9b4bd2fd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 28c26b049c..5e6cdfdaa0 100644
+index 02328d18bc..ca029be6e5 100644
@@ -22 +23 @@
-@@ -225,5 +225,5 @@ static int
+@@ -218,5 +218,5 @@ static int


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

* patch 'net/hns3: disable SCTP verification tag for RSS hash input' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (8 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/hns3: fix variable overflow' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " Kevin Traynor
                   ` (124 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Jie Hai; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8fb5749bc60ae63b56825ae4ac6358e8c4eb66b8

Thanks.

Kevin

---
From 8fb5749bc60ae63b56825ae4ac6358e8c4eb66b8 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Wed, 3 Apr 2024 18:16:23 +0800
Subject: [PATCH] net/hns3: disable SCTP verification tag for RSS hash input

[ upstream commit bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 ]

When the symmetric RSS algorithm is used, the same packet is
expected to be hashed to the same queue in the upstream and
downstream directions.

The problem is that it could map the packets in the same SCTP
connection to different NIC RX queues depending on the direction
of packets. This is because the verification Tag is used as the
RSS hash input for the SCTP packets, and the value depends on the
peer end of the SCTP connection and could not be symmetrically
used in the hardware-implemented RSS algorithm.

In addition, the ethdev framework doesn't support setting SCTP
V-tag as the RSS hash input. So disable it for all RSS hash
algorithms.

Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 6 ++----
 drivers/net/hns3/hns3_rss.h | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index b587954508..3fce50519f 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -154,6 +154,5 @@ static const struct {
 	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) |
 	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER),
+	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D),
 	  HNS3_RSS_TUPLE_IPV4_SCTP_M },
 
@@ -275,6 +274,5 @@ static const struct {
 	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) |
 	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER),
+	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S),
 	  HNS3_RSS_TUPLE_IPV6_SCTP_M },
 };
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 5c0f0b75f0..94c667dad6 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -49,5 +49,4 @@ enum hns3_tuple_field {
 	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D,
 	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S,
-	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER,
 
 	/* IPV4 ENABLE FIELD */
@@ -74,5 +73,4 @@ enum hns3_tuple_field {
 	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D,
 	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S,
-	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER,
 
 	/* IPV6 ENABLE FIELD */
@@ -96,10 +94,10 @@ enum hns3_tuple_field {
 #define HNS3_RSS_TUPLE_IPV4_TCP_M	GENMASK(3, 0)
 #define HNS3_RSS_TUPLE_IPV4_UDP_M	GENMASK(11, 8)
-#define HNS3_RSS_TUPLE_IPV4_SCTP_M	GENMASK(20, 16)
+#define HNS3_RSS_TUPLE_IPV4_SCTP_M	GENMASK(19, 16)
 #define HNS3_RSS_TUPLE_IPV4_NONF_M	GENMASK(25, 24)
 #define HNS3_RSS_TUPLE_IPV4_FLAG_M	GENMASK(27, 26)
 #define HNS3_RSS_TUPLE_IPV6_TCP_M	GENMASK(35, 32)
 #define HNS3_RSS_TUPLE_IPV6_UDP_M	GENMASK(43, 40)
-#define HNS3_RSS_TUPLE_IPV6_SCTP_M	GENMASK(52, 48)
+#define HNS3_RSS_TUPLE_IPV6_SCTP_M	GENMASK(51, 48)
 #define HNS3_RSS_TUPLE_IPV6_NONF_M	GENMASK(57, 56)
 #define HNS3_RSS_TUPLE_IPV6_FLAG_M	GENMASK(59, 58)
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.357716442 +0100
+++ 0011-net-hns3-disable-SCTP-verification-tag-for-RSS-hash-.patch	2024-08-23 17:18:09.624429770 +0100
@@ -1 +1 @@
-From bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 Mon Sep 17 00:00:00 2001
+From 8fb5749bc60ae63b56825ae4ac6358e8c4eb66b8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 ]
+
@@ -21,2 +22,0 @@
-Cc: stable@dpdk.org
-
@@ -30 +30 @@
-index 15feb26043..3eae4caf52 100644
+index b587954508..3fce50519f 100644
@@ -50 +50 @@
-index 9d182a8025..0755760b45 100644
+index 5c0f0b75f0..94c667dad6 100644
@@ -53 +53 @@
-@@ -50,5 +50,4 @@ enum hns3_tuple_field {
+@@ -49,5 +49,4 @@ enum hns3_tuple_field {
@@ -59 +59 @@
-@@ -75,5 +74,4 @@ enum hns3_tuple_field {
+@@ -74,5 +73,4 @@ enum hns3_tuple_field {
@@ -65 +65 @@
-@@ -97,10 +95,10 @@ enum hns3_tuple_field {
+@@ -96,10 +94,10 @@ enum hns3_tuple_field {


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

* patch 'net/af_packet: align Rx/Tx structs to cache line' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (9 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'doc: fix testpmd ring size command' " Kevin Traynor
                   ` (123 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Mattias Rönnblom
  Cc: Morten Brørup, Stephen Hemminger, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/858c31a50101ef9e5812c2717ab860890295fe52

Thanks.

Kevin

---
From 858c31a50101ef9e5812c2717ab860890295fe52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Fri, 26 Apr 2024 11:05:02 +0200
Subject: [PATCH] net/af_packet: align Rx/Tx structs to cache line
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]

Cache align Rx and Tx queue struct to avoid false sharing.

The RX struct happens to be 64 bytes on x86_64 already, so cache
alignment has no effect there, but it does on 32-bit ISAs.

The TX struct is 56 bytes on x86_64.

Both structs keep counters, and in the RX case they are updated even
for empty polls.

Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 88cdc7ee2e..164597d767 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -7,4 +7,5 @@
  */
 
+#include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_mbuf.h>
@@ -39,5 +40,5 @@
 #define DFLT_FRAME_COUNT	(1 << 9)
 
-struct pkt_rx_queue {
+struct __rte_cache_aligned pkt_rx_queue {
 	int sockfd;
 
@@ -55,5 +56,5 @@ struct pkt_rx_queue {
 };
 
-struct pkt_tx_queue {
+struct __rte_cache_aligned pkt_tx_queue {
 	int sockfd;
 	unsigned int frame_data_size;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.383819571 +0100
+++ 0012-net-af_packet-align-Rx-Tx-structs-to-cache-line.patch	2024-08-23 17:18:09.626429777 +0100
@@ -1 +1 @@
-From c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c Mon Sep 17 00:00:00 2001
+From 858c31a50101ef9e5812c2717ab860890295fe52 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 397a32db58..6b7b16f348 100644
+index 88cdc7ee2e..164597d767 100644
@@ -40 +41 @@
-@@ -40,5 +41,5 @@
+@@ -39,5 +40,5 @@
@@ -47 +48 @@
-@@ -56,5 +57,5 @@ struct pkt_rx_queue {
+@@ -55,5 +56,5 @@ struct pkt_rx_queue {


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

* patch 'doc: fix testpmd ring size command' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (10 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " Kevin Traynor
                   ` (122 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9b8ca61893630ff202489b0f549108de2531461a

Thanks.

Kevin

---
From 9b8ca61893630ff202489b0f549108de2531461a Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 3 May 2024 09:51:29 +0100
Subject: [PATCH] doc: fix testpmd ring size command

[ upstream commit 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d ]

The documentation is missing the 'config' word.

In app, 'help ports' shows the correct syntax:

port config (port_id) (rxq|txq) (queue_id) ring_size (value)

Fixes: 1a77cffa8143 ("app/testpmd: enable queue ring size configure")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 3a522a80a6..6902b7ba7c 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2208,5 +2208,5 @@ port config - queue ring size
 Configure a rx/tx queue ring size::
 
-   testpmd> port (port_id) (rxq|txq) (queue_id) ring_size (value)
+   testpmd> port config (port_id) (rxq|txq) (queue_id) ring_size (value)
 
 Only take effect after command that (re-)start the port or command that setup specific queue.
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.409294087 +0100
+++ 0013-doc-fix-testpmd-ring-size-command.patch	2024-08-23 17:18:09.630429791 +0100
@@ -1 +1 @@
-From 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d Mon Sep 17 00:00:00 2001
+From 9b8ca61893630ff202489b0f549108de2531461a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 2fbf9220d8..ecd040504e 100644
+index 3a522a80a6..6902b7ba7c 100644
@@ -25 +26 @@
-@@ -2033,5 +2033,5 @@ port config - queue ring size
+@@ -2208,5 +2208,5 @@ port config - queue ring size


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

* patch 'net/af_xdp: fix port ID in Rx mbuf' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (11 preceding siblings ...)
  2024-08-23 16:17 ` patch 'doc: fix testpmd ring size command' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/af_xdp: count mbuf allocation failures' " Kevin Traynor
                   ` (121 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Stephen Hemminger, Maryam Tahhan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6d6630439d9ffb09dad65b4292dba4723dc7f8ec

Thanks.

Kevin

---
From 6d6630439d9ffb09dad65b4292dba4723dc7f8ec Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:52 +0000
Subject: [PATCH] net/af_xdp: fix port ID in Rx mbuf

[ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ]

Record the port id in the af_xdp rx queue structure and use it
to set the port id of the mbuf of a received packed.

Bugzilla ID: 1428
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index d7214c2028..c82ea664a1 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -101,4 +101,5 @@ struct pkt_rx_queue {
 	struct xsk_socket *xsk;
 	struct rte_mempool *mb_pool;
+	uint16_t port;
 
 	struct rx_stats stats;
@@ -320,4 +321,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			rte_pktmbuf_priv_size(umem->mb_pool) -
 			umem->mb_pool->header_size;
+		bufs[i]->port = rxq->port;
 
 		rte_pktmbuf_pkt_len(bufs[i]) = len;
@@ -386,4 +388,5 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		rx_bytes += len;
 		bufs[i] = mbufs[i];
+		bufs[i]->port = rxq->port;
 	}
 
@@ -1448,4 +1451,6 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->fds[0].events = POLLIN;
 
+	rxq->port = dev->data->port_id;
+
 	dev->data->rx_queues[rx_queue_id] = rxq;
 	return 0;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.438066406 +0100
+++ 0014-net-af_xdp-fix-port-ID-in-Rx-mbuf.patch	2024-08-23 17:18:09.632429798 +0100
@@ -1 +1 @@
-From 9bab1d2667aec4942ae1d384671e5148960bd88f Mon Sep 17 00:00:00 2001
+From 6d6630439d9ffb09dad65b4292dba4723dc7f8ec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 2d6f64337e..0997543ee5 100644
+index d7214c2028..c82ea664a1 100644
@@ -25 +26 @@
-@@ -134,4 +134,5 @@ struct pkt_rx_queue {
+@@ -101,4 +101,5 @@ struct pkt_rx_queue {
@@ -31 +32 @@
-@@ -369,4 +370,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -320,4 +321,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -37 +38 @@
-@@ -435,4 +437,5 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -386,4 +388,5 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -43,2 +44,2 @@
-@@ -1814,4 +1817,6 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
- 	process_private->rxq_xsk_fds[rx_queue_id] = rxq->fds[0].fd;
+@@ -1448,4 +1451,6 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
+ 	rxq->fds[0].events = POLLIN;


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

* patch 'net/af_xdp: count mbuf allocation failures' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (12 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/tap: fix file descriptor check in isolated flow' " Kevin Traynor
                   ` (120 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6825397cf6a632fc693b2b7f2d785f99618420bf

Thanks.

Kevin

---
From 6825397cf6a632fc693b2b7f2d785f99618420bf Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:53 +0000
Subject: [PATCH] net/af_xdp: count mbuf allocation failures

[ upstream commit f294405ab98594aa41269507dde95cc89bb20a61 ]

Failures to allocate mbufs in the receive path were not being
accounted for in the ethdev statistics. Fix this.

Bugzilla ID: 1429
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index c82ea664a1..5e2c239db8 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -272,4 +272,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	int i;
 	struct rte_mbuf *fq_bufs[ETH_AF_XDP_RX_BATCH_SIZE];
+	struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
 
 	nb_pkts = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);
@@ -299,4 +300,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		 */
 		rx->cached_cons -= nb_pkts;
+		dev->data->rx_mbuf_alloc_failed += nb_pkts;
 		return 0;
 	}
@@ -350,4 +352,5 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	uint32_t free_thresh = fq->size >> 1;
 	struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE];
+	struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
 
 	if (xsk_prod_nb_free(fq, free_thresh) >= free_thresh)
@@ -368,4 +371,6 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		 */
 		rx->cached_cons -= nb_pkts;
+		dev->data->rx_mbuf_alloc_failed += nb_pkts;
+
 		return 0;
 	}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.464905069 +0100
+++ 0015-net-af_xdp-count-mbuf-allocation-failures.patch	2024-08-23 17:18:09.634429805 +0100
@@ -1 +1 @@
-From f294405ab98594aa41269507dde95cc89bb20a61 Mon Sep 17 00:00:00 2001
+From 6825397cf6a632fc693b2b7f2d785f99618420bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f294405ab98594aa41269507dde95cc89bb20a61 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 0997543ee5..0db761a204 100644
+index c82ea664a1..5e2c239db8 100644
@@ -24 +25 @@
-@@ -321,4 +321,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -272,4 +272,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -30 +31 @@
-@@ -348,4 +349,6 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -299,4 +300,5 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -34 +34,0 @@
-+
@@ -37 +37 @@
-@@ -399,4 +402,5 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -350,4 +352,5 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -43 +43 @@
-@@ -417,4 +421,5 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -368,4 +371,6 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -46,0 +47 @@
++


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

* patch 'net/tap: fix file descriptor check in isolated flow' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (13 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/af_xdp: count mbuf allocation failures' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " Kevin Traynor
                   ` (119 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a599aacf12d5804af8ea8b01c67780f3cbb1f2dc

Thanks.

Kevin

---
From a599aacf12d5804af8ea8b01c67780f3cbb1f2dc Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 21 May 2024 13:12:46 -0700
Subject: [PATCH] net/tap: fix file descriptor check in isolated flow

[ upstream commit e9e6089a41c275f3dcd7491f4df903a284653bb9 ]

The check for receive queue FD in flow_isolate is incorrect.
If queue has not been setup then FD will be -1 not 0.

Fixes: f503d2694825 ("net/tap: support flow API isolated mode")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/tap/tap_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index b4879d3f93..44ef948ae3 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1598,5 +1598,5 @@ tap_flow_isolate(struct rte_eth_dev *dev,
 	 * Otherwise it will be set when bringing up the netdevice (tun_alloc).
 	 */
-	if (!process_private->rxq_fds[0])
+	if (process_private->rxq_fds[0] == -1)
 		return 0;
 	if (set) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.491658948 +0100
+++ 0016-net-tap-fix-file-descriptor-check-in-isolated-flow.patch	2024-08-23 17:18:09.635429808 +0100
@@ -1 +1 @@
-From e9e6089a41c275f3dcd7491f4df903a284653bb9 Mon Sep 17 00:00:00 2001
+From a599aacf12d5804af8ea8b01c67780f3cbb1f2dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9e6089a41c275f3dcd7491f4df903a284653bb9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fa50fe45d7..79cd6a12ca 100644
+index b4879d3f93..44ef948ae3 100644
@@ -22 +23 @@
-@@ -1596,5 +1596,5 @@ tap_flow_isolate(struct rte_eth_dev *dev,
+@@ -1598,5 +1598,5 @@ tap_flow_isolate(struct rte_eth_dev *dev,


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

* patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (14 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/tap: fix file descriptor check in isolated flow' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: reset link when link never comes back' " Kevin Traynor
                   ` (118 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8eeb4d4534686c1ac2fde62b2db83db1060cb11b

Thanks.

Kevin

---
From 8eeb4d4534686c1ac2fde62b2db83db1060cb11b Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:33 +0530
Subject: [PATCH] net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs

[ upstream commit d06394d2641e3fdc0538a23354d9ff7c5aa9b277 ]

The XGBE supports performing MDIO operations using an MDIO command
request. The driver mistakenly uses the mdio port address as the
MDIO command request device address instead of the MDIO command
request port address. Additionally, the driver does not properly check
for and create a clause 45 MDIO command

Without the fix PHY device is not detected and can't be usable.

Check the supplied MDIO register to determine if the request is a clause
45 operation (MII_ADDR_C45). For a clause 45 operation, extract device
address and register number from the supplied MDIO register and use them
to set the MDIO command request device address and register number
fields. For a clause 22 operation, the MDIO request device address is
set to zero and the MDIO command request register number is set to the
supplied MDIO register. In either case, the supplied MDIO port address
is used as the MDIO command request port address.

Fixes: 4ac7516b8b39 ("net/axgbe: add phy init and related APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_common.h |  2 --
 drivers/net/axgbe/axgbe_dev.c    | 22 ++++++++++++++++------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index df0aa21a9b..9618d7e33b 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -408,6 +408,4 @@
 #define MAC_MDIOSCAR_RA_INDEX		0
 #define MAC_MDIOSCAR_RA_WIDTH		16
-#define MAC_MDIOSCAR_REG_INDEX		0
-#define MAC_MDIOSCAR_REG_WIDTH		21
 #define MAC_MDIOSCCDR_BUSY_INDEX	22
 #define MAC_MDIOSCCDR_BUSY_WIDTH	1
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 6a7fddffca..3389954aa6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -64,4 +64,18 @@ static int mdio_complete(struct axgbe_port *pdata)
 }
 
+static unsigned int axgbe_create_mdio_sca(int port, int reg)
+{
+	unsigned int mdio_sca, da;
+
+	da = (reg & MII_ADDR_C45) ? reg >> 16 : 0;
+
+	mdio_sca = 0;
+	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, RA, reg);
+	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, PA, port);
+	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, da);
+
+	return mdio_sca;
+}
+
 static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata, int addr,
 				    int reg, u16 val)
@@ -70,7 +84,5 @@ static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata, int addr,
 	uint64_t timeout;
 
-	mdio_sca = 0;
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
+	mdio_sca = axgbe_create_mdio_sca(addr, reg);
 	AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
 
@@ -98,7 +110,5 @@ static int axgbe_read_ext_mii_regs(struct axgbe_port *pdata, int addr,
 	uint64_t timeout;
 
-	mdio_sca = 0;
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
+	mdio_sca = axgbe_create_mdio_sca(addr, reg);
 	AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.518391893 +0100
+++ 0017-net-axgbe-fix-MDIO-access-for-non-zero-ports-and-CL4.patch	2024-08-23 17:18:09.637429815 +0100
@@ -1 +1 @@
-From d06394d2641e3fdc0538a23354d9ff7c5aa9b277 Mon Sep 17 00:00:00 2001
+From 8eeb4d4534686c1ac2fde62b2db83db1060cb11b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d06394d2641e3fdc0538a23354d9ff7c5aa9b277 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index a5d11c5832..51532fb34a 100644
+index df0aa21a9b..9618d7e33b 100644


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

* patch 'net/axgbe: reset link when link never comes back' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (15 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " Kevin Traynor
                   ` (117 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4615048c8a362ca9b6fef5d83abc56e31643dfa9

Thanks.

Kevin

---
From 4615048c8a362ca9b6fef5d83abc56e31643dfa9 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:34 +0530
Subject: [PATCH] net/axgbe: reset link when link never comes back

[ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ]

Normally, auto negotiation and reconnect should be automatically done by
the hardware. But there seems to be an issue where auto negotiation has
to be restarted manually. This happens because of link training and so
even though still connected to the partner the link never "comes back".
This needs an auto-negotiation restart.

Without the fix the user will not see the link up status

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_mdio.c     | 2 +-
 drivers/net/axgbe/axgbe_phy_impl.c | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index 32d8c666f9..523b6c0f07 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -1084,5 +1084,5 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
 	if (an_restart) {
 		axgbe_phy_config_aneg(pdata);
-		return;
+		goto adjust_link;
 	}
 
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 72104f8a3f..df334749e9 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1694,4 +1694,11 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart)
 		return 1;
 
+	if (pdata->phy.autoneg == AUTONEG_ENABLE &&
+			phy_data->port_mode == AXGBE_PORT_MODE_BACKPLANE) {
+		if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state)) {
+			*an_restart = 1;
+		}
+	}
+
 	/* No link, attempt a receiver reset cycle */
 	if (phy_data->rrc_count++) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.545995897 +0100
+++ 0018-net-axgbe-reset-link-when-link-never-comes-back.patch	2024-08-23 17:18:09.639429822 +0100
@@ -1 +1 @@
-From edf463256dd35803aaa11b0da704a0542ad20071 Mon Sep 17 00:00:00 2001
+From 4615048c8a362ca9b6fef5d83abc56e31643dfa9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 913ceada0d..b03bc471cb 100644
+index 32d8c666f9..523b6c0f07 100644
@@ -28 +29 @@
-@@ -1052,5 +1052,5 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
+@@ -1084,5 +1084,5 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
@@ -36 +37 @@
-index 44ff28517c..54fe9faae0 100644
+index 72104f8a3f..df334749e9 100644
@@ -39 +40 @@
-@@ -1698,4 +1698,11 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart)
+@@ -1694,4 +1694,11 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart)


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

* patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (16 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: reset link when link never comes back' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: update DMA coherency values' " Kevin Traynor
                   ` (116 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8d53ecbbf62d7a7496283a7572d5f3de1bcfe36d

Thanks.

Kevin

---
From 8d53ecbbf62d7a7496283a7572d5f3de1bcfe36d Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:35 +0530
Subject: [PATCH] net/axgbe: fix fluctuations for 1G Bel Fuse SFP

[ upstream commit 3abfda0f7d58b2eef20cdf8e102825678b150421 ]

Frequent link up/down events can happen when a Bel Fuse SFP part is
connected to the amd-xgbe device. Try to avoid the frequent link
issues by resetting the PHY as documented in Bel Fuse SFP datasheet.

Without the fix user will see continuous port link up and down.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index df334749e9..a458722e2e 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -578,4 +578,7 @@ static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata)
 		return false;
 
+	/* Reset PHY - wait for self-clearing reset bit to clear */
+	pdata->phy_if.phy_impl.reset(pdata);
+
 	if (!memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_PN],
 		    AXGBE_BEL_FUSE_PARTNO, strlen(AXGBE_BEL_FUSE_PARTNO))) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.574028543 +0100
+++ 0019-net-axgbe-fix-fluctuations-for-1G-Bel-Fuse-SFP.patch	2024-08-23 17:18:09.640429826 +0100
@@ -1 +1 @@
-From 3abfda0f7d58b2eef20cdf8e102825678b150421 Mon Sep 17 00:00:00 2001
+From 8d53ecbbf62d7a7496283a7572d5f3de1bcfe36d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3abfda0f7d58b2eef20cdf8e102825678b150421 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 54fe9faae0..ee9dcbe3da 100644
+index df334749e9..a458722e2e 100644
@@ -25 +26 @@
-@@ -579,4 +579,7 @@ static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata)
+@@ -578,4 +578,7 @@ static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata)


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

* patch 'net/axgbe: update DMA coherency values' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (17 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: disable interrupts during device removal' " Kevin Traynor
                   ` (115 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ef8e4aa85514a8c0d08105a8571cc310ca1e5d79

Thanks.

Kevin

---
From ef8e4aa85514a8c0d08105a8571cc310ca1e5d79 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:36 +0530
Subject: [PATCH] net/axgbe: update DMA coherency values

[ upstream commit 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 ]

Based on the IOMMU configuration, the current cache control settings can
result in possible coherency issues. The hardware team has recommended
new settings for the PCI device path to eliminate the issue.

Without the fix the user will get incorrect data in TSO functionality

Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_dev.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 3389954aa6..9b0073eea6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -648,21 +648,19 @@ static void axgbe_config_dma_cache(struct axgbe_port *pdata)
 
 	arcache = 0;
-	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, DRC, 0x3);
+	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, DRC, 0xf);
+	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, TEC, 0xf);
+	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, THC, 0xf);
 	AXGMAC_IOWRITE(pdata, DMA_AXIARCR, arcache);
 
 	awcache = 0;
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, DWC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPD, 0x1);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHD, 0x1);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDD, 0x1);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, DWC, 0xf);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPC, 0xf);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHC, 0xf);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDC, 0xf);
 	AXGMAC_IOWRITE(pdata, DMA_AXIAWCR, awcache);
 
 	arwcache = 0;
-	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWD, 0x1);
-	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWC, 0x3);
-	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, RDRC, 0x3);
+	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWC, 0xf);
+	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, RDRC, 0xf);
 	AXGMAC_IOWRITE(pdata, DMA_AXIAWRCR, arwcache);
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.600569726 +0100
+++ 0020-net-axgbe-update-DMA-coherency-values.patch	2024-08-23 17:18:09.640429826 +0100
@@ -1 +1 @@
-From 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 Mon Sep 17 00:00:00 2001
+From ef8e4aa85514a8c0d08105a8571cc310ca1e5d79 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/axgbe: disable interrupts during device removal' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (18 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: update DMA coherency values' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " Kevin Traynor
                   ` (114 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a14247758ae4d076545ec3006060d274f26d3c6a

Thanks.

Kevin

---
From a14247758ae4d076545ec3006060d274f26d3c6a Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:37 +0530
Subject: [PATCH] net/axgbe: disable interrupts during device removal

[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]

Hardware interrupts are enabled during the init, however, they are not
disabled during close.

Disable all hardware interrupts during close operation to avoid any
issues.

Fixes: 9e890103267e ("net/axgbe: add Rx/Tx setup")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index a7812f03c1..4dd634414c 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2333,4 +2333,5 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
 {
 	struct rte_pci_device *pci_dev;
+	struct axgbe_port *pdata;
 
 	PMD_INIT_FUNC_TRACE();
@@ -2339,4 +2340,5 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
 		return 0;
 
+	pdata = eth_dev->data->dev_private;
 	pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
 	axgbe_dev_clear_queues(eth_dev);
@@ -2348,4 +2350,7 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
 				     (void *)eth_dev);
 
+	/* Disable all interrupts in the hardware */
+	XP_IOWRITE(pdata, XP_INT_EN, 0x0);
+
 	return 0;
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.625874394 +0100
+++ 0021-net-axgbe-disable-interrupts-during-device-removal.patch	2024-08-23 17:18:09.641429829 +0100
@@ -1 +1 @@
-From 7b7288b08760204139085174ba00a2863dfdbbec Mon Sep 17 00:00:00 2001
+From a14247758ae4d076545ec3006060d274f26d3c6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index dd681f15a0..e5d8f7db02 100644
+index a7812f03c1..4dd634414c 100644
@@ -25 +26 @@
-@@ -2412,4 +2412,5 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2333,4 +2333,5 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
@@ -31 +32 @@
-@@ -2418,4 +2419,5 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2339,4 +2340,5 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
@@ -37 +38 @@
-@@ -2427,4 +2429,7 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2348,4 +2350,7 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)


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

* patch 'net/axgbe: fix SFP codes check for DAC cables' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (19 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: disable interrupts during device removal' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: fix connection for SFP+ active " Kevin Traynor
                   ` (113 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/35429aa99d616f707ca5ad14c528b6195ebe5715

Thanks.

Kevin

---
From 35429aa99d616f707ca5ad14c528b6195ebe5715 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:40 +0530
Subject: [PATCH] net/axgbe: fix SFP codes check for DAC cables

[ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ]

The current axgbe code assumes that offset 6 of EEPROM SFP DAC (passive)
cables is NULL. However, some cables (the 5 meter and 7 meter Molex
passive cables) have non-zero data at offset 6. Fix the logic by moving
the passive cable check above the active checks, so as not to be
improperly identified as an active cable. This will fix the issue for
any passive cable that advertises 1000Base-CX in offset 6.

Without the fix the user will not get link UP for few DAC cables.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index a458722e2e..c17a074f59 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -625,5 +625,8 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
 
 	/* Determine the type of SFP */
-	if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
+	if (phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE &&
+		 axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
+		phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
+	else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
 		phy_data->sfp_base = AXGBE_SFP_BASE_10000_SR;
 	else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_LR)
@@ -642,7 +645,4 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
 	else if (sfp_base[AXGBE_SFP_BASE_1GBE_CC] & AXGBE_SFP_BASE_1GBE_CC_T)
 		phy_data->sfp_base = AXGBE_SFP_BASE_1000_T;
-	else if ((phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE) &&
-		 axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
-		phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
 
 	switch (phy_data->sfp_base) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.652255712 +0100
+++ 0022-net-axgbe-fix-SFP-codes-check-for-DAC-cables.patch	2024-08-23 17:18:09.642429833 +0100
@@ -1 +1 @@
-From 4eefb1b16acaa69bd757057e0c54c58f11577ba3 Mon Sep 17 00:00:00 2001
+From 35429aa99d616f707ca5ad14c528b6195ebe5715 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index bcefbf28f2..10196cae94 100644
+index a458722e2e..c17a074f59 100644
@@ -28 +29 @@
-@@ -626,5 +626,8 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
+@@ -625,5 +625,8 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
@@ -38 +39 @@
-@@ -643,7 +646,4 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
+@@ -642,7 +645,4 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)


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

* patch 'net/axgbe: fix connection for SFP+ active cables' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (20 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: check only minimum speed for " Kevin Traynor
                   ` (112 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3fe8271448da39f64966d90116ff1675fc266188

Thanks.

Kevin

---
From 3fe8271448da39f64966d90116ff1675fc266188 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:41 +0530
Subject: [PATCH] net/axgbe: fix connection for SFP+ active cables

[ upstream commit 4823ccdbbd887bb84339a4d35febd92292d07b97 ]

SFP+ active and passive cables are copper cables with fixed SFP+ end
connectors. Due to a misinterpretation of this, SFP+ active cables could
end up not being recognized, causing the driver to fail to establish a
connection.

Introduce a new enum in SFP+ cable types, XGBE_SFP_CABLE_FIBER, that is
the default cable type, and handle active and passive cables when they
are specifically detected.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index c17a074f59..8268590778 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -69,4 +69,5 @@ enum axgbe_sfp_cable {
 	AXGBE_SFP_CABLE_ACTIVE,
 	AXGBE_SFP_CABLE_PASSIVE,
+	AXGBE_SFP_CABLE_FIBER,
 };
 
@@ -616,14 +617,16 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
 	axgbe_phy_sfp_parse_quirks(pdata);
 
-	/* Assume ACTIVE cable unless told it is PASSIVE */
+	/* Assume FIBER cable unless told otherwise */
 	if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_PASSIVE) {
 		phy_data->sfp_cable = AXGBE_SFP_CABLE_PASSIVE;
 		phy_data->sfp_cable_len = sfp_base[AXGBE_SFP_BASE_CU_CABLE_LEN];
-	} else {
+	} else if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_ACTIVE) {
 		phy_data->sfp_cable = AXGBE_SFP_CABLE_ACTIVE;
+	} else {
+		phy_data->sfp_cable = AXGBE_SFP_CABLE_FIBER;
 	}
 
 	/* Determine the type of SFP */
-	if (phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE &&
+	if (phy_data->sfp_cable != AXGBE_SFP_CABLE_FIBER &&
 		 axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
 		phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.678579175 +0100
+++ 0023-net-axgbe-fix-connection-for-SFP-active-cables.patch	2024-08-23 17:18:09.643429836 +0100
@@ -1 +1 @@
-From 4823ccdbbd887bb84339a4d35febd92292d07b97 Mon Sep 17 00:00:00 2001
+From 3fe8271448da39f64966d90116ff1675fc266188 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4823ccdbbd887bb84339a4d35febd92292d07b97 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 10196cae94..d9585a7404 100644
+index c17a074f59..8268590778 100644
@@ -28 +29 @@
-@@ -70,4 +70,5 @@ enum axgbe_sfp_cable {
+@@ -69,4 +69,5 @@ enum axgbe_sfp_cable {
@@ -34 +35 @@
-@@ -617,14 +618,16 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
+@@ -616,14 +617,16 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)


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

* patch 'net/axgbe: check only minimum speed for cables' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (21 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: fix connection for SFP+ active " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: fix Tx flow on 30H HW' " Kevin Traynor
                   ` (111 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1f85d756aa324f2064bfc09f85ba1a5d6add52b9

Thanks.

Kevin

---
From 1f85d756aa324f2064bfc09f85ba1a5d6add52b9 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:42 +0530
Subject: [PATCH] net/axgbe: check only minimum speed for cables

[ upstream commit b5587a39dc94ee0bd055b515cc8c060923ed69b9 ]

There are cables that exist that can support speeds in excess of 10GbE.
The driver, however, restricts the EEPROM advertised nominal bitrate to
a specific range, which can prevent usage of cables that can support,
for example, up to 25GbE.

Rather than checking that an active or passive cable supports a specific
range, only check for a minimum supported speed.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 8268590778..60a1bc5d7b 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -117,7 +117,5 @@ enum axgbe_sfp_speed {
 #define AXGBE_SFP_BASE_BR			12
 #define AXGBE_SFP_BASE_BR_1GBE_MIN		0x0a
-#define AXGBE_SFP_BASE_BR_1GBE_MAX		0x0d
 #define AXGBE_SFP_BASE_BR_10GBE_MIN		0x64
-#define AXGBE_SFP_BASE_BR_10GBE_MAX		0x68
 
 #define AXGBE_SFP_BASE_CU_CABLE_LEN		18
@@ -536,5 +534,5 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
 				   enum axgbe_sfp_speed sfp_speed)
 {
-	u8 *sfp_base, min, max;
+	u8 *sfp_base, min;
 
 	sfp_base = sfp_eeprom->base;
@@ -543,9 +541,7 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
 	case AXGBE_SFP_SPEED_1000:
 		min = AXGBE_SFP_BASE_BR_1GBE_MIN;
-		max = AXGBE_SFP_BASE_BR_1GBE_MAX;
 		break;
 	case AXGBE_SFP_SPEED_10000:
 		min = AXGBE_SFP_BASE_BR_10GBE_MIN;
-		max = AXGBE_SFP_BASE_BR_10GBE_MAX;
 		break;
 	default:
@@ -553,6 +549,5 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
 	}
 
-	return ((sfp_base[AXGBE_SFP_BASE_BR] >= min) &&
-		(sfp_base[AXGBE_SFP_BASE_BR] <= max));
+	return sfp_base[AXGBE_SFP_BASE_BR] >= min;
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.705193486 +0100
+++ 0024-net-axgbe-check-only-minimum-speed-for-cables.patch	2024-08-23 17:18:09.643429836 +0100
@@ -1 +1 @@
-From b5587a39dc94ee0bd055b515cc8c060923ed69b9 Mon Sep 17 00:00:00 2001
+From 1f85d756aa324f2064bfc09f85ba1a5d6add52b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b5587a39dc94ee0bd055b515cc8c060923ed69b9 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d9585a7404..b6a2a084aa 100644
+index 8268590778..60a1bc5d7b 100644
@@ -27 +28 @@
-@@ -118,7 +118,5 @@ enum axgbe_sfp_speed {
+@@ -117,7 +117,5 @@ enum axgbe_sfp_speed {
@@ -35 +36 @@
-@@ -537,5 +535,5 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
+@@ -536,5 +534,5 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
@@ -42 +43 @@
-@@ -544,9 +542,7 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
+@@ -543,9 +541,7 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
@@ -52 +53 @@
-@@ -554,6 +550,5 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
+@@ -553,6 +549,5 @@ static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,


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

* patch 'net/axgbe: fix Tx flow on 30H HW' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (22 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: check only minimum speed for " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: delay AN timeout during KR training' " Kevin Traynor
                   ` (110 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d1680634441f44f566d5266f9be5ec7182cb4f37

Thanks.

Kevin

---
From d1680634441f44f566d5266f9be5ec7182cb4f37 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:43 +0530
Subject: [PATCH] net/axgbe: fix Tx flow on 30H HW

[ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ]

There is difference in the TX Flow Control registers (TFCR) between the
revisions of the hardware. The older revisions of hardware used to have
single register per queue. Whereas, the newer revision of hardware (from
ver 30H onwards) have one register per priority.

Without the fix the user will face problem in TX operation on new 30H HW

Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_dev.c | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 9b0073eea6..5233633a53 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -270,9 +270,19 @@ static int axgbe_set_speed(struct axgbe_port *pdata, int speed)
 }
 
+static unsigned int axgbe_get_fc_queue_count(struct axgbe_port *pdata)
+{
+	unsigned int max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
+
+	/* From MAC ver 30H the TFCR is per priority, instead of per queue */
+	if (AXGMAC_GET_BITS(pdata->hw_feat.version, MAC_VR, SNPSVER) >= 0x30)
+		return max_q_count;
+	else
+		return (RTE_MIN(pdata->tx_q_count, max_q_count));
+}
+
 static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata)
 {
-	unsigned int max_q_count, q_count;
 	unsigned int reg, reg_val;
-	unsigned int i;
+	unsigned int i, q_count;
 
 	/* Clear MTL flow control */
@@ -281,7 +291,5 @@ static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata)
 
 	/* Clear MAC flow control */
-	max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
-	q_count = RTE_MIN(pdata->tx_q_count,
-			max_q_count);
+	q_count = axgbe_get_fc_queue_count(pdata);
 	reg = MAC_Q0TFCR;
 	for (i = 0; i < q_count; i++) {
@@ -298,7 +306,6 @@ static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata)
 static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
 {
-	unsigned int max_q_count, q_count;
 	unsigned int reg, reg_val;
-	unsigned int i;
+	unsigned int i, q_count;
 
 	/* Set MTL flow control */
@@ -317,7 +324,5 @@ static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
 
 	/* Set MAC flow control */
-	max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
-	q_count = RTE_MIN(pdata->tx_q_count,
-			max_q_count);
+	q_count = axgbe_get_fc_queue_count(pdata);
 	reg = MAC_Q0TFCR;
 	for (i = 0; i < q_count; i++) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.731997936 +0100
+++ 0025-net-axgbe-fix-Tx-flow-on-30H-HW.patch	2024-08-23 17:18:09.644429840 +0100
@@ -1 +1 @@
-From b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 Mon Sep 17 00:00:00 2001
+From d1680634441f44f566d5266f9be5ec7182cb4f37 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/axgbe: delay AN timeout during KR training' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (23 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: fix Tx flow on 30H HW' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/axgbe: fix linkup in PHY status' " Kevin Traynor
                   ` (109 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/63539e77be9aef61f4aa01cf74dda54f75067281

Thanks.

Kevin

---
From 63539e77be9aef61f4aa01cf74dda54f75067281 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:44 +0530
Subject: [PATCH] net/axgbe: delay AN timeout during KR training

[ upstream commit 323e8c91a7c434915920fe8668ca5664b65ea198 ]

AN restart triggered during KR training not only aborts the KR training
process but also move the HW to unstable state. Driver has to wait up to
500ms or until the KR training is completed before restarting AN cycle.

Without the fix the user will face KR training failure issues.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.h |  2 ++
 drivers/net/axgbe/axgbe_mdio.c   | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index e06d40f9eb..54cad56b21 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -112,4 +112,5 @@
 #define AXGBE_AN_MS_TIMEOUT		500
 #define AXGBE_LINK_TIMEOUT		5
+#define AXGBE_KR_TRAINING_WAIT_ITER	50
 
 #define AXGBE_SGMII_AN_LINK_STATUS	BIT(1)
@@ -653,4 +654,5 @@ struct axgbe_port {
 	unsigned int fec_ability;
 	unsigned long an_start;
+	unsigned long kr_start_time;
 	enum axgbe_an_mode an_mode;
 
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index 523b6c0f07..e573ecc4d9 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -384,4 +384,5 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,
 		if (pdata->phy_if.phy_impl.kr_training_pre)
 			pdata->phy_if.phy_impl.kr_training_pre(pdata);
+	pdata->kr_start_time = rte_get_timer_cycles();
 
 		reg |= AXGBE_KR_TRAINING_START;
@@ -520,4 +521,5 @@ static enum axgbe_an axgbe_an73_incompat_link(struct axgbe_port *pdata)
 	axgbe_an_disable(pdata);
 	axgbe_switch_mode(pdata);
+	pdata->an_result = AXGBE_AN_READY;
 	axgbe_an_restart(pdata);
 
@@ -1000,4 +1002,6 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
 	unsigned long link_timeout;
 	unsigned long ticks;
+	unsigned long kr_time;
+	int wait;
 
 	link_timeout = pdata->link_check + (AXGBE_LINK_TIMEOUT *
@@ -1005,4 +1009,25 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
 	ticks = rte_get_timer_cycles();
 	if (time_after(ticks, link_timeout)) {
+		if ((axgbe_cur_mode(pdata) == AXGBE_MODE_KR) &&
+		    pdata->phy.autoneg == AUTONEG_ENABLE) {
+			/* AN restart should not happen while KR training is in progress.
+			 * The while loop ensures no AN restart during KR training,
+			 * waits up to 500ms and AN restart is triggered only if KR
+			 * training is failed.
+			 */
+			wait = AXGBE_KR_TRAINING_WAIT_ITER;
+			while (wait--) {
+				kr_time = pdata->kr_start_time +
+					  msecs_to_timer_cycles(AXGBE_AN_MS_TIMEOUT);
+				ticks = rte_get_timer_cycles();
+				if (time_after(ticks, kr_time))
+					break;
+				/* AN restart is not required, if AN result is COMPLETE */
+				if (pdata->an_result == AXGBE_AN_COMPLETE)
+					return;
+				rte_delay_us(10500);
+			}
+		}
+
 		PMD_DRV_LOG(NOTICE, "AN link timeout\n");
 		axgbe_phy_config_aneg(pdata);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.757776868 +0100
+++ 0026-net-axgbe-delay-AN-timeout-during-KR-training.patch	2024-08-23 17:18:09.645429843 +0100
@@ -1 +1 @@
-From 323e8c91a7c434915920fe8668ca5664b65ea198 Mon Sep 17 00:00:00 2001
+From 63539e77be9aef61f4aa01cf74dda54f75067281 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 323e8c91a7c434915920fe8668ca5664b65ea198 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f122dfd516..d1fac667c2 100644
+index e06d40f9eb..54cad56b21 100644
@@ -32 +33 @@
-@@ -662,4 +663,5 @@ struct axgbe_port {
+@@ -653,4 +654,5 @@ struct axgbe_port {
@@ -39 +40 @@
-index b03bc471cb..e1a737cf62 100644
+index 523b6c0f07..e573ecc4d9 100644
@@ -42,3 +43,3 @@
-@@ -358,4 +358,5 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,
- 	reg |= AXGBE_KR_TRAINING_START;
- 	XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
+@@ -384,4 +384,5 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,
+ 		if (pdata->phy_if.phy_impl.kr_training_pre)
+ 			pdata->phy_if.phy_impl.kr_training_pre(pdata);
@@ -47,2 +48,2 @@
- 	PMD_DRV_LOG(DEBUG, "KR training initiated\n");
-@@ -488,4 +489,5 @@ static enum axgbe_an axgbe_an73_incompat_link(struct axgbe_port *pdata)
+ 		reg |= AXGBE_KR_TRAINING_START;
+@@ -520,4 +521,5 @@ static enum axgbe_an axgbe_an73_incompat_link(struct axgbe_port *pdata)
@@ -54 +55 @@
-@@ -968,4 +970,6 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
+@@ -1000,4 +1002,6 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
@@ -61 +62 @@
-@@ -973,4 +977,25 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
+@@ -1005,4 +1009,25 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)


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

* patch 'net/axgbe: fix linkup in PHY status' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (24 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: delay AN timeout during KR training' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/ice: fix check for outer UDP checksum offload' " Kevin Traynor
                   ` (108 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c2baa4b8da3005ad18a1ec2e4c1267c5f399b111

Thanks.

Kevin

---
From c2baa4b8da3005ad18a1ec2e4c1267c5f399b111 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:45 +0530
Subject: [PATCH] net/axgbe: fix linkup in PHY status

[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]

In the event of a change in axgbe mode, the current auto-negotiation
needs to be reset and the AN cycle needs to be re-triggered. However,
the current code ignores the return value of axgbe_set_mode(), leading
to false information as the link is declared without checking the status
register.

Fix this by propagating the mode switch status information to
axgbe_phy_status().

Fixes: 102b6ec3d5c3 ("net/axgbe: support auto-negotiation for 1Gbps")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_mdio.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index e573ecc4d9..ce449f3ed6 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -236,11 +236,12 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
 }
 
-static void axgbe_set_mode(struct axgbe_port *pdata,
+static bool axgbe_set_mode(struct axgbe_port *pdata,
 			   enum axgbe_mode mode)
 {
 	if (mode == axgbe_cur_mode(pdata))
-		return;
+		return false;
 
 	axgbe_change_mode(pdata, mode);
+	return true;
 }
 
@@ -1040,5 +1041,5 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
 }
 
-static void axgbe_phy_status_result(struct axgbe_port *pdata)
+static bool axgbe_phy_status_result(struct axgbe_port *pdata)
 {
 	enum axgbe_mode mode;
@@ -1074,5 +1075,8 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
 	pdata->phy.duplex = DUPLEX_FULL;
 
-	axgbe_set_mode(pdata, mode);
+	if (axgbe_set_mode(pdata, mode))
+		return true;
+	else
+		return false;
 }
 
@@ -1141,5 +1145,8 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
 			}
 		}
-		axgbe_phy_status_result(pdata);
+
+		if (axgbe_phy_status_result(pdata))
+			return;
+
 		if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state))
 			rte_bit_relaxed_clear32(AXGBE_LINK_INIT,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.785123035 +0100
+++ 0027-net-axgbe-fix-linkup-in-PHY-status.patch	2024-08-23 17:18:09.646429847 +0100
@@ -1 +1 @@
-From 50362d0e1f386563a026b314bd0a7eedcd188910 Mon Sep 17 00:00:00 2001
+From c2baa4b8da3005ad18a1ec2e4c1267c5f399b111 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index e1a737cf62..d95a52659e 100644
+index e573ecc4d9..ce449f3ed6 100644
@@ -28 +29 @@
-@@ -201,11 +201,12 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
+@@ -236,11 +236,12 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
@@ -43 +44 @@
-@@ -1008,5 +1009,5 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
+@@ -1040,5 +1041,5 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
@@ -50 +51 @@
-@@ -1042,5 +1043,8 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
+@@ -1074,5 +1075,8 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
@@ -60 +61 @@
-@@ -1109,5 +1113,8 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
+@@ -1141,5 +1145,8 @@ static void axgbe_phy_status(struct axgbe_port *pdata)


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

* patch 'net/ice: fix check for outer UDP checksum offload' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (25 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/axgbe: fix linkup in PHY status' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'app/testpmd: fix outer IP " Kevin Traynor
                   ` (107 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: David Marchand
  Cc: Bruce Richardson, Morten Brørup, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c5411472c3afc51d5f4be06301bc9a180281b3f0

Thanks.

Kevin

---
From c5411472c3afc51d5f4be06301bc9a180281b3f0 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:15 +0200
Subject: [PATCH] net/ice: fix check for outer UDP checksum offload
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit f4eb07f031c4a6a0055f3b2773e031cd8000206e ]

ICE_TX_CTX_EIPT_NONE == 0.
There is a good chance that !(anything & 0) is true :-).

While removing this noop check is doable, let's check that the
descriptor does contain a outer ip type.

Fixes: 2ed011776334 ("net/ice: fix outer UDP Tx checksum offload")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 drivers/net/ice/ice_rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 7578bac03e..9995561fe3 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2548,7 +2548,7 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
 	 */
-	if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
-		(*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
-		(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
+	if ((*cd_tunneling & ICE_TXD_CTX_QW0_EIPT_M) &&
+			(*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
+			(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
 		*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.810882931 +0100
+++ 0028-net-ice-fix-check-for-outer-UDP-checksum-offload.patch	2024-08-23 17:18:09.649429857 +0100
@@ -1 +1 @@
-From f4eb07f031c4a6a0055f3b2773e031cd8000206e Mon Sep 17 00:00:00 2001
+From c5411472c3afc51d5f4be06301bc9a180281b3f0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit f4eb07f031c4a6a0055f3b2773e031cd8000206e ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 95a2db3432..10babab231 100644
+index 7578bac03e..9995561fe3 100644
@@ -30 +31 @@
-@@ -2752,7 +2752,7 @@ ice_parse_tunneling_params(uint64_t ol_flags,
+@@ -2548,7 +2548,7 @@ ice_parse_tunneling_params(uint64_t ol_flags,


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

* patch 'app/testpmd: fix outer IP checksum offload' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (26 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/ice: fix check for outer UDP checksum offload' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " Kevin Traynor
                   ` (106 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ce87e585c5c8da834f48cf3bca758b29b0f1a1b1

Thanks.

Kevin

---
From ce87e585c5c8da834f48cf3bca758b29b0f1a1b1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:17 +0200
Subject: [PATCH] app/testpmd: fix outer IP checksum offload

[ upstream commit b9d859d8a671ec4516face2eba24434b955a9ac1 ]

Resetting the outer IP checksum to 0 is not something mandated by the
mbuf API and is done by rte_eth_tx_prepare(), or per driver if needed.

Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test-pmd/csumonly.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 5e494c4129..b314b15e0c 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -563,13 +563,15 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 
 	if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
-		ipv4_hdr->hdr_checksum = 0;
 		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV4;
 
-		if (tx_offloads	& RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)
+		if (tx_offloads	& RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) {
 			ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;
-		else
+		} else {
+			ipv4_hdr->hdr_checksum = 0;
 			ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
-	} else
+		}
+	} else {
 		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;
+	}
 
 	if (info->outer_l4_proto != IPPROTO_UDP)
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.836070522 +0100
+++ 0029-app-testpmd-fix-outer-IP-checksum-offload.patch	2024-08-23 17:18:09.649429857 +0100
@@ -1 +1 @@
-From b9d859d8a671ec4516face2eba24434b955a9ac1 Mon Sep 17 00:00:00 2001
+From ce87e585c5c8da834f48cf3bca758b29b0f1a1b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9d859d8a671ec4516face2eba24434b955a9ac1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6711dda42e..f5125c2788 100644
+index 5e494c4129..b314b15e0c 100644
@@ -23 +24 @@
-@@ -584,13 +584,15 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
+@@ -563,13 +563,15 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,


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

* patch 'net/i40e: fix outer UDP checksum offload for X710' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (27 preceding siblings ...)
  2024-08-23 16:17 ` patch 'app/testpmd: fix outer IP " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'app/testpmd: fix lcore ID restriction' " Kevin Traynor
                   ` (105 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: David Marchand; +Cc: Jun Wang, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d6ec78819d65c1f8f54c8a891f123c6df439d249

Thanks.

Kevin

---
From d6ec78819d65c1f8f54c8a891f123c6df439d249 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:19 +0200
Subject: [PATCH] net/i40e: fix outer UDP checksum offload for X710

[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]

According to the X710 datasheet (and confirmed on the field..), X710
devices do not support outer checksum offload.

"""
8.4.4.2 Transmit L3 and L4 Integrity Offload

Tunneling UDP headers and GRE header are not offloaded while the
X710/XXV710/XL710 leaves their checksum field as is.
If a checksum is required, software should provide it as well as the inner
checksum value(s) that are required for the outer checksum.
"""

Fix Tx offload capabilities according to the hardware.

X722 may support such offload by setting I40E_TXD_CTX_QW0_L4T_CS_MASK.

Bugzilla ID: 1406
Fixes: 8cc79a1636cd ("net/i40e: fix forward outer IPv6 VXLAN")

Reported-by: Jun Wang <junwang01@cestc.cn>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 .mailmap                       | 1 +
 drivers/net/i40e/i40e_ethdev.c | 6 +++++-
 drivers/net/i40e/i40e_rxtx.c   | 9 +++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 434b0b53b7..7d18ead520 100644
--- a/.mailmap
+++ b/.mailmap
@@ -686,4 +686,5 @@ Jun Qiu <jun.qiu@jaguarmicro.com>
 Jun W Zhou <junx.w.zhou@intel.com>
 Junxiao Shi <git@mail1.yoursunny.com>
+Jun Wang <junwang01@cestc.cn>
 Jun Yang <jun.yang@nxp.com>
 Junyu Jiang <junyux.jiang@intel.com>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d829467f41..8571d1419d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3758,6 +3758,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
 		dev_info->tx_queue_offload_capa;
+	if (hw->mac.type == I40E_MAC_X722) {
+		dev_info->tx_offload_capa |=
+			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+	}
+
 	dev_info->dev_capa =
 		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 8a277dfe31..20215a8e1e 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -296,4 +296,13 @@ i40e_parse_tunneling_params(uint64_t ol_flags,
 	*cd_tunneling |= (tx_offload.l2_len >> 1) <<
 		I40E_TXD_CTX_QW0_NATLEN_SHIFT;
+
+	/**
+	 * Calculate the tunneling UDP checksum (only supported with X722).
+	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
+	 */
+	if ((*cd_tunneling & I40E_TXD_CTX_QW0_EXT_IP_MASK) &&
+			(*cd_tunneling & I40E_TXD_CTX_UDP_TUNNELING) &&
+			(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
+		*cd_tunneling |= I40E_TXD_CTX_QW0_L4T_CS_MASK;
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.859137123 +0100
+++ 0030-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch	2024-08-23 17:18:09.661429899 +0100
@@ -1 +1 @@
-From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001
+From d6ec78819d65c1f8f54c8a891f123c6df439d249 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index cb8d65bf0e..1aca379558 100644
+index 434b0b53b7..7d18ead520 100644
@@ -39 +40 @@
-@@ -721,4 +721,5 @@ Jun Qiu <jun.qiu@jaguarmicro.com>
+@@ -686,4 +686,5 @@ Jun Qiu <jun.qiu@jaguarmicro.com>
@@ -46 +47 @@
-index 801cc95607..c38515a758 100644
+index d829467f41..8571d1419d 100644
@@ -49 +50 @@
-@@ -3863,6 +3863,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3758,6 +3758,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -62 +63 @@
-index 155f24377b..dc466ae371 100644
+index 8a277dfe31..20215a8e1e 100644


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

* patch 'app/testpmd: fix lcore ID restriction' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (28 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'hash: fix return code description in Doxygen' " Kevin Traynor
                   ` (104 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Sivaprasad Tummala; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8e20d5d780b4668876035fcf2c8e0c338467a631

Thanks.

Kevin

---
From 8e20d5d780b4668876035fcf2c8e0c338467a631 Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Thu, 6 Jun 2024 11:27:46 +0000
Subject: [PATCH] app/testpmd: fix lcore ID restriction

[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]

With modern CPUs, it is possible to have higher
CPU count thus we can have higher RTE_MAX_LCORES.
In testpmd application, the current config forwarding
cores option "--nb-cores" is hard limited to 255.

The patch fixes this constraint and also adjusts the lcore
data structure to 32-bit to align with rte lcore APIs.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/config.c     | 4 ++--
 app/test-pmd/parameters.c | 4 ++--
 app/test-pmd/testpmd.h    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cb576732d2..3afa65036c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3145,7 +3145,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
 			printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n",
 			       share_group, share_rxq);
-			printf("  lcore %hhu Port %hu queue %hu\n",
+			printf("  lcore %u Port %hu queue %hu\n",
 			       src_lc, src_port, src_rxq);
-			printf("  lcore %hhu Port %hu queue %hu\n",
+			printf("  lcore %u Port %hu queue %hu\n",
 			       lc_id, fs->rx_port, fs->rx_queue);
 			printf("Please use --nb-cores=%hu to limit number of forwarding cores\n",
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a6a4bf80f3..411c07c0ea 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -870,6 +870,6 @@ launch_args_parse(int argc, char** argv)
 			if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
 				n = atoi(optarg);
-				if (n > 0 && n <= nb_lcores)
-					nb_fwd_lcores = (uint8_t) n;
+				if (n > 0 && (lcoreid_t)n <= nb_lcores)
+					nb_fwd_lcores = (lcoreid_t) n;
 				else
 					rte_exit(EXIT_FAILURE,
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index e53320e630..41befcce21 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -77,5 +77,5 @@ extern uint8_t cl_quit;
 #define MIN_TOTAL_NUM_MBUFS 1024
 
-typedef uint8_t  lcoreid_t;
+typedef uint32_t lcoreid_t;
 typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.891695476 +0100
+++ 0031-app-testpmd-fix-lcore-ID-restriction.patch	2024-08-23 17:18:09.666429917 +0100
@@ -1 +1 @@
-From 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 Mon Sep 17 00:00:00 2001
+From 8e20d5d780b4668876035fcf2c8e0c338467a631 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f62ba90c87..66c3a68c1d 100644
+index cb576732d2..3afa65036c 100644
@@ -29 +30 @@
-@@ -4783,7 +4783,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
+@@ -3145,7 +3145,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
@@ -40 +41 @@
-index c13f7564bf..22364e09ab 100644
+index a6a4bf80f3..411c07c0ea 100644
@@ -43,9 +44,9 @@
-@@ -1072,6 +1072,6 @@ launch_args_parse(int argc, char** argv)
- 		case TESTPMD_OPT_NB_CORES_NUM:
- 			n = atoi(optarg);
--			if (n > 0 && n <= nb_lcores)
--				nb_fwd_lcores = (uint8_t) n;
-+			if (n > 0 && (lcoreid_t)n <= nb_lcores)
-+				nb_fwd_lcores = (lcoreid_t) n;
- 			else
- 				rte_exit(EXIT_FAILURE,
+@@ -870,6 +870,6 @@ launch_args_parse(int argc, char** argv)
+ 			if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
+ 				n = atoi(optarg);
+-				if (n > 0 && n <= nb_lcores)
+-					nb_fwd_lcores = (uint8_t) n;
++				if (n > 0 && (lcoreid_t)n <= nb_lcores)
++					nb_fwd_lcores = (lcoreid_t) n;
+ 				else
+ 					rte_exit(EXIT_FAILURE,
@@ -53 +54 @@
-index 0afae7d771..9facd7f281 100644
+index e53320e630..41befcce21 100644
@@ -56,2 +57,2 @@
-@@ -85,5 +85,5 @@ extern volatile uint8_t f_quit;
- #define MAX_MEMPOOL 8
+@@ -77,5 +77,5 @@ extern uint8_t cl_quit;
+ #define MIN_TOTAL_NUM_MBUFS 1024


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

* patch 'hash: fix return code description in Doxygen' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (29 preceding siblings ...)
  2024-08-23 16:17 ` patch 'app/testpmd: fix lcore ID restriction' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'hash: check name when creating a hash' " Kevin Traynor
                   ` (103 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Chenming Chang; +Cc: Stephen Hemminger, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bb01e07f1d44e81f43e38f0f7023cc03d4032fb1

Thanks.

Kevin

---
From bb01e07f1d44e81f43e38f0f7023cc03d4032fb1 Mon Sep 17 00:00:00 2001
From: Chenming Chang <ccm@ccm.ink>
Date: Mon, 27 Jun 2022 21:11:21 +0800
Subject: [PATCH] hash: fix return code description in Doxygen

[ upstream commit 78a632e6b52c29c5f297001181e870750eee02a7 ]

The rte_hash lookup can return ZERO which is not a positive value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chenming Chang <ccm@ccm.ink>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 .mailmap            |  1 +
 lib/hash/rte_hash.h | 16 ++++++++--------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/.mailmap b/.mailmap
index 7d18ead520..ed9ed73919 100644
--- a/.mailmap
+++ b/.mailmap
@@ -213,4 +213,5 @@ Cheng Peng <cheng.peng5@zte.com.cn>
 Chengwen Feng <fengchengwen@huawei.com>
 Chenmin Sun <chenmin.sun@intel.com>
+Chenming Chang <ccm@ccm.ink>
 Chenxu Di <chenxux.di@intel.com>
 Cheryl Houser <chouser@vmware.com>
diff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h
index 6067aad954..28bfa06840 100644
--- a/lib/hash/rte_hash.h
+++ b/lib/hash/rte_hash.h
@@ -287,5 +287,5 @@ rte_hash_add_key_with_hash_data(const struct rte_hash *h, const void *key,
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOSPC if there is no space in the hash for this key.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key. This
  *     unique key id may be larger than the user specified entry count
@@ -311,5 +311,5 @@ rte_hash_add_key(const struct rte_hash *h, const void *key);
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOSPC if there is no space in the hash for this key.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key. This
  *     unique key ID may be larger than the user specified entry count
@@ -342,5 +342,5 @@ rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
@@ -374,5 +374,5 @@ rte_hash_del_key(const struct rte_hash *h, const void *key);
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
@@ -441,5 +441,5 @@ rte_hash_free_key_with_position(const struct rte_hash *h,
  *   Output with pointer to data returned from the hash table.
  * @return
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
@@ -466,5 +466,5 @@ rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data);
  *   Output with pointer to data returned from the hash table.
  * @return
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
@@ -489,5 +489,5 @@ rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key,
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
@@ -511,5 +511,5 @@ rte_hash_lookup(const struct rte_hash *h, const void *key);
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.920022642 +0100
+++ 0032-hash-fix-return-code-description-in-Doxygen.patch	2024-08-23 17:18:09.667429920 +0100
@@ -1 +1 @@
-From 78a632e6b52c29c5f297001181e870750eee02a7 Mon Sep 17 00:00:00 2001
+From bb01e07f1d44e81f43e38f0f7023cc03d4032fb1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78a632e6b52c29c5f297001181e870750eee02a7 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1aca379558..111dbb0ac3 100644
+index 7d18ead520..ed9ed73919 100644
@@ -23 +24 @@
-@@ -229,4 +229,5 @@ Cheng Peng <cheng.peng5@zte.com.cn>
+@@ -213,4 +213,5 @@ Cheng Peng <cheng.peng5@zte.com.cn>
@@ -28 +29 @@
- Chenyu Huang <chenyux.huang@intel.com>
+ Cheryl Houser <chouser@vmware.com>
@@ -30 +31 @@
-index 7ecc021111..ba96521529 100644
+index 6067aad954..28bfa06840 100644


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

* patch 'hash: check name when creating a hash' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (30 preceding siblings ...)
  2024-08-23 16:17 ` patch 'hash: fix return code description in Doxygen' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'vhost: fix build with GCC 13' " Kevin Traynor
                   ` (102 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Conor Fogarty; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8a77d04eb381a3096611f750700c776b6df88b18

Thanks.

Kevin

---
From 8a77d04eb381a3096611f750700c776b6df88b18 Mon Sep 17 00:00:00 2001
From: Conor Fogarty <conor.fogarty@intel.com>
Date: Thu, 6 Jul 2023 16:26:26 +0100
Subject: [PATCH] hash: check name when creating a hash

[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]

Add NULL pointer check to params->name, which is later
copied into the hash datastructure. Without this check
the code segfaults on the strlcpy() of a NULL pointer.

Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")

Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 95c3e6c2f4..abe44cf677 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -173,4 +173,5 @@ rte_hash_create(const struct rte_hash_parameters *params)
 	if ((params->entries > RTE_HASH_ENTRIES_MAX) ||
 			(params->entries < RTE_HASH_BUCKET_ENTRIES) ||
+			(params->name == NULL) ||
 			(params->key_len == 0)) {
 		rte_errno = EINVAL;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.944432841 +0100
+++ 0033-hash-check-name-when-creating-a-hash.patch	2024-08-23 17:18:09.668429924 +0100
@@ -1 +1 @@
-From 8f36e53317ecf8384461e4f692e46beaaf6c4d2f Mon Sep 17 00:00:00 2001
+From 8a77d04eb381a3096611f750700c776b6df88b18 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b31a3d973e..16c9c4c5c4 100644
+index 95c3e6c2f4..abe44cf677 100644
@@ -23 +24 @@
-@@ -174,4 +174,5 @@ rte_hash_create(const struct rte_hash_parameters *params)
+@@ -173,4 +173,5 @@ rte_hash_create(const struct rte_hash_parameters *params)


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

* patch 'vhost: fix build with GCC 13' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (31 preceding siblings ...)
  2024-08-23 16:17 ` patch 'hash: check name when creating a hash' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'vhost: cleanup resubmit info before inflight setup' " Kevin Traynor
                   ` (101 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Luca Vizzarro
  Cc: Paul Szczepanek, Nick Connolly, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2f6234f1d916d6244a26249c929b5aee0b136751

Thanks.

Kevin

---
From 2f6234f1d916d6244a26249c929b5aee0b136751 Mon Sep 17 00:00:00 2001
From: Luca Vizzarro <luca.vizzarro@arm.com>
Date: Wed, 10 Apr 2024 16:21:01 +0100
Subject: [PATCH] vhost: fix build with GCC 13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 ]

This patch resolves a build error with GCC 13 and arm/aarch32 as
targets:

In function ‘mbuf_to_desc’,
    inlined from ‘vhost_enqueue_async_packed’ at
      ../lib/vhost/virtio_net.c:1828:6,
    inlined from ‘virtio_dev_rx_async_packed’ at
      ../lib/vhost/virtio_net.c:1842:6,
    inlined from ‘virtio_dev_rx_async_submit_packed’ at
      ../lib/vhost/virtio_net.c:1900:7:
../lib/vhost/virtio_net.c:1159:18: error: ‘buf_vec[0].buf_addr’ may
    be used uninitialized [-Werror=maybe-uninitialized]
 1159 |         buf_addr = buf_vec[vec_idx].buf_addr;
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
<snip>
../lib/vhost/virtio_net.c:1160:18: error: ‘buf_vec[0].buf_iova’ may
    be used uninitialized [-Werror=maybe-uninitialized]
 1160 |         buf_iova = buf_vec[vec_idx].buf_iova;
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
<snip>
../lib/vhost/virtio_net.c:1161:35: error: ‘buf_vec[0].buf_len’ may
    be used uninitialized [-Werror=maybe-uninitialized]
 1161 |         buf_len = buf_vec[vec_idx].buf_len;
      |                   ~~~~~~~~~~~~~~~~^~~~~~~~

GCC complains about the possible runtime path where the while loop
which fills buf_vec (in vhost_enqueue_async_packed) is not run. As a
consequence it correctly thinks that buf_vec is not initialized while
being accessed anyways.

This scenario is actually very unlikely as the only way this can occur
is if size has overflowed to 0. Meaning that the total packet length
would be close to UINT64_MAX (or actually UINT32_MAX). At first glance,
the code suggests that this may never happen as the type of size has
been changed to 64-bit. For a 32-bit architecture such as arm
(e.g. armv7-a) and aarch32, this still happens because the operand types
(pkt->pkt_len and sizeof) are 32-bit wide, performing 32-bit arithmetic
first (where the overflow can happen) and widening to 64-bit later.

The proposed fix simply guarantees to the compiler that the scope which
fills buf_vec is accessed at least once, while not disrupting the actual
logic. This is based on the assumption that size will always be greater
than 0, as suggested by the sizeof, and the packet length will never be
as big as UINT32_MAX, and causing an overflow.

Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath")

Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>
Reviewed-by: Nick Connolly <nick.connolly@arm.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 .mailmap               | 2 +-
 lib/vhost/virtio_net.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index ed9ed73919..41d1bdb972 100644
--- a/.mailmap
+++ b/.mailmap
@@ -985,5 +985,5 @@ Netanel Belgazal <netanel@amazon.com>
 Netanel Gonen <netanelg@mellanox.com>
 Niall Power <niall.power@intel.com>
-Nick Connolly <nick.connolly@mayadata.io>
+Nick Connolly <nick.connolly@arm.com> <nick.connolly@mayadata.io>
 Nick Nunley <nicholas.d.nunley@intel.com>
 Niclas Storm <niclas.storm@ericsson.com>
diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index fa0779d03d..9f74a3c997 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1592,5 +1592,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
 		max_tries = 1;
 
-	while (size > 0) {
+	do {
 		/*
 		 * if we tried all available ring items, and still
@@ -1619,5 +1619,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
 		if (avail_idx >= vq->size)
 			avail_idx -= vq->size;
-	}
+	} while (size > 0);
 
 	if (unlikely(mbuf_to_desc(dev, vq, pkt, buf_vec, nr_vec, *nr_buffers, true) < 0))
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.968779446 +0100
+++ 0034-vhost-fix-build-with-GCC-13.patch	2024-08-23 17:18:09.671429934 +0100
@@ -1 +1 @@
-From 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 Mon Sep 17 00:00:00 2001
+From 2f6234f1d916d6244a26249c929b5aee0b136751 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 ]
+
@@ -55 +56,0 @@
-Cc: stable@dpdk.org
@@ -67 +68 @@
-index 111dbb0ac3..ed63605a15 100644
+index ed9ed73919..41d1bdb972 100644
@@ -70 +71,2 @@
-@@ -1031,5 +1031,5 @@ Netanel Gonen <netanelg@mellanox.com>
+@@ -985,5 +985,5 @@ Netanel Belgazal <netanel@amazon.com>
+ Netanel Gonen <netanelg@mellanox.com>
@@ -72 +73,0 @@
- Nicholas Pratte <npratte@iol.unh.edu>
@@ -78 +79 @@
-index b406b5d7d9..370402d849 100644
+index fa0779d03d..9f74a3c997 100644
@@ -81 +82 @@
-@@ -1936,5 +1936,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
+@@ -1592,5 +1592,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
@@ -88 +89 @@
-@@ -1963,5 +1963,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
+@@ -1619,5 +1619,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,


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

* patch 'vhost: cleanup resubmit info before inflight setup' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (32 preceding siblings ...)
  2024-08-23 16:17 ` patch 'vhost: fix build with GCC 13' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/virtio: fix MAC table update' " Kevin Traynor
                   ` (100 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Haoqian He; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1a7bda79d140d77a097558cf29d63eda14c66f7f

Thanks.

Kevin

---
From 1a7bda79d140d77a097558cf29d63eda14c66f7f Mon Sep 17 00:00:00 2001
From: Haoqian He <haoqian.he@smartx.com>
Date: Fri, 26 Apr 2024 07:09:46 -0400
Subject: [PATCH] vhost: cleanup resubmit info before inflight setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]

This patch fixes a potential VM hang bug when the VM reboots after
vhost live recovery due to missing cleanup virtqueue resubmit info.

Specifically, if inflight IO that should be resubmitted during
the latest vhost reconnection has not been submitted yet while
VM rebooting, so GET_VRING_BASE would not wait for the inflight
IO, at this time the resubmit info has been.  When the VM restarts,
SET_VRING_KICK will resubmit the inflight IO (If resubmit info
is not null, function set_vring_kick will return without updating
resubmit info).

It’s an error, any stale inflight IO should not be resubmitted
after the VM restart.

The solution is to clean up virtqueue resubmit info when function
set_inflight_fd before function set_vring_kick.

Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")

Signed-off-by: Haoqian He <haoqian.he@smartx.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 .mailmap               | 1 +
 lib/vhost/vhost_user.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 41d1bdb972..7aaed03aab 100644
--- a/.mailmap
+++ b/.mailmap
@@ -472,4 +472,5 @@ Hanumanth Pothula <hpothula@marvell.com>
 Hao Chen <chenh@yusur.tech> <chenhao164@huawei.com>
 Hao Wu <hao.wu@intel.com>
+Haoqian He <haoqian.he@smartx.com>
 Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
 Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index af0062dd1f..ca0618f627 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1787,4 +1787,5 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,
 			continue;
 
+		cleanup_vq_inflight(dev, vq);
 		if (vq_is_packed(dev)) {
 			vq->inflight_packed = addr;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.997338861 +0100
+++ 0035-vhost-cleanup-resubmit-info-before-inflight-setup.patch	2024-08-23 17:18:09.674429945 +0100
@@ -1 +1 @@
-From e4a01eea66326c58593906e189b376605a0ec606 Mon Sep 17 00:00:00 2001
+From 1a7bda79d140d77a097558cf29d63eda14c66f7f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index ed63605a15..ff20619bfb 100644
+index 41d1bdb972..7aaed03aab 100644
@@ -40 +41 @@
-@@ -496,4 +496,5 @@ Hanumanth Pothula <hpothula@marvell.com>
+@@ -472,4 +472,5 @@ Hanumanth Pothula <hpothula@marvell.com>
@@ -47 +48 @@
-index 414192500e..7c54afc5fb 100644
+index af0062dd1f..ca0618f627 100644
@@ -50 +51 @@
-@@ -1872,4 +1872,5 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
+@@ -1787,4 +1787,5 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,


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

* patch 'net/virtio: fix MAC table update' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (33 preceding siblings ...)
  2024-08-23 16:17 ` patch 'vhost: cleanup resubmit info before inflight setup' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'event/sw: fix warning from useless snprintf' " Kevin Traynor
                   ` (99 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Satha Rao; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8863a119d089aabf270fe1953edff174b6e7f8fa

Thanks.

Kevin

---
From 8863a119d089aabf270fe1953edff174b6e7f8fa Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Thu, 30 May 2024 13:40:39 -0400
Subject: [PATCH] net/virtio: fix MAC table update

[ upstream commit 7698e655516c54558a43b8aaed1bff69928d96fb ]

Don't send NULL MAC addresses in MAC table update.

Fixes: 1b306359e58c ("virtio: suport multiple MAC addresses")

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index c6155e9ae5..ea7e712590 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1323,4 +1323,6 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 			= rte_is_multicast_ether_addr(addr) ? mc : uc;
 
+		if (rte_is_zero_ether_addr(addr))
+			break;
 		memcpy(&tbl->macs[tbl->entries++], addr, RTE_ETHER_ADDR_LEN);
 	}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.025710555 +0100
+++ 0036-net-virtio-fix-MAC-table-update.patch	2024-08-23 17:18:09.676429952 +0100
@@ -1 +1 @@
-From 7698e655516c54558a43b8aaed1bff69928d96fb Mon Sep 17 00:00:00 2001
+From 8863a119d089aabf270fe1953edff174b6e7f8fa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7698e655516c54558a43b8aaed1bff69928d96fb ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 517585740e..70d4839def 100644
+index c6155e9ae5..ea7e712590 100644
@@ -21 +22 @@
-@@ -914,4 +914,6 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
+@@ -1323,4 +1323,6 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,


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

* patch 'event/sw: fix warning from useless snprintf' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (34 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/virtio: fix MAC table update' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'eal: fix logs for '--lcores'' " Kevin Traynor
                   ` (98 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4722e89fcd6993d2de347b9145340efe776528c0

Thanks.

Kevin

---
From 4722e89fcd6993d2de347b9145340efe776528c0 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 23 Apr 2024 20:45:40 -0700
Subject: [PATCH] event/sw: fix warning from useless snprintf

[ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ]

With GCC-14, this warning is generated:
drivers/event/sw/sw_evdev.c:263:3: warning:
    snprintf' will always be truncated;
    specified size is 12, but format string expands to at least 13
        snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i);
        ^

Yet the whole printf to the buf is unnecessary. The type string argument
has never been implemented, and should just be NULL.  Removing the
unnecessary snprintf, then means IQ_ROB_NAMESIZE can be removed.

Fixes: 5ffb2f142d95 ("event/sw: support event queues")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 drivers/event/sw/iq_chunk.h | 2 --
 drivers/event/sw/sw_evdev.c | 5 +----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/event/sw/iq_chunk.h b/drivers/event/sw/iq_chunk.h
index 31d013eab7..7820815c38 100644
--- a/drivers/event/sw/iq_chunk.h
+++ b/drivers/event/sw/iq_chunk.h
@@ -10,6 +10,4 @@
 #include <rte_eventdev.h>
 
-#define IQ_ROB_NAMESIZE 12
-
 struct sw_queue_chunk {
 	struct rte_event events[SW_EVS_PER_Q_CHUNK];
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index e43bf250d6..d1fd0eeb4f 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -230,7 +230,5 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
 {
 	unsigned int i;
-	int dev_id = sw->data->dev_id;
 	int socket_id = sw->data->socket_id;
-	char buf[IQ_ROB_NAMESIZE];
 	struct sw_qid *qid = &sw->qids[idx];
 
@@ -262,6 +260,5 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
 		}
 
-		snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i);
-		qid->reorder_buffer = rte_zmalloc_socket(buf,
+		qid->reorder_buffer = rte_zmalloc_socket(NULL,
 				window_size * sizeof(qid->reorder_buffer[0]),
 				0, socket_id);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.051820611 +0100
+++ 0037-event-sw-fix-warning-from-useless-snprintf.patch	2024-08-23 17:18:09.677429955 +0100
@@ -1 +1 @@
-From 510e2b655b46d91d3cc189882e6392afdc0363ff Mon Sep 17 00:00:00 2001
+From 4722e89fcd6993d2de347b9145340efe776528c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 7a7a8782e6..e638142dbc 100644
+index 31d013eab7..7820815c38 100644
@@ -36 +37 @@
- struct __rte_cache_aligned sw_queue_chunk {
+ struct sw_queue_chunk {
@@ -39 +40 @@
-index 1c01b069fe..19a52afc7d 100644
+index e43bf250d6..d1fd0eeb4f 100644
@@ -42 +43 @@
-@@ -229,7 +229,5 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
+@@ -230,7 +230,5 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
@@ -50 +51 @@
-@@ -261,6 +259,5 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
+@@ -262,6 +260,5 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,


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

* patch 'eal: fix logs for '--lcores'' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (35 preceding siblings ...)
  2024-08-23 16:17 ` patch 'event/sw: fix warning from useless snprintf' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/fm10k: fix cleanup during init failure' " Kevin Traynor
                   ` (97 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1f57a72efce3d886b70a9356b7ef6ccd6d603778

Thanks.

Kevin

---
From 1f57a72efce3d886b70a9356b7ef6ccd6d603778 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Thu, 13 Jun 2024 17:14:29 +0100
Subject: [PATCH] eal: fix logs for '--lcores'

[ upstream commit 0f241cc22e30de0dfd7487dcfd6acde220b5e168 ]

The argument is '--lcores' but it is being logged as '--lcore'
in several places.

e.g.
$ dpdk-testpmd -l 8,10,12 --lcores 8,10,12
EAL: Option --lcore is ignored, because (-l) is set!

Fix the spelling in logs and tests.

Fixes: 117eaa70584b ("eal: add error check for core options")
Fixes: 128ee4c26d87 ("app/test: add unit tests for --lcores option")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_eal_flags.c           | 2 +-
 lib/eal/common/eal_common_options.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index d7f4c2cd47..8916ea5882 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -584,5 +584,5 @@ test_missing_c_flag(void)
 	    launch_proc(argv28) == 0 || launch_proc(argv30) == 0) {
 		printf("Error - "
-		       "process ran without error with invalid --lcore flag\n");
+		       "process ran without error with invalid --lcores flag\n");
 		return -1;
 	}
diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index 1cd7a33fbf..954062a386 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -1664,5 +1664,5 @@ eal_parse_common_option(int opt, const char *optarg,
 			RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
 				(core_parsed == LCORE_OPT_LST) ? "-l" :
-				(core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+				(core_parsed == LCORE_OPT_MAP) ? "--lcores" :
 				"-c");
 			return -1;
@@ -1697,5 +1697,5 @@ eal_parse_common_option(int opt, const char *optarg,
 			RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
 				(core_parsed == LCORE_OPT_MSK) ? "-c" :
-				(core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+				(core_parsed == LCORE_OPT_MAP) ? "--lcores" :
 				"-l");
 			return -1;
@@ -1875,8 +1875,8 @@ eal_parse_common_option(int opt, const char *optarg,
 
 		if (core_parsed) {
-			RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
+			RTE_LOG(ERR, EAL, "Option --lcores is ignored, because (%s) is set!\n",
 				(core_parsed == LCORE_OPT_LST) ? "-l" :
 				(core_parsed == LCORE_OPT_MSK) ? "-c" :
-				"--lcore");
+				"--lcores");
 			return -1;
 		}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.077655231 +0100
+++ 0038-eal-fix-logs-for-lcores.patch	2024-08-23 17:18:09.679429962 +0100
@@ -1 +1 @@
-From 0f241cc22e30de0dfd7487dcfd6acde220b5e168 Mon Sep 17 00:00:00 2001
+From 1f57a72efce3d886b70a9356b7ef6ccd6d603778 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f241cc22e30de0dfd7487dcfd6acde220b5e168 ]
+
@@ -26 +28 @@
-index 6cb4b06757..71d8dba731 100644
+index d7f4c2cd47..8916ea5882 100644
@@ -29 +31 @@
-@@ -672,5 +672,5 @@ test_missing_c_flag(void)
+@@ -584,5 +584,5 @@ test_missing_c_flag(void)
@@ -37 +39 @@
-index e541f07939..f1a5e329a5 100644
+index 1cd7a33fbf..954062a386 100644
@@ -40,2 +42,2 @@
-@@ -1688,5 +1688,5 @@ eal_parse_common_option(int opt, const char *optarg,
- 			EAL_LOG(ERR, "Option -c is ignored, because (%s) is set!",
+@@ -1664,5 +1664,5 @@ eal_parse_common_option(int opt, const char *optarg,
+ 			RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
@@ -47,2 +49,2 @@
-@@ -1721,5 +1721,5 @@ eal_parse_common_option(int opt, const char *optarg,
- 			EAL_LOG(ERR, "Option -l is ignored, because (%s) is set!",
+@@ -1697,5 +1697,5 @@ eal_parse_common_option(int opt, const char *optarg,
+ 			RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
@@ -54 +56 @@
-@@ -1902,8 +1902,8 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1875,8 +1875,8 @@ eal_parse_common_option(int opt, const char *optarg,
@@ -57,2 +59,2 @@
--			EAL_LOG(ERR, "Option --lcore is ignored, because (%s) is set!",
-+			EAL_LOG(ERR, "Option --lcores is ignored, because (%s) is set!",
+-			RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
++			RTE_LOG(ERR, EAL, "Option --lcores is ignored, because (%s) is set!\n",


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

* patch 'net/fm10k: fix cleanup during init failure' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (36 preceding siblings ...)
  2024-08-23 16:17 ` patch 'eal: fix logs for '--lcores'' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/ixgbe: do not update link status in secondary process' " Kevin Traynor
                   ` (96 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Julien Meunier; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7a97a44a0a9d65856f26499c092fcb05e51f16f1

Thanks.

Kevin

---
From 7a97a44a0a9d65856f26499c092fcb05e51f16f1 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Wed, 3 Apr 2024 13:55:41 +0200
Subject: [PATCH] net/fm10k: fix cleanup during init failure

[ upstream commit cd7f5da2e7d647863a3d6552b6787f413bbd05f2 ]

Cleanup was not done on this PMD if a error is seen during the init:
- possible memory leak due to a missing free
- interrupt handler was not disabled: if an IRQ is received after the
  init, a SIGSEGV can be seen (private data stored in
  rte_eth_devices[port_id] is pointing to NULL)

Fixes: a6061d9e7075 ("fm10k: register PF driver")
Fixes: 4c287332c39a ("fm10k: add PF and VF interrupt handling")

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 39 +++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8bbd8b445d..5bac1794fb 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3057,5 +3057,5 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	struct rte_pci_device *pdev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = pdev->intr_handle;
-	int diag, i;
+	int diag, i, ret;
 	struct fm10k_macvlan_filter_info *macvlan;
 
@@ -3146,5 +3146,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	if (diag != 0) {
 		PMD_INIT_LOG(ERR, "Stats reset failed: %d", diag);
-		return diag;
+		ret = diag;
+		goto err_stat;
 	}
 
@@ -3153,5 +3154,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	if (diag != FM10K_SUCCESS) {
 		PMD_INIT_LOG(ERR, "Hardware reset failed: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_reset_hw;
 	}
 
@@ -3160,5 +3162,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	if (diag != FM10K_SUCCESS) {
 		PMD_INIT_LOG(ERR, "Failed to setup mailbox: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_mbx;
 	}
 
@@ -3199,5 +3202,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 		if (switch_ready == false) {
 			PMD_INIT_LOG(ERR, "switch is not ready");
-			return -1;
+			ret = -1;
+			goto err_switch_ready;
 		}
 	}
@@ -3234,5 +3238,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 		if (!hw->mac.default_vid) {
 			PMD_INIT_LOG(ERR, "default VID is not ready");
-			return -1;
+			ret = -1;
+			goto err_vid;
 		}
 	}
@@ -3243,4 +3248,26 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 
 	return 0;
+
+err_vid:
+err_switch_ready:
+	rte_intr_disable(intr_handle);
+
+	if (hw->mac.type == fm10k_mac_pf) {
+		fm10k_dev_disable_intr_pf(dev);
+		rte_intr_callback_unregister(intr_handle,
+			fm10k_dev_interrupt_handler_pf, (void *)dev);
+	} else {
+		fm10k_dev_disable_intr_vf(dev);
+		rte_intr_callback_unregister(intr_handle,
+			fm10k_dev_interrupt_handler_vf, (void *)dev);
+	}
+
+err_mbx:
+err_reset_hw:
+err_stat:
+	rte_free(dev->data->mac_addrs);
+	dev->data->mac_addrs = NULL;
+
+	return ret;
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.104916685 +0100
+++ 0039-net-fm10k-fix-cleanup-during-init-failure.patch	2024-08-23 17:18:09.681429969 +0100
@@ -1 +1 @@
-From cd7f5da2e7d647863a3d6552b6787f413bbd05f2 Mon Sep 17 00:00:00 2001
+From 7a97a44a0a9d65856f26499c092fcb05e51f16f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cd7f5da2e7d647863a3d6552b6787f413bbd05f2 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index fa0d16277e..7b490bea17 100644
+index 8bbd8b445d..5bac1794fb 100644
@@ -26 +27 @@
-@@ -3059,5 +3059,5 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3057,5 +3057,5 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -33 +34 @@
-@@ -3148,5 +3148,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3146,5 +3146,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -41 +42 @@
-@@ -3155,5 +3156,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3153,5 +3154,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -49 +50 @@
-@@ -3162,5 +3164,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3160,5 +3162,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -57 +58 @@
-@@ -3201,5 +3204,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3199,5 +3202,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -65 +66 @@
-@@ -3236,5 +3240,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3234,5 +3238,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -73 +74 @@
-@@ -3245,4 +3250,26 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3243,4 +3248,26 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)


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

* patch 'net/ixgbe: do not update link status in secondary process' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (37 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/fm10k: fix cleanup during init failure' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " Kevin Traynor
                   ` (95 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jun Wang, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1d72c067059e2731649c2458a5820d2093328a7b

Thanks.

Kevin

---
From 1d72c067059e2731649c2458a5820d2093328a7b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 20 Mar 2024 10:33:04 -0700
Subject: [PATCH] net/ixgbe: do not update link status in secondary process

[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]

The code to update link status is not safe in secondary process.
If called from secondary it will crash, example from dumpcap:
	ixgbe_dev_link_update_share()
	ixgbe_dev_link_update()
	rte_eth_link_get()

Fixes: af75078fece3 ("first public release")

Reported-by: Jun Wang <junwang01@cestc.cn>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 96dc34eb83..1c65cf77f5 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4286,4 +4286,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	u32 esdp_reg;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -1;
+
 	memset(&link, 0, sizeof(link));
 	link.link_status = RTE_ETH_LINK_DOWN;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.131644456 +0100
+++ 0040-net-ixgbe-do-not-update-link-status-in-secondary-pro.patch	2024-08-23 17:18:09.685429983 +0100
@@ -1 +1 @@
-From 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 Mon Sep 17 00:00:00 2001
+From 1d72c067059e2731649c2458a5820d2093328a7b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index bbdc996f31..a6916da0c5 100644
+index 96dc34eb83..1c65cf77f5 100644
@@ -26 +27 @@
-@@ -4294,4 +4294,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4286,4 +4286,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,


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

* patch 'net/ixgbe: do not create delayed interrupt handler twice' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (38 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/ixgbe: do not update link status in secondary process' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/e1000/base: fix link power down' " Kevin Traynor
                   ` (94 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Edwin Brossette; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f6e83fa8b322012c2fe5fa503e697e1fb4de89e8

Thanks.

Kevin

---
From f6e83fa8b322012c2fe5fa503e697e1fb4de89e8 Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Thu, 18 Apr 2024 15:53:07 +0200
Subject: [PATCH] net/ixgbe: do not create delayed interrupt handler twice

[ upstream commit 130ece79670d57760acd18c9671f91a4cd4e07a0 ]

Since link state may need some time to stabilize after a link state
change, we cannot update the link state right after one occurs. So link
state change interrupts (LSC) are handled after a delay. To do this, an
alarm to call a delayed handler is programmed. This delayed handler is
tasked with updating the link after a variable delay of one to four
seconds which should be enough time for the link state to become stable
again.

However, a problem can occur with some models of network cards. For
example, ixgbe_mac_X550EM_x may trigger this interrupt twice because
another interrupt signal is received on the General Purpose Interrupt
pin SPD0, which has the same interrupt handler. In such a case, the
delayed interrupt handler would be programmed to be executed twice.

Since we save the original interrupt mask value to restore it after the
delayed handler is done with its work, we end up overwriting its value
after the second alarm is programmed. Even worse: when restoring it the
first time, the saved original mask variable is reset to 0, so we end up
completely disabling all interrupts when trying to restore this mask
after the second time the delayed handler is executed.

Add a check on the interrupt mask value when programming the alarm for
the delayed handler. If the bit for LSC interrupts is unset, it means an
alarm was already programmed for the delayed handler. In this case, skip
the alarm creation.

Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")

Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 1c65cf77f5..4ba25435fd 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4663,12 +4663,18 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
 
 		ixgbe_dev_link_status_print(dev);
-		if (rte_eal_alarm_set(timeout * 1000,
-				      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
-			PMD_DRV_LOG(ERR, "Error setting alarm");
-		else {
-			/* remember original mask */
-			intr->mask_original = intr->mask;
-			/* only disable lsc interrupt */
-			intr->mask &= ~IXGBE_EIMS_LSC;
+
+		/* Don't program delayed handler if LSC interrupt is disabled.
+		 * It means one is already programmed.
+		 */
+		if (intr->mask & IXGBE_EIMS_LSC) {
+			if (rte_eal_alarm_set(timeout * 1000,
+					      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
+				PMD_DRV_LOG(ERR, "Error setting alarm");
+			else {
+				/* remember original mask */
+				intr->mask_original = intr->mask;
+				/* only disable lsc interrupt */
+				intr->mask &= ~IXGBE_EIMS_LSC;
+			}
 		}
 	}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.160806778 +0100
+++ 0041-net-ixgbe-do-not-create-delayed-interrupt-handler-tw.patch	2024-08-23 17:18:09.688429993 +0100
@@ -1 +1 @@
-From 130ece79670d57760acd18c9671f91a4cd4e07a0 Mon Sep 17 00:00:00 2001
+From f6e83fa8b322012c2fe5fa503e697e1fb4de89e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 130ece79670d57760acd18c9671f91a4cd4e07a0 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index a6916da0c5..1f93be98ca 100644
+index 1c65cf77f5..4ba25435fd 100644
@@ -45 +46 @@
-@@ -4673,12 +4673,18 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
+@@ -4663,12 +4663,18 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)


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

* patch 'net/e1000/base: fix link power down' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (39 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " Kevin Traynor
                   ` (93 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f7f0ac1a361cdd631aabfc999e5aa6fe5329f017

Thanks.

Kevin

---
From f7f0ac1a361cdd631aabfc999e5aa6fe5329f017 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 14 May 2024 16:17:16 +0100
Subject: [PATCH] net/e1000/base: fix link power down

[ upstream commit a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c ]

Current code is a result of work to reduce duplication between various
device models. However, the logic that was replaced did not exactly
match the new logic, and as a result the link power down was not
working correctly for some NICs, and the link remained up even when
the interface is down.

Fix it to correctly power down the link under all circumstances that
were supported by old logic.

Fixes: 44dddd14059f ("net/e1000/base: remove duplicated codes")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/e1000/base/e1000_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/base/e1000_base.c b/drivers/net/e1000/base/e1000_base.c
index ab73e1e59e..3ec32e7240 100644
--- a/drivers/net/e1000/base/e1000_base.c
+++ b/drivers/net/e1000/base/e1000_base.c
@@ -108,5 +108,5 @@ void e1000_power_down_phy_copper_base(struct e1000_hw *hw)
 
 	/* If the management interface is not enabled, then power down */
-	if (phy->ops.check_reset_block(hw))
+	if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw)))
 		e1000_power_down_phy_copper(hw);
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.190839759 +0100
+++ 0042-net-e1000-base-fix-link-power-down.patch	2024-08-23 17:18:09.689429997 +0100
@@ -1 +1 @@
-From a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c Mon Sep 17 00:00:00 2001
+From f7f0ac1a361cdd631aabfc999e5aa6fe5329f017 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (40 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/e1000/base: fix link power down' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " Kevin Traynor
                   ` (92 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Piotr Pietruszewski
  Cc: Piotr Skajewski, Marek Mical, Jeff Kirsher, Alice Michael, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2b53ce832bf9b6661549217e738b2e7725fa47c2

Thanks.

Kevin

---
From 2b53ce832bf9b6661549217e738b2e7725fa47c2 Mon Sep 17 00:00:00 2001
From: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Date: Thu, 30 May 2024 12:13:34 +0100
Subject: [PATCH] net/ixgbe/base: revert advertising for X550 2.5G/5G

[ upstream commit 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 ]

The commit removing advertising 2.5G and 5G speeds from
ixgbe_get_copper_speeds_supported() was supposed to disable 2.5G and 5G
during the autonegotiation with default settings. However, that change
prevented OS-specific part of the driver from forcing these speeds at
user request.

This change reverts the commit and adds 2.5G and 5G as speeds supported
by the X550.

Fixes: 13de2444449e ("net/ixgbe/base: remove default advertising for x550 2.5G/5G")

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
 .mailmap                           | 1 +
 drivers/net/ixgbe/base/ixgbe_phy.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/.mailmap b/.mailmap
index 7aaed03aab..49e574c3ef 100644
--- a/.mailmap
+++ b/.mailmap
@@ -847,4 +847,5 @@ Marcin Zapolski <marcinx.a.zapolski@intel.com>
 Marco Varlese <mvarlese@suse.de>
 Marc Sune <marcdevel@gmail.com> <marc.sune@bisdn.de>
+Marek Mical <marekx.mical@intel.com>
 Maria Lingemark <maria.lingemark@ericsson.com>
 Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 8d4d9bbfef..f859b152ec 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -916,4 +916,8 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
 
 	switch (hw->mac.type) {
+	case ixgbe_mac_X550:
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+		break;
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.216146382 +0100
+++ 0043-net-ixgbe-base-revert-advertising-for-X550-2.5G-5G.patch	2024-08-23 17:18:09.692430008 +0100
@@ -1 +1 @@
-From 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 Mon Sep 17 00:00:00 2001
+From 2b53ce832bf9b6661549217e738b2e7725fa47c2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 075ea40f17..508d4eba24 100644
+index 7aaed03aab..49e574c3ef 100644
@@ -32 +33 @@
-@@ -893,4 +893,5 @@ Marcin Zapolski <marcinx.a.zapolski@intel.com>
+@@ -847,4 +847,5 @@ Marcin Zapolski <marcinx.a.zapolski@intel.com>
@@ -39 +40 @@
-index 74c5db16fa..3a8e603472 100644
+index 8d4d9bbfef..f859b152ec 100644


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

* patch 'net/ixgbe/base: fix 5G link speed reported on VF' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (41 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/ixgbe/base: fix PHY ID for X550' " Kevin Traynor
                   ` (91 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Piotr Skajewski
  Cc: Radoslaw Tyl, Slawomir Mrozowicz, Alice Michael, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ea2d868cc504cb5af036e7ad87c0dc25653b3737

Thanks.

Kevin

---
From ea2d868cc504cb5af036e7ad87c0dc25653b3737 Mon Sep 17 00:00:00 2001
From: Piotr Skajewski <piotrx.skajewski@intel.com>
Date: Thu, 30 May 2024 12:13:35 +0100
Subject: [PATCH] net/ixgbe/base: fix 5G link speed reported on VF

[ upstream commit 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 ]

When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch
changes ixgbe_check_mac_link_vf function where there was an incorrect
conditional which checks using PF mac types, now it is correctly
using VF mac types.

Fixes: 12e20906905c ("net/ixgbe/base: include new speeds in VFLINK interpretation")

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
 .mailmap                          | 1 +
 drivers/net/ixgbe/base/ixgbe_vf.c | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index 49e574c3ef..9a98b67569 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1113,4 +1113,5 @@ Qun Wan <qun.wan@intel.com>
 Radha Mohan Chintakuntla <radhac@marvell.com>
 Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
+Radoslaw Tyl <radoslawx.tyl@intel.com>
 Radu Bulie <radu-andrei.bulie@nxp.com>
 Radu Nicolau <radu.nicolau@intel.com>
diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 5e3ae1b519..11dbbe2a86 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -586,5 +586,5 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	case IXGBE_LINKS_SPEED_10G_82599:
 		*speed = IXGBE_LINK_SPEED_10GB_FULL;
-		if (hw->mac.type >= ixgbe_mac_X550) {
+		if (hw->mac.type >= ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_2_5GB_FULL;
@@ -596,5 +596,5 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	case IXGBE_LINKS_SPEED_100_82599:
 		*speed = IXGBE_LINK_SPEED_100_FULL;
-		if (hw->mac.type == ixgbe_mac_X550) {
+		if (hw->mac.type == ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_5GB_FULL;
@@ -604,5 +604,5 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
 		/* Since Reserved in older MAC's */
-		if (hw->mac.type >= ixgbe_mac_X550)
+		if (hw->mac.type >= ixgbe_mac_X550_vf)
 			*speed = IXGBE_LINK_SPEED_10_FULL;
 		break;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.243963110 +0100
+++ 0044-net-ixgbe-base-fix-5G-link-speed-reported-on-VF.patch	2024-08-23 17:18:09.694430014 +0100
@@ -1 +1 @@
-From 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 Mon Sep 17 00:00:00 2001
+From ea2d868cc504cb5af036e7ad87c0dc25653b3737 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 508d4eba24..be16cabd07 100644
+index 49e574c3ef..9a98b67569 100644
@@ -27 +28 @@
-@@ -1174,4 +1174,5 @@ Qun Wan <qun.wan@intel.com>
+@@ -1113,4 +1113,5 @@ Qun Wan <qun.wan@intel.com>


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

* patch 'net/ixgbe/base: fix PHY ID for X550' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (42 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/cnxk: fix RSS config' " Kevin Traynor
                   ` (90 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Radoslaw Tyl; +Cc: Piotr Skajewski, Alice Michael, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2070487977c9aded1d4d77baa14960e390a84c5b

Thanks.

Kevin

---
From 2070487977c9aded1d4d77baa14960e390a84c5b Mon Sep 17 00:00:00 2001
From: Radoslaw Tyl <radoslawx.tyl@intel.com>
Date: Thu, 30 May 2024 12:13:36 +0100
Subject: [PATCH] net/ixgbe/base: fix PHY ID for X550

[ upstream commit a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add ]

Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.

This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.

Fixes: 58ddc803e412 ("ixgbe/base: add new X550 PHY ids")

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c  | 3 +--
 drivers/net/ixgbe/base/ixgbe_type.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index f859b152ec..a072769af2 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -433,6 +433,5 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
 		phy_type = ixgbe_phy_tn;
 		break;
-	case X550_PHY_ID2:
-	case X550_PHY_ID3:
+	case X550_PHY_ID:
 	case X540_PHY_ID:
 		phy_type = ixgbe_phy_aq;
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index dc765f13c9..5973c60477 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1664,4 +1664,5 @@ struct ixgbe_dmac_config {
 #define TNX_FW_REV	0xB
 #define X540_PHY_ID	0x01540200
+#define X550_PHY_ID	0x01540220
 #define X550_PHY_ID2	0x01540223
 #define X550_PHY_ID3	0x01540221
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.270883266 +0100
+++ 0045-net-ixgbe-base-fix-PHY-ID-for-X550.patch	2024-08-23 17:18:09.698430029 +0100
@@ -1 +1 @@
-From a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add Mon Sep 17 00:00:00 2001
+From 2070487977c9aded1d4d77baa14960e390a84c5b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 3a8e603472..56267bb00d 100644
+index f859b152ec..a072769af2 100644
@@ -38 +39 @@
-index 35212a561b..f709681df2 100644
+index dc765f13c9..5973c60477 100644
@@ -41 +42 @@
-@@ -1665,4 +1665,5 @@ struct ixgbe_dmac_config {
+@@ -1664,4 +1664,5 @@ struct ixgbe_dmac_config {


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

* patch 'net/cnxk: fix RSS config' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (43 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/ixgbe/base: fix PHY ID for X550' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/cnxk: fix outbound security with higher packet burst' " Kevin Traynor
                   ` (89 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d8a3470e22077a529d7624b938b7bc609a5c4afc

Thanks.

Kevin

---
From d8a3470e22077a529d7624b938b7bc609a5c4afc Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Thu, 23 May 2024 20:23:21 +0530
Subject: [PATCH] net/cnxk: fix RSS config

[ upstream commit d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 ]

Currently user passed RSS configuration is ignored via
rte_eth_dev_configure() API. Instead default RSS setup
is done by driver.

Adding handling for user passed RSS configuration too
via rte_eth_dev_configure().

Fixes: b75e0aca84b0 ("net/cnxk: add device configuration operation")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 94d1b17443..e4c22e7297 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1220,4 +1220,11 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
 	}
 
+	/* Overwrite default RSS setup if requested by user */
+	rc = cnxk_nix_rss_hash_update(eth_dev, &conf->rx_adv_conf.rss_conf);
+	if (rc) {
+		plt_err("Failed to configure rss rc=%d", rc);
+		goto free_nix_lf;
+	}
+
 	/* Init the default TM scheduler hierarchy */
 	rc = roc_nix_tm_init(nix);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.301132835 +0100
+++ 0046-net-cnxk-fix-RSS-config.patch	2024-08-23 17:18:09.699430032 +0100
@@ -1 +1 @@
-From d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 Mon Sep 17 00:00:00 2001
+From d8a3470e22077a529d7624b938b7bc609a5c4afc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 6b37bd877f..95a3d8aaf9 100644
+index 94d1b17443..e4c22e7297 100644
@@ -25 +26 @@
-@@ -1385,4 +1385,11 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
+@@ -1220,4 +1220,11 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)


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

* patch 'net/cnxk: fix outbound security with higher packet burst' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (44 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/cnxk: fix RSS config' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/cnxk: fix promiscuous state after MAC change' " Kevin Traynor
                   ` (88 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9c45669c03592afcc20f42748ef790feb6414c8b

Thanks.

Kevin

---
From 9c45669c03592afcc20f42748ef790feb6414c8b Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Tue, 28 May 2024 12:35:19 +0530
Subject: [PATCH] net/cnxk: fix outbound security with higher packet burst

[ upstream commit 062f6f652445a283a186dc6c62c692ba7c91cc3c ]

Fix issue with outbound security path while handling mixed traffic i.e
both plain and inline outbound packets being present as part of burst
and burst size is > 32. The loop needs to be broken when
we don't have space for 4 packets in LMT lines for CPT considering
both the full LMT lines and partial LMT lines used.

Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index bd9eba08e9..7e0ec4f048 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1576,5 +1576,6 @@ again:
 
 	for (i = 0; i < burst; i += NIX_DESCS_PER_LOOP) {
-		if (flags & NIX_TX_OFFLOAD_SECURITY_F && c_lnum + 2 > 16) {
+		if (flags & NIX_TX_OFFLOAD_SECURITY_F &&
+		    (((int)((16 - c_lnum) << 1) - c_loff) < 4)) {
 			burst = i;
 			break;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.325913223 +0100
+++ 0047-net-cnxk-fix-outbound-security-with-higher-packet-bu.patch	2024-08-23 17:18:09.700430035 +0100
@@ -1 +1 @@
-From 062f6f652445a283a186dc6c62c692ba7c91cc3c Mon Sep 17 00:00:00 2001
+From 9c45669c03592afcc20f42748ef790feb6414c8b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 062f6f652445a283a186dc6c62c692ba7c91cc3c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5c4b9e559e..9ce41fe80f 100644
+index bd9eba08e9..7e0ec4f048 100644
@@ -24 +25 @@
-@@ -2273,5 +2273,6 @@ again:
+@@ -1576,5 +1576,6 @@ again:


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

* patch 'net/cnxk: fix promiscuous state after MAC change' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (45 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/cnxk: fix outbound security with higher packet burst' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'hash: fix RCU reclamation size' " Kevin Traynor
                   ` (87 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6fa9a2e32d563133cdc17e957dc4916ddaf7b032

Thanks.

Kevin

---
From 6fa9a2e32d563133cdc17e957dc4916ddaf7b032 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Tue, 28 May 2024 14:02:46 +0530
Subject: [PATCH] net/cnxk: fix promiscuous state after MAC change

[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]

If promiscuous mode is enabled and default MAC address is set
again then promiscuous mode gets disabled in hardware.

This change will restore promiscuous behavior after configuring
default MAC address.

Fixes: 5fe86db2a0dd ("net/cnxk: support MAC address set")

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

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 67c0dd8865..84124c84a6 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -341,4 +341,11 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
 			goto exit;
 		}
+
+		if (eth_dev->data->promiscuous) {
+			rc = roc_nix_mac_promisc_mode_enable(nix, true);
+			if (rc)
+				plt_err("Failed to setup promisc mode in mac, rc=%d(%s)", rc,
+					roc_error_msg_get(rc));
+		}
 	}
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.351443060 +0100
+++ 0048-net-cnxk-fix-promiscuous-state-after-MAC-change.patch	2024-08-23 17:18:09.701430039 +0100
@@ -1 +1 @@
-From 5f1bce00fddffc63e5634891df2b02859c010944 Mon Sep 17 00:00:00 2001
+From 6fa9a2e32d563133cdc17e957dc4916ddaf7b032 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c8260fcb9c..b1093dd584 100644
+index 67c0dd8865..84124c84a6 100644
@@ -24 +25 @@
-@@ -452,4 +452,11 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
+@@ -341,4 +341,11 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)


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

* patch 'hash: fix RCU reclamation size' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (46 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/cnxk: fix promiscuous state after MAC change' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Kevin Traynor
                   ` (86 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Abdullah Ömer Yamaç; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f12baa45c938848b5302fdd1af4cdc0c2c2550e7

Thanks.

Kevin

---
From f12baa45c938848b5302fdd1af4cdc0c2c2550e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?= <aomeryamac@gmail.com>
Date: Mon, 13 May 2024 16:35:53 +0000
Subject: [PATCH] hash: fix RCU reclamation size
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d45a7eed07d6b024956d10af529fcdcdd798227f ]

Set the maximum reclamation size to user provided value.

Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")

Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 .mailmap                   | 2 +-
 lib/hash/rte_cuckoo_hash.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 9a98b67569..ed99e606d5 100644
--- a/.mailmap
+++ b/.mailmap
@@ -3,5 +3,5 @@ Aaro Koskinen <aaro.koskinen@nsn.com>
 Aaron Campbell <aaron@arbor.net>
 Aaron Conole <aconole@redhat.com>
-Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
+Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr> <aomeryamac@gmail.com>
 Abdullah Sevincer <abdullah.sevincer@intel.com>
 Abed Kamaluddin <akamaluddin@marvell.com>
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index abe44cf677..c545336905 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -1550,4 +1550,5 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
 			params.size = total_entries;
 		params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
+		params.max_reclaim_size = cfg->max_reclaim_size;
 		if (params.max_reclaim_size == 0)
 			params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.374111299 +0100
+++ 0049-hash-fix-RCU-reclamation-size.patch	2024-08-23 17:18:09.703430046 +0100
@@ -1 +1 @@
-From d45a7eed07d6b024956d10af529fcdcdd798227f Mon Sep 17 00:00:00 2001
+From f12baa45c938848b5302fdd1af4cdc0c2c2550e7 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d45a7eed07d6b024956d10af529fcdcdd798227f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 3e73eec762..9013e15ea9 100644
+index 9a98b67569..ed99e606d5 100644
@@ -33 +34 @@
-index 16c9c4c5c4..265335f845 100644
+index abe44cf677..c545336905 100644
@@ -36 +37 @@
-@@ -1559,4 +1559,5 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
+@@ -1550,4 +1550,5 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)


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

* patch 'common/mlx5: fix unsigned/signed mismatch' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (47 preceding siblings ...)
  2024-08-23 16:17 ` patch 'hash: fix RCU reclamation size' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:17 ` patch 'net/mlx5: fix indexed pool with invalid index' " Kevin Traynor
                   ` (85 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1940acf81d5bd88d1c4857cf4f252c6d4cb530f5

Thanks.

Kevin

---
From 1940acf81d5bd88d1c4857cf4f252c6d4cb530f5 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Mon, 15 Apr 2024 16:09:37 -0700
Subject: [PATCH] common/mlx5: fix unsigned/signed mismatch

[ upstream commit eec253d0a57d707306e4ac3128bc21f10bb8bc5f ]

Use unsigned int for 2 loop indexes that are being compared against an
unsigned int struct field to avoid signed/unsigned mismatch warning.

Fixes: 718d166e5504 ("net/mlx5: create advanced RxQ table via DevX")
Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index d9585bf3a9..a9d81b34ce 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1559,5 +1559,5 @@ mlx5_devx_cmd_create_rqt(void *ctx,
 	void *rqt_ctx;
 	struct mlx5_devx_obj *rqt = NULL;
-	int i;
+	unsigned int i;
 
 	in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
@@ -1613,5 +1613,5 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
 	uint32_t *in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
 	void *rqt_ctx;
-	int i;
+	unsigned int i;
 	int ret;
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.399512493 +0100
+++ 0050-common-mlx5-fix-unsigned-signed-mismatch.patch	2024-08-23 17:18:09.705430053 +0100
@@ -1 +1 @@
-From eec253d0a57d707306e4ac3128bc21f10bb8bc5f Mon Sep 17 00:00:00 2001
+From 1940acf81d5bd88d1c4857cf4f252c6d4cb530f5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eec253d0a57d707306e4ac3128bc21f10bb8bc5f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9b7ababae7..9952733c90 100644
+index d9585bf3a9..a9d81b34ce 100644
@@ -23 +24 @@
-@@ -1817,5 +1817,5 @@ mlx5_devx_cmd_create_rqt(void *ctx,
+@@ -1559,5 +1559,5 @@ mlx5_devx_cmd_create_rqt(void *ctx,
@@ -30 +31 @@
-@@ -1870,5 +1870,5 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
+@@ -1613,5 +1613,5 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,


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

* patch 'net/mlx5: fix indexed pool with invalid index' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (48 preceding siblings ...)
  2024-08-23 16:17 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Kevin Traynor
@ 2024-08-23 16:17 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " Kevin Traynor
                   ` (84 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:17 UTC (permalink / raw)
  To: Haifei Luo; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ac5f04c92a20375102d6aa622de7243994dc53ac

Thanks.

Kevin

---
From ac5f04c92a20375102d6aa622de7243994dc53ac Mon Sep 17 00:00:00 2001
From: Haifei Luo <haifeil@nvidia.com>
Date: Wed, 15 May 2024 12:36:53 +0300
Subject: [PATCH] net/mlx5: fix indexed pool with invalid index

[ upstream commit 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 ]

When _mlx5_ipool_get_cache is called, idx may be invalid and
the "trunk" is NULL in this case. Assert is not correct and add
checks that if trunk is NULL or not. Return NULL If trunk is NULL.

Fixes: 42f463395f8f ("net/mlx5: support indexed pool non-lcore operations")

Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index b295702fd4..bbe07cd7a3 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -380,5 +380,6 @@ _mlx5_ipool_get_cache(struct mlx5_indexed_pool *pool, int cidx, uint32_t idx)
 	trunk_idx = mlx5_trunk_idx_get(pool, idx);
 	trunk = lc->trunks[trunk_idx];
-	MLX5_ASSERT(trunk);
+	if (!trunk)
+		return NULL;
 	entry_idx = idx - mlx5_trunk_idx_offset_get(pool, trunk_idx);
 	return &trunk->data[entry_idx * pool->cfg.size];
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.424183370 +0100
+++ 0051-net-mlx5-fix-indexed-pool-with-invalid-index.patch	2024-08-23 17:18:09.705430053 +0100
@@ -1 +1 @@
-From 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 Mon Sep 17 00:00:00 2001
+From ac5f04c92a20375102d6aa622de7243994dc53ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index fc03cc054b..d52119f0be 100644
+index b295702fd4..bbe07cd7a3 100644


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

* patch 'net/mlx5: fix hash Rx queue release in flow sample' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (49 preceding siblings ...)
  2024-08-23 16:17 ` patch 'net/mlx5: fix indexed pool with invalid index' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'telemetry: lower log level on socket error' " Kevin Traynor
                   ` (83 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Bing Zhao, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2a597e9f8b713ba95d47305d656f22533065c4a7

Thanks.

Kevin

---
From 2a597e9f8b713ba95d47305d656f22533065c4a7 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Mon, 20 May 2024 18:07:09 +0300
Subject: [PATCH] net/mlx5: fix hash Rx queue release in flow sample

[ upstream commit cf3f6ba146abe613c811a281ceadf7b22ef82ab6 ]

While the queue/RSS action was added to sample action lists,
the Rx hash queue resource was allocated in the sample action
translation to create the sample DR action later.

While there's a failure in the flow creation, the Rx hash queue
resource of the sample action list was destroyed in the wrong place.

This patch adds the checking to release the Rx hash queue
resource after the sample action release, to avoid one more
extra release if there's a failure.

Fixes: ca5eb60ecd5b ("net/mlx5: fix resource release for mirror flow")

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7a3e7ef96f..ff6713225c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -14147,5 +14147,6 @@ error:
 		       handle_idx, dh, next) {
 		/* hrxq is union, don't clear it if the flag is not set. */
-		if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq) {
+		if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq &&
+		    !dh->dvh.rix_sample && !dh->dvh.rix_dest_array) {
 			mlx5_hrxq_release(dev, dh->rix_hrxq);
 			dh->rix_hrxq = 0;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.447589876 +0100
+++ 0052-net-mlx5-fix-hash-Rx-queue-release-in-flow-sample.patch	2024-08-23 17:18:09.714430084 +0100
@@ -1 +1 @@
-From cf3f6ba146abe613c811a281ceadf7b22ef82ab6 Mon Sep 17 00:00:00 2001
+From 2a597e9f8b713ba95d47305d656f22533065c4a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf3f6ba146abe613c811a281ceadf7b22ef82ab6 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 04cb9291a8..7330e13787 100644
+index 7a3e7ef96f..ff6713225c 100644
@@ -31 +32 @@
-@@ -15669,5 +15669,6 @@ error:
+@@ -14147,5 +14147,6 @@ error:


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

* patch 'telemetry: lower log level on socket error' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (50 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'app/bbdev: fix interrupt tests' " Kevin Traynor
                   ` (82 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Christian Ehrhardt, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/90859e988cf31f52ae430750f633014c9d8bcc8c

Thanks.

Kevin

---
From 90859e988cf31f52ae430750f633014c9d8bcc8c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 6 Jun 2024 14:26:54 +0200
Subject: [PATCH] telemetry: lower log level on socket error

[ upstream commit 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 ]

When starting two DPDK programs using the same DPDK prefix (like for
example OVS and testpmd, both running as primary processes in
--in-memory mode), the first DPDK process of the two spews some error
log when the second starts:

TELEMETRY: Socket write base info to client failed

This is because telemetry init involves trying to connect on existing
sockets to check if it can take over an existing socket file.

On the other hand, this error log provides no helpful information.
Lower this log to debug level.

Fixes: e14bb5f10509 ("telemetry: fix connected clients count")

Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/telemetry/telemetry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 36cdec26ef..74315714ea 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -379,5 +379,5 @@ client_handler(void *sock_id)
 			telemetry_version, getpid(), MAX_OUTPUT_LEN);
 	if (write(s, info_str, strlen(info_str)) < 0) {
-		TMTY_LOG(ERR, "Socket write base info to client failed\n");
+		TMTY_LOG(DEBUG, "Socket write base info to client failed\n");
 		goto exit;
 	}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.483095893 +0100
+++ 0053-telemetry-lower-log-level-on-socket-error.patch	2024-08-23 17:18:09.715430088 +0100
@@ -1 +1 @@
-From 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 Mon Sep 17 00:00:00 2001
+From 90859e988cf31f52ae430750f633014c9d8bcc8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 1663bd8c68..509fae76ec 100644
+index 36cdec26ef..74315714ea 100644
@@ -33 +34 @@
-@@ -383,5 +383,5 @@ client_handler(void *sock_id)
+@@ -379,5 +379,5 @@ client_handler(void *sock_id)
@@ -36,2 +37,2 @@
--		TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
-+		TMTY_LOG_LINE(DEBUG, "Socket write base info to client failed");
+-		TMTY_LOG(ERR, "Socket write base info to client failed\n");
++		TMTY_LOG(DEBUG, "Socket write base info to client failed\n");


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

* patch 'app/bbdev: fix interrupt tests' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (51 preceding siblings ...)
  2024-08-23 16:18 ` patch 'telemetry: lower log level on socket error' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'dmadev: fix structure alignment' " Kevin Traynor
                   ` (81 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/967cb3d5bdde40398f8f964d261ce434876bd9c6

Thanks.

Kevin

---
From 967cb3d5bdde40398f8f964d261ce434876bd9c6 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Mon, 24 Jun 2024 08:02:31 -0700
Subject: [PATCH] app/bbdev: fix interrupt tests

[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]

Fix possible error with regards to setting the burst size from the
enqueue thread.

Fixes: b2e2aec3239e ("app/bbdev: enhance interrupt test")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test_bbdev_perf.c | 72 ++++++++++++++++----------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 3f2bac6136..c15ed34b46 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2820,4 +2820,13 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 				num_to_enq = num_to_process - enqueued;
 
+			/* Write to thread burst_sz current number of enqueued
+			 * descriptors. It ensures that proper number of
+			 * descriptors will be dequeued in callback
+			 * function - needed for last batch in case where
+			 * the number of operations is not a multiple of
+			 * burst size.
+			 */
+			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
 			enq = 0;
 			do {
@@ -2829,13 +2838,4 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 			enqueued += enq;
 
-			/* Write to thread burst_sz current number of enqueued
-			 * descriptors. It ensures that proper number of
-			 * descriptors will be dequeued in callback
-			 * function - needed for last batch in case where
-			 * the number of operations is not a multiple of
-			 * burst size.
-			 */
-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
 			/* Wait until processing of previous batch is
 			 * completed
@@ -2908,4 +2908,13 @@ throughput_intr_lcore_dec(void *arg)
 				num_to_enq = num_to_process - enqueued;
 
+			/* Write to thread burst_sz current number of enqueued
+			 * descriptors. It ensures that proper number of
+			 * descriptors will be dequeued in callback
+			 * function - needed for last batch in case where
+			 * the number of operations is not a multiple of
+			 * burst size.
+			 */
+			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
 			enq = 0;
 			do {
@@ -2916,13 +2925,4 @@ throughput_intr_lcore_dec(void *arg)
 			enqueued += enq;
 
-			/* Write to thread burst_sz current number of enqueued
-			 * descriptors. It ensures that proper number of
-			 * descriptors will be dequeued in callback
-			 * function - needed for last batch in case where
-			 * the number of operations is not a multiple of
-			 * burst size.
-			 */
-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
 			/* Wait until processing of previous batch is
 			 * completed
@@ -2994,4 +2994,13 @@ throughput_intr_lcore_enc(void *arg)
 				num_to_enq = num_to_process - enqueued;
 
+			/* Write to thread burst_sz current number of enqueued
+			 * descriptors. It ensures that proper number of
+			 * descriptors will be dequeued in callback
+			 * function - needed for last batch in case where
+			 * the number of operations is not a multiple of
+			 * burst size.
+			 */
+			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
 			enq = 0;
 			do {
@@ -3002,13 +3011,4 @@ throughput_intr_lcore_enc(void *arg)
 			enqueued += enq;
 
-			/* Write to thread burst_sz current number of enqueued
-			 * descriptors. It ensures that proper number of
-			 * descriptors will be dequeued in callback
-			 * function - needed for last batch in case where
-			 * the number of operations is not a multiple of
-			 * burst size.
-			 */
-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
 			/* Wait until processing of previous batch is
 			 * completed
@@ -3082,4 +3082,13 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 				num_to_enq = num_to_process - enqueued;
 
+			/* Write to thread burst_sz current number of enqueued
+			 * descriptors. It ensures that proper number of
+			 * descriptors will be dequeued in callback
+			 * function - needed for last batch in case where
+			 * the number of operations is not a multiple of
+			 * burst size.
+			 */
+			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
 			enq = 0;
 			do {
@@ -3091,13 +3100,4 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 			enqueued += enq;
 
-			/* Write to thread burst_sz current number of enqueued
-			 * descriptors. It ensures that proper number of
-			 * descriptors will be dequeued in callback
-			 * function - needed for last batch in case where
-			 * the number of operations is not a multiple of
-			 * burst size.
-			 */
-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
 			/* Wait until processing of previous batch is
 			 * completed
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.505582303 +0100
+++ 0054-app-bbdev-fix-interrupt-tests.patch	2024-08-23 17:18:09.718430098 +0100
@@ -1 +1 @@
-From fdcee665c5066cd1300d08b85d159ccabf9f3657 Mon Sep 17 00:00:00 2001
+From 967cb3d5bdde40398f8f964d261ce434876bd9c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/test-bbdev/test_bbdev_perf.c | 120 +++++++++++++++----------------
- 1 file changed, 60 insertions(+), 60 deletions(-)
+ app/test-bbdev/test_bbdev_perf.c | 72 ++++++++++++++++----------------
+ 1 file changed, 36 insertions(+), 36 deletions(-)
@@ -19 +20 @@
-index 9841464922..20cd8df19b 100644
+index 3f2bac6136..c15ed34b46 100644
@@ -22,61 +23 @@
-@@ -3420,4 +3420,14 @@ throughput_intr_lcore_ldpc_dec(void *arg)
- 				num_to_enq = num_to_process - enqueued;
- 
-+			/* Write to thread burst_sz current number of enqueued
-+			 * descriptors. It ensures that proper number of
-+			 * descriptors will be dequeued in callback
-+			 * function - needed for last batch in case where
-+			 * the number of operations is not a multiple of
-+			 * burst size.
-+			 */
-+			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+					rte_memory_order_relaxed);
-+
- 			enq = 0;
- 			do {
-@@ -3429,14 +3439,4 @@ throughput_intr_lcore_ldpc_dec(void *arg)
- 			enqueued += enq;
- 
--			/* Write to thread burst_sz current number of enqueued
--			 * descriptors. It ensures that proper number of
--			 * descriptors will be dequeued in callback
--			 * function - needed for last batch in case where
--			 * the number of operations is not a multiple of
--			 * burst size.
--			 */
--			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
--					rte_memory_order_relaxed);
--
- 			/* Wait until processing of previous batch is
- 			 * completed
-@@ -3515,4 +3515,14 @@ throughput_intr_lcore_dec(void *arg)
- 				num_to_enq = num_to_process - enqueued;
- 
-+			/* Write to thread burst_sz current number of enqueued
-+			 * descriptors. It ensures that proper number of
-+			 * descriptors will be dequeued in callback
-+			 * function - needed for last batch in case where
-+			 * the number of operations is not a multiple of
-+			 * burst size.
-+			 */
-+			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+					rte_memory_order_relaxed);
-+
- 			enq = 0;
- 			do {
-@@ -3523,14 +3533,4 @@ throughput_intr_lcore_dec(void *arg)
- 			enqueued += enq;
- 
--			/* Write to thread burst_sz current number of enqueued
--			 * descriptors. It ensures that proper number of
--			 * descriptors will be dequeued in callback
--			 * function - needed for last batch in case where
--			 * the number of operations is not a multiple of
--			 * burst size.
--			 */
--			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
--					rte_memory_order_relaxed);
--
- 			/* Wait until processing of previous batch is
- 			 * completed
-@@ -3604,4 +3604,14 @@ throughput_intr_lcore_enc(void *arg)
+@@ -2820,4 +2820,13 @@ throughput_intr_lcore_ldpc_dec(void *arg)
@@ -92,2 +33 @@
-+			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+					rte_memory_order_relaxed);
++			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -97 +37 @@
-@@ -3612,14 +3622,4 @@ throughput_intr_lcore_enc(void *arg)
+@@ -2829,13 +2838,4 @@ throughput_intr_lcore_ldpc_dec(void *arg)
@@ -107,2 +47 @@
--			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
--					rte_memory_order_relaxed);
+-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -112 +51 @@
-@@ -3695,4 +3695,14 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+@@ -2908,4 +2908,13 @@ throughput_intr_lcore_dec(void *arg)
@@ -122,2 +61 @@
-+			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+					rte_memory_order_relaxed);
++			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -127 +65 @@
-@@ -3704,14 +3714,4 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+@@ -2916,13 +2925,4 @@ throughput_intr_lcore_dec(void *arg)
@@ -137,2 +75 @@
--			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
--					rte_memory_order_relaxed);
+-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -142 +79 @@
-@@ -3787,4 +3787,14 @@ throughput_intr_lcore_fft(void *arg)
+@@ -2994,4 +2994,13 @@ throughput_intr_lcore_enc(void *arg)
@@ -152,2 +89 @@
-+			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+					rte_memory_order_relaxed);
++			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -157 +93 @@
-@@ -3795,14 +3805,4 @@ throughput_intr_lcore_fft(void *arg)
+@@ -3002,13 +3011,4 @@ throughput_intr_lcore_enc(void *arg)
@@ -167,2 +103 @@
--			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
--					rte_memory_order_relaxed);
+-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -172 +107 @@
-@@ -3873,4 +3873,14 @@ throughput_intr_lcore_mldts(void *arg)
+@@ -3082,4 +3082,13 @@ throughput_intr_lcore_ldpc_enc(void *arg)
@@ -182,2 +117 @@
-+			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+					rte_memory_order_relaxed);
++			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -187 +121 @@
-@@ -3880,14 +3890,4 @@ throughput_intr_lcore_mldts(void *arg)
+@@ -3091,13 +3100,4 @@ throughput_intr_lcore_ldpc_enc(void *arg)
@@ -197,2 +131 @@
--			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
--					rte_memory_order_relaxed);
+-			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);


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

* patch 'dmadev: fix structure alignment' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (52 preceding siblings ...)
  2024-08-23 16:18 ` patch 'app/bbdev: fix interrupt tests' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'vdpa/sfc: remove dead code' " Kevin Traynor
                   ` (80 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2c3f6129d9d7aea65dc0c0e0c24cf3436af0abf3

Thanks.

Kevin

---
From 2c3f6129d9d7aea65dc0c0e0c24cf3436af0abf3 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Wed, 20 Mar 2024 15:23:32 +0800
Subject: [PATCH] dmadev: fix structure alignment

[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]

The structure rte_dma_dev needs to be aligned to the cache line, but
the return value of malloc may not be aligned to the cache line. When
we use memset to clear the rte_dma_dev object, it may cause a segmentation
fault in clang-x86-platform.

This is because clang uses the "vmovaps" assembly instruction for
memset, which requires that the operands (rte_dma_dev objects) must
aligned on a 16-byte boundary or a general-protection exception (#GP)
is generated.

Therefore, either additional memory is applied for re-alignment, or the
rte_dma_dev object does not require cache line alignment. The patch
chooses the former option to fix the issue.

Fixes: b36970f2e13e ("dmadev: introduce DMA device library")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/dmadev/rte_dmadev.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index d4b32b2971..4e2057d301 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -155,13 +155,22 @@ dma_dev_data_prepare(void)
 {
 	size_t size;
+	void *ptr;
 
 	if (rte_dma_devices != NULL)
 		return 0;
 
-	size = dma_devices_max * sizeof(struct rte_dma_dev);
-	rte_dma_devices = malloc(size);
-	if (rte_dma_devices == NULL)
+	/* The DMA device object is expected to align cacheline,
+	 * but the return value of malloc may not be aligned to the cache line.
+	 * Therefore, extra memory is applied for realignment.
+	 * Note: posix_memalign/aligned_alloc are not used
+	 * because not always available, depending on libc.
+	 */
+	size = dma_devices_max * sizeof(struct rte_dma_dev) + RTE_CACHE_LINE_SIZE;
+	ptr = malloc(size);
+	if (ptr == NULL)
 		return -ENOMEM;
-	memset(rte_dma_devices, 0, size);
+	memset(ptr, 0, size);
+
+	rte_dma_devices = RTE_PTR_ALIGN(ptr, RTE_CACHE_LINE_SIZE);
 
 	return 0;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.532781881 +0100
+++ 0055-dmadev-fix-structure-alignment.patch	2024-08-23 17:18:09.719430102 +0100
@@ -1 +1 @@
-From c15902587b538ff02cfb0fbb4dd481f1503d936b Mon Sep 17 00:00:00 2001
+From 2c3f6129d9d7aea65dc0c0e0c24cf3436af0abf3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index e64b279bac..845727210f 100644
+index d4b32b2971..4e2057d301 100644
@@ -33 +34 @@
-@@ -160,13 +160,22 @@ dma_dev_data_prepare(void)
+@@ -155,13 +155,22 @@ dma_dev_data_prepare(void)


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

* patch 'vdpa/sfc: remove dead code' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (53 preceding siblings ...)
  2024-08-23 16:18 ` patch 'dmadev: fix structure alignment' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'bpf: fix MOV instruction evaluation' " Kevin Traynor
                   ` (79 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e296365eb4f442b9854c3bd0bb569a3d5059c997

Thanks.

Kevin

---
From e296365eb4f442b9854c3bd0bb569a3d5059c997 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:24:09 +0200
Subject: [PATCH] vdpa/sfc: remove dead code

[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]

This is probably a copy/paste from the net/sfc driver.
sfc_logtype_driver is not a logtype variable from the sfc vDPA driver.
Remove it.

Fixes: 6dad9a7353d4 ("vdpa/sfc: support device initialization")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/vdpa/sfc/sfc_vdpa_hw.c b/drivers/vdpa/sfc/sfc_vdpa_hw.c
index fd1fee7e32..ad02723bb2 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_hw.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_hw.c
@@ -14,6 +14,4 @@
 #include "sfc_vdpa_ops.h"
 
-extern uint32_t sfc_logtype_driver;
-
 #ifndef PAGE_SIZE
 #define PAGE_SIZE   (sysconf(_SC_PAGESIZE))
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.555246484 +0100
+++ 0056-vdpa-sfc-remove-dead-code.patch	2024-08-23 17:18:09.719430102 +0100
@@ -1 +1 @@
-From 4ea22410ea9c0235db40313bb810582b25e845b3 Mon Sep 17 00:00:00 2001
+From e296365eb4f442b9854c3bd0bb569a3d5059c997 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index edb7e35c2c..7e43719f53 100644
+index fd1fee7e32..ad02723bb2 100644


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

* patch 'bpf: fix MOV instruction evaluation' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (54 preceding siblings ...)
  2024-08-23 16:18 ` patch 'vdpa/sfc: remove dead code' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'bpf: fix load hangs with six IPv6 addresses' " Kevin Traynor
                   ` (78 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/89a1505c5a6572d2e612c23dd2070889cebd17ab

Thanks.

Kevin

---
From 89a1505c5a6572d2e612c23dd2070889cebd17ab Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:40 +0100
Subject: [PATCH] bpf: fix MOV instruction evaluation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]

Verifier might left some register-state values uninitialized while
evaluating MOV instructions.
Add explicit initialization.

Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/bpf/bpf_validate.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 09331258eb..81bede3701 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -639,12 +639,12 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 	uint64_t msk;
 	uint32_t op;
-	size_t opsz;
+	size_t opsz, sz;
 	const char *err;
 	struct bpf_eval_state *st;
 	struct bpf_reg_val *rd, rs;
 
-	opsz = (BPF_CLASS(ins->code) == BPF_ALU) ?
+	sz = (BPF_CLASS(ins->code) == BPF_ALU) ?
 		sizeof(uint32_t) : sizeof(uint64_t);
-	opsz = opsz * CHAR_BIT;
+	opsz = sz * CHAR_BIT;
 	msk = RTE_LEN2MASK(opsz, uint64_t);
 
@@ -655,6 +655,8 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 		rs = st->rv[ins->src_reg];
 		eval_apply_mask(&rs, msk);
-	} else
+	} else {
+		rs = (struct bpf_reg_val){.v = {.size = sz,},};
 		eval_fill_imm(&rs, msk, ins->imm);
+	}
 
 	eval_apply_mask(rd, msk);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.577569779 +0100
+++ 0057-bpf-fix-MOV-instruction-evaluation.patch	2024-08-23 17:18:09.721430109 +0100
@@ -1 +1 @@
-From 3eef64655bfe3602f4e3235e2533932205f24569 Mon Sep 17 00:00:00 2001
+From 89a1505c5a6572d2e612c23dd2070889cebd17ab Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 79be5e917d..11344fff4d 100644
+index 09331258eb..81bede3701 100644
@@ -26 +27 @@
-@@ -637,12 +637,12 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
+@@ -639,12 +639,12 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
@@ -42 +43 @@
-@@ -653,6 +653,8 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
+@@ -655,6 +655,8 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)


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

* patch 'bpf: fix load hangs with six IPv6 addresses' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (55 preceding siblings ...)
  2024-08-23 16:18 ` patch 'bpf: fix MOV instruction evaluation' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'telemetry: fix connection parameter parsing' " Kevin Traynor
                   ` (77 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Konstantin Ananyev
  Cc: Isaac Boukris, Morten Brørup, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7598b5b537e6b1b4f5f2409153359b7d04594baf

Thanks.

Kevin

---
From 7598b5b537e6b1b4f5f2409153359b7d04594baf Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:41 +0100
Subject: [PATCH] bpf: fix load hangs with six IPv6 addresses
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]

As described in https://bugs.dpdk.org/show_bug.cgi?id=1465, converting
from following cBPF filter:
"host 1::1 or host 1::1 or host 1::1 or host 1::1 or
 host 1::1 or host 1::1"
takes too long for BPF verifier to complete (up to 25 seconds).

Looking at it, I didn't find any actual functional bug.

In fact, it does what is expected: go through each possible path of
BPF program and evaluate register/stack state for each instruction.
The problem is that, for program with a lot of conditional branches,
number of possible paths starts to grow exponentially and such walk
becomes very excessive.

So to minimize number of evaluations, this patch implements heuristic
similar to what Linux kernel does: state pruning.
If from given instruction for given program state, we explore all possible
paths and for each of them reach bpf_exit() without any complaints and a
valid R0 value, then for that instruction this program state can be
marked as 'safe'.
When we later arrive at the same instruction with a state equivalent to
an earlier instruction 'safe' state, we can prune the search.

For now, only states for JCC targets are saved/examined.

Plus add few extra logging for DEBUG level.

Bugzilla ID: 1465
Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")

Reported-by: Isaac Boukris <iboukris@gmail.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/bpf/bpf_validate.c | 305 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 255 insertions(+), 50 deletions(-)

diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 81bede3701..dfbef6ca42 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -32,8 +32,11 @@ struct bpf_reg_val {
 
 struct bpf_eval_state {
+	SLIST_ENTRY(bpf_eval_state) next; /* for @safe list traversal */
 	struct bpf_reg_val rv[EBPF_REG_NUM];
 	struct bpf_reg_val sv[MAX_BPF_STACK_SIZE / sizeof(uint64_t)];
 };
 
+SLIST_HEAD(bpf_evst_head, bpf_eval_state);
+
 /* possible instruction node colour */
 enum {
@@ -55,4 +58,7 @@ enum {
 #define	MAX_EDGES	2
 
+/* max number of 'safe' evaluated states to track per node */
+#define NODE_EVST_MAX	32
+
 struct inst_node {
 	uint8_t colour;
@@ -62,5 +68,16 @@ struct inst_node {
 	uint32_t edge_dest[MAX_EDGES];
 	uint32_t prev_node;
-	struct bpf_eval_state *evst;
+	struct {
+		struct bpf_eval_state *cur;   /* save/restore for jcc targets */
+		struct bpf_eval_state *start;
+		struct bpf_evst_head safe;    /* safe states for track/prune */
+		uint32_t nb_safe;
+	} evst;
+};
+
+struct evst_pool {
+	uint32_t num;
+	uint32_t cur;
+	struct bpf_eval_state *ent;
 };
 
@@ -76,9 +93,6 @@ struct bpf_verifier {
 	struct bpf_eval_state *evst;
 	struct inst_node *evin;
-	struct {
-		uint32_t num;
-		uint32_t cur;
-		struct bpf_eval_state *ent;
-	} evst_pool;
+	struct evst_pool evst_sr_pool; /* for evst save/restore */
+	struct evst_pool evst_tp_pool; /* for evst track/prune */
 };
 
@@ -1088,5 +1102,5 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 
 	tst = bvf->evst;
-	fst = bvf->evin->evst;
+	fst = bvf->evin->evst.cur;
 
 	frd = fst->rv + ins->dst_reg;
@@ -1817,6 +1831,6 @@ add_edge(struct bpf_verifier *bvf, struct inst_node *node, uint32_t nidx)
 
 	if (nidx > bvf->prm->nb_ins) {
-		RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
-			"next pc: %u\n",
+		RTE_BPF_LOG(ERR,
+			"%s: program boundary violation at pc: %u, next pc: %u\n",
 			__func__, get_node_idx(bvf, node), nidx);
 		return -EINVAL;
@@ -2094,20 +2108,21 @@ validate(struct bpf_verifier *bvf)
  */
 static struct bpf_eval_state *
-pull_eval_state(struct bpf_verifier *bvf)
+pull_eval_state(struct evst_pool *pool)
 {
 	uint32_t n;
 
-	n = bvf->evst_pool.cur;
-	if (n == bvf->evst_pool.num)
+	n = pool->cur;
+	if (n == pool->num)
 		return NULL;
 
-	bvf->evst_pool.cur = n + 1;
-	return bvf->evst_pool.ent + n;
+	pool->cur = n + 1;
+	return pool->ent + n;
 }
 
 static void
-push_eval_state(struct bpf_verifier *bvf)
+push_eval_state(struct evst_pool *pool)
 {
-	bvf->evst_pool.cur--;
+	RTE_ASSERT(pool->cur != 0);
+	pool->cur--;
 }
 
@@ -2116,6 +2131,7 @@ evst_pool_fini(struct bpf_verifier *bvf)
 {
 	bvf->evst = NULL;
-	free(bvf->evst_pool.ent);
-	memset(&bvf->evst_pool, 0, sizeof(bvf->evst_pool));
+	free(bvf->evst_sr_pool.ent);
+	memset(&bvf->evst_sr_pool, 0, sizeof(bvf->evst_sr_pool));
+	memset(&bvf->evst_tp_pool, 0, sizeof(bvf->evst_tp_pool));
 }
 
@@ -2123,29 +2139,81 @@ static int
 evst_pool_init(struct bpf_verifier *bvf)
 {
-	uint32_t n;
+	uint32_t k, n;
 
-	n = bvf->nb_jcc_nodes + 1;
+	/*
+	 * We need nb_jcc_nodes + 1 for save_cur/restore_cur
+	 * remaining ones will be used for state tracking/pruning.
+	 */
+	k = bvf->nb_jcc_nodes + 1;
+	n = k * 3;
 
-	bvf->evst_pool.ent = calloc(n, sizeof(bvf->evst_pool.ent[0]));
-	if (bvf->evst_pool.ent == NULL)
+	bvf->evst_sr_pool.ent = calloc(n, sizeof(bvf->evst_sr_pool.ent[0]));
+	if (bvf->evst_sr_pool.ent == NULL)
 		return -ENOMEM;
 
-	bvf->evst_pool.num = n;
-	bvf->evst_pool.cur = 0;
+	bvf->evst_sr_pool.num = k;
+	bvf->evst_sr_pool.cur = 0;
 
-	bvf->evst = pull_eval_state(bvf);
+	bvf->evst_tp_pool.ent = bvf->evst_sr_pool.ent + k;
+	bvf->evst_tp_pool.num = n - k;
+	bvf->evst_tp_pool.cur = 0;
+
+	bvf->evst = pull_eval_state(&bvf->evst_sr_pool);
 	return 0;
 }
 
+/*
+ * try to allocate and initialise new eval state for given node.
+ * later if no errors will be encountered, this state will be accepted as
+ * one of the possible 'safe' states for that node.
+ */
+static void
+save_start_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+	RTE_ASSERT(node->evst.start == NULL);
+
+	/* limit number of states for one node with some reasonable value */
+	if (node->evst.nb_safe >= NODE_EVST_MAX)
+		return;
+
+	/* try to get new eval_state */
+	node->evst.start = pull_eval_state(&bvf->evst_tp_pool);
+
+	/* make a copy of current state */
+	if (node->evst.start != NULL) {
+		memcpy(node->evst.start, bvf->evst, sizeof(*node->evst.start));
+		SLIST_NEXT(node->evst.start, next) = NULL;
+	}
+}
+
+/*
+ * add @start state to the list of @safe states.
+ */
+static void
+save_safe_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+	if (node->evst.start == NULL)
+		return;
+
+	SLIST_INSERT_HEAD(&node->evst.safe, node->evst.start, next);
+	node->evst.nb_safe++;
+
+	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
+		__func__, bvf, get_node_idx(bvf, node), node->evst.start,
+		node->evst.nb_safe);
+
+	node->evst.start = NULL;
+}
+
 /*
  * Save current eval state.
  */
 static int
-save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+save_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 {
 	struct bpf_eval_state *st;
 
 	/* get new eval_state for this node */
-	st = pull_eval_state(bvf);
+	st = pull_eval_state(&bvf->evst_sr_pool);
 	if (st == NULL) {
 		RTE_BPF_LOG(ERR,
@@ -2159,9 +2227,11 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 
 	/* swap current state with new one */
-	node->evst = bvf->evst;
+	RTE_ASSERT(node->evst.cur == NULL);
+	node->evst.cur = bvf->evst;
 	bvf->evst = st;
 
 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
-		__func__, bvf, get_node_idx(bvf, node), node->evst, bvf->evst);
+		__func__, bvf, get_node_idx(bvf, node), node->evst.cur,
+		bvf->evst);
 
 	return 0;
@@ -2172,12 +2242,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
  */
 static void
-restore_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+restore_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 {
 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
-		__func__, bvf, get_node_idx(bvf, node), bvf->evst, node->evst);
+		__func__, bvf, get_node_idx(bvf, node), bvf->evst,
+		node->evst.cur);
 
-	bvf->evst = node->evst;
-	node->evst = NULL;
-	push_eval_state(bvf);
+	bvf->evst = node->evst.cur;
+	node->evst.cur = NULL;
+	push_eval_state(&bvf->evst_sr_pool);
 }
 
@@ -2196,5 +2267,5 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
 	rte_log(loglvl, rte_bpf_logtype,
 		"r%u={\n"
-		"\tv={type=%u, size=%zu},\n"
+		"\tv={type=%u, size=%zu, buf_size=%zu},\n"
 		"\tmask=0x%" PRIx64 ",\n"
 		"\tu={min=0x%" PRIx64 ", max=0x%" PRIx64 "},\n"
@@ -2202,5 +2273,5 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
 		"};\n",
 		ins->dst_reg,
-		rv->v.type, rv->v.size,
+		rv->v.type, rv->v.size, rv->v.buf_size,
 		rv->mask,
 		rv->u.min, rv->u.max,
@@ -2209,11 +2280,109 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
 
 /*
- * Do second pass through CFG and try to evaluate instructions
- * via each possible path.
- * Right now evaluation functionality is quite limited.
- * Still need to add extra checks for:
- * - use/return uninitialized registers.
- * - use uninitialized data from the stack.
- * - memory boundaries violation.
+ * compare two evaluation states.
+ * returns zero if @lv is more conservative (safer) then @rv.
+ * returns non-zero value otherwise.
+ */
+static int
+cmp_reg_val_within(const struct bpf_reg_val *lv, const struct bpf_reg_val *rv)
+{
+	/* expect @v and @mask to be identical */
+	if (memcmp(&lv->v, &rv->v, sizeof(lv->v)) != 0 || lv->mask != rv->mask)
+		return -1;
+
+	/* exact match only for mbuf and stack pointers */
+	if (lv->v.type == RTE_BPF_ARG_PTR_MBUF ||
+			lv->v.type == BPF_ARG_PTR_STACK)
+		return -1;
+
+	if (lv->u.min <= rv->u.min && lv->u.max >= rv->u.max &&
+			lv->s.min <= rv->s.min && lv->s.max >= rv->s.max)
+		return 0;
+
+	return -1;
+}
+
+/*
+ * compare two evaluation states.
+ * returns zero if they are identical.
+ * returns positive value if @lv is more conservative (safer) then @rv.
+ * returns negative value otherwise.
+ */
+static int
+cmp_eval_state(const struct bpf_eval_state *lv, const struct bpf_eval_state *rv)
+{
+	int32_t rc;
+	uint32_t i, k;
+
+	/* for stack expect identical values */
+	rc = memcmp(lv->sv, rv->sv, sizeof(lv->sv));
+	if (rc != 0)
+		return -(2 * EBPF_REG_NUM);
+
+	k = 0;
+	/* check register values */
+	for (i = 0; i != RTE_DIM(lv->rv); i++) {
+		rc = memcmp(&lv->rv[i], &rv->rv[i], sizeof(lv->rv[i]));
+		if (rc != 0 && cmp_reg_val_within(&lv->rv[i], &rv->rv[i]) != 0)
+			return -(i + 1);
+		k += (rc != 0);
+	}
+
+	return k;
+}
+
+/*
+ * check did we already evaluated that path and can it be pruned that time.
+ */
+static int
+prune_eval_state(struct bpf_verifier *bvf, const struct inst_node *node,
+	struct inst_node *next)
+{
+	int32_t rc;
+	struct bpf_eval_state *safe;
+
+	rc = INT32_MIN;
+	SLIST_FOREACH(safe, &next->evst.safe, next) {
+		rc = cmp_eval_state(safe, bvf->evst);
+		if (rc >= 0)
+			break;
+	}
+
+	rc = (rc >= 0) ? 0 : -1;
+
+	/*
+	 * current state doesn't match any safe states,
+	 * so no prunning is possible right now,
+	 * track current state for future references.
+	 */
+	if (rc != 0)
+		save_start_eval_state(bvf, next);
+
+	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
+		"next->evst.start=%p, next->evst.nb_safe=%u\n",
+		__func__, bvf, get_node_idx(bvf, node),
+		get_node_idx(bvf, next), rc,
+		next->evst.start, next->evst.nb_safe);
+	return rc;
+}
+
+/* Do second pass through CFG and try to evaluate instructions
+ * via each possible path. The verifier will try all paths, tracking types of
+ * registers used as input to instructions, and updating resulting type via
+ * register state values. Plus for each register and possible stack value it
+ * tries to estimate possible max/min value.
+ * For conditional jumps, a stack is used to save evaluation state, so one
+ * path is explored while the state for the other path is pushed onto the stack.
+ * Then later, we backtrack to the first pushed instruction and repeat the cycle
+ * until the stack is empty and we're done.
+ * For program with many conditional branches walking through all possible path
+ * could be very excessive. So to minimize number of evaluations we use
+ * heuristic similar to what Linux kernel does - state pruning:
+ * If from given instruction for given program state we explore all possible
+ * paths and for each of them reach _exit() without any complaints and a valid
+ * R0 value, then for that instruction, that program state can be marked as
+ * 'safe'. When we later arrive at the same instruction with a state
+ * equivalent to an earlier instruction's 'safe' state, we can prune the search.
+ * For now, only states for JCC  targets are saved/examined.
  */
 static int
@@ -2226,4 +2395,11 @@ evaluate(struct bpf_verifier *bvf)
 	struct inst_node *next, *node;
 
+	struct {
+		uint32_t nb_eval;
+		uint32_t nb_prune;
+		uint32_t nb_save;
+		uint32_t nb_restore;
+	} stats;
+
 	/* initial state of frame pointer */
 	static const struct bpf_reg_val rvfp = {
@@ -2249,4 +2425,6 @@ evaluate(struct bpf_verifier *bvf)
 	rc = 0;
 
+	memset(&stats, 0, sizeof(stats));
+
 	while (node != NULL && rc == 0) {
 
@@ -2262,9 +2440,12 @@ evaluate(struct bpf_verifier *bvf)
 
 			/* for jcc node make a copy of evaluation state */
-			if (node->nb_edge > 1)
-				rc |= save_eval_state(bvf, node);
+			if (node->nb_edge > 1) {
+				rc |= save_cur_eval_state(bvf, node);
+				stats.nb_save++;
+			}
 
 			if (ins_chk[op].eval != NULL && rc == 0) {
 				err = ins_chk[op].eval(bvf, ins + idx);
+				stats.nb_eval++;
 				if (err != NULL) {
 					RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
@@ -2280,19 +2461,35 @@ evaluate(struct bpf_verifier *bvf)
 		/* proceed through CFG */
 		next = get_next_node(bvf, node);
+
 		if (next != NULL) {
 
 			/* proceed with next child */
 			if (node->cur_edge == node->nb_edge &&
-					node->evst != NULL)
-				restore_eval_state(bvf, node);
+					node->evst.cur != NULL) {
+				restore_cur_eval_state(bvf, node);
+				stats.nb_restore++;
+			}
 
-			next->prev_node = get_node_idx(bvf, node);
-			node = next;
+			/*
+			 * for jcc targets: check did we already evaluated
+			 * that path and can it's evaluation be skipped that
+			 * time.
+			 */
+			if (node->nb_edge > 1 && prune_eval_state(bvf, node,
+					next) == 0) {
+				next = NULL;
+				stats.nb_prune++;
+			} else {
+				next->prev_node = get_node_idx(bvf, node);
+				node = next;
+			}
 		} else {
 			/*
 			 * finished with current node and all it's kids,
-			 * proceed with parent
+			 * mark it's @start state as safe for future references,
+			 * and proceed with parent.
 			 */
 			node->cur_edge = 0;
+			save_safe_eval_state(bvf, node);
 			node = get_prev_node(bvf, node);
 
@@ -2303,4 +2500,12 @@ evaluate(struct bpf_verifier *bvf)
 	}
 
+	RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"
+		"node evaluations=%u;\n"
+		"state pruned=%u;\n"
+		"state saves=%u;\n"
+		"state restores=%u;\n",
+		__func__, bvf, rc,
+		stats.nb_eval, stats.nb_prune, stats.nb_save, stats.nb_restore);
+
 	return rc;
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.601180936 +0100
+++ 0058-bpf-fix-load-hangs-with-six-IPv6-addresses.patch	2024-08-23 17:18:09.722430112 +0100
@@ -1 +1 @@
-From a258eebdfb22f95a8a44d31b0eab639aed0a0c4b Mon Sep 17 00:00:00 2001
+From 7598b5b537e6b1b4f5f2409153359b7d04594baf Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]
+
@@ -38 +39,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index 11344fff4d..4f47d6dc7b 100644
+index 81bede3701..dfbef6ca42 100644
@@ -52 +53 @@
-@@ -30,8 +30,11 @@ struct bpf_reg_val {
+@@ -32,8 +32,11 @@ struct bpf_reg_val {
@@ -64 +65 @@
-@@ -53,4 +56,7 @@ enum {
+@@ -55,4 +58,7 @@ enum {
@@ -72 +73 @@
-@@ -60,5 +66,16 @@ struct inst_node {
+@@ -62,5 +68,16 @@ struct inst_node {
@@ -90 +91 @@
-@@ -74,9 +91,6 @@ struct bpf_verifier {
+@@ -76,9 +93,6 @@ struct bpf_verifier {
@@ -102 +103 @@
-@@ -1086,5 +1100,5 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
+@@ -1088,5 +1102,5 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
@@ -109 +110 @@
-@@ -1815,6 +1829,6 @@ add_edge(struct bpf_verifier *bvf, struct inst_node *node, uint32_t nidx)
+@@ -1817,6 +1831,6 @@ add_edge(struct bpf_verifier *bvf, struct inst_node *node, uint32_t nidx)
@@ -112,4 +113,4 @@
--		RTE_BPF_LOG_LINE(ERR, "%s: program boundary violation at pc: %u, "
--			"next pc: %u",
-+		RTE_BPF_LOG_LINE(ERR,
-+			"%s: program boundary violation at pc: %u, next pc: %u",
+-		RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
+-			"next pc: %u\n",
++		RTE_BPF_LOG(ERR,
++			"%s: program boundary violation at pc: %u, next pc: %u\n",
@@ -118 +119 @@
-@@ -2092,20 +2106,21 @@ validate(struct bpf_verifier *bvf)
+@@ -2094,20 +2108,21 @@ validate(struct bpf_verifier *bvf)
@@ -147 +148 @@
-@@ -2114,6 +2129,7 @@ evst_pool_fini(struct bpf_verifier *bvf)
+@@ -2116,6 +2131,7 @@ evst_pool_fini(struct bpf_verifier *bvf)
@@ -157 +158 @@
-@@ -2121,29 +2137,81 @@ static int
+@@ -2123,29 +2139,81 @@ static int
@@ -227 +228 @@
-+	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;",
++	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
@@ -247,2 +248,2 @@
- 		RTE_BPF_LOG_LINE(ERR,
-@@ -2157,9 +2225,11 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+ 		RTE_BPF_LOG(ERR,
+@@ -2159,9 +2227,11 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
@@ -256 +257 @@
- 	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -262 +263 @@
-@@ -2170,12 +2240,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+@@ -2172,12 +2242,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
@@ -268 +269 @@
- 	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -281,2 +282,2 @@
-@@ -2194,5 +2265,5 @@ log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
- 	RTE_LOG(DEBUG, BPF,
+@@ -2196,5 +2267,5 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+ 	rte_log(loglvl, rte_bpf_logtype,
@@ -288 +289 @@
-@@ -2200,5 +2271,5 @@ log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+@@ -2202,5 +2273,5 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
@@ -295 +296 @@
-@@ -2207,11 +2278,109 @@ log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+@@ -2209,11 +2280,109 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
@@ -384,2 +385,2 @@
-+	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
-+		"next->evst.start=%p, next->evst.nb_safe=%u",
++	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
++		"next->evst.start=%p, next->evst.nb_safe=%u\n",
@@ -412 +413 @@
-@@ -2224,4 +2393,11 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2226,4 +2395,11 @@ evaluate(struct bpf_verifier *bvf)
@@ -424 +425 @@
-@@ -2247,4 +2423,6 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2249,4 +2425,6 @@ evaluate(struct bpf_verifier *bvf)
@@ -431 +432 @@
-@@ -2260,9 +2438,12 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2262,9 +2440,12 @@ evaluate(struct bpf_verifier *bvf)
@@ -445,2 +446,2 @@
- 					RTE_BPF_LOG_LINE(ERR, "%s: %s at pc: %u",
-@@ -2278,19 +2459,35 @@ evaluate(struct bpf_verifier *bvf)
+ 					RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
+@@ -2280,19 +2461,35 @@ evaluate(struct bpf_verifier *bvf)
@@ -487 +488 @@
-@@ -2301,4 +2498,12 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2303,4 +2500,12 @@ evaluate(struct bpf_verifier *bvf)
@@ -490 +491 @@
-+	RTE_LOG(DEBUG, BPF, "%s(%p) returns %d, stats:\n"
++	RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"


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

* patch 'telemetry: fix connection parameter parsing' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (56 preceding siblings ...)
  2024-08-23 16:18 ` patch 'bpf: fix load hangs with six IPv6 addresses' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'baseband/la12xx: forbid secondary process' " Kevin Traynor
                   ` (76 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Song Jiale, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/38c54ad34e8f942401837c91c843954c3785f730

Thanks.

Kevin

---
From 38c54ad34e8f942401837c91c843954c3785f730 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Fri, 21 Jun 2024 10:40:37 +0800
Subject: [PATCH] telemetry: fix connection parameter parsing

[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]

For calling memcpy when the source and destination addresses are the same,
there is a small probability that there will be a copy error issue in some
environments, resulting in a failure to connect.

This patch uses memmove instead of memcpy to avoid this issue.

Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
 lib/telemetry/telemetry_legacy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/telemetry/telemetry_legacy.c b/lib/telemetry/telemetry_legacy.c
index 8aba44d689..5996fe83cf 100644
--- a/lib/telemetry/telemetry_legacy.c
+++ b/lib/telemetry/telemetry_legacy.c
@@ -94,5 +94,5 @@ register_client(const char *cmd __rte_unused, const char *params,
 #ifndef RTE_EXEC_ENV_WINDOWS
 	strlcpy(data, strchr(params, ':'), sizeof(data));
-	memcpy(data, &data[strlen(":\"")], strlen(data));
+	memmove(data, &data[strlen(":\"")], strlen(data));
 	if (!strchr(data, '\"')) {
 		fprintf(stderr, "Invalid client data\n");
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.625099138 +0100
+++ 0059-telemetry-fix-connection-parameter-parsing.patch	2024-08-23 17:18:09.723430116 +0100
@@ -1 +1 @@
-From efdf81829076198189ba6ccbb2e5c50270f56992 Mon Sep 17 00:00:00 2001
+From 38c54ad34e8f942401837c91c843954c3785f730 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 4c1d1c353a..578230732c 100644
+index 8aba44d689..5996fe83cf 100644
@@ -25 +26 @@
-@@ -95,5 +95,5 @@ register_client(const char *cmd __rte_unused, const char *params,
+@@ -94,5 +94,5 @@ register_client(const char *cmd __rte_unused, const char *params,


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

* patch 'baseband/la12xx: forbid secondary process' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (57 preceding siblings ...)
  2024-08-23 16:18 ` patch 'telemetry: fix connection parameter parsing' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'crypto/cnxk: fix minimal input normalization' " Kevin Traynor
                   ` (75 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f7e28211b7e68e46b3142e62955dd45114429456

Thanks.

Kevin

---
From f7e28211b7e68e46b3142e62955dd45114429456 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 2 Jul 2024 11:39:21 +0530
Subject: [PATCH] baseband/la12xx: forbid secondary process

[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]

The la12xx driver do not have any checks for secondary process
and it causes the system to try to initialize the driver, causing
segmentation faults.
LA12xx driver do not support multi-processing.
Return when not called from Primary process.

Fixes: f218a1f92017 ("baseband/la12xx: introduce NXP LA12xx driver")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/la12xx/bbdev_la12xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index 4b05b5d3f2..dfebcd5c81 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -1077,4 +1077,7 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
 	PMD_INIT_FUNC_TRACE();
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	if (vdev == NULL)
 		return -EINVAL;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.647768757 +0100
+++ 0060-baseband-la12xx-forbid-secondary-process.patch	2024-08-23 17:18:09.723430116 +0100
@@ -1 +1 @@
-From 95547dc69119154c85abfa7e8523e83a7ac05c9e Mon Sep 17 00:00:00 2001
+From f7e28211b7e68e46b3142e62955dd45114429456 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index bb754a5395..1a56e73abd 100644
+index 4b05b5d3f2..dfebcd5c81 100644
@@ -25 +26 @@
-@@ -1085,4 +1085,7 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
+@@ -1077,4 +1077,7 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)


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

* patch 'crypto/cnxk: fix minimal input normalization' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (58 preceding siblings ...)
  2024-08-23 16:18 ` patch 'baseband/la12xx: forbid secondary process' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'cryptodev: fix build without crypto callbacks' " Kevin Traynor
                   ` (74 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/87bdd9a583f3a3a947cb505476eff31746a10911

Thanks.

Kevin

---
From 87bdd9a583f3a3a947cb505476eff31746a10911 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:48:18 +0530
Subject: [PATCH] crypto/cnxk: fix minimal input normalization

[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]

Fix modex to nomalize input only when MSW is zero.

Fixes: 5a3513caeb45 ("crypto/cnxk: add asymmetric session")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/crypto/cnxk/cnxk_ae.h | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index 6222171fe6..16d67a8153 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -26,11 +26,20 @@ struct cnxk_ae_sess {
 
 static __rte_always_inline void
-cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len)
+cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len, size_t max)
 {
+	uint8_t msw_len = *len % 8;
+	uint64_t msw_val = 0;
 	size_t i;
 
-	/* Strip leading NUL bytes */
-	for (i = 0; i < *len; i++) {
-		if ((*data)[i] != 0)
+	if (*len <= 8)
+		return;
+
+	memcpy(&msw_val, *data, msw_len);
+	if (msw_val != 0)
+		return;
+
+	for (i = msw_len; i < *len && (*len - i) < max; i += 8) {
+		memcpy(&msw_val, &(*data)[i], 8);
+		if (msw_val != 0)
 			break;
 	}
@@ -49,6 +58,6 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
 	uint8_t *mod = xform->modex.modulus.data;
 
-	cnxk_ae_modex_param_normalize(&mod, &mod_len);
-	cnxk_ae_modex_param_normalize(&exp, &exp_len);
+	cnxk_ae_modex_param_normalize(&mod, &mod_len, SIZE_MAX);
+	cnxk_ae_modex_param_normalize(&exp, &exp_len, mod_len);
 
 	if (unlikely(exp_len == 0 || mod_len == 0))
@@ -223,5 +232,5 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
 	uint64_t total_key_len;
 	union cpt_inst_w4 w4;
-	uint32_t base_len;
+	size_t base_len;
 	uint32_t dlen;
 	uint8_t *dptr;
@@ -231,6 +240,9 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
 	base_len = mod_op.base.length;
 	if (unlikely(base_len > mod_len)) {
-		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
-		return -ENOTSUP;
+		cnxk_ae_modex_param_normalize(&mod_op.base.data, &base_len, mod_len);
+		if (base_len > mod_len) {
+			op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
+			return -ENOTSUP;
+		}
 	}
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.671036042 +0100
+++ 0061-crypto-cnxk-fix-minimal-input-normalization.patch	2024-08-23 17:18:09.724430119 +0100
@@ -1 +1 @@
-From 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad Mon Sep 17 00:00:00 2001
+From 87bdd9a583f3a3a947cb505476eff31746a10911 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index a843d6b5ef..ef9cb5eb91 100644
+index 6222171fe6..16d67a8153 100644
@@ -20 +21 @@
-@@ -50,11 +50,20 @@ struct cnxk_ae_sess {
+@@ -26,11 +26,20 @@ struct cnxk_ae_sess {
@@ -45 +46 @@
-@@ -73,6 +82,6 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
+@@ -49,6 +58,6 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
@@ -54 +55 @@
-@@ -289,5 +298,5 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
+@@ -223,5 +232,5 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
@@ -61 +62 @@
-@@ -297,6 +306,9 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
+@@ -231,6 +240,9 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,


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

* patch 'cryptodev: fix build without crypto callbacks' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (59 preceding siblings ...)
  2024-08-23 16:18 ` patch 'crypto/cnxk: fix minimal input normalization' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'cryptodev: validate crypto callbacks from next node' " Kevin Traynor
                   ` (73 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Ganapati Kundapura; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a27e346a93f826a8f340ac70e495785837e37651

Thanks.

Kevin

---
From a27e346a93f826a8f340ac70e495785837e37651 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:25 -0500
Subject: [PATCH] cryptodev: fix build without crypto callbacks

[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]

Crypto callbacks APIs are available in header files but when
the macro RTE_CRYPTO_CALLBACKS unset, test application need to
put #ifdef in its code.

The test application should be able to build and run, regardless
DPDK library is built with RTE_CRYPTO_CALLBACKS defined or not.

Added ENOTSUP from the beginning of the APIs implementation
if RTE_CRYPTO_CALLBACKS macro is unset/undefined.

Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue callbacks")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c     | 13 +++++++++++++
 lib/cryptodev/rte_cryptodev.c | 14 ++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 0bd4517bf8..0dd0b4450a 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7,4 +7,5 @@
 
 #include <rte_common.h>
+#include <rte_errno.h>
 #include <rte_hexdump.h>
 #include <rte_mbuf.h>
@@ -11831,4 +11832,10 @@ test_enq_callback_setup(void)
 	cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
 			qp_id, test_enq_callback, NULL);
+	if (rte_errno == ENOTSUP) {
+		RTE_LOG(ERR, USER1, "%s line %d: "
+			"rte_cryptodev_add_enq_callback() "
+			"Not supported, skipped\n", __func__, __LINE__);
+		return TEST_SKIPPED;
+	}
 	TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
 			"cryptodev %u did not fail",
@@ -11931,4 +11938,10 @@ test_deq_callback_setup(void)
 	cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
 			qp_id, test_deq_callback, NULL);
+	if (rte_errno == ENOTSUP) {
+		RTE_LOG(ERR, USER1, "%s line %d: "
+			"rte_cryptodev_add_deq_callback() "
+			"Not supported, skipped\n", __func__, __LINE__);
+		return TEST_SKIPPED;
+	}
 	TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
 			"cryptodev %u did not fail",
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 00fdd18630..f4eb6d7d04 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1270,4 +1270,8 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
 			       void *cb_arg)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	rte_errno = ENOTSUP;
+	return NULL;
+#endif
 	struct rte_cryptodev *dev;
 	struct rte_cryptodev_cb_rcu *list;
@@ -1334,4 +1338,7 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
 				  struct rte_cryptodev_cb *cb)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	return -ENOTSUP;
+#endif
 	struct rte_cryptodev *dev;
 	struct rte_cryptodev_cb **prev_cb, *curr_cb;
@@ -1405,4 +1412,8 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
 			       void *cb_arg)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	rte_errno = ENOTSUP;
+	return NULL;
+#endif
 	struct rte_cryptodev *dev;
 	struct rte_cryptodev_cb_rcu *list;
@@ -1469,4 +1480,7 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
 				  struct rte_cryptodev_cb *cb)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	return -ENOTSUP;
+#endif
 	struct rte_cryptodev *dev;
 	struct rte_cryptodev_cb **prev_cb, *curr_cb;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.693815818 +0100
+++ 0062-cryptodev-fix-build-without-crypto-callbacks.patch	2024-08-23 17:18:09.734430154 +0100
@@ -1 +1 @@
-From cfa443351ef581b7189467842ca102ab710cb7d2 Mon Sep 17 00:00:00 2001
+From a27e346a93f826a8f340ac70e495785837e37651 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
- app/test/test_cryptodev.c     | 12 ++++++++++++
+ app/test/test_cryptodev.c     | 13 +++++++++++++
@@ -25 +26 @@
- 2 files changed, 26 insertions(+)
+ 2 files changed, 27 insertions(+)
@@ -28 +29 @@
-index 75f98b6744..6042db36a4 100644
+index 0bd4517bf8..0dd0b4450a 100644
@@ -31 +32,7 @@
-@@ -14921,4 +14921,10 @@ test_enq_callback_setup(void)
+@@ -7,4 +7,5 @@
+ 
+ #include <rte_common.h>
++#include <rte_errno.h>
+ #include <rte_hexdump.h>
+ #include <rte_mbuf.h>
+@@ -11831,4 +11832,10 @@ test_enq_callback_setup(void)
@@ -42 +49 @@
-@@ -15036,4 +15042,10 @@ test_deq_callback_setup(void)
+@@ -11931,4 +11938,10 @@ test_deq_callback_setup(void)
@@ -54 +61 @@
-index 886eb7adc4..682c9f49d0 100644
+index 00fdd18630..f4eb6d7d04 100644
@@ -57 +64 @@
-@@ -1492,4 +1492,8 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
+@@ -1270,4 +1270,8 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
@@ -66 +73 @@
-@@ -1557,4 +1561,7 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
+@@ -1334,4 +1338,7 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
@@ -73,2 +80,2 @@
- 	RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
-@@ -1631,4 +1638,8 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
+ 	struct rte_cryptodev_cb **prev_cb, *curr_cb;
+@@ -1405,4 +1412,8 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
@@ -83 +90 @@
-@@ -1697,4 +1708,7 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
+@@ -1469,4 +1480,7 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
@@ -90 +97 @@
- 	RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
+ 	struct rte_cryptodev_cb **prev_cb, *curr_cb;


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

* patch 'cryptodev: validate crypto callbacks from next node' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (60 preceding siblings ...)
  2024-08-23 16:18 ` patch 'cryptodev: fix build without crypto callbacks' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " Kevin Traynor
                   ` (72 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Ganapati Kundapura; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6a46407ad764d7ef56d09d80899a4893b97e37c4

Thanks.

Kevin

---
From 6a46407ad764d7ef56d09d80899a4893b97e37c4 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:26 -0500
Subject: [PATCH] cryptodev: validate crypto callbacks from next node

[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]

Crypto callbacks are invoked on checking from head node
which is always valid pointer.

This patch checks next node from the head node if callbacks
registered before invoking callbacks.

Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/rte_cryptodev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index f40f8dd418..eead3d2bff 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1852,5 +1852,5 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
 
 #ifdef RTE_CRYPTO_CALLBACKS
-	if (unlikely(fp_ops->qp.deq_cb != NULL)) {
+	if (unlikely(fp_ops->qp.deq_cb[qp_id].next != NULL)) {
 		struct rte_cryptodev_cb_rcu *list;
 		struct rte_cryptodev_cb *cb;
@@ -1919,5 +1919,5 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
 	qp = fp_ops->qp.data[qp_id];
 #ifdef RTE_CRYPTO_CALLBACKS
-	if (unlikely(fp_ops->qp.enq_cb != NULL)) {
+	if (unlikely(fp_ops->qp.enq_cb[qp_id].next != NULL)) {
 		struct rte_cryptodev_cb_rcu *list;
 		struct rte_cryptodev_cb *cb;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.726514105 +0100
+++ 0063-cryptodev-validate-crypto-callbacks-from-next-node.patch	2024-08-23 17:18:09.735430158 +0100
@@ -1 +1 @@
-From e858d0c9612211ba43d6703cb7834697214a3fe1 Mon Sep 17 00:00:00 2001
+From 6a46407ad764d7ef56d09d80899a4893b97e37c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c946f747fc..bec947f6d5 100644
+index f40f8dd418..eead3d2bff 100644
@@ -25 +26 @@
-@@ -1911,5 +1911,5 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
+@@ -1852,5 +1852,5 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
@@ -32 +33 @@
-@@ -1978,5 +1978,5 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
+@@ -1919,5 +1919,5 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,


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

* patch 'crypto/openssl: optimize 3DES-CTR context init' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (61 preceding siblings ...)
  2024-08-23 16:18 ` patch 'cryptodev: validate crypto callbacks from next node' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'crypto/openssl: set cipher padding once' " Kevin Traynor
                   ` (71 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3e1ff62d6d58e74dfb47a5283de10d2cd8730d17

Thanks.

Kevin

---
From 3e1ff62d6d58e74dfb47a5283de10d2cd8730d17 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:48 +0000
Subject: [PATCH] crypto/openssl: optimize 3DES-CTR context init

[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]

Currently the 3DES-CTR cipher context is initialised for every buffer,
setting the cipher implementation and key - even though for every
buffer in the session these values will be the same.

Change to initialising the cipher context once, before any buffers are
processed, instead.

Throughput performance uplift measurements for 3DES-CTR encrypt on
Ampere Altra Max platform:
1 worker lcore
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          0.16 |               0.21 |    35.3% |
|             256 |          0.20 |               0.22 |     9.4% |
|            1024 |          0.22 |               0.23 |     2.3% |
|            2048 |          0.22 |               0.23 |     0.9% |
|            4096 |          0.22 |               0.23 |     0.9% |

8 worker lcores
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          1.01 |               1.34 |    32.9% |
|             256 |          1.51 |               1.66 |     9.9% |
|            1024 |          1.72 |               1.77 |     2.6% |
|            2048 |          1.76 |               1.78 |     1.1% |
|            4096 |          1.79 |               1.80 |     0.6% |

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 514e93229f..a321258980 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -466,4 +466,13 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
 				sess->cipher.key.data) != 0)
 			return -EINVAL;
+
+
+		/* We use 3DES encryption also for decryption.
+		 * IV is not important for 3DES ECB.
+		 */
+		if (EVP_EncryptInit_ex(sess->cipher.ctx, EVP_des_ede3_ecb(),
+				NULL, sess->cipher.key.data,  NULL) != 1)
+			return -EINVAL;
+
 		break;
 
@@ -1002,6 +1011,5 @@ process_cipher_decrypt_err:
 static int
 process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
-		int offset, uint8_t *iv, uint8_t *key, int srclen,
-		EVP_CIPHER_CTX *ctx)
+		int offset, uint8_t *iv, int srclen, EVP_CIPHER_CTX *ctx)
 {
 	uint8_t ebuf[8], ctr[8];
@@ -1021,10 +1029,4 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
 	l = rte_pktmbuf_data_len(m) - offset;
 
-	/* We use 3DES encryption also for decryption.
-	 * IV is not important for 3DES ecb
-	 */
-	if (EVP_EncryptInit_ex(ctx, EVP_des_ede3_ecb(), NULL, key, NULL) <= 0)
-		goto process_cipher_des3ctr_err;
-
 	memcpy(ctr, iv, 8);
 
@@ -1461,6 +1463,5 @@ process_openssl_cipher_op
 	else
 		status = process_openssl_cipher_des3ctr(mbuf_src, dst,
-				op->sym->cipher.data.offset, iv,
-				sess->cipher.key.data, srclen,
+				op->sym->cipher.data.offset, iv, srclen,
 				ctx_copy);
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.750636699 +0100
+++ 0064-crypto-openssl-optimize-3DES-CTR-context-init.patch	2024-08-23 17:18:09.737430165 +0100
@@ -1 +1 @@
-From 08917edd8b110f9819301ee4f9b152de7c79ddd4 Mon Sep 17 00:00:00 2001
+From 3e1ff62d6d58e74dfb47a5283de10d2cd8730d17 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]
+
@@ -33,2 +34,0 @@
-Cc: stable@dpdk.org
-
@@ -43 +43 @@
-index 3e547c2039..bd09d58d88 100644
+index 514e93229f..a321258980 100644
@@ -46 +46 @@
-@@ -554,4 +554,13 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
+@@ -466,4 +466,13 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -60 +60 @@
-@@ -1173,6 +1182,5 @@ process_cipher_decrypt_err:
+@@ -1002,6 +1011,5 @@ process_cipher_decrypt_err:
@@ -68 +68 @@
-@@ -1192,10 +1200,4 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1021,10 +1029,4 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
@@ -79 +79 @@
-@@ -1741,6 +1743,5 @@ process_openssl_cipher_op
+@@ -1461,6 +1463,5 @@ process_openssl_cipher_op


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

* patch 'crypto/openssl: set cipher padding once' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (62 preceding siblings ...)
  2024-08-23 16:18 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-09-04 14:24   ` Kevin Traynor
  2024-08-23 16:18 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " Kevin Traynor
                   ` (70 subsequent siblings)
  134 siblings, 1 reply; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d6048dac1e75d310ad2dc6b89278567c8c925b56

Thanks.

Kevin

---
From d6048dac1e75d310ad2dc6b89278567c8c925b56 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:51 +0000
Subject: [PATCH] crypto/openssl: set cipher padding once

[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]

Setting the cipher padding has a noticeable performance footprint,
and it doesn't need to be done for every call to
process_openssl_cipher_{en,de}crypt(). Setting it causes OpenSSL to set
it on every future context re-init. Thus, for every buffer after the
first one, the padding is being set twice.

Instead, just set the cipher padding once - when configuring the session
parameters - avoiding the unnecessary double setting behaviour. This is
skipped for AEAD ciphers, where disabling padding is not necessary.

Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          2.97 |               3.72 |    25.2% |
|             256 |          8.10 |               9.42 |    16.3% |
|            1024 |         14.22 |              15.18 |     6.8% |
|            2048 |         16.28 |              16.93 |     4.0% |
|            4096 |         17.58 |              17.97 |     2.2% |

8 worker lcores
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |         21.27 |              29.85 |    40.3% |
|             256 |         60.05 |              75.53 |    25.8% |
|            1024 |        110.11 |             121.56 |    10.4% |
|            2048 |        128.05 |             135.40 |     5.7% |
|            4096 |        139.45 |             143.76 |     3.1% |

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index a321258980..b82f6939a5 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -615,4 +615,6 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
 	}
 
+	EVP_CIPHER_CTX_set_padding(sess->cipher.ctx, 0);
+
 	return 0;
 }
@@ -943,6 +945,4 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
 		goto process_cipher_encrypt_err;
 
-	EVP_CIPHER_CTX_set_padding(ctx, 0);
-
 	if (process_openssl_encryption_update(mbuf_src, offset, &dst,
 			srclen, ctx, inplace))
@@ -993,6 +993,4 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
 		goto process_cipher_decrypt_err;
 
-	EVP_CIPHER_CTX_set_padding(ctx, 0);
-
 	if (process_openssl_decryption_update(mbuf_src, offset, &dst,
 			srclen, ctx, inplace))
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.773953151 +0100
+++ 0065-crypto-openssl-set-cipher-padding-once.patch	2024-08-23 17:18:09.738430168 +0100
@@ -1 +1 @@
-From d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e Mon Sep 17 00:00:00 2001
+From d6048dac1e75d310ad2dc6b89278567c8c925b56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]
+
@@ -36,2 +37,0 @@
-Cc: stable@dpdk.org
-
@@ -46 +46 @@
-index 7e2e505222..101111e85b 100644
+index a321258980..b82f6939a5 100644
@@ -49 +49 @@
-@@ -620,4 +620,6 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
+@@ -615,4 +615,6 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
@@ -56 +56 @@
-@@ -1125,6 +1127,4 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -943,6 +945,4 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
@@ -63 +63 @@
-@@ -1175,6 +1175,4 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -993,6 +993,4 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,


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

* patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (63 preceding siblings ...)
  2024-08-23 16:18 ` patch 'crypto/openssl: set cipher padding once' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " Kevin Traynor
                   ` (69 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/53fc636f1208dcf2869b7b8e10449e585f86b435

Thanks.

Kevin

---
From 53fc636f1208dcf2869b7b8e10449e585f86b435 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 3 Jul 2024 15:56:39 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP-SDAP watchdog error

[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]

Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.

Fixes: 3ba2e519eafa ("common/dpaax/caamflib: support PDCP-SDAP")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/sdap.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h
index 07f55b5b40..084392d7cd 100644
--- a/drivers/common/dpaax/caamflib/desc/sdap.h
+++ b/drivers/common/dpaax/caamflib/desc/sdap.h
@@ -1,4 +1,4 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2020-2021 NXP
+ * Copyright 2020-2023 NXP
  */
 
@@ -705,4 +705,8 @@ static inline int pdcp_sdap_insert_no_snoop_op(
 		MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
 		/* The CHA will be reused so we need to clear it */
 		LOAD(p, CLRW_RESET_CLS1_CHA |
@@ -795,4 +799,8 @@ static inline int pdcp_sdap_insert_no_snoop_op(
 		MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
 		/* Reset class 1 CHA */
 		LOAD(p, CLRW_RESET_CLS1_CHA |
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.798203793 +0100
+++ 0066-common-dpaax-caamflib-fix-PDCP-SDAP-watchdog-error.patch	2024-08-23 17:18:09.739430172 +0100
@@ -1 +1 @@
-From 6671e82e5c6b4858573f4dae665e7f2442913d93 Mon Sep 17 00:00:00 2001
+From 53fc636f1208dcf2869b7b8e10449e585f86b435 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index b38c15a24f..d41bacf8f9 100644
+index 07f55b5b40..084392d7cd 100644
@@ -23 +24 @@
-- * Copyright 2020-2022 NXP
+- * Copyright 2020-2021 NXP
@@ -27 +28 @@
-@@ -629,4 +629,8 @@ static inline int pdcp_sdap_insert_no_snoop_op(
+@@ -705,4 +705,8 @@ static inline int pdcp_sdap_insert_no_snoop_op(
@@ -36 +37 @@
-@@ -719,4 +723,8 @@ static inline int pdcp_sdap_insert_no_snoop_op(
+@@ -795,4 +799,8 @@ static inline int pdcp_sdap_insert_no_snoop_op(


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

* patch 'common/dpaax/caamflib: fix PDCP AES-AES watchdog error' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (64 preceding siblings ...)
  2024-08-23 16:18 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'crypto/dpaa2_sec: fix event queue user context' " Kevin Traynor
                   ` (68 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Varun Sethi; +Cc: Gagandeep Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b9e0305984199d12350f93c408f8391f12e85df0

Thanks.

Kevin

---
From b9e0305984199d12350f93c408f8391f12e85df0 Mon Sep 17 00:00:00 2001
From: Varun Sethi <v.sethi@nxp.com>
Date: Wed, 3 Jul 2024 15:56:40 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP AES-AES watchdog error

[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]

Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.

Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Varun Sethi <v.sethi@nxp.com>
---
 .mailmap                                  |  1 +
 drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/.mailmap b/.mailmap
index ed99e606d5..82e0e35a7d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1419,4 +1419,5 @@ Vakul Garg <vakul.garg@nxp.com>
 Vamsi Attunuru <vattunuru@marvell.com>
 Vanshika Shukla <vanshika.shukla@nxp.com>
+Varun Sethi <v.sethi@nxp.com>
 Vasily Philipov <vasilyf@mellanox.com>
 Veerasenareddy Burru <vburru@marvell.com>
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 2c9c631cfd..73af1141b6 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1304,4 +1304,9 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
 		MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
@@ -1351,4 +1356,9 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
 		MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.821700511 +0100
+++ 0067-common-dpaax-caamflib-fix-PDCP-AES-AES-watchdog-erro.patch	2024-08-23 17:18:09.742430182 +0100
@@ -1 +1 @@
-From ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 Mon Sep 17 00:00:00 2001
+From b9e0305984199d12350f93c408f8391f12e85df0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 502791e0bc..74739ec9be 100644
+index ed99e606d5..82e0e35a7d 100644
@@ -23,2 +24,2 @@
-@@ -1504,4 +1504,5 @@ Vamsi Attunuru <vattunuru@marvell.com>
- Vamsi Krishna Atluri <vamsi.atluri@amd.com>
+@@ -1419,4 +1419,5 @@ Vakul Garg <vakul.garg@nxp.com>
+ Vamsi Attunuru <vattunuru@marvell.com>
@@ -30 +31 @@
-index 7d16c66d79..0ed9eec816 100644
+index 2c9c631cfd..73af1141b6 100644
@@ -33 +34 @@
-@@ -1024,4 +1024,9 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
+@@ -1304,4 +1304,9 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
@@ -43 +44 @@
-@@ -1071,4 +1076,9 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
+@@ -1351,4 +1356,9 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,


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

* patch 'crypto/dpaa2_sec: fix event queue user context' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (65 preceding siblings ...)
  2024-08-23 16:18 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " Kevin Traynor
                   ` (67 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jun Yang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/142297cea42919fe978250823f41b33bdab490c2

Thanks.

Kevin

---
From 142297cea42919fe978250823f41b33bdab490c2 Mon Sep 17 00:00:00 2001
From: Jun Yang <jun.yang@nxp.com>
Date: Wed, 3 Jul 2024 15:56:49 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix event queue user context

[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]

Context configured should be aligned with context got in dq process.
Here the rx_vq is just the first element of qp which covers the issue.

Fixes: bffc7d561c81 ("crypto/dpaa2_sec: support event crypto adapter")

Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c9745f1db0..4e4fe4a54c 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3815,5 +3815,5 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
 
 	cfg.options |= DPSECI_QUEUE_OPT_USER_CTX;
-	cfg.user_ctx = (size_t)(qp);
+	cfg.user_ctx = (size_t)(&qp->rx_vq);
 	if (event->sched_type == RTE_SCHED_TYPE_ATOMIC) {
 		cfg.options |= DPSECI_QUEUE_OPT_ORDER_PRESERVATION;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.847161380 +0100
+++ 0068-crypto-dpaa2_sec-fix-event-queue-user-context.patch	2024-08-23 17:18:09.745430193 +0100
@@ -1 +1 @@
-From 70d3ba14391a33585a739421c6e7300bb50f53aa Mon Sep 17 00:00:00 2001
+From 142297cea42919fe978250823f41b33bdab490c2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 07369a383f..c1f7181d55 100644
+index c9745f1db0..4e4fe4a54c 100644
@@ -21 +22 @@
-@@ -4104,5 +4104,5 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+@@ -3815,5 +3815,5 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,


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

* patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (66 preceding siblings ...)
  2024-08-23 16:18 ` patch 'crypto/dpaa2_sec: fix event queue user context' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-26  8:07   ` [EXTERNAL] " Akhil Goyal
  2024-08-23 16:18 ` patch 'fbarray: fix incorrect lookahead behavior' " Kevin Traynor
                   ` (66 subsequent siblings)
  134 siblings, 1 reply; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Shihong Wang; +Cc: Chaoyong He, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/db8d7d17a9e8b79c8b6bae2044a6fcb819b33700

Thanks.

Kevin

---
From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001
From: Shihong Wang <shihong.wang@corigine.com>
Date: Thu, 14 Mar 2024 10:00:52 +0800
Subject: [PATCH] examples/ipsec-secgw: fix SA salt endianness
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]

The SA salt of struct ipsec_sa is a CPU-endian u32 variable, but it’s
value is stored in an array of encryption or authentication keys
according to big-endian. So it maybe need to convert the endianness
order to ensure that the value assigned to the SA salt is CPU-endian.

Fixes: 50d75cae2a2c ("examples/ipsec-secgw: initialize SA salt")
Fixes: 9413c3901f31 ("examples/ipsec-secgw: support additional algorithms")
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")

Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/sa.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 49d16f055b..af3a92f53e 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 	uint32_t *ri /*rule index*/;
 	struct ipsec_sa_cnt *sa_cnt;
+	rte_be32_t salt; /*big-endian salt*/
 	uint32_t cipher_algo_p = 0;
 	uint32_t auth_algo_p = 0;
@@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				key_len -= 4;
 				rule->cipher_key_len = key_len;
-				memcpy(&rule->salt,
-					&rule->cipher_key[key_len], 4);
+				memcpy(&salt, &rule->cipher_key[key_len], 4);
+				rule->salt = rte_be_to_cpu_32(salt);
 			}
 
@@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				rule->auth_key_len = key_len;
 				rule->iv_len = algo->iv_len;
-				memcpy(&rule->salt,
-					&rule->auth_key[key_len], 4);
+				memcpy(&salt, &rule->auth_key[key_len], 4);
+				rule->salt = rte_be_to_cpu_32(salt);
 			}
 
@@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 			key_len -= 4;
 			rule->cipher_key_len = key_len;
-			memcpy(&rule->salt,
-				&rule->cipher_key[key_len], 4);
+			memcpy(&salt, &rule->cipher_key[key_len], 4);
+			rule->salt = rte_be_to_cpu_32(salt);
 
 			aead_algo_p = 1;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.871795930 +0100
+++ 0069-examples-ipsec-secgw-fix-SA-salt-endianness.patch	2024-08-23 17:18:09.746430196 +0100
@@ -1 +1 @@
-From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001
+From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index c4bac17cd7..8aa9aca739 100644
+index 49d16f055b..af3a92f53e 100644
@@ -30 +31 @@
-@@ -375,4 +375,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -36 +37 @@
-@@ -509,6 +510,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -45 +46 @@
-@@ -574,6 +575,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -54 +55 @@
-@@ -633,6 +634,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,


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

* patch 'fbarray: fix incorrect lookahead behavior' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (67 preceding siblings ...)
  2024-08-23 16:18 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'fbarray: fix incorrect lookbehind " Kevin Traynor
                   ` (65 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/922deb0e231f10820b75bbb1eed3e74f25b8005b

Thanks.

Kevin

---
From 922deb0e231f10820b75bbb1eed3e74f25b8005b Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:32 +0100
Subject: [PATCH] fbarray: fix incorrect lookahead behavior

[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]

Currently, whenever last bit of current index mask is set
(meaning, there is potentially a run starting at the end of the mask),
lookahead loop is entered.
In that loop, if the first bit of lookahead mask is not set,
the lookahead is stopped, and the current lookahead mask index is
assigned to current index mask.
However, because at that point we are inside a for-loop that increments
current index mask after each iteration, this results in erroneous mask
index increment.

Fix lookahead to avoid erroneous increment,
and add corresponding unit test.

Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 .mailmap                            |  1 +
 app/test/test_fbarray.c             | 23 +++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c |  3 ++-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 82e0e35a7d..8b2d737827 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1449,4 +1449,5 @@ Vincent Li <vincent.mc.li@gmail.com>
 Vincent S. Cojot <vcojot@redhat.com>
 Vinh Tran <vinh.t.tran10@gmail.com>
+Vipin Padmam Ramesh <vipinp@vmware.com>
 Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>
 Vipul Ashri <vipul.ashri@oracle.com>
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index a691bf4458..fff44816a1 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -104,4 +104,12 @@ static int empty_msk_test_setup(void)
 }
 
+static int lookahead_test_setup(void)
+{
+	/* set index 64 as used */
+	param.start = 64;
+	param.end = 64;
+	return init_array();
+}
+
 static int test_invalid(void)
 {
@@ -710,4 +718,18 @@ static int test_empty(void)
 }
 
+static int test_lookahead(void)
+{
+	int ret;
+
+	/* run regular test first */
+	ret = test_find();
+	if (ret != TEST_SUCCESS)
+		return ret;
+
+	/* test if we can find free chunk while not starting with 0 */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 1, param.start),
+			param.start + 1, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
 
 static struct unit_test_suite fbarray_test_suite = {
@@ -724,4 +746,5 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
 		TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
+		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
 		TEST_CASES_END()
 	}
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 5903474355..b59dd68d3e 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -240,5 +240,6 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				 */
 				ignore_msk = ~((1ULL << need) - 1);
-				msk_idx = lookahead_idx;
+				/* outer loop will increment msk_idx so add 1 */
+				msk_idx = lookahead_idx - 1;
 				break;
 			}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.894956514 +0100
+++ 0070-fbarray-fix-incorrect-lookahead-behavior.patch	2024-08-23 17:18:09.749430207 +0100
@@ -1 +1 @@
-From 8c03a149ce957b10d7792a2a78339496dd156e9f Mon Sep 17 00:00:00 2001
+From 922deb0e231f10820b75bbb1eed3e74f25b8005b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 74739ec9be..085e5f0004 100644
+index 82e0e35a7d..8b2d737827 100644
@@ -34 +35 @@
-@@ -1535,4 +1535,5 @@ Vincent Li <vincent.mc.li@gmail.com>
+@@ -1449,4 +1449,5 @@ Vincent Li <vincent.mc.li@gmail.com>
@@ -41 +42 @@
-index 26a51e2a3e..bf89b99e5b 100644
+index a691bf4458..fff44816a1 100644
@@ -83 +84 @@
-index 0fe5bcfe06..2680b34823 100644
+index 5903474355..b59dd68d3e 100644
@@ -86 +87 @@
-@@ -237,5 +237,6 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -240,5 +240,6 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,


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

* patch 'fbarray: fix incorrect lookbehind behavior' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (68 preceding siblings ...)
  2024-08-23 16:18 ` patch 'fbarray: fix incorrect lookahead behavior' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'fbarray: fix lookahead ignore mask handling' " Kevin Traynor
                   ` (64 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5bc9924c52d50593a476ebaf94c5342daa85a84f

Thanks.

Kevin

---
From 5bc9924c52d50593a476ebaf94c5342daa85a84f Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:33 +0100
Subject: [PATCH] fbarray: fix incorrect lookbehind behavior

[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]

Currently, whenever first bit of current index mask is set
(meaning, there is potentially a run starting at the start of the mask),
lookbehind loop is entered.
In that loop, if the last bit of lookbehind mask is not set,
the lookbehind is stopped, and the current lookbehind mask index
is assigned to current index mask.
However, because at that point we are inside a while-loop that
decrements current index mask after each iteration,
this results in erroneous mask index decrement.

Fix lookbehind to avoid erroneous decrement, and add corresponding
unit test.

Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 24 ++++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c |  3 ++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index fff44816a1..f448d4f196 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -112,4 +112,12 @@ static int lookahead_test_setup(void)
 }
 
+static int lookbehind_test_setup(void)
+{
+	/* set index 63 as used */
+	param.start = 63;
+	param.end = 63;
+	return init_array();
+}
+
 static int test_invalid(void)
 {
@@ -733,4 +741,19 @@ static int test_lookahead(void)
 }
 
+static int test_lookbehind(void)
+{
+	int ret, free_len = 2;
+
+	/* run regular test first */
+	ret = test_find();
+	if (ret != TEST_SUCCESS)
+		return ret;
+
+	/* test if we can find free chunk while crossing mask boundary */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, param.start + 1, free_len),
+			param.start - free_len, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
+
 static struct unit_test_suite fbarray_test_suite = {
 	.suite_name = "fbarray autotest",
@@ -747,4 +770,5 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
 		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
+		TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
 		TEST_CASES_END()
 	}
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index b59dd68d3e..0013ef2c55 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -516,5 +516,6 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				 */
 				ignore_msk = UINT64_MAX << need;
-				msk_idx = lookbehind_idx;
+				/* outer loop will decrement msk_idx so add 1 */
+				msk_idx = lookbehind_idx + 1;
 				break;
 			}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.920925613 +0100
+++ 0071-fbarray-fix-incorrect-lookbehind-behavior.patch	2024-08-23 17:18:09.749430207 +0100
@@ -1 +1 @@
-From 8e3712928716a1deb8857c971865aa15dc436b04 Mon Sep 17 00:00:00 2001
+From 5bc9924c52d50593a476ebaf94c5342daa85a84f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index bf89b99e5b..147d6e2a07 100644
+index fff44816a1..f448d4f196 100644
@@ -73 +74 @@
-index 2680b34823..b4f0b0b0c3 100644
+index b59dd68d3e..0013ef2c55 100644
@@ -76 +77 @@
-@@ -513,5 +513,6 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -516,5 +516,6 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,


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

* patch 'fbarray: fix lookahead ignore mask handling' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (69 preceding siblings ...)
  2024-08-23 16:18 ` patch 'fbarray: fix incorrect lookbehind " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'fbarray: fix lookbehind " Kevin Traynor
                   ` (63 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0f46faa56ff6ccd95acd4ac2677370bee2e92200

Thanks.

Kevin

---
From 0f46faa56ff6ccd95acd4ac2677370bee2e92200 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:34 +0100
Subject: [PATCH] fbarray: fix lookahead ignore mask handling

[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]

When lookahead mask does not have its first bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore `need` number of bits,
which is incorrect because while there is no *current* run
within those bits, we might still be able to start a new run
within those ignored bits later.

This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.

Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 28 ++++++++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c | 13 ++++++++++---
 2 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index f448d4f196..38a62cd456 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -756,4 +756,30 @@ static int test_lookbehind(void)
 }
 
+static int test_lookahead_mask(void)
+{
+	/*
+	 * There is a certain type of lookahead behavior we want to test here,
+	 * namely masking of bits that were scanned with lookahead but that we
+	 * know do not match our criteria. This is achieved in following steps:
+	 *
+	 *   0. Look for a big enough chunk of free space (say, 62 elements)
+	 *   1. Trigger lookahead by breaking a run somewhere inside mask 0
+	 *      (indices 0-63)
+	 *   2. Fail lookahead by breaking the run somewhere inside mask 1
+	 *      (indices 64-127)
+	 *   3. Ensure that we can still find free space in mask 1 afterwards
+	 */
+
+	/* break run on first mask */
+	rte_fbarray_set_used(&param.arr, 61);
+	/* break run on second mask */
+	rte_fbarray_set_used(&param.arr, 70);
+
+	/* we expect to find free space at 71 */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 0, 62),
+			71, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
+
 static struct unit_test_suite fbarray_test_suite = {
 	.suite_name = "fbarray autotest",
@@ -771,4 +797,6 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
 		TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+		/* setup for these tests is more complex so do it in test func */
+		TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
 		TEST_CASES_END()
 	}
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 0013ef2c55..def47ceef0 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -220,4 +220,6 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				lookahead_idx++) {
 			unsigned int s_idx, need;
+			uint64_t first_bit = 1;
+
 			lookahead_msk = msk->data[lookahead_idx];
 
@@ -229,9 +231,14 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 			need = RTE_MIN(left, MASK_ALIGN);
 
-			for (s_idx = 0; s_idx < need - 1; s_idx++)
+			/* count number of shifts we performed */
+			for (s_idx = 0; s_idx < need - 1; s_idx++) {
 				lookahead_msk &= lookahead_msk >> 1ULL;
+				/* did we lose the run yet? */
+				if ((lookahead_msk & first_bit) == 0)
+					break;
+			}
 
 			/* if first bit is not set, we've lost the run */
-			if ((lookahead_msk & 1) == 0) {
+			if ((lookahead_msk & first_bit) == 0) {
 				/*
 				 * we've scanned this far, so we know there are
@@ -239,5 +246,5 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				 * as well, so skip that on next iteration.
 				 */
-				ignore_msk = ~((1ULL << need) - 1);
+				ignore_msk = ~((1ULL << (s_idx + 1)) - 1);
 				/* outer loop will increment msk_idx so add 1 */
 				msk_idx = lookahead_idx - 1;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.944459067 +0100
+++ 0072-fbarray-fix-lookahead-ignore-mask-handling.patch	2024-08-23 17:18:09.751430214 +0100
@@ -1 +1 @@
-From a344719c181aac28cb2ada0d2ddbfee8ad737a1a Mon Sep 17 00:00:00 2001
+From 0f46faa56ff6ccd95acd4ac2677370bee2e92200 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 147d6e2a07..4b17ef6be3 100644
+index f448d4f196..38a62cd456 100644
@@ -71 +72 @@
-index b4f0b0b0c3..195f8394be 100644
+index 0013ef2c55..def47ceef0 100644
@@ -74 +75 @@
-@@ -217,4 +217,6 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -220,4 +220,6 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
@@ -81 +82 @@
-@@ -226,9 +228,14 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -229,9 +231,14 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
@@ -98 +99 @@
-@@ -236,5 +243,5 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -239,5 +246,5 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,


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

* patch 'fbarray: fix lookbehind ignore mask handling' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (70 preceding siblings ...)
  2024-08-23 16:18 ` patch 'fbarray: fix lookahead ignore mask handling' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'eal/linux: lower log level on allocation attempt failure' " Kevin Traynor
                   ` (62 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8203dd48edd837f382e921be2558190ca0ee4e01

Thanks.

Kevin

---
From 8203dd48edd837f382e921be2558190ca0ee4e01 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:35 +0100
Subject: [PATCH] fbarray: fix lookbehind ignore mask handling

[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]

When lookahead mask does not have its last bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore first `need` bits,
which is incorrect for two reasons: first, using `need` bits as
ignore bit count means we might miss opportunities to start a new run
within those bits, and more importantly when doing lookbehind,
we start looking from the top, so we should be ignoring *last* N bits,
not *first* N bits of the mask.

This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore from the top
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.

Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 27 +++++++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c |  9 +++++++--
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 38a62cd456..3be9e19e78 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -782,4 +782,30 @@ static int test_lookahead_mask(void)
 }
 
+static int test_lookbehind_mask(void)
+{
+	/*
+	 * There is a certain type of lookbehind behavior we want to test here,
+	 * namely masking of bits that were scanned with lookbehind but that we
+	 * know do not match our criteria. This is achieved in two steps:
+	 *
+	 *   0. Look for a big enough chunk of free space (say, 62 elements)
+	 *   1. Trigger lookbehind by breaking a run somewhere inside mask 2
+	 *      (indices 128-191)
+	 *   2. Fail lookbehind by breaking the run somewhere inside mask 1
+	 *      (indices 64-127)
+	 *   3. Ensure that we can still find free space in mask 1 afterwards
+	 */
+
+	/* break run on mask 2 */
+	rte_fbarray_set_used(&param.arr, 130);
+	/* break run on mask 1 */
+	rte_fbarray_set_used(&param.arr, 70);
+
+	/* start from 190, we expect to find free space at 8 */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, 190, 62),
+			8, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
+
 static struct unit_test_suite fbarray_test_suite = {
 	.suite_name = "fbarray autotest",
@@ -799,4 +825,5 @@ static struct unit_test_suite fbarray_test_suite = {
 		/* setup for these tests is more complex so do it in test func */
 		TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
+		TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
 		TEST_CASES_END()
 	}
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index def47ceef0..6dcbff0ba6 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -512,6 +512,11 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 			need = RTE_MIN(left, MASK_ALIGN);
 
-			for (s_idx = 0; s_idx < need - 1; s_idx++)
+			/* count number of shifts we performed */
+			for (s_idx = 0; s_idx < need - 1; s_idx++) {
 				lookbehind_msk &= lookbehind_msk << 1ULL;
+				/* did we lose the run yet? */
+				if ((lookbehind_msk & last_bit) == 0)
+					break;
+			}
 
 			/* if last bit is not set, we've lost the run */
@@ -522,5 +527,5 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				 * as well, so skip that on next iteration.
 				 */
-				ignore_msk = UINT64_MAX << need;
+				ignore_msk = ~(UINT64_MAX << (MASK_ALIGN - s_idx - 1));
 				/* outer loop will decrement msk_idx so add 1 */
 				msk_idx = lookbehind_idx + 1;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.968551157 +0100
+++ 0073-fbarray-fix-lookbehind-ignore-mask-handling.patch	2024-08-23 17:18:09.752430217 +0100
@@ -1 +1 @@
-From 0c6e2781578f37d0497c225acf68ce5ffe31bd8e Mon Sep 17 00:00:00 2001
+From 8203dd48edd837f382e921be2558190ca0ee4e01 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 4b17ef6be3..13c6691e50 100644
+index 38a62cd456..3be9e19e78 100644
@@ -72 +73 @@
-index 195f8394be..63d8b731f5 100644
+index def47ceef0..6dcbff0ba6 100644
@@ -75 +76 @@
-@@ -509,6 +509,11 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -512,6 +512,11 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
@@ -88 +89 @@
-@@ -519,5 +524,5 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -522,5 +527,5 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,


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

* patch 'eal/linux: lower log level on allocation attempt failure' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (71 preceding siblings ...)
  2024-08-23 16:18 ` patch 'fbarray: fix lookbehind " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'app/testpmd: fix help string of BPF load command' " Kevin Traynor
                   ` (61 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a0119434791a6c71bfe6372b9572a8f8618b6b70

Thanks.

Kevin

---
From a0119434791a6c71bfe6372b9572a8f8618b6b70 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 26 Jun 2024 16:51:42 +0200
Subject: [PATCH] eal/linux: lower log level on allocation attempt failure

[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]

On a ARM system with only 2MB hugepages configured, EAL emits an error
log with allocations larger than 512MB.

Example with testpmd:
$ dpdk-testpmd --in-memory --no-pci --log-level=*:debug -- -i
...
EAL: In-memory mode enabled, hugepages of size 33554432 bytes will be
	allocated anonymously
EAL: No free 32768 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 65536 bytes will be
	allocated anonymously
EAL: No free 64 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 1073741824 bytes will be
	allocated anonymously
EAL: No free 1048576 kB hugepages reported on node 0
...
EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824
EAL: Detected memory type: socket_id:0 hugepage_sz:33554432
EAL: Detected memory type: socket_id:0 hugepage_sz:2097152
EAL: Detected memory type: socket_id:0 hugepage_sz:65536
EAL: Creating 2 segment lists: n_segs:32 socket_id:0
	hugepage_sz:1073741824
...
EAL: Creating 2 segment lists: n_segs:1024 socket_id:0
	hugepage_sz:33554432
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
	hugepage_sz:2097152
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
	hugepage_sz:65536
...
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: alloc_seg(): mmap() failed: Cannot allocate memory
EAL: Ask a virtual area of 0x40000000 bytes
EAL: Virtual area found at 0x140000000 (size = 0x40000000)
EAL: attempted to allocate 2 segments, but only 0 were allocated
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: eal_memalloc_alloc_seg_bulk(): couldn't find suitable memseg_list
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: Restoring previous memory policy: 4
EAL: request: mp_malloc_sync
EAL: No shared files mode enabled, IPC is disabled
EAL: Heap on socket 0 was expanded by 1064MB
...

The reason is that the memzone allocation (~1GB large) would require
17017 (32kB) segments. However, as displayed in the early logs, a 32kB
memory segment list can only host 8192 segments (controlled by the build
option RTE_MAX_MEMSEG_PER_LIST).

This log message is misleading as there is no issue in the end: the
allocation succeeded with 2MB hugepages.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/eal/linux/eal_memalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index 16b58d861b..05d45d7f54 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -1035,5 +1035,5 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz,
 	ret = rte_memseg_list_walk_thread_unsafe(alloc_seg_walk, &wa);
 	if (ret == 0) {
-		RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
+		RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",
 			__func__);
 		ret = -1;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.992440765 +0100
+++ 0074-eal-linux-lower-log-level-on-allocation-attempt-fail.patch	2024-08-23 17:18:09.753430221 +0100
@@ -1 +1 @@
-From 8f4611d893b4eeffb942fffdadc4cde394e4c309 Mon Sep 17 00:00:00 2001
+From a0119434791a6c71bfe6372b9572a8f8618b6b70 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]
+
@@ -66 +67,0 @@
-Cc: stable@dpdk.org
@@ -75 +76 @@
-index 0cc3295994..e354efc95d 100644
+index 16b58d861b..05d45d7f54 100644
@@ -78 +79 @@
-@@ -1062,5 +1062,5 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz,
+@@ -1035,5 +1035,5 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz,
@@ -81,2 +82,2 @@
--		EAL_LOG(ERR, "%s(): couldn't find suitable memseg_list",
-+		EAL_LOG(DEBUG, "%s(): couldn't find suitable memseg_list",
+-		RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
++		RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",


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

* patch 'app/testpmd: fix help string of BPF load command' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (72 preceding siblings ...)
  2024-08-23 16:18 ` patch 'eal/linux: lower log level on allocation attempt failure' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'bus/dpaa: fix bus scan for DMA devices' " Kevin Traynor
                   ` (60 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/aa29d0a050879905d6993c974668d5be0904a77f

Thanks.

Kevin

---
From aa29d0a050879905d6993c974668d5be0904a77f Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:58:52 +0800
Subject: [PATCH] app/testpmd: fix help string of BPF load command

[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]

Based on the logic of 'bpf_parse_flags()' and the 'bpf-load' section of
'testpmd_funcs.rst' document, the 'B' flag in the help string of
bpf-load command should be '-'.

Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
 app/test-pmd/bpf_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 09c8aec0c0..e3bfd97252 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -138,5 +138,5 @@ cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
 	.f = cmd_operate_bpf_ld_parsed,
 	.data = NULL,
-	.help_str = "bpf-load rx|tx <port> <queue> <J|M|B> <file_name>",
+	.help_str = "bpf-load rx|tx <port> <queue> <J|M|-> <file_name>",
 	.tokens = {
 		(void *)&cmd_load_bpf_start,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.015791651 +0100
+++ 0075-app-testpmd-fix-help-string-of-BPF-load-command.patch	2024-08-23 17:18:09.753430221 +0100
@@ -1 +1 @@
-From 34890bfa6e11bae143064825c22755d842531e40 Mon Sep 17 00:00:00 2001
+From aa29d0a050879905d6993c974668d5be0904a77f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 46f6b7d6d2..24d34f983e 100644
+index 09c8aec0c0..e3bfd97252 100644
@@ -25 +26 @@
-@@ -140,5 +140,5 @@ cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
+@@ -138,5 +138,5 @@ cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {


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

* patch 'bus/dpaa: fix bus scan for DMA devices' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (73 preceding siblings ...)
  2024-08-23 16:18 ` patch 'app/testpmd: fix help string of BPF load command' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'bus/dpaa: fix memory leak in bus scan' " Kevin Traynor
                   ` (59 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0c4a31c9b7b912f3f2a6728475c5adbf7c905221

Thanks.

Kevin

---
From 0c4a31c9b7b912f3f2a6728475c5adbf7c905221 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:27 +0530
Subject: [PATCH] bus/dpaa: fix bus scan for DMA devices

[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]

If there is no sec device available, code is not scanning QDMA dev.
This patch fixes this problem by adding a goto statement instead
of return in case no sec device available.

Fixes: 583f3732974f ("dma/dpaa: introduce DPAA DMA driver skeleton")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 7fba928d59..79926c73bb 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -212,5 +212,5 @@ dpaa_create_device_list(void)
 	if (dpaa_sec_available()) {
 		DPAA_BUS_LOG(INFO, "DPAA SEC devices are not available");
-		return 0;
+		goto qdma_dpaa;
 	}
 
@@ -251,4 +251,5 @@ dpaa_create_device_list(void)
 	rte_dpaa_bus.device_count += i;
 
+qdma_dpaa:
 	/* Creating QDMA Device */
 	for (i = 0; i < RTE_DPAA_QDMA_DEVICES; i++) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.038263812 +0100
+++ 0076-bus-dpaa-fix-bus-scan-for-DMA-devices.patch	2024-08-23 17:18:09.754430224 +0100
@@ -1 +1 @@
-From bf62ec7f0c99e861b65f550191b98377ac9dd2f9 Mon Sep 17 00:00:00 2001
+From 0c4a31c9b7b912f3f2a6728475c5adbf7c905221 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 64b748626b..b8f41ec069 100644
+index 7fba928d59..79926c73bb 100644
@@ -23 +24 @@
-@@ -222,5 +222,5 @@ dpaa_create_device_list(void)
+@@ -212,5 +212,5 @@ dpaa_create_device_list(void)
@@ -30 +31 @@
-@@ -261,4 +261,5 @@ dpaa_create_device_list(void)
+@@ -251,4 +251,5 @@ dpaa_create_device_list(void)


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

* patch 'bus/dpaa: fix memory leak in bus scan' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (74 preceding siblings ...)
  2024-08-23 16:18 ` patch 'bus/dpaa: fix bus scan for DMA devices' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'common/dpaax: fix IOVA table cleanup' " Kevin Traynor
                   ` (58 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/705e44a778bea66a1c694c841a275d236620cafc

Thanks.

Kevin

---
From 705e44a778bea66a1c694c841a275d236620cafc Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:28 +0530
Subject: [PATCH] bus/dpaa: fix memory leak in bus scan

[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]

Resource leak:
variable dev is going out of scope leaks the storage.

Coverity issue: 373703
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 79926c73bb..81ac971fbe 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -179,4 +179,5 @@ dpaa_create_device_list(void)
 			DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
 			ret = -ENOMEM;
+			free(dev);
 			goto cleanup;
 		}
@@ -230,4 +231,5 @@ dpaa_create_device_list(void)
 			DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
 			ret = -ENOMEM;
+			free(dev);
 			goto cleanup;
 		}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.061869638 +0100
+++ 0077-bus-dpaa-fix-memory-leak-in-bus-scan.patch	2024-08-23 17:18:09.754430224 +0100
@@ -1 +1 @@
-From de0833ffe31739fd40789b1580025bc849d8871f Mon Sep 17 00:00:00 2001
+From 705e44a778bea66a1c694c841a275d236620cafc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b8f41ec069..1f6997c77e 100644
+index 79926c73bb..81ac971fbe 100644
@@ -23 +24 @@
-@@ -189,4 +189,5 @@ dpaa_create_device_list(void)
+@@ -179,4 +179,5 @@ dpaa_create_device_list(void)
@@ -29 +30 @@
-@@ -240,4 +241,5 @@ dpaa_create_device_list(void)
+@@ -230,4 +231,5 @@ dpaa_create_device_list(void)


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

* patch 'common/dpaax: fix IOVA table cleanup' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (75 preceding siblings ...)
  2024-08-23 16:18 ` patch 'bus/dpaa: fix memory leak in bus scan' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'common/dpaax: fix node array overrun' " Kevin Traynor
                   ` (57 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ce6d37fe9884c322e20ce23fd74fe603b97a6333

Thanks.

Kevin

---
From ce6d37fe9884c322e20ce23fd74fe603b97a6333 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:29 +0530
Subject: [PATCH] common/dpaax: fix IOVA table cleanup

[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]

Fixes incorrect structure free.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/common/dpaax/dpaax_iova_table.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 9daac4bc03..d2a78f4c19 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -1,4 +1,4 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 NXP
+ * Copyright 2018-2023 NXP
  */
 
@@ -256,8 +256,5 @@ void
 dpaax_iova_table_depopulate(void)
 {
-	if (dpaax_iova_table_p == NULL)
-		return;
-
-	rte_free(dpaax_iova_table_p->entries);
+	rte_free(dpaax_iova_table_p);
 	dpaax_iova_table_p = NULL;
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.084237440 +0100
+++ 0078-common-dpaax-fix-IOVA-table-cleanup.patch	2024-08-23 17:18:09.754430224 +0100
@@ -1 +1 @@
-From 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 Mon Sep 17 00:00:00 2001
+From ce6d37fe9884c322e20ce23fd74fe603b97a6333 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'common/dpaax: fix node array overrun' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (76 preceding siblings ...)
  2024-08-23 16:18 ` patch 'common/dpaax: fix IOVA table cleanup' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'bus/dpaa: remove redundant file descriptor check' " Kevin Traynor
                   ` (56 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1c47e6f9d235054461e5c0673939d2c0ff4e6463

Thanks.

Kevin

---
From 1c47e6f9d235054461e5c0673939d2c0ff4e6463 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:30 +0530
Subject: [PATCH] common/dpaax: fix node array overrun

[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]

Out-of-bounds read, overrunning dynamic array nodes at offset
corresponding to index variable j.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/common/dpaax/dpaax_iova_table.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index d2a78f4c19..860e702333 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -140,8 +140,10 @@ read_memory_node(unsigned int *count)
 
 	DPAAX_DEBUG("Device-tree memory node data:");
-	do {
+
+	while (j > 0) {
+		--j;
 		DPAAX_DEBUG("    %08" PRIx64 " %08zu",
 			    nodes[j].addr, nodes[j].len);
-	} while (--j);
+	}
 
 cleanup:
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.106571153 +0100
+++ 0079-common-dpaax-fix-node-array-overrun.patch	2024-08-23 17:18:09.755430228 +0100
@@ -1 +1 @@
-From fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 Mon Sep 17 00:00:00 2001
+From 1c47e6f9d235054461e5c0673939d2c0ff4e6463 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'bus/dpaa: remove redundant file descriptor check' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (77 preceding siblings ...)
  2024-08-23 16:18 ` patch 'common/dpaax: fix node array overrun' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'fbarray: fix finding for unaligned length' " Kevin Traynor
                   ` (55 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bcfe3d206a8f4f8b160f57f0578cc88ed589ef2c

Thanks.

Kevin

---
From bcfe3d206a8f4f8b160f57f0578cc88ed589ef2c Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 10 Jul 2024 14:25:31 +0530
Subject: [PATCH] bus/dpaa: remove redundant file descriptor check

[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]

This patch removes the redundant file descriptor check.

Coverity issue: 425715
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/bus/dpaa/base/qbman/process.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c
index 9bc92681cd..72fa639987 100644
--- a/drivers/bus/dpaa/base/qbman/process.c
+++ b/drivers/bus/dpaa/base/qbman/process.c
@@ -2,5 +2,5 @@
  *
  * Copyright 2011-2016 Freescale Semiconductor Inc.
- * Copyright 2017,2020 NXP
+ * Copyright 2017,2020,2022,2024 NXP
  *
  */
@@ -28,13 +28,14 @@ static int check_fd(void)
 	int ret;
 
-	if (fd >= 0)
-		return 0;
 	ret = pthread_mutex_lock(&fd_init_lock);
 	assert(!ret);
+
 	/* check again with the lock held */
 	if (fd < 0)
 		fd = open(PROCESS_PATH, O_RDWR);
+
 	ret = pthread_mutex_unlock(&fd_init_lock);
 	assert(!ret);
+
 	return (fd >= 0) ? 0 : -ENODEV;
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.128347905 +0100
+++ 0080-bus-dpaa-remove-redundant-file-descriptor-check.patch	2024-08-23 17:18:09.755430228 +0100
@@ -1 +1 @@
-From 0ca2093f6b3608467bebe9caf27ce98671fb3381 Mon Sep 17 00:00:00 2001
+From bcfe3d206a8f4f8b160f57f0578cc88ed589ef2c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 59e0d641ce..2d805c5bd9 100644
+index 9bc92681cd..72fa639987 100644
@@ -29 +30 @@
-@@ -29,13 +29,14 @@ static int check_fd(void)
+@@ -28,13 +28,14 @@ static int check_fd(void)


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

* patch 'fbarray: fix finding for unaligned length' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (78 preceding siblings ...)
  2024-08-23 16:18 ` patch 'bus/dpaa: remove redundant file descriptor check' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'buildtools: fix build with clang 17 and ASan' " Kevin Traynor
                   ` (54 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3a72f98ab15e44228cb77a0dcd9573d9a9195c4e

Thanks.

Kevin

---
From 3a72f98ab15e44228cb77a0dcd9573d9a9195c4e Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 10 Jul 2024 12:49:26 +0100
Subject: [PATCH] fbarray: fix finding for unaligned length

[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]

When array length is not aligned on a power of 2, we need to mask out the
unaligned bits from the mask whenever we reach the last mask.
However, when both ignore mask (e.g. due to starting at unaligned bit) and
last index ignore mask are specified, we combine them with an OR,
which is incorrect.
Fix it to combine them with AND instead,
and add a unit test covering this case.

The reverse function does not suffer from this issue
because it does not have to deal with array end,
and array beginning is always aligned.

Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 123 +++++++++++++++++++++-------
 lib/eal/common/eal_common_fbarray.c |   2 +-
 2 files changed, 94 insertions(+), 31 deletions(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 3be9e19e78..8a3a3d77ab 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -22,13 +22,30 @@ struct fbarray_testsuite_params {
 
 static struct fbarray_testsuite_params param;
+static struct fbarray_testsuite_params unaligned;
 
 #define FBARRAY_TEST_ARR_NAME "fbarray_autotest"
 #define FBARRAY_TEST_LEN 256
+#define FBARRAY_UNALIGNED_TEST_ARR_NAME "fbarray_unaligned_autotest"
+#define FBARRAY_UNALIGNED_TEST_LEN 60
 #define FBARRAY_TEST_ELT_SZ (sizeof(int))
 
 static int autotest_setup(void)
 {
-	return rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
+	int ret;
+
+	ret = rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
 			FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+	if (ret) {
+		printf("Failed to initialize test array\n");
+		return -1;
+	}
+	ret = rte_fbarray_init(&unaligned.arr, FBARRAY_UNALIGNED_TEST_ARR_NAME,
+			FBARRAY_UNALIGNED_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+	if (ret) {
+		printf("Failed to initialize unaligned test array\n");
+		rte_fbarray_destroy(&param.arr);
+		return -1;
+	}
+	return 0;
 }
 
@@ -36,7 +53,8 @@ static void autotest_teardown(void)
 {
 	rte_fbarray_destroy(&param.arr);
+	rte_fbarray_destroy(&unaligned.arr);
 }
 
-static int init_array(void)
+static int init_aligned(void)
 {
 	int i;
@@ -48,9 +66,33 @@ static int init_array(void)
 }
 
-static void reset_array(void)
+static int init_unaligned(void)
+{
+	int i;
+	for (i = unaligned.start; i <= unaligned.end; i++) {
+		if (rte_fbarray_set_used(&unaligned.arr, i))
+			return -1;
+	}
+	return 0;
+}
+
+static void reset_aligned(void)
 {
 	int i;
 	for (i = 0; i < FBARRAY_TEST_LEN; i++)
 		rte_fbarray_set_free(&param.arr, i);
+	/* reset param as well */
+	param.start = -1;
+	param.end = -1;
+}
+
+static void reset_unaligned(void)
+{
+	int i;
+	for (i = 0; i < FBARRAY_UNALIGNED_TEST_LEN; i++)
+		rte_fbarray_set_free(&unaligned.arr, i);
+	/* reset param as well */
+	unaligned.start = -1;
+	unaligned.end = -1;
+
 }
 
@@ -60,5 +102,5 @@ static int first_msk_test_setup(void)
 	param.start = 3;
 	param.end = 10;
-	return init_array();
+	return init_aligned();
 }
 
@@ -68,5 +110,5 @@ static int cross_msk_test_setup(void)
 	param.start = 70;
 	param.end = 160;
-	return init_array();
+	return init_aligned();
 }
 
@@ -76,5 +118,5 @@ static int multi_msk_test_setup(void)
 	param.start = 3;
 	param.end = FBARRAY_TEST_LEN - 20;
-	return init_array();
+	return init_aligned();
 }
 
@@ -84,5 +126,5 @@ static int last_msk_test_setup(void)
 	param.start = FBARRAY_TEST_LEN - 20;
 	param.end = FBARRAY_TEST_LEN - 1;
-	return init_array();
+	return init_aligned();
 }
 
@@ -92,14 +134,5 @@ static int full_msk_test_setup(void)
 	param.start = 0;
 	param.end = FBARRAY_TEST_LEN - 1;
-	return init_array();
-}
-
-static int empty_msk_test_setup(void)
-{
-	/* do not fill anything in */
-	reset_array();
-	param.start = -1;
-	param.end = -1;
-	return 0;
+	return init_aligned();
 }
 
@@ -109,5 +142,5 @@ static int lookahead_test_setup(void)
 	param.start = 64;
 	param.end = 64;
-	return init_array();
+	return init_aligned();
 }
 
@@ -117,5 +150,13 @@ static int lookbehind_test_setup(void)
 	param.start = 63;
 	param.end = 63;
-	return init_array();
+	return init_aligned();
+}
+
+static int unaligned_test_setup(void)
+{
+	unaligned.start = 0;
+	/* leave one free bit at the end */
+	unaligned.end = FBARRAY_UNALIGNED_TEST_LEN - 2;
+	return init_unaligned();
 }
 
@@ -471,5 +512,5 @@ static int test_basic(void)
 		return TEST_FAILED;
 
-	reset_array();
+	reset_aligned();
 
 	return TEST_SUCCESS;
@@ -714,4 +755,24 @@ static int test_find(void)
 }
 
+static int test_find_unaligned(void)
+{
+	TEST_ASSERT_EQUAL((int)unaligned.arr.count, unaligned.end - unaligned.start + 1,
+			"Wrong element count\n");
+	/* ensure space is free before start */
+	if (ensure_correct(&unaligned.arr, 0, unaligned.start - 1, false))
+		return TEST_FAILED;
+	/* ensure space is occupied where it's supposed to be */
+	if (ensure_correct(&unaligned.arr, unaligned.start, unaligned.end, true))
+		return TEST_FAILED;
+	/* ensure space after end is free as well */
+	if (ensure_correct(&unaligned.arr, unaligned.end + 1, FBARRAY_UNALIGNED_TEST_LEN - 1,
+			false))
+		return TEST_FAILED;
+	/* test if find_biggest API's work correctly */
+	if (test_biggest(&unaligned.arr, unaligned.start, unaligned.end))
+		return TEST_FAILED;
+	return TEST_SUCCESS;
+}
+
 static int test_empty(void)
 {
@@ -815,15 +876,17 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE(test_invalid),
 		TEST_CASE(test_basic),
-		TEST_CASE_ST(first_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(cross_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(multi_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
-		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
-		TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+		TEST_CASE_ST(first_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(cross_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(multi_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(last_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(full_msk_test_setup, reset_aligned, test_find),
+		/* empty test does not need setup */
+		TEST_CASE_ST(NULL, reset_aligned, test_empty),
+		TEST_CASE_ST(lookahead_test_setup, reset_aligned, test_lookahead),
+		TEST_CASE_ST(lookbehind_test_setup, reset_aligned, test_lookbehind),
 		/* setup for these tests is more complex so do it in test func */
-		TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
-		TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
+		TEST_CASE_ST(NULL, reset_aligned, test_lookahead_mask),
+		TEST_CASE_ST(NULL, reset_aligned, test_lookbehind_mask),
+		TEST_CASE_ST(unaligned_test_setup, reset_unaligned, test_find_unaligned),
 		TEST_CASES_END()
 	}
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 6dcbff0ba6..ad40b6d9f9 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -177,5 +177,5 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 		/* combine current ignore mask with last index ignore mask */
 		if (msk_idx == last)
-			ignore_msk |= last_msk;
+			ignore_msk &= last_msk;
 
 		/* if we have an ignore mask, ignore once */
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.151078273 +0100
+++ 0081-fbarray-fix-finding-for-unaligned-length.patch	2024-08-23 17:18:09.756430231 +0100
@@ -1 +1 @@
-From a744665d2149ba8707621c1214c798f807ec398e Mon Sep 17 00:00:00 2001
+From 3a72f98ab15e44228cb77a0dcd9573d9a9195c4e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 13c6691e50..09f6907fb1 100644
+index 3be9e19e78..8a3a3d77ab 100644
@@ -235 +236 @@
-index 63d8b731f5..22b43073c6 100644
+index 6dcbff0ba6..ad40b6d9f9 100644
@@ -238 +239 @@
-@@ -174,5 +174,5 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
+@@ -177,5 +177,5 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,


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

* patch 'buildtools: fix build with clang 17 and ASan' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (79 preceding siblings ...)
  2024-08-23 16:18 ` patch 'fbarray: fix finding for unaligned length' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix pointer to variable outside scope' " Kevin Traynor
                   ` (53 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Ali Alnubani, Song Jiale, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/06b3d5f8ec659da3c03b7160d933f4172979ad1a

Thanks.

Kevin

---
From 06b3d5f8ec659da3c03b7160d933f4172979ad1a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 11 Jul 2024 11:35:36 +0200
Subject: [PATCH] buildtools: fix build with clang 17 and ASan

[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]

ASan included in clang 17 and later suffixes symbols.
$ nm build/drivers/libtmp_rte_net_null.a | grep this_pmd
0000000000000000 r this_pmd_name3
0000000000000000 n this_pmd_name3.f2cd16678ab09dba8fd23405d8d11fce

This breaks the detection of driver symbols in pmdinfogen which then
creates duplicate symbols "_pmd_info" in many drivers. Such duplicate
symbols trigger a link error.

$ grep -w _pmd_info build/drivers/rte_net_*.pmd.c
build/drivers/rte_net_af_packet.pmd.c:const char _pmd_info[]
	__attribute__((used)) =
	"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";
build/drivers/rte_net_null.pmd.c:const char _pmd_info[]
	__attribute__((used)) =
	"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";

A simple reproducer:
$ CC=clang meson setup build -Denable_apps=test-pmd -Ddisable_libs=* \
  -Denable_drivers=net/null,net/af_packet -Dtests=false \
  -Db_lundef=false -Db_sanitize=address

$ ninja -C build

Before this patch, the pmdinfogen script was relying on a symbol name
starting with this_pmd_name.
On the other hand, what this script needs is symbols whose names are
this_pmd_name ## __COUNTER__, see below an example for PCI driver
symbols (the same applies to other buses).

$ git grep -w RTE_PMD_EXPORT_NAME drivers/bus/pci/bus_pci_driver.h
drivers/bus/pci/bus_pci_driver.h:RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
$ git grep -B1 this_pmd_name lib/eal/
lib/eal/include/rte_dev.h-#define RTE_PMD_EXPORT_NAME(name, idx) \
lib/eal/include/rte_dev.h:static const char
	RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \
$ git grep define.RTE_PMD_EXPORT_NAME_ARRAY lib/eal/include/rte_dev.h
lib/eal/include/rte_dev.h:#define
	RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[]

Adjust the symbol filter for both ELF and COFF implementations.

Bugzilla ID: 1466

Reported-by: Ali Alnubani <alialnu@nvidia.com>
Reported-by: Song Jiale <songx.jiale@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
 buildtools/pmdinfogen.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
index 2a44f17bda..dfb89500c0 100755
--- a/buildtools/pmdinfogen.py
+++ b/buildtools/pmdinfogen.py
@@ -7,4 +7,5 @@ import argparse
 import ctypes
 import json
+import re
 import sys
 import tempfile
@@ -67,9 +68,9 @@ class ELFImage:
         return None
 
-    def find_by_prefix(self, prefix):
-        prefix = prefix.encode("utf-8") if self._legacy_elftools else prefix
+    def find_by_pattern(self, pattern):
+        pattern = pattern.encode("utf-8") if self._legacy_elftools else pattern
         for i in range(self._symtab.num_symbols()):
             symbol = self._symtab.get_symbol(i)
-            if symbol.name.startswith(prefix):
+            if re.match(pattern, symbol.name):
                 yield ELFSymbol(self._image, symbol)
 
@@ -98,7 +99,7 @@ class COFFImage:
         return False
 
-    def find_by_prefix(self, prefix):
+    def find_by_pattern(self, pattern):
         for symbol in self._image.symbols:
-            if symbol.name.startswith(prefix):
+            if re.match(pattern, symbol.name):
                 yield COFFSymbol(self._image, symbol)
 
@@ -200,5 +201,5 @@ class Driver:
 def load_drivers(image):
     drivers = []
-    for symbol in image.find_by_prefix("this_pmd_name"):
+    for symbol in image.find_by_pattern("^this_pmd_name[0-9]+$"):
         drivers.append(Driver.load(image, symbol))
     return drivers
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.174657607 +0100
+++ 0082-buildtools-fix-build-with-clang-17-and-ASan.patch	2024-08-23 17:18:09.757430235 +0100
@@ -1 +1 @@
-From e1d8a879abac499a66801bb8238d59ba52f4fc6b Mon Sep 17 00:00:00 2001
+From 06b3d5f8ec659da3c03b7160d933f4172979ad1a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]
+
@@ -49 +50,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/ice/base: fix pointer to variable outside scope' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (80 preceding siblings ...)
  2024-08-23 16:18 ` patch 'buildtools: fix build with clang 17 and ASan' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix sign extension' " Kevin Traynor
                   ` (52 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Stefan Wegrzyn; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/56c1083497d803e9f77573d62adf5abef5f3a3e0

Thanks.

Kevin

---
From 56c1083497d803e9f77573d62adf5abef5f3a3e0 Mon Sep 17 00:00:00 2001
From: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Date: Tue, 25 Jun 2024 12:12:10 +0100
Subject: [PATCH] net/ice/base: fix pointer to variable outside scope

[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]

Currently, the 'temp' variable is in smaller scope than 'first_teid_ptr'
which can point to it. This means on new loop iterations the memory
goes out of scope and we can end up with a dangling pointer.
Move 'temp' to outside of the loop to fix it.

Fixes: 254f19c8c061 ("net/ice/base: modify recursive way of adding nodes")

Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index f3655a820f..92451c2f83 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1031,9 +1031,9 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
 	u16 new_num_nodes = num_nodes;
 	enum ice_status status = ICE_SUCCESS;
+	u32 temp;
 
 	*num_nodes_added = 0;
 	while (*num_nodes_added < num_nodes) {
 		u16 max_child_nodes, num_added = 0;
-		u32 temp;
 
 		status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.198011388 +0100
+++ 0083-net-ice-base-fix-pointer-to-variable-outside-scope.patch	2024-08-23 17:18:09.760430245 +0100
@@ -1 +1 @@
-From 794adf885cbbc949b4a292ce98bc57d77ea77391 Mon Sep 17 00:00:00 2001
+From 56c1083497d803e9f77573d62adf5abef5f3a3e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d694bfd414..c9d70fb043 100644
+index f3655a820f..92451c2f83 100644
@@ -25 +26 @@
-@@ -1070,9 +1070,9 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
+@@ -1031,9 +1031,9 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
@@ -27 +28 @@
- 	int status = 0;
+ 	enum ice_status status = ICE_SUCCESS;


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

* patch 'net/ice/base: fix sign extension' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (81 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix pointer to variable outside scope' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix size when allocating children arrays' " Kevin Traynor
                   ` (51 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jesse Brandeburg; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ae432145def90264490e3ba13f827372562346d2

Thanks.

Kevin

---
From ae432145def90264490e3ba13f827372562346d2 Mon Sep 17 00:00:00 2001
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Wed, 26 Jun 2024 12:41:03 +0100
Subject: [PATCH] net/ice/base: fix sign extension

[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]

Fix a static analysis warning where if the 16-bit value in mask has the
high-bit set, it will be sign extended by the shift left (which converts
it to a signed integer). Avoid this by casting to a u32 to make sure the
conversion happens before the shift and that it stays unsigned.

Fixes: 9467486f179f ("net/ice/base: enable masking for RSS and FD field vectors")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 3918169001..d1a1503631 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -3369,7 +3369,6 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
 	case ICE_BLK_RSS:
 		offset = GLQF_HMASK(mask_idx);
-		val = (idx << GLQF_HMASK_MSK_INDEX_S) &
-			GLQF_HMASK_MSK_INDEX_M;
-		val |= (mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
+		val = (idx << GLQF_HMASK_MSK_INDEX_S) & GLQF_HMASK_MSK_INDEX_M;
+		val |= ((u32)mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
 		break;
 	case ICE_BLK_FD:
@@ -3377,6 +3376,5 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
 		val = (idx << GLQF_FDMASK_MSK_INDEX_S) &
 			GLQF_FDMASK_MSK_INDEX_M;
-		val |= (mask << GLQF_FDMASK_MASK_S) &
-			GLQF_FDMASK_MASK_M;
+		val |= ((u32)mask << GLQF_FDMASK_MASK_S) & GLQF_FDMASK_MASK_M;
 		break;
 	default:
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.223417612 +0100
+++ 0084-net-ice-base-fix-sign-extension.patch	2024-08-23 17:18:09.764430259 +0100
@@ -1 +1 @@
-From 4fe3f901f86243bf2dc5925e870030995f229888 Mon Sep 17 00:00:00 2001
+From ae432145def90264490e3ba13f827372562346d2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e06dbb0885..413b6f8ece 100644
+index 3918169001..d1a1503631 100644
@@ -25 +26 @@
-@@ -1535,7 +1535,6 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
+@@ -3369,7 +3369,6 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
@@ -35 +36 @@
-@@ -1543,6 +1542,5 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
+@@ -3377,6 +3376,5 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,


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

* patch 'net/ice/base: fix size when allocating children arrays' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (82 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix sign extension' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix GCS descriptor field offsets' " Kevin Traynor
                   ` (50 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jacob Keller; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bc355f5741338ff94e43f55a96574455c2d168a8

Thanks.

Kevin

---
From bc355f5741338ff94e43f55a96574455c2d168a8 Mon Sep 17 00:00:00 2001
From: Jacob Keller <jacob.e.keller@intel.com>
Date: Wed, 26 Jun 2024 12:41:08 +0100
Subject: [PATCH] net/ice/base: fix size when allocating children arrays

[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]

The ice_sched_add_root_node() and ice_sched_add_node() functions have
comments to suppress Coverity warnings about a suspicious sizeof used
when allocating the children array of an struct ice_sched_node.

The size is calculated using the size of the scheduler node, which
overallocates the array by a significant amount.

Fix the code to correctly calculate the size by using *root->children
and *node->children respectively.

This saves some memory and allows us to drop the Coverity suppression
comments.

Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 92451c2f83..2944a6fd48 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -29,7 +29,6 @@ ice_sched_add_root_node(struct ice_port_info *pi,
 		return ICE_ERR_NO_MEMORY;
 
-	/* coverity[suspicious_sizeof] */
 	root->children = (struct ice_sched_node **)
-		ice_calloc(hw, hw->max_children[0], sizeof(*root));
+		ice_calloc(hw, hw->max_children[0], sizeof(*root->children));
 	if (!root->children) {
 		ice_free(hw, root);
@@ -181,7 +180,7 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
 		return ICE_ERR_NO_MEMORY;
 	if (hw->max_children[layer]) {
-		/* coverity[suspicious_sizeof] */
 		node->children = (struct ice_sched_node **)
-			ice_calloc(hw, hw->max_children[layer], sizeof(*node));
+			ice_calloc(hw, hw->max_children[layer],
+				   sizeof(*node->children));
 		if (!node->children) {
 			ice_free(hw, node);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.249654902 +0100
+++ 0085-net-ice-base-fix-size-when-allocating-children-array.patch	2024-08-23 17:18:09.767430269 +0100
@@ -1 +1 @@
-From 3072e5e2da9870d8cb119f15482eae9d9fb51e98 Mon Sep 17 00:00:00 2001
+From bc355f5741338ff94e43f55a96574455c2d168a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index c9d70fb043..74d57329da 100644
+index 92451c2f83..2944a6fd48 100644
@@ -42 +43 @@
-@@ -187,7 +186,7 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
+@@ -181,7 +180,7 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,


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

* patch 'net/ice/base: fix GCS descriptor field offsets' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (83 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix size when allocating children arrays' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " Kevin Traynor
                   ` (49 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Eric Joyner; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/57a52a5d57444ad0f78faa92a820da2f04a48feb

Thanks.

Kevin

---
From 57a52a5d57444ad0f78faa92a820da2f04a48feb Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner@intel.com>
Date: Wed, 26 Jun 2024 12:41:09 +0100
Subject: [PATCH] net/ice/base: fix GCS descriptor field offsets

[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]

Update the offsets, and remove the ICE_TX_GCS_DESC_ENA define since a
non-0 value used for the ICE_TX_GCS_DESC_TYPE field will enable GCS
offload; there is no dedicated bit to enable it anymore.

Fixes: c31095a0b20f ("net/ice/base: add GCO defines and GCO flex descriptor")

Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_lan_tx_rx.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index 2b6f039dcb..88cc721e9a 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1075,8 +1075,7 @@ struct ice_tx_ctx_desc {
 };
 
-#define ICE_TX_GSC_DESC_START	0  /* 7 BITS */
-#define ICE_TX_GSC_DESC_OFFSET	7  /* 4 BITS */
-#define ICE_TX_GSC_DESC_TYPE	11 /* 2 BITS */
-#define ICE_TX_GSC_DESC_ENA	13 /* 1 BIT */
+#define ICE_TX_GCS_DESC_START	0  /* 8 BITS */
+#define ICE_TX_GCS_DESC_OFFSET	8  /* 4 BITS */
+#define ICE_TX_GCS_DESC_TYPE	12 /* 3 BITS */
 
 #define ICE_TXD_CTX_QW1_DTYPE_S	0
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.274992180 +0100
+++ 0086-net-ice-base-fix-GCS-descriptor-field-offsets.patch	2024-08-23 17:18:09.769430277 +0100
@@ -1 +1 @@
-From 243ec291b1eba3ddf7554c9c80a173e9aee58b68 Mon Sep 17 00:00:00 2001
+From 57a52a5d57444ad0f78faa92a820da2f04a48feb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index d816df0ff6..39673e36f7 100644
+index 2b6f039dcb..88cc721e9a 100644


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

* patch 'net/ice/base: fix return type of bitmap hamming weight' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (84 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix GCS descriptor field offsets' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix check for existing switch rule' " Kevin Traynor
                   ` (48 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Chinh Cao; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8d4ee9a574b6776413f0488255ea522545fd27e2

Thanks.

Kevin

---
From 8d4ee9a574b6776413f0488255ea522545fd27e2 Mon Sep 17 00:00:00 2001
From: Chinh Cao <chinh.t.cao@intel.com>
Date: Wed, 26 Jun 2024 12:41:11 +0100
Subject: [PATCH] net/ice/base: fix return type of bitmap hamming weight

[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]

"count" is the returned value, and in this function, value of "count"
and "bit" are the same, so there is no reason why these values should be
declared as different types, and for returned value data type to be
different.

Fixes: 6d288fa5f72b ("net/ice/base: introduce and use bitmap hamming weight API")

Signed-off-by: Chinh Cao <chinh.t.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_bitops.h | 4 ++--
 drivers/net/ice/base/ice_switch.c | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h
index 21ec2014e1..7e61fec5ef 100644
--- a/drivers/net/ice/base/ice_bitops.h
+++ b/drivers/net/ice/base/ice_bitops.h
@@ -409,8 +409,8 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
  * ice_declare_bitmap.
  */
-static inline int
+static inline u16
 ice_bitmap_hweight(ice_bitmap_t *bm, u16 size)
 {
-	int count = 0;
+	u16 count = 0;
 	u16 bit = 0;
 
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 7c6a258255..468d58cdb9 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7122,5 +7122,5 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
 
 	/* return number of free indexes */
-	return (u16)ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
+	return ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
 }
 
@@ -7839,4 +7839,5 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	struct ice_sw_recipe *rm;
 	u8 i;
+	u16 cnt;
 
 	if (!ice_is_prof_rule(rinfo->tun_type) && !lkups_cnt)
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.299112687 +0100
+++ 0087-net-ice-base-fix-return-type-of-bitmap-hamming-weigh.patch	2024-08-23 17:18:09.776430301 +0100
@@ -1 +1 @@
-From 509c55f699d1e13f38abaaf85df7bd9b585f5b87 Mon Sep 17 00:00:00 2001
+From 8d4ee9a574b6776413f0488255ea522545fd27e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 3b71c1b7f5..5c17bcb674 100644
+index 21ec2014e1..7e61fec5ef 100644
@@ -26 +27 @@
-@@ -419,8 +419,8 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
+@@ -409,8 +409,8 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
@@ -38 +39 @@
-index 711a6cfbbe..fa5bd94c58 100644
+index 7c6a258255..468d58cdb9 100644
@@ -41 +42 @@
-@@ -7468,5 +7468,5 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
+@@ -7122,5 +7122,5 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
@@ -48 +49,2 @@
-@@ -8179,4 +8179,5 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -7839,4 +7839,5 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ 	struct ice_sw_recipe *rm;
@@ -50 +51,0 @@
- 	int status = ICE_SUCCESS;


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

* patch 'net/ice/base: fix check for existing switch rule' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (85 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix potential TLV length overflow' " Kevin Traynor
                   ` (47 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Mateusz Pacuszka; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6ad78e90aaecf9871c7008f1e4cfe0b4b8ed8747

Thanks.

Kevin

---
From 6ad78e90aaecf9871c7008f1e4cfe0b4b8ed8747 Mon Sep 17 00:00:00 2001
From: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Date: Wed, 26 Jun 2024 12:41:20 +0100
Subject: [PATCH] net/ice/base: fix check for existing switch rule

[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]

In case the rule already exists and another VSI wants to subscribe to
it, a new VSI list is being created and both VSIs are moved to it.
Currently, the check for already existing VSI with the same rule is done
based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change
it to vsi_handle. This is software VSI ID, but it can be applied here,
because vsi_map itself is also based on it.

Additionally change return status in case the VSI already exists in the
VSI map to "Already exists". Such case should be handled by the caller.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")

Signed-off-by: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 468d58cdb9..dd21ef4bd1 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4335,5 +4335,5 @@ ice_add_update_vsi_list(struct ice_hw *hw,
 
 		/* A rule already exists with the new VSI being added */
-		if (cur_fltr->fwd_id.hw_vsi_id == new_fltr->fwd_id.hw_vsi_id)
+		if (cur_fltr->vsi_handle == new_fltr->vsi_handle)
 			return ICE_ERR_ALREADY_EXISTS;
 
@@ -4383,5 +4383,5 @@ ice_add_update_vsi_list(struct ice_hw *hw,
 		/* A rule already exists with the new VSI being added */
 		if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
-			return ICE_SUCCESS;
+			return ICE_ERR_ALREADY_EXISTS;
 
 		/* Update the previously created VSI list set with
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.329370004 +0100
+++ 0088-net-ice-base-fix-check-for-existing-switch-rule.patch	2024-08-23 17:18:09.783430325 +0100
@@ -1 +1 @@
-From 771db7d9466488135a2899f8809d6e61bc685ed5 Mon Sep 17 00:00:00 2001
+From 6ad78e90aaecf9871c7008f1e4cfe0b4b8ed8747 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index fa5bd94c58..f8d98d8a9e 100644
+index 468d58cdb9..dd21ef4bd1 100644
@@ -30 +31 @@
-@@ -4625,5 +4625,5 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4335,5 +4335,5 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -37 +38 @@
-@@ -4673,5 +4673,5 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4383,5 +4383,5 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -40 +41 @@
--			return 0;
+-			return ICE_SUCCESS;


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

* patch 'net/ice/base: fix potential TLV length overflow' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (86 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix check for existing switch rule' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix board type definition' " Kevin Traynor
                   ` (46 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Paul Greenwalt; +Cc: Dan Nowlin, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c91760c3104a63a1eef5231860679be0c10ea145

Thanks.

Kevin

---
From c91760c3104a63a1eef5231860679be0c10ea145 Mon Sep 17 00:00:00 2001
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Wed, 26 Jun 2024 12:41:33 +0100
Subject: [PATCH] net/ice/base: fix potential TLV length overflow

[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]

It's possible that an NVM with an invalid tlv_len could cause an integer
overflow of next_tlv which can result an infinite loop.

Fix this issue by changing next_tlv from u16 to u32 to prevent overflow.
Also check that tlv_len is valid and less than pfa_len.

Fix an issue with conversion from 'u32' to 'u16', possible loss
of data compile errors by making appropriate casts.

Fixes: 77a649999047 ("net/ice/base: move functions from common to NVM module")

Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_nvm.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 7860006206..25f32d03e0 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -430,5 +430,5 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 	enum ice_status status;
 	u16 pfa_len, pfa_ptr;
-	u16 next_tlv;
+	u32 next_tlv;
 
 	status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
@@ -446,10 +446,11 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 	 */
 	next_tlv = pfa_ptr + 1;
-	while (next_tlv < pfa_ptr + pfa_len) {
+	while (next_tlv < ((u32)pfa_ptr + pfa_len)) {
 		u16 tlv_sub_module_type;
 		u16 tlv_len;
 
 		/* Read TLV type */
-		status = ice_read_sr_word(hw, next_tlv, &tlv_sub_module_type);
+		status = ice_read_sr_word(hw, (u16)next_tlv,
+					  &tlv_sub_module_type);
 		if (status != ICE_SUCCESS) {
 			ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV type.\n");
@@ -457,12 +458,16 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 		}
 		/* Read TLV length */
-		status = ice_read_sr_word(hw, next_tlv + 1, &tlv_len);
+		status = ice_read_sr_word(hw, (u16)(next_tlv + 1), &tlv_len);
 		if (status != ICE_SUCCESS) {
 			ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV length.\n");
 			break;
 		}
+		if (tlv_len > pfa_len) {
+			ice_debug(hw, ICE_DBG_INIT, "Invalid TLV length.\n");
+			return ICE_ERR_INVAL_SIZE;
+		}
 		if (tlv_sub_module_type == module_type) {
 			if (tlv_len) {
-				*module_tlv = next_tlv;
+				*module_tlv = (u16)next_tlv;
 				*module_tlv_len = tlv_len;
 				return ICE_SUCCESS;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.359392422 +0100
+++ 0089-net-ice-base-fix-potential-TLV-length-overflow.patch	2024-08-23 17:18:09.784430329 +0100
@@ -1 +1 @@
-From 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 Mon Sep 17 00:00:00 2001
+From c91760c3104a63a1eef5231860679be0c10ea145 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 79b66fa70f..811bbc9bbc 100644
+index 7860006206..25f32d03e0 100644
@@ -30,2 +31,2 @@
-@@ -473,5 +473,5 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
- {
+@@ -430,5 +430,5 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+ 	enum ice_status status;
@@ -35 +35,0 @@
- 	int status;
@@ -37 +37,2 @@
-@@ -490,10 +490,11 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+ 	status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
+@@ -446,10 +446,11 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -49 +50 @@
- 		if (status) {
+ 		if (status != ICE_SUCCESS) {
@@ -51 +52 @@
-@@ -501,12 +502,16 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+@@ -457,12 +458,16 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -56 +57 @@
- 		if (status) {
+ 		if (status != ICE_SUCCESS) {
@@ -69 +70 @@
- 				return 0;
+ 				return ICE_SUCCESS;


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

* patch 'net/ice/base: fix board type definition' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (87 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix potential TLV length overflow' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ice/base: fix masking when reading context' " Kevin Traynor
                   ` (45 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Waldemar Dworakowski; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/92eee85a9f331036ddead29a999b99f678c54f39

Thanks.

Kevin

---
From 92eee85a9f331036ddead29a999b99f678c54f39 Mon Sep 17 00:00:00 2001
From: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Date: Wed, 26 Jun 2024 12:41:38 +0100
Subject: [PATCH] net/ice/base: fix board type definition

[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]

The new version is compliant with implementation and documentation.

Fixes: f4f79aa849b5 ("net/ice/base: add AQC get link topology handle support")

Signed-off-by: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 253b971dfd..2bf322610b 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1655,6 +1655,6 @@ struct ice_aqc_link_topo_addr {
 /* Used to decode the handle field */
 #define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_M	BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM	BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ	0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM	0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ	BIT(9)
 #define ICE_AQC_LINK_TOPO_HANDLE_NODE_S		0
 /* In case of a Mezzanine type */
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.383059350 +0100
+++ 0090-net-ice-base-fix-board-type-definition.patch	2024-08-23 17:18:09.787430339 +0100
@@ -1 +1 @@
-From ee7419d85e4c55559002fdb57ec6dc4959155b2f Mon Sep 17 00:00:00 2001
+From 92eee85a9f331036ddead29a999b99f678c54f39 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c431b82784..d90a5b0d34 100644
+index 253b971dfd..2bf322610b 100644
@@ -22 +23 @@
-@@ -1747,6 +1747,6 @@ struct ice_aqc_link_topo_addr {
+@@ -1655,6 +1655,6 @@ struct ice_aqc_link_topo_addr {


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

* patch 'net/ice/base: fix masking when reading context' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (88 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix board type definition' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'app/testpmd: handle IEEE1588 init failure' " Kevin Traynor
                   ` (44 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Yahui Cao; +Cc: Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9e978c32852e55b760329865d50bb8be44222e9d

Thanks.

Kevin

---
From 9e978c32852e55b760329865d50bb8be44222e9d Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Wed, 26 Jun 2024 12:42:14 +0100
Subject: [PATCH] net/ice/base: fix masking when reading context

[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]

No need to invert mask since we only reserve the masked bits instead of
clear them.

Fixes: a03c714bfe0b ("net/ice/base: add two helper functions")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_common.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index c6fc32fbc6..49bbf3b461 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -4675,5 +4675,5 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
 
-	dest_byte &= ~(mask);
+	dest_byte &= mask;
 
 	dest_byte >>= shift_width;
@@ -4715,5 +4715,5 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	 * correctly
 	 */
-	src_word &= ~(CPU_TO_LE16(mask));
+	src_word &= CPU_TO_LE16(mask);
 
 	/* get the data back into host order before shifting */
@@ -4766,5 +4766,5 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	 * correctly
 	 */
-	src_dword &= ~(CPU_TO_LE32(mask));
+	src_dword &= CPU_TO_LE32(mask);
 
 	/* get the data back into host order before shifting */
@@ -4817,5 +4817,5 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	 * correctly
 	 */
-	src_qword &= ~(CPU_TO_LE64(mask));
+	src_qword &= CPU_TO_LE64(mask);
 
 	/* get the data back into host order before shifting */
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.408228473 +0100
+++ 0091-net-ice-base-fix-masking-when-reading-context.patch	2024-08-23 17:18:09.791430353 +0100
@@ -1 +1 @@
-From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001
+From 9e978c32852e55b760329865d50bb8be44222e9d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c14f66d55b..9a9c8f86e5 100644
+index c6fc32fbc6..49bbf3b461 100644
@@ -23,2 +24,2 @@
-@@ -5015,5 +5015,5 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
- 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA);
+@@ -4675,5 +4675,5 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
+ 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
@@ -30 +31 @@
-@@ -5055,5 +5055,5 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4715,5 +4715,5 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -37 +38 @@
-@@ -5106,5 +5106,5 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4766,5 +4766,5 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -44 +45 @@
-@@ -5157,5 +5157,5 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4817,5 +4817,5 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)


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

* patch 'app/testpmd: handle IEEE1588 init failure' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (89 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ice/base: fix masking when reading context' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'app/testpmd: fix parsing for connection tracking item' " Kevin Traynor
                   ` (43 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/af2127b83fe7a4f1b77ec920889f6ce86a2894ed

Thanks.

Kevin

---
From af2127b83fe7a4f1b77ec920889f6ce86a2894ed Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Sat, 30 Mar 2024 15:44:09 +0800
Subject: [PATCH] app/testpmd: handle IEEE1588 init failure

[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]

When the port's timestamping function failed to initialize
(for example, the device does not support PTP), the packets
received by the hardware do not contain the timestamp.
In this case, IEEE1588 packet forwarding should not start.
This patch fix it.

Plus, adding a failure message when failed to disable PTP.

Fixes: a78040c990cb ("app/testpmd: update forward engine beginning")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/ieee1588fwd.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 896d5ef26a..8d9ce4d6ce 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -202,6 +202,11 @@ static int
 port_ieee1588_fwd_begin(portid_t pi)
 {
-	rte_eth_timesync_enable(pi);
-	return 0;
+	int ret;
+
+	ret = rte_eth_timesync_enable(pi);
+	if (ret)
+		printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
+
+	return ret;
 }
 
@@ -209,5 +214,9 @@ static void
 port_ieee1588_fwd_end(portid_t pi)
 {
-	rte_eth_timesync_disable(pi);
+	int ret;
+
+	ret = rte_eth_timesync_disable(pi);
+	if (ret)
+		printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.435691671 +0100
+++ 0092-app-testpmd-handle-IEEE1588-init-failure.patch	2024-08-23 17:18:09.791430353 +0100
@@ -1 +1 @@
-From 80071a1c8ed669298434c56efe4ca0839f2a970e Mon Sep 17 00:00:00 2001
+From af2127b83fe7a4f1b77ec920889f6ce86a2894ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3371771751..afea7735c7 100644
+index 896d5ef26a..8d9ce4d6ce 100644
@@ -27 +28 @@
-@@ -198,6 +198,11 @@ static int
+@@ -202,6 +202,11 @@ static int
@@ -41 +42 @@
-@@ -205,5 +210,9 @@ static void
+@@ -209,5 +214,9 @@ static void


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

* patch 'app/testpmd: fix parsing for connection tracking item' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (90 preceding siblings ...)
  2024-08-23 16:18 ` patch 'app/testpmd: handle IEEE1588 init failure' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix tunnel packet parsing' " Kevin Traynor
                   ` (42 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0c0055e2752e31271f22c81210c885703016603b

Thanks.

Kevin

---
From 0c0055e2752e31271f22c81210c885703016603b Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 2 Jun 2024 13:23:26 +0300
Subject: [PATCH] app/testpmd: fix parsing for connection tracking item

[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]

In command line translation there were missing fields for
connection tracking item, as a result this item was not parsed
and was missing from the items list received from test-pmd.

Fixes: 4d07cbefe3ba ("app/testpmd: add commands for conntrack")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/cmdline_flow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 5c4544a753..3e2ef95a54 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3782,7 +3782,10 @@ static const struct token token_list[] = {
 		.name = "conntrack",
 		.help = "conntrack state",
+		.priv = PRIV_ITEM(CONNTRACK,
+				  sizeof(struct rte_flow_item_conntrack)),
 		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
+		.call = parse_vc,
 	},
 	[ITEM_PORT_REPRESENTOR] = {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.458943140 +0100
+++ 0093-app-testpmd-fix-parsing-for-connection-tracking-item.patch	2024-08-23 17:18:09.797430374 +0100
@@ -1 +1 @@
-From 944e5f43ffdb847c7a04edd8ae90baa899a8c697 Mon Sep 17 00:00:00 2001
+From 0c0055e2752e31271f22c81210c885703016603b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index aca3547c74..a76b44bf39 100644
+index 5c4544a753..3e2ef95a54 100644
@@ -23 +24 @@
-@@ -5864,7 +5864,10 @@ static const struct token token_list[] = {
+@@ -3782,7 +3782,10 @@ static const struct token token_list[] = {


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

* patch 'net/txgbe: fix tunnel packet parsing' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (91 preceding siblings ...)
  2024-08-23 16:18 ` patch 'app/testpmd: fix parsing for connection tracking item' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix flow filters in VT mode' " Kevin Traynor
                   ` (41 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e0fffeebc2b0e9776a5f60539935efc4867f189f

Thanks.

Kevin

---
From e0fffeebc2b0e9776a5f60539935efc4867f189f Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:32 +0800
Subject: [PATCH] net/txgbe: fix tunnel packet parsing

[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]

The outer-ipv6 tunnel packet was parsed to the wrong packet type, remove
the default RTE_PTYPE_L2_ETHER and RTE_PTYPE_L3_IPV4 flags for tunnel
packets. And correct the calculation of tunnel length for GRE and GENEVE
packets.

Fixes: ca46fcd753b1 ("net/txgbe: support Tx with hardware offload")
Fixes: e5ece1f467aa ("net/txgbe: fix VXLAN-GPE packet checksum")
Fixes: 0e32d6edd479 ("net/txgbe: fix packet type to parse from offload flags")
Fixes: 5bbaf75ed6df ("net/txgbe: fix GRE tunnel packet checksum")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_rxtx.c | 71 ++++++++++++++++++----------------
 1 file changed, 38 insertions(+), 33 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index f85ec77dd5..a1f26ae3f9 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -565,24 +565,15 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
 	case RTE_MBUF_F_TX_TUNNEL_VXLAN:
 	case RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_GRENAT;
+		ptype |= RTE_PTYPE_TUNNEL_GRENAT;
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_GRE:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_GRE;
+		ptype |= RTE_PTYPE_TUNNEL_GRE;
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_GENEVE:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_GENEVE;
-		ptype |= RTE_PTYPE_INNER_L2_ETHER;
+		ptype |= RTE_PTYPE_TUNNEL_GENEVE;
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_IPIP:
 	case RTE_MBUF_F_TX_TUNNEL_IP:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_IP;
+		ptype |= RTE_PTYPE_TUNNEL_IP;
 		break;
 	}
@@ -668,4 +659,11 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
 }
 
+#define GRE_CHECKSUM_PRESENT	0x8000
+#define GRE_KEY_PRESENT		0x2000
+#define GRE_SEQUENCE_PRESENT	0x1000
+#define GRE_EXT_LEN		4
+#define GRE_SUPPORTED_FIELDS	(GRE_CHECKSUM_PRESENT | GRE_KEY_PRESENT |\
+				 GRE_SEQUENCE_PRESENT)
+
 static inline uint8_t
 txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -673,4 +671,6 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
 	struct txgbe_genevehdr genevehdr;
 	const struct txgbe_genevehdr *gh;
+	const struct txgbe_grehdr *grh;
+	struct txgbe_grehdr grehdr;
 	uint8_t tun_len;
 
@@ -685,9 +685,14 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_GRE:
-		tun_len = sizeof(struct txgbe_nvgrehdr);
-		break;
-	case RTE_MBUF_F_TX_TUNNEL_GENEVE:
-		gh = rte_pktmbuf_read(mbuf,
+		tun_len = sizeof(struct txgbe_grehdr);
+		grh = rte_pktmbuf_read(mbuf,
 			mbuf->outer_l2_len + mbuf->outer_l3_len,
+			sizeof(grehdr), &grehdr);
+		if (grh->flags & rte_cpu_to_be_16(GRE_SUPPORTED_FIELDS))
+			tun_len += GRE_EXT_LEN;
+		break;
+	case RTE_MBUF_F_TX_TUNNEL_GENEVE:
+		gh = rte_pktmbuf_read(mbuf, mbuf->outer_l2_len +
+			mbuf->outer_l3_len + sizeof(struct txgbe_udphdr),
 			sizeof(genevehdr), &genevehdr);
 		tun_len = sizeof(struct txgbe_udphdr)
@@ -703,25 +708,24 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
 
 static inline uint8_t
-txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt)
+txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt, uint8_t tun_len)
 {
-	uint64_t l2_vxlan, l2_vxlan_mac, l2_vxlan_mac_vlan;
-	uint64_t l2_gre, l2_gre_mac, l2_gre_mac_vlan;
+	uint64_t inner_l2_len;
 	uint8_t ptid = 0;
 
-	l2_vxlan = sizeof(struct txgbe_udphdr) + sizeof(struct txgbe_vxlanhdr);
-	l2_vxlan_mac = l2_vxlan + sizeof(struct rte_ether_hdr);
-	l2_vxlan_mac_vlan = l2_vxlan_mac + sizeof(struct rte_vlan_hdr);
+	inner_l2_len = tx_pkt->l2_len - tun_len;
 
-	l2_gre = sizeof(struct txgbe_grehdr);
-	l2_gre_mac = l2_gre + sizeof(struct rte_ether_hdr);
-	l2_gre_mac_vlan = l2_gre_mac + sizeof(struct rte_vlan_hdr);
-
-	if (tx_pkt->l2_len == l2_vxlan || tx_pkt->l2_len == l2_gre)
+	switch (inner_l2_len) {
+	case 0:
 		ptid = TXGBE_PTID_TUN_EIG;
-	else if (tx_pkt->l2_len == l2_vxlan_mac || tx_pkt->l2_len == l2_gre_mac)
+		break;
+	case sizeof(struct rte_ether_hdr):
 		ptid = TXGBE_PTID_TUN_EIGM;
-	else if (tx_pkt->l2_len == l2_vxlan_mac_vlan ||
-			tx_pkt->l2_len == l2_gre_mac_vlan)
+		break;
+	case sizeof(struct rte_ether_hdr) + sizeof(struct rte_vlan_hdr):
 		ptid = TXGBE_PTID_TUN_EIGMV;
+		break;
+	default:
+		ptid = TXGBE_PTID_TUN_EI;
+	}
 
 	return ptid;
@@ -790,6 +794,4 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		if (tx_ol_req) {
 			tx_offload.ptid = tx_desc_ol_flags_to_ptid(tx_ol_req);
-			if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
-				tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt);
 			tx_offload.l2_len = tx_pkt->l2_len;
 			tx_offload.l3_len = tx_pkt->l3_len;
@@ -800,4 +802,7 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			tx_offload.outer_l3_len = tx_pkt->outer_l3_len;
 			tx_offload.outer_tun_len = txgbe_get_tun_len(tx_pkt);
+			if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
+				tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt,
+							tx_offload.outer_tun_len);
 
 #ifdef RTE_LIB_SECURITY
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.492152146 +0100
+++ 0094-net-txgbe-fix-tunnel-packet-parsing.patch	2024-08-23 17:18:09.800430385 +0100
@@ -1 +1 @@
-From 60847e50b5280effa6e92a452bbb36fa7051db28 Mon Sep 17 00:00:00 2001
+From e0fffeebc2b0e9776a5f60539935efc4867f189f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 4b78e68a40..7731ad8491 100644
+index f85ec77dd5..a1f26ae3f9 100644
@@ -26 +27 @@
-@@ -587,24 +587,15 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
+@@ -565,24 +565,15 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
@@ -55 +56 @@
-@@ -690,4 +681,11 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
+@@ -668,4 +659,11 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
@@ -67 +68 @@
-@@ -695,4 +693,6 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -673,4 +671,6 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -74 +75 @@
-@@ -707,9 +707,14 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -685,9 +685,14 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -93 +94 @@
-@@ -725,25 +730,24 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -703,25 +708,24 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -132 +133 @@
-@@ -812,6 +816,4 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -790,6 +794,4 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -139 +140 @@
-@@ -822,4 +824,7 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -800,4 +802,7 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,


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

* patch 'net/txgbe: fix flow filters in VT mode' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (92 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix tunnel packet parsing' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix Tx hang on queue disable' " Kevin Traynor
                   ` (40 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0cf458e3ef2a6bb442f5357d3cf3ede98aa384a5

Thanks.

Kevin

---
From 0cf458e3ef2a6bb442f5357d3cf3ede98aa384a5 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:33 +0800
Subject: [PATCH] net/txgbe: fix flow filters in VT mode

[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]

In virtualization mode, target pool should be determined for the
filters. For ether type filter, virtualization mode must be enabled
to filter broadcast/multicast packets due to hardware limitations.

Fixes: f8e2cfc7702b ("net/txgbe: support ethertype filter add and delete")
Fixes: 77a72b4d9dc0 ("net/txgbe: support ntuple filter add and delete")
Fixes: 983a4ef2265b ("net/txgbe: support syn filter add and delete")
Fixes: 08d61139be0a ("net/txgbe: support flow director filter add and delete")
Fixes: 9fdfed08a5e3 ("net/txgbe: restore RSS filter")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 24 +++++++++++++++++++++---
 drivers/net/txgbe/txgbe_fdir.c   |  3 +++
 drivers/net/txgbe/txgbe_rxtx.c   |  8 +++++++-
 3 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index bd587b4f71..170bea9dd0 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3821,4 +3821,5 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
 	uint32_t syn_info;
 	uint32_t synqf;
+	uint16_t queue;
 
 	if (filter->queue >= TXGBE_MAX_RX_QUEUE_NUM)
@@ -3830,5 +3831,9 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
 		if (syn_info & TXGBE_SYNCLS_ENA)
 			return -EINVAL;
-		synqf = (uint32_t)TXGBE_SYNCLS_QPID(filter->queue);
+		if (RTE_ETH_DEV_SRIOV(dev).active)
+			queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+		else
+			queue = filter->queue;
+		synqf = (uint32_t)TXGBE_SYNCLS_QPID(queue);
 		synqf |= TXGBE_SYNCLS_ENA;
 
@@ -3899,5 +3904,8 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
 	wr32(hw, TXGBE_5TFCTL0(i), ftqf);
 
-	l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
+	if (RTE_ETH_DEV_SRIOV(dev).active)
+		l34timir |= TXGBE_5TFCTL1_QP(RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue);
+	else
+		l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
 	wr32(hw, TXGBE_5TFCTL1(i), l34timir);
 }
@@ -4183,5 +4191,15 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
 		etqf = TXGBE_ETFLT_ENA;
 		etqf |= TXGBE_ETFLT_ETID(filter->ether_type);
-		etqs |= TXGBE_ETCLS_QPID(filter->queue);
+		if (RTE_ETH_DEV_SRIOV(dev).active) {
+			int pool, queue;
+
+			pool = RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx;
+			queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+			etqf |= TXGBE_ETFLT_POOLENA;
+			etqf |= TXGBE_ETFLT_POOL(pool);
+			etqs |= TXGBE_ETCLS_QPID(queue);
+		} else {
+			etqs |= TXGBE_ETCLS_QPID(filter->queue);
+		}
 		etqs |= TXGBE_ETCLS_QENA;
 
diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c
index e303d87176..c1c2580d8a 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -847,4 +847,7 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,
 	}
 
+	if (RTE_ETH_DEV_SRIOV(dev).active)
+		queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + queue;
+
 	node = txgbe_fdir_filter_lookup(info, &rule->input);
 	if (node) {
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index a1f26ae3f9..e2a32b1322 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -5080,4 +5080,5 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
 	uint16_t i;
 	uint16_t j;
+	uint16_t queue;
 	struct rte_eth_rss_conf rss_conf = {
 		.rss_key = conf->conf.key_len ?
@@ -5112,5 +5113,10 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
 		if (j == conf->conf.queue_num)
 			j = 0;
-		reta = (reta >> 8) | LS32(conf->conf.queue[j], 24, 0xFF);
+		if (RTE_ETH_DEV_SRIOV(dev).active)
+			queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx +
+				conf->conf.queue[j];
+		else
+			queue = conf->conf.queue[j];
+		reta = (reta >> 8) | LS32(queue, 24, 0xFF);
 		if ((i & 3) == 3)
 			wr32at(hw, TXGBE_REG_RSSTBL, i >> 2, reta);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.519657705 +0100
+++ 0095-net-txgbe-fix-flow-filters-in-VT-mode.patch	2024-08-23 17:18:09.805430402 +0100
@@ -1 +1 @@
-From af8c90f424ff704578971fb07f5005d4615c9f3e Mon Sep 17 00:00:00 2001
+From 0cf458e3ef2a6bb442f5357d3cf3ede98aa384a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 6d11412616..fa68a5d2ca 100644
+index bd587b4f71..170bea9dd0 100644
@@ -28 +29 @@
-@@ -4012,4 +4012,5 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -3821,4 +3821,5 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -34 +35 @@
-@@ -4021,5 +4022,9 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -3830,5 +3831,9 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -45 +46 @@
-@@ -4090,5 +4095,8 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
+@@ -3899,5 +3904,8 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
@@ -55 +56 @@
-@@ -4374,5 +4382,15 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
+@@ -4183,5 +4191,15 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
@@ -73 +74 @@
-index a198b6781b..f627ab681d 100644
+index e303d87176..c1c2580d8a 100644
@@ -76 +77 @@
-@@ -845,4 +845,7 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,
+@@ -847,4 +847,7 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,
@@ -85 +86 @@
-index 7731ad8491..35f80d73ac 100644
+index a1f26ae3f9..e2a32b1322 100644
@@ -88 +89 @@
-@@ -5161,4 +5161,5 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5080,4 +5080,5 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
@@ -94 +95 @@
-@@ -5193,5 +5194,10 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5112,5 +5113,10 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,


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

* patch 'net/txgbe: fix Tx hang on queue disable' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (93 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix flow filters in VT mode' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " Kevin Traynor
                   ` (39 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d298093543513b0f01376628bc7af2c740514f18

Thanks.

Kevin

---
From d298093543513b0f01376628bc7af2c740514f18 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:34 +0800
Subject: [PATCH] net/txgbe: fix Tx hang on queue disable

[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]

The problem of Tx hang also occurs on Wangxun 10Gb NICs, when stop
device under heavy traffic.

Refer to commit ac6c5e9af56a ("net/ngbe: fix Tx hang on queue disable")

Disable PCIe bus master to clear BME when stop hardware, and verify
there are no pending requests. Move disabling Tx queue after disabling
PCIe bus master to ensure that there are no packets left to cause Tx
hang.

Fixes: b1f596677d8e ("net/txgbe: support device start")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/meson.build   |  2 +-
 drivers/net/txgbe/base/txgbe_hw.c    | 60 +++++++++++++++++++++++-----
 drivers/net/txgbe/base/txgbe_hw.h    |  1 +
 drivers/net/txgbe/base/txgbe_osdep.h |  1 +
 drivers/net/txgbe/base/txgbe_regs.h  |  3 ++
 drivers/net/txgbe/base/txgbe_type.h  |  1 +
 drivers/net/txgbe/txgbe_ethdev.c     |  7 ++++
 7 files changed, 65 insertions(+), 10 deletions(-)

diff --git a/drivers/net/txgbe/base/meson.build b/drivers/net/txgbe/base/meson.build
index a81d6890fe..4cf90a394a 100644
--- a/drivers/net/txgbe/base/meson.build
+++ b/drivers/net/txgbe/base/meson.build
@@ -23,5 +23,5 @@ endforeach
 
 base_lib = static_library('txgbe_base', sources,
-    dependencies: [static_rte_eal, static_rte_net],
+    dependencies: [static_rte_eal, static_rte_net, static_rte_bus_pci],
     c_args: c_args)
 base_objs = base_lib.extract_all_objects(recursive: true)
diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index 1083431055..2a42f18381 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -463,5 +463,5 @@ void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
 s32 txgbe_stop_hw(struct txgbe_hw *hw)
 {
-	u32 reg_val;
+	s32 status = 0;
 	u16 i;
 
@@ -485,14 +485,24 @@ s32 txgbe_stop_hw(struct txgbe_hw *hw)
 	wr32(hw, TXGBE_ICR(1), TXGBE_ICR_MASK);
 
+	wr32(hw, TXGBE_BMECTL, 0x3);
+
+	/* Disable the receive unit by stopping each queue */
+	for (i = 0; i < hw->mac.max_rx_queues; i++)
+		wr32(hw, TXGBE_RXCFG(i), 0);
+
+	/* flush all queues disables */
+	txgbe_flush(hw);
+	msec_delay(2);
+
+	/* Prevent the PCI-E bus from hanging by disabling PCI-E master
+	 * access and verify no pending requests
+	 */
+	status = txgbe_set_pcie_master(hw, false);
+	if (status)
+		return status;
+
 	/* Disable the transmit unit.  Each queue must be disabled. */
 	for (i = 0; i < hw->mac.max_tx_queues; i++)
-		wr32(hw, TXGBE_TXCFG(i), TXGBE_TXCFG_FLUSH);
-
-	/* Disable the receive unit by stopping each queue */
-	for (i = 0; i < hw->mac.max_rx_queues; i++) {
-		reg_val = rd32(hw, TXGBE_RXCFG(i));
-		reg_val &= ~TXGBE_RXCFG_ENA;
-		wr32(hw, TXGBE_RXCFG(i), reg_val);
-	}
+		wr32(hw, TXGBE_TXCFG(i), 0);
 
 	/* flush all queues disables */
@@ -1181,4 +1191,36 @@ out:
 }
 
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable)
+{
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *)hw->back;
+	s32 status = 0;
+	u32 i;
+
+	if (rte_pci_set_bus_master(pci_dev, enable) < 0) {
+		DEBUGOUT("Cannot configure PCI bus master.");
+		return -1;
+	}
+
+	if (enable)
+		goto out;
+
+	/* Exit if master requests are blocked */
+	if (!(rd32(hw, TXGBE_BMEPEND)))
+		goto out;
+
+	/* Poll for master request bit to clear */
+	for (i = 0; i < TXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) {
+		usec_delay(100);
+		if (!(rd32(hw, TXGBE_BMEPEND)))
+			goto out;
+	}
+
+	DEBUGOUT("PCIe transaction pending bit also did not clear.");
+	status = TXGBE_ERR_MASTER_REQUESTS_PENDING;
+
+out:
+	return status;
+}
+
 /**
  *  txgbe_acquire_swfw_sync - Acquire SWFW semaphore
diff --git a/drivers/net/txgbe/base/txgbe_hw.h b/drivers/net/txgbe/base/txgbe_hw.h
index fd2f7d784c..bf656bb53e 100644
--- a/drivers/net/txgbe/base/txgbe_hw.h
+++ b/drivers/net/txgbe/base/txgbe_hw.h
@@ -41,4 +41,5 @@ s32 txgbe_validate_mac_addr(u8 *mac_addr);
 s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask);
 void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask);
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable);
 
 s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index b62c0b0824..30d671540e 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -20,4 +20,5 @@
 #include <rte_io.h>
 #include <rte_ether.h>
+#include <rte_bus_pci.h>
 
 #include "../txgbe_logs.h"
diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index dc22ef53e3..c96bdd984b 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1235,4 +1235,7 @@ enum txgbe_5tuple_protocol {
 #define TXGBE_ITRSEL                    0x000180
 
+#define TXGBE_BMECTL                    0x012020
+#define TXGBE_BMEPEND                   0x000168
+
 /* P2V Mailbox */
 #define TXGBE_MBMEM(i)           (0x005000 + 0x40 * (i)) /* 0-63 */
diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index e7971ccf1d..3b86d8bb8c 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -29,4 +29,5 @@
 #define TXGBE_FDIRCMD_CMD_POLL			10
 #define TXGBE_VF_INIT_TIMEOUT	200 /* Number of retries to clear RSTI */
+#define TXGBE_PCI_MASTER_DISABLE_TIMEOUT	800
 
 #define TXGBE_ALIGN		128 /* as intel did */
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 170bea9dd0..ce3b50a65d 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -597,4 +597,5 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 
 	/* Vendor and Device ID need to be set before init of shared code */
+	hw->back = pci_dev;
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
@@ -1674,4 +1675,6 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 	hw->dev_start = true;
 
+	txgbe_set_pcie_master(hw, true);
+
 	/* configure PF module if SRIOV enabled */
 	txgbe_pf_host_configure(dev);
@@ -1928,4 +1931,6 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
 	wr32m(hw, TXGBE_LEDCTL, 0xFFFFFFFF, TXGBE_LEDCTL_SEL_MASK);
 
+	txgbe_set_pcie_master(hw, true);
+
 	hw->adapter_stopped = true;
 	dev->data->dev_started = 0;
@@ -2010,4 +2015,6 @@ txgbe_dev_close(struct rte_eth_dev *dev)
 	txgbe_dev_free_queues(dev);
 
+	txgbe_set_pcie_master(hw, false);
+
 	/* reprogram the RAR[0] in case user changed it. */
 	txgbe_set_rar(hw, 0, hw->mac.addr, 0, true);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.550618472 +0100
+++ 0096-net-txgbe-fix-Tx-hang-on-queue-disable.patch	2024-08-23 17:18:09.813430430 +0100
@@ -1 +1 @@
-From 8a31f4bbbbb73baf77297f00887f4b267feb7b8e Mon Sep 17 00:00:00 2001
+From d298093543513b0f01376628bc7af2c740514f18 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index d19fd0065d..7094551fee 100644
+index 1083431055..2a42f18381 100644
@@ -85 +86 @@
-@@ -1175,4 +1185,36 @@ out:
+@@ -1181,4 +1191,36 @@ out:
@@ -123 +124 @@
-index 7031589f7c..4bf9da2d4c 100644
+index fd2f7d784c..bf656bb53e 100644
@@ -133 +134 @@
-index 4fce355000..62d16a6abb 100644
+index b62c0b0824..30d671540e 100644
@@ -139 +140 @@
-+#include <bus_pci_driver.h>
++#include <rte_bus_pci.h>
@@ -143 +144 @@
-index 79290a7afe..86896d11dc 100644
+index dc22ef53e3..c96bdd984b 100644
@@ -146 +147 @@
-@@ -1237,4 +1237,7 @@ enum txgbe_5tuple_protocol {
+@@ -1235,4 +1235,7 @@ enum txgbe_5tuple_protocol {
@@ -155 +156 @@
-index 75e839b7de..f52736cae9 100644
+index e7971ccf1d..3b86d8bb8c 100644
@@ -158 +159,2 @@
-@@ -30,4 +30,5 @@
+@@ -29,4 +29,5 @@
+ #define TXGBE_FDIRCMD_CMD_POLL			10
@@ -160 +161,0 @@
- #define TXGBE_SPI_TIMEOUT	10000
@@ -165 +166 @@
-index fa68a5d2ca..121dccb5eb 100644
+index 170bea9dd0..ce3b50a65d 100644
@@ -168 +169 @@
-@@ -602,4 +602,5 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -597,4 +597,5 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -174 +175 @@
-@@ -1718,4 +1719,6 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1674,4 +1675,6 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -179,3 +180,3 @@
- 	/* workaround for GPIO intr lost when mng_veto bit is set */
- 	if (txgbe_check_reset_blocked(hw))
-@@ -1981,4 +1984,6 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
+ 	/* configure PF module if SRIOV enabled */
+ 	txgbe_pf_host_configure(dev);
+@@ -1928,4 +1931,6 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
@@ -188 +189 @@
-@@ -2063,4 +2068,6 @@ txgbe_dev_close(struct rte_eth_dev *dev)
+@@ -2010,4 +2015,6 @@ txgbe_dev_close(struct rte_eth_dev *dev)


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

* patch 'net/txgbe: restrict configuration of VLAN strip offload' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (94 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix Tx hang on queue disable' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " Kevin Traynor
                   ` (38 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/206d98e0ee7a5cc39b6c1ab8e604fe5af69d042c

Thanks.

Kevin

---
From 206d98e0ee7a5cc39b6c1ab8e604fe5af69d042c Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:35 +0800
Subject: [PATCH] net/txgbe: restrict configuration of VLAN strip offload

[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]

There is a hardware limitation that Rx ring config register is not
writable when Rx ring is enabled, i.e. the TXGBE_RXCFG_ENA bit is set.
But disabling the ring when there is traffic will cause ring get stuck.
So restrict the configuration of VLAN strip offload only if device is
started.

Fixes: 220b0e49bc47 ("net/txgbe: support VLAN")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 49 +++++++++++++-------------------
 1 file changed, 20 insertions(+), 29 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index ce3b50a65d..39874c67a9 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -988,39 +988,23 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 
 static void
-txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+txgbe_vlan_strip_q_set(struct rte_eth_dev *dev, uint16_t queue, int on)
 {
-	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
-	struct txgbe_rx_queue *rxq;
-	bool restart;
-	uint32_t rxcfg, rxbal, rxbah;
-
 	if (on)
 		txgbe_vlan_hw_strip_enable(dev, queue);
 	else
 		txgbe_vlan_hw_strip_disable(dev, queue);
+}
 
-	rxq = dev->data->rx_queues[queue];
-	rxbal = rd32(hw, TXGBE_RXBAL(rxq->reg_idx));
-	rxbah = rd32(hw, TXGBE_RXBAH(rxq->reg_idx));
-	rxcfg = rd32(hw, TXGBE_RXCFG(rxq->reg_idx));
-	if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
-		restart = (rxcfg & TXGBE_RXCFG_ENA) &&
-			!(rxcfg & TXGBE_RXCFG_VLAN);
-		rxcfg |= TXGBE_RXCFG_VLAN;
-	} else {
-		restart = (rxcfg & TXGBE_RXCFG_ENA) &&
-			(rxcfg & TXGBE_RXCFG_VLAN);
-		rxcfg &= ~TXGBE_RXCFG_VLAN;
-	}
-	rxcfg &= ~TXGBE_RXCFG_ENA;
+static void
+txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+{
+	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 
-	if (restart) {
-		/* set vlan strip for ring */
-		txgbe_dev_rx_queue_stop(dev, queue);
-		wr32(hw, TXGBE_RXBAL(rxq->reg_idx), rxbal);
-		wr32(hw, TXGBE_RXBAH(rxq->reg_idx), rxbah);
-		wr32(hw, TXGBE_RXCFG(rxq->reg_idx), rxcfg);
-		txgbe_dev_rx_queue_start(dev, queue);
+	if (!hw->adapter_stopped) {
+		PMD_DRV_LOG(ERR, "Please stop port first");
+		return;
 	}
+
+	txgbe_vlan_strip_q_set(dev, queue, on);
 }
 
@@ -1247,7 +1231,7 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
 
 		if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
-			txgbe_vlan_strip_queue_set(dev, i, 1);
+			txgbe_vlan_strip_q_set(dev, i, 1);
 		else
-			txgbe_vlan_strip_queue_set(dev, i, 0);
+			txgbe_vlan_strip_q_set(dev, i, 0);
 	}
 }
@@ -1311,4 +1295,11 @@ static int
 txgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
+	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+
+	if (!hw->adapter_stopped && (mask & RTE_ETH_VLAN_STRIP_MASK)) {
+		PMD_DRV_LOG(ERR, "Please stop port first");
+		return -EPERM;
+	}
+
 	txgbe_config_vlan_strip_on_all_queues(dev, mask);
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.583477852 +0100
+++ 0097-net-txgbe-restrict-configuration-of-VLAN-strip-offlo.patch	2024-08-23 17:18:09.817430444 +0100
@@ -1 +1 @@
-From 66364efcf95884b97b71aaff697f8597a286f52e Mon Sep 17 00:00:00 2001
+From 206d98e0ee7a5cc39b6c1ab8e604fe5af69d042c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 121dccb5eb..a59d964a5b 100644
+index ce3b50a65d..39874c67a9 100644
@@ -24 +25 @@
-@@ -1001,39 +1001,23 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -988,39 +988,23 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
@@ -75 +76 @@
-@@ -1260,7 +1244,7 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
+@@ -1247,7 +1231,7 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
@@ -85 +86 @@
-@@ -1324,4 +1308,11 @@ static int
+@@ -1311,4 +1295,11 @@ static int


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

* patch 'net/txgbe: reconfigure more MAC Rx registers' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (95 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " Kevin Traynor
                   ` (37 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/df4ec1ced28446b1f3a2262d797f9079fd0f6e46

Thanks.

Kevin

---
From df4ec1ced28446b1f3a2262d797f9079fd0f6e46 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:36 +0800
Subject: [PATCH] net/txgbe: reconfigure more MAC Rx registers

[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]

When link status changes, there is a probability that no more packets
can be received on the port, due to hardware defects. These MAC Rx
registers should be reconfigured to fix this problem.

Fixes: 950a6954df13 ("net/txgbe: reconfigure MAC Rx when link update")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_regs.h | 2 ++
 drivers/net/txgbe/txgbe_ethdev.c    | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index c96bdd984b..d151123882 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1021,4 +1021,6 @@ enum txgbe_5tuple_protocol {
 #define   TXGBE_MACRXFLT_RXALL          MS(31, 0x1)
 
+#define TXGBE_MAC_WDG_TIMEOUT           0x01100C
+
 /******************************************************************************
  * Statistic Registers
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 39874c67a9..3ff8da2de9 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2714,4 +2714,5 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	int err;
 	int wait = 1;
+	u32 reg;
 
 	memset(&link, 0, sizeof(link));
@@ -2786,7 +2787,12 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 
 	/* Re configure MAC RX */
-	if (hw->mac.type == txgbe_mac_raptor)
+	if (hw->mac.type == txgbe_mac_raptor) {
+		reg = rd32(hw, TXGBE_MACRXCFG);
+		wr32(hw, TXGBE_MACRXCFG, reg);
 		wr32m(hw, TXGBE_MACRXFLT, TXGBE_MACRXFLT_PROMISC,
 			TXGBE_MACRXFLT_PROMISC);
+		reg = rd32(hw, TXGBE_MAC_WDG_TIMEOUT);
+		wr32(hw, TXGBE_MAC_WDG_TIMEOUT, reg);
+	}
 
 	return rte_eth_linkstatus_set(dev, &link);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.611299179 +0100
+++ 0098-net-txgbe-reconfigure-more-MAC-Rx-registers.patch	2024-08-23 17:18:09.822430462 +0100
@@ -1 +1 @@
-From 3056288933f06afa72f8611ab7c4accdd01899fa Mon Sep 17 00:00:00 2001
+From df4ec1ced28446b1f3a2262d797f9079fd0f6e46 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 86896d11dc..a2984f1106 100644
+index c96bdd984b..d151123882 100644
@@ -23 +24 @@
-@@ -1023,4 +1023,6 @@ enum txgbe_5tuple_protocol {
+@@ -1021,4 +1021,6 @@ enum txgbe_5tuple_protocol {
@@ -31 +32 @@
-index a59d964a5b..699ff1c920 100644
+index 39874c67a9..3ff8da2de9 100644
@@ -34 +35 @@
-@@ -2880,4 +2880,5 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2714,4 +2714,5 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -40 +41 @@
-@@ -2969,7 +2970,12 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2786,7 +2787,12 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,


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

* patch 'net/txgbe: fix VF promiscuous and allmulticast' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (96 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ngbe: keep PHY power down while device probing' " Kevin Traynor
                   ` (36 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f3924093d2c22043d5b009e8bc6e912cd80dfea4

Thanks.

Kevin

---
From f3924093d2c22043d5b009e8bc6e912cd80dfea4 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:37 +0800
Subject: [PATCH] net/txgbe: fix VF promiscuous and allmulticast

[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]

The configuration of allmulti and promiscuous modes conflicts
together. For instance, if we enable promiscuous mode, then enable and
disable allmulti, then the promiscuous mode is wrongly disabled.

Fix this behavior by:
- doing nothing when we set/unset allmulti if promiscuous mode is on
- restorting the proper mode (none or allmulti) when we disable
  promiscuous mode

Fixes: 29072d593fe4 ("net/txgbe: support VF promiscuous and allmulticast")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev_vf.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index f52cd8bc19..037b7db544 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -1198,7 +1198,11 @@ txgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
 {
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+	int mode = TXGBEVF_XCAST_MODE_NONE;
 	int ret;
 
-	switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_NONE)) {
+	if (dev->data->all_multicast)
+		mode = TXGBEVF_XCAST_MODE_ALLMULTI;
+
+	switch (hw->mac.update_xcast_mode(hw, mode)) {
 	case 0:
 		ret = 0;
@@ -1221,4 +1225,7 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	int ret;
 
+	if (dev->data->promiscuous)
+		return 0;
+
 	switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_ALLMULTI)) {
 	case 0:
@@ -1242,4 +1249,7 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	int ret;
 
+	if (dev->data->promiscuous)
+		return 0;
+
 	switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_MULTI)) {
 	case 0:
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.640442799 +0100
+++ 0099-net-txgbe-fix-VF-promiscuous-and-allmulticast.patch	2024-08-23 17:18:09.823430465 +0100
@@ -1 +1 @@
-From 055a51ff85112200706a07e99b92c9459774080a Mon Sep 17 00:00:00 2001
+From f3924093d2c22043d5b009e8bc6e912cd80dfea4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ec40419289..6ac34058ab 100644
+index f52cd8bc19..037b7db544 100644
@@ -27 +28 @@
-@@ -1203,7 +1203,11 @@ txgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
+@@ -1198,7 +1198,11 @@ txgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
@@ -40 +41 @@
-@@ -1226,4 +1230,7 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -1221,4 +1225,7 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
@@ -48 +49 @@
-@@ -1247,4 +1254,7 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -1242,4 +1249,7 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)


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

* patch 'net/ngbe: keep PHY power down while device probing' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (97 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix hotplug remove' " Kevin Traynor
                   ` (35 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f557cce558df1e565edf1463e6d9477f25d5dc70

Thanks.

Kevin

---
From f557cce558df1e565edf1463e6d9477f25d5dc70 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:39 +0800
Subject: [PATCH] net/ngbe: keep PHY power down while device probing

[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]

The internal PHY will be set to default power down after LAN reset,
but the external PHY will not. To keep the PHY behavior consistent,
set PHY power down uniformly here.

Fixes: 708ebe7d0399 ("net/ngbe: fix external PHY power down")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_devids.h | 1 +
 drivers/net/ngbe/base/ngbe_hw.c     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_devids.h b/drivers/net/ngbe/base/ngbe_devids.h
index 6010cc050e..75fb6d702a 100644
--- a/drivers/net/ngbe/base/ngbe_devids.h
+++ b/drivers/net/ngbe/base/ngbe_devids.h
@@ -78,4 +78,5 @@
 #define NGBE_YT8521S_SFP			0x0060
 #define NGBE_LY_YT8521S_SFP			0x0070
+#define NGBE_RGMII_FPGA				0x0080
 #define NGBE_WOL_SUP				0x4000
 #define NGBE_NCSI_SUP				0x8000
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 08a7e02943..abfe800caf 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -174,4 +174,7 @@ s32 ngbe_reset_hw_em(struct ngbe_hw *hw)
 	hw->mac.clear_hw_cntrs(hw);
 
+	if (!((hw->sub_device_id & NGBE_OEM_MASK) == NGBE_RGMII_FPGA))
+		hw->phy.set_phy_power(hw, false);
+
 	msec_delay(50);
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.666141626 +0100
+++ 0100-net-ngbe-keep-PHY-power-down-while-device-probing.patch	2024-08-23 17:18:09.824430469 +0100
@@ -1 +1 @@
-From 01d94f0fb04cbb59e77b8b045616aeb11722bacf Mon Sep 17 00:00:00 2001
+From f557cce558df1e565edf1463e6d9477f25d5dc70 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 83eedf423e..e1efa62015 100644
+index 6010cc050e..75fb6d702a 100644
@@ -23,2 +24,2 @@
-@@ -84,4 +84,5 @@
- #define NGBE_INTERNAL_YT8521S_SFP_GPIO		0x0064
+@@ -78,4 +78,5 @@
+ #define NGBE_YT8521S_SFP			0x0060
@@ -30 +31 @@
-index 22ccdb0b7d..4dced0d328 100644
+index 08a7e02943..abfe800caf 100644


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

* patch 'net/txgbe: fix hotplug remove' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (98 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ngbe: keep PHY power down while device probing' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
                   ` (34 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/13f645ef0ebde3bc55660ba5a68906c23464dab8

Thanks.

Kevin

---
From 13f645ef0ebde3bc55660ba5a68906c23464dab8 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:41 +0800
Subject: [PATCH] net/txgbe: fix hotplug remove

[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]

This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.

Fixes: 7dc117068a7c ("net/txgbe: support probe and remove")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 3ff8da2de9..00375b3b94 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -952,5 +952,5 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
 		return 0;
 
-	return rte_eth_dev_destroy(ethdev, eth_txgbe_dev_uninit);
+	return rte_eth_dev_pci_generic_remove(pci_dev, eth_txgbe_dev_uninit);
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.692302699 +0100
+++ 0101-net-txgbe-fix-hotplug-remove.patch	2024-08-23 17:18:09.828430483 +0100
@@ -1 +1 @@
-From 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f Mon Sep 17 00:00:00 2001
+From 13f645ef0ebde3bc55660ba5a68906c23464dab8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 699ff1c920..20fa0a5b05 100644
+index 3ff8da2de9..00375b3b94 100644
@@ -22 +23 @@
-@@ -965,5 +965,5 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
+@@ -952,5 +952,5 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)


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

* patch 'net/ngbe: fix hotplug remove' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (99 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix hotplug remove' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix MTU range' " Kevin Traynor
                   ` (33 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7436ea6a3aca1bde021b5a66916c54cc1c277035

Thanks.

Kevin

---
From 7436ea6a3aca1bde021b5a66916c54cc1c277035 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:42 +0800
Subject: [PATCH] net/ngbe: fix hotplug remove

[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]

This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.

Fixes: 6ee7e574cd48 ("net/ngbe: support probe and remove")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 3038694042..7f7bedddba 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -527,5 +527,5 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
 		return 0;
 
-	return rte_eth_dev_destroy(ethdev, eth_ngbe_dev_uninit);
+	return rte_eth_dev_pci_generic_remove(pci_dev, eth_ngbe_dev_uninit);
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.720641784 +0100
+++ 0102-net-ngbe-fix-hotplug-remove.patch	2024-08-23 17:18:09.830430490 +0100
@@ -1 +1 @@
-From c602202c346663572043b408a27cb98e20f31886 Mon Sep 17 00:00:00 2001
+From 7436ea6a3aca1bde021b5a66916c54cc1c277035 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2a858b76d0..9d75e222c3 100644
+index 3038694042..7f7bedddba 100644
@@ -22 +23 @@
-@@ -548,5 +548,5 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
+@@ -527,5 +527,5 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)


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

* patch 'net/txgbe: fix MTU range' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (100 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
                   ` (32 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/329e6c3c4f1b19db3d2f1d81aaaa76953c1f3162

Thanks.

Kevin

---
From 329e6c3c4f1b19db3d2f1d81aaaa76953c1f3162 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:43 +0800
Subject: [PATCH] net/txgbe: fix MTU range

[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]

The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.

Fixes: 3926214fd80d ("net/txgbe: support MTU set")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 12 +++++-------
 drivers/net/txgbe/txgbe_ethdev.h |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 00375b3b94..5c6e07f200 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2617,5 +2617,7 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
 	dev_info->min_rx_bufsize = 1024;
-	dev_info->max_rx_pktlen = 15872;
+	dev_info->max_rx_pktlen = TXGBE_MAX_MTU + TXGBE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+	dev_info->max_mtu = TXGBE_MAX_MTU;
 	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
 	dev_info->max_hash_mac_addrs = TXGBE_VMDQ_NUM_UC_MAC;
@@ -3504,10 +3506,6 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	}
 
-	if (hw->mode)
-		wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
-			TXGBE_FRAME_SIZE_MAX);
-	else
-		wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
-			TXGBE_FRMSZ_MAX(frame_size));
+	wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
+		TXGBE_FRMSZ_MAX(frame_size));
 
 	return 0;
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index edc3311e19..87cdb63e88 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -56,5 +56,5 @@
 #define TXGBE_5TUPLE_MIN_PRI            1
 
-
+#define TXGBE_MAX_MTU			9414
 /* The overhead from MTU to max frame size. */
 #define TXGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.746512060 +0100
+++ 0103-net-txgbe-fix-MTU-range.patch	2024-08-23 17:18:09.834430504 +0100
@@ -1 +1 @@
-From af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf Mon Sep 17 00:00:00 2001
+From 329e6c3c4f1b19db3d2f1d81aaaa76953c1f3162 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 20fa0a5b05..c2df5a314b 100644
+index 00375b3b94..5c6e07f200 100644
@@ -22 +23 @@
-@@ -2671,5 +2671,7 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -2617,5 +2617,7 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -31 +32 @@
-@@ -3695,10 +3697,6 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -3504,10 +3506,6 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -45 +46 @@
-index 050acd967f..f0f4ced5b0 100644
+index edc3311e19..87cdb63e88 100644
@@ -48 +49 @@
-@@ -57,5 +57,5 @@
+@@ -56,5 +56,5 @@


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

* patch 'net/ngbe: fix MTU range' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (101 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix MTU range' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix memory leaks' " Kevin Traynor
                   ` (31 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/326ede6dd4cb837cde7cb960ffb0613f7cc1c8c3

Thanks.

Kevin

---
From 326ede6dd4cb837cde7cb960ffb0613f7cc1c8c3 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:44 +0800
Subject: [PATCH] net/ngbe: fix MTU range

[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]

The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.

Fixes: 07baabb6a51a ("net/ngbe: support MTU set")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 4 +++-
 drivers/net/ngbe/ngbe_ethdev.h | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 7f7bedddba..7866f05571 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1767,5 +1767,7 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
 	dev_info->min_rx_bufsize = 1024;
-	dev_info->max_rx_pktlen = 15872;
+	dev_info->max_rx_pktlen = NGBE_MAX_MTU + NGBE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+	dev_info->max_mtu = NGBE_MAX_MTU;
 	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
 	dev_info->max_hash_mac_addrs = NGBE_VMDQ_NUM_UC_MAC;
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index 8d500fd38c..bc26f4eebb 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -32,4 +32,5 @@
 #define NGBE_QUEUE_ITR_INTERVAL_DEFAULT	500 /* 500us */
 
+#define NGBE_MAX_MTU		9414
 /* The overhead from MTU to max frame size. */
 #define NGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.774427715 +0100
+++ 0104-net-ngbe-fix-MTU-range.patch	2024-08-23 17:18:09.835430507 +0100
@@ -1 +1 @@
-From df2075eb681111637d5340c9abaf60e0aefab615 Mon Sep 17 00:00:00 2001
+From 326ede6dd4cb837cde7cb960ffb0613f7cc1c8c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 9d75e222c3..d7fc4bc70b 100644
+index 7f7bedddba..7866f05571 100644
@@ -22 +23 @@
-@@ -1819,5 +1819,7 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1767,5 +1767,7 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -32 +33 @@
-index c748bfbe4d..7af58a57ac 100644
+index 8d500fd38c..bc26f4eebb 100644
@@ -35 +36 @@
-@@ -33,4 +33,5 @@
+@@ -32,4 +32,5 @@


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

* patch 'net/txgbe: fix memory leaks' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (102 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
                   ` (30 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f557ab4dbe79cd36592c9b751ad84ca705c0926d

Thanks.

Kevin

---
From f557ab4dbe79cd36592c9b751ad84ca705c0926d Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:45 +0800
Subject: [PATCH] net/txgbe: fix memory leaks

[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]

Fix some memory leaks caused by not release resource in time.

Fixes: e1698e383c2a ("net/txgbe: add device init and uninit")
Fixes: 635c21354f9a ("net/txgbe: add flow director filter init and uninit")
Fixes: c13f84a71b2d ("net/txgbe: add L2 tunnel filter init and uninit")
Fixes: 3a123ba60a71 ("net/txgbe: support VF start and stop")
Fixes: 039b769f7c01 ("net/txgbe: support VF MAC address")
Fixes: 226bf98eda87 ("net/txgbe: add Rx and Tx queues setup and release")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c    | 4 ++++
 drivers/net/txgbe/txgbe_ethdev_vf.c | 7 ++++++-
 drivers/net/txgbe/txgbe_rxtx.c      | 5 +++++
 drivers/net/txgbe/txgbe_rxtx.h      | 2 ++
 4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 5c6e07f200..84c1b7d637 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -719,4 +719,6 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 			     "Failed to allocate %d bytes needed to store MAC addresses",
 			     RTE_ETHER_ADDR_LEN * TXGBE_VMDQ_NUM_UC_MAC);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -ENOMEM;
 	}
@@ -890,4 +892,5 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
 		PMD_INIT_LOG(ERR,
 			     "Failed to allocate memory for fdir hash map!");
+		rte_hash_free(fdir_info->hash_handle);
 		return -ENOMEM;
 	}
@@ -925,4 +928,5 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
 		PMD_INIT_LOG(ERR,
 			"Failed to allocate memory for L2 TN hash map!");
+		rte_hash_free(l2_tn_info->hash_handle);
 		return -ENOMEM;
 	}
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index 037b7db544..6ad3e5ee49 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -294,4 +294,6 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	if (err) {
 		PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", err);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -EIO;
 	}
@@ -667,6 +669,8 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
 		 */
 		intr_vector = 1;
-		if (rte_intr_efd_enable(intr_handle, intr_vector))
+		if (rte_intr_efd_enable(intr_handle, intr_vector)) {
+			txgbe_dev_clear_queues(dev);
 			return -1;
+		}
 	}
 
@@ -676,4 +680,5 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
 			PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
 				     " intr_vec", dev->data->nb_rx_queues);
+			txgbe_dev_clear_queues(dev);
 			return -ENOMEM;
 		}
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index e2a32b1322..6971c775ef 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -2141,4 +2141,5 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
 		txq->ops->release_mbufs(txq);
 		txq->ops->free_swring(txq);
+		rte_memzone_free(txq->mz);
 		rte_free(txq);
 	}
@@ -2352,4 +2353,5 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->tx_free_thresh = tx_free_thresh;
@@ -2469,4 +2471,5 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
 		rte_free(rxq->sw_ring);
 		rte_free(rxq->sw_sc_ring);
+		rte_memzone_free(rxq->mz);
 		rte_free(rxq);
 	}
@@ -2562,4 +2565,5 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+	rte_pktmbuf_free(rxq->pkt_first_seg);
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
@@ -2642,4 +2646,5 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	}
 
+	rxq->mz = rz;
 	/*
 	 * Zero init all the descriptors in the ring.
diff --git a/drivers/net/txgbe/txgbe_rxtx.h b/drivers/net/txgbe/txgbe_rxtx.h
index 27d4c842c0..c579e1a9f2 100644
--- a/drivers/net/txgbe/txgbe_rxtx.h
+++ b/drivers/net/txgbe/txgbe_rxtx.h
@@ -315,4 +315,5 @@ struct txgbe_rx_queue {
 	/** hold packets to return to application */
 	struct rte_mbuf *rx_stage[RTE_PMD_TXGBE_RX_MAX_BURST * 2];
+	const struct rte_memzone *mz;
 };
 
@@ -403,4 +404,5 @@ struct txgbe_tx_queue {
 	/**< indicates that IPsec TX feature is in use */
 #endif
+	const struct rte_memzone *mz;
 };
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.800706746 +0100
+++ 0105-net-txgbe-fix-memory-leaks.patch	2024-08-23 17:18:09.840430525 +0100
@@ -1 +1 @@
-From 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 Mon Sep 17 00:00:00 2001
+From f557ab4dbe79cd36592c9b751ad84ca705c0926d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index c2df5a314b..26cf7632c3 100644
+index 5c6e07f200..84c1b7d637 100644
@@ -28 +29 @@
-@@ -736,4 +736,6 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -719,4 +719,6 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -35 +36 @@
-@@ -903,4 +905,5 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
+@@ -890,4 +892,5 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
@@ -41 +42 @@
-@@ -938,4 +941,5 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
+@@ -925,4 +928,5 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
@@ -48 +49 @@
-index 6ac34058ab..87f76673d7 100644
+index 037b7db544..6ad3e5ee49 100644
@@ -51 +52 @@
-@@ -296,4 +296,6 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -294,4 +294,6 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
@@ -58 +59 @@
-@@ -672,6 +674,8 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -667,6 +669,8 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -68 +69 @@
-@@ -681,4 +685,5 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -676,4 +680,5 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -75 +76 @@
-index 35f80d73ac..5bc0f8772f 100644
+index e2a32b1322..6971c775ef 100644
@@ -78 +79 @@
-@@ -2158,4 +2158,5 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
+@@ -2141,4 +2141,5 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
@@ -84 +85 @@
-@@ -2377,4 +2378,5 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2352,4 +2353,5 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -90 +91 @@
-@@ -2500,4 +2502,5 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
+@@ -2469,4 +2471,5 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
@@ -96 +97 @@
-@@ -2593,4 +2596,5 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
+@@ -2562,4 +2565,5 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
@@ -102 +103 @@
-@@ -2678,4 +2682,5 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -2642,4 +2646,5 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -109 +110 @@
-index 336f060633..9155eb1f70 100644
+index 27d4c842c0..c579e1a9f2 100644
@@ -112 +113 @@
-@@ -323,4 +323,5 @@ struct txgbe_rx_queue {
+@@ -315,4 +315,5 @@ struct txgbe_rx_queue {
@@ -118 +119 @@
-@@ -411,4 +412,5 @@ struct txgbe_tx_queue {
+@@ -403,4 +404,5 @@ struct txgbe_tx_queue {


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

* patch 'net/ngbe: fix memory leaks' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (103 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix memory leaks' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/txgbe: fix Rx interrupt' " Kevin Traynor
                   ` (29 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/11c04eef36780305b65cfec8cd769b5d1af7ff4e

Thanks.

Kevin

---
From 11c04eef36780305b65cfec8cd769b5d1af7ff4e Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:46 +0800
Subject: [PATCH] net/ngbe: fix memory leaks

[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]

Fix some memory leaks caused by not release resource in time.

Fixes: 43b7e5ea60ac ("net/ngbe: support Rx queue setup/release")
Fixes: a58e7c312c6b ("net/ngbe: support Tx queue setup/release")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_rxtx.c | 5 +++++
 drivers/net/ngbe/ngbe_rxtx.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index 5df4186c72..fcff13fb22 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -1775,4 +1775,5 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
 			txq->ops->release_mbufs(txq);
 			txq->ops->free_swring(txq);
+			rte_memzone_free(txq->mz);
 		}
 		rte_free(txq);
@@ -1979,4 +1980,5 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->tx_free_thresh = tx_free_thresh;
@@ -2081,4 +2083,5 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
 		rte_free(rxq->sw_ring);
 		rte_free(rxq->sw_sc_ring);
+		rte_memzone_free(rxq->mz);
 		rte_free(rxq);
 	}
@@ -2171,4 +2174,5 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+	rte_pktmbuf_free(rxq->pkt_first_seg);
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
@@ -2261,4 +2265,5 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	}
 
+	rxq->mz = rz;
 	/*
 	 * Zero init all the descriptors in the ring.
diff --git a/drivers/net/ngbe/ngbe_rxtx.h b/drivers/net/ngbe/ngbe_rxtx.h
index 9130f9d0df..2914b9a756 100644
--- a/drivers/net/ngbe/ngbe_rxtx.h
+++ b/drivers/net/ngbe/ngbe_rxtx.h
@@ -277,4 +277,5 @@ struct ngbe_rx_queue {
 	/** hold packets to return to application */
 	struct rte_mbuf *rx_stage[RTE_PMD_NGBE_RX_MAX_BURST * 2];
+	const struct rte_memzone *mz;
 };
 
@@ -354,4 +355,5 @@ struct ngbe_tx_queue {
 
 	const struct ngbe_txq_ops *ops;       /**< txq ops */
+	const struct rte_memzone *mz;
 };
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.832603683 +0100
+++ 0106-net-ngbe-fix-memory-leaks.patch	2024-08-23 17:18:09.842430532 +0100
@@ -1 +1 @@
-From fea7422f7a4ec2b4c406865629b5ebea699f6588 Mon Sep 17 00:00:00 2001
+From 11c04eef36780305b65cfec8cd769b5d1af7ff4e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c54c67f7ee..f3eb797d0c 100644
+index 5df4186c72..fcff13fb22 100644
@@ -22 +23 @@
-@@ -1814,4 +1814,5 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
+@@ -1775,4 +1775,5 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
@@ -28 +29 @@
-@@ -2031,4 +2032,5 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -1979,4 +1980,5 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -34 +35 @@
-@@ -2139,4 +2141,5 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
+@@ -2081,4 +2083,5 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
@@ -40 +41 @@
-@@ -2229,4 +2232,5 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
+@@ -2171,4 +2174,5 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
@@ -46 +47 @@
-@@ -2324,4 +2328,5 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -2261,4 +2265,5 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -53 +54 @@
-index 41580ba0b9..7574db32d8 100644
+index 9130f9d0df..2914b9a756 100644
@@ -56 +57 @@
-@@ -292,4 +292,5 @@ struct ngbe_rx_queue {
+@@ -277,4 +277,5 @@ struct ngbe_rx_queue {
@@ -62 +63 @@
-@@ -374,4 +375,5 @@ struct ngbe_tx_queue {
+@@ -354,4 +355,5 @@ struct ngbe_tx_queue {


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

* patch 'net/txgbe: fix Rx interrupt' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (104 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/vmxnet3: fix init logs' " Kevin Traynor
                   ` (28 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c92b40ced1ae97609e71b1a6d09149af92963100

Thanks.

Kevin

---
From c92b40ced1ae97609e71b1a6d09149af92963100 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:47 +0800
Subject: [PATCH] net/txgbe: fix Rx interrupt

[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]

Fix Rx interrupt enable failure.

Fixes: a5682d28f134 ("net/txgbe: support Rx interrupt")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c    | 18 +++++++++---------
 drivers/net/txgbe/txgbe_ethdev_vf.c |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 84c1b7d637..1dbf7c554e 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3662,11 +3662,11 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 
 	if (queue_id < 32) {
-		mask = rd32(hw, TXGBE_IMS(0));
-		mask &= (1 << queue_id);
-		wr32(hw, TXGBE_IMS(0), mask);
+		mask = rd32(hw, TXGBE_IMC(0));
+		mask |= (1 << queue_id);
+		wr32(hw, TXGBE_IMC(0), mask);
 	} else if (queue_id < 64) {
-		mask = rd32(hw, TXGBE_IMS(1));
-		mask &= (1 << (queue_id - 32));
-		wr32(hw, TXGBE_IMS(1), mask);
+		mask = rd32(hw, TXGBE_IMC(1));
+		mask |= (1 << (queue_id - 32));
+		wr32(hw, TXGBE_IMC(1), mask);
 	}
 	rte_intr_enable(intr_handle);
@@ -3683,9 +3683,9 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 	if (queue_id < 32) {
 		mask = rd32(hw, TXGBE_IMS(0));
-		mask &= ~(1 << queue_id);
+		mask |= (1 << queue_id);
 		wr32(hw, TXGBE_IMS(0), mask);
 	} else if (queue_id < 64) {
 		mask = rd32(hw, TXGBE_IMS(1));
-		mask &= ~(1 << (queue_id - 32));
+		mask |= (1 << (queue_id - 32));
 		wr32(hw, TXGBE_IMS(1), mask);
 	}
@@ -3721,5 +3721,5 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
 	} else {
 		/* rx or tx causes */
-		/* Workaround for ICR lost */
+		msix_vector |= TXGBE_IVAR_VLD; /* Workaround for ICR lost */
 		idx = ((16 * (queue & 1)) + (8 * direction));
 		tmp = rd32(hw, TXGBE_IVAR(queue >> 1));
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index 6ad3e5ee49..e8b5c326a5 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -967,5 +967,5 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
 	} else {
 		/* rx or tx cause */
-		/* Workaround for ICR lost */
+		msix_vector |= TXGBE_VFIVAR_VLD; /* Workaround for ICR lost */
 		idx = ((16 * (queue & 1)) + (8 * direction));
 		tmp = rd32(hw, TXGBE_VFIVAR(queue >> 1));
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.859658883 +0100
+++ 0107-net-txgbe-fix-Rx-interrupt.patch	2024-08-23 17:18:09.846430546 +0100
@@ -1 +1 @@
-From 37af8751f2726cd49881d2cf8089302893ea0f41 Mon Sep 17 00:00:00 2001
+From c92b40ced1ae97609e71b1a6d09149af92963100 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 26cf7632c3..700be8f83c 100644
+index 84c1b7d637..1dbf7c554e 100644
@@ -21 +22 @@
-@@ -3853,11 +3853,11 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3662,11 +3662,11 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -39 +40 @@
-@@ -3874,9 +3874,9 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3683,9 +3683,9 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -51 +52 @@
-@@ -3912,5 +3912,5 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -3721,5 +3721,5 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
@@ -59 +60 @@
-index 87f76673d7..d075f9d232 100644
+index 6ad3e5ee49..e8b5c326a5 100644
@@ -62 +63 @@
-@@ -972,5 +972,5 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -967,5 +967,5 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,


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

* patch 'net/vmxnet3: fix init logs' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (105 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/txgbe: fix Rx interrupt' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/ena: fix bad checksum handling' " Kevin Traynor
                   ` (27 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bf86cb7c134b8c2b625af3a95cc8b9ecb77c84e3

Thanks.

Kevin

---
From bf86cb7c134b8c2b625af3a95cc8b9ecb77c84e3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:22:52 +0200
Subject: [PATCH] net/vmxnet3: fix init logs

[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]

All logs for this driver are emitted under pmd.net.vmxnet3.driver while
two logtypes exist.
This issue comes from the conversion to dynamic logtypes change.
Redirect PMD_INIT_LOG to pmd.net.vmxnet3.init.

Fixes: 79daffdcb6ac ("net/vmxnet3: implement dynamic logging")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/vmxnet3/vmxnet3_logs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 74154e3a1a..ae8542811a 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -8,5 +8,5 @@
 extern int vmxnet3_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
+	rte_log(RTE_LOG_ ## level, vmxnet3_logtype_init, \
 		"%s(): " fmt "\n", __func__, ## args)
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.888820434 +0100
+++ 0108-net-vmxnet3-fix-init-logs.patch	2024-08-23 17:18:09.846430546 +0100
@@ -1 +1 @@
-From e095395a416d33e45cb626bf8fbdee7a2ce355af Mon Sep 17 00:00:00 2001
+From bf86cb7c134b8c2b625af3a95cc8b9ecb77c84e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e2127988f6..5962325d62 100644
+index 74154e3a1a..ae8542811a 100644


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

* patch 'net/ena: fix bad checksum handling' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (106 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/vmxnet3: fix init logs' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-26 10:26   ` Brandes, Shai
  2024-08-23 16:18 ` patch 'net/ena: fix return value check' " Kevin Traynor
                   ` (26 subsequent siblings)
  134 siblings, 1 reply; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Shai Brandes; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f

Thanks.

Kevin

---
From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:22 +0300
Subject: [PATCH] net/ena: fix bad checksum handling

[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]

Removed a workaround for a false L4 bad Rx csum
indication from the device. The workaround was to set it
as unknown so the application would check it instead.
The issue was fixed in the device, thus the driver bad csum
handling should be fixed in the PMD.

Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 1c61f793e6..84c41f1b9d 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
 	else
 		if (unlikely(ena_rx_ctx->l4_csum_err))
-			/*
-			 * For the L4 Rx checksum offload the HW may indicate
-			 * bad checksum although it's valid. Because of that,
-			 * we're setting the UNKNOWN flag to let the app
-			 * re-verify the checksum.
-			 */
-			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
+			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
 		else
 			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.913173354 +0100
+++ 0109-net-ena-fix-bad-checksum-handling.patch	2024-08-23 17:18:09.849430556 +0100
@@ -1 +1 @@
-From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00 2001
+From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 4e7171e629..b43b913903 100644
+index 1c61f793e6..84c41f1b9d 100644
@@ -24,3 +25,3 @@
-@@ -675,11 +675,5 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
- 		if (unlikely(ena_rx_ctx->l4_csum_err)) {
- 			++rx_stats->l4_csum_bad;
+@@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
+ 	else
+ 		if (unlikely(ena_rx_ctx->l4_csum_err))
@@ -35,2 +36,2 @@
- 		} else {
- 			++rx_stats->l4_csum_good;
+ 		else
+ 			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;


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

* patch 'net/ena: fix return value check' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (107 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ena: fix bad checksum handling' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:18 ` patch 'net/nfp: fix disabling 32-bit build' " Kevin Traynor
                   ` (25 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Shai Brandes; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d8768012e6fb8f6866c298cc2d7a59c3576f129d

Thanks.

Kevin

---
From d8768012e6fb8f6866c298cc2d7a59c3576f129d Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:23 +0300
Subject: [PATCH] net/ena: fix return value check

[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]

Removed the sign inversion for when checking if
ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED.
ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign
inversion is wrong.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 84c41f1b9d..e810f2673c 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -444,5 +444,5 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
 	rc = ena_com_set_host_attributes(ena_dev);
 	if (rc) {
-		if (rc == -ENA_COM_UNSUPPORTED)
+		if (rc == ENA_COM_UNSUPPORTED)
 			PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
 		else
@@ -484,5 +484,5 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
 	rc = ena_com_set_host_attributes(&adapter->ena_dev);
 	if (rc) {
-		if (rc == -ENA_COM_UNSUPPORTED)
+		if (rc == ENA_COM_UNSUPPORTED)
 			PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
 		else
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.940228884 +0100
+++ 0110-net-ena-fix-return-value-check.patch	2024-08-23 17:18:09.851430563 +0100
@@ -1 +1 @@
-From 8936b01a512a8e25a7369d282a17b9b09c55728b Mon Sep 17 00:00:00 2001
+From d8768012e6fb8f6866c298cc2d7a59c3576f129d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b43b913903..67a1d86f9a 100644
+index 84c41f1b9d..e810f2673c 100644
@@ -23 +24 @@
-@@ -813,5 +813,5 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
+@@ -444,5 +444,5 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
@@ -30 +31 @@
-@@ -857,5 +857,5 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
+@@ -484,5 +484,5 @@ static void ena_config_debug_area(struct ena_adapter *adapter)


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

* patch 'net/nfp: fix disabling 32-bit build' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (108 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/ena: fix return value check' " Kevin Traynor
@ 2024-08-23 16:18 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'test/crypto: fix allocation comment' " Kevin Traynor
                   ` (24 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:18 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/58aac00c7ecc2bffe75d8f551ce974ad5b994a96

Thanks.

Kevin

---
From 58aac00c7ecc2bffe75d8f551ce974ad5b994a96 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Tue, 9 Jul 2024 16:24:01 +0800
Subject: [PATCH] net/nfp: fix disabling 32-bit build

[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]

NFP PMD only support compile on 64-bit linux OS, add exit logic in
other conditions.

Fixes: 8741a9074536 ("net/nfp: disable for 32-bit meson builds")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/nfp/meson.build b/drivers/net/nfp/meson.build
index 810f02ae5b..b39ae1fa2a 100644
--- a/drivers/net/nfp/meson.build
+++ b/drivers/net/nfp/meson.build
@@ -5,4 +5,5 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
     build = false
     reason = 'only supported on 64-bit Linux'
+    subdir_done()
 endif
 sources = files(
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.967672758 +0100
+++ 0111-net-nfp-fix-disabling-32-bit-build.patch	2024-08-23 17:18:09.851430563 +0100
@@ -1 +1 @@
-From c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 Mon Sep 17 00:00:00 2001
+From 58aac00c7ecc2bffe75d8f551ce974ad5b994a96 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d805644ec5..7216c8dff9 100644
+index 810f02ae5b..b39ae1fa2a 100644
@@ -28 +29 @@
- 
+ sources = files(


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

* patch 'test/crypto: fix allocation comment' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (109 preceding siblings ...)
  2024-08-23 16:18 ` patch 'net/nfp: fix disabling 32-bit build' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'doc: fix typo in l2fwd-crypto guide' " Kevin Traynor
                   ` (23 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ccbf501111676bb5be56e8f43f0ed8758b535fa7

Thanks.

Kevin

---
From ccbf501111676bb5be56e8f43f0ed8758b535fa7 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:06 +0000
Subject: [PATCH] test/crypto: fix allocation comment

[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]

This patch fixes a typo in the `test_cryptodev.c` file where "out-op" was
incorrectly used instead of "out-of-place" on three separate occasions.

Fixes: f3dbf94be60c ("app/test: check SGL on QAT")
Fixes: 43220096d66a ("test/crypto: add PDCP cases for scatter gather")

Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 0dd0b4450a..245d514761 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8416,5 +8416,5 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
 	if (oop) {
 		/*
-		 * For out-op-place we need to alloc another mbuf
+		 * For out-of-place we need to alloc another mbuf
 		 */
 		ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
@@ -8618,5 +8618,5 @@ test_pdcp_proto_SGL(int i, int oop,
 	if (oop) {
 		/*
-		 * For out-op-place we need to alloc another mbuf
+		 * For out-of-place we need to alloc another mbuf
 		 */
 		ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
@@ -13727,5 +13727,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 
 	/*
-	 * For out-op-place we need to alloc another mbuf
+	 * For out-of-place we need to alloc another mbuf
 	 */
 	if (oop) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.992498167 +0100
+++ 0112-test-crypto-fix-allocation-comment.patch	2024-08-23 17:18:09.860430594 +0100
@@ -1 +1 @@
-From 8020502dde70cabc7f65219d8f8db762b03b0e41 Mon Sep 17 00:00:00 2001
+From ccbf501111676bb5be56e8f43f0ed8758b535fa7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6042db36a4..c846b26ed1 100644
+index 0dd0b4450a..245d514761 100644
@@ -23 +24 @@
-@@ -9429,5 +9429,5 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
+@@ -8416,5 +8416,5 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
@@ -30 +31 @@
-@@ -9638,5 +9638,5 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -8618,5 +8618,5 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -37 +38 @@
-@@ -16832,5 +16832,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -13727,5 +13727,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,


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

* patch 'doc: fix typo in l2fwd-crypto guide' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (110 preceding siblings ...)
  2024-08-23 16:19 ` patch 'test/crypto: fix allocation comment' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'test/crypto: fix asymmetric capability test' " Kevin Traynor
                   ` (22 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/25ce925cd46e63b4dc3c2ebeff4aae9bbd3a2777

Thanks.

Kevin

---
From 25ce925cd46e63b4dc3c2ebeff4aae9bbd3a2777 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:08 +0000
Subject: [PATCH] doc: fix typo in l2fwd-crypto guide

[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]

This patch fixes a typo in the l2fwd-crypto documentation where
the l2fwd-crypt was changed to l2fwd-crypto.

Fixes: 7cacb0565539 ("doc: add generic build instructions for sample apps")

Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index ce49eab96f..7ff304d05c 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -31,5 +31,5 @@ Compiling the Application
 To compile the sample application see :doc:`compiling`.
 
-The application is located in the ``l2fwd-crypt`` sub-directory.
+The application is located in the ``l2fwd-crypto`` sub-directory.
 
 Running the Application
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.027717413 +0100
+++ 0113-doc-fix-typo-in-l2fwd-crypto-guide.patch	2024-08-23 17:18:09.861430598 +0100
@@ -1 +1 @@
-From cf0556f4a11c1de87f94ed9ba0c14267cb034217 Mon Sep 17 00:00:00 2001
+From 25ce925cd46e63b4dc3c2ebeff4aae9bbd3a2777 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'test/crypto: fix asymmetric capability test' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (111 preceding siblings ...)
  2024-08-23 16:19 ` patch 'doc: fix typo in l2fwd-crypto guide' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " Kevin Traynor
                   ` (21 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/457a5dc65033352ee7e762784916404cd764f344

Thanks.

Kevin

---
From 457a5dc65033352ee7e762784916404cd764f344 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:07:25 +0530
Subject: [PATCH] test/crypto: fix asymmetric capability test

[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]

Updated asymmetric capability test for below issues:
 * Skip test if asymmetric crypto feature is not supported by device.
 * Assert return value of RTE function to get asymmetric capability.

Coverity issue: 373365
Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev_asym.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 7de95797fc..29e42914e3 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -1076,5 +1076,5 @@ test_capability(void)
 		RTE_LOG(INFO, USER1,
 				"Device doesn't support asymmetric. Test Skipped\n");
-		return TEST_SUCCESS;
+		return TEST_SKIPPED;
 	}
 
@@ -1091,4 +1091,5 @@ test_capability(void)
 				(const struct
 				rte_cryptodev_asym_capability_idx *) &idx);
+			TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability");
 			print_asym_capa(capa);
 			}
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.052048464 +0100
+++ 0114-test-crypto-fix-asymmetric-capability-test.patch	2024-08-23 17:18:09.862430601 +0100
@@ -1 +1 @@
-From 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 Mon Sep 17 00:00:00 2001
+From 457a5dc65033352ee7e762784916404cd764f344 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3802cf8022..1d88832146 100644
+index 7de95797fc..29e42914e3 100644
@@ -24 +25 @@
-@@ -627,5 +627,5 @@ test_capability(void)
+@@ -1076,5 +1076,5 @@ test_capability(void)
@@ -31 +32 @@
-@@ -642,4 +642,5 @@ test_capability(void)
+@@ -1091,4 +1091,5 @@ test_capability(void)


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

* patch 'net/ice: fix memory leaks in raw pattern parsing' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (112 preceding siblings ...)
  2024-08-23 16:19 ` patch 'test/crypto: fix asymmetric capability test' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/ice: fix return value for " Kevin Traynor
                   ` (20 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Vladimir Medvedkin
  Cc: Michael Theodore Stolarchuk, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/709ee2dfaab9cc92f0216cacf6867362ea2e5302

Thanks.

Kevin

---
From 709ee2dfaab9cc92f0216cacf6867362ea2e5302 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:44 +0000
Subject: [PATCH] net/ice: fix memory leaks in raw pattern parsing

[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]

This patch fixes possible memory leaks inside the
ice_hash_parse_raw_pattern() due to the lack of a call to rte_free() for
previously allocated pkt_buf and msk_buf.

Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")

Reported-by: Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 .mailmap                   |  1 +
 drivers/net/ice/ice_hash.c | 22 ++++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/.mailmap b/.mailmap
index 8b2d737827..528065d28d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -915,4 +915,5 @@ Michael Savisko <michaelsav@nvidia.com>
 Michael Shamis <michaelsh@marvell.com>
 Michael S. Tsirkin <mst@redhat.com>
+Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
 Michael Wildt <michael.wildt@broadcom.com>
 Michal Berger <michallinuxstuff@gmail.com>
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 52646e9408..6fcfc5fc4c 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -658,5 +658,5 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 	uint8_t tmp_val = 0;
 	uint8_t tmp_c = 0;
-	int i, j;
+	int i, j, ret = 0;
 
 	if (ad->psr == NULL)
@@ -678,6 +678,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 
 	msk_buf = rte_zmalloc(NULL, pkt_len, 0);
-	if (!msk_buf)
+	if (!msk_buf) {
+		rte_free(pkt_buf);
 		return -ENOMEM;
+	}
 
 	/* convert string to int array */
@@ -716,16 +718,20 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 	}
 
-	if (ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt))
-		return -rte_errno;
+	ret = ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt);
+	if (ret)
+		goto free_mem;
 
-	if (ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
-		pkt_len, ICE_BLK_RSS, true, &prof))
-		return -rte_errno;
+	ret = ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
+			pkt_len, ICE_BLK_RSS, true, &prof);
+	if (ret)
+		goto free_mem;
 
 	rte_memcpy(&meta->raw.prof, &prof, sizeof(prof));
 
+free_mem:
 	rte_free(pkt_buf);
 	rte_free(msk_buf);
-	return 0;
+
+	return ret;
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.130535014 +0100
+++ 0115-net-ice-fix-memory-leaks-in-raw-pattern-parsing.patch	2024-08-23 17:18:09.864430608 +0100
@@ -1 +1 @@
-From 8044e1d19db3d0012bd1348cb4fcf542d31cd41a Mon Sep 17 00:00:00 2001
+From 709ee2dfaab9cc92f0216cacf6867362ea2e5302 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a6088813cc..541ca895a4 100644
+index 8b2d737827..528065d28d 100644
@@ -25 +26 @@
-@@ -979,4 +979,5 @@ Michael Savisko <michaelsav@nvidia.com>
+@@ -915,4 +915,5 @@ Michael Savisko <michaelsav@nvidia.com>
@@ -32 +33 @@
-index f923641533..6b3095e2c5 100644
+index 52646e9408..6fcfc5fc4c 100644
@@ -35 +36 @@
-@@ -651,5 +651,5 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -658,5 +658,5 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
@@ -42 +43 @@
-@@ -671,6 +671,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -678,6 +678,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
@@ -52 +53 @@
-@@ -709,16 +711,20 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -716,16 +718,20 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,


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

* patch 'net/ice: fix return value for raw pattern parsing' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (113 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " Kevin Traynor
                   ` (19 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c3f203e081a7fc70c9dff6fe77075f26e509edc5

Thanks.

Kevin

---
From c3f203e081a7fc70c9dff6fe77075f26e509edc5 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:46 +0000
Subject: [PATCH] net/ice: fix return value for raw pattern parsing

[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]

If the parser was not initialized when calling ice_hash_parse_raw_pattern()
-rte_errno was returned. Replace returning rte_errno with ENOTSUP since
rte_errno is meaningless in the context of ice_hash_parse_raw_pattern().

Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/ice_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 6fcfc5fc4c..94b104fb36 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -661,5 +661,5 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 
 	if (ad->psr == NULL)
-		return -rte_errno;
+		return -ENOTSUP;
 
 	raw_spec = item->spec;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.183677325 +0100
+++ 0116-net-ice-fix-return-value-for-raw-pattern-parsing.patch	2024-08-23 17:18:09.865430612 +0100
@@ -1 +1 @@
-From 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 Mon Sep 17 00:00:00 2001
+From c3f203e081a7fc70c9dff6fe77075f26e509edc5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index aa76718313..b720e0f755 100644
+index 6fcfc5fc4c..94b104fb36 100644
@@ -23 +24 @@
-@@ -654,5 +654,5 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -661,5 +661,5 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,


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

* patch 'net/mlx5: fix Arm build with GCC 9.1' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (114 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/ice: fix return value for " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/mlx5: fix MTU configuration' " Kevin Traynor
                   ` (18 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9cc6a96d8a1d75fda4f8b398b18afc1087da5bc2

Thanks.

Kevin

---
From 9cc6a96d8a1d75fda4f8b398b18afc1087da5bc2 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 7 Jul 2024 12:57:23 +0300
Subject: [PATCH] net/mlx5: fix Arm build with GCC 9.1

[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]

GCC has introduced a bugfix in 9.1 that changed GCC ABI in ARM setups
https://gcc.gnu.org/gcc-9/changes.html
```
On Arm targets (arm*-*-*), a bug in the implementation of the
procedure call standard (AAPCS) in the GCC 6, 7 and 8 releases
has been fixed a structure containing a bit-field based on a 64-bit
integral type and where no other element in a structure required
64-bit alignment could be passed incorrectly to functions.
This is an ABI change. If the option -Wpsabi is enabled
(on by default) the compiler will emit a diagnostic note for code
that might be affected.
```

This fixes the PMD compilation in the INTEGRITY flow item.

Fixes: 23b0a8b298b1 ("net/mlx5: fix integrity item validation and translation")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ff6713225c..b54b4793cc 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6585,9 +6585,11 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
 
 static int
-validate_integrity_bits(const struct rte_flow_item_integrity *mask,
+validate_integrity_bits(const void *arg,
 			int64_t pattern_flags, uint64_t l3_flags,
 			uint64_t l4_flags, uint64_t ip4_flag,
 			struct rte_flow_error *error)
 {
+	const struct rte_flow_item_integrity *mask = arg;
+
 	if (mask->l3_ok && !(pattern_flags & l3_flags))
 		return rte_flow_error_set(error, EINVAL,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.229321708 +0100
+++ 0117-net-mlx5-fix-Arm-build-with-GCC-9.1.patch	2024-08-23 17:18:09.873430640 +0100
@@ -1 +1 @@
-From 42d6a9084f55281a70bece647803cddbeb8aaec8 Mon Sep 17 00:00:00 2001
+From 9cc6a96d8a1d75fda4f8b398b18afc1087da5bc2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 8a0d58cb05..89057edbcf 100644
+index ff6713225c..b54b4793cc 100644
@@ -34 +35 @@
-@@ -7397,9 +7397,11 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -6585,9 +6585,11 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,


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

* patch 'net/mlx5: fix MTU configuration' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (115 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/mlx5: fix end condition of reading xstats' " Kevin Traynor
                   ` (17 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f7114839ffbdc69be3d8032382ba5462f53c72d3

Thanks.

Kevin

---
From f7114839ffbdc69be3d8032382ba5462f53c72d3 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Mon, 8 Jul 2024 12:59:31 +0200
Subject: [PATCH] net/mlx5: fix MTU configuration

[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]

Apply provided MTU, derived from rte_eth_conf.rxmode.mtu,
on port configuration.

Bugzilla ID: 1483
Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 9c44471c42..c6ec156493 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -137,4 +137,10 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
 	if (ret)
 		return ret;
+	ret = mlx5_dev_set_mtu(dev, dev->data->mtu);
+	if (ret) {
+		DRV_LOG(ERR, "port %u failed to set MTU to %u", dev->data->port_id,
+			dev->data->mtu);
+		return ret;
+	}
 	return 0;
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.277544695 +0100
+++ 0118-net-mlx5-fix-MTU-configuration.patch	2024-08-23 17:18:09.873430640 +0100
@@ -1 +1 @@
-From 10859ecf09c424c0f6a89379f0326a0c51f9cd2f Mon Sep 17 00:00:00 2001
+From f7114839ffbdc69be3d8032382ba5462f53c72d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1b721cda5e..6a678d6dcc 100644
+index 9c44471c42..c6ec156493 100644
@@ -23 +24 @@
-@@ -155,4 +155,10 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
+@@ -137,4 +137,10 @@ mlx5_dev_configure(struct rte_eth_dev *dev)


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

* patch 'net/mlx5: fix end condition of reading xstats' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (116 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/mlx5: fix MTU configuration' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " Kevin Traynor
                   ` (16 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6a7d2c982887e5a4730e923cb48797c626a75574

Thanks.

Kevin

---
From 6a7d2c982887e5a4730e923cb48797c626a75574 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:33:37 +0300
Subject: [PATCH] net/mlx5: fix end condition of reading xstats

[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]

The "mlx5_stats_n" in the "struct mlx5_xstats_ctrl" is the number of
device stats identified by PMD. Right now, the mapping of device
stats to the xstats is not compact. The "input index" of the device
stats would remain UINT16_MAX and be skipped when reading counters.

If some DPDK stats cannot be identified in the middle of the map, the
end condition should be bigger than the "mlx5_stats_n". Or else, some
counters would not be read and calculated.

Using the global const "xstats_n" as the end condition to traverse
the whole array in case some counters are missed. The "xstats_o_idx"
should be used instead of the iteration to check if the statistics
is an IB device counter.

In the meanwhile, adding another field to record the start index of
the IB counters to reduce the redundancy iterations.

Fixes: a687c3e658c2 ("net/mlx5: fix counters map in bonding mode")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 23 +++++++++++++----------
 drivers/net/mlx5/mlx5.h                 |  5 +++++
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index a181a19f29..6d98657917 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1363,4 +1363,5 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
 	int ret;
 	uint16_t i_idx, o_idx;
+	uint32_t total_stats = xstats_n;
 
 	et_stats->cmd = ETHTOOL_GSTATS;
@@ -1380,17 +1381,17 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
 	}
 	if (pf <= 0) {
-		for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+		for (i = 0; i != total_stats; i++) {
 			i_idx = xstats_ctrl->dev_table_idx[i];
-			if (i_idx == UINT16_MAX || xstats_ctrl->info[i].dev)
-				continue;
 			o_idx = xstats_ctrl->xstats_o_idx[i];
+			if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+				continue;
 			stats[o_idx] += (uint64_t)et_stats->data[i_idx];
 		}
 	} else {
-		for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+		for (i = 0; i != total_stats; i++) {
 			i_idx = xstats_ctrl->dev_table_idx_2nd[i];
-			if (i_idx == UINT16_MAX)
-				continue;
 			o_idx = xstats_ctrl->xstats_o_idx_2nd[i];
+			if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+				continue;
 			stats[o_idx] += (uint64_t)et_stats->data[i_idx];
 		}
@@ -1435,9 +1436,9 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
 	}
 	/*
-	 * Read IB counters.
-	 * The counters are unique per IB device but not per net IF.
+	 * Read IB dev counters.
+	 * The counters are unique per IB device but not per netdev IF.
 	 * In bonding mode, getting the stats name only from 1 port is enough.
 	 */
-	for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+	for (i = xstats_ctrl->dev_cnt_start; i < xstats_ctrl->mlx5_stats_n; i++) {
 		if (!xstats_ctrl->info[i].dev)
 			continue;
@@ -1625,5 +1626,5 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
 };
 
-static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
+const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
 
 static int
@@ -1671,4 +1672,5 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
 	if (!bond_master) {
 		/* Add dev counters, unique per IB device. */
+		xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
 		for (j = 0; j != xstats_n; j++) {
 			if (mlx5_counters_init[j].dev) {
@@ -1712,4 +1714,5 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
 	}
 	/* Dev counters are always at the last now. */
+	xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
 	for (j = 0; j != xstats_n; j++) {
 		if (mlx5_counters_init[j].dev) {
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index cddb9435df..80c1c0b7b1 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -204,4 +204,6 @@ struct mlx5_xstats_ctrl {
 	/* Number of device stats identified by PMD. */
 	uint16_t mlx5_stats_n;
+	/* First device counters index. */
+	uint16_t dev_cnt_start;
 	/* Index in the device counters table. */
 	uint16_t dev_table_idx[MLX5_MAX_XSTATS];
@@ -218,4 +220,7 @@ struct mlx5_xstats_ctrl {
 };
 
+/* xstats array size. */
+extern const unsigned int xstats_n;
+
 struct mlx5_stats_ctrl {
 	/* Base for imissed counter. */
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.301003997 +0100
+++ 0119-net-mlx5-fix-end-condition-of-reading-xstats.patch	2024-08-23 17:18:09.875430647 +0100
@@ -1 +1 @@
-From 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 Mon Sep 17 00:00:00 2001
+From 6a7d2c982887e5a4730e923cb48797c626a75574 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 82f651f2f3..5d64984022 100644
+index a181a19f29..6d98657917 100644
@@ -37 +38 @@
-@@ -1202,4 +1202,5 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1363,4 +1363,5 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -43 +44 @@
-@@ -1219,17 +1220,17 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1380,17 +1381,17 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -67 +68 @@
-@@ -1274,9 +1275,9 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
+@@ -1435,9 +1436,9 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
@@ -80 +81 @@
-@@ -1574,5 +1575,5 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
+@@ -1625,5 +1626,5 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
@@ -87 +88 @@
-@@ -1620,4 +1621,5 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1671,4 +1672,5 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -93 +94 @@
-@@ -1661,4 +1663,5 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1712,4 +1714,5 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -100 +101 @@
-index 75a1e170af..869aac032b 100644
+index cddb9435df..80c1c0b7b1 100644
@@ -103 +104 @@
-@@ -282,4 +282,6 @@ struct mlx5_xstats_ctrl {
+@@ -204,4 +204,6 @@ struct mlx5_xstats_ctrl {
@@ -110 +111 @@
-@@ -296,4 +298,7 @@ struct mlx5_xstats_ctrl {
+@@ -218,4 +220,7 @@ struct mlx5_xstats_ctrl {


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

* patch 'net/mlx5: fix uplink port probing in bonding mode' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (117 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/mlx5: fix end condition of reading xstats' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " Kevin Traynor
                   ` (15 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/427eaf0b16fdc712925c703902bc21de279f9756

Thanks.

Kevin

---
From 427eaf0b16fdc712925c703902bc21de279f9756 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:35:41 +0300
Subject: [PATCH] net/mlx5: fix uplink port probing in bonding mode

[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]

In the HW-LAG bonding mode, the representor port can be from both
slave PFs. When probing a representor (REP), the UPLINK (proxy) port
always needs to be probed firstly before any REP port.

In the current implementation, when probing a device with the
following format:

  -a 0000:XX:00.0,dv_flow_en=N,representor=pf1vfy

Since the REP belongs to the 2nd PF in the bonding, the UPLINK would
not be added into the probing ports list.

1. In dv_flow_en=1 mode, the REP itself can be probed. But it didn't
   obey the rules and the behaviors were inconsistent.
    a. When probing the REP from 1st PFs, the UPLINK was also probed.
    b. When detaching the UPLINK, all REPs were detached.
2. In dv_flow_en=2 mode, since some resources can only be allocated /
   created on the proxy port, the probing would get a failure.

By removing the unneeded check of the bonding PF device index, the
UPLINK will always try to be probed with any format.

Fixes: 2e569a370395 ("net/mlx5: add VF LAG mode bonding device recognition")

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

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 1e1de4b547..841512faa3 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2293,6 +2293,5 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
 						list[ns].info.representor = 0;
 					}
-					if (list[ns].info.port_name == bd)
-						ns++;
+					ns++;
 					break;
 				case MLX5_PHYS_PORT_NAME_TYPE_PFHPF:
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.327859673 +0100
+++ 0120-net-mlx5-fix-uplink-port-probing-in-bonding-mode.patch	2024-08-23 17:18:09.877430654 +0100
@@ -1 +1 @@
-From 39d4ec8f36192b9dafbad4994cbe37f7674c7190 Mon Sep 17 00:00:00 2001
+From 427eaf0b16fdc712925c703902bc21de279f9756 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 5e950e9be1..11336c430b 100644
+index 1e1de4b547..841512faa3 100644
@@ -41 +42 @@
-@@ -2474,6 +2474,5 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
+@@ -2293,6 +2293,5 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,


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

* patch 'common/mlx5: remove unneeded field when modify RQ table' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (118 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/hns3: check Rx DMA address alignmnent' " Kevin Traynor
                   ` (14 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/48208624917631c76dddca76da5c2d35419ea845

Thanks.

Kevin

---
From 48208624917631c76dddca76da5c2d35419ea845 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:37:19 +0300
Subject: [PATCH] common/mlx5: remove unneeded field when modify RQ table

[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]

The attribute "rqt_max_size" of the RQT(RQ table) context is only
needed by when creating a new one. When modifying an old one, there
is no need to set this attribute.

The firmware usually ignored this unneeded field. When enabling some
extra check, an error will be returned to prevent the code from
continuing to run.

In the meanwhile, this field will always be set to the maximal one
fetched from the capability without any change.  Removing the value
set and leave it to 0 will help to solve the potential failure.

Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index a9d81b34ce..aa55d577f2 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1626,5 +1626,4 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
 	rqt_ctx = MLX5_ADDR_OF(modify_rqt_in, in, rqt_context);
 	MLX5_SET(rqtc, rqt_ctx, list_q_type, rqt_attr->rq_type);
-	MLX5_SET(rqtc, rqt_ctx, rqt_max_size, rqt_attr->rqt_max_size);
 	MLX5_SET(rqtc, rqt_ctx, rqt_actual_size, rqt_attr->rqt_actual_size);
 	for (i = 0; i < rqt_attr->rqt_actual_size; i++)
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.354651078 +0100
+++ 0121-common-mlx5-remove-unneeded-field-when-modify-RQ-tab.patch	2024-08-23 17:18:09.878430657 +0100
@@ -1 +1 @@
-From 463e5abe09362f1d20d0ec99b5969549d51167d6 Mon Sep 17 00:00:00 2001
+From 48208624917631c76dddca76da5c2d35419ea845 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 8e12ac50de..9710dcedd3 100644
+index a9d81b34ce..aa55d577f2 100644
@@ -31 +32 @@
-@@ -1915,5 +1915,4 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
+@@ -1626,5 +1626,4 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,


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

* patch 'net/hns3: check Rx DMA address alignmnent' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (119 preceding siblings ...)
  2024-08-23 16:19 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/ark: fix index arithmetic' " Kevin Traynor
                   ` (13 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/33f771755cb25aa80ecf4c3bf663be5165d87157

Thanks.

Kevin

---
From 33f771755cb25aa80ecf4c3bf663be5165d87157 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 15 Jul 2024 10:04:39 +0800
Subject: [PATCH] net/hns3: check Rx DMA address alignmnent

[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]

The network engine has Rx DMA address align requirement, if this
requirement is violated, the Rx function will be abnormal. The detail
requirement is:
1) For HIP08 platform, require 64-bytes alignment.
2) For later platform, require 128-bytes alignment.

The setup Rx DMA address exists both on the control and data plane, to
ensure performance, the alignment check is added only on the control
plane.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  2 ++
 drivers/net/hns3/hns3_ethdev.h    |  8 ++++++++
 drivers/net/hns3/hns3_ethdev_vf.c |  2 ++
 drivers/net/hns3/hns3_rxtx.c      | 21 +++++++++++++++++++++
 4 files changed, 33 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 98241d740b..250ef7a5a3 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2759,4 +2759,5 @@ hns3_get_capability(struct hns3_hw *hw)
 		hw->udp_cksum_mode = HNS3_SPECIAL_PORT_SW_CKSUM_MODE;
 		pf->support_multi_tc_pause = false;
+		hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
 		return 0;
 	}
@@ -2779,4 +2780,5 @@ hns3_get_capability(struct hns3_hw *hw)
 	hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE;
 	pf->support_multi_tc_pause = true;
+	hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
 
 	return 0;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 4476251d7d..84d5754a70 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -490,4 +490,7 @@ struct hns3_queue_intr {
 #define HNS3_PKTS_DROP_STATS_MODE2		1
 
+#define HNS3_RX_DMA_ADDR_ALIGN_128	128
+#define HNS3_RX_DMA_ADDR_ALIGN_64	64
+
 struct hns3_hw {
 	struct rte_eth_dev_data *data;
@@ -559,4 +562,9 @@ struct hns3_hw {
 	 */
 	uint8_t min_tx_pkt_len;
+	/*
+	 * The required alignment of the DMA address of the RX buffer.
+	 * See HNS3_RX_DMA_ADDR_ALIGN_XXX for available values.
+	 */
+	uint16_t rx_dma_addr_align;
 
 	struct hns3_queue_intr intr;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index cf7f947f3b..5632d6618c 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -788,4 +788,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
 		hw->rss_info.ipv6_sctp_offload_supported = false;
 		hw->promisc_mode = HNS3_UNLIMIT_PROMISC_MODE;
+		hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
 		return 0;
 	}
@@ -805,4 +806,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
 	hw->rss_info.ipv6_sctp_offload_supported = true;
 	hw->promisc_mode = HNS3_LIMIT_PROMISC_MODE;
+	hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
 
 	return 0;
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index cbd09e69d0..7f5aa7600d 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -274,4 +274,18 @@ 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 rem;
+
+	rem = dma_addr & (hw->rx_dma_addr_align - 1);
+	if (rem > 0) {
+		hns3_err(hw, "The IO address of the beginning of the mbuf data "
+			 "must be %u-byte aligned", hw->rx_dma_addr_align);
+		return -EINVAL;
+	}
+	return 0;
+}
+
 static int
 hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
@@ -280,4 +294,5 @@ hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
 	uint64_t dma_addr;
 	uint16_t i;
+	int ret;
 
 	for (i = 0; i < rxq->nb_rx_desc; i++) {
@@ -300,4 +315,10 @@ hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
 		rxq->rx_ring[i].addr = dma_addr;
 		rxq->rx_ring[i].rx.bd_base_info = 0;
+
+		ret = hns3_check_rx_dma_addr(hw, dma_addr);
+		if (ret != 0) {
+			hns3_rx_queue_release_mbufs(rxq);
+			return ret;
+		}
 	}
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.381300372 +0100
+++ 0122-net-hns3-check-Rx-DMA-address-alignmnent.patch	2024-08-23 17:18:09.885430682 +0100
@@ -1 +1 @@
-From d14c995b775a9b5910c51c3ab3685b320736f3f6 Mon Sep 17 00:00:00 2001
+From 33f771755cb25aa80ecf4c3bf663be5165d87157 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 327f6fe908..ec1251cb7e 100644
+index 98241d740b..250ef7a5a3 100644
@@ -32 +33 @@
-@@ -2739,4 +2739,5 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -2759,4 +2759,5 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -38 +39 @@
-@@ -2759,4 +2760,5 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -2779,4 +2780,5 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -45 +46 @@
-index a6b652455b..799b61038a 100644
+index 4476251d7d..84d5754a70 100644
@@ -48 +49 @@
-@@ -488,4 +488,7 @@ struct hns3_queue_intr {
+@@ -490,4 +490,7 @@ struct hns3_queue_intr {
@@ -56 +57 @@
-@@ -555,4 +558,9 @@ struct hns3_hw {
+@@ -559,4 +562,9 @@ struct hns3_hw {
@@ -67 +68 @@
-index b83d5b9589..ea9225cd26 100644
+index cf7f947f3b..5632d6618c 100644
@@ -70 +71 @@
-@@ -708,4 +708,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -788,4 +788,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
@@ -76 +77 @@
-@@ -725,4 +726,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -805,4 +806,5 @@ hns3vf_get_capability(struct hns3_hw *hw)
@@ -83 +84 @@
-index d7f9cff547..5941b966e0 100644
+index cbd09e69d0..7f5aa7600d 100644


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

* patch 'net/ark: fix index arithmetic' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (120 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/hns3: check Rx DMA address alignmnent' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'ethdev: fix GENEVE option item conversion' " Kevin Traynor
                   ` (12 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Ed Czeck; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/356b9ccb045b876814d3775342a12acd7958c0a8

Thanks.

Kevin

---
From 356b9ccb045b876814d3775342a12acd7958c0a8 Mon Sep 17 00:00:00 2001
From: Ed Czeck <ed.czeck@atomicrules.com>
Date: Wed, 17 Jul 2024 16:38:30 -0400
Subject: [PATCH] net/ark: fix index arithmetic

[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]

Behavior for signed integer overflow is not defined which can causes
undesired behavior at values near max and min bounds.
The used of unsigned is defined as to use modulo arithmetic which is the
desired behavior.
This patch replaces int32_t with uint32_t except for necessary casts.

Fixes: 9ee9e0d3b85e ("net/ark: update to reflect FPGA updates")

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/ark/ark_ethdev_tx.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 676e4115d3..09147173ba 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -40,6 +40,6 @@ struct ark_tx_queue {
 
 	/* 3 indexes to the paired data rings. */
-	int32_t prod_index;		/* where to put the next one */
-	int32_t free_index;		/* mbuf has been freed */
+	uint32_t prod_index;		/* where to put the next one */
+	uint32_t free_index;		/* mbuf has been freed */
 
 	/* The queue Id is used to identify the HW Q */
@@ -50,5 +50,5 @@ struct ark_tx_queue {
 	/* next cache line - fields written by device */
 	RTE_MARKER cacheline1 __rte_cache_min_aligned;
-	volatile int32_t cons_index;		/* hw is done, can be freed */
+	volatile uint32_t cons_index;		/* hw is done, can be freed */
 } __rte_cache_aligned;
 
@@ -124,5 +124,5 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 	int stat;
-	int32_t prod_index_limit;
+	uint32_t prod_index_limit;
 	uint16_t nb;
 	uint8_t user_len = 0;
@@ -139,6 +139,11 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	prod_index_limit = queue->queue_size + queue->free_index - 4;
 
+	/* Populate the buffer bringing prod_index up to or slightly beyond
+	 * prod_index_limit. Prod_index will increment by 2 or more each
+	 * iteration.  Note: indexes are uint32_t, cast to (signed) int32_t
+	 * to catch the slight overage case;  e.g. (200 - 201)
+	 */
 	for (nb = 0;
-	     (nb < nb_pkts) && (prod_index_limit - queue->prod_index) > 0;
+	     (nb < nb_pkts) && (int32_t)(prod_index_limit - queue->prod_index) > 0;
 	     ++nb) {
 		mbuf = tx_pkts[nb];
@@ -210,5 +215,5 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
 {
 	struct rte_mbuf *next;
-	int32_t free_queue_space;
+	uint32_t free_queue_space;
 	uint8_t flags = ARK_DDM_SOP;
 
@@ -216,5 +221,5 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
 		(queue->prod_index - queue->free_index);
 	/* We need up to 4 mbufs for first header and 2 for subsequent ones */
-	if (unlikely(free_queue_space < (2 + (2 * mbuf->nb_segs))))
+	if (unlikely(free_queue_space < (2U + (2U * mbuf->nb_segs))))
 		return -1;
 
@@ -425,8 +430,9 @@ free_completed_tx(struct ark_tx_queue *queue)
 	struct rte_mbuf *mbuf;
 	union ark_tx_meta *meta;
-	int32_t top_index;
+	uint32_t top_index;
 
 	top_index = queue->cons_index;	/* read once */
-	while ((top_index - queue->free_index) > 0) {
+
+	while ((int32_t)(top_index - queue->free_index) > 0) {
 		meta = &queue->meta_q[queue->free_index & queue->queue_mask];
 		if (likely((meta->flags & ARK_DDM_SOP) != 0)) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.413667259 +0100
+++ 0123-net-ark-fix-index-arithmetic.patch	2024-08-23 17:18:09.886430685 +0100
@@ -1 +1 @@
-From 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 Mon Sep 17 00:00:00 2001
+From 356b9ccb045b876814d3775342a12acd7958c0a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9c89c85f50..ca6cd297a1 100644
+index 676e4115d3..09147173ba 100644
@@ -25 +26 @@
-@@ -40,6 +40,6 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -40,6 +40,6 @@ struct ark_tx_queue {
@@ -34 +35 @@
-@@ -50,5 +50,5 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -50,5 +50,5 @@ struct ark_tx_queue {
@@ -36 +37 @@
- 	alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1;
+ 	RTE_MARKER cacheline1 __rte_cache_min_aligned;
@@ -39 +40 @@
- };
+ } __rte_cache_aligned;
@@ -41 +42 @@
-@@ -109,5 +109,5 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -124,5 +124,5 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -48 +49 @@
-@@ -124,6 +124,11 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -139,6 +139,11 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -61 +62 @@
-@@ -195,5 +200,5 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
+@@ -210,5 +215,5 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
@@ -68 +69 @@
-@@ -201,5 +206,5 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
+@@ -216,5 +221,5 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
@@ -75 +76 @@
-@@ -393,8 +398,9 @@ free_completed_tx(struct ark_tx_queue *queue)
+@@ -425,8 +430,9 @@ free_completed_tx(struct ark_tx_queue *queue)


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

* patch 'ethdev: fix GENEVE option item conversion' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (121 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/ark: fix index arithmetic' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'app/testpmd: fix build on signed comparison' " Kevin Traynor
                   ` (11 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Michael Baum; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bff85ec3d12bd3e8afa238d1eb21867019f8ef04

Thanks.

Kevin

---
From bff85ec3d12bd3e8afa238d1eb21867019f8ef04 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 15 Jul 2024 15:13:16 +0300
Subject: [PATCH] ethdev: fix GENEVE option item conversion

[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]

The "rte_flow_conv()" function, enables, among other things, to copy
item list.

For GENEVE option item, the function copies it without considering deep
copy. It copies the "data" pointer without copying the pointed values.

This patch adds deep copy for after regular copy.

Fixes: 2b4c72b4d10d ("ethdev: introduce GENEVE header TLV option item")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_flow.c | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 2df4418aa9..a82dc48264 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -550,4 +550,5 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
 		union {
 			const struct rte_flow_item_raw *raw;
+			const struct rte_flow_item_geneve_opt *geneve_opt;
 		} spec;
 		union {
@@ -559,8 +560,11 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
 		union {
 			const struct rte_flow_item_raw *raw;
+			const struct rte_flow_item_geneve_opt *geneve_opt;
 		} src;
 		union {
 			struct rte_flow_item_raw *raw;
+			struct rte_flow_item_geneve_opt *geneve_opt;
 		} dst;
+		void *deep_src;
 		size_t tmp;
 
@@ -591,11 +595,28 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
 		if (tmp) {
 			off = RTE_ALIGN_CEIL(off, sizeof(*dst.raw->pattern));
-			if (size >= off + tmp)
-				dst.raw->pattern = rte_memcpy
-					((void *)((uintptr_t)dst.raw + off),
-					 src.raw->pattern, tmp);
+			if (size >= off + tmp) {
+				deep_src = (void *)((uintptr_t)dst.raw + off);
+				dst.raw->pattern = rte_memcpy(deep_src,
+							      src.raw->pattern,
+							      tmp);
+			}
 			off += tmp;
 		}
 		break;
+	case RTE_FLOW_ITEM_TYPE_GENEVE_OPT:
+		off = rte_flow_conv_copy(buf, data, size,
+					 rte_flow_desc_item, item->type);
+		spec.geneve_opt = item->spec;
+		src.geneve_opt = data;
+		dst.geneve_opt = buf;
+		tmp = spec.geneve_opt->option_len << 2;
+		if (size > 0 && src.geneve_opt->data) {
+			deep_src = (void *)((uintptr_t)(dst.geneve_opt + 1));
+			dst.geneve_opt->data = rte_memcpy(deep_src,
+							  src.geneve_opt->data,
+							  tmp);
+		}
+		off += tmp;
+		break;
 	default:
 		off = rte_flow_conv_copy(buf, data, size,
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.438141703 +0100
+++ 0124-ethdev-fix-GENEVE-option-item-conversion.patch	2024-08-23 17:18:09.886430685 +0100
@@ -1 +1 @@
-From 841a0445442de154441ac2b4700658a9eb83c986 Mon Sep 17 00:00:00 2001
+From bff85ec3d12bd3e8afa238d1eb21867019f8ef04 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ca2f85c3fa..4076ae4ee1 100644
+index 2df4418aa9..a82dc48264 100644
@@ -27 +28 @@
-@@ -624,4 +624,5 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -550,4 +550,5 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -33 +34 @@
-@@ -633,8 +634,11 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -559,8 +560,11 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -45 +46 @@
-@@ -665,11 +669,28 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -591,11 +595,28 @@ rte_flow_conv_item_spec(void *buf, const size_t size,


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

* patch 'app/testpmd: fix build on signed comparison' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (122 preceding siblings ...)
  2024-08-23 16:19 ` patch 'ethdev: fix GENEVE option item conversion' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " Kevin Traynor
                   ` (10 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Raslan Darawsheh, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b3996257669c9d0e9e716452e92ada9477e3a56c

Thanks.

Kevin

---
From b3996257669c9d0e9e716452e92ada9477e3a56c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Mon, 22 Jul 2024 03:52:29 -0700
Subject: [PATCH] app/testpmd: fix build on signed comparison

[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]

Build error:
.../app/test-pmd/config.c: In function 'icmp_echo_config_setup':
.../app/test-pmd/config.c:5159:30:
   error: comparison between signed and unsigned integer expressions
          [-Werror=sign-compare]
  if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
                              ^
All 'nb_txq', 'nb_fwd_ports' & 'nb_fwd_lcores' are unsigned variables,
but the warning is related to the integer promotion rules of C:
'nb_txq'       -> uint16_t, promoted to 'int'
'nb_fwd_ports' -> uint16_t, promoted to 'int'
(nb_txq * nb_fwd_ports) -> result 'int'
nb_fwd_lcores  -> 'uint32_t'
Ends up comparing 'int' vs 'uint32_t'.

Fixing by adding the casting back which was initially part of the patch.

Fixes: 2bf44dd14fa5 ("app/testpmd: fix lcore ID restriction")

Reported-by: Raslan Darawsheh <rasland@nvidia.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test-pmd/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3afa65036c..e060a1de49 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3519,5 +3519,5 @@ icmp_echo_config_setup(void)
 	uint16_t  sm_id;
 
-	if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
+	if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
 		cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
 			(nb_txq * nb_fwd_ports);
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.464627618 +0100
+++ 0125-app-testpmd-fix-build-on-signed-comparison.patch	2024-08-23 17:18:09.890430699 +0100
@@ -1 +1 @@
-From 1f47f469aac68bc88be24e530b4267d03537de12 Mon Sep 17 00:00:00 2001
+From b3996257669c9d0e9e716452e92ada9477e3a56c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 66c3a68c1d..6f0beafa27 100644
+index 3afa65036c..e060a1de49 100644
@@ -37 +38 @@
-@@ -5157,5 +5157,5 @@ icmp_echo_config_setup(void)
+@@ -3519,5 +3519,5 @@ icmp_echo_config_setup(void)


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

* patch 'bus/pci: fix UIO resource mapping in secondary process' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (123 preceding siblings ...)
  2024-08-23 16:19 ` patch 'app/testpmd: fix build on signed comparison' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'bus/pci: fix FD " Kevin Traynor
                   ` (9 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Zerun Fu
  Cc: Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov, Chenbo Xia,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e904351613cd41271dc5911e38efa6ed9db7b26b

Thanks.

Kevin

---
From e904351613cd41271dc5911e38efa6ed9db7b26b Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:06 +0800
Subject: [PATCH] bus/pci: fix UIO resource mapping in secondary process

[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]

For the primary process, the logic loops all BARs and will skip
the map of BAR with an invalid physical address (0), also will
assign 'uio_res->nb_maps' with the real mapped BARs number. But
for the secondary process, instead of loops all BARs, the logic
using the 'uio_res->nb_map' as index. If the device uses continuous
BARs there will be no problem, whereas if it uses discrete BARs,
it will lead to mapping errors.

Fix this problem by also loops all BARs and skip the map of BAR
with an invalid physical address in secondary process.

Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
 drivers/bus/pci/pci_common_uio.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 76c661f054..f44ccdf27c 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -27,5 +27,5 @@ static int
 pci_uio_map_secondary(struct rte_pci_device *dev)
 {
-	int fd, i, j;
+	int fd, i = 0, j, res_idx;
 	struct mapped_pci_resource *uio_res;
 	struct mapped_pci_res_list *uio_res_list =
@@ -38,5 +38,13 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
 			continue;
 
-		for (i = 0; i != uio_res->nb_maps; i++) {
+		/* Map all BARs */
+		for (res_idx = 0; res_idx != PCI_MAX_RESOURCE; res_idx++) {
+			/* skip empty BAR */
+			if (dev->mem_resource[res_idx].phys_addr == 0)
+				continue;
+
+			if (i >= uio_res->nb_maps)
+				return -1;
+
 			/*
 			 * open devname, to mmap it
@@ -72,5 +80,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
 				return -1;
 			}
-			dev->mem_resource[i].addr = mapaddr;
+			dev->mem_resource[res_idx].addr = mapaddr;
+
+			i++;
 		}
 		return 0;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.493227913 +0100
+++ 0126-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.patch	2024-08-23 17:18:09.890430699 +0100
@@ -1 +1 @@
-From 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 Mon Sep 17 00:00:00 2001
+From e904351613cd41271dc5911e38efa6ed9db7b26b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index ff1b02b6bd..65f72b7cc6 100644
+index 76c661f054..f44ccdf27c 100644
@@ -56 +57 @@
-@@ -71,5 +79,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
+@@ -72,5 +80,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev)


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

* patch 'bus/pci: fix FD in secondary process' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (124 preceding siblings ...)
  2024-08-23 16:19 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " Kevin Traynor
                   ` (8 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Zerun Fu
  Cc: Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov, Chenbo Xia,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/79e957cc34ae379d33847bb0e5e652b9ddbde823

Thanks.

Kevin

---
From 79e957cc34ae379d33847bb0e5e652b9ddbde823 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:07 +0800
Subject: [PATCH] bus/pci: fix FD in secondary process

[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]

In the previous logic the 'fd' was only saved in the primary process,
but for some devices this value is also used in the secondary logic.

For example, the call of 'rte_pci_find_ext_capability()' will fail in
the secondary process.

Fix this problem by getting and saving the value of 'fd' also in the
secondary process logic.

Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
 drivers/bus/pci/linux/pci_uio.c  |  5 ++++-
 drivers/bus/pci/pci_common_uio.c | 34 ++++++++++++++++----------------
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c
index d52125e49b..81a1ed6fa0 100644
--- a/drivers/bus/pci/linux/pci_uio.c
+++ b/drivers/bus/pci/linux/pci_uio.c
@@ -246,5 +246,5 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
 	snprintf(devname, sizeof(devname), "/dev/uio%u", uio_num);
 
-	/* save fd if in primary process */
+	/* save fd */
 	fd = open(devname, O_RDWR);
 	if (fd < 0) {
@@ -284,4 +284,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
 	}
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	/* allocate the mapping details for secondary processes*/
 	*uio_res = rte_zmalloc("UIO_RES", sizeof(**uio_res), 0);
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index f44ccdf27c..a06378b239 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -107,8 +107,4 @@ pci_uio_map_resource(struct rte_pci_device *dev)
 		return -1;
 
-	/* secondary processes - use already recorded details */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return pci_uio_map_secondary(dev);
-
 	/* allocate uio resource */
 	ret = pci_uio_alloc_resource(dev, &uio_res);
@@ -116,4 +112,8 @@ pci_uio_map_resource(struct rte_pci_device *dev)
 		return ret;
 
+	/* secondary processes - use already recorded details */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return pci_uio_map_secondary(dev);
+
 	/* Map all BARs */
 	for (i = 0; i != PCI_MAX_RESOURCE; i++) {
@@ -231,17 +231,5 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
 		return;
 
-	/* secondary processes - just free maps */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return pci_uio_unmap(uio_res);
-
-	TAILQ_REMOVE(uio_res_list, uio_res, next);
-
-	/* unmap all resources */
-	pci_uio_unmap(uio_res);
-
-	/* free uio resource */
-	rte_free(uio_res);
-
-	/* close fd if in primary process */
+	/* close fd */
 	if (rte_intr_fd_get(dev->intr_handle) >= 0)
 		close(rte_intr_fd_get(dev->intr_handle));
@@ -254,3 +242,15 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
 	rte_intr_fd_set(dev->intr_handle, -1);
 	rte_intr_type_set(dev->intr_handle, RTE_INTR_HANDLE_UNKNOWN);
+
+	/* secondary processes - just free maps */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return pci_uio_unmap(uio_res);
+
+	TAILQ_REMOVE(uio_res_list, uio_res, next);
+
+	/* unmap all resources */
+	pci_uio_unmap(uio_res);
+
+	/* free uio resource */
+	rte_free(uio_res);
 }
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.518594406 +0100
+++ 0127-bus-pci-fix-FD-in-secondary-process.patch	2024-08-23 17:18:09.891430703 +0100
@@ -1 +1 @@
-From 847d78fb9530fff401bf167298aad22766a1f04a Mon Sep 17 00:00:00 2001
+From 79e957cc34ae379d33847bb0e5e652b9ddbde823 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index f7d990d33f..4c1d3327a9 100644
+index d52125e49b..81a1ed6fa0 100644
@@ -33 +34 @@
-@@ -235,5 +235,5 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+@@ -246,5 +246,5 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -40 +41 @@
-@@ -271,4 +271,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+@@ -284,4 +284,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -49 +50 @@
-index 65f72b7cc6..30503bd23a 100644
+index f44ccdf27c..a06378b239 100644
@@ -52 +53 @@
-@@ -106,8 +106,4 @@ pci_uio_map_resource(struct rte_pci_device *dev)
+@@ -107,8 +107,4 @@ pci_uio_map_resource(struct rte_pci_device *dev)
@@ -61 +62 @@
-@@ -115,4 +111,8 @@ pci_uio_map_resource(struct rte_pci_device *dev)
+@@ -116,4 +112,8 @@ pci_uio_map_resource(struct rte_pci_device *dev)
@@ -70 +71 @@
-@@ -226,17 +226,5 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -231,17 +231,5 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
@@ -89 +90 @@
-@@ -249,3 +237,15 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -254,3 +242,15 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)


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

* patch 'app/dumpcap: handle SIGTERM and SIGHUP' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (125 preceding siblings ...)
  2024-08-23 16:19 ` patch 'bus/pci: fix FD " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'app/pdump: " Kevin Traynor
                   ` (7 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/052fe1c82c7e6937a718ab8bc7afc51043cb83fc

Thanks.

Kevin

---
From 052fe1c82c7e6937a718ab8bc7afc51043cb83fc Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:43 -0700
Subject: [PATCH] app/dumpcap: handle SIGTERM and SIGHUP

[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]

If the dumpcap is killed it does not cleanup which leaves
the ring buffer and the memory pool behind.
Until resource are exhausted devices will continue to fill the ring.

Fix by having the application handle SIGTERM, SIGHUP, and SIGPIPE.
These are the same signals handled in same way by the wireshark
dumpcap application.

Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/dumpcap/main.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 44576bed42..1025598b6d 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -790,4 +790,9 @@ int main(int argc, char **argv)
 	struct rte_ring *r;
 	struct rte_mempool *mp;
+	struct sigaction action = {
+		.sa_flags = SA_RESTART,
+		.sa_handler = signal_handler,
+	};
+	struct sigaction origaction;
 	dumpcap_out_t out;
 	char *p;
@@ -815,6 +820,11 @@ int main(int argc, char **argv)
 	enable_pdump(r, mp);
 
-	signal(SIGINT, signal_handler);
-	signal(SIGPIPE, SIG_IGN);
+	sigemptyset(&action.sa_mask);
+	sigaction(SIGTERM, &action, NULL);
+	sigaction(SIGINT, &action, NULL);
+	sigaction(SIGPIPE, &action, NULL);
+	sigaction(SIGHUP, NULL, &origaction);
+	if (origaction.sa_handler == SIG_DFL)
+		sigaction(SIGHUP, &action, NULL);
 
 	enable_primary_monitor();
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.543726498 +0100
+++ 0128-app-dumpcap-handle-SIGTERM-and-SIGHUP.patch	2024-08-23 17:18:09.891430703 +0100
@@ -1 +1 @@
-From b04d11bdc672cf8afb7a544077303a941a6a2baa Mon Sep 17 00:00:00 2001
+From 052fe1c82c7e6937a718ab8bc7afc51043cb83fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b25b95e2fc..ba91ca94d0 100644
+index 44576bed42..1025598b6d 100644
@@ -26 +27 @@
-@@ -937,4 +937,9 @@ int main(int argc, char **argv)
+@@ -790,4 +790,9 @@ int main(int argc, char **argv)
@@ -36,2 +37,2 @@
-@@ -962,6 +967,11 @@ int main(int argc, char **argv)
- 	compile_filters();
+@@ -815,6 +820,11 @@ int main(int argc, char **argv)
+ 	enable_pdump(r, mp);


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

* patch 'app/pdump: handle SIGTERM and SIGHUP' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (126 preceding siblings ...)
  2024-08-23 16:19 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'malloc: fix multi-process wait condition handling' " Kevin Traynor
                   ` (6 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/717d90c8b8b7d33deb80fea44df756d9fea29c44

Thanks.

Kevin

---
From 717d90c8b8b7d33deb80fea44df756d9fea29c44 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:44 -0700
Subject: [PATCH] app/pdump: handle SIGTERM and SIGHUP

[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]

The pdump application will leak ring and memory pool if killed
by SIGTERM.  Like dumpcap, the pdump process should cleanup
if process terminates due to being killed or hangup.

Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/pdump/main.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 71fd83dada..0986034e44 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -574,11 +574,7 @@ disable_primary_monitor(void)
 
 static void
-signal_handler(int sig_num)
+signal_handler(int sig_num __rte_unused)
 {
-	if (sig_num == SIGINT) {
-		printf("\n\nSignal %d received, preparing to exit...\n",
-				sig_num);
-		quit_signal = 1;
-	}
+	quit_signal = 1;
 }
 
@@ -977,4 +973,9 @@ int
 main(int argc, char **argv)
 {
+	struct sigaction action = {
+		.sa_flags = SA_RESTART,
+		.sa_handler = signal_handler,
+	};
+	struct sigaction origaction;
 	int diag;
 	int ret;
@@ -985,6 +986,12 @@ main(int argc, char **argv)
 	char *argp[argc + 2];
 
-	/* catch ctrl-c so we can print on exit */
-	signal(SIGINT, signal_handler);
+	/* catch ctrl-c so we can cleanup on exit */
+	sigemptyset(&action.sa_mask);
+	sigaction(SIGTERM, &action, NULL);
+	sigaction(SIGINT, &action, NULL);
+	sigaction(SIGPIPE, &action, NULL);
+	sigaction(SIGHUP, NULL, &origaction);
+	if (origaction.sa_handler == SIG_DFL)
+		sigaction(SIGHUP, &action, NULL);
 
 	argp[0] = argv[0];
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.568595568 +0100
+++ 0129-app-pdump-handle-SIGTERM-and-SIGHUP.patch	2024-08-23 17:18:09.892430706 +0100
@@ -1 +1 @@
-From e1253df666fdc672bc378722db0da2ce3091a8dd Mon Sep 17 00:00:00 2001
+From 717d90c8b8b7d33deb80fea44df756d9fea29c44 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/pdump/main.c | 21 +++++++++++++++------
- 1 file changed, 15 insertions(+), 6 deletions(-)
+ app/pdump/main.c | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
@@ -19 +20 @@
-index 3bdbb8dc78..fa85859703 100644
+index 71fd83dada..0986034e44 100644
@@ -22 +23 @@
-@@ -572,9 +572,7 @@ disable_primary_monitor(void)
+@@ -574,11 +574,7 @@ disable_primary_monitor(void)
@@ -28,0 +30,2 @@
+-		printf("\n\nSignal %d received, preparing to exit...\n",
+-				sig_num);
@@ -34 +37 @@
-@@ -976,4 +974,9 @@ int
+@@ -977,4 +973,9 @@ int
@@ -44 +47 @@
-@@ -984,6 +987,12 @@ main(int argc, char **argv)
+@@ -985,6 +986,12 @@ main(int argc, char **argv)


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

* patch 'malloc: fix multi-process wait condition handling' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (127 preceding siblings ...)
  2024-08-23 16:19 ` patch 'app/pdump: " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'bus/vdev: fix device reinitialization' " Kevin Traynor
                   ` (5 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/084ed2a496e84732b77c2d14e0e6711d1c909453
coverity's

Thanks.

Kevin

---
From 084ed2a496e84732b77c2d14e0e6711d1c909453 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 12 Jul 2024 12:41:35 +0100
Subject: [PATCH] malloc: fix multi-process wait condition handling

[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]

From coverity's point of view, it is theoretically possible to have an
infinite wait on a wait condition because while we do check for timeout,
we do not check for whether the event we are waiting for has already
occurred by the time we get to the first cond_wait call (in this case,
it's state of memory request list entry's state being set to COMPLETE).

This can't really happen as the only time a wait condition is triggered
is when we are receiving a memory event (so the entry we are waiting on
cannot change before wait condition is triggered because it's protected
by a mutex), so either we receive an event and modify entry state, or we
exit wait on a timeout and do not care about request state. However, it's
better to keep coverity happy.

Coverity issue: 425709
Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/common/malloc_mp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
index 8e236ddd7b..2817aaa627 100644
--- a/lib/eal/common/malloc_mp.c
+++ b/lib/eal/common/malloc_mp.c
@@ -756,5 +756,6 @@ request_to_primary(struct malloc_mp_req *user_req)
 		ret = pthread_cond_timedwait(&entry->cond,
 				&mp_request_list.lock, &ts);
-	} while (ret != 0 && ret != ETIMEDOUT);
+	} while ((ret != 0 && ret != ETIMEDOUT) &&
+			entry->state == REQ_STATE_ACTIVE);
 
 	if (entry->state != REQ_STATE_COMPLETE) {
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.593007135 +0100
+++ 0130-malloc-fix-multi-process-wait-condition-handling.patch	2024-08-23 17:18:09.893430710 +0100
@@ -1 +1 @@
-From 429219adab185909a8127e680d19f7628af62fb2 Mon Sep 17 00:00:00 2001
+From 084ed2a496e84732b77c2d14e0e6711d1c909453 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 2d39b0716f..9765277f5d 100644
+index 8e236ddd7b..2817aaa627 100644
@@ -32 +33 @@
-@@ -757,5 +757,6 @@ request_to_primary(struct malloc_mp_req *user_req)
+@@ -756,5 +756,6 @@ request_to_primary(struct malloc_mp_req *user_req)


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

* patch 'bus/vdev: fix device reinitialization' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (128 preceding siblings ...)
  2024-08-23 16:19 ` patch 'malloc: fix multi-process wait condition handling' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/hns3: fix uninitialized variable in FEC query' " Kevin Traynor
                   ` (4 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a12d1910bc56029b39db32f42ecfcd7b2ab739dc

Thanks.

Kevin

---
From a12d1910bc56029b39db32f42ecfcd7b2ab739dc Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 16 Jul 2024 09:53:28 +0000
Subject: [PATCH] bus/vdev: fix device reinitialization

[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]

In secondary processes, insert_vdev() may be called multiple times on the
same device due to multi-process hot-plugging of the vdev bus and EAL
parameters to add the same vdev.

In this case, when rte_devargs_insert() is called, the devargs->name
reference will be invalidated because rte_devargs_insert() destroys the
just-allocated devargs and replaces the pointer from the devargs list.
As a result, the reference to devargs->name stored in dev->device.name
will be invalid.

This patch fixes the issue by setting the device name after calling
rte_devargs_insert().

Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/vdev/vdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 272ea704e5..c040a6d09e 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -290,5 +290,4 @@ insert_vdev(const char *name, const char *args,
 	dev->device.bus = &rte_vdev_bus;
 	dev->device.numa_node = SOCKET_ID_ANY;
-	dev->device.name = devargs->name;
 
 	if (find_vdev(name)) {
@@ -305,4 +304,5 @@ insert_vdev(const char *name, const char *args,
 		rte_devargs_insert(&devargs);
 	dev->device.devargs = devargs;
+	dev->device.name = devargs->name;
 	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.618398777 +0100
+++ 0131-bus-vdev-fix-device-reinitialization.patch	2024-08-23 17:18:09.893430710 +0100
@@ -1 +1 @@
-From 1bd1ab6fd010837773473d821f9284369b37264c Mon Sep 17 00:00:00 2001
+From a12d1910bc56029b39db32f42ecfcd7b2ab739dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 38d05a9fe9..ec7abe7cda 100644
+index 272ea704e5..c040a6d09e 100644
@@ -32 +33 @@
-@@ -289,5 +289,4 @@ insert_vdev(const char *name, const char *args,
+@@ -290,5 +290,4 @@ insert_vdev(const char *name, const char *args,
@@ -38 +39 @@
-@@ -304,4 +303,5 @@ insert_vdev(const char *name, const char *args,
+@@ -305,4 +304,5 @@ insert_vdev(const char *name, const char *args,


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

* patch 'net/hns3: fix uninitialized variable in FEC query' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (129 preceding siblings ...)
  2024-08-23 16:19 ` patch 'bus/vdev: fix device reinitialization' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'net/ice/base: fix temporary failures reading NVM' " Kevin Traynor
                   ` (3 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Jie Hai; +Cc: Huisong Li, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/57f776dedd0748137f5ffc678cfb69226875865c

Thanks.

Kevin

---
From 57f776dedd0748137f5ffc678cfb69226875865c Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 23 Jul 2024 14:09:00 +0800
Subject: [PATCH] net/hns3: fix uninitialized variable in FEC query

[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]

This patch fixes uninitialized auto_state value when
querying FEC mode of device.

Bugzilla ID: 1498
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 250ef7a5a3..a64c570e65 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6100,5 +6100,5 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
 	struct hns3_sfp_info_cmd *resp;
 	uint32_t tmp_fec_capa;
-	uint8_t auto_state;
+	uint8_t auto_state = 0;
 	struct hns3_cmd_desc desc;
 	int ret;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.642920114 +0100
+++ 0132-net-hns3-fix-uninitialized-variable-in-FEC-query.patch	2024-08-23 17:18:09.895430717 +0100
@@ -1 +1 @@
-From 7dfc8e69aa4286854a0ac893d3828eaffee20347 Mon Sep 17 00:00:00 2001
+From 57f776dedd0748137f5ffc678cfb69226875865c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ec1251cb7e..8b43d731ac 100644
+index 250ef7a5a3..a64c570e65 100644
@@ -24 +25 @@
-@@ -6047,5 +6047,5 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
+@@ -6100,5 +6100,5 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)


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

* patch 'net/ice/base: fix temporary failures reading NVM' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (130 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/hns3: fix uninitialized variable in FEC query' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'doc: remove reference to mbuf pkt field' " Kevin Traynor
                   ` (2 subsequent siblings)
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Bruce Richardson, Song Jiale, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/564a79c3d37ee61d1de39d45498db13bfbb5430f

Thanks.

Kevin

---
From 564a79c3d37ee61d1de39d45498db13bfbb5430f Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Tue, 23 Jul 2024 14:19:15 +0800
Subject: [PATCH] net/ice/base: fix temporary failures reading NVM

[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]

Reading NVM fails in some scenarios, so follow the approach taken by
kernel driver and add retries on read failures.

Fixes: 2516684aed7a ("net/ice/base: extract logic of flat NVM read to function")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
 drivers/net/ice/base/ice_nvm.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 25f32d03e0..48e0d418e2 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -73,4 +73,5 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
 	u32 inlen = *length;
 	u32 bytes_read = 0;
+	int retry_cnt = 0;
 	bool last_cmd;
 
@@ -107,9 +108,22 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
 					 data + bytes_read, last_cmd,
 					 read_shadow_ram, NULL);
-		if (status)
-			break;
-
-		bytes_read += read_size;
-		offset += read_size;
+		if (status) {
+			if (hw->adminq.sq_last_status != ICE_AQ_RC_EBUSY ||
+			    retry_cnt > ICE_SQ_SEND_MAX_EXECUTE)
+				break;
+			ice_debug(hw, ICE_DBG_NVM,
+				  "NVM read EBUSY error, retry %d\n",
+				  retry_cnt + 1);
+			ice_release_nvm(hw);
+			msleep(ICE_SQ_SEND_DELAY_TIME_MS);
+			status = ice_acquire_nvm(hw, ICE_RES_READ);
+			if (status)
+				break;
+			retry_cnt++;
+		} else {
+			bytes_read += read_size;
+			offset += read_size;
+			retry_cnt = 0;
+		}
 	} while (!last_cmd);
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.671084306 +0100
+++ 0133-net-ice-base-fix-temporary-failures-reading-NVM.patch	2024-08-23 17:18:09.896430720 +0100
@@ -1 +1 @@
-From 04de5c7d40b24ef391bd5b51be23994a6cfdd867 Mon Sep 17 00:00:00 2001
+From 564a79c3d37ee61d1de39d45498db13bfbb5430f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 528489929e..5e982de4b5 100644
+index 25f32d03e0..48e0d418e2 100644
@@ -23 +24 @@
-@@ -72,4 +72,5 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
+@@ -73,4 +73,5 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
@@ -28 +29 @@
- 	int status;
+ 


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

* patch 'doc: remove reference to mbuf pkt field' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (131 preceding siblings ...)
  2024-08-23 16:19 ` patch 'net/ice/base: fix temporary failures reading NVM' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " Kevin Traynor
  2024-08-23 16:19 ` patch 'doc: add baseline mode in l3fwd-power guide' " Kevin Traynor
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1ab70cd4d8692854ea969a6b2ce18e598d56aacb

Thanks.

Kevin

---
From 1ab70cd4d8692854ea969a6b2ce18e598d56aacb Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 18:09:23 -0700
Subject: [PATCH] doc: remove reference to mbuf pkt field

[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]

The pkt union in mbuf was removed way back in 2014 but there
still was one leftover in the mbuf figure.

Fixes: ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 doc/guides/prog_guide/img/mbuf1.svg | 2 +-
 doc/guides/prog_guide/img/mbuf2.svg | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guides/prog_guide/img/mbuf1.svg b/doc/guides/prog_guide/img/mbuf1.svg
index a08bf3b6c0..111a874c00 100644
--- a/doc/guides/prog_guide/img/mbuf1.svg
+++ b/doc/guides/prog_guide/img/mbuf1.svg
@@ -488,5 +488,5 @@
          id="tspan5256"
          x="59.842155"
-         y="282.37683">m-&gt;pkt.next = NULL</tspan></text>
+         y="282.37683">m-&gt;next = NULL</tspan></text>
     <text
        xml:space="preserve"
diff --git a/doc/guides/prog_guide/img/mbuf2.svg b/doc/guides/prog_guide/img/mbuf2.svg
index f6fdb54002..6a80cbc200 100644
--- a/doc/guides/prog_guide/img/mbuf2.svg
+++ b/doc/guides/prog_guide/img/mbuf2.svg
@@ -1075,5 +1075,5 @@
          id="tspan5256-8"
          x="527.19458"
-         y="628.45935">m-&gt;pkt.next = NULL</tspan></text>
+         y="628.45935">m-&gt;next = NULL</tspan></text>
     <text
        xml:space="preserve"
@@ -1085,5 +1085,5 @@
          id="tspan5256-8-3"
          x="330.50363"
-         y="628.45935">m-&gt;pkt.next = mseg3</tspan></text>
+         y="628.45935">m-&gt;next = mseg3</tspan></text>
     <text
        xml:space="preserve"
@@ -1095,5 +1095,5 @@
          id="tspan5256-8-3-4"
          x="144.79388"
-         y="628.45935">m-&gt;pkt.next = mseg2</tspan></text>
+         y="628.45935">m-&gt;next = mseg2</tspan></text>
     <text
        xml:space="preserve"
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.696597442 +0100
+++ 0134-doc-remove-reference-to-mbuf-pkt-field.patch	2024-08-23 17:18:09.898430727 +0100
@@ -1 +1 @@
-From d9d1be537ea777059711ac313019ecd94840daba Mon Sep 17 00:00:00 2001
+From 1ab70cd4d8692854ea969a6b2ce18e598d56aacb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/ipsec-secgw: revert SA salt endianness' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (132 preceding siblings ...)
  2024-08-23 16:19 ` patch 'doc: remove reference to mbuf pkt field' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  2024-08-23 16:19 ` patch 'doc: add baseline mode in l3fwd-power guide' " Kevin Traynor
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/698684c13c18acdc2c90aeeeca47ac0ef87c7c88

Thanks.

Kevin

---
From 698684c13c18acdc2c90aeeeca47ac0ef87c7c88 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 29 Jul 2024 12:57:54 +0000
Subject: [PATCH] examples/ipsec-secgw: revert SA salt endianness

[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]

The previous commit swapped the bytes of SA salt which
led to incorrect work of the ipsec-secgw application.
This patch reverts the previous commit and changes
the type of the salt field in the ipsec_sa structure.

Fixes: e6bfd9676109 ("examples/ipsec-secgw: fix SA salt endianness")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec.h |  2 +-
 examples/ipsec-secgw/sa.c    | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 080579c51a..0b38c43ce9 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -109,5 +109,5 @@ struct ipsec_sa {
 	uint32_t cdev_id_qp;
 	uint64_t seq;
-	uint32_t salt;
+	rte_be32_t salt;
 	uint32_t fallback_sessions;
 	enum rte_crypto_cipher_algorithm cipher_algo;
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index af3a92f53e..49d16f055b 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -366,5 +366,4 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 	uint32_t *ri /*rule index*/;
 	struct ipsec_sa_cnt *sa_cnt;
-	rte_be32_t salt; /*big-endian salt*/
 	uint32_t cipher_algo_p = 0;
 	uint32_t auth_algo_p = 0;
@@ -501,6 +500,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				key_len -= 4;
 				rule->cipher_key_len = key_len;
-				memcpy(&salt, &rule->cipher_key[key_len], 4);
-				rule->salt = rte_be_to_cpu_32(salt);
+				memcpy(&rule->salt,
+					&rule->cipher_key[key_len], 4);
 			}
 
@@ -566,6 +565,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				rule->auth_key_len = key_len;
 				rule->iv_len = algo->iv_len;
-				memcpy(&salt, &rule->auth_key[key_len], 4);
-				rule->salt = rte_be_to_cpu_32(salt);
+				memcpy(&rule->salt,
+					&rule->auth_key[key_len], 4);
 			}
 
@@ -625,6 +624,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 			key_len -= 4;
 			rule->cipher_key_len = key_len;
-			memcpy(&salt, &rule->cipher_key[key_len], 4);
-			rule->salt = rte_be_to_cpu_32(salt);
+			memcpy(&rule->salt,
+				&rule->cipher_key[key_len], 4);
 
 			aead_algo_p = 1;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.721282594 +0100
+++ 0135-examples-ipsec-secgw-revert-SA-salt-endianness.patch	2024-08-23 17:18:09.899430731 +0100
@@ -1 +1 @@
-From 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 Mon Sep 17 00:00:00 2001
+From 698684c13c18acdc2c90aeeeca47ac0ef87c7c88 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a83fd2283b..1fe6b97168 100644
+index 080579c51a..0b38c43ce9 100644
@@ -25,2 +26,2 @@
-@@ -118,5 +118,5 @@ struct __rte_cache_aligned ipsec_sa {
- 	struct cdev_qp *cqp[RTE_MAX_LCORE];
+@@ -109,5 +109,5 @@ struct ipsec_sa {
+ 	uint32_t cdev_id_qp;
@@ -33 +34 @@
-index 8aa9aca739..c4bac17cd7 100644
+index af3a92f53e..49d16f055b 100644
@@ -36 +37 @@
-@@ -375,5 +375,4 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -366,5 +366,4 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -42 +43 @@
-@@ -510,6 +509,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -501,6 +500,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -51 +52 @@
-@@ -575,6 +574,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -566,6 +565,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -60 +61 @@
-@@ -634,6 +633,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -625,6 +624,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,


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

* patch 'doc: add baseline mode in l3fwd-power guide' has been queued to stable release 21.11.8
  2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
                   ` (133 preceding siblings ...)
  2024-08-23 16:19 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " Kevin Traynor
@ 2024-08-23 16:19 ` Kevin Traynor
  134 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-23 16:19 UTC (permalink / raw)
  To: Karen Kelly; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/57f1c6630cc1a1a05eb546565e88269f98fd87d3

Thanks.

Kevin

---
From 57f1c6630cc1a1a05eb546565e88269f98fd87d3 Mon Sep 17 00:00:00 2001
From: Karen Kelly <karen.kelly@intel.com>
Date: Tue, 16 Apr 2024 15:20:35 +0200
Subject: [PATCH] doc: add baseline mode in l3fwd-power guide

[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]

Updating PMD Power Management Mode section of the l3fwd-power
sample app to add baseline option as this was missing from the
original commit.

Fixes: a9ea60702ecb ("examples/l3fwd-power: add baseline PMD management mode")

Signed-off-by: Karen Kelly <karen.kelly@intel.com>
---
 doc/guides/sample_app_ug/l3_forward_power_man.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index 2e350c45f1..bb39cac24d 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -337,4 +337,7 @@ This mode is limited to one queue per core,
 and has three available power management schemes:
 
+``baseline``
+  This mode will not enable any power saving features.
+
 ``monitor``
   This will use ``rte_power_monitor()`` function to enter
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:13.747468146 +0100
+++ 0136-doc-add-baseline-mode-in-l3fwd-power-guide.patch	2024-08-23 17:18:09.899430731 +0100
@@ -1 +1 @@
-From 40b46770b0fc5c39b4987067780a6e92e1b30ea8 Mon Sep 17 00:00:00 2001
+From 57f1c6630cc1a1a05eb546565e88269f98fd87d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4a6f33bf4f..9c9684fea7 100644
+index 2e350c45f1..bb39cac24d 100644
@@ -22 +23 @@
-@@ -281,4 +281,7 @@ This mode is limited to one queue per core,
+@@ -337,4 +337,7 @@ This mode is limited to one queue per core,


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

* RE: [EXTERNAL] patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 21.11.8
  2024-08-23 16:18 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " Kevin Traynor
@ 2024-08-26  8:07   ` Akhil Goyal
  2024-08-26 11:06     ` Kevin Traynor
  0 siblings, 1 reply; 143+ messages in thread
From: Akhil Goyal @ 2024-08-26  8:07 UTC (permalink / raw)
  To: Kevin Traynor, Shihong Wang; +Cc: Chaoyong He, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 7601 bytes --]

Hi Kevin,
This patch was reverted on main branch. So better not backport.

Regards,
Akhil

From: Kevin Traynor <ktraynor@redhat.com>
Sent: Friday, August 23, 2024 9:48 PM
To: Shihong Wang <shihong.wang@corigine.com>
Cc: Chaoyong He <chaoyong.he@corigine.com>; Akhil Goyal <gakhil@marvell.com>; dpdk stable <stable@dpdk.org>
Subject: [EXTERNAL] patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 21.11.8

Hi, FYI, your patch has been queued to stable release 21. 11. 8 Note it hasn't been pushed to https: //urldefense. proofpoint. com/v2/url?u=http-3A__dpdk. org_browse_dpdk-2Dstable&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=Gl4YJ1gzyH5_C1fAntP5oV3-o7HB3pTE70HU-jtKq10&e=


Hi,



FYI, your patch has been queued to stable release 21.11.8



Note it hasn't been pushed to https://urldefense.proofpoint.com/v2/url?u=http-3A__dpdk.org_browse_dpdk-2Dstable&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=Gl4YJ1gzyH5_C1fAntP5oV3-o7HB3pTE70HU-jtKq10&e= yet.

It will be pushed if I get no objections before 08/28/24. So please

shout if anyone has objections.



Also note that after the patch there's a diff of the upstream commit vs the

patch applied to the branch. This will indicate if there was any rebasing

needed to apply to the stable branch. If there were code changes for rebasing

(ie: not only metadata diffs), please double check that the rebase was

correctly done.



Queued patches are on a temporary branch at:

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kevintraynor_dpdk-2Dstable&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=ORkIdcswiYk9iiTtV7ZmbP_zV54GLLsyvnBU72T8PbY&e=



This queued commit can be viewed at:

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kevintraynor_dpdk-2Dstable_commit_db8d7d17a9e8b79c8b6bae2044a6fcb819b33700&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=OxADViB5_6ttYifYrSuk4n9QR-FrrZjMHn69AGIDLwg&e=



Thanks.



Kevin



---

From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001

From: Shihong Wang <shihong.wang@corigine.com<mailto:shihong.wang@corigine.com>>

Date: Thu, 14 Mar 2024 10:00:52 +0800

Subject: [PATCH] examples/ipsec-secgw: fix SA salt endianness

MIME-Version: 1.0

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: 8bit



[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]



The SA salt of struct ipsec_sa is a CPU-endian u32 variable, but it’s

value is stored in an array of encryption or authentication keys

according to big-endian. So it maybe need to convert the endianness

order to ensure that the value assigned to the SA salt is CPU-endian.



Fixes: 50d75cae2a2c ("examples/ipsec-secgw: initialize SA salt")

Fixes: 9413c3901f31 ("examples/ipsec-secgw: support additional algorithms")

Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")



Signed-off-by: Shihong Wang <shihong.wang@corigine.com<mailto:shihong.wang@corigine.com>>

Reviewed-by: Chaoyong He <chaoyong.he@corigine.com<mailto:chaoyong.he@corigine.com>>

Acked-by: Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>

---

 examples/ipsec-secgw/sa.c | 13 +++++++------

 1 file changed, 7 insertions(+), 6 deletions(-)



diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c

index 49d16f055b..af3a92f53e 100644

--- a/examples/ipsec-secgw/sa.c

+++ b/examples/ipsec-secgw/sa.c

@@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

              uint32_t *ri /*rule index*/;

              struct ipsec_sa_cnt *sa_cnt;

+           rte_be32_t salt; /*big-endian salt*/

              uint32_t cipher_algo_p = 0;

              uint32_t auth_algo_p = 0;

@@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

                                                           key_len -= 4;

                                                           rule->cipher_key_len = key_len;

-                                                          memcpy(&rule->salt,

-                                                                          &rule->cipher_key[key_len], 4);

+                                                         memcpy(&salt, &rule->cipher_key[key_len], 4);

+                                                         rule->salt = rte_be_to_cpu_32(salt);

                                            }



@@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

                                                           rule->auth_key_len = key_len;

                                                           rule->iv_len = algo->iv_len;

-                                                          memcpy(&rule->salt,

-                                                                          &rule->auth_key[key_len], 4);

+                                                         memcpy(&salt, &rule->auth_key[key_len], 4);

+                                                         rule->salt = rte_be_to_cpu_32(salt);

                                            }



@@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

                                            key_len -= 4;

                                            rule->cipher_key_len = key_len;

-                                           memcpy(&rule->salt,

-                                                          &rule->cipher_key[key_len], 4);

+                                          memcpy(&salt, &rule->cipher_key[key_len], 4);

+                                          rule->salt = rte_be_to_cpu_32(salt);



                                            aead_algo_p = 1;

--

2.46.0



---

  Diff of the applied patch vs upstream commit (please double-check if non-empty:

---

--- -        2024-08-23 17:18:11.871795930 +0100

+++ 0069-examples-ipsec-secgw-fix-SA-salt-endianness.patch     2024-08-23 17:18:09.746430196 +0100

@@ -1 +1 @@

-From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001

+From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001

@@ -8,0 +9,2 @@

+[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]

+

@@ -17 +18,0 @@

-Cc: stable@dpdk.org<mailto:stable@dpdk.org>

@@ -27 +28 @@

-index c4bac17cd7..8aa9aca739 100644

+index 49d16f055b..af3a92f53e 100644

@@ -30 +31 @@

-@@ -375,4 +375,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

+@@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

@@ -36 +37 @@

-@@ -509,6 +510,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

+@@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

@@ -45 +46 @@

-@@ -574,6 +575,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

+@@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

@@ -54 +55 @@

-@@ -633,6 +634,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,

+@@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,



[-- Attachment #2: Type: text/html, Size: 29869 bytes --]

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

* RE: patch 'net/ena: fix bad checksum handling' has been queued to stable release 21.11.8
  2024-08-23 16:18 ` patch 'net/ena: fix bad checksum handling' " Kevin Traynor
@ 2024-08-26 10:26   ` Brandes, Shai
  2024-08-26 11:17     ` Kevin Traynor
  0 siblings, 1 reply; 143+ messages in thread
From: Brandes, Shai @ 2024-08-26 10:26 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: dpdk stable, Brandes, Shai

Hi Kevin, 

I think there is one net/ena patch that was not picked up for the stable release (likely since there are two patches with similar title).
I would appreciate if you could verify.

The missing patch: net/ena: fix wrong handling of checksum
see patchwork https://patches.dpdk.org/project/dpdk/patch/20240702144626.14545-14-shaibran@amazon.com/

All the best,
Shai Brandes
ENA drivers team

> -----Original Message-----
> From: Kevin Traynor <ktraynor@redhat.com>
> Sent: Friday, August 23, 2024 7:19 PM
> To: Brandes, Shai <shaibran@amazon.com>
> Cc: dpdk stable <stable@dpdk.org>
> Subject: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has been
> queued to stable release 21.11.8
> 
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you can confirm the sender and know the
> content is safe.
> 
> 
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 21.11.8
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/28/24. So please shout if
> anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable
> 
> This queued commit can be viewed at:
> https://github.com/kevintraynor/dpdk-
> stable/commit/082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f
> 
> Thanks.
> 
> Kevin
> 
> ---
> From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
> 2001
> From: Shai Brandes <shaibran@amazon.com>
> Date: Tue, 2 Jul 2024 17:46:22 +0300
> Subject: [PATCH] net/ena: fix bad checksum handling
> 
> [ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
> 
> Removed a workaround for a false L4 bad Rx csum indication from the
> device. The workaround was to set it as unknown so the application would
> check it instead.
> The issue was fixed in the device, thus the driver bad csum handling should
> be fixed in the PMD.
> 
> Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")
> 
> Signed-off-by: Shai Brandes <shaibran@amazon.com>
> ---
>  drivers/net/ena/ena_ethdev.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
> index 1c61f793e6..84c41f1b9d 100644
> --- a/drivers/net/ena/ena_ethdev.c
> +++ b/drivers/net/ena/ena_ethdev.c
> @@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
> rte_mbuf *mbuf,
>         else
>                 if (unlikely(ena_rx_ctx->l4_csum_err))
> -                       /*
> -                        * For the L4 Rx checksum offload the HW may indicate
> -                        * bad checksum although it's valid. Because of that,
> -                        * we're setting the UNKNOWN flag to let the app
> -                        * re-verify the checksum.
> -                        */
> -                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
>                 else
>                         ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
> --
> 2.46.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -   2024-08-23 17:18:12.913173354 +0100
> +++ 0109-net-ena-fix-bad-checksum-handling.patch        2024-08-23
> 17:18:09.849430556 +0100
> @@ -1 +1 @@
> -From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00 2001
> +From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
> 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
> +
> @@ -13 +14,0 @@
> -Cc: stable@dpdk.org
> @@ -21 +22 @@
> -index 4e7171e629..b43b913903 100644
> +index 1c61f793e6..84c41f1b9d 100644
> @@ -24,3 +25,3 @@
> -@@ -675,11 +675,5 @@ static inline void ena_rx_mbuf_prepare(struct
> ena_ring *rx_ring,
> -               if (unlikely(ena_rx_ctx->l4_csum_err)) {
> -                       ++rx_stats->l4_csum_bad;
> +@@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
> rte_mbuf *mbuf,
> +       else
> +               if (unlikely(ena_rx_ctx->l4_csum_err))
> @@ -35,2 +36,2 @@
> -               } else {
> -                       ++rx_stats->l4_csum_good;
> +               else
> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;


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

* Re: [EXTERNAL] patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 21.11.8
  2024-08-26  8:07   ` [EXTERNAL] " Akhil Goyal
@ 2024-08-26 11:06     ` Kevin Traynor
  0 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-08-26 11:06 UTC (permalink / raw)
  To: Akhil Goyal, Shihong Wang; +Cc: Chaoyong He, dpdk stable

On 26/08/2024 09:07, Akhil Goyal wrote:
> Hi Kevin,
> This patch was reverted on main branch. So better not backport.
> 

ok, thank you Akhil. I will drop this.

Kevin.

> Regards,
> Akhil
> 
> From: Kevin Traynor <ktraynor@redhat.com>
> Sent: Friday, August 23, 2024 9:48 PM
> To: Shihong Wang <shihong.wang@corigine.com>
> Cc: Chaoyong He <chaoyong.he@corigine.com>; Akhil Goyal <gakhil@marvell.com>; dpdk stable <stable@dpdk.org>
> Subject: [EXTERNAL] patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 21.11.8
> 
> Hi, FYI, your patch has been queued to stable release 21. 11. 8 Note it hasn't been pushed to https: //urldefense. proofpoint. com/v2/url?u=http-3A__dpdk. org_browse_dpdk-2Dstable&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=Gl4YJ1gzyH5_C1fAntP5oV3-o7HB3pTE70HU-jtKq10&e=
> 
> 
> Hi,
> 
> 
> 
> FYI, your patch has been queued to stable release 21.11.8
> 
> 
> 
> Note it hasn't been pushed to https://urldefense.proofpoint.com/v2/url?u=http-3A__dpdk.org_browse_dpdk-2Dstable&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=Gl4YJ1gzyH5_C1fAntP5oV3-o7HB3pTE70HU-jtKq10&e= yet.
> 
> It will be pushed if I get no objections before 08/28/24. So please
> 
> shout if anyone has objections.
> 
> 
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> 
> patch applied to the branch. This will indicate if there was any rebasing
> 
> needed to apply to the stable branch. If there were code changes for rebasing
> 
> (ie: not only metadata diffs), please double check that the rebase was
> 
> correctly done.
> 
> 
> 
> Queued patches are on a temporary branch at:
> 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kevintraynor_dpdk-2Dstable&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=ORkIdcswiYk9iiTtV7ZmbP_zV54GLLsyvnBU72T8PbY&e=
> 
> 
> 
> This queued commit can be viewed at:
> 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kevintraynor_dpdk-2Dstable_commit_db8d7d17a9e8b79c8b6bae2044a6fcb819b33700&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=jxMUmPULUFoI7N1IfPQX3iPunuqaFfvUiMvebss7a8oZ3g5cSkmT3owuWcRrmop6&s=OxADViB5_6ttYifYrSuk4n9QR-FrrZjMHn69AGIDLwg&e=
> 
> 
> 
> Thanks.
> 
> 
> 
> Kevin
> 
> 
> 
> ---
> 
> From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001
> 
> From: Shihong Wang <shihong.wang@corigine.com<mailto:shihong.wang@corigine.com>>
> 
> Date: Thu, 14 Mar 2024 10:00:52 +0800
> 
> Subject: [PATCH] examples/ipsec-secgw: fix SA salt endianness
> 
> MIME-Version: 1.0
> 
> Content-Type: text/plain; charset=UTF-8
> 
> Content-Transfer-Encoding: 8bit
> 
> 
> 
> [ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
> 
> 
> 
> The SA salt of struct ipsec_sa is a CPU-endian u32 variable, but it’s
> 
> value is stored in an array of encryption or authentication keys
> 
> according to big-endian. So it maybe need to convert the endianness
> 
> order to ensure that the value assigned to the SA salt is CPU-endian.
> 
> 
> 
> Fixes: 50d75cae2a2c ("examples/ipsec-secgw: initialize SA salt")
> 
> Fixes: 9413c3901f31 ("examples/ipsec-secgw: support additional algorithms")
> 
> Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
> 
> 
> 
> Signed-off-by: Shihong Wang <shihong.wang@corigine.com<mailto:shihong.wang@corigine.com>>
> 
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com<mailto:chaoyong.he@corigine.com>>
> 
> Acked-by: Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>
> 
> ---
> 
>  examples/ipsec-secgw/sa.c | 13 +++++++------
> 
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> 
> 
> diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
> 
> index 49d16f055b..af3a92f53e 100644
> 
> --- a/examples/ipsec-secgw/sa.c
> 
> +++ b/examples/ipsec-secgw/sa.c
> 
> @@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
>               uint32_t *ri /*rule index*/;
> 
>               struct ipsec_sa_cnt *sa_cnt;
> 
> +           rte_be32_t salt; /*big-endian salt*/
> 
>               uint32_t cipher_algo_p = 0;
> 
>               uint32_t auth_algo_p = 0;
> 
> @@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
>                                                            key_len -= 4;
> 
>                                                            rule->cipher_key_len = key_len;
> 
> -                                                          memcpy(&rule->salt,
> 
> -                                                                          &rule->cipher_key[key_len], 4);
> 
> +                                                         memcpy(&salt, &rule->cipher_key[key_len], 4);
> 
> +                                                         rule->salt = rte_be_to_cpu_32(salt);
> 
>                                             }
> 
> 
> 
> @@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
>                                                            rule->auth_key_len = key_len;
> 
>                                                            rule->iv_len = algo->iv_len;
> 
> -                                                          memcpy(&rule->salt,
> 
> -                                                                          &rule->auth_key[key_len], 4);
> 
> +                                                         memcpy(&salt, &rule->auth_key[key_len], 4);
> 
> +                                                         rule->salt = rte_be_to_cpu_32(salt);
> 
>                                             }
> 
> 
> 
> @@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
>                                             key_len -= 4;
> 
>                                             rule->cipher_key_len = key_len;
> 
> -                                           memcpy(&rule->salt,
> 
> -                                                          &rule->cipher_key[key_len], 4);
> 
> +                                          memcpy(&salt, &rule->cipher_key[key_len], 4);
> 
> +                                          rule->salt = rte_be_to_cpu_32(salt);
> 
> 
> 
>                                             aead_algo_p = 1;
> 
> --
> 
> 2.46.0
> 
> 
> 
> ---
> 
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> 
> ---
> 
> --- -        2024-08-23 17:18:11.871795930 +0100
> 
> +++ 0069-examples-ipsec-secgw-fix-SA-salt-endianness.patch     2024-08-23 17:18:09.746430196 +0100
> 
> @@ -1 +1 @@
> 
> -From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001
> 
> +From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001
> 
> @@ -8,0 +9,2 @@
> 
> +[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
> 
> +
> 
> @@ -17 +18,0 @@
> 
> -Cc: stable@dpdk.org<mailto:stable@dpdk.org>
> 
> @@ -27 +28 @@
> 
> -index c4bac17cd7..8aa9aca739 100644
> 
> +index 49d16f055b..af3a92f53e 100644
> 
> @@ -30 +31 @@
> 
> -@@ -375,4 +375,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> +@@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> @@ -36 +37 @@
> 
> -@@ -509,6 +510,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> +@@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> @@ -45 +46 @@
> 
> -@@ -574,6 +575,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> +@@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> @@ -54 +55 @@
> 
> -@@ -633,6 +634,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> +@@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> 
> 
> 


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

* Re: patch 'net/ena: fix bad checksum handling' has been queued to stable release 21.11.8
  2024-08-26 10:26   ` Brandes, Shai
@ 2024-08-26 11:17     ` Kevin Traynor
  2024-09-02 13:01       ` Brandes, Shai
  0 siblings, 1 reply; 143+ messages in thread
From: Kevin Traynor @ 2024-08-26 11:17 UTC (permalink / raw)
  To: Brandes, Shai; +Cc: dpdk stable

On 26/08/2024 11:26, Brandes, Shai wrote:
> Hi Kevin, 
> 

Hi Shai,

> I think there is one net/ena patch that was not picked up for the stable release (likely since there are two patches with similar title).
> I would appreciate if you could verify.
> 
> The missing patch: net/ena: fix wrong handling of checksum
> see patchwork https://patches.dpdk.org/project/dpdk/patch/20240702144626.14545-14-shaibran@amazon.com/
> 


Thanks for checking! It wasn't listed as relevant for 21.11 LTS as the
'Fixes:' tag indicates it is fixing a feature introduced after 21.11.

commit f66055c7564050e55c7eab147d039bf01048829a
Author: Shai Brandes <shaibran@amazon.com>
Date:   Tue Jul 2 17:46:24 2024 +0300

    net/ena: fix checksum handling

    This change fixes an issue where a non tcp/udp packet can be indicated
    to have an invalid csum. If the device erroneously tries to verify the
    csum on a non tcp/udp packet it will result in false indication that
    there is a csum error. This change make the driver ignore the
    indication for csum error on such packets.

    Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")
    Cc: stable@dpdk.org

    Signed-off-by: Shai Brandes <shaibran@amazon.com>


$ git tag --contains 84daba9962b5
v22.03
...

If you believe the Fixes: tag is incorrect and it should go to 21.11
branch, let me know (though I see it doesn't apply cleanly).

thanks,
Kevin.


> All the best,
> Shai Brandes
> ENA drivers team
> 
>> -----Original Message-----
>> From: Kevin Traynor <ktraynor@redhat.com>
>> Sent: Friday, August 23, 2024 7:19 PM
>> To: Brandes, Shai <shaibran@amazon.com>
>> Cc: dpdk stable <stable@dpdk.org>
>> Subject: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has been
>> queued to stable release 21.11.8
>>
>> CAUTION: This email originated from outside of the organization. Do not click
>> links or open attachments unless you can confirm the sender and know the
>> content is safe.
>>
>>
>>
>> Hi,
>>
>> FYI, your patch has been queued to stable release 21.11.8
>>
>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>> It will be pushed if I get no objections before 08/28/24. So please shout if
>> anyone has objections.
>>
>> Also note that after the patch there's a diff of the upstream commit vs the
>> patch applied to the branch. This will indicate if there was any rebasing
>> needed to apply to the stable branch. If there were code changes for
>> rebasing
>> (ie: not only metadata diffs), please double check that the rebase was
>> correctly done.
>>
>> Queued patches are on a temporary branch at:
>> https://github.com/kevintraynor/dpdk-stable
>>
>> This queued commit can be viewed at:
>> https://github.com/kevintraynor/dpdk-
>> stable/commit/082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f
>>
>> Thanks.
>>
>> Kevin
>>
>> ---
>> From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
>> 2001
>> From: Shai Brandes <shaibran@amazon.com>
>> Date: Tue, 2 Jul 2024 17:46:22 +0300
>> Subject: [PATCH] net/ena: fix bad checksum handling
>>
>> [ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
>>
>> Removed a workaround for a false L4 bad Rx csum indication from the
>> device. The workaround was to set it as unknown so the application would
>> check it instead.
>> The issue was fixed in the device, thus the driver bad csum handling should
>> be fixed in the PMD.
>>
>> Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")
>>
>> Signed-off-by: Shai Brandes <shaibran@amazon.com>
>> ---
>>  drivers/net/ena/ena_ethdev.c | 8 +-------
>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
>> index 1c61f793e6..84c41f1b9d 100644
>> --- a/drivers/net/ena/ena_ethdev.c
>> +++ b/drivers/net/ena/ena_ethdev.c
>> @@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
>> rte_mbuf *mbuf,
>>         else
>>                 if (unlikely(ena_rx_ctx->l4_csum_err))
>> -                       /*
>> -                        * For the L4 Rx checksum offload the HW may indicate
>> -                        * bad checksum although it's valid. Because of that,
>> -                        * we're setting the UNKNOWN flag to let the app
>> -                        * re-verify the checksum.
>> -                        */
>> -                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
>> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
>>                 else
>>                         ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
>> --
>> 2.46.0
>>
>> ---
>>   Diff of the applied patch vs upstream commit (please double-check if non-
>> empty:
>> ---
>> --- -   2024-08-23 17:18:12.913173354 +0100
>> +++ 0109-net-ena-fix-bad-checksum-handling.patch        2024-08-23
>> 17:18:09.849430556 +0100
>> @@ -1 +1 @@
>> -From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00 2001
>> +From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
>> 2001
>> @@ -5,0 +6,2 @@
>> +[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
>> +
>> @@ -13 +14,0 @@
>> -Cc: stable@dpdk.org
>> @@ -21 +22 @@
>> -index 4e7171e629..b43b913903 100644
>> +index 1c61f793e6..84c41f1b9d 100644
>> @@ -24,3 +25,3 @@
>> -@@ -675,11 +675,5 @@ static inline void ena_rx_mbuf_prepare(struct
>> ena_ring *rx_ring,
>> -               if (unlikely(ena_rx_ctx->l4_csum_err)) {
>> -                       ++rx_stats->l4_csum_bad;
>> +@@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
>> rte_mbuf *mbuf,
>> +       else
>> +               if (unlikely(ena_rx_ctx->l4_csum_err))
>> @@ -35,2 +36,2 @@
>> -               } else {
>> -                       ++rx_stats->l4_csum_good;
>> +               else
>> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
> 


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

* RE: patch 'net/ena: fix bad checksum handling' has been queued to stable release 21.11.8
  2024-08-26 11:17     ` Kevin Traynor
@ 2024-09-02 13:01       ` Brandes, Shai
  2024-09-04 14:30         ` Kevin Traynor
  0 siblings, 1 reply; 143+ messages in thread
From: Brandes, Shai @ 2024-09-02 13:01 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: dpdk stable

Hi Kevin, 

The fix is indeed required as it fixes an issue where checksum was inspected for non tcp/udp packets.
If you need I can prepare a dedicated patch for this on top of 21.11.8
It should go into https://github.com/kevintraynor/dpdk-stable/blob/21.11/drivers/net/ena/ena_ethdev.c#L309:

		packet_type |= RTE_PTYPE_L3_IPV6;
	}

-	if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) {
+	if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag ||
+		!(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) {
		ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
	else
		if (unlikely(ena_rx_ctx->l4_csum_err))
			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
		else
			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;

All the best,
Shai


> -----Original Message-----
> From: Kevin Traynor <ktraynor@redhat.com>
> Sent: Monday, August 26, 2024 2:18 PM
> To: Brandes, Shai <shaibran@amazon.com>
> Cc: dpdk stable <stable@dpdk.org>
> Subject: RE: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has been
> queued to stable release 21.11.8
> 
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you can confirm the sender and know the
> content is safe.
> 
> 
> 
> On 26/08/2024 11:26, Brandes, Shai wrote:
> > Hi Kevin,
> >
> 
> Hi Shai,
> 
> > I think there is one net/ena patch that was not picked up for the stable
> release (likely since there are two patches with similar title).
> > I would appreciate if you could verify.
> >
> > The missing patch: net/ena: fix wrong handling of checksum see
> > patchwork
> > https://patches.dpdk.org/project/dpdk/patch/20240702144626.14545-14-
> sh
> > aibran@amazon.com/
> >
> 
> 
> Thanks for checking! It wasn't listed as relevant for 21.11 LTS as the 'Fixes:'
> tag indicates it is fixing a feature introduced after 21.11.
> 
> commit f66055c7564050e55c7eab147d039bf01048829a
> Author: Shai Brandes <shaibran@amazon.com>
> Date:   Tue Jul 2 17:46:24 2024 +0300
> 
>     net/ena: fix checksum handling
> 
>     This change fixes an issue where a non tcp/udp packet can be indicated
>     to have an invalid csum. If the device erroneously tries to verify the
>     csum on a non tcp/udp packet it will result in false indication that
>     there is a csum error. This change make the driver ignore the
>     indication for csum error on such packets.
> 
>     Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")
>     Cc: stable@dpdk.org
> 
>     Signed-off-by: Shai Brandes <shaibran@amazon.com>
> 
> 
> $ git tag --contains 84daba9962b5
> v22.03
> ...
> 
> If you believe the Fixes: tag is incorrect and it should go to 21.11 branch, let
> me know (though I see it doesn't apply cleanly).
> 
> thanks,
> Kevin.
> 
> 
> > All the best,
> > Shai Brandes
> > ENA drivers team
> >
> >> -----Original Message-----
> >> From: Kevin Traynor <ktraynor@redhat.com>
> >> Sent: Friday, August 23, 2024 7:19 PM
> >> To: Brandes, Shai <shaibran@amazon.com>
> >> Cc: dpdk stable <stable@dpdk.org>
> >> Subject: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has
> >> been queued to stable release 21.11.8
> >>
> >> CAUTION: This email originated from outside of the organization. Do
> >> not click links or open attachments unless you can confirm the sender
> >> and know the content is safe.
> >>
> >>
> >>
> >> Hi,
> >>
> >> FYI, your patch has been queued to stable release 21.11.8
> >>
> >> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> >> It will be pushed if I get no objections before 08/28/24. So please
> >> shout if anyone has objections.
> >>
> >> Also note that after the patch there's a diff of the upstream commit
> >> vs the patch applied to the branch. This will indicate if there was
> >> any rebasing needed to apply to the stable branch. If there were code
> >> changes for rebasing
> >> (ie: not only metadata diffs), please double check that the rebase
> >> was correctly done.
> >>
> >> Queued patches are on a temporary branch at:
> >> https://github.com/kevintraynor/dpdk-stable
> >>
> >> This queued commit can be viewed at:
> >> https://github.com/kevintraynor/dpdk-
> >> stable/commit/082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f
> >>
> >> Thanks.
> >>
> >> Kevin
> >>
> >> ---
> >> From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
> >> 2001
> >> From: Shai Brandes <shaibran@amazon.com>
> >> Date: Tue, 2 Jul 2024 17:46:22 +0300
> >> Subject: [PATCH] net/ena: fix bad checksum handling
> >>
> >> [ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
> >>
> >> Removed a workaround for a false L4 bad Rx csum indication from the
> >> device. The workaround was to set it as unknown so the application
> >> would check it instead.
> >> The issue was fixed in the device, thus the driver bad csum handling
> >> should be fixed in the PMD.
> >>
> >> Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")
> >>
> >> Signed-off-by: Shai Brandes <shaibran@amazon.com>
> >> ---
> >>  drivers/net/ena/ena_ethdev.c | 8 +-------
> >>  1 file changed, 1 insertion(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/net/ena/ena_ethdev.c
> >> b/drivers/net/ena/ena_ethdev.c index 1c61f793e6..84c41f1b9d 100644
> >> --- a/drivers/net/ena/ena_ethdev.c
> >> +++ b/drivers/net/ena/ena_ethdev.c
> >> @@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
> >> rte_mbuf *mbuf,
> >>         else
> >>                 if (unlikely(ena_rx_ctx->l4_csum_err))
> >> -                       /*
> >> -                        * For the L4 Rx checksum offload the HW may indicate
> >> -                        * bad checksum although it's valid. Because of that,
> >> -                        * we're setting the UNKNOWN flag to let the app
> >> -                        * re-verify the checksum.
> >> -                        */
> >> -                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
> >> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
> >>                 else
> >>                         ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
> >> --
> >> 2.46.0
> >>
> >> ---
> >>   Diff of the applied patch vs upstream commit (please double-check
> >> if non-
> >> empty:
> >> ---
> >> --- -   2024-08-23 17:18:12.913173354 +0100
> >> +++ 0109-net-ena-fix-bad-checksum-handling.patch        2024-08-23
> >> 17:18:09.849430556 +0100
> >> @@ -1 +1 @@
> >> -From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00
> >> 2001
> >> +From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
> >> 2001
> >> @@ -5,0 +6,2 @@
> >> +[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
> >> +
> >> @@ -13 +14,0 @@
> >> -Cc: stable@dpdk.org
> >> @@ -21 +22 @@
> >> -index 4e7171e629..b43b913903 100644
> >> +index 1c61f793e6..84c41f1b9d 100644
> >> @@ -24,3 +25,3 @@
> >> -@@ -675,11 +675,5 @@ static inline void ena_rx_mbuf_prepare(struct
> >> ena_ring *rx_ring,
> >> -               if (unlikely(ena_rx_ctx->l4_csum_err)) {
> >> -                       ++rx_stats->l4_csum_bad;
> >> +@@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
> >> rte_mbuf *mbuf,
> >> +       else
> >> +               if (unlikely(ena_rx_ctx->l4_csum_err))
> >> @@ -35,2 +36,2 @@
> >> -               } else {
> >> -                       ++rx_stats->l4_csum_good;
> >> +               else
> >> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
> >


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

* Re: patch 'crypto/openssl: set cipher padding once' has been queued to stable release 21.11.8
  2024-08-23 16:18 ` patch 'crypto/openssl: set cipher padding once' " Kevin Traynor
@ 2024-09-04 14:24   ` Kevin Traynor
  0 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-09-04 14:24 UTC (permalink / raw)
  To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable

On 23/08/2024 17:18, Kevin Traynor wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 21.11.8
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/28/24. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable
> 
> This queued commit can be viewed at:
> https://github.com/kevintraynor/dpdk-stable/commit/d6048dac1e75d310ad2dc6b89278567c8c925b56
> 
> Thanks.
> 
> Kevin
> 

Hi, this patch was causing unit test failures in the CI.

CI run without patch applied:
https://dpdkdashboard.iol.unh.edu/results/dashboard/tarballs/30439/

CI run with this patch applied. See extra unit test fails.

1/2 DPDK:driver-tests / cryptodev_openssl_autotest  FAIL     0.84 s
(killed by signal 11 SIGSEGV)

https://dpdkdashboard.iol.unh.edu/results/dashboard/tarballs/30433/
You can get full logs from the relevant platforms.

I've removed it from 21.11.8. I can re-add for 21.11.9 if it is rebased
and passing CI.

thanks,
Kevin.

> ---
> From d6048dac1e75d310ad2dc6b89278567c8c925b56 Mon Sep 17 00:00:00 2001
> From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
> Date: Wed, 3 Jul 2024 13:45:51 +0000
> Subject: [PATCH] crypto/openssl: set cipher padding once
> 
> [ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]
> 
> Setting the cipher padding has a noticeable performance footprint,
> and it doesn't need to be done for every call to
> process_openssl_cipher_{en,de}crypt(). Setting it causes OpenSSL to set
> it on every future context re-init. Thus, for every buffer after the
> first one, the padding is being set twice.
> 
> Instead, just set the cipher padding once - when configuring the session
> parameters - avoiding the unnecessary double setting behaviour. This is
> skipped for AEAD ciphers, where disabling padding is not necessary.
> 
> Throughput performance uplift measurements for AES-CBC-128 encrypt on
> Ampere Altra Max platform:
> 1 worker lcore
> |   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
> |-----------------+---------------+--------------------+----------|
> |              64 |          2.97 |               3.72 |    25.2% |
> |             256 |          8.10 |               9.42 |    16.3% |
> |            1024 |         14.22 |              15.18 |     6.8% |
> |            2048 |         16.28 |              16.93 |     4.0% |
> |            4096 |         17.58 |              17.97 |     2.2% |
> 
> 8 worker lcores
> |   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
> |-----------------+---------------+--------------------+----------|
> |              64 |         21.27 |              29.85 |    40.3% |
> |             256 |         60.05 |              75.53 |    25.8% |
> |            1024 |        110.11 |             121.56 |    10.4% |
> |            2048 |        128.05 |             135.40 |     5.7% |
> |            4096 |        139.45 |             143.76 |     3.1% |
> 
> Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
> Acked-by: Kai Ji <kai.ji@intel.com>
> Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
> ---
>  drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index a321258980..b82f6939a5 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -615,4 +615,6 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
>  	}
>  
> +	EVP_CIPHER_CTX_set_padding(sess->cipher.ctx, 0);
> +
>  	return 0;
>  }
> @@ -943,6 +945,4 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
>  		goto process_cipher_encrypt_err;
>  
> -	EVP_CIPHER_CTX_set_padding(ctx, 0);
> -
>  	if (process_openssl_encryption_update(mbuf_src, offset, &dst,
>  			srclen, ctx, inplace))
> @@ -993,6 +993,4 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
>  		goto process_cipher_decrypt_err;
>  
> -	EVP_CIPHER_CTX_set_padding(ctx, 0);
> -
>  	if (process_openssl_decryption_update(mbuf_src, offset, &dst,
>  			srclen, ctx, inplace))


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

* Re: patch 'net/ena: fix bad checksum handling' has been queued to stable release 21.11.8
  2024-09-02 13:01       ` Brandes, Shai
@ 2024-09-04 14:30         ` Kevin Traynor
  0 siblings, 0 replies; 143+ messages in thread
From: Kevin Traynor @ 2024-09-04 14:30 UTC (permalink / raw)
  To: Brandes, Shai; +Cc: dpdk stable

On 02/09/2024 14:01, Brandes, Shai wrote:
> Hi Kevin, 
> 
> The fix is indeed required as it fixes an issue where checksum was inspected for non tcp/udp packets.
> If you need I can prepare a dedicated patch for this on top of 21.11.8

Hi Shai,

No need, I rebased the patch with the below and pushed to:

https://git.dpdk.org/dpdk-stable/commit/?h=21.11&id=80d05a5ea82dcb5d79b90af95d8a0fa4c556651f

thanks,
Kevin.

> It should go into https://github.com/kevintraynor/dpdk-stable/blob/21.11/drivers/net/ena/ena_ethdev.c#L309:
> 
> 		packet_type |= RTE_PTYPE_L3_IPV6;
> 	}
> 
> -	if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) {
> +	if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag ||
> +		!(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) {
> 		ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
> 	else
> 		if (unlikely(ena_rx_ctx->l4_csum_err))
> 			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
> 		else
> 			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
> 
> All the best,
> Shai
> 
> 
>> -----Original Message-----
>> From: Kevin Traynor <ktraynor@redhat.com>
>> Sent: Monday, August 26, 2024 2:18 PM
>> To: Brandes, Shai <shaibran@amazon.com>
>> Cc: dpdk stable <stable@dpdk.org>
>> Subject: RE: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has been
>> queued to stable release 21.11.8
>>
>> CAUTION: This email originated from outside of the organization. Do not click
>> links or open attachments unless you can confirm the sender and know the
>> content is safe.
>>
>>
>>
>> On 26/08/2024 11:26, Brandes, Shai wrote:
>>> Hi Kevin,
>>>
>>
>> Hi Shai,
>>
>>> I think there is one net/ena patch that was not picked up for the stable
>> release (likely since there are two patches with similar title).
>>> I would appreciate if you could verify.
>>>
>>> The missing patch: net/ena: fix wrong handling of checksum see
>>> patchwork
>>> https://patches.dpdk.org/project/dpdk/patch/20240702144626.14545-14-
>> sh
>>> aibran@amazon.com/
>>>
>>
>>
>> Thanks for checking! It wasn't listed as relevant for 21.11 LTS as the 'Fixes:'
>> tag indicates it is fixing a feature introduced after 21.11.
>>
>> commit f66055c7564050e55c7eab147d039bf01048829a
>> Author: Shai Brandes <shaibran@amazon.com>
>> Date:   Tue Jul 2 17:46:24 2024 +0300
>>
>>     net/ena: fix checksum handling
>>
>>     This change fixes an issue where a non tcp/udp packet can be indicated
>>     to have an invalid csum. If the device erroneously tries to verify the
>>     csum on a non tcp/udp packet it will result in false indication that
>>     there is a csum error. This change make the driver ignore the
>>     indication for csum error on such packets.
>>
>>     Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")
>>     Cc: stable@dpdk.org
>>
>>     Signed-off-by: Shai Brandes <shaibran@amazon.com>
>>
>>
>> $ git tag --contains 84daba9962b5
>> v22.03
>> ...
>>
>> If you believe the Fixes: tag is incorrect and it should go to 21.11 branch, let
>> me know (though I see it doesn't apply cleanly).
>>
>> thanks,
>> Kevin.
>>
>>
>>> All the best,
>>> Shai Brandes
>>> ENA drivers team
>>>
>>>> -----Original Message-----
>>>> From: Kevin Traynor <ktraynor@redhat.com>
>>>> Sent: Friday, August 23, 2024 7:19 PM
>>>> To: Brandes, Shai <shaibran@amazon.com>
>>>> Cc: dpdk stable <stable@dpdk.org>
>>>> Subject: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has
>>>> been queued to stable release 21.11.8
>>>>
>>>> CAUTION: This email originated from outside of the organization. Do
>>>> not click links or open attachments unless you can confirm the sender
>>>> and know the content is safe.
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> FYI, your patch has been queued to stable release 21.11.8
>>>>
>>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>>> It will be pushed if I get no objections before 08/28/24. So please
>>>> shout if anyone has objections.
>>>>
>>>> Also note that after the patch there's a diff of the upstream commit
>>>> vs the patch applied to the branch. This will indicate if there was
>>>> any rebasing needed to apply to the stable branch. If there were code
>>>> changes for rebasing
>>>> (ie: not only metadata diffs), please double check that the rebase
>>>> was correctly done.
>>>>
>>>> Queued patches are on a temporary branch at:
>>>> https://github.com/kevintraynor/dpdk-stable
>>>>
>>>> This queued commit can be viewed at:
>>>> https://github.com/kevintraynor/dpdk-
>>>> stable/commit/082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f
>>>>
>>>> Thanks.
>>>>
>>>> Kevin
>>>>
>>>> ---
>>>> From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
>>>> 2001
>>>> From: Shai Brandes <shaibran@amazon.com>
>>>> Date: Tue, 2 Jul 2024 17:46:22 +0300
>>>> Subject: [PATCH] net/ena: fix bad checksum handling
>>>>
>>>> [ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
>>>>
>>>> Removed a workaround for a false L4 bad Rx csum indication from the
>>>> device. The workaround was to set it as unknown so the application
>>>> would check it instead.
>>>> The issue was fixed in the device, thus the driver bad csum handling
>>>> should be fixed in the PMD.
>>>>
>>>> Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")
>>>>
>>>> Signed-off-by: Shai Brandes <shaibran@amazon.com>
>>>> ---
>>>>  drivers/net/ena/ena_ethdev.c | 8 +-------
>>>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>>>
>>>> diff --git a/drivers/net/ena/ena_ethdev.c
>>>> b/drivers/net/ena/ena_ethdev.c index 1c61f793e6..84c41f1b9d 100644
>>>> --- a/drivers/net/ena/ena_ethdev.c
>>>> +++ b/drivers/net/ena/ena_ethdev.c
>>>> @@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
>>>> rte_mbuf *mbuf,
>>>>         else
>>>>                 if (unlikely(ena_rx_ctx->l4_csum_err))
>>>> -                       /*
>>>> -                        * For the L4 Rx checksum offload the HW may indicate
>>>> -                        * bad checksum although it's valid. Because of that,
>>>> -                        * we're setting the UNKNOWN flag to let the app
>>>> -                        * re-verify the checksum.
>>>> -                        */
>>>> -                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
>>>> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
>>>>                 else
>>>>                         ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
>>>> --
>>>> 2.46.0
>>>>
>>>> ---
>>>>   Diff of the applied patch vs upstream commit (please double-check
>>>> if non-
>>>> empty:
>>>> ---
>>>> --- -   2024-08-23 17:18:12.913173354 +0100
>>>> +++ 0109-net-ena-fix-bad-checksum-handling.patch        2024-08-23
>>>> 17:18:09.849430556 +0100
>>>> @@ -1 +1 @@
>>>> -From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00
>>>> 2001
>>>> +From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00
>>>> 2001
>>>> @@ -5,0 +6,2 @@
>>>> +[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
>>>> +
>>>> @@ -13 +14,0 @@
>>>> -Cc: stable@dpdk.org
>>>> @@ -21 +22 @@
>>>> -index 4e7171e629..b43b913903 100644
>>>> +index 1c61f793e6..84c41f1b9d 100644
>>>> @@ -24,3 +25,3 @@
>>>> -@@ -675,11 +675,5 @@ static inline void ena_rx_mbuf_prepare(struct
>>>> ena_ring *rx_ring,
>>>> -               if (unlikely(ena_rx_ctx->l4_csum_err)) {
>>>> -                       ++rx_stats->l4_csum_bad;
>>>> +@@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct
>>>> rte_mbuf *mbuf,
>>>> +       else
>>>> +               if (unlikely(ena_rx_ctx->l4_csum_err))
>>>> @@ -35,2 +36,2 @@
>>>> -               } else {
>>>> -                       ++rx_stats->l4_csum_good;
>>>> +               else
>>>> +                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
>>>
> 


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

end of thread, other threads:[~2024-09-04 14:30 UTC | newest]

Thread overview: 143+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-23 16:17 patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 21.11.8 Kevin Traynor
2024-08-23 16:17 ` patch 'eal/unix: support ZSTD compression for firmware' " Kevin Traynor
2024-08-23 16:17 ` patch 'pcapng: add memcpy check' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/virtio-user: " Kevin Traynor
2024-08-23 16:17 ` patch 'eal/windows: install sched.h file' " Kevin Traynor
2024-08-23 16:17 ` patch 'latencystats: fix literal float suffix' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/hns3: fix offload flag of IEEE 1588' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/hns3: fix Rx timestamp flag' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/hns3: fix double free for Rx/Tx queue' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/hns3: fix variable overflow' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " Kevin Traynor
2024-08-23 16:17 ` patch 'doc: fix testpmd ring size command' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/af_xdp: count mbuf allocation failures' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/tap: fix file descriptor check in isolated flow' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: reset link when link never comes back' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: update DMA coherency values' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: disable interrupts during device removal' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: fix connection for SFP+ active " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: check only minimum speed for " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: fix Tx flow on 30H HW' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: delay AN timeout during KR training' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/axgbe: fix linkup in PHY status' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/ice: fix check for outer UDP checksum offload' " Kevin Traynor
2024-08-23 16:17 ` patch 'app/testpmd: fix outer IP " Kevin Traynor
2024-08-23 16:17 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " Kevin Traynor
2024-08-23 16:17 ` patch 'app/testpmd: fix lcore ID restriction' " Kevin Traynor
2024-08-23 16:17 ` patch 'hash: fix return code description in Doxygen' " Kevin Traynor
2024-08-23 16:17 ` patch 'hash: check name when creating a hash' " Kevin Traynor
2024-08-23 16:17 ` patch 'vhost: fix build with GCC 13' " Kevin Traynor
2024-08-23 16:17 ` patch 'vhost: cleanup resubmit info before inflight setup' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/virtio: fix MAC table update' " Kevin Traynor
2024-08-23 16:17 ` patch 'event/sw: fix warning from useless snprintf' " Kevin Traynor
2024-08-23 16:17 ` patch 'eal: fix logs for '--lcores'' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/fm10k: fix cleanup during init failure' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/ixgbe: do not update link status in secondary process' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/e1000/base: fix link power down' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/ixgbe/base: fix PHY ID for X550' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/cnxk: fix RSS config' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/cnxk: fix outbound security with higher packet burst' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/cnxk: fix promiscuous state after MAC change' " Kevin Traynor
2024-08-23 16:17 ` patch 'hash: fix RCU reclamation size' " Kevin Traynor
2024-08-23 16:17 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Kevin Traynor
2024-08-23 16:17 ` patch 'net/mlx5: fix indexed pool with invalid index' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " Kevin Traynor
2024-08-23 16:18 ` patch 'telemetry: lower log level on socket error' " Kevin Traynor
2024-08-23 16:18 ` patch 'app/bbdev: fix interrupt tests' " Kevin Traynor
2024-08-23 16:18 ` patch 'dmadev: fix structure alignment' " Kevin Traynor
2024-08-23 16:18 ` patch 'vdpa/sfc: remove dead code' " Kevin Traynor
2024-08-23 16:18 ` patch 'bpf: fix MOV instruction evaluation' " Kevin Traynor
2024-08-23 16:18 ` patch 'bpf: fix load hangs with six IPv6 addresses' " Kevin Traynor
2024-08-23 16:18 ` patch 'telemetry: fix connection parameter parsing' " Kevin Traynor
2024-08-23 16:18 ` patch 'baseband/la12xx: forbid secondary process' " Kevin Traynor
2024-08-23 16:18 ` patch 'crypto/cnxk: fix minimal input normalization' " Kevin Traynor
2024-08-23 16:18 ` patch 'cryptodev: fix build without crypto callbacks' " Kevin Traynor
2024-08-23 16:18 ` patch 'cryptodev: validate crypto callbacks from next node' " Kevin Traynor
2024-08-23 16:18 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " Kevin Traynor
2024-08-23 16:18 ` patch 'crypto/openssl: set cipher padding once' " Kevin Traynor
2024-09-04 14:24   ` Kevin Traynor
2024-08-23 16:18 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " Kevin Traynor
2024-08-23 16:18 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " Kevin Traynor
2024-08-23 16:18 ` patch 'crypto/dpaa2_sec: fix event queue user context' " Kevin Traynor
2024-08-23 16:18 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " Kevin Traynor
2024-08-26  8:07   ` [EXTERNAL] " Akhil Goyal
2024-08-26 11:06     ` Kevin Traynor
2024-08-23 16:18 ` patch 'fbarray: fix incorrect lookahead behavior' " Kevin Traynor
2024-08-23 16:18 ` patch 'fbarray: fix incorrect lookbehind " Kevin Traynor
2024-08-23 16:18 ` patch 'fbarray: fix lookahead ignore mask handling' " Kevin Traynor
2024-08-23 16:18 ` patch 'fbarray: fix lookbehind " Kevin Traynor
2024-08-23 16:18 ` patch 'eal/linux: lower log level on allocation attempt failure' " Kevin Traynor
2024-08-23 16:18 ` patch 'app/testpmd: fix help string of BPF load command' " Kevin Traynor
2024-08-23 16:18 ` patch 'bus/dpaa: fix bus scan for DMA devices' " Kevin Traynor
2024-08-23 16:18 ` patch 'bus/dpaa: fix memory leak in bus scan' " Kevin Traynor
2024-08-23 16:18 ` patch 'common/dpaax: fix IOVA table cleanup' " Kevin Traynor
2024-08-23 16:18 ` patch 'common/dpaax: fix node array overrun' " Kevin Traynor
2024-08-23 16:18 ` patch 'bus/dpaa: remove redundant file descriptor check' " Kevin Traynor
2024-08-23 16:18 ` patch 'fbarray: fix finding for unaligned length' " Kevin Traynor
2024-08-23 16:18 ` patch 'buildtools: fix build with clang 17 and ASan' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix pointer to variable outside scope' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix sign extension' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix size when allocating children arrays' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix GCS descriptor field offsets' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix check for existing switch rule' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix potential TLV length overflow' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix board type definition' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ice/base: fix masking when reading context' " Kevin Traynor
2024-08-23 16:18 ` patch 'app/testpmd: handle IEEE1588 init failure' " Kevin Traynor
2024-08-23 16:18 ` patch 'app/testpmd: fix parsing for connection tracking item' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix tunnel packet parsing' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix flow filters in VT mode' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix Tx hang on queue disable' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ngbe: keep PHY power down while device probing' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix hotplug remove' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix MTU range' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix memory leaks' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ngbe: " Kevin Traynor
2024-08-23 16:18 ` patch 'net/txgbe: fix Rx interrupt' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/vmxnet3: fix init logs' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/ena: fix bad checksum handling' " Kevin Traynor
2024-08-26 10:26   ` Brandes, Shai
2024-08-26 11:17     ` Kevin Traynor
2024-09-02 13:01       ` Brandes, Shai
2024-09-04 14:30         ` Kevin Traynor
2024-08-23 16:18 ` patch 'net/ena: fix return value check' " Kevin Traynor
2024-08-23 16:18 ` patch 'net/nfp: fix disabling 32-bit build' " Kevin Traynor
2024-08-23 16:19 ` patch 'test/crypto: fix allocation comment' " Kevin Traynor
2024-08-23 16:19 ` patch 'doc: fix typo in l2fwd-crypto guide' " Kevin Traynor
2024-08-23 16:19 ` patch 'test/crypto: fix asymmetric capability test' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/ice: fix return value for " Kevin Traynor
2024-08-23 16:19 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/mlx5: fix MTU configuration' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/mlx5: fix end condition of reading xstats' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " Kevin Traynor
2024-08-23 16:19 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/hns3: check Rx DMA address alignmnent' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/ark: fix index arithmetic' " Kevin Traynor
2024-08-23 16:19 ` patch 'ethdev: fix GENEVE option item conversion' " Kevin Traynor
2024-08-23 16:19 ` patch 'app/testpmd: fix build on signed comparison' " Kevin Traynor
2024-08-23 16:19 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " Kevin Traynor
2024-08-23 16:19 ` patch 'bus/pci: fix FD " Kevin Traynor
2024-08-23 16:19 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " Kevin Traynor
2024-08-23 16:19 ` patch 'app/pdump: " Kevin Traynor
2024-08-23 16:19 ` patch 'malloc: fix multi-process wait condition handling' " Kevin Traynor
2024-08-23 16:19 ` patch 'bus/vdev: fix device reinitialization' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/hns3: fix uninitialized variable in FEC query' " Kevin Traynor
2024-08-23 16:19 ` patch 'net/ice/base: fix temporary failures reading NVM' " Kevin Traynor
2024-08-23 16:19 ` patch 'doc: remove reference to mbuf pkt field' " Kevin Traynor
2024-08-23 16:19 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " Kevin Traynor
2024-08-23 16:19 ` patch 'doc: add baseline mode in l3fwd-power guide' " Kevin Traynor

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).