patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2
@ 2022-05-25 16:27 Kevin Traynor
  2022-05-25 16:27 ` patch 'net/netvsc: fix hot adding multiple VF PCI devices' " Kevin Traynor
                   ` (53 more replies)
  0 siblings, 54 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:27 UTC (permalink / raw)
  To: David Marchand; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 03e1864411b8a198ee065d9dc2e24102ed262518 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 5 May 2022 11:29:51 +0200
Subject: [PATCH] test/mem: disable ASan when accessing unallocated memory

[ upstream commit 48ff13ef37cbd63ecba9b28d5377444964c9c49f ]

As described in bugzilla, ASan reports accesses to all memory segment as
invalid, since those parts have not been allocated with rte_malloc.
Move __rte_no_asan to rte_common.h and disable ASan on a part of the test.

Bugzilla ID: 880
Fixes: 6cc51b1293ce ("mem: instrument allocator for ASan")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_memory.c       |  5 +++++
 lib/eal/common/malloc_elem.h | 10 ++--------
 lib/eal/include/rte_common.h | 13 +++++++++++++
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 140ac3f3cf..440e5ef838 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -26,4 +26,9 @@
  */
 
+/*
+ * ASan complains about accessing unallocated memory.
+ * See: https://bugs.dpdk.org/show_bug.cgi?id=880
+ */
+__rte_no_asan
 static int
 check_mem(const struct rte_memseg_list *msl __rte_unused,
diff --git a/lib/eal/common/malloc_elem.h b/lib/eal/common/malloc_elem.h
index c5f26ffd2f..503fe5c470 100644
--- a/lib/eal/common/malloc_elem.h
+++ b/lib/eal/common/malloc_elem.h
@@ -8,4 +8,6 @@
 #include <stdbool.h>
 
+#include <rte_common.h>
+
 #define MIN_DATA_SIZE (RTE_CACHE_LINE_SIZE)
 
@@ -126,10 +128,4 @@ malloc_elem_cookies_ok(const struct malloc_elem *elem)
 	RTE_PTR_ADD(ASAN_MEM_SHIFT(mem), ASAN_SHADOW_OFFSET)
 
-#if defined(__clang__)
-#define __rte_no_asan __attribute__((no_sanitize("address", "hwaddress")))
-#else
-#define __rte_no_asan __attribute__((no_sanitize_address))
-#endif
-
 __rte_no_asan
 static inline void
@@ -271,6 +267,4 @@ old_malloc_size(struct malloc_elem *elem)
 #else /* !RTE_MALLOC_ASAN */
 
-#define __rte_no_asan
-
 static inline void
 asan_set_zone(void *ptr __rte_unused, size_t len __rte_unused,
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index 4a399cc7c8..eee1ada379 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -243,4 +243,17 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
 #define __rte_cold __attribute__((cold))
 
+/**
+ * Disable AddressSanitizer on some code
+ */
+#ifdef RTE_MALLOC_ASAN
+#ifdef RTE_CC_CLANG
+#define __rte_no_asan __attribute__((no_sanitize("address", "hwaddress")))
+#else
+#define __rte_no_asan __attribute__((no_sanitize_address))
+#endif
+#else /* ! RTE_MALLOC_ASAN */
+#define __rte_no_asan
+#endif
+
 /*********** Macros for pointer arithmetic ********/
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.683524696 +0100
+++ 0001-test-mem-disable-ASan-when-accessing-unallocated-mem.patch	2022-05-25 17:26:58.525828270 +0100
@@ -1 +1 @@
-From 48ff13ef37cbd63ecba9b28d5377444964c9c49f Mon Sep 17 00:00:00 2001
+From 03e1864411b8a198ee065d9dc2e24102ed262518 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48ff13ef37cbd63ecba9b28d5377444964c9c49f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index c5f65895e1..952ce7343b 100644
+index c5f26ffd2f..503fe5c470 100644
@@ -47 +48 @@
-@@ -132,10 +134,4 @@ malloc_elem_cookies_ok(const struct malloc_elem *elem)
+@@ -126,10 +128,4 @@ malloc_elem_cookies_ok(const struct malloc_elem *elem)
@@ -58 +59 @@
-@@ -277,6 +273,4 @@ old_malloc_size(struct malloc_elem *elem)
+@@ -271,6 +267,4 @@ old_malloc_size(struct malloc_elem *elem)
@@ -66 +67 @@
-index 67587025ab..d56a7570c0 100644
+index 4a399cc7c8..eee1ada379 100644
@@ -69 +70 @@
-@@ -268,4 +268,17 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+@@ -243,4 +243,17 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)


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

* patch 'net/netvsc: fix hot adding multiple VF PCI devices' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
@ 2022-05-25 16:27 ` Kevin Traynor
  2022-05-25 16:27 ` patch 'net/nfp: remove unneeded header inclusion' " Kevin Traynor
                   ` (52 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:27 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 8ab93b06bcf03b86b7d1c021350736568e85e690 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 24 Mar 2022 10:46:17 -0700
Subject: [PATCH] net/netvsc: fix hot adding multiple VF PCI devices

[ upstream commit 7fc4c0997b046e2874a9806431b3d267bb684b41 ]

This patch fixes two issues with hot removing/adding a VF PCI device:
1. The original device argument is lost when it's hot added
2. If there are multiple VFs hot adding at the same time, some of the
   VFs may not get added successfully because only one single VF status
   is stored in the netvsc.

Fix these by storing the original device arguments and maintain a list
of hot add contexts to deal with multiple VF devices.

Fixes: a2a23a794b ("net/netvsc: support VF device hot add/remove")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_ethdev.c | 78 +++++++++++++++++++++++++++-------
 drivers/net/netvsc/hn_var.h    | 12 +++++-
 drivers/net/netvsc/hn_vf.c     |  4 ++
 3 files changed, 77 insertions(+), 17 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 8a950403ac..0a357d3645 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -555,7 +555,8 @@ static void netvsc_hotplug_retry(void *args)
 {
 	int ret;
-	struct hn_data *hv = args;
+	struct hv_hotadd_context *hot_ctx = args;
+	struct hn_data *hv = hot_ctx->hv;
 	struct rte_eth_dev *dev = &rte_eth_devices[hv->port_id];
-	struct rte_devargs *d = &hv->devargs;
+	struct rte_devargs *d = &hot_ctx->da;
 	char buf[256];
 
@@ -567,8 +568,11 @@ static void netvsc_hotplug_retry(void *args)
 
 	PMD_DRV_LOG(DEBUG, "%s: retry count %d",
-		    __func__, hv->eal_hot_plug_retry);
+		    __func__, hot_ctx->eal_hot_plug_retry);
 
-	if (hv->eal_hot_plug_retry++ > NETVSC_MAX_HOTADD_RETRY)
-		return;
+	if (hot_ctx->eal_hot_plug_retry++ > NETVSC_MAX_HOTADD_RETRY) {
+		PMD_DRV_LOG(NOTICE, "Failed to parse PCI device retry=%d",
+			    hot_ctx->eal_hot_plug_retry);
+		goto free_hotadd_ctx;
+	}
 
 	snprintf(buf, sizeof(buf), "/sys/bus/pci/devices/%s/net", d->name);
@@ -603,5 +607,5 @@ static void netvsc_hotplug_retry(void *args)
 		if (req.ifr_hwaddr.sa_family != ARPHRD_ETHER) {
 			closedir(di);
-			return;
+			goto free_hotadd_ctx;
 		}
 		memcpy(eth_addr.addr_bytes, req.ifr_hwaddr.sa_data,
@@ -612,6 +616,11 @@ static void netvsc_hotplug_retry(void *args)
 				    "Found matching MAC address, adding device %s network name %s",
 				    d->name, dir->d_name);
+
+			/* If this device has been hot removed from this
+			 * parent device, restore its args.
+			 */
 			ret = rte_eal_hotplug_add(d->bus->name, d->name,
-						  d->args);
+						  hv->vf_devargs ?
+						  hv->vf_devargs : "");
 			if (ret) {
 				PMD_DRV_LOG(ERR,
@@ -625,10 +634,18 @@ static void netvsc_hotplug_retry(void *args)
 		 */
 		closedir(di);
-		return;
+		goto free_hotadd_ctx;
 	}
 	closedir(di);
 retry:
 	/* The device is still being initialized, retry after 1 second */
-	rte_eal_alarm_set(1000000, netvsc_hotplug_retry, hv);
+	rte_eal_alarm_set(1000000, netvsc_hotplug_retry, hot_ctx);
+	return;
+
+free_hotadd_ctx:
+	rte_spinlock_lock(&hv->hotadd_lock);
+	LIST_REMOVE(hot_ctx, list);
+	rte_spinlock_unlock(&hv->hotadd_lock);
+
+	rte_free(hot_ctx);
 }
 
@@ -638,5 +655,6 @@ netvsc_hotadd_callback(const char *device_name, enum rte_dev_event_type type,
 {
 	struct hn_data *hv = arg;
-	struct rte_devargs *d = &hv->devargs;
+	struct hv_hotadd_context *hot_ctx;
+	struct rte_devargs *d;
 	int ret;
 
@@ -650,9 +668,20 @@ netvsc_hotadd_callback(const char *device_name, enum rte_dev_event_type type,
 			break;
 
+		hot_ctx = rte_zmalloc("NETVSC-HOTADD", sizeof(*hot_ctx),
+				      rte_mem_page_size());
+
+		if (!hot_ctx) {
+			PMD_DRV_LOG(ERR, "Failed to allocate hotadd context");
+			return;
+		}
+
+		hot_ctx->hv = hv;
+		d = &hot_ctx->da;
+
 		ret = rte_devargs_parse(d, device_name);
 		if (ret) {
 			PMD_DRV_LOG(ERR,
 				    "devargs parsing failed ret=%d", ret);
-			return;
+			goto free_ctx;
 		}
 
@@ -661,6 +690,9 @@ netvsc_hotadd_callback(const char *device_name, enum rte_dev_event_type type,
 			 * PCI device is a VF device
 			 */
-			hv->eal_hot_plug_retry = 0;
-			rte_eal_alarm_set(1000000, netvsc_hotplug_retry, hv);
+			rte_spinlock_lock(&hv->hotadd_lock);
+			LIST_INSERT_HEAD(&hv->hotadd_list, hot_ctx, list);
+			rte_spinlock_unlock(&hv->hotadd_lock);
+			rte_eal_alarm_set(1000000, netvsc_hotplug_retry, hot_ctx);
+			return;
 		}
 
@@ -668,6 +700,8 @@ netvsc_hotadd_callback(const char *device_name, enum rte_dev_event_type type,
 		 * sent from VSP
 		 */
-
+free_ctx:
+		rte_free(hot_ctx);
 		break;
+
 	default:
 		break;
@@ -1004,4 +1038,5 @@ hn_dev_close(struct rte_eth_dev *dev)
 	int ret;
 	struct hn_data *hv = dev->data->dev_private;
+	struct hv_hotadd_context *hot_ctx;
 
 	PMD_INIT_FUNC_TRACE();
@@ -1009,5 +1044,12 @@ hn_dev_close(struct rte_eth_dev *dev)
 		return 0;
 
-	rte_eal_alarm_cancel(netvsc_hotplug_retry, &hv->devargs);
+	rte_spinlock_lock(&hv->hotadd_lock);
+	while (!LIST_EMPTY(&hv->hotadd_list)) {
+		hot_ctx = LIST_FIRST(&hv->hotadd_list);
+		rte_eal_alarm_cancel(netvsc_hotplug_retry, hot_ctx);
+		LIST_REMOVE(hot_ctx, list);
+		rte_free(hot_ctx);
+	}
+	rte_spinlock_unlock(&hv->hotadd_lock);
 
 	ret = hn_vf_close(dev);
@@ -1098,4 +1140,7 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
+	rte_spinlock_init(&hv->hotadd_lock);
+	LIST_INIT(&hv->hotadd_list);
+
 	vmbus = container_of(device, struct rte_vmbus_device, device);
 	eth_dev->dev_ops = &hn_eth_dev_ops;
@@ -1222,4 +1267,7 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
 	hn_dev_close(eth_dev);
 
+	free(hv->vf_devargs);
+	hv->vf_devargs = NULL;
+
 	hn_detach(hv);
 	hn_chim_uninit(eth_dev);
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index fbb3995507..416c042a27 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -127,4 +127,11 @@ struct hn_vf_ctx {
 };
 
+struct hv_hotadd_context {
+	LIST_ENTRY(hv_hotadd_context) list;
+	struct hn_data *hv;
+	struct rte_devargs da;
+	int eal_hot_plug_retry;
+};
+
 struct hn_data {
 	struct rte_vmbus_device *vmbus;
@@ -176,6 +183,7 @@ struct hn_data {
 	struct vmbus_channel *channels[HN_MAX_CHANNELS];
 
-	struct rte_devargs devargs;
-	int		eal_hot_plug_retry;
+	rte_spinlock_t	hotadd_lock;
+	LIST_HEAD(hotadd_list, hv_hotadd_context) hotadd_list;
+	char		*vf_devargs;
 };
 
diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index ebb9c60147..62948bf889 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -130,4 +130,8 @@ static void hn_remove_delayed(void *args)
 			    port_id, ret);
 
+	/* Record the device parameters for possible hotplug events */
+	if (dev->devargs && dev->devargs->args)
+		hv->vf_devargs = strdup(dev->devargs->args);
+
 	ret = rte_eth_dev_close(port_id);
 	if (ret)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.703712477 +0100
+++ 0002-net-netvsc-fix-hot-adding-multiple-VF-PCI-devices.patch	2022-05-25 17:26:58.529828276 +0100
@@ -1 +1 @@
-From 7fc4c0997b046e2874a9806431b3d267bb684b41 Mon Sep 17 00:00:00 2001
+From 8ab93b06bcf03b86b7d1c021350736568e85e690 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fc4c0997b046e2874a9806431b3d267bb684b41 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/nfp: remove unneeded header inclusion' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
  2022-05-25 16:27 ` patch 'net/netvsc: fix hot adding multiple VF PCI devices' " Kevin Traynor
@ 2022-05-25 16:27 ` Kevin Traynor
  2022-05-25 16:27 ` patch 'net/bonding: fix RSS key config with extended key length' " Kevin Traynor
                   ` (51 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:27 UTC (permalink / raw)
  To: David Marchand; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 3192737d106dc78aeaa99c8739606d385973f828 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 8 Apr 2022 11:41:16 +0200
Subject: [PATCH] net/nfp: remove unneeded header inclusion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a866966bdf7080ad2bd18465dfd5585e1bc535d6 ]

Looking at this driver history, there was never a need for including
execinfo.h.

Fixes: bdbf45c24b07 ("net/nfp: fix build with musl libc")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index bad80a5a1c..08bc4e8ef2 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -17,7 +17,4 @@
 #include <assert.h>
 #include <stdio.h>
-#if defined(RTE_BACKTRACE)
-#include <execinfo.h>
-#endif
 #include <stdlib.h>
 #include <unistd.h>
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.724965410 +0100
+++ 0003-net-nfp-remove-unneeded-header-inclusion.patch	2022-05-25 17:26:58.530828277 +0100
@@ -1 +1 @@
-From a866966bdf7080ad2bd18465dfd5585e1bc535d6 Mon Sep 17 00:00:00 2001
+From 3192737d106dc78aeaa99c8739606d385973f828 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a866966bdf7080ad2bd18465dfd5585e1bc535d6 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/bonding: fix RSS key config with extended key length' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
  2022-05-25 16:27 ` patch 'net/netvsc: fix hot adding multiple VF PCI devices' " Kevin Traynor
  2022-05-25 16:27 ` patch 'net/nfp: remove unneeded header inclusion' " Kevin Traynor
@ 2022-05-25 16:27 ` Kevin Traynor
  2022-05-25 16:27 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " Kevin Traynor
                   ` (50 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:27 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 8cf194f699b1476a8a2630cbf1e7e7a812e4dd0b Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Mon, 11 Apr 2022 05:40:03 +0000
Subject: [PATCH] net/bonding: fix RSS key config with extended key length

[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]

When creating a bonding device, if the slave device's
RSS key length = standard_rss_key length + extended_hash_key length,
then bonding device will be same as slave,
in function bond_ethdev_configure(), the default_rss_key length is 40,
it is not matched, so it should calculate a new key for bonding device
if the default key could not be used.

Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 58dad0a0e3..e8a9341777 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3617,11 +3617,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 		} else {
 			if (internals->rss_key_len > sizeof(default_rss_key)) {
-				RTE_BOND_LOG(ERR,
-				       "There is no suitable default hash key");
-				return -EINVAL;
+				/*
+				 * If the rss_key includes standard_rss_key and
+				 * extended_hash_key, the rss key length will be
+				 * larger than default rss key length, so it should
+				 * re-calculate the hash key.
+				 */
+				for (i = 0; i < internals->rss_key_len; i++)
+					internals->rss_key[i] = (uint8_t)rte_rand();
+			} else {
+				memcpy(internals->rss_key, default_rss_key,
+					internals->rss_key_len);
 			}
-
-			memcpy(internals->rss_key, default_rss_key,
-			       internals->rss_key_len);
 		}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.744395694 +0100
+++ 0004-net-bonding-fix-RSS-key-config-with-extended-key-len.patch	2022-05-25 17:26:58.534828283 +0100
@@ -1 +1 @@
-From 94d9c7d45b43fd44af718b621fa52e556028aa3d Mon Sep 17 00:00:00 2001
+From 8cf194f699b1476a8a2630cbf1e7e7a812e4dd0b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b305b6a35b..5cbe89031b 100644
+index 58dad0a0e3..e8a9341777 100644
@@ -26 +27 @@
-@@ -3618,11 +3618,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3617,11 +3617,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)


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

* patch 'net/cxgbe: fix port ID in Rx mbuf' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (2 preceding siblings ...)
  2022-05-25 16:27 ` patch 'net/bonding: fix RSS key config with extended key length' " Kevin Traynor
@ 2022-05-25 16:27 ` Kevin Traynor
  2022-05-25 16:27 ` patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' " Kevin Traynor
                   ` (49 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:27 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 6627ee48b5498cec7483afed3fee4161fab859e0 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 19 Apr 2022 03:54:18 +0530
Subject: [PATCH] net/cxgbe: fix port ID in Rx mbuf

[ upstream commit 86b4d566467d06c66dd5ed2474e12bb17d8861f2 ]

Fill the correct DPDK ethdev port_id, instead of local adapter
physical port_id in mbufs allocated for Rx.

Fixes: 78fc1a716ae8 ("cxgbe: improve Rx performance")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/sge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 1c76b8e4d0..5c176004f9 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1911,5 +1911,5 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 	iq->eth_dev = eth_dev;
 	iq->handler = hnd;
-	iq->port_id = pi->pidx;
+	iq->port_id = eth_dev->data->port_id;
 	iq->mb_pool = mp;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.766364720 +0100
+++ 0005-net-cxgbe-fix-port-ID-in-Rx-mbuf.patch	2022-05-25 17:26:58.538828289 +0100
@@ -1 +1 @@
-From 86b4d566467d06c66dd5ed2474e12bb17d8861f2 Mon Sep 17 00:00:00 2001
+From 6627ee48b5498cec7483afed3fee4161fab859e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 86b4d566467d06c66dd5ed2474e12bb17d8861f2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (3 preceding siblings ...)
  2022-05-25 16:27 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " Kevin Traynor
@ 2022-05-25 16:27 ` Kevin Traynor
  2022-05-25 16:27 ` patch 'net/vhost: fix access to freed memory' " Kevin Traynor
                   ` (48 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:27 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 24dabb9d25a99bde83a91335f0bc594fe1cbd2bf Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 19 Apr 2022 03:54:19 +0530
Subject: [PATCH] net/cxgbe: fix Tx queue stuck with mbuf chain coalescing

[ upstream commit 151e828f6427667faf3fdfaa00d14a65c7f57cd6 ]

When trying to coalesce mbufs with chain on Tx side, it is possible
to get stuck during queue wrap around. When coalescing this mbuf
chain fails, the Tx path returns EBUSY and when the same packet
is retried again, it couldn't get coalesced again, and the loop
repeats. Fix by pushing the packet through the normal Tx path.
Also use FW_ETH_TX_PKTS_WR to handle mbufs with chain for FW
to optimize.

Fixes: 6c2809628cd5 ("net/cxgbe: improve latency for slow traffic")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/sge.c | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 5c176004f9..566cd48406 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -790,7 +790,7 @@ static inline void txq_advance(struct sge_txq *q, unsigned int n)
 #define MAX_COALESCE_LEN 64000
 
-static inline int wraps_around(struct sge_txq *q, int ndesc)
+static inline bool wraps_around(struct sge_txq *q, int ndesc)
 {
-	return (q->pidx + ndesc) > q->size ? 1 : 0;
+	return (q->pidx + ndesc) > q->size ? true : false;
 }
 
@@ -843,5 +843,4 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
 	/* fill the pkts WR header */
 	wr = (void *)&q->desc[q->pidx];
-	wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR));
 	vmwr = (void *)&q->desc[q->pidx];
 
@@ -853,6 +852,9 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
 	wr->r3 = 0;
 	if (is_pf4(adap)) {
-		wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR));
 		wr->type = q->coalesce.type;
+		if (likely(wr->type != 0))
+			wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR));
+		else
+			wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS_WR));
 	} else {
 		wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS_VM_WR));
@@ -933,11 +935,14 @@ static inline int should_tx_packet_coalesce(struct sge_eth_txq *txq,
 		credits = txq_avail(q) - ndesc;
 
+		if (unlikely(wraps_around(q, ndesc)))
+			return 0;
+
 		/* If we are wrapping or this is last mbuf then, send the
 		 * already coalesced mbufs and let the non-coalesce pass
 		 * handle the mbuf.
 		 */
-		if (unlikely(credits < 0 || wraps_around(q, ndesc))) {
+		if (unlikely(credits < 0)) {
 			ship_tx_pkt_coalesce_wr(adap, txq);
-			return 0;
+			return -EBUSY;
 		}
 
@@ -963,6 +968,10 @@ new:
 	credits = txq_avail(q) - ndesc;
 
-	if (unlikely(credits < 0 || wraps_around(q, ndesc)))
+	if (unlikely(wraps_around(q, ndesc)))
 		return 0;
+
+	if (unlikely(credits < 0))
+		return -EBUSY;
+
 	q->coalesce.flits += wr_size / sizeof(__be64);
 	q->coalesce.type = type;
@@ -1107,5 +1116,5 @@ int t4_eth_xmit(struct sge_eth_txq *txq, struct rte_mbuf *mbuf,
 	int l3hdr_len, l4hdr_len, eth_xtra_len;
 	int len, last_desc;
-	int credits;
+	int should_coal, credits;
 	u32 wr_mid;
 	u64 cntrl, *end;
@@ -1139,7 +1148,7 @@ out_free:
 	txq->q.coalesce.max = (8 - (txq->q.pidx & 7)) * 8;
 
-	if (!((m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) ||
-			m->pkt_len > RTE_ETHER_MAX_LEN)) {
-		if (should_tx_packet_coalesce(txq, mbuf, &cflits, adap)) {
+	if ((m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) == 0) {
+		should_coal = should_tx_packet_coalesce(txq, mbuf, &cflits, adap);
+		if (should_coal > 0) {
 			if (unlikely(map_mbuf(mbuf, addr) < 0)) {
 				dev_warn(adap, "%s: mapping err for coalesce\n",
@@ -1150,6 +1159,6 @@ out_free:
 			return tx_do_packet_coalesce(txq, mbuf, cflits, adap,
 						     pi, addr, nb_pkts);
-		} else {
-			return -EBUSY;
+		} else if (should_coal < 0) {
+			return should_coal;
 		}
 	}
@@ -1198,6 +1207,5 @@ out_free:
 	}
 
-	len = 0;
-	len += sizeof(*cpl);
+	len = sizeof(*cpl);
 
 	/* Coalescing skipped and we send through normal path */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.787074081 +0100
+++ 0006-net-cxgbe-fix-Tx-queue-stuck-with-mbuf-chain-coalesc.patch	2022-05-25 17:26:58.540828292 +0100
@@ -1 +1 @@
-From 151e828f6427667faf3fdfaa00d14a65c7f57cd6 Mon Sep 17 00:00:00 2001
+From 24dabb9d25a99bde83a91335f0bc594fe1cbd2bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 151e828f6427667faf3fdfaa00d14a65c7f57cd6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/vhost: fix access to freed memory' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (4 preceding siblings ...)
  2022-05-25 16:27 ` patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' " Kevin Traynor
@ 2022-05-25 16:27 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/virtio: restore some optimisations with AVX512' " Kevin Traynor
                   ` (47 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:27 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Wei Ling, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 58d1b856be11421a5d7688a89f0058ff10688e3a Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Sat, 12 Mar 2022 00:35:12 +0800
Subject: [PATCH] net/vhost: fix access to freed memory

[ upstream commit 9dc6bb06824f3c5887f0436ddba5ab9116cb277e ]

This patch fixes heap-use-after-free reported by ASan.

It is possible for the rte_vhost_dequeue_burst() to access the vq
is freed when numa_realloc() gets called in the device running state.
The control plane will set the vq->access_lock to protected the vq
from the data plane. Unfortunately the lock will fail at the moment
the vq is freed, allowing the rte_vhost_dequeue_burst() to access
the fields of the vq, which will trigger a heap-use-after-free error.

In the case of multiple queues, the vhost pmd can access other queues
that are not ready when the first queue is ready, which makes no sense
and also allows numa_realloc() and rte_vhost_dequeue_burst() access to
vq to happen at the same time. By controlling vq->allow_queuing we can make
the pmd access only the queues that are ready.

Fixes: 1ce3c7fe149 ("net/vhost: emulate device start/stop behavior")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 070f0e6dfd..8a6595504a 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -721,4 +721,5 @@ update_queuing_status(struct rte_eth_dev *dev)
 	struct pmd_internal *internal = dev->data->dev_private;
 	struct vhost_queue *vq;
+	struct rte_vhost_vring_state *state;
 	unsigned int i;
 	int allow_queuing = 1;
@@ -731,4 +732,6 @@ update_queuing_status(struct rte_eth_dev *dev)
 		allow_queuing = 0;
 
+	state = vring_states[dev->data->port_id];
+
 	/* Wait until rx/tx_pkt_burst stops accessing vhost device */
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
@@ -736,5 +739,8 @@ update_queuing_status(struct rte_eth_dev *dev)
 		if (vq == NULL)
 			continue;
-		rte_atomic32_set(&vq->allow_queuing, allow_queuing);
+		if (allow_queuing && state->cur[vq->virtqueue_id])
+			rte_atomic32_set(&vq->allow_queuing, 1);
+		else
+			rte_atomic32_set(&vq->allow_queuing, 0);
 		while (rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
@@ -745,5 +751,8 @@ update_queuing_status(struct rte_eth_dev *dev)
 		if (vq == NULL)
 			continue;
-		rte_atomic32_set(&vq->allow_queuing, allow_queuing);
+		if (allow_queuing && state->cur[vq->virtqueue_id])
+			rte_atomic32_set(&vq->allow_queuing, 1);
+		else
+			rte_atomic32_set(&vq->allow_queuing, 0);
 		while (rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
@@ -968,4 +977,6 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	rte_spinlock_unlock(&state->lock);
 
+	update_queuing_status(eth_dev);
+
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.808074511 +0100
+++ 0007-net-vhost-fix-access-to-freed-memory.patch	2022-05-25 17:26:58.541828293 +0100
@@ -1 +1 @@
-From 9dc6bb06824f3c5887f0436ddba5ab9116cb277e Mon Sep 17 00:00:00 2001
+From 58d1b856be11421a5d7688a89f0058ff10688e3a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 9dc6bb06824f3c5887f0436ddba5ab9116cb277e ]


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

* patch 'net/virtio: restore some optimisations with AVX512' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (5 preceding siblings ...)
  2022-05-25 16:27 ` patch 'net/vhost: fix access to freed memory' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/vhost: fix TSO feature default disablement' " Kevin Traynor
                   ` (46 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: David Marchand; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 4852da727c4ad924e6157c73a1164df8149eaa5c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 11 Apr 2022 17:04:20 +0200
Subject: [PATCH] net/virtio: restore some optimisations with AVX512

[ upstream commit 86ce14412286fe19dcaf2fc19856be70fe27a090 ]

Those optimisations were only enabled with make builds, fix the meson
part.

Fixes: 77d66da83834 ("net/virtio: add vectorized packed ring Rx")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index 01a333ada2..d78b8278c6 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -31,9 +31,9 @@ if arch_subdir == 'x86'
             objs += virtio_avx512_lib.extract_objects('virtio_rxtx_packed.c')
             if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
-                cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
+                cflags += '-DVIRTIO_GCC_UNROLL_PRAGMA'
             elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
-                cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
+                cflags += '-DVIRTIO_CLANG_UNROLL_PRAGMA'
             elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
-                cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
+                cflags += '-DVIRTIO_ICC_UNROLL_PRAGMA'
             endif
         endif
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.827884823 +0100
+++ 0008-net-virtio-restore-some-optimisations-with-AVX512.patch	2022-05-25 17:26:58.542828295 +0100
@@ -1 +1 @@
-From 86ce14412286fe19dcaf2fc19856be70fe27a090 Mon Sep 17 00:00:00 2001
+From 4852da727c4ad924e6157c73a1164df8149eaa5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 86ce14412286fe19dcaf2fc19856be70fe27a090 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/vhost: fix TSO feature default disablement' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (6 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/virtio: restore some optimisations with AVX512' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'vhost: fix missing virtqueue lock protection' " Kevin Traynor
                   ` (45 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From e3036fbd0a686e19f76ae2aec633508d2e7f7b8f Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 22 Apr 2022 11:35:43 +0200
Subject: [PATCH] net/vhost: fix TSO feature default disablement

[ upstream commit 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 ]

By default, TSO feature should be disabled because it requires
application's support to be functional as mentioned in the
documentation.

However, if "tso" devarg was not specified, the feature did
not get disabled.

This patch fixes this issue, so that TSO is disabled, even if
"tso=0" is not passed as devarg.

Fixes: e289400669d5 ("net/vhost: support TSO disabling")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 8a6595504a..a248a65df4 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1655,9 +1655,9 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 		if (ret < 0)
 			goto out_free;
+	}
 
-		if (tso == 0) {
-			disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
-			disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
-		}
+	if (tso == 0) {
+		disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
+		disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.846963661 +0100
+++ 0009-net-vhost-fix-TSO-feature-default-disablement.patch	2022-05-25 17:26:58.542828295 +0100
@@ -1 +1 @@
-From 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 Mon Sep 17 00:00:00 2001
+From e3036fbd0a686e19f76ae2aec633508d2e7f7b8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org


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

* patch 'vhost: fix missing virtqueue lock protection' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (7 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/vhost: fix TSO feature default disablement' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'vdpa/mlx5: fix interrupt trash that leads to crash' " Kevin Traynor
                   ` (44 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 78414da84eb5f5ae3594a073bdc978d3e14efeb4 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 24 Mar 2022 13:46:34 +0100
Subject: [PATCH] vhost: fix missing virtqueue lock protection

[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ]

This patch ensures virtqueue metadata are not being
modified while rte_vhost_vring_call() is executed.

Fixes: 6c299bb7322f ("vhost: introduce vring call API")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/vhost/vhost.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index 13a9bb9dd1..474645b64e 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -1300,4 +1300,6 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
 		return -1;
 
+	rte_spinlock_lock(&vq->access_lock);
+
 	if (vq_is_packed(dev))
 		vhost_vring_call_packed(dev, vq);
@@ -1305,4 +1307,6 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
 		vhost_vring_call_split(dev, vq);
 
+	rte_spinlock_unlock(&vq->access_lock);
+
 	return 0;
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.867269545 +0100
+++ 0010-vhost-fix-missing-virtqueue-lock-protection.patch	2022-05-25 17:26:58.544828298 +0100
@@ -1 +1 @@
-From c5736998305def298e26f8fa73b9995f184fc983 Mon Sep 17 00:00:00 2001
+From 78414da84eb5f5ae3594a073bdc978d3e14efeb4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index cf4bac277a..df0bb9d043 100644
+index 13a9bb9dd1..474645b64e 100644
@@ -22 +23 @@
-@@ -1292,4 +1292,6 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
+@@ -1300,4 +1300,6 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
@@ -29 +30 @@
-@@ -1297,4 +1299,6 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
+@@ -1305,4 +1307,6 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)


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

* patch 'vdpa/mlx5: fix interrupt trash that leads to crash' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (8 preceding siblings ...)
  2022-05-25 16:28 ` patch 'vhost: fix missing virtqueue lock protection' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'vdpa/mlx5: fix dead loop when process interrupted' " Kevin Traynor
                   ` (43 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Xueming Li; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 879fb64517212c99ecfbafc055be135e9201a28a Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Sun, 8 May 2022 17:25:48 +0300
Subject: [PATCH] vdpa/mlx5: fix interrupt trash that leads to crash

[ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ]

Disable interrupt unregister timeout to avoid invalid FD caused
interrupt thread segment fault.

Fixes: 62c813706e41 ("vdpa/mlx5: map doorbell")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 2f32aef67f..c1a25becdd 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -18,5 +18,5 @@
 
 static void
-mlx5_vdpa_virtq_handler(void *cb_arg)
+mlx5_vdpa_virtq_kick_handler(void *cb_arg)
 {
 	struct mlx5_vdpa_virtq *virtq = cb_arg;
@@ -60,18 +60,14 @@ mlx5_vdpa_virtq_unset(struct mlx5_vdpa_virtq *virtq)
 {
 	unsigned int i;
-	int retries = MLX5_VDPA_INTR_RETRIES;
 	int ret = -EAGAIN;
 
-	if (rte_intr_fd_get(virtq->intr_handle) != -1) {
-		while (retries-- && ret == -EAGAIN) {
+	if (rte_intr_fd_get(virtq->intr_handle) >= 0) {
+		while (ret == -EAGAIN) {
 			ret = rte_intr_callback_unregister(virtq->intr_handle,
-							mlx5_vdpa_virtq_handler,
-							virtq);
+					mlx5_vdpa_virtq_kick_handler, virtq);
 			if (ret == -EAGAIN) {
-				DRV_LOG(DEBUG, "Try again to unregister fd %d "
-				"of virtq %d interrupt, retries = %d.",
-				rte_intr_fd_get(virtq->intr_handle),
-				(int)virtq->index, retries);
-
+				DRV_LOG(DEBUG, "Try again to unregister fd %d of virtq %hu interrupt",
+					rte_intr_fd_get(virtq->intr_handle),
+					virtq->index);
 				usleep(MLX5_VDPA_INTR_RETRIES_USEC);
 			}
@@ -361,5 +357,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
 
 		if (rte_intr_callback_register(virtq->intr_handle,
-					       mlx5_vdpa_virtq_handler,
+					       mlx5_vdpa_virtq_kick_handler,
 					       virtq)) {
 			rte_intr_fd_set(virtq->intr_handle, -1);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.886958447 +0100
+++ 0011-vdpa-mlx5-fix-interrupt-trash-that-leads-to-crash.patch	2022-05-25 17:26:58.544828298 +0100
@@ -1 +1 @@
-From 66a439c5d7c166347adc799fcc928058e16ac23d Mon Sep 17 00:00:00 2001
+From 879fb64517212c99ecfbafc055be135e9201a28a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 3416797d28..2e517beda2 100644
+index 2f32aef67f..c1a25becdd 100644
@@ -54 +55 @@
-@@ -360,5 +356,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
+@@ -361,5 +357,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)


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

* patch 'vdpa/mlx5: fix dead loop when process interrupted' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (9 preceding siblings ...)
  2022-05-25 16:28 ` patch 'vdpa/mlx5: fix interrupt trash that leads to crash' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/dpaa: fix event queue detach' " Kevin Traynor
                   ` (42 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Xueming Li; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d24d6395d642237cc9177c270eacb6b57f8b9c14 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Sun, 8 May 2022 17:25:49 +0300
Subject: [PATCH] vdpa/mlx5: fix dead loop when process interrupted

[ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ]

In Ctrl+C handling, sometimes kick handling thread gets endless EGAIN
error and fall into dead lock.

Kick happens frequently in real system due to busy traffic or retry
mechanism. This patch simplifies kick firmware anyway and skip setting
hardware notifier due to potential device error, notifier could be set
in next successful kick request.

Fixes: 62c813706e41 ("vdpa/mlx5: map doorbell")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index c1a25becdd..0ef7ed0e4a 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -24,9 +24,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
 	uint64_t buf;
 	int nbytes;
+	int retry;
 
 	if (rte_intr_fd_get(virtq->intr_handle) < 0)
 		return;
-
-	do {
+	for (retry = 0; retry < 3; ++retry) {
 		nbytes = read(rte_intr_fd_get(virtq->intr_handle), &buf,
 			      8);
@@ -40,5 +40,7 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
 		}
 		break;
-	} while (1);
+	}
+	if (nbytes < 0)
+		return;
 	rte_write32(virtq->index, priv->virtq_db_addr);
 	if (virtq->notifier_state == MLX5_VDPA_NOTIFIER_STATE_DISABLED) {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.906993168 +0100
+++ 0012-vdpa-mlx5-fix-dead-loop-when-process-interrupted.patch	2022-05-25 17:26:58.545828299 +0100
@@ -1 +1 @@
-From 301ef4a18586ae1763206d7e75d9eddb58a7d05e Mon Sep 17 00:00:00 2001
+From d24d6395d642237cc9177c270eacb6b57f8b9c14 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 2e517beda2..2696d54b41 100644
+index c1a25becdd..0ef7ed0e4a 100644


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

* patch 'net/dpaa: fix event queue detach' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (10 preceding siblings ...)
  2022-05-25 16:28 ` patch 'vdpa/mlx5: fix dead loop when process interrupted' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'doc: update matching versions in ice guide' " Kevin Traynor
                   ` (41 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 82ccc27de556076d4b4baab55da6599bab141119 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 22 Apr 2022 10:27:29 +0530
Subject: [PATCH] net/dpaa: fix event queue detach

[ upstream commit ee6647e0169bae7bb3d3a53c309cd280e4740e11 ]

Calling the correct qman queue free APIs to de-attach the queue.

Fixes: 5e7455931442 ("net/dpaa: support Rx queue configurations with eventdev")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 2c2c4e4ebb..9847ca1be1 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1202,5 +1202,5 @@ dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id)
 {
-	struct qm_mcc_initfq opts;
+	struct qm_mcc_initfq opts = {0};
 	int ret;
 	u32 flags = 0;
@@ -1208,15 +1208,9 @@ dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 	struct qman_fq *rxq = &dpaa_intf->rx_queues[eth_rx_queue_id];
 
-	dpaa_poll_queue_default_config(&opts);
-
-	if (dpaa_intf->cgr_rx) {
-		opts.we_mask |= QM_INITFQ_WE_CGID;
-		opts.fqd.cgid = dpaa_intf->cgr_rx[eth_rx_queue_id].cgrid;
-		opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
-	}
-
+	qman_retire_fq(rxq, NULL);
+	qman_oos_fq(rxq);
 	ret = qman_init_fq(rxq, flags, &opts);
 	if (ret) {
-		DPAA_PMD_ERR("init rx fqid %d failed with ret: %d",
+		DPAA_PMD_ERR("detach rx fqid %d failed with ret: %d",
 			     rxq->fqid, ret);
 	}
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.926290460 +0100
+++ 0013-net-dpaa-fix-event-queue-detach.patch	2022-05-25 17:26:58.547828302 +0100
@@ -1 +1 @@
-From ee6647e0169bae7bb3d3a53c309cd280e4740e11 Mon Sep 17 00:00:00 2001
+From 82ccc27de556076d4b4baab55da6599bab141119 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee6647e0169bae7bb3d3a53c309cd280e4740e11 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index bddb3bb15c..e5a072cf49 100644
+index 2c2c4e4ebb..9847ca1be1 100644
@@ -21 +22 @@
-@@ -1212,5 +1212,5 @@ dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
+@@ -1202,5 +1202,5 @@ dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
@@ -28 +29 @@
-@@ -1218,15 +1218,9 @@ dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
+@@ -1208,15 +1208,9 @@ dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,


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

* patch 'doc: update matching versions in ice guide' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (11 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/dpaa: fix event queue detach' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bonding: fix stopping non-active slaves' " Kevin Traynor
                   ` (40 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From e856fe9aa6ab5a903003fdd81bac8d4b4cceb9b0 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Tue, 26 Apr 2022 13:36:29 +0800
Subject: [PATCH] doc: update matching versions in ice guide

[ upstream commit 93866b3b68beafae69818d02d2fecec209ef18c8 ]

Add recommended matching list for ice PMD in DPDK 22.03.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/ice.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index a1780c46c3..6b903b9bbc 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -63,4 +63,6 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re
    |    21.11  |     1.7.16    |      1.3.27     |  1.3.31   |    1.3.7     |    3.1    |
    +-----------+---------------+-----------------+-----------+--------------+-----------+
+   |    22.03  |     1.8.3     |      1.3.28     |  1.3.35   |    1.3.8     |    3.2    |
+   +-----------+---------------+-----------------+-----------+--------------+-----------+
 
 Pre-Installation Configuration
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.947414738 +0100
+++ 0014-doc-update-matching-versions-in-ice-guide.patch	2022-05-25 17:26:58.547828302 +0100
@@ -1 +1 @@
-From 93866b3b68beafae69818d02d2fecec209ef18c8 Mon Sep 17 00:00:00 2001
+From e856fe9aa6ab5a903003fdd81bac8d4b4cceb9b0 Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-Add recommended matching list for ice PMD in DPDK 22.03.
+[ upstream commit 93866b3b68beafae69818d02d2fecec209ef18c8 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+Add recommended matching list for ice PMD in DPDK 22.03.


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

* patch 'net/bonding: fix stopping non-active slaves' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (12 preceding siblings ...)
  2022-05-25 16:28 ` patch 'doc: update matching versions in ice guide' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bonding: fix slave stop and remove on port close' " Kevin Traynor
                   ` (39 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 5a8afc69afabd3c69efbc1b0c048f31d06f7d875 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 3 May 2022 18:02:13 +0800
Subject: [PATCH] net/bonding: fix stopping non-active slaves

[ upstream commit f5e72e8e8d57b331baf1a86d15eb7fae921f57fb ]

When stopping a bonded port, all slaves should be stopped. But only
active slaves are stopped.
So fix by stopping all slave ports and later do "deactivate_slave()" for
active slaves.

Fixes: 0911d4ec0183 ("net/bonding: fix crash when stopping mode 4 port")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index e8a9341777..121a6b3e4e 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2119,16 +2119,18 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 	for (i = 0; i < internals->slave_count; i++) {
 		uint16_t slave_id = internals->slaves[i].port_id;
+
+		internals->slaves[i].last_link_status = 0;
+		ret = rte_eth_dev_stop(slave_id);
+		if (ret != 0) {
+			RTE_BOND_LOG(ERR, "Failed to stop device on port %u",
+				     slave_id);
+			return ret;
+		}
+
+		/* active slaves need to be deactivated. */
 		if (find_slave_by_id(internals->active_slaves,
 				internals->active_slave_count, slave_id) !=
-						internals->active_slave_count) {
-			internals->slaves[i].last_link_status = 0;
-			ret = rte_eth_dev_stop(slave_id);
-			if (ret != 0) {
-				RTE_BOND_LOG(ERR, "Failed to stop device on port %u",
-					     slave_id);
-				return ret;
-			}
+					internals->active_slave_count)
 			deactivate_slave(eth_dev, slave_id);
-		}
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.966423692 +0100
+++ 0015-net-bonding-fix-stopping-non-active-slaves.patch	2022-05-25 17:26:58.549828305 +0100
@@ -1 +1 @@
-From f5e72e8e8d57b331baf1a86d15eb7fae921f57fb Mon Sep 17 00:00:00 2001
+From 5a8afc69afabd3c69efbc1b0c048f31d06f7d875 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5e72e8e8d57b331baf1a86d15eb7fae921f57fb ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5cbe89031b..605fc2ffb5 100644
+index e8a9341777..121a6b3e4e 100644


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

* patch 'net/bonding: fix slave stop and remove on port close' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (13 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bonding: fix stopping non-active slaves' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/tap: fix interrupt handler freeing' " Kevin Traynor
                   ` (38 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 41c0ba64de669224f9b830a35b03966cc91d6a5e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 3 May 2022 18:02:14 +0800
Subject: [PATCH] net/bonding: fix slave stop and remove on port close

[ upstream commit 1c5c6cd85f8cab2af92d265b6c7671df0b82e6fb ]

All slaves will be stopped and removed when closing a bonded port.
But the while loop can not end if both rte_eth_dev_stop and
rte_eth_bond_slave_remove fails, runs infinitely.
This is because the skipped slave port counted in both function failures
but it should be counted only one.

Fixing by not continue to process in the loop after first failure.

Fixes: fb0379bc5db3 ("net/bonding: check stop call status")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 121a6b3e4e..5257d4c07b 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2157,4 +2157,5 @@ bond_ethdev_close(struct rte_eth_dev *dev)
 				     port_id);
 			skipped++;
+			continue;
 		}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:58.988184905 +0100
+++ 0016-net-bonding-fix-slave-stop-and-remove-on-port-close.patch	2022-05-25 17:26:58.551828308 +0100
@@ -1 +1 @@
-From 1c5c6cd85f8cab2af92d265b6c7671df0b82e6fb Mon Sep 17 00:00:00 2001
+From 41c0ba64de669224f9b830a35b03966cc91d6a5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c5c6cd85f8cab2af92d265b6c7671df0b82e6fb ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 605fc2ffb5..f0668a636f 100644
+index 121a6b3e4e..5257d4c07b 100644


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

* patch 'net/tap: fix interrupt handler freeing' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (14 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bonding: fix slave stop and remove on port close' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'ethdev: fix build with vtune option' " Kevin Traynor
                   ` (37 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Quentin Armitage; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From b839853e83ea8505b040aa1fd7c0456223f4451d Mon Sep 17 00:00:00 2001
From: Quentin Armitage <quentin@armitage.org.uk>
Date: Tue, 3 May 2022 16:27:32 +0100
Subject: [PATCH] net/tap: fix interrupt handler freeing

[ upstream commit 0809d870fc22916627ec5e177d4c138c12196321 ]

rte_pmd_tun/tap_probe() allocates pmd->intr_handle in eth_dev_tap_create()
and it should not be freed until rte_pmd_tap_remove() is called.

Inspection of tap_rx_intr_vec_set() shows that the call to
tap_tx_intr_vec_uninstall() was calling rte_intr_instance_free() but
tap_tx_intr_vec_install() can then be immediately called, and this then
uses pmd->intr_handle without it being reallocated.

Move rte_intr_instance_free() call from tap_tx_intr_vec_uninstall()
to rte_pmd_tap_remove().

Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/tap/rte_eth_tap.c | 2 ++
 drivers/net/tap/tap_intr.c    | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index b0c09956de..919968af44 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1206,4 +1206,6 @@ tap_dev_close(struct rte_eth_dev *dev)
 		tuntap_types[internals->type], rte_socket_id());
 
+	rte_intr_instance_free(internals->intr_handle);
+
 	if (internals->ioctl_sock != -1) {
 		close(internals->ioctl_sock);
diff --git a/drivers/net/tap/tap_intr.c b/drivers/net/tap/tap_intr.c
index 56c343acea..a9097def1a 100644
--- a/drivers/net/tap/tap_intr.c
+++ b/drivers/net/tap/tap_intr.c
@@ -35,6 +35,4 @@ tap_rx_intr_vec_uninstall(struct rte_eth_dev *dev)
 	rte_intr_vec_list_free(intr_handle);
 	rte_intr_nb_efd_set(intr_handle, 0);
-
-	rte_intr_instance_free(intr_handle);
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.008877079 +0100
+++ 0017-net-tap-fix-interrupt-handler-freeing.patch	2022-05-25 17:26:58.553828311 +0100
@@ -1 +1 @@
-From 0809d870fc22916627ec5e177d4c138c12196321 Mon Sep 17 00:00:00 2001
+From b839853e83ea8505b040aa1fd7c0456223f4451d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0809d870fc22916627ec5e177d4c138c12196321 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index bc3d56a311..5495818be6 100644
+index b0c09956de..919968af44 100644
@@ -31 +32 @@
-@@ -1214,4 +1214,6 @@ tap_dev_close(struct rte_eth_dev *dev)
+@@ -1206,4 +1206,6 @@ tap_dev_close(struct rte_eth_dev *dev)


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

* patch 'ethdev: fix build with vtune option' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (15 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/tap: fix interrupt handler freeing' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: fix order of clearing imissed register in PF' " Kevin Traynor
                   ` (36 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Aman Singh; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From aa2c6d3f6980fcb06a56d208be485d0b3647efeb Mon Sep 17 00:00:00 2001
From: Aman Singh <aman.deep.singh@intel.com>
Date: Thu, 5 May 2022 18:31:38 +0530
Subject: [PATCH] ethdev: fix build with vtune option

[ upstream commit 8c9e97ddbedd735f70a2e6b1d5d4ffef02a9b0b9 ]

When VTune profile option is enabled, compilation error is seen.

Bugzilla ID: 1004
Fixes: f9bdee267ab8 ("ethdev: hide internal structures")

Signed-off-by: Aman Singh <aman.deep.singh@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/ethdev/ethdev_profile.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ethdev/ethdev_profile.h b/lib/ethdev/ethdev_profile.h
index e5ee4df824..881aec1273 100644
--- a/lib/ethdev/ethdev_profile.h
+++ b/lib/ethdev/ethdev_profile.h
@@ -7,4 +7,5 @@
 
 #include "rte_ethdev.h"
+#include "ethdev_driver.h"
 
 /**
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.030018800 +0100
+++ 0018-ethdev-fix-build-with-vtune-option.patch	2022-05-25 17:26:58.553828311 +0100
@@ -1 +1 @@
-From 8c9e97ddbedd735f70a2e6b1d5d4ffef02a9b0b9 Mon Sep 17 00:00:00 2001
+From aa2c6d3f6980fcb06a56d208be485d0b3647efeb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c9e97ddbedd735f70a2e6b1d5d4ffef02a9b0b9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix order of clearing imissed register in PF' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (16 preceding siblings ...)
  2022-05-25 16:28 ` patch 'ethdev: fix build with vtune option' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: fix MAC and queues HW statistics overflow' " Kevin Traynor
                   ` (35 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d96ee7bac0d96caa6d53ccc31817273d7b9cb7aa Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:01 +0800
Subject: [PATCH] net/hns3: fix order of clearing imissed register in PF

[ upstream commit 1a1de9879f58b4fd202ecd481c56ae9777207fe9 ]

Clearing imissed registers in PF hardware depends on the
'drop_stats_mode' in struct hns3_hw. The variable is initialized after
the "hns3_get_configuration". But, in current code, the clearing
operation runs before the function.
So this patch fixes this order. In addition, this patch extracts a
public function to initialize and uninitialize statistics to improve the
maintainability of these codes.

Fixes: 3e9f3042d7c8 ("net/hns3: add imissed packet stats")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 13 +++----------
 drivers/net/hns3/hns3_ethdev_vf.c | 13 +++----------
 drivers/net/hns3/hns3_stats.c     | 27 ++++++++++++++++++++++++---
 drivers/net/hns3/hns3_stats.h     |  5 ++---
 4 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2de1325d4b..a33ab1a656 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4650,11 +4650,4 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
 	}
 
-	/* Hardware statistics of imissed registers cleared. */
-	ret = hns3_update_imissed_stats(hw, true);
-	if (ret) {
-		hns3_err(hw, "clear imissed stats failed, ret = %d", ret);
-		goto err_cmd_init;
-	}
-
 	hns3_config_all_msix_error(hw, true);
 
@@ -4682,5 +4675,5 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
 	}
 
-	ret = hns3_tqp_stats_init(hw);
+	ret = hns3_stats_init(hw);
 	if (ret)
 		goto err_get_config;
@@ -4728,5 +4721,5 @@ err_fdir:
 	hns3_uninit_umv_space(hw);
 err_init_hw:
-	hns3_tqp_stats_uninit(hw);
+	hns3_stats_uninit(hw);
 err_get_config:
 	hns3_pf_disable_irq0(hw);
@@ -4762,5 +4755,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
 	hns3_fdir_filter_uninit(hns);
 	hns3_uninit_umv_space(hw);
-	hns3_tqp_stats_uninit(hw);
+	hns3_stats_uninit(hw);
 	hns3_config_mac_tnl_int(hw, false);
 	hns3_pf_disable_irq0(hw);
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 3be46c8f0a..c5252035a0 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1559,15 +1559,8 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 	}
 
-	ret = hns3_tqp_stats_init(hw);
+	ret = hns3_stats_init(hw);
 	if (ret)
 		goto err_get_config;
 
-	/* Hardware statistics of imissed registers cleared. */
-	ret = hns3_update_imissed_stats(hw, true);
-	if (ret) {
-		hns3_err(hw, "clear imissed stats failed, ret = %d", ret);
-		goto err_set_tc_queue;
-	}
-
 	ret = hns3vf_set_tc_queue_mapping(hns, hw->tqps_num, hw->tqps_num);
 	if (ret) {
@@ -1597,5 +1590,5 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 
 err_set_tc_queue:
-	hns3_tqp_stats_uninit(hw);
+	hns3_stats_uninit(hw);
 
 err_get_config:
@@ -1628,5 +1621,5 @@ hns3vf_uninit_vf(struct rte_eth_dev *eth_dev)
 	(void)hns3vf_set_promisc_mode(hw, false, false, false);
 	hns3_flow_uninit(eth_dev);
-	hns3_tqp_stats_uninit(hw);
+	hns3_stats_uninit(hw);
 	hns3vf_disable_irq0(hw);
 	rte_intr_disable(pci_dev->intr_handle);
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 806720faff..e4a5dcf2f8 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -541,5 +541,5 @@ hns3_update_port_tx_ssu_drop_stats(struct hns3_hw *hw)
 }
 
-int
+static int
 hns3_update_imissed_stats(struct hns3_hw *hw, bool is_clear)
 {
@@ -1477,5 +1477,5 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 }
 
-int
+static int
 hns3_tqp_stats_init(struct hns3_hw *hw)
 {
@@ -1501,5 +1501,5 @@ hns3_tqp_stats_init(struct hns3_hw *hw)
 }
 
-void
+static void
 hns3_tqp_stats_uninit(struct hns3_hw *hw)
 {
@@ -1522,2 +1522,23 @@ hns3_tqp_stats_clear(struct hns3_hw *hw)
 	memset(stats->rcb_tx_ring_pktnum, 0, sizeof(uint64_t) * hw->tqps_num);
 }
+
+int
+hns3_stats_init(struct hns3_hw *hw)
+{
+	int ret;
+
+	/* Hardware statistics of imissed registers cleared. */
+	ret = hns3_update_imissed_stats(hw, true);
+	if (ret) {
+		hns3_err(hw, "clear imissed stats failed, ret = %d", ret);
+		return ret;
+	}
+
+	return hns3_tqp_stats_init(hw);
+}
+
+void
+hns3_stats_uninit(struct hns3_hw *hw)
+{
+	hns3_tqp_stats_uninit(hw);
+}
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index c81d351082..e89dc97632 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -162,7 +162,6 @@ int hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 				    uint32_t size);
 int hns3_stats_reset(struct rte_eth_dev *dev);
-int hns3_tqp_stats_init(struct hns3_hw *hw);
-void hns3_tqp_stats_uninit(struct hns3_hw *hw);
-int hns3_update_imissed_stats(struct hns3_hw *hw, bool is_clear);
+int hns3_stats_init(struct hns3_hw *hw);
+void hns3_stats_uninit(struct hns3_hw *hw);
 int hns3_query_mac_stats_reg_num(struct hns3_hw *hw);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.048756960 +0100
+++ 0019-net-hns3-fix-order-of-clearing-imissed-register-in-P.patch	2022-05-25 17:26:58.561828323 +0100
@@ -1 +1 @@
-From 1a1de9879f58b4fd202ecd481c56ae9777207fe9 Mon Sep 17 00:00:00 2001
+From d96ee7bac0d96caa6d53ccc31817273d7b9cb7aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1a1de9879f58b4fd202ecd481c56ae9777207fe9 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 4e089e682f..5aed7046d8 100644
+index 2de1325d4b..a33ab1a656 100644
@@ -30 +31 @@
-@@ -4623,11 +4623,4 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
+@@ -4650,11 +4650,4 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
@@ -42 +43 @@
-@@ -4655,5 +4648,5 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
+@@ -4682,5 +4675,5 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
@@ -49 +50 @@
-@@ -4701,5 +4694,5 @@ err_fdir:
+@@ -4728,5 +4721,5 @@ err_fdir:
@@ -56 +57 @@
-@@ -4735,5 +4728,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
+@@ -4762,5 +4755,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
@@ -64 +65 @@
-index 9091706fe5..9e9fdc4144 100644
+index 3be46c8f0a..c5252035a0 100644
@@ -67 +68 @@
-@@ -1511,15 +1511,8 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
+@@ -1559,15 +1559,8 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
@@ -82 +83 @@
- 	ret = hns3_queue_to_tc_mapping(hw, hw->tqps_num, hw->tqps_num);
+ 	ret = hns3vf_set_tc_queue_mapping(hns, hw->tqps_num, hw->tqps_num);
@@ -84 +85 @@
-@@ -1549,5 +1542,5 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
+@@ -1597,5 +1590,5 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
@@ -91 +92 @@
-@@ -1580,5 +1573,5 @@ hns3vf_uninit_vf(struct rte_eth_dev *eth_dev)
+@@ -1628,5 +1621,5 @@ hns3vf_uninit_vf(struct rte_eth_dev *eth_dev)


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

* patch 'net/hns3: fix MAC and queues HW statistics overflow' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (17 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: fix order of clearing imissed register in PF' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: fix pseudo-sharing between threads' " Kevin Traynor
                   ` (34 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 827f72e8ce2c02527469ab958e9be08b7b12355b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:02 +0800
Subject: [PATCH] net/hns3: fix MAC and queues HW statistics overflow

[ upstream commit a65342d9d5d25cf0a9d44388325e2251daa83eba ]

The MAC and queues statistics are 32-bit registers in hardware. If
hardware statistics are not obtained for a long time, these statistics
will be overflow.
So PF and VF driver have to periodically obtain and save these
statistics. Since the periodical task and the stats API are in different
threads, we introduce a statistics lock to protect the statistics.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |   6 +-
 drivers/net/hns3/hns3_ethdev.h    |   6 ++
 drivers/net/hns3/hns3_ethdev_vf.c |   6 +-
 drivers/net/hns3/hns3_stats.c     | 144 +++++++++++++++++++++---------
 drivers/net/hns3/hns3_stats.h     |   1 +
 5 files changed, 116 insertions(+), 47 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index a33ab1a656..80a5aed426 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4392,8 +4392,10 @@ hns3_service_handler(void *param)
 	struct hns3_hw *hw = &hns->hw;
 
-	if (!hns3_is_reset_pending(hns))
+	if (!hns3_is_reset_pending(hns)) {
 		hns3_update_linkstatus_and_event(hw, true);
-	else
+		hns3_update_hw_stats(hw);
+	} else {
 		hns3_warn(hw, "Cancel the query when reset is pending");
+	}
 
 	rte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, eth_dev);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 0e12d054e4..952434c864 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -506,4 +506,10 @@ struct hns3_hw {
 	struct hns3_rx_missed_stats imissed_stats;
 	uint64_t oerror_stats;
+	/*
+	 * The lock is used to protect statistics update in stats APIs and
+	 * periodic task.
+	 */
+	rte_spinlock_t stats_lock;
+
 	uint32_t fw_version;
 	uint16_t pf_vf_if_version;  /* version of communication interface */
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index c5252035a0..7ad37b08d2 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1386,8 +1386,10 @@ hns3vf_service_handler(void *param)
 	 * pending, and if so, abandon the query.
 	 */
-	if (!hns3vf_is_reset_pending(hns))
+	if (!hns3vf_is_reset_pending(hns)) {
 		hns3vf_request_link_info(hw);
-	else
+		hns3_update_hw_stats(hw);
+	} else {
 		hns3_warn(hw, "Cancel the query when reset is pending");
+	}
 
 	rte_eal_alarm_set(HNS3VF_SERVICE_INTERVAL, hns3vf_service_handler,
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index e4a5dcf2f8..2799ff4432 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -585,4 +585,26 @@ hns3_update_oerror_stats(struct hns3_hw *hw, bool is_clear)
 }
 
+static void
+hns3_rcb_rx_ring_stats_get(struct hns3_rx_queue *rxq,
+			   struct hns3_tqp_stats *stats)
+{
+	uint32_t cnt;
+
+	cnt = hns3_read_dev(rxq, HNS3_RING_RX_PKTNUM_RECORD_REG);
+	stats->rcb_rx_ring_pktnum_rcd += cnt;
+	stats->rcb_rx_ring_pktnum[rxq->queue_id] += cnt;
+}
+
+static void
+hns3_rcb_tx_ring_stats_get(struct hns3_tx_queue *txq,
+			   struct hns3_tqp_stats *stats)
+{
+	uint32_t cnt;
+
+	cnt = hns3_read_dev(txq, HNS3_RING_TX_PKTNUM_RECORD_REG);
+	stats->rcb_tx_ring_pktnum_rcd += cnt;
+	stats->rcb_tx_ring_pktnum[txq->queue_id] += cnt;
+}
+
 /*
  * Query tqp tx queue statistics ,opcode id: 0x0B03.
@@ -605,5 +627,4 @@ hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats)
 	struct hns3_rx_queue *rxq;
 	struct hns3_tx_queue *txq;
-	uint64_t cnt;
 	uint16_t i;
 	int ret;
@@ -612,7 +633,6 @@ hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats)
 	ret = hns3_update_imissed_stats(hw, false);
 	if (ret) {
-		hns3_err(hw, "update imissed stats failed, ret = %d",
-			 ret);
-		return ret;
+		hns3_err(hw, "update imissed stats failed, ret = %d", ret);
+		goto out;
 	}
 	rte_stats->imissed = imissed_stats->rpu_rx_drop_cnt +
@@ -625,13 +645,10 @@ hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats)
 			continue;
 
-		cnt = hns3_read_dev(rxq, HNS3_RING_RX_PKTNUM_RECORD_REG);
-		/*
-		 * Read hardware and software in adjacent positions to minimize
-		 * the timing variance.
-		 */
+		rte_spinlock_lock(&hw->stats_lock);
+		hns3_rcb_rx_ring_stats_get(rxq, stats);
+		rte_spinlock_unlock(&hw->stats_lock);
+
 		rte_stats->ierrors += rxq->err_stats.l2_errors +
 				      rxq->err_stats.pkt_len_errors;
-		stats->rcb_rx_ring_pktnum_rcd += cnt;
-		stats->rcb_rx_ring_pktnum[i] += cnt;
 		rte_stats->ibytes += rxq->basic_stats.bytes;
 	}
@@ -643,7 +660,7 @@ hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats)
 			continue;
 
-		cnt = hns3_read_dev(txq, HNS3_RING_TX_PKTNUM_RECORD_REG);
-		stats->rcb_tx_ring_pktnum_rcd += cnt;
-		stats->rcb_tx_ring_pktnum[i] += cnt;
+		rte_spinlock_lock(&hw->stats_lock);
+		hns3_rcb_tx_ring_stats_get(txq, stats);
+		rte_spinlock_unlock(&hw->stats_lock);
 		rte_stats->obytes += txq->basic_stats.bytes;
 	}
@@ -651,7 +668,6 @@ hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats)
 	ret = hns3_update_oerror_stats(hw, false);
 	if (ret) {
-		hns3_err(hw, "update oerror stats failed, ret = %d",
-			 ret);
-		return ret;
+		hns3_err(hw, "update oerror stats failed, ret = %d", ret);
+		goto out;
 	}
 	rte_stats->oerrors = hw->oerror_stats;
@@ -668,6 +684,6 @@ hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats)
 		rte_stats->oerrors;
 	rte_stats->rx_nombuf = eth_dev->data->rx_mbuf_alloc_failed;
-
-	return 0;
+out:
+	return ret;
 }
 
@@ -689,5 +705,5 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 	if (ret) {
 		hns3_err(hw, "clear imissed stats failed, ret = %d", ret);
-		return ret;
+		goto out;
 	}
 
@@ -698,7 +714,6 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 	ret = hns3_update_oerror_stats(hw, true);
 	if (ret) {
-		hns3_err(hw, "clear oerror stats failed, ret = %d",
-			 ret);
-		return ret;
+		hns3_err(hw, "clear oerror stats failed, ret = %d", ret);
+		goto out;
 	}
 
@@ -718,4 +733,5 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 			continue;
 
+		rte_spinlock_lock(&hw->stats_lock);
 		memset(&rxq->basic_stats, 0,
 				sizeof(struct hns3_rx_basic_stats));
@@ -725,4 +741,5 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 		rxq->err_stats.pkt_len_errors = 0;
 		rxq->err_stats.l2_errors = 0;
+		rte_spinlock_unlock(&hw->stats_lock);
 	}
 
@@ -733,4 +750,5 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 			continue;
 
+		rte_spinlock_lock(&hw->stats_lock);
 		memset(&txq->basic_stats, 0,
 				sizeof(struct hns3_tx_basic_stats));
@@ -738,9 +756,12 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 		/* This register is read-clear */
 		(void)hns3_read_dev(txq, HNS3_RING_TX_PKTNUM_RECORD_REG);
+		rte_spinlock_unlock(&hw->stats_lock);
 	}
 
+	rte_spinlock_lock(&hw->stats_lock);
 	hns3_tqp_stats_clear(hw);
-
-	return 0;
+	rte_spinlock_unlock(&hw->stats_lock);
+out:
+	return ret;
 }
 
@@ -909,5 +930,4 @@ hns3_rxq_basic_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	struct hns3_rx_queue *rxq;
 	uint16_t i, j;
-	uint32_t cnt;
 	char *val;
 
@@ -917,14 +937,8 @@ hns3_rxq_basic_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 			continue;
 
-		cnt = hns3_read_dev(rxq, HNS3_RING_RX_PKTNUM_RECORD_REG);
-		/*
-		 * Read hardware and software in adjacent positions to minimize
-		 * the time difference.
-		 */
+		hns3_rcb_rx_ring_stats_get(rxq, stats);
 		rxq_stats = &rxq->basic_stats;
 		rxq_stats->errors = rxq->err_stats.l2_errors +
 					rxq->err_stats.pkt_len_errors;
-		stats->rcb_rx_ring_pktnum_rcd += cnt;
-		stats->rcb_rx_ring_pktnum[i] += cnt;
 
 		/*
@@ -956,5 +970,4 @@ hns3_txq_basic_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	struct hns3_tx_queue *txq;
 	uint16_t i, j;
-	uint32_t cnt;
 	char *val;
 
@@ -964,7 +977,5 @@ hns3_txq_basic_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 			continue;
 
-		cnt = hns3_read_dev(txq, HNS3_RING_TX_PKTNUM_RECORD_REG);
-		stats->rcb_tx_ring_pktnum_rcd += cnt;
-		stats->rcb_tx_ring_pktnum[i] += cnt;
+		hns3_rcb_tx_ring_stats_get(txq, stats);
 
 		txq_stats = &txq->basic_stats;
@@ -1051,4 +1062,5 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	count = 0;
 
+	rte_spinlock_lock(&hw->stats_lock);
 	hns3_tqp_basic_stats_get(dev, xstats, &count);
 
@@ -1058,4 +1070,5 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 		if (ret < 0) {
 			hns3_err(hw, "Update Mac stats fail : %d", ret);
+			rte_spinlock_unlock(&hw->stats_lock);
 			return ret;
 		}
@@ -1069,9 +1082,9 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 		}
 	}
+	rte_spinlock_unlock(&hw->stats_lock);
 
 	ret = hns3_update_imissed_stats(hw, false);
 	if (ret) {
-		hns3_err(hw, "update imissed stats failed, ret = %d",
-			 ret);
+		hns3_err(hw, "update imissed stats failed, ret = %d", ret);
 		return ret;
 	}
@@ -1102,6 +1115,8 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	}
 
+	rte_spinlock_lock(&hw->stats_lock);
 	hns3_tqp_dfx_stats_get(dev, xstats, &count);
 	hns3_queue_stats_get(dev, xstats, &count);
+	rte_spinlock_unlock(&hw->stats_lock);
 
 	return count;
@@ -1454,4 +1469,5 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
@@ -1461,4 +1477,5 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 		return ret;
 
+	rte_spinlock_lock(&hw->stats_lock);
 	hns3_tqp_dfx_stats_clear(dev);
 
@@ -1467,12 +1484,13 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 
 	if (hns->is_vf)
-		return 0;
+		goto out;
 
 	/* HW registers are cleared on read */
 	ret = hns3_mac_stats_reset(dev);
-	if (ret)
-		return ret;
 
-	return 0;
+out:
+	rte_spinlock_unlock(&hw->stats_lock);
+
+	return ret;
 }
 
@@ -1528,4 +1546,5 @@ hns3_stats_init(struct hns3_hw *hw)
 	int ret;
 
+	rte_spinlock_init(&hw->stats_lock);
 	/* Hardware statistics of imissed registers cleared. */
 	ret = hns3_update_imissed_stats(hw, true);
@@ -1543,2 +1562,41 @@ hns3_stats_uninit(struct hns3_hw *hw)
 	hns3_tqp_stats_uninit(hw);
 }
+
+static void
+hns3_update_queues_stats(struct hns3_hw *hw)
+{
+	struct rte_eth_dev_data *data = hw->data;
+	struct hns3_rx_queue *rxq;
+	struct hns3_tx_queue *txq;
+	uint16_t i;
+
+	for (i = 0; i < data->nb_rx_queues; i++) {
+		rxq = data->rx_queues[i];
+		if (rxq != NULL)
+			hns3_rcb_rx_ring_stats_get(rxq, &hw->tqp_stats);
+	}
+
+	for (i = 0; i < data->nb_tx_queues; i++) {
+		txq = data->tx_queues[i];
+		if (txq != NULL)
+			hns3_rcb_tx_ring_stats_get(txq, &hw->tqp_stats);
+	}
+}
+
+/*
+ * Some hardware statistics registers are not 64-bit. If hardware statistics are
+ * not obtained for a long time, these statistics may be reversed. This function
+ * is used to update these hardware statistics in periodic task.
+ */
+void
+hns3_update_hw_stats(struct hns3_hw *hw)
+{
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+
+	rte_spinlock_lock(&hw->stats_lock);
+	if (!hns->is_vf)
+		hns3_update_mac_stats(hw);
+
+	hns3_update_queues_stats(hw);
+	rte_spinlock_unlock(&hw->stats_lock);
+}
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index e89dc97632..b5cd6188b4 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -165,4 +165,5 @@ int hns3_stats_init(struct hns3_hw *hw);
 void hns3_stats_uninit(struct hns3_hw *hw);
 int hns3_query_mac_stats_reg_num(struct hns3_hw *hw);
+void hns3_update_hw_stats(struct hns3_hw *hw);
 
 #endif /* _HNS3_STATS_H_ */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.074623676 +0100
+++ 0020-net-hns3-fix-MAC-and-queues-HW-statistics-overflow.patch	2022-05-25 17:26:58.569828334 +0100
@@ -1 +1 @@
-From a65342d9d5d25cf0a9d44388325e2251daa83eba Mon Sep 17 00:00:00 2001
+From 827f72e8ce2c02527469ab958e9be08b7b12355b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a65342d9d5d25cf0a9d44388325e2251daa83eba ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 5aed7046d8..1d9b19d83e 100644
+index a33ab1a656..80a5aed426 100644
@@ -30 +31 @@
-@@ -4365,8 +4365,10 @@ hns3_service_handler(void *param)
+@@ -4392,8 +4392,10 @@ hns3_service_handler(void *param)
@@ -44 +45 @@
-index 75a89c3d1c..bb6ddd97ba 100644
+index 0e12d054e4..952434c864 100644
@@ -47 +48 @@
-@@ -504,4 +504,10 @@ struct hns3_hw {
+@@ -506,4 +506,10 @@ struct hns3_hw {
@@ -59 +60 @@
-index 9e9fdc4144..f641e0dc36 100644
+index c5252035a0..7ad37b08d2 100644
@@ -62 +63 @@
-@@ -1338,8 +1338,10 @@ hns3vf_service_handler(void *param)
+@@ -1386,8 +1386,10 @@ hns3vf_service_handler(void *param)


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

* patch 'net/hns3: fix pseudo-sharing between threads' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (18 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: fix MAC and queues HW statistics overflow' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: fix mbuf free on Tx done cleanup' " Kevin Traynor
                   ` (33 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 74089f471acd86f4267ed66e15a567feaf5f6576 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:03 +0800
Subject: [PATCH] net/hns3: fix pseudo-sharing between threads

[ upstream commit ec0147b5690e6cae2cc4555f78b87defee59c946 ]

Some fields in the end of 'struct hns3_rx_queue' and
'struct hns3_tx_queue' are not accessed in the I/O path.
But these fields may be accessed in other threads, which may lead to the
problem of cache pseudo-sharing of IO threads. This patch add a
cacheline alignment to avoid it.

Fixes: 9261fd3caf1f ("net/hns3: improve IO path data cache usage")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index e202eb9c30..0e412d07b3 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -350,5 +350,5 @@ struct hns3_rx_queue {
 	 * placed at the end.
 	 */
-	void *io_base;
+	void *io_base __rte_cache_aligned;
 	struct hns3_adapter *hns;
 	uint64_t rx_ring_phys_addr; /* RX ring DMA address */
@@ -524,5 +524,5 @@ struct hns3_tx_queue {
 	 * placed at the end.
 	 */
-	void *io_base;
+	void *io_base __rte_cache_aligned;
 	struct hns3_adapter *hns;
 	uint64_t tx_ring_phys_addr; /* TX ring DMA address */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.099646534 +0100
+++ 0021-net-hns3-fix-pseudo-sharing-between-threads.patch	2022-05-25 17:26:58.569828334 +0100
@@ -1 +1 @@
-From ec0147b5690e6cae2cc4555f78b87defee59c946 Mon Sep 17 00:00:00 2001
+From 74089f471acd86f4267ed66e15a567feaf5f6576 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec0147b5690e6cae2cc4555f78b87defee59c946 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a000318357..62efc854e4 100644
+index e202eb9c30..0e412d07b3 100644
@@ -25 +26 @@
-@@ -349,5 +349,5 @@ struct hns3_rx_queue {
+@@ -350,5 +350,5 @@ struct hns3_rx_queue {
@@ -32 +33 @@
-@@ -522,5 +522,5 @@ struct hns3_tx_queue {
+@@ -524,5 +524,5 @@ struct hns3_tx_queue {


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

* patch 'net/hns3: fix mbuf free on Tx done cleanup' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (19 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: fix pseudo-sharing between threads' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: fix RSS disable' " Kevin Traynor
                   ` (32 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 8b00917c0834f462dcc79c0c31ff3a10d6f4f310 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 5 May 2022 20:27:04 +0800
Subject: [PATCH] net/hns3: fix mbuf free on Tx done cleanup

[ upstream commit 2d287ea3c2301219c201617df15efa161deabf76 ]

Currently, the hns3 PMD may free more mbufs than free_cnt parameter,
this is an incorrect implementation. This patch fixes it.

Fixes: 0b77e8f3d364 ("net/hns3: optimize Tx performance")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index c43131cac6..7c184a5850 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4613,5 +4613,5 @@ static int
 hns3_tx_done_cleanup_full(struct hns3_tx_queue *txq, uint32_t free_cnt)
 {
-	uint16_t round_free_cnt;
+	uint16_t round_cnt;
 	uint32_t idx;
 
@@ -4622,11 +4622,11 @@ hns3_tx_done_cleanup_full(struct hns3_tx_queue *txq, uint32_t free_cnt)
 		return 0;
 
-	round_free_cnt = roundup(free_cnt, txq->tx_rs_thresh);
-	for (idx = 0; idx < round_free_cnt; idx += txq->tx_rs_thresh) {
+	round_cnt = rounddown(free_cnt, txq->tx_rs_thresh);
+	for (idx = 0; idx < round_cnt; idx += txq->tx_rs_thresh) {
 		if (hns3_tx_free_useless_buffer(txq) != 0)
 			break;
 	}
 
-	return RTE_MIN(idx, free_cnt);
+	return idx;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.118706255 +0100
+++ 0022-net-hns3-fix-mbuf-free-on-Tx-done-cleanup.patch	2022-05-25 17:26:58.572828339 +0100
@@ -1 +1 @@
-From 2d287ea3c2301219c201617df15efa161deabf76 Mon Sep 17 00:00:00 2001
+From 8b00917c0834f462dcc79c0c31ff3a10d6f4f310 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d287ea3c2301219c201617df15efa161deabf76 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a28de06dfd..0c91e4721e 100644
+index c43131cac6..7c184a5850 100644
@@ -22 +23 @@
-@@ -4596,5 +4596,5 @@ static int
+@@ -4613,5 +4613,5 @@ static int
@@ -29 +30 @@
-@@ -4605,11 +4605,11 @@ hns3_tx_done_cleanup_full(struct hns3_tx_queue *txq, uint32_t free_cnt)
+@@ -4622,11 +4622,11 @@ hns3_tx_done_cleanup_full(struct hns3_tx_queue *txq, uint32_t free_cnt)


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

* patch 'net/hns3: fix RSS disable' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (20 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: fix mbuf free on Tx done cleanup' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: fix rollback on RSS hash update' " Kevin Traynor
                   ` (31 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 8c193c0b4c2f7a906dc6d311638b139277d605f8 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:05 +0800
Subject: [PATCH] net/hns3: fix RSS disable

[ upstream commit 75ccc3f3d7fa06901d5b768448be4dc9f31f550a ]

Currently, hns3 PMD disable RSS by resetting redirection table when user
set rss_hf to 0 so as to all packets go to queue 0. The implementation
may cause following problems:
1) the same type packet may go to different queue on the case of
   disabling all tuples and partial tuples. The problem is determined by
   hardware design.
2) affect the configuration of redirection table and user experience.

For hns3 hardware, the packets with RSS disabled are always go to the
queue corresponding to first entry of the redirection table. Generally,
disable RSS should be implemented by disabling all tuples, This patch
fix the implementation.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c |  1 -
 drivers/net/hns3/hns3_flow.c   |  6 +--
 drivers/net/hns3/hns3_rss.c    | 97 +++++++---------------------------
 3 files changed, 20 insertions(+), 84 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 80a5aed426..9992b64d4e 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2028,5 +2028,4 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	}
 
-	/* When RSS is not configured, redirect the packet queue 0 */
 	if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 5fc80480ba..34fcc3b49e 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1399,11 +1399,7 @@ hns3_disable_rss(struct hns3_hw *hw)
 	int ret;
 
-	/* Redirected the redirection table to queue 0 */
-	ret = hns3_rss_reset_indir_table(hw);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, 0);
 	if (ret)
 		return ret;
-
-	/* Disable RSS */
-	hw->rss_info.conf.types = 0;
 	hw->rss_dis_flag = true;
 
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 1493b10f96..1c703952b9 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -238,29 +238,4 @@ hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key)
 }
 
-/*
- * Used to configure the tuple selection for RSS hash input.
- */
-static int
-hns3_rss_set_input_tuple(struct hns3_hw *hw)
-{
-	struct hns3_rss_conf *rss_config = &hw->rss_info;
-	struct hns3_rss_input_tuple_cmd *req;
-	struct hns3_cmd_desc desc_tuple;
-	int ret;
-
-	hns3_cmd_setup_basic_desc(&desc_tuple, HNS3_OPC_RSS_INPUT_TUPLE, false);
-
-	req = (struct hns3_rss_input_tuple_cmd *)desc_tuple.data;
-
-	req->tuple_field =
-		rte_cpu_to_le_64(rss_config->rss_tuple_sets.rss_tuple_fields);
-
-	ret = hns3_cmd_send(hw, &desc_tuple, 1);
-	if (ret)
-		hns3_err(hw, "Configure RSS input tuple mode failed %d", ret);
-
-	return ret;
-}
-
 /*
  * rss_indirection_table command function, opcode:0x0D07.
@@ -383,4 +358,6 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
 
 	tuple->rss_tuple_fields = rte_le_to_cpu_64(req->tuple_field);
+	/* Update supported flow types when set tuple success */
+	hw->rss_info.conf.types = rss_hf;
 
 	return 0;
@@ -403,5 +380,4 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets;
-	struct hns3_rss_conf *rss_cfg = &hw->rss_info;
 	uint8_t key_len = rss_conf->rss_key_len;
 	uint64_t rss_hf = rss_conf->rss_hf;
@@ -417,20 +393,4 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 		goto conf_err;
 
-	if (rss_cfg->conf.types && rss_hf == 0) {
-		/* Disable RSS, reset indirection table by local variable */
-		ret = hns3_rss_reset_indir_table(hw);
-		if (ret)
-			goto conf_err;
-	} else if (rss_hf && rss_cfg->conf.types == 0) {
-		/* Enable RSS, restore indirection table by hw's config */
-		ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
-					       hw->rss_ind_tbl_size);
-		if (ret)
-			goto conf_err;
-	}
-
-	/* Update supported flow types when set tuple success */
-	rss_cfg->conf.types = rss_hf;
-
 	if (key) {
 		if (key_len != HNS3_RSS_KEY_SIZE) {
@@ -698,5 +658,6 @@ hns3_config_rss(struct hns3_adapter *hns)
 	struct hns3_rss_conf *rss_cfg = &hw->rss_info;
 	uint8_t *hash_key = rss_cfg->key;
-	int ret, ret1;
+	uint64_t rss_hf;
+	int ret;
 
 	enum rte_eth_rx_mq_mode mq_mode = hw->data->dev_conf.rxmode.mq_mode;
@@ -714,8 +675,4 @@ hns3_config_rss(struct hns3_adapter *hns)
 	}
 
-	/* When RSS is off, redirect the packet queue 0 */
-	if (((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) == 0)
-		hns3_rss_uninit(hns);
-
 	/* Configure RSS hash algorithm and hash key offset */
 	ret = hns3_rss_set_algo_key(hw, hash_key);
@@ -723,40 +680,24 @@ hns3_config_rss(struct hns3_adapter *hns)
 		return ret;
 
-	/* Configure the tuple selection for RSS hash input */
-	ret = hns3_rss_set_input_tuple(hw);
+	ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
+				       hw->rss_ind_tbl_size);
 	if (ret)
 		return ret;
 
-	/*
-	 * When RSS is off, it doesn't need to configure rss redirection table
-	 * to hardware.
-	 */
-	if (((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)) {
-		ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
-					       hw->rss_ind_tbl_size);
-		if (ret)
-			goto rss_tuple_uninit;
-	}
-
 	ret = hns3_set_rss_tc_mode(hw);
 	if (ret)
-		goto rss_indir_table_uninit;
-
-	return ret;
-
-rss_indir_table_uninit:
-	if (((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)) {
-		ret1 = hns3_rss_reset_indir_table(hw);
-		if (ret1 != 0)
-			return ret;
-	}
-
-rss_tuple_uninit:
-	hns3_rss_tuple_uninit(hw);
-
-	/* Disable RSS */
-	hw->rss_info.conf.types = 0;
-
-	return ret;
+		return ret;
+
+	/*
+	 * When muli-queue RSS mode flag is not set or unsupported tuples are
+	 * set, disable all tuples.
+	 */
+	rss_hf = hw->rss_info.conf.types;
+	if (!((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) ||
+	    !(rss_hf & HNS3_ETH_RSS_SUPPORT))
+		rss_hf = 0;
+
+	return hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets,
+					    rss_hf);
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.141060472 +0100
+++ 0023-net-hns3-fix-RSS-disable.patch	2022-05-25 17:26:58.578828348 +0100
@@ -1 +1 @@
-From 75ccc3f3d7fa06901d5b768448be4dc9f31f550a Mon Sep 17 00:00:00 2001
+From 8c193c0b4c2f7a906dc6d311638b139277d605f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75ccc3f3d7fa06901d5b768448be4dc9f31f550a ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 1d9b19d83e..4d5a595aab 100644
+index 80a5aed426..9992b64d4e 100644
@@ -34 +35 @@
-@@ -2016,5 +2016,4 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2028,5 +2028,4 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -41 +42 @@
-index aba07aaa6f..feabac9f41 100644
+index 5fc80480ba..34fcc3b49e 100644
@@ -44 +45 @@
-@@ -1447,11 +1447,7 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1399,11 +1399,7 @@ hns3_disable_rss(struct hns3_hw *hw)


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

* patch 'net/hns3: fix rollback on RSS hash update' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (21 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: fix RSS disable' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: remove redundant RSS tuple field' " Kevin Traynor
                   ` (30 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 5a6fb3a977fb805a04b65ab8c2ba2401fc86abb8 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:06 +0800
Subject: [PATCH] net/hns3: fix rollback on RSS hash update

[ upstream commit 07f64b5f576a779c8c3df4ba45ad70c306dcb562 ]

The RSS tuple isn't restored when RSS key length is invalid or setting
algo key failed. This patch fixes it.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 1c703952b9..4b2c24ace4 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -377,7 +377,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 			 struct rte_eth_rss_conf *rss_conf)
 {
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets;
+	uint64_t rss_hf_bk = hw->rss_info.conf.types;
 	uint8_t key_len = rss_conf->rss_key_len;
 	uint64_t rss_hf = rss_conf->rss_hf;
@@ -388,19 +388,19 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 		return -EINVAL;
 
+	if (key && key_len != HNS3_RSS_KEY_SIZE) {
+		hns3_err(hw, "the hash key len(%u) is invalid, must be %u",
+			 key_len, HNS3_RSS_KEY_SIZE);
+		return -EINVAL;
+	}
+
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf);
 	if (ret)
-		goto conf_err;
+		goto set_tuple_fail;
 
 	if (key) {
-		if (key_len != HNS3_RSS_KEY_SIZE) {
-			hns3_err(hw, "The hash key len(%u) is invalid",
-				 key_len);
-			ret = -EINVAL;
-			goto conf_err;
-		}
 		ret = hns3_rss_set_algo_key(hw, key);
 		if (ret)
-			goto conf_err;
+			goto set_algo_key_fail;
 	}
 	rte_spinlock_unlock(&hw->lock);
@@ -408,5 +408,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	return 0;
 
-conf_err:
+set_algo_key_fail:
+	(void)hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf_bk);
+set_tuple_fail:
 	rte_spinlock_unlock(&hw->lock);
 	return ret;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.165389413 +0100
+++ 0024-net-hns3-fix-rollback-on-RSS-hash-update.patch	2022-05-25 17:26:58.579828349 +0100
@@ -1 +1 @@
-From 07f64b5f576a779c8c3df4ba45ad70c306dcb562 Mon Sep 17 00:00:00 2001
+From 5a6fb3a977fb805a04b65ab8c2ba2401fc86abb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 07f64b5f576a779c8c3df4ba45ad70c306dcb562 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: remove redundant RSS tuple field' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (22 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: fix rollback on RSS hash update' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'ethdev: fix RSS update when RSS is disabled' " Kevin Traynor
                   ` (29 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 0cec1c94778a9dccf1e84b44145d08d45d06ee6c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:07 +0800
Subject: [PATCH] net/hns3: remove redundant RSS tuple field

[ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ]

The 'rss_tuple_fields' in struct struct hns3_rss_conf::rss_tuple_sets is
redundant. Because the enabled RSS tuple in PMD is already managed by
the 'types' in struct hns3_rss_conf::conf. This patch removes this
redundant variable.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c |  6 ++----
 drivers/net/hns3/hns3_rss.c  | 12 ++++--------
 drivers/net/hns3/hns3_rss.h  |  5 +----
 3 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 34fcc3b49e..ea88deca32 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1399,5 +1399,5 @@ hns3_disable_rss(struct hns3_hw *hw)
 	int ret;
 
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, 0);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, 0);
 	if (ret)
 		return ret;
@@ -1449,5 +1449,4 @@ static int
 hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 {
-	struct hns3_rss_tuple_cfg *tuple;
 	int ret;
 
@@ -1465,6 +1464,5 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 	hw->rss_info.conf.func = rss_config->func;
 
-	tuple = &hw->rss_info.rss_tuple_sets;
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_config->types);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_config->types);
 	if (ret)
 		hns3_err(hw, "Update RSS tuples by rss hf failed %d", ret);
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 4b2c24ace4..e149c16bfe 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -311,6 +311,5 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw)
 
 int
-hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
-			     struct hns3_rss_tuple_cfg *tuple, uint64_t rss_hf)
+hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf)
 {
 	struct hns3_rss_input_tuple_cmd *req;
@@ -357,5 +356,4 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
 	}
 
-	tuple->rss_tuple_fields = rte_le_to_cpu_64(req->tuple_field);
 	/* Update supported flow types when set tuple success */
 	hw->rss_info.conf.types = rss_hf;
@@ -378,5 +376,4 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets;
 	uint64_t rss_hf_bk = hw->rss_info.conf.types;
 	uint8_t key_len = rss_conf->rss_key_len;
@@ -395,5 +392,5 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 
 	rte_spinlock_lock(&hw->lock);
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_hf);
 	if (ret)
 		goto set_tuple_fail;
@@ -409,5 +406,5 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 
 set_algo_key_fail:
-	(void)hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf_bk);
+	(void)hns3_set_rss_tuple_by_rss_hf(hw, rss_hf_bk);
 set_tuple_fail:
 	rte_spinlock_unlock(&hw->lock);
@@ -700,6 +697,5 @@ hns3_config_rss(struct hns3_adapter *hns)
 		rss_hf = 0;
 
-	return hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets,
-					    rss_hf);
+	return hns3_set_rss_tuple_by_rss_hf(hw, rss_hf);
 }
 
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index c4121207aa..55d5718ffc 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -44,5 +44,4 @@ struct hns3_rss_conf {
 	uint8_t hash_algo; /* hash function type defined by hardware */
 	uint8_t key[HNS3_RSS_KEY_SIZE];  /* Hash key */
-	struct hns3_rss_tuple_cfg rss_tuple_sets;
 	uint16_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE_MAX];
 	uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */
@@ -108,7 +107,5 @@ int hns3_rss_reset_indir_table(struct hns3_hw *hw);
 int hns3_config_rss(struct hns3_adapter *hns);
 void hns3_rss_uninit(struct hns3_adapter *hns);
-int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
-				 struct hns3_rss_tuple_cfg *tuple,
-				 uint64_t rss_hf);
+int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf);
 int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key);
 int hns3_restore_rss_filter(struct rte_eth_dev *dev);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.185011373 +0100
+++ 0025-net-hns3-remove-redundant-RSS-tuple-field.patch	2022-05-25 17:26:58.580828351 +0100
@@ -1 +1 @@
-From bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e Mon Sep 17 00:00:00 2001
+From 0cec1c94778a9dccf1e84b44145d08d45d06ee6c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index feabac9f41..317f91fc71 100644
+index 34fcc3b49e..ea88deca32 100644
@@ -26 +27 @@
-@@ -1447,5 +1447,5 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1399,5 +1399,5 @@ hns3_disable_rss(struct hns3_hw *hw)
@@ -33 +34 @@
-@@ -1497,5 +1497,4 @@ static int
+@@ -1449,5 +1449,4 @@ static int
@@ -39 +40 @@
-@@ -1513,6 +1512,5 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+@@ -1465,6 +1464,5 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)


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

* patch 'ethdev: fix RSS update when RSS is disabled' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (23 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: remove redundant RSS tuple field' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/hns3: remove unnecessary RSS switch' " Kevin Traynor
                   ` (28 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 15b794b1521c40942aefc133e68f5e337e87d06c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Apr 2022 14:57:00 +0800
Subject: [PATCH] ethdev: fix RSS update when RSS is disabled

[ upstream commit 93e1ea6dfa99dea359b8d66123576a395c2c0acd ]

The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag
is not set in dev_configure, RSS will be not configured and enabled.
However, RSS hash and reta can still be configured by ethdev ops to
enable RSS if the flag isn't set. The behavior is inconsistent.

Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 lib/ethdev/rte_ethdev.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index bf93534b90..0ab5a3470d 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -4082,4 +4082,5 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,
 			    uint16_t reta_size)
 {
+	enum rte_eth_rx_mq_mode mq_mode;
 	struct rte_eth_dev *dev;
 	int ret;
@@ -4113,4 +4114,10 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,
 		return ret;
 
+	mq_mode = dev->data->dev_conf.rxmode.mq_mode;
+	if (!(mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)) {
+		RTE_ETHDEV_LOG(ERR, "Multi-queue RSS mode isn't enabled.\n");
+		return -ENOTSUP;
+	}
+
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->reta_update, -ENOTSUP);
 	return eth_err(port_id, (*dev->dev_ops->reta_update)(dev, reta_conf,
@@ -4152,4 +4159,5 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info = { .flow_type_rss_offloads = 0, };
+	enum rte_eth_rx_mq_mode mq_mode;
 	int ret;
 
@@ -4177,4 +4185,11 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,
 		return -EINVAL;
 	}
+
+	mq_mode = dev->data->dev_conf.rxmode.mq_mode;
+	if (!(mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)) {
+		RTE_ETHDEV_LOG(ERR, "Multi-queue RSS mode isn't enabled.\n");
+		return -ENOTSUP;
+	}
+
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_update, -ENOTSUP);
 	return eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev,
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.205703543 +0100
+++ 0026-ethdev-fix-RSS-update-when-RSS-is-disabled.patch	2022-05-25 17:26:58.582828353 +0100
@@ -1 +1 @@
-From 93e1ea6dfa99dea359b8d66123576a395c2c0acd Mon Sep 17 00:00:00 2001
+From 15b794b1521c40942aefc133e68f5e337e87d06c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 93e1ea6dfa99dea359b8d66123576a395c2c0acd ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 29a3d80466..8520aec561 100644
+index bf93534b90..0ab5a3470d 100644
@@ -25 +26 @@
-@@ -3868,4 +3868,5 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,
+@@ -4082,4 +4082,5 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,
@@ -31 +32 @@
-@@ -3899,4 +3900,10 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,
+@@ -4113,4 +4114,10 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,
@@ -42 +43 @@
-@@ -3938,4 +3945,5 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,
+@@ -4152,4 +4159,5 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,
@@ -48 +49 @@
-@@ -3963,4 +3971,11 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,
+@@ -4177,4 +4185,11 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,


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

* patch 'net/hns3: remove unnecessary RSS switch' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (24 preceding siblings ...)
  2022-05-25 16:28 ` patch 'ethdev: fix RSS update when RSS is disabled' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'app/testpmd: check statistics query before printing' " Kevin Traynor
                   ` (27 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 66b7e330d6f075245880dd79e0b1c207e010f208 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Apr 2022 14:57:01 +0800
Subject: [PATCH] net/hns3: remove unnecessary RSS switch

[ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ]

Whether the RSS is enabled depends on RTE_ETH_MQ_RX_RSS_FLAG and packet
tuple are enabled. So the RSS switch is unnecessary.

Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed")
Fixes: fd8196838763 ("net/hns3: fix configuring device with RSS enabled")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 2 --
 drivers/net/hns3/hns3_ethdev.h    | 1 -
 drivers/net/hns3/hns3_ethdev_vf.c | 2 --
 drivers/net/hns3/hns3_flow.c      | 1 -
 drivers/net/hns3/hns3_rss.c       | 3 ---
 5 files changed, 9 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 9992b64d4e..7fb246c193 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2031,5 +2031,4 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 		conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
 		rss_conf = conf->rx_adv_conf.rss_conf;
-		hw->rss_dis_flag = false;
 		ret = hns3_dev_rss_hash_update(dev, &rss_conf);
 		if (ret)
@@ -2850,5 +2849,4 @@ hns3_get_board_configuration(struct hns3_hw *hw)
 	hw->mac.media_type = cfg.media_type;
 	hw->rss_size_max = cfg.rss_size_max;
-	hw->rss_dis_flag = false;
 	memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
 	hw->mac.phy_addr = cfg.phy_addr;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 952434c864..134a33ee2f 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -531,5 +531,4 @@ struct hns3_hw {
 	/* The configuration info of RSS */
 	struct hns3_rss_conf rss_info;
-	bool rss_dis_flag; /* disable rss flag. true: disable, false: enable */
 	uint16_t rss_ind_tbl_size;
 	uint16_t rss_key_size;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 7ad37b08d2..7a843fd7d5 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -497,5 +497,4 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
-		hw->rss_dis_flag = false;
 		rss_conf = conf->rx_adv_conf.rss_conf;
 		ret = hns3_dev_rss_hash_update(dev, &rss_conf);
@@ -1032,5 +1031,4 @@ hns3vf_get_configuration(struct hns3_hw *hw)
 
 	hw->mac.media_type = HNS3_MEDIA_TYPE_NONE;
-	hw->rss_dis_flag = false;
 
 	/* Get device capability */
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index ea88deca32..4fc938cee0 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1402,5 +1402,4 @@ hns3_disable_rss(struct hns3_hw *hw)
 	if (ret)
 		return ret;
-	hw->rss_dis_flag = true;
 
 	return 0;
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index e149c16bfe..d376486a1d 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -382,7 +382,4 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	int ret;
 
-	if (hw->rss_dis_flag)
-		return -EINVAL;
-
 	if (key && key_len != HNS3_RSS_KEY_SIZE) {
 		hns3_err(hw, "the hash key len(%u) is invalid, must be %u",
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.228553607 +0100
+++ 0027-net-hns3-remove-unnecessary-RSS-switch.patch	2022-05-25 17:26:58.591828367 +0100
@@ -1 +1 @@
-From ec1691494273ef4f9cb60ed24099196de1ce0cc4 Mon Sep 17 00:00:00 2001
+From 66b7e330d6f075245880dd79e0b1c207e010f208 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 4d5a595aab..0b565a5614 100644
+index 9992b64d4e..7fb246c193 100644
@@ -27 +28 @@
-@@ -2019,5 +2019,4 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2031,5 +2031,4 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -33 +34 @@
-@@ -2825,5 +2824,4 @@ hns3_get_board_configuration(struct hns3_hw *hw)
+@@ -2850,5 +2849,4 @@ hns3_get_board_configuration(struct hns3_hw *hw)
@@ -40 +41 @@
-index bb6ddd97ba..5e8a746514 100644
+index 952434c864..134a33ee2f 100644
@@ -43 +44 @@
-@@ -527,5 +527,4 @@ struct hns3_hw {
+@@ -531,5 +531,4 @@ struct hns3_hw {
@@ -50 +51 @@
-index f641e0dc36..589de0ab3a 100644
+index 7ad37b08d2..7a843fd7d5 100644
@@ -53 +54 @@
-@@ -496,5 +496,4 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -497,5 +497,4 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
@@ -59 +60 @@
-@@ -998,5 +997,4 @@ hns3vf_get_configuration(struct hns3_hw *hw)
+@@ -1032,5 +1031,4 @@ hns3vf_get_configuration(struct hns3_hw *hw)
@@ -66 +67 @@
-index 317f91fc71..86ebbf69b6 100644
+index ea88deca32..4fc938cee0 100644
@@ -69 +70 @@
-@@ -1450,5 +1450,4 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1402,5 +1402,4 @@ hns3_disable_rss(struct hns3_hw *hw)


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

* patch 'app/testpmd: check statistics query before printing' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (25 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/hns3: remove unnecessary RSS switch' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'app/testpmd: fix MTU verification' " Kevin Traynor
                   ` (26 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 5e1545b730ffd4d46ad090071eed4f4ab71d60ac Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 6 Apr 2022 16:45:36 +0800
Subject: [PATCH] app/testpmd: check statistics query before printing

[ upstream commit baef6bbfad1b9596c7051f5c1fcc308310296342 ]

In function 'fwd_stats_display', if function 'rte_eth_stats_get' fails,
'stats' is uncertainty value. The display result will be abnormal.

This patch check the return value of 'rte_eth_stats_get' to avoid
display abnormal stats.

Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/config.c  | 10 ++++++++--
 app/test-pmd/testpmd.c | 16 ++++++++++++++--
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e812f57151..38f268423b 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -249,6 +249,6 @@ nic_stats_display(portid_t port_id)
 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
 	struct rte_eth_stats stats;
-
 	static const char *nic_stats_border = "########################";
+	int ret;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
@@ -256,5 +256,11 @@ nic_stats_display(portid_t port_id)
 		return;
 	}
-	rte_eth_stats_get(port_id, &stats);
+	ret = rte_eth_stats_get(port_id, &stats);
+	if (ret != 0) {
+		fprintf(stderr,
+			"%s: Error: failed to get stats (port %u): %d",
+			__func__, port_id, ret);
+		return;
+	}
 	printf("\n  %s NIC statistics for port %-2d %s\n",
 	       nic_stats_border, port_id, nic_stats_border);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 2387cc1d9e..e4f9d5f147 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1984,4 +1984,5 @@ fwd_stats_display(void)
 	streamid_t sm_id;
 	portid_t pt_id;
+	int ret;
 	int i;
 
@@ -2015,5 +2016,11 @@ fwd_stats_display(void)
 		port = &ports[pt_id];
 
-		rte_eth_stats_get(pt_id, &stats);
+		ret = rte_eth_stats_get(pt_id, &stats);
+		if (ret != 0) {
+			fprintf(stderr,
+				"%s: Error: failed to get stats (port %u): %d",
+				__func__, pt_id, ret);
+			continue;
+		}
 		stats.ipackets -= port->stats.ipackets;
 		stats.opackets -= port->stats.opackets;
@@ -2110,9 +2117,14 @@ fwd_stats_reset(void)
 	streamid_t sm_id;
 	portid_t pt_id;
+	int ret;
 	int i;
 
 	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
 		pt_id = fwd_ports_ids[i];
-		rte_eth_stats_get(pt_id, &ports[pt_id].stats);
+		ret = rte_eth_stats_get(pt_id, &ports[pt_id].stats);
+		if (ret != 0)
+			fprintf(stderr,
+				"%s: Error: failed to clear stats (port %u):%d",
+				__func__, pt_id, ret);
 	}
 	for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.254196818 +0100
+++ 0028-app-testpmd-check-statistics-query-before-printing.patch	2022-05-25 17:26:58.595828373 +0100
@@ -1 +1 @@
-From baef6bbfad1b9596c7051f5c1fcc308310296342 Mon Sep 17 00:00:00 2001
+From 5e1545b730ffd4d46ad090071eed4f4ab71d60ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit baef6bbfad1b9596c7051f5c1fcc308310296342 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index cc8e7aa138..bd689f9f86 100644
+index e812f57151..38f268423b 100644
@@ -26 +27 @@
-@@ -250,6 +250,6 @@ nic_stats_display(portid_t port_id)
+@@ -249,6 +249,6 @@ nic_stats_display(portid_t port_id)
@@ -34 +35 @@
-@@ -257,5 +257,11 @@ nic_stats_display(portid_t port_id)
+@@ -256,5 +256,11 @@ nic_stats_display(portid_t port_id)
@@ -48 +49 @@
-index fe2ce19f99..79bb23264b 100644
+index 2387cc1d9e..e4f9d5f147 100644
@@ -51 +52 @@
-@@ -1983,4 +1983,5 @@ fwd_stats_display(void)
+@@ -1984,4 +1984,5 @@ fwd_stats_display(void)
@@ -57 +58 @@
-@@ -2014,5 +2015,11 @@ fwd_stats_display(void)
+@@ -2015,5 +2016,11 @@ fwd_stats_display(void)
@@ -70 +71 @@
-@@ -2109,9 +2116,14 @@ fwd_stats_reset(void)
+@@ -2110,9 +2117,14 @@ fwd_stats_reset(void)


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

* patch 'app/testpmd: fix MTU verification' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (26 preceding siblings ...)
  2022-05-25 16:28 ` patch 'app/testpmd: check statistics query before printing' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/cnxk: add message on flow parsing failure' " Kevin Traynor
                   ` (25 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From caf428f0a08dfc30a815d486366901c063772354 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Apr 2022 16:45:37 +0800
Subject: [PATCH] app/testpmd: fix MTU verification

[ upstream commit f0b3966a5072bd0a6c7f7e8652aef793afa4f4d0 ]

The macro RTE_ETHER_MIN_LEN isn't the minimum value of MTU. But testpmd
used it when execute 'port config mtu 0 xx' cmd. This patch fixes it.

Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/cmdline.c |  4 ---
 app/test-pmd/config.c  | 55 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 6f995905f6..0b5bece513 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2046,8 +2046,4 @@ cmd_config_mtu_parsed(void *parsed_result,
 	struct cmd_config_mtu_result *res = parsed_result;
 
-	if (res->value < RTE_ETHER_MIN_LEN) {
-		fprintf(stderr, "mtu cannot be less than %d\n", RTE_ETHER_MIN_LEN);
-		return;
-	}
 	port_mtu_set(res->port_id, res->value);
 }
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 38f268423b..face2f805f 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1254,4 +1254,55 @@ port_reg_set(portid_t port_id, uint32_t reg_off, uint32_t reg_v)
 }
 
+static uint32_t
+eth_dev_get_overhead_len(uint32_t max_rx_pktlen, uint16_t max_mtu)
+{
+	uint32_t overhead_len;
+
+	if (max_mtu != UINT16_MAX && max_rx_pktlen > max_mtu)
+		overhead_len = max_rx_pktlen - max_mtu;
+	else
+		overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+	return overhead_len;
+}
+
+static int
+eth_dev_validate_mtu(uint16_t port_id, uint16_t mtu)
+{
+	struct rte_eth_dev_info dev_info;
+	uint32_t overhead_len;
+	uint32_t frame_size;
+	int ret;
+
+	ret = rte_eth_dev_info_get(port_id, &dev_info);
+	if (ret != 0)
+		return ret;
+
+	if (mtu < dev_info.min_mtu) {
+		fprintf(stderr,
+			"MTU (%u) < device min MTU (%u) for port_id %u\n",
+			mtu, dev_info.min_mtu, port_id);
+		return -EINVAL;
+	}
+	if (mtu > dev_info.max_mtu) {
+		fprintf(stderr,
+			"MTU (%u) > device max MTU (%u) for port_id %u\n",
+			mtu, dev_info.max_mtu, port_id);
+		return -EINVAL;
+	}
+
+	overhead_len = eth_dev_get_overhead_len(dev_info.max_rx_pktlen,
+			dev_info.max_mtu);
+	frame_size = mtu + overhead_len;
+	if (frame_size > dev_info.max_rx_pktlen) {
+		fprintf(stderr,
+			"Frame size (%u) > device max frame size (%u) for port_id %u\n",
+			frame_size, dev_info.max_rx_pktlen, port_id);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
 void
 port_mtu_set(portid_t port_id, uint16_t mtu)
@@ -1263,4 +1314,8 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
 		return;
 
+	diag = eth_dev_validate_mtu(port_id, mtu);
+	if (diag != 0)
+		return;
+
 	if (port->need_reconfig == 0) {
 		diag = rte_eth_dev_set_mtu(port_id, mtu);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.280555169 +0100
+++ 0029-app-testpmd-fix-MTU-verification.patch	2022-05-25 17:26:58.607828390 +0100
@@ -1 +1 @@
-From f0b3966a5072bd0a6c7f7e8652aef793afa4f4d0 Mon Sep 17 00:00:00 2001
+From caf428f0a08dfc30a815d486366901c063772354 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0b3966a5072bd0a6c7f7e8652aef793afa4f4d0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 6ffea8e21a..91e4090582 100644
+index 6f995905f6..0b5bece513 100644
@@ -24 +25 @@
-@@ -2051,8 +2051,4 @@ cmd_config_mtu_parsed(void *parsed_result,
+@@ -2046,8 +2046,4 @@ cmd_config_mtu_parsed(void *parsed_result,
@@ -34 +35 @@
-index bd689f9f86..1b1e738f83 100644
+index 38f268423b..face2f805f 100644
@@ -37 +38 @@
-@@ -1255,4 +1255,55 @@ port_reg_set(portid_t port_id, uint32_t reg_off, uint32_t reg_v)
+@@ -1254,4 +1254,55 @@ port_reg_set(portid_t port_id, uint32_t reg_off, uint32_t reg_v)
@@ -93 +94 @@
-@@ -1264,4 +1315,8 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
+@@ -1263,4 +1314,8 @@ port_mtu_set(portid_t port_id, uint16_t mtu)


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

* patch 'net/cnxk: add message on flow parsing failure' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (27 preceding siblings ...)
  2022-05-25 16:28 ` patch 'app/testpmd: fix MTU verification' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'common/cnxk: fix unaligned access to device memory' " Kevin Traynor
                   ` (24 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From b117088323fca6ab18ea32be499b612626e0c259 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Tue, 19 Apr 2022 12:04:38 +0530
Subject: [PATCH] net/cnxk: add message on flow parsing failure

[ upstream commit c8647cd7f3260eec8d55ee392240dcc10f7c0a4b ]

Set the error message with rte_flow_error_set() API
when flow parsing fails.

Fixes: 8c009b4505e ("net/cnxk: support flow API")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/net/cnxk/cnxk_rte_flow.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/cnxk/cnxk_rte_flow.c b/drivers/net/cnxk/cnxk_rte_flow.c
index b08d7c34fa..32166ae764 100644
--- a/drivers/net/cnxk/cnxk_rte_flow.c
+++ b/drivers/net/cnxk/cnxk_rte_flow.c
@@ -298,5 +298,12 @@ cnxk_flow_validate(struct rte_eth_dev *eth_dev,
 	}
 
-	return roc_npc_flow_parse(npc, &in_attr, in_pattern, in_actions, &flow);
+	rc = roc_npc_flow_parse(npc, &in_attr, in_pattern, in_actions, &flow);
+
+	if (rc) {
+		rte_flow_error_set(error, 0, rc, NULL,
+				   "Flow validation failed");
+		return rc;
+	}
+	return 0;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.313959185 +0100
+++ 0030-net-cnxk-add-message-on-flow-parsing-failure.patch	2022-05-25 17:26:58.607828390 +0100
@@ -1 +1 @@
-From c8647cd7f3260eec8d55ee392240dcc10f7c0a4b Mon Sep 17 00:00:00 2001
+From b117088323fca6ab18ea32be499b612626e0c259 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c8647cd7f3260eec8d55ee392240dcc10f7c0a4b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/net/cnxk/cnxk_flow.c | 9 ++++++++-
+ drivers/net/cnxk/cnxk_rte_flow.c | 9 ++++++++-
@@ -18,5 +19,5 @@
-diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
-index ff962c141d..1034a2c5a4 100644
---- a/drivers/net/cnxk/cnxk_flow.c
-+++ b/drivers/net/cnxk/cnxk_flow.c
-@@ -300,5 +300,12 @@ cnxk_flow_validate(struct rte_eth_dev *eth_dev,
+diff --git a/drivers/net/cnxk/cnxk_rte_flow.c b/drivers/net/cnxk/cnxk_rte_flow.c
+index b08d7c34fa..32166ae764 100644
+--- a/drivers/net/cnxk/cnxk_rte_flow.c
++++ b/drivers/net/cnxk/cnxk_rte_flow.c
+@@ -298,5 +298,12 @@ cnxk_flow_validate(struct rte_eth_dev *eth_dev,


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

* patch 'common/cnxk: fix unaligned access to device memory' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (28 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/cnxk: add message on flow parsing failure' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'common/cnxk: fix null pointer dereference' " Kevin Traynor
                   ` (23 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d13786763aa466a972f57b0ff60d1739995ab5ca Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Wed, 20 Apr 2022 12:08:25 +0530
Subject: [PATCH] common/cnxk: fix unaligned access to device memory

[ upstream commit 6a65e22a4dad855fba1de4b793a208f2d6f12d5e ]

Use mbox_memcpy() instead of memcpy() to prevent unaligned access.

Fixes: 1f66919817e ("common/cnxk: improve MCAM entries management")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_npc_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npc_utils.c b/drivers/common/cnxk/roc_npc_utils.c
index f9768ea3cf..0d02872c8b 100644
--- a/drivers/common/cnxk/roc_npc_utils.c
+++ b/drivers/common/cnxk/roc_npc_utils.c
@@ -583,5 +583,5 @@ npc_allocate_mcam_entry(struct mbox *mbox, int prio,
 		return -ENOSPC;
 
-	memcpy(rsp_local, rsp_cmd, sizeof(*rsp));
+	mbox_memcpy(rsp_local, rsp_cmd, sizeof(*rsp));
 
 	return 0;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.333127840 +0100
+++ 0031-common-cnxk-fix-unaligned-access-to-device-memory.patch	2022-05-25 17:26:58.608828392 +0100
@@ -1 +1 @@
-From 6a65e22a4dad855fba1de4b793a208f2d6f12d5e Mon Sep 17 00:00:00 2001
+From d13786763aa466a972f57b0ff60d1739995ab5ca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6a65e22a4dad855fba1de4b793a208f2d6f12d5e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'common/cnxk: fix null pointer dereference' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (29 preceding siblings ...)
  2022-05-25 16:28 ` patch 'common/cnxk: fix unaligned access to device memory' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/cnxk: fix uninitialized variables' " Kevin Traynor
                   ` (22 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From a10e2ec8ee39426fbff4b3b896b005355ac701db Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Sun, 24 Apr 2022 21:47:23 +0530
Subject: [PATCH] common/cnxk: fix null pointer dereference

[ upstream commit ea0d681efa86cb8902d93409679e3ac507755345 ]

Fix null pointer dereference reported in coverity scan.

Coverity issue: 372065
Fixes: 665b6a7400b ("common/cnxk: add NPC helper API")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_npc_utils.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/common/cnxk/roc_npc_utils.c b/drivers/common/cnxk/roc_npc_utils.c
index 0d02872c8b..e36a312576 100644
--- a/drivers/common/cnxk/roc_npc_utils.c
+++ b/drivers/common/cnxk/roc_npc_utils.c
@@ -146,4 +146,7 @@ npc_parse_item_basic(const struct roc_npc_item_info *item,
 	}
 
+	if (info->mask == NULL)
+		return NPC_ERR_INVALID_MASK;
+
 	/* mask specified must be subset of hw supported mask
 	 * mask | hw_mask == hw_mask
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.352963125 +0100
+++ 0032-common-cnxk-fix-null-pointer-dereference.patch	2022-05-25 17:26:58.608828392 +0100
@@ -1 +1 @@
-From ea0d681efa86cb8902d93409679e3ac507755345 Mon Sep 17 00:00:00 2001
+From a10e2ec8ee39426fbff4b3b896b005355ac701db Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ea0d681efa86cb8902d93409679e3ac507755345 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/cnxk: fix uninitialized variables' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (30 preceding siblings ...)
  2022-05-25 16:28 ` patch 'common/cnxk: fix null pointer dereference' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'common/cnxk: fix SQ flush sequence' " Kevin Traynor
                   ` (21 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 08d2d8868eb539d69db1a286d5b58657f63c45a3 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Sun, 24 Apr 2022 21:48:18 +0530
Subject: [PATCH] net/cnxk: fix uninitialized variables

[ upstream commit 938ba5f9b9fe85d011b170e42291840ab19340e5 ]

Fix uninitialized scalar variable reported in coverity scan.

Coverity issue: 371876, 371877
Coverity issue: 371872, 371880
Fixes: 39dc567c195 ("net/cnxk: add Tx burst for CN9K")
Fixes: 19f3af2371a ("net/cnxk: add Tx burst for CN10K")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h | 4 ++--
 drivers/net/cnxk/cn9k_tx.h  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index f3a282f429..6704d2d655 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -850,6 +850,6 @@ cn10k_nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts,
 	uint16_t lmt_id, burst, left, i;
 	uintptr_t c_lbase = lbase;
+	uint64_t lso_tun_fmt = 0;
 	rte_iova_t c_io_addr;
-	uint64_t lso_tun_fmt;
 	uint16_t c_lmt_id;
 	uint64_t sa_base;
@@ -977,7 +977,7 @@ cn10k_nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint8_t lnum, c_lnum, c_loff;
 	uintptr_t c_lbase = lbase;
+	uint64_t lso_tun_fmt = 0;
 	uint64_t data0, data1;
 	rte_iova_t c_io_addr;
-	uint64_t lso_tun_fmt;
 	uint8_t shft, c_shft;
 	__uint128_t data128;
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 070a7d9439..8167313a15 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -466,6 +466,6 @@ cn9k_nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts,
 	struct cn9k_eth_txq *txq = tx_queue;
 	const rte_iova_t io_addr = txq->io_addr;
+	uint64_t lso_tun_fmt = 0;
 	void *lmt_addr = txq->lmt_addr;
-	uint64_t lso_tun_fmt;
 	uint16_t i;
 
@@ -507,6 +507,6 @@ cn9k_nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
 	struct cn9k_eth_txq *txq = tx_queue;
 	const rte_iova_t io_addr = txq->io_addr;
+	uint64_t lso_tun_fmt = 0;
 	void *lmt_addr = txq->lmt_addr;
-	uint64_t lso_tun_fmt;
 	uint16_t segdw;
 	uint64_t i;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.372212984 +0100
+++ 0033-net-cnxk-fix-uninitialized-variables.patch	2022-05-25 17:26:58.611828396 +0100
@@ -1 +1 @@
-From 938ba5f9b9fe85d011b170e42291840ab19340e5 Mon Sep 17 00:00:00 2001
+From 08d2d8868eb539d69db1a286d5b58657f63c45a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 938ba5f9b9fe85d011b170e42291840ab19340e5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index de88a21e08..5d4003c5d4 100644
+index f3a282f429..6704d2d655 100644
@@ -25 +26 @@
-@@ -867,8 +867,8 @@ cn10k_nix_xmit_pkts(void *tx_queue, uint64_t *ws, struct rte_mbuf **tx_pkts,
+@@ -850,6 +850,6 @@ cn10k_nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts,
@@ -29,2 +29,0 @@
- 	uint64_t mark_fmt = 0;
- 	uint8_t mark_flag = 0;
@@ -35 +34 @@
-@@ -1000,9 +1000,9 @@ cn10k_nix_xmit_pkts_mseg(void *tx_queue, uint64_t *ws,
+@@ -977,7 +977,7 @@ cn10k_nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -39,2 +37,0 @@
- 	uint64_t mark_fmt = 0;
- 	uint8_t mark_flag = 0;
@@ -47 +44 @@
-index f55cd4bdf2..a0611a67c9 100644
+index 070a7d9439..8167313a15 100644
@@ -50 +47 @@
-@@ -527,5 +527,5 @@ cn9k_nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts,
+@@ -466,6 +466,6 @@ cn9k_nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts,
@@ -53,2 +50 @@
--	uint64_t lso_tun_fmt, mark_fmt = 0;
-+	uint64_t lso_tun_fmt = 0, mark_fmt = 0;
++	uint64_t lso_tun_fmt = 0;
@@ -56,2 +52,4 @@
- 	uint8_t mark_flag = 0;
-@@ -575,5 +575,5 @@ cn9k_nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
+-	uint64_t lso_tun_fmt;
+ 	uint16_t i;
+ 
+@@ -507,6 +507,6 @@ cn9k_nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -60,2 +58 @@
--	uint64_t lso_tun_fmt, mark_fmt = 0;
-+	uint64_t lso_tun_fmt = 0, mark_fmt = 0;
++	uint64_t lso_tun_fmt = 0;
@@ -63 +60,3 @@
- 	uint8_t mark_flag = 0;
+-	uint64_t lso_tun_fmt;
+ 	uint16_t segdw;
+ 	uint64_t i;


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

* patch 'common/cnxk: fix SQ flush sequence' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (31 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/cnxk: fix uninitialized variables' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:35   ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/cnxk: add barrier after meta batch free in scalar' " Kevin Traynor
                   ` (20 subsequent siblings)
  53 siblings, 1 reply; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Satha Rao; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 8790891a6dac401fe968022272e31a14d6b99fb9 Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Sun, 8 May 2022 13:18:16 +0530
Subject: [PATCH] common/cnxk: fix SQ flush sequence

[ upstream commit e746aec161cc5642935e1ac4b823bdb2d722ec27 ]

Fix SQ flush sequence to issue NIX RX SW Sync after SMQ flush.
This sync ensures that all the packets that were in-flight are
flushed out of memory.

This patch also fixes NULL return issues reported by
static analysis tool in Traffic Manager and sync's mailbox
to that of the kernel version.

Fixes: 05d727e8b14a ("common/cnxk: support NIX traffic management")
Fixes: 0b7e667ee303 ("common/cnxk: enable packet marking")

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_mbox.h   | 35 ++++++++++++++++++++++++++++++--
 drivers/common/cnxk/roc_nix_tm.c |  7 +++++++
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
index b63fe108c9..9a8ae6b216 100644
--- a/drivers/common/cnxk/roc_mbox.h
+++ b/drivers/common/cnxk/roc_mbox.h
@@ -115,5 +115,5 @@ struct mbox_msghdr {
 	M(SSO_GRP_GET_PRIORITY, 0x606, sso_grp_get_priority, sso_info_req,     \
 	  sso_grp_priority)                                                    \
-	M(SSO_WS_CACHE_INV, 0x607, sso_ws_cache_inv, msg_req, msg_rsp)         \
+	M(SSO_WS_CACHE_INV, 0x607, sso_ws_cache_inv, ssow_lf_inv_req, msg_rsp) \
 	M(SSO_GRP_QOS_CONFIG, 0x608, sso_grp_qos_config, sso_grp_qos_cfg,      \
 	  msg_rsp)                                                             \
@@ -124,4 +124,7 @@ struct mbox_msghdr {
 	M(SSO_HW_RELEASE_XAQ, 0x611, sso_hw_release_xaq_aura,                  \
 	  sso_hw_xaq_release, msg_rsp)                                         \
+	M(SSO_CONFIG_LSW, 0x612, ssow_config_lsw, ssow_config_lsw, msg_rsp)    \
+	M(SSO_HWS_CHNG_MSHIP, 0x613, ssow_chng_mship, ssow_chng_mship,         \
+	  msg_rsp)                                                             \
 	/* TIM mbox IDs (range 0x800 - 0x9FF) */                               \
 	M(TIM_LF_ALLOC, 0x800, tim_lf_alloc, tim_lf_alloc_req,                 \
@@ -248,5 +251,6 @@ struct mbox_msghdr {
 	  nix_bp_cfg_rsp)                                                      \
 	M(NIX_CPT_BP_DISABLE, 0x8021, nix_cpt_bp_disable, nix_bp_cfg_req,      \
-	  msg_rsp)
+	  msg_rsp)                                                             \
+	M(NIX_RX_SW_SYNC, 0x8022, nix_rx_sw_sync, msg_req, msg_rsp)
 
 /* Messages initiated by AF (range 0xC00 - 0xDFF) */
@@ -1241,4 +1245,31 @@ struct ssow_lf_free_req {
 };
 
+#define SSOW_INVAL_SELECTIVE_VER 0x1000
+struct ssow_lf_inv_req {
+	struct mbox_msghdr hdr;
+	uint16_t nb_hws;		 /* Number of HWS to invalidate*/
+	uint16_t hws[MAX_RVU_BLKLF_CNT]; /* Array of HWS */
+};
+
+struct ssow_config_lsw {
+	struct mbox_msghdr hdr;
+#define SSOW_LSW_DIS	 0
+#define SSOW_LSW_GW_WAIT 1
+#define SSOW_LSW_GW_IMM	 2
+	uint8_t __io lsw_mode;
+#define SSOW_WQE_REL_LSW_WAIT 0
+#define SSOW_WQE_REL_IMM      1
+	uint8_t __io wqe_release;
+};
+
+struct ssow_chng_mship {
+	struct mbox_msghdr hdr;
+	uint8_t __io set;	 /* Membership set to modify. */
+	uint8_t __io enable;	 /* Enable/Disable the hwgrps. */
+	uint8_t __io hws;	 /* HWS to modify. */
+	uint16_t __io nb_hwgrps; /* Number of hwgrps in the array */
+	uint16_t __io hwgrps[MAX_RVU_BLKLF_CNT]; /* Array of hwgrps. */
+};
+
 struct sso_hw_setconfig {
 	struct mbox_msghdr hdr;
diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index ebb27a3106..506cb066ce 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -565,4 +565,5 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
 	struct nix_tm_node_list *list;
 	enum roc_nix_tm_tree tree;
+	struct msg_req *req;
 	struct mbox *mbox;
 	struct nix *nix;
@@ -654,4 +655,10 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
 		goto cleanup;
 	}
+
+	req = mbox_alloc_msg_nix_rx_sw_sync(mbox);
+	if (!req)
+		return -ENOSPC;
+
+	rc = mbox_process(mbox);
 cleanup:
 	/* Restore cgx state */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.394662975 +0100
+++ 0034-common-cnxk-fix-SQ-flush-sequence.patch	2022-05-25 17:26:58.614828400 +0100
@@ -1 +1 @@
-From e746aec161cc5642935e1ac4b823bdb2d722ec27 Mon Sep 17 00:00:00 2001
+From 8790891a6dac401fe968022272e31a14d6b99fb9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e746aec161cc5642935e1ac4b823bdb2d722ec27 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21,4 +22,3 @@
- drivers/common/cnxk/roc_mbox.h        | 35 +++++++++++++++++++++++++--
- drivers/common/cnxk/roc_nix_tm.c      |  7 ++++++
- drivers/common/cnxk/roc_nix_tm_mark.c |  9 +++++++
- 3 files changed, 49 insertions(+), 2 deletions(-)
+ drivers/common/cnxk/roc_mbox.h   | 35 ++++++++++++++++++++++++++++++--
+ drivers/common/cnxk/roc_nix_tm.c |  7 +++++++
+ 2 files changed, 40 insertions(+), 2 deletions(-)
@@ -27 +27 @@
-index b608f58357..2c30f19904 100644
+index b63fe108c9..9a8ae6b216 100644
@@ -30 +30 @@
-@@ -117,5 +117,5 @@ struct mbox_msghdr {
+@@ -115,5 +115,5 @@ struct mbox_msghdr {
@@ -37 +37 @@
-@@ -126,4 +126,7 @@ struct mbox_msghdr {
+@@ -124,4 +124,7 @@ struct mbox_msghdr {
@@ -45 +45 @@
-@@ -260,5 +263,6 @@ struct mbox_msghdr {
+@@ -248,5 +251,6 @@ struct mbox_msghdr {
@@ -53 +53 @@
-@@ -1269,4 +1273,31 @@ struct ssow_lf_free_req {
+@@ -1241,4 +1245,31 @@ struct ssow_lf_free_req {
@@ -86 +86 @@
-index 5b70c7bfed..42d3abd070 100644
+index ebb27a3106..506cb066ce 100644
@@ -89 +89 @@
-@@ -591,4 +591,5 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
+@@ -565,4 +565,5 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
@@ -95 +95 @@
-@@ -680,4 +681,10 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
+@@ -654,4 +655,10 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
@@ -106,28 +105,0 @@
-diff --git a/drivers/common/cnxk/roc_nix_tm_mark.c b/drivers/common/cnxk/roc_nix_tm_mark.c
-index 64cf67943a..d37292e8b9 100644
---- a/drivers/common/cnxk/roc_nix_tm_mark.c
-+++ b/drivers/common/cnxk/roc_nix_tm_mark.c
-@@ -111,4 +111,7 @@ nix_tm_update_red_algo(struct nix *nix, bool red_send)
- 		/* Update txschq config  */
- 		req = mbox_alloc_msg_nix_txschq_cfg(mbox);
-+		if (req == NULL)
-+			return -ENOSPC;
-+
- 		req->lvl = tm_node->hw_lvl;
- 		k = prepare_tm_shaper_red_algo(tm_node, req->reg, req->regval,
-@@ -209,4 +212,7 @@ nix_tm_mark_init(struct nix *nix)
- 	/* Null mark format */
- 	req = mbox_alloc_msg_nix_mark_format_cfg(mbox);
-+	if (req == NULL)
-+		return -ENOSPC;
-+
- 	rc = mbox_process_msg(mbox, (void *)&rsp);
- 	if (rc) {
-@@ -221,4 +227,7 @@ nix_tm_mark_init(struct nix *nix)
- 		for (j = 0; j < ROC_NIX_TM_MARK_COLOR_MAX; j++) {
- 			req = mbox_alloc_msg_nix_mark_format_cfg(mbox);
-+			if (req == NULL)
-+				return -ENOSPC;
-+
- 			req->offset = mark_off[i];
- 


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

* patch 'net/cnxk: add barrier after meta batch free in scalar' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (32 preceding siblings ...)
  2022-05-25 16:28 ` patch 'common/cnxk: fix SQ flush sequence' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix reordering in NEON Rx' " Kevin Traynor
                   ` (19 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 7d9f5b3b336514d1ddbe269069c9d681cbca6c4a Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Sun, 8 May 2022 13:18:23 +0530
Subject: [PATCH] net/cnxk: add barrier after meta batch free in scalar

[ upstream commit 39279dd904fee0d688a2ab00a1d1dbaf89edc76c ]

Add barrier after meta batch free in scalar routine when
LMT lines are exactly full to make sure that next LMT line user
in Tx only starts writing the lines only when previous stoerl's
are complete.

Fixes: 4382a7ccf781 ("net/cnxk: support Rx security offload on cn10k")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/cnxk/cn10k_rx.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index 9d969cee87..5806392322 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -487,8 +487,9 @@ cn10k_nix_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t pkts,
 
 	/* Free remaining meta buffers if any */
-	if (flags & NIX_RX_OFFLOAD_SECURITY_F && loff) {
+	if (flags & NIX_RX_OFFLOAD_SECURITY_F && loff)
 		nix_sec_flush_meta(laddr, lmt_id + lnum, loff, aura_handle);
-		plt_io_wmb();
-	}
+
+	if (flags & NIX_RX_OFFLOAD_SECURITY_F)
+		rte_io_wmb();
 
 	return nb_pkts;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.416117909 +0100
+++ 0035-net-cnxk-add-barrier-after-meta-batch-free-in-scalar.patch	2022-05-25 17:26:58.614828400 +0100
@@ -1 +1 @@
-From 39279dd904fee0d688a2ab00a1d1dbaf89edc76c Mon Sep 17 00:00:00 2001
+From 7d9f5b3b336514d1ddbe269069c9d681cbca6c4a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39279dd904fee0d688a2ab00a1d1dbaf89edc76c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e4f5a553a6..94c1f1e84f 100644
+index 9d969cee87..5806392322 100644
@@ -24 +25 @@
-@@ -1008,8 +1008,9 @@ cn10k_nix_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t pkts,
+@@ -487,8 +487,9 @@ cn10k_nix_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t pkts,


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

* patch 'net/bnxt: fix reordering in NEON Rx' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (33 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/cnxk: add barrier after meta batch free in scalar' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix device capability reporting' " Kevin Traynor
                   ` (18 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From b174adfcae894bb4a9d0c9c76e5c7ccb39c3d13f Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 13 Apr 2022 18:31:56 +0800
Subject: [PATCH] net/bnxt: fix reordering in NEON Rx

[ upstream commit e7f2effc9220dc5d71b0bb550bcc903badc7bac4 ]

Rx descriptor contains a valid bit which indicates readiness of the rest
of descriptor words. Hence, the word contains valid bit must be read
prior to other words.

In NEON vector path, two contiguous 8B descriptor are loaded to a single
NEON register. Given vector load ensures no 16B atomicity, read of the
word that includes valid bit could be reordered after read of other words.
In this case, data could be invalid.

Reloaded lower 64b after read barrier. This ensures what fetched is
correct.

Also fixed comments that not pertains to Arm platform architecture.

Fixes: deae85145c64 ("net/bnxt: handle multiple packets per loop in vector Rx")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index f15e2d3b4e..611fbadb08 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -236,13 +236,20 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 		/*
-		 * Load the four current descriptors into SSE registers in
-		 * reverse order to ensure consistent state.
+		 * Load the four current descriptors into NEON registers.
+		 * IO barriers are used to ensure consistent state.
 		 */
 		rxcmp1[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 7]);
 		rte_io_rmb();
+		/* Reload lower 64b of descriptors to make it ordered after info3_v. */
+		rxcmp1[3] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 7],
+				vreinterpretq_u64_u32(rxcmp1[3]), 0));
 		rxcmp[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 6]);
 
 		rxcmp1[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 5]);
 		rte_io_rmb();
+		rxcmp1[2] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 5],
+				vreinterpretq_u64_u32(rxcmp1[2]), 0));
 		rxcmp[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 4]);
 
@@ -251,8 +258,14 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		rxcmp1[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 3]);
 		rte_io_rmb();
+		rxcmp1[1] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 3],
+				vreinterpretq_u64_u32(rxcmp1[1]), 0));
 		rxcmp[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 2]);
 
 		rxcmp1[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 1]);
 		rte_io_rmb();
+		rxcmp1[0] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 1],
+				vreinterpretq_u64_u32(rxcmp1[0]), 0));
 		rxcmp[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 0]);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.436679355 +0100
+++ 0036-net-bnxt-fix-reordering-in-NEON-Rx.patch	2022-05-25 17:26:58.615828402 +0100
@@ -1 +1 @@
-From e7f2effc9220dc5d71b0bb550bcc903badc7bac4 Mon Sep 17 00:00:00 2001
+From b174adfcae894bb4a9d0c9c76e5c7ccb39c3d13f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7f2effc9220dc5d71b0bb550bcc903badc7bac4 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 779e23ac4f..32f8e59b3a 100644
+index f15e2d3b4e..611fbadb08 100644
@@ -33 +34 @@
-@@ -232,13 +232,20 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -236,13 +236,20 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -56 +57 @@
-@@ -247,8 +254,14 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -251,8 +258,14 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)


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

* patch 'net/bnxt: fix device capability reporting' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (34 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix reordering in NEON Rx' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: remove unused macro' " Kevin Traynor
                   ` (17 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 2f66d10615ef92010259dc343c9e11850d1be1c5 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:06 +0530
Subject: [PATCH] net/bnxt: fix device capability reporting

[ upstream commit 47a956a8fecdc60e935cc9d9b81356cafb2910f0 ]

1. Added two functions bnxt_get_tx_port_offloads() and
   bnxt_get_rx_port_offloads() to report the device
   tx/rx offload capabilities to the application.
2. This avoids few duplicate code in the driver and make
   VF-rep capability the same as VF.
3. This will help in selectively reporting offload capabilities
   based on FW support.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 24 ------------------------
 drivers/net/bnxt/bnxt_ethdev.c | 10 ++--------
 drivers/net/bnxt/bnxt_reps.c   |  6 ++----
 drivers/net/bnxt/bnxt_rxq.c    | 25 +++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxq.h    |  1 +
 drivers/net/bnxt/bnxt_txq.c    | 23 +++++++++++++++++++++++
 drivers/net/bnxt/bnxt_txq.h    |  1 +
 7 files changed, 54 insertions(+), 36 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0cbb58b2cf..722d61e54b 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -581,28 +581,4 @@ struct bnxt_rep_info {
 	RTE_ETH_RSS_LEVEL_MASK)
 
-#define BNXT_DEV_TX_OFFLOAD_SUPPORT (RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | \
-				     RTE_ETH_TX_OFFLOAD_TCP_CKSUM | \
-				     RTE_ETH_TX_OFFLOAD_UDP_CKSUM | \
-				     RTE_ETH_TX_OFFLOAD_TCP_TSO | \
-				     RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-				     RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | \
-				     RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO | \
-				     RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | \
-				     RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO | \
-				     RTE_ETH_TX_OFFLOAD_QINQ_INSERT | \
-				     RTE_ETH_TX_OFFLOAD_MULTI_SEGS)
-
-#define BNXT_DEV_RX_OFFLOAD_SUPPORT (RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
-				     RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
-				     RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
-				     RTE_ETH_RX_OFFLOAD_TCP_CKSUM | \
-				     RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
-				     RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM | \
-				     RTE_ETH_RX_OFFLOAD_KEEP_CRC | \
-				     RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \
-				     RTE_ETH_RX_OFFLOAD_TCP_LRO | \
-				     RTE_ETH_RX_OFFLOAD_SCATTER | \
-				     RTE_ETH_RX_OFFLOAD_RSS_HASH)
-
 #define BNXT_HWRM_SHORT_REQ_LEN		sizeof(struct hwrm_short_input)
 
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1d51865aac..e9e956c9d7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -972,14 +972,8 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	dev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN;
 
-	dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT;
-	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
-		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
-	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
-		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
+	dev_info->rx_offload_capa = bnxt_get_rx_port_offloads(bp);
 	dev_info->tx_queue_offload_capa = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
-	dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT |
+	dev_info->tx_offload_capa = bnxt_get_tx_port_offloads(bp) |
 				    dev_info->tx_queue_offload_capa;
-	if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
-		dev_info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
 	dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
 
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index b77cdeae96..299b4c24a8 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -569,8 +569,6 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	dev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN;
 
-	dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT;
-	if (parent_bp->flags & BNXT_FLAG_PTP_SUPPORTED)
-		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
-	dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;
+	dev_info->rx_offload_capa = bnxt_get_rx_port_offloads(parent_bp);
+	dev_info->tx_offload_capa = bnxt_get_tx_port_offloads(parent_bp);
 	dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
 
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index cd3bb1446f..0cfd0e588f 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -21,4 +21,29 @@
  */
 
+uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp)
+{
+	uint64_t rx_offload_capa;
+
+	rx_offload_capa = RTE_ETH_RX_OFFLOAD_IPV4_CKSUM  |
+			  RTE_ETH_RX_OFFLOAD_UDP_CKSUM   |
+			  RTE_ETH_RX_OFFLOAD_TCP_CKSUM   |
+			  RTE_ETH_RX_OFFLOAD_KEEP_CRC    |
+			  RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
+			  RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
+			  RTE_ETH_RX_OFFLOAD_TCP_LRO |
+			  RTE_ETH_RX_OFFLOAD_SCATTER |
+			  RTE_ETH_RX_OFFLOAD_RSS_HASH;
+
+	rx_offload_capa |= RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+			   RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM;
+
+	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
+		rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
+	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
+		rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
+
+	return rx_offload_capa;
+}
+
 /* Determine whether the current configuration needs aggregation ring in HW. */
 int bnxt_need_agg_ring(struct rte_eth_dev *eth_dev)
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index 0331c23810..287df8dff3 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -66,3 +66,4 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq);
 int bnxt_need_agg_ring(struct rte_eth_dev *eth_dev);
 void bnxt_free_rxq_mem(struct bnxt_rx_queue *rxq);
+uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp);
 #endif
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 72a55ea643..86073a505e 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -18,4 +18,27 @@
  */
 
+uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp)
+{
+	uint64_t tx_offload_capa;
+
+	tx_offload_capa = RTE_ETH_TX_OFFLOAD_IPV4_CKSUM  |
+			  RTE_ETH_TX_OFFLOAD_UDP_CKSUM   |
+			  RTE_ETH_TX_OFFLOAD_TCP_CKSUM   |
+			  RTE_ETH_TX_OFFLOAD_TCP_TSO     |
+			  RTE_ETH_TX_OFFLOAD_QINQ_INSERT |
+			  RTE_ETH_TX_OFFLOAD_MULTI_SEGS;
+
+	tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
+			   RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
+			   RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
+			   RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
+			   RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO;
+
+	if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
+		tx_offload_capa |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
+
+	return tx_offload_capa;
+}
+
 void bnxt_free_txq_stats(struct bnxt_tx_queue *txq)
 {
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index 67fd4cbebb..f3a03812ad 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -44,3 +44,4 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 			       unsigned int socket_id,
 			       const struct rte_eth_txconf *tx_conf);
+uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp);
 #endif
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.455968805 +0100
+++ 0037-net-bnxt-fix-device-capability-reporting.patch	2022-05-25 17:26:58.620828409 +0100
@@ -1 +1 @@
-From 47a956a8fecdc60e935cc9d9b81356cafb2910f0 Mon Sep 17 00:00:00 2001
+From 2f66d10615ef92010259dc343c9e11850d1be1c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 47a956a8fecdc60e935cc9d9b81356cafb2910f0 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 44724a9dfe..5eddb4f000 100644
+index 0cbb58b2cf..722d61e54b 100644
@@ -64 +65 @@
-index 261fe0be56..fac3925469 100644
+index 1d51865aac..e9e956c9d7 100644
@@ -85 +86 @@
-index e773932681..8a5b777793 100644
+index b77cdeae96..299b4c24a8 100644
@@ -88 +89 @@
-@@ -568,8 +568,6 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -569,8 +569,6 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,


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

* patch 'net/bnxt: remove unused macro' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (35 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix device capability reporting' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix Rx configuration' " Kevin Traynor
                   ` (16 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d620238a976812b108ba73706a42ad150933fc3a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:07 +0530
Subject: [PATCH] net/bnxt: remove unused macro

[ upstream commit c29aa80fb54addbda9a5c841472d7584d3ab9108 ]

BNXT_FLAG_UPDATE_HASH is redundant now, remove it.

Fixes: 1ebb765090a6 ("net/bnxt: fix config RSS update")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 1 -
 drivers/net/bnxt/bnxt_ethdev.c | 2 --
 drivers/net/bnxt/bnxt_rxq.c    | 3 ---
 3 files changed, 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 722d61e54b..b5dcc72568 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -649,5 +649,4 @@ struct bnxt {
 #define BNXT_FLAG_JUMBO			BIT(3)
 #define BNXT_FLAG_SHORT_CMD		BIT(4)
-#define BNXT_FLAG_UPDATE_HASH		BIT(5)
 #define BNXT_FLAG_PTP_SUPPORTED		BIT(6)
 #define BNXT_FLAG_MULTI_HOST    	BIT(7)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e9e956c9d7..afe54b1e25 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2127,6 +2127,4 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
 	}
 
-	bp->flags |= BNXT_FLAG_UPDATE_HASH;
-
 	/* Update the default RSS VNIC(s) */
 	vnic = BNXT_GET_DEFAULT_VNIC(bp);
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 0cfd0e588f..3c2283b8c6 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -176,7 +176,4 @@ skip_filter_allocation:
 		struct rte_eth_rss_conf *rss = &bp->rss_conf;
 
-		if (bp->flags & BNXT_FLAG_UPDATE_HASH)
-			bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
-
 		for (i = 0; i < bp->nr_vnics; i++) {
 			uint32_t lvl = RTE_ETH_RSS_LEVEL(rss->rss_hf);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.480795144 +0100
+++ 0038-net-bnxt-remove-unused-macro.patch	2022-05-25 17:26:58.625828417 +0100
@@ -1 +1 @@
-From c29aa80fb54addbda9a5c841472d7584d3ab9108 Mon Sep 17 00:00:00 2001
+From d620238a976812b108ba73706a42ad150933fc3a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c29aa80fb54addbda9a5c841472d7584d3ab9108 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5eddb4f000..9e5ff7496e 100644
+index 722d61e54b..b5dcc72568 100644
@@ -31 +32 @@
-index fac3925469..181de42d15 100644
+index e9e956c9d7..afe54b1e25 100644
@@ -34 +35 @@
-@@ -2126,6 +2126,4 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -2127,6 +2127,4 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,


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

* patch 'net/bnxt: fix Rx configuration' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (36 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: remove unused macro' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix RSS action' " Kevin Traynor
                   ` (15 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 3774986bddc587ba75036d6f897945f73ba5e0d3 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:08 +0530
Subject: [PATCH] net/bnxt: fix Rx configuration

[ upstream commit 0a90c56eacd5e345b42c7f152d33ca4c39343a52 ]

We are currently not handling RX/RSS modes correctly.
After launching testpmd with multiple RXQs, if the user tries to set
the number of RXQs to 1, driver is not updating the "hash_type"
and "hash_mode" values of the VNICs. As a result, driver issues
bnxt_vnic_rss_configure() unnecessarily and the FW command fails.

Fixed bnxt_mq_rx_configure() to update VNIC RSS fields unconditionally.

Fixes: 4191bc8f79a8 ("net/bnxt: handle multi queue mode properly")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 33 ++++++++++++---------------------
 1 file changed, 12 insertions(+), 21 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 3c2283b8c6..8977138012 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -66,4 +66,5 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
 {
 	struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
+	struct rte_eth_rss_conf *rss = &bp->rss_conf;
 	const struct rte_eth_vmdq_rx_conf *conf =
 		    &dev_conf->rx_adv_conf.vmdq_rx_conf;
@@ -173,27 +174,17 @@ skip_filter_allocation:
 	bp->rx_num_qs_per_vnic = nb_q_per_grp;
 
-	if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
-		struct rte_eth_rss_conf *rss = &bp->rss_conf;
+	for (i = 0; i < bp->nr_vnics; i++) {
+		uint32_t lvl = RTE_ETH_RSS_LEVEL(rss->rss_hf);
 
-		for (i = 0; i < bp->nr_vnics; i++) {
-			uint32_t lvl = RTE_ETH_RSS_LEVEL(rss->rss_hf);
+		vnic = &bp->vnic_info[i];
+		vnic->hash_type = bnxt_rte_to_hwrm_hash_types(rss->rss_hf);
+		vnic->hash_mode = bnxt_rte_to_hwrm_hash_level(bp, rss->rss_hf, lvl);
 
-			vnic = &bp->vnic_info[i];
-			vnic->hash_type =
-				bnxt_rte_to_hwrm_hash_types(rss->rss_hf);
-			vnic->hash_mode =
-				bnxt_rte_to_hwrm_hash_level(bp,
-							    rss->rss_hf,
-							    lvl);
-
-			/*
-			 * Use the supplied key if the key length is
-			 * acceptable and the rss_key is not NULL
-			 */
-			if (rss->rss_key &&
-			    rss->rss_key_len <= HW_HASH_KEY_SIZE)
-				memcpy(vnic->rss_hash_key,
-				       rss->rss_key, rss->rss_key_len);
-		}
+		/*
+		 * Use the supplied key if the key length is
+		 * acceptable and the rss_key is not NULL
+		 */
+		if (rss->rss_key && rss->rss_key_len <= HW_HASH_KEY_SIZE)
+			memcpy(vnic->rss_hash_key, rss->rss_key, rss->rss_key_len);
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.503609993 +0100
+++ 0039-net-bnxt-fix-Rx-configuration.patch	2022-05-25 17:26:58.625828417 +0100
@@ -1 +1 @@
-From 0a90c56eacd5e345b42c7f152d33ca4c39343a52 Mon Sep 17 00:00:00 2001
+From 3774986bddc587ba75036d6f897945f73ba5e0d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a90c56eacd5e345b42c7f152d33ca4c39343a52 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/bnxt: fix RSS action' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (37 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix Rx configuration' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix ring group on Rx restart' " Kevin Traynor
                   ` (14 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 821dd9cd433bad28ee71e7656eb5acfe41af7aa4 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:11 +0530
Subject: [PATCH] net/bnxt: fix RSS action

[ upstream commit 202a1711a1d318d97ee1d3cb718fc3fcf6ee2dad ]

Specifying a subset of Rx queues created by the application in
the "flow create" command is invalid.
User must either specify all Rx queues created or no queues.

Also removed a wrong comment as RSS action will not be supported
if user or application specifies MARK or COUNT action.

Fixes: 239695f754cb ("net/bnxt: enhance RSS action support")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index f7c90c442f..11dca5dc7e 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1075,5 +1075,4 @@ bnxt_update_filter_flags_en(struct bnxt_filter_info *filter,
 }
 
-/* Valid actions supported along with RSS are count and mark. */
 static int
 bnxt_validate_rss_action(const struct rte_flow_action actions[])
@@ -1124,4 +1123,15 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
 	rss = (const struct rte_flow_action_rss *)act->conf;
 
+	/* must specify either all the Rx queues created by application or zero queues */
+	if (rss->queue_num && vnic->rx_queue_cnt != rss->queue_num) {
+		rte_flow_error_set(error,
+				   EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ACTION,
+				   act,
+				   "Incorrect RXQ count");
+		rc = -rte_errno;
+		goto ret;
+	}
+
 	/* Currently only Toeplitz hash is supported. */
 	if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT &&
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.523428330 +0100
+++ 0040-net-bnxt-fix-RSS-action.patch	2022-05-25 17:26:58.626828418 +0100
@@ -1 +1 @@
-From 202a1711a1d318d97ee1d3cb718fc3fcf6ee2dad Mon Sep 17 00:00:00 2001
+From 821dd9cd433bad28ee71e7656eb5acfe41af7aa4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 202a1711a1d318d97ee1d3cb718fc3fcf6ee2dad ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 71a8edd830..bd96bbaf4c 100644
+index f7c90c442f..11dca5dc7e 100644


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

* patch 'net/bnxt: fix ring group on Rx restart' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (38 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix RSS action' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: check duplicate queue IDs' " Kevin Traynor
                   ` (13 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 3f9914a7b32eb59a5c4286114e5dbe2b5b936338 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:12 +0530
Subject: [PATCH] net/bnxt: fix ring group on Rx restart

[ upstream commit 1b27f8245eee1209d9ee27304fae3515e93ef5b0 ]

When an Rx queue is stopped and restarted, as part of that workflow,
for cards that have ring groups, we free and reallocate the ring group.
This new ring group is not communicated to the VNIC though via
HWRM_VNIC_CFG cmd.
Fix to issue HWRM_VNIC_CFG cmd on all adapters now in this scenario.

Fixes: ed0ae3502fc9 ("net/bnxt: update ring group after ring stop start")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 8977138012..43c81df014 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -488,8 +488,9 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		return rc;
 
-	if (BNXT_CHIP_P5(bp)) {
-		/* Reconfigure default receive ring and MRU. */
-		bnxt_hwrm_vnic_cfg(bp, rxq->vnic);
-	}
+	if (BNXT_HAS_RING_GRPS(bp))
+		rxq->vnic->dflt_ring_grp = bp->grp_info[rx_queue_id].fw_grp_id;
+	/* Reconfigure default receive ring and MRU. */
+	bnxt_hwrm_vnic_cfg(bp, rxq->vnic);
+
 	PMD_DRV_LOG(INFO, "Rx queue started %d\n", rx_queue_id);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.543763291 +0100
+++ 0041-net-bnxt-fix-ring-group-on-Rx-restart.patch	2022-05-25 17:26:58.627828420 +0100
@@ -1 +1 @@
-From 1b27f8245eee1209d9ee27304fae3515e93ef5b0 Mon Sep 17 00:00:00 2001
+From 3f9914a7b32eb59a5c4286114e5dbe2b5b936338 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1b27f8245eee1209d9ee27304fae3515e93ef5b0 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 8147404d9c..9b5ff4ce2d 100644
+index 8977138012..43c81df014 100644
@@ -26 +27 @@
-@@ -489,8 +489,9 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -488,8 +488,9 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)


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

* patch 'net/bnxt: check duplicate queue IDs' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (39 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix ring group on Rx restart' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: handle queue stop during RSS flow create' " Kevin Traynor
                   ` (12 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From c25b1d545ecb8b349565980185acd2c3f891ea73 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:13 +0530
Subject: [PATCH] net/bnxt: check duplicate queue IDs

[ upstream commit 447a0721ff9acfc14f5c64c031be7da956e9344a ]

Currently driver does not have a check for duplicate queue ids.
User must either specify all Rx queues created or no queues in the
flow create command. Repeating the queue index is invalid.

Also, moved the check for invalid queue to the beginning of the function.

Fixes: 239695f754cb ("net/bnxt: enhance RSS action support")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 49 +++++++++++++++++++++++-------------
 1 file changed, 32 insertions(+), 17 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 11dca5dc7e..2bb56692a5 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1116,5 +1116,5 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
 {
 	const struct rte_flow_action_rss *rss;
-	unsigned int rss_idx, i;
+	unsigned int rss_idx, i, j;
 	uint16_t hash_type;
 	uint64_t types;
@@ -1134,4 +1134,35 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
 	}
 
+	/* Validate Rx queues */
+	for (i = 0; i < rss->queue_num; i++) {
+		PMD_DRV_LOG(DEBUG, "RSS action Queue %d\n", rss->queue[i]);
+
+		if (rss->queue[i] >= bp->rx_nr_rings ||
+		    !bp->rx_queues[rss->queue[i]]) {
+			rte_flow_error_set(error,
+					   EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ACTION,
+					   act,
+					   "Invalid queue ID for RSS");
+			rc = -rte_errno;
+			goto ret;
+		}
+	}
+
+	/* Duplicate queue ids are not supported. */
+	for (i = 0; i < rss->queue_num; i++) {
+		for (j = i + 1; j < rss->queue_num; j++) {
+			if (rss->queue[i] == rss->queue[j]) {
+				rte_flow_error_set(error,
+						   EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ACTION,
+						   act,
+						   "Duplicate queue ID for RSS");
+				rc = -rte_errno;
+				goto ret;
+			}
+		}
+	}
+
 	/* Currently only Toeplitz hash is supported. */
 	if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT &&
@@ -1201,20 +1232,4 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
 		goto skip_rss_table;
 
-	/* Validate Rx queues */
-	for (i = 0; i < rss->queue_num; i++) {
-		PMD_DRV_LOG(DEBUG, "RSS action Queue %d\n", rss->queue[i]);
-
-		if (rss->queue[i] >= bp->rx_nr_rings ||
-		    !bp->rx_queues[rss->queue[i]]) {
-			rte_flow_error_set(error,
-					   EINVAL,
-					   RTE_FLOW_ERROR_TYPE_ACTION,
-					   act,
-					   "Invalid queue ID for RSS");
-			rc = -rte_errno;
-			goto ret;
-		}
-	}
-
 	/* Prepare the indirection table */
 	for (rss_idx = 0; rss_idx < HW_HASH_INDEX_SIZE; rss_idx++) {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.563661406 +0100
+++ 0042-net-bnxt-check-duplicate-queue-IDs.patch	2022-05-25 17:26:58.628828421 +0100
@@ -1 +1 @@
-From 447a0721ff9acfc14f5c64c031be7da956e9344a Mon Sep 17 00:00:00 2001
+From c25b1d545ecb8b349565980185acd2c3f891ea73 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 447a0721ff9acfc14f5c64c031be7da956e9344a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index bd96bbaf4c..fc5bacf82c 100644
+index 11dca5dc7e..2bb56692a5 100644


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

* patch 'net/bnxt: handle queue stop during RSS flow create' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (40 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: check duplicate queue IDs' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: avoid unnecessary endianness conversion' " Kevin Traynor
                   ` (11 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 8c464cf6185a3fd42b7d3e504489248b03a4e3a2 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:14 +0530
Subject: [PATCH] net/bnxt: handle queue stop during RSS flow create

[ upstream commit 962a521291e303e54a3b9a766ec43a30e23c2083 ]

The programming of the RSS table was not taking into account if
any of the queues in the set were stopped prior to the flow
creation, hence leading to a vnic RSS config cmd failure thrown by
the FW.
Fix by programming only the active queues in the RSS action queue
set.

Fixes: 239695f754cb ("net/bnxt: enhance RSS action support")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 2bb56692a5..8bdf2405f0 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1116,5 +1116,5 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
 {
 	const struct rte_flow_action_rss *rss;
-	unsigned int rss_idx, i, j;
+	unsigned int rss_idx, i, j, fw_idx;
 	uint16_t hash_type;
 	uint64_t types;
@@ -1233,9 +1233,19 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
 
 	/* Prepare the indirection table */
-	for (rss_idx = 0; rss_idx < HW_HASH_INDEX_SIZE; rss_idx++) {
+	for (rss_idx = 0, fw_idx = 0; rss_idx < HW_HASH_INDEX_SIZE;
+	     rss_idx++, fw_idx++) {
+		uint8_t *rxq_state = bp->eth_dev->data->rx_queue_state;
 		struct bnxt_rx_queue *rxq;
 		uint32_t idx;
 
-		idx = rss->queue[rss_idx % rss->queue_num];
+		for (i = 0; i < bp->rx_cp_nr_rings; i++) {
+			idx = rss->queue[fw_idx % rss->queue_num];
+			if (rxq_state[idx] != RTE_ETH_QUEUE_STATE_STOPPED)
+				break;
+			fw_idx++;
+		}
+
+		if (i == bp->rx_cp_nr_rings)
+			return 0;
 
 		if (BNXT_CHIP_P5(bp)) {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.583611510 +0100
+++ 0043-net-bnxt-handle-queue-stop-during-RSS-flow-create.patch	2022-05-25 17:26:58.630828424 +0100
@@ -1 +1 @@
-From 962a521291e303e54a3b9a766ec43a30e23c2083 Mon Sep 17 00:00:00 2001
+From 8c464cf6185a3fd42b7d3e504489248b03a4e3a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 962a521291e303e54a3b9a766ec43a30e23c2083 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index fc5bacf82c..f8e10968e3 100644
+index 2bb56692a5..8bdf2405f0 100644


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

* patch 'net/bnxt: avoid unnecessary endianness conversion' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (41 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: handle queue stop during RSS flow create' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix speed autonegotiation' " Kevin Traynor
                   ` (10 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From ce36a5d910fec6430ec168f3b499dae9a5849c40 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:15 +0530
Subject: [PATCH] net/bnxt: avoid unnecessary endianness conversion

[ upstream commit 8599820580c56477670b9f7260a2a1627a1d54dc ]

The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response is uint8_t.
So no need of endianness conversion while parsing response.
Also, signal_mode is the first 4bits of "active_fec_signal_mode".

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b4aeec593e..4d25099e0b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1507,5 +1507,5 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
 	link_info->phy_ver[2] = resp->phy_bld;
 	link_info->link_signal_mode =
-		rte_le_to_cpu_16(resp->active_fec_signal_mode);
+		resp->active_fec_signal_mode & HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_MASK;
 	link_info->force_pam4_link_speed =
 			rte_le_to_cpu_16(resp->force_pam4_link_speed);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.604369879 +0100
+++ 0044-net-bnxt-avoid-unnecessary-endianness-conversion.patch	2022-05-25 17:26:58.633828428 +0100
@@ -1 +1 @@
-From 8599820580c56477670b9f7260a2a1627a1d54dc Mon Sep 17 00:00:00 2001
+From ce36a5d910fec6430ec168f3b499dae9a5849c40 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8599820580c56477670b9f7260a2a1627a1d54dc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1b94e3c146..82d1a6205b 100644
+index b4aeec593e..4d25099e0b 100644
@@ -24 +25 @@
-@@ -1512,5 +1512,5 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
+@@ -1507,5 +1507,5 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,


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

* patch 'net/bnxt: fix speed autonegotiation' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (42 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: avoid unnecessary endianness conversion' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: force PHY update on certain configurations' " Kevin Traynor
                   ` (9 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From db239d729081876b4208bd99fdc90f31d43fe56c Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:16 +0530
Subject: [PATCH] net/bnxt: fix speed autonegotiation

[ upstream commit 34a075947879232fcbaf656665380ce25f0523aa ]

The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response
does not return correct value till the link is up. Driver cannot
rely on active_fec_signal_mode while setting autoneg speed.

While setting autoneg speed, driver is currently checking only
"auto_link_speed_mask". Fixed to check "auto_pam4_link_speed_mask"
as well. Also, while setting auto mode and setting speed mask,
driver will have to set both NRZ and PAM4 mask.

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 4d25099e0b..7f2ac2c72a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1425,15 +1425,15 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
 		}
 		/* AutoNeg - Advertise speeds specified. */
-		if (conf->auto_link_speed_mask &&
+		if ((conf->auto_link_speed_mask || conf->auto_pam4_link_speed_mask) &&
 		    !(conf->phy_flags & HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE)) {
 			req.auto_mode =
 				HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK;
-			if (conf->auto_pam4_link_speed_mask &&
-			    bp->link_info->link_signal_mode) {
+			if (conf->auto_pam4_link_speed_mask) {
 				enables |=
 				HWRM_PORT_PHY_CFG_IN_EN_AUTO_PAM4_LINK_SPD_MASK;
 				req.auto_link_pam4_speed_mask =
 				rte_cpu_to_le_16(conf->auto_pam4_link_speed_mask);
-			} else {
+			}
+			if (conf->auto_link_speed_mask) {
 				enables |=
 				HWRM_PORT_PHY_CFG_IN_EN_AUTO_LINK_SPEED_MASK;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.626281922 +0100
+++ 0045-net-bnxt-fix-speed-autonegotiation.patch	2022-05-25 17:26:58.637828434 +0100
@@ -1 +1 @@
-From 34a075947879232fcbaf656665380ce25f0523aa Mon Sep 17 00:00:00 2001
+From db239d729081876b4208bd99fdc90f31d43fe56c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34a075947879232fcbaf656665380ce25f0523aa ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 82d1a6205b..6e4753c508 100644
+index 4d25099e0b..7f2ac2c72a 100644
@@ -29 +30 @@
-@@ -1430,15 +1430,15 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
+@@ -1425,15 +1425,15 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)


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

* patch 'net/bnxt: force PHY update on certain configurations' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (43 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix speed autonegotiation' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix link status when port is stopped' " Kevin Traynor
                   ` (8 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 71ab79d3a7b646ef1ef8644a1e4b39e5aac30d79 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:17 +0530
Subject: [PATCH] net/bnxt: force PHY update on certain configurations

[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ]

Device is not obliged link down in certain scenarios, even
when forced. When FW does not allow any user other than the BMC
to shutdown the port, bnxt_get_hwrm_link_config() call always
returns link up. Force phy update always in that case,
else user configuration for speed/autoneg would not get applied
correctly.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  3 +--
 drivers/net/bnxt/bnxt_ethdev.c | 22 ++++++++++++++++++----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index b5dcc72568..83d23abce7 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -73,6 +73,5 @@
 
 #define BROADCOM_DEV_957508_N2100	0x5208
-#define IS_BNXT_DEV_957508_N2100(bp)	\
-	((bp)->pdev->id.subsystem_device_id == BROADCOM_DEV_957508_N2100)
+#define BROADCOM_DEV_957414_N225	0x4145
 
 #define BNXT_MAX_MTU		9574
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index afe54b1e25..89506e9ef1 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -660,4 +660,17 @@ static int bnxt_init_ctx_mem(struct bnxt *bp)
 }
 
+static inline bool bnxt_force_link_config(struct bnxt *bp)
+{
+	uint16_t subsystem_device_id = bp->pdev->id.subsystem_device_id;
+
+	switch (subsystem_device_id) {
+	case BROADCOM_DEV_957508_N2100:
+	case BROADCOM_DEV_957414_N225:
+		return true;
+	default:
+		return false;
+	}
+}
+
 static int bnxt_update_phy_setting(struct bnxt *bp)
 {
@@ -672,9 +685,10 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
 
 	/*
-	 * On BCM957508-N2100 adapters, FW will not allow any user other
-	 * than BMC to shutdown the port. bnxt_get_hwrm_link_config() call
-	 * always returns link up. Force phy update always in that case.
+	 * Device is not obliged link down in certain scenarios, even
+	 * when forced. When FW does not allow any user other than BMC
+	 * to shutdown the port, bnxt_get_hwrm_link_config() call always
+	 * returns link up. Force phy update always in that case.
 	 */
-	if (!new.link_status || IS_BNXT_DEV_957508_N2100(bp)) {
+	if (!new.link_status || bnxt_force_link_config(bp)) {
 		rc = bnxt_set_hwrm_link_config(bp, true);
 		if (rc) {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.649363397 +0100
+++ 0046-net-bnxt-force-PHY-update-on-certain-configurations.patch	2022-05-25 17:26:58.641828440 +0100
@@ -1 +1 @@
-From 9c1410bed3d801a63c8c5b47d457a7f69e95e989 Mon Sep 17 00:00:00 2001
+From 71ab79d3a7b646ef1ef8644a1e4b39e5aac30d79 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index e4e8e8ecf8..e86e51e1fa 100644
+index b5dcc72568..83d23abce7 100644
@@ -37 +38 @@
-index 181de42d15..1904db93c4 100644
+index afe54b1e25..89506e9ef1 100644


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

* patch 'net/bnxt: fix link status when port is stopped' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (44 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: force PHY update on certain configurations' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: recheck FW readiness if in reset process' " Kevin Traynor
                   ` (7 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 2ff3768d20f30106ba2fec1bcc573abe1a163805 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:18 +0530
Subject: [PATCH] net/bnxt: fix link status when port is stopped

[ upstream commit 7b6eba8856ce3088a759d8e14bb0b73872f65526 ]

Driver forces link down during port stop. But device is not obliged
link down in certain scenarios, even when forced. In that case,
subsequent link queries returns link as up.
Fixed to return link status as down when port is stopped.
Driver is already doing that for VF/NPAR/MH functions.

Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 89506e9ef1..9b3b7b76df 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1828,4 +1828,12 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
 		goto out;
 
+	/* Only single function PF can bring the phy down.
+	 * In certain scenarios, device is not obliged link down even when forced.
+	 * When port is stopped, report link down in those cases.
+	 */
+	if (!eth_dev->data->dev_started &&
+	    (!BNXT_SINGLE_PF(bp) || bnxt_force_link_config(bp)))
+		goto out;
+
 	do {
 		/* Retrieve link info from hardware */
@@ -1845,10 +1853,4 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
 	} while (cnt--);
 
-	/* Only single function PF can bring phy down.
-	 * When port is stopped, report link down for VF/MH/NPAR functions.
-	 */
-	if (!BNXT_SINGLE_PF(bp) && !eth_dev->data->dev_started)
-		memset(&new, 0, sizeof(new));
-
 out:
 	/* Timed out or success */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.672293116 +0100
+++ 0047-net-bnxt-fix-link-status-when-port-is-stopped.patch	2022-05-25 17:26:58.645828446 +0100
@@ -1 +1 @@
-From 7b6eba8856ce3088a759d8e14bb0b73872f65526 Mon Sep 17 00:00:00 2001
+From 2ff3768d20f30106ba2fec1bcc573abe1a163805 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b6eba8856ce3088a759d8e14bb0b73872f65526 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 1904db93c4..69f1117ffa 100644
+index 89506e9ef1..9b3b7b76df 100644
@@ -26 +27 @@
-@@ -1827,4 +1827,12 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -1828,4 +1828,12 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
@@ -39 +40 @@
-@@ -1844,10 +1852,4 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -1845,10 +1853,4 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)


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

* patch 'net/bnxt: recheck FW readiness if in reset process' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (45 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix link status when port is stopped' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/bnxt: fix freeing VNIC filters' " Kevin Traynor
                   ` (6 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From fa1a893ff78d5c0a095f758dcf72fb7468c32215 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:19 +0530
Subject: [PATCH] net/bnxt: recheck FW readiness if in reset process

[ upstream commit 5591bb92ced3a841398eec4444f593a22b1ca6ea ]

If Firmware is still in reset process and returns the error
HWRM_ERR_CODE_HOT_RESET_PROGRESS, retry VER_GET command.
We have to do it in bnxt_handle_if_change_status().

Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9b3b7b76df..68e28f95f6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -178,4 +178,5 @@ static void bnxt_dev_recover(void *arg);
 static void bnxt_free_error_recovery_info(struct bnxt *bp);
 static void bnxt_free_rep_info(struct bnxt *bp);
+static int bnxt_check_fw_ready(struct bnxt *bp);
 
 int is_bnxt_in_error(struct bnxt *bp)
@@ -1351,4 +1352,9 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
 	/* clear fatal flag so that re-init happens */
 	bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
+
+	rc = bnxt_check_fw_ready(bp);
+	if (rc)
+		return rc;
+
 	rc = bnxt_init_resources(bp, true);
 
@@ -4326,5 +4332,5 @@ static int bnxt_restore_filters(struct bnxt *bp)
 static int bnxt_check_fw_ready(struct bnxt *bp)
 {
-	int timeout = bp->fw_reset_max_msecs;
+	int timeout = bp->fw_reset_max_msecs ? : BNXT_MAX_FW_RESET_TIMEOUT;
 	int rc = 0;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.695118481 +0100
+++ 0048-net-bnxt-recheck-FW-readiness-if-in-reset-process.patch	2022-05-25 17:26:58.648828450 +0100
@@ -1 +1 @@
-From 5591bb92ced3a841398eec4444f593a22b1ca6ea Mon Sep 17 00:00:00 2001
+From fa1a893ff78d5c0a095f758dcf72fb7468c32215 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5591bb92ced3a841398eec4444f593a22b1ca6ea ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 69f1117ffa..abcb534af6 100644
+index 9b3b7b76df..68e28f95f6 100644
@@ -40 +41 @@
-@@ -4325,5 +4331,5 @@ static int bnxt_restore_filters(struct bnxt *bp)
+@@ -4326,5 +4332,5 @@ static int bnxt_restore_filters(struct bnxt *bp)


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

* patch 'net/bnxt: fix freeing VNIC filters' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (46 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: recheck FW readiness if in reset process' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'net/mlx5: fix no-green metering with RSS' " Kevin Traynor
                   ` (5 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 68576536257d4240faea38b7fe253bddd0fef869 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:20 +0530
Subject: [PATCH] net/bnxt: fix freeing VNIC filters

[ upstream commit 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 ]

In bnxt_free_all_filters(), all the filters attached to a vnic are removed.
But each of these filters hold a backreference ptr to the vnic and they
need to be reset to NULL now. Otherwise, during a normal testpmd quit, as
part of dev_close_op(), first bnxt_free_all_filters() is invoked in
dev_stop, followed by bnxt_free_filter_mem() from bnxt_uninit_resources(),
which finds a filter with a vnic back reference ptr and now
bnxt_hwrm_clean_up_l2_filter() also tries to remove the filter from the
vnic's filter list which was already done as part of
bnxt_free_all_filters().

Fixes: f0f6b5e6cf94 ("net/bnxt: fix reusing L2 filter")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 1d08e03b2f..b0c3bbd1b2 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -100,4 +100,6 @@ void bnxt_free_all_filters(struct bnxt *bp)
 			STAILQ_INSERT_TAIL(&bp->free_filter_list,
 					filter, next);
+			if (filter->vnic)
+				filter->vnic = NULL;
 			filter = temp_filter;
 		}
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.717515917 +0100
+++ 0049-net-bnxt-fix-freeing-VNIC-filters.patch	2022-05-25 17:26:58.649828452 +0100
@@ -1 +1 @@
-From 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 Mon Sep 17 00:00:00 2001
+From 68576536257d4240faea38b7fe253bddd0fef869 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/mlx5: fix no-green metering with RSS' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (47 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/bnxt: fix freeing VNIC filters' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'doc: fix build with sphinx 4.5' " Kevin Traynor
                   ` (4 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Shun Hao; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 671e8fa0c83244427df0b92a62156b6e700ee68d Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Thu, 14 Apr 2022 10:55:20 +0300
Subject: [PATCH] net/mlx5: fix no-green metering with RSS

[ upstream commit fc7211097d41957bd6e29d64fd42ce679b4147b8 ]

When a meter with RSS action being used, there might be several
sub-flows using different sub-policies in the flow splitting stage.
If there's no green action, there's an error that will always use the
same sub-policy for all sub-flows, some resources will be
overwritten and cannot be released, leading assert during port close.

This patch fixes this issue by checking both green and yellow queue
index during getting a blank sub-policy, to avoid the incorrect
resource overwrite.

Fixes: b38a12272b3a ("net/mlx5: split meter color policy handling")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@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 8a3d9b5b6f..b24c79b324 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -16991,5 +16991,6 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev,
 	}
 	/* Create sub policy. */
-	if (!mtr_policy->sub_policys[domain][0]->rix_hrxq[0]) {
+	if (!mtr_policy->sub_policys[domain][0]->rix_hrxq[RTE_COLOR_GREEN] &&
+	    !mtr_policy->sub_policys[domain][0]->rix_hrxq[RTE_COLOR_YELLOW]) {
 		/* Reuse the first pre-allocated sub_policy. */
 		sub_policy = mtr_policy->sub_policys[domain][0];
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.737243659 +0100
+++ 0050-net-mlx5-fix-no-green-metering-with-RSS.patch	2022-05-25 17:26:58.660828468 +0100
@@ -1 +1 @@
-From fc7211097d41957bd6e29d64fd42ce679b4147b8 Mon Sep 17 00:00:00 2001
+From 671e8fa0c83244427df0b92a62156b6e700ee68d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fc7211097d41957bd6e29d64fd42ce679b4147b8 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index cb5006bb11..f9c56204c4 100644
+index 8a3d9b5b6f..b24c79b324 100644
@@ -29 +30 @@
-@@ -17055,5 +17055,6 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev,
+@@ -16991,5 +16991,6 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev,


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

* patch 'doc: fix build with sphinx 4.5' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (48 preceding siblings ...)
  2022-05-25 16:28 ` patch 'net/mlx5: fix no-green metering with RSS' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'eventdev/eth_rx: fix telemetry Rx stats reset' " Kevin Traynor
                   ` (3 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From ec08dcaf4b6f298a983ebe23622981e0d7fe9ebf Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Sun, 1 May 2022 20:27:21 +0530
Subject: [PATCH] doc: fix build with sphinx 4.5

[ upstream commit fe45ccd20552f03fa62843e44d37cf6e2bf639b5 ]

Latest Sphinx checks C language syntax more aggressively.
Fix the following warning by correcting C language syntax.

doc/guides/prog_guide/event_ethernet_rx_adapter.rst:243:
WARNING: Could not lex literal_block as "c". Highlighting skipped.

Fixes: 3c838062b91f ("eventdev: introduce event vector Rx capability")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 doc/guides/prog_guide/event_ethernet_rx_adapter.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
index 67b11e1563..3b4ef502b2 100644
--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
@@ -258,6 +258,6 @@ A loop processing ``rte_event_vector`` containing mbufs is shown below.
                 }
         break;
-        case ...
-        ...
+        case default:
+                /* Handle other event_types. */
         }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.768625141 +0100
+++ 0051-doc-fix-build-with-sphinx-4.5.patch	2022-05-25 17:26:58.661828469 +0100
@@ -1 +1 @@
-From fe45ccd20552f03fa62843e44d37cf6e2bf639b5 Mon Sep 17 00:00:00 2001
+From ec08dcaf4b6f298a983ebe23622981e0d7fe9ebf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fe45ccd20552f03fa62843e44d37cf6e2bf639b5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'eventdev/eth_rx: fix telemetry Rx stats reset' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (49 preceding siblings ...)
  2022-05-25 16:28 ` patch 'doc: fix build with sphinx 4.5' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'event/cnxk: fix out of bounds access in test' " Kevin Traynor
                   ` (2 subsequent siblings)
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: David Marchand; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 09d859555f9d1555228ec3494443cba926f09643 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 24 Mar 2022 16:28:30 +0100
Subject: [PATCH] eventdev/eth_rx: fix telemetry Rx stats reset

[ upstream commit b450a990b07e008077377a6dfa45a562b3f9a496 ]

Caught by covscan:

1. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279:
logical_vs_bitwise: "~(*__ctype_b_loc()[(int)*params] & 2048 /*
(unsigned short)_ISdigit */)" is always 1/true regardless of the values
of its operand. This occurs as the logical second operand of "||".
2. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279: remediation:
Did you intend to use "!" rather than "~"?

While isdigit return value should be compared as an int to 0,
prefer ! since all of this file uses this convention.

Fixes: 814d01709328 ("eventdev/eth_rx: support telemetry")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 4b46e9b6c6..2356e2a535 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -3315,5 +3315,5 @@ handle_rxa_stats_reset(const char *cmd __rte_unused,
 	uint8_t rx_adapter_id;
 
-	if (params == NULL || strlen(params) == 0 || ~isdigit(*params))
+	if (params == NULL || strlen(params) == 0 || !isdigit(*params))
 		return -1;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.788081205 +0100
+++ 0052-eventdev-eth_rx-fix-telemetry-Rx-stats-reset.patch	2022-05-25 17:26:58.663828472 +0100
@@ -1 +1 @@
-From b450a990b07e008077377a6dfa45a562b3f9a496 Mon Sep 17 00:00:00 2001
+From 09d859555f9d1555228ec3494443cba926f09643 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b450a990b07e008077377a6dfa45a562b3f9a496 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index ff83ce8b67..bf8741d2ea 100644
+index 4b46e9b6c6..2356e2a535 100644
@@ -31 +32 @@
-@@ -3335,5 +3335,5 @@ handle_rxa_stats_reset(const char *cmd __rte_unused,
+@@ -3315,5 +3315,5 @@ handle_rxa_stats_reset(const char *cmd __rte_unused,


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

* patch 'event/cnxk: fix out of bounds access in test' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (50 preceding siblings ...)
  2022-05-25 16:28 ` patch 'eventdev/eth_rx: fix telemetry Rx stats reset' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'eal/x86: fix unaligned access for small memcpy' " Kevin Traynor
  2022-05-25 16:28 ` patch 'devargs: fix leak on hotplug failure' " Kevin Traynor
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From eeaeb58d564b22fe71263396de3d9bd04ff072c6 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Sun, 24 Apr 2022 21:54:55 +0530
Subject: [PATCH] event/cnxk: fix out of bounds access in test

[ upstream commit 2f5b0c48629e53400f0fa85e22a56e7fa9f6be65 ]

Fix out of bounds array access reported in coverity scan.

Coverity issue: 375817
Fixes: 2351506401e ("event/cnxk: add SSO selftest and dump")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/event/cnxk/cnxk_eventdev_selftest.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/event/cnxk/cnxk_eventdev_selftest.c b/drivers/event/cnxk/cnxk_eventdev_selftest.c
index 2fe6467f88..3aa6f081a7 100644
--- a/drivers/event/cnxk/cnxk_eventdev_selftest.c
+++ b/drivers/event/cnxk/cnxk_eventdev_selftest.c
@@ -627,4 +627,10 @@ launch_workers_and_wait(int (*main_thread)(void *),
 		/* skip main */ 1,
 		/* wrap */ 0);
+	if (w_lcore == RTE_MAX_LCORE) {
+		plt_err("Failed to get next available lcore");
+		free(param);
+		return -1;
+	}
+
 	rte_eal_remote_launch(main_thread, &param[0], w_lcore);
 
@@ -636,4 +642,10 @@ launch_workers_and_wait(int (*main_thread)(void *),
 		rte_atomic_thread_fence(__ATOMIC_RELEASE);
 		w_lcore = rte_get_next_lcore(w_lcore, 1, 0);
+		if (w_lcore == RTE_MAX_LCORE) {
+			plt_err("Failed to get next available lcore");
+			free(param);
+			return -1;
+		}
+
 		rte_eal_remote_launch(worker_thread, &param[port], w_lcore);
 	}
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.809790563 +0100
+++ 0053-event-cnxk-fix-out-of-bounds-access-in-test.patch	2022-05-25 17:26:58.664828474 +0100
@@ -1 +1 @@
-From 2f5b0c48629e53400f0fa85e22a56e7fa9f6be65 Mon Sep 17 00:00:00 2001
+From eeaeb58d564b22fe71263396de3d9bd04ff072c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2f5b0c48629e53400f0fa85e22a56e7fa9f6be65 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'eal/x86: fix unaligned access for small memcpy' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (51 preceding siblings ...)
  2022-05-25 16:28 ` patch 'event/cnxk: fix out of bounds access in test' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  2022-05-25 16:28 ` patch 'devargs: fix leak on hotplug failure' " Kevin Traynor
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: Luc Pelletier; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 29fa5a6eaff312cc1163fff17ac4455c1cf63361 Mon Sep 17 00:00:00 2001
From: Luc Pelletier <lucp.at.work@gmail.com>
Date: Fri, 25 Feb 2022 11:38:05 -0500
Subject: [PATCH] eal/x86: fix unaligned access for small memcpy

[ upstream commit 00901e4d1a9ee7c7b43d0a3592683f0a420a331d ]

Calls to rte_memcpy for 1 < n < 16 could result in unaligned
loads/stores, which is undefined behaviour according to the C
standard, and strict aliasing violations.

The code was changed to use a packed structure that allows aliasing
(using the __may_alias__ attribute) to perform the load/store
operations. This results in code that has the same performance as the
original code and that is also C standards-compliant.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Luc Pelletier <lucp.at.work@gmail.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/eal/include/rte_common.h     |   5 ++
 lib/eal/x86/include/rte_memcpy.h | 133 ++++++++++++-------------------
 2 files changed, 56 insertions(+), 82 deletions(-)

diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index eee1ada379..6f004f6cb3 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -86,4 +86,9 @@ typedef uint16_t unaligned_uint16_t;
 #define __rte_packed __attribute__((__packed__))
 
+/**
+ * Macro to mark a type that is not subject to type-based aliasing rules
+ */
+#define __rte_may_alias __attribute__((__may_alias__))
+
 /******* Macro to mark functions and fields scheduled for removal *****/
 #define __rte_deprecated	__attribute__((__deprecated__))
diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
index 1b6c6e585f..18aa4e43a7 100644
--- a/lib/eal/x86/include/rte_memcpy.h
+++ b/lib/eal/x86/include/rte_memcpy.h
@@ -46,4 +46,50 @@ static __rte_always_inline void *
 rte_memcpy(void *dst, const void *src, size_t n);
 
+/**
+ * Copy bytes from one location to another,
+ * locations should not overlap.
+ * Use with n <= 15.
+ */
+static __rte_always_inline void *
+rte_mov15_or_less(void *dst, const void *src, size_t n)
+{
+	/**
+	 * Use the following structs to avoid violating C standard
+	 * alignment requirements and to avoid strict aliasing bugs
+	 */
+	struct rte_uint64_alias {
+		uint64_t val;
+	} __rte_packed __rte_may_alias;
+	struct rte_uint32_alias {
+		uint32_t val;
+	} __rte_packed __rte_may_alias;
+	struct rte_uint16_alias {
+		uint16_t val;
+	} __rte_packed __rte_may_alias;
+
+	void *ret = dst;
+	if (n & 8) {
+		((struct rte_uint64_alias *)dst)->val =
+			((const struct rte_uint64_alias *)src)->val;
+		src = (const uint64_t *)src + 1;
+		dst = (uint64_t *)dst + 1;
+	}
+	if (n & 4) {
+		((struct rte_uint32_alias *)dst)->val =
+			((const struct rte_uint32_alias *)src)->val;
+		src = (const uint32_t *)src + 1;
+		dst = (uint32_t *)dst + 1;
+	}
+	if (n & 2) {
+		((struct rte_uint16_alias *)dst)->val =
+			((const struct rte_uint16_alias *)src)->val;
+		src = (const uint16_t *)src + 1;
+		dst = (uint16_t *)dst + 1;
+	}
+	if (n & 1)
+		*(uint8_t *)dst = *(const uint8_t *)src;
+	return ret;
+}
+
 #if defined __AVX512F__ && defined RTE_MEMCPY_AVX512
 
@@ -172,6 +218,4 @@ static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
@@ -182,22 +226,5 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08)
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
@@ -380,6 +407,4 @@ static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
@@ -390,23 +415,5 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08) {
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		}
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
@@ -673,6 +680,4 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
 	__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8;
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
@@ -683,23 +688,5 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08) {
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		}
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
@@ -819,25 +806,7 @@ rte_memcpy_aligned(void *dst, const void *src, size_t n)
 	void *ret = dst;
 
-	/* Copy size <= 16 bytes */
+	/* Copy size < 16 bytes */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dst = *(const uint8_t *)src;
-			src = (const uint8_t *)src + 1;
-			dst = (uint8_t *)dst + 1;
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dst = *(const uint16_t *)src;
-			src = (const uint16_t *)src + 1;
-			dst = (uint16_t *)dst + 1;
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dst = *(const uint32_t *)src;
-			src = (const uint32_t *)src + 1;
-			dst = (uint32_t *)dst + 1;
-		}
-		if (n & 0x08)
-			*(uint64_t *)dst = *(const uint64_t *)src;
-
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.829475423 +0100
+++ 0054-eal-x86-fix-unaligned-access-for-small-memcpy.patch	2022-05-25 17:26:58.665828475 +0100
@@ -1 +1 @@
-From 00901e4d1a9ee7c7b43d0a3592683f0a420a331d Mon Sep 17 00:00:00 2001
+From 29fa5a6eaff312cc1163fff17ac4455c1cf63361 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 00901e4d1a9ee7c7b43d0a3592683f0a420a331d ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index d56a7570c0..a96cc2a138 100644
+index eee1ada379..6f004f6cb3 100644


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

* patch 'devargs: fix leak on hotplug failure' has been queued to stable release 21.11.2
  2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (52 preceding siblings ...)
  2022-05-25 16:28 ` patch 'eal/x86: fix unaligned access for small memcpy' " Kevin Traynor
@ 2022-05-25 16:28 ` Kevin Traynor
  53 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:28 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 214462a05b8e0cf08bbd06c10441d25baae17137 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 14 Apr 2022 13:27:56 +0200
Subject: [PATCH] devargs: fix leak on hotplug failure

[ upstream commit 26d734b5d280b96f91f00f5e0c6c7eff99facef2 ]

Caught by ASan, if a secondary process tried to attach a device with an
incorrect driver name, devargs was leaked.

Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/eal/common/eal_common_dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index e1e9976d8d..07f285f862 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -186,6 +186,8 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
 
 err_devarg:
-	if (rte_devargs_remove(da) != 0)
+	if (rte_devargs_remove(da) != 0) {
 		rte_devargs_reset(da);
+		free(da);
+	}
 	return ret;
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.849839718 +0100
+++ 0055-devargs-fix-leak-on-hotplug-failure.patch	2022-05-25 17:26:58.665828475 +0100
@@ -1 +1 @@
-From 26d734b5d280b96f91f00f5e0c6c7eff99facef2 Mon Sep 17 00:00:00 2001
+From 214462a05b8e0cf08bbd06c10441d25baae17137 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26d734b5d280b96f91f00f5e0c6c7eff99facef2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index c0ee4e442f..9d913e5478 100644
+index e1e9976d8d..07f285f862 100644
@@ -21 +22 @@
-@@ -181,6 +181,8 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
+@@ -186,6 +186,8 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)


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

* Re: patch 'common/cnxk: fix SQ flush sequence' has been queued to stable release 21.11.2
  2022-05-25 16:28 ` patch 'common/cnxk: fix SQ flush sequence' " Kevin Traynor
@ 2022-05-25 16:35   ` Kevin Traynor
  0 siblings, 0 replies; 56+ messages in thread
From: Kevin Traynor @ 2022-05-25 16:35 UTC (permalink / raw)
  To: Satha Rao; +Cc: Jerin Jacob, dpdk stable

On 25/05/2022 17:28, Kevin Traynor wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 21.11.2
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 05/30/22. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable
> 
> This queued commit can be viewed at:
> https://github.com/kevintraynor/dpdk-stable/commit/8790891a6dac401fe968022272e31a14d6b99fb9
> 
> Thanks.
> 
> Kevin
> 
> ---
>  From 8790891a6dac401fe968022272e31a14d6b99fb9 Mon Sep 17 00:00:00 2001
> From: Satha Rao <skoteshwar@marvell.com>
> Date: Sun, 8 May 2022 13:18:16 +0530
> Subject: [PATCH] common/cnxk: fix SQ flush sequence
> 
> [ upstream commit e746aec161cc5642935e1ac4b823bdb2d722ec27 ]
> 
> Fix SQ flush sequence to issue NIX RX SW Sync after SMQ flush.
> This sync ensures that all the packets that were in-flight are
> flushed out of memory.
> 
> This patch also fixes NULL return issues reported by
> static analysis tool in Traffic Manager and sync's mailbox
> to that of the kernel version.
> 
> Fixes: 05d727e8b14a ("common/cnxk: support NIX traffic management")
> Fixes: 0b7e667ee303 ("common/cnxk: enable packet marking")
> 

Please check this patch. In general, fixing different issues from 
different releases in the same patch should be avoided, as it makes it a 
bit more difficult to backport. Need to check that there isn't 
dependencies between the parts that apply and the parts that don't etc. 
Thanks.

> Signed-off-by: Satha Rao <skoteshwar@marvell.com>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
>   drivers/common/cnxk/roc_mbox.h   | 35 ++++++++++++++++++++++++++++++--
>   drivers/common/cnxk/roc_nix_tm.c |  7 +++++++
>   2 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
> index b63fe108c9..9a8ae6b216 100644
> --- a/drivers/common/cnxk/roc_mbox.h
> +++ b/drivers/common/cnxk/roc_mbox.h
> @@ -115,5 +115,5 @@ struct mbox_msghdr {
>   	M(SSO_GRP_GET_PRIORITY, 0x606, sso_grp_get_priority, sso_info_req,     \
>   	  sso_grp_priority)                                                    \
> -	M(SSO_WS_CACHE_INV, 0x607, sso_ws_cache_inv, msg_req, msg_rsp)         \
> +	M(SSO_WS_CACHE_INV, 0x607, sso_ws_cache_inv, ssow_lf_inv_req, msg_rsp) \
>   	M(SSO_GRP_QOS_CONFIG, 0x608, sso_grp_qos_config, sso_grp_qos_cfg,      \
>   	  msg_rsp)                                                             \
> @@ -124,4 +124,7 @@ struct mbox_msghdr {
>   	M(SSO_HW_RELEASE_XAQ, 0x611, sso_hw_release_xaq_aura,                  \
>   	  sso_hw_xaq_release, msg_rsp)                                         \
> +	M(SSO_CONFIG_LSW, 0x612, ssow_config_lsw, ssow_config_lsw, msg_rsp)    \
> +	M(SSO_HWS_CHNG_MSHIP, 0x613, ssow_chng_mship, ssow_chng_mship,         \
> +	  msg_rsp)                                                             \
>   	/* TIM mbox IDs (range 0x800 - 0x9FF) */                               \
>   	M(TIM_LF_ALLOC, 0x800, tim_lf_alloc, tim_lf_alloc_req,                 \
> @@ -248,5 +251,6 @@ struct mbox_msghdr {
>   	  nix_bp_cfg_rsp)                                                      \
>   	M(NIX_CPT_BP_DISABLE, 0x8021, nix_cpt_bp_disable, nix_bp_cfg_req,      \
> -	  msg_rsp)
> +	  msg_rsp)                                                             \
> +	M(NIX_RX_SW_SYNC, 0x8022, nix_rx_sw_sync, msg_req, msg_rsp)
>   
>   /* Messages initiated by AF (range 0xC00 - 0xDFF) */
> @@ -1241,4 +1245,31 @@ struct ssow_lf_free_req {
>   };
>   
> +#define SSOW_INVAL_SELECTIVE_VER 0x1000
> +struct ssow_lf_inv_req {
> +	struct mbox_msghdr hdr;
> +	uint16_t nb_hws;		 /* Number of HWS to invalidate*/
> +	uint16_t hws[MAX_RVU_BLKLF_CNT]; /* Array of HWS */
> +};
> +
> +struct ssow_config_lsw {
> +	struct mbox_msghdr hdr;
> +#define SSOW_LSW_DIS	 0
> +#define SSOW_LSW_GW_WAIT 1
> +#define SSOW_LSW_GW_IMM	 2
> +	uint8_t __io lsw_mode;
> +#define SSOW_WQE_REL_LSW_WAIT 0
> +#define SSOW_WQE_REL_IMM      1
> +	uint8_t __io wqe_release;
> +};
> +
> +struct ssow_chng_mship {
> +	struct mbox_msghdr hdr;
> +	uint8_t __io set;	 /* Membership set to modify. */
> +	uint8_t __io enable;	 /* Enable/Disable the hwgrps. */
> +	uint8_t __io hws;	 /* HWS to modify. */
> +	uint16_t __io nb_hwgrps; /* Number of hwgrps in the array */
> +	uint16_t __io hwgrps[MAX_RVU_BLKLF_CNT]; /* Array of hwgrps. */
> +};
> +
>   struct sso_hw_setconfig {
>   	struct mbox_msghdr hdr;
> diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
> index ebb27a3106..506cb066ce 100644
> --- a/drivers/common/cnxk/roc_nix_tm.c
> +++ b/drivers/common/cnxk/roc_nix_tm.c
> @@ -565,4 +565,5 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
>   	struct nix_tm_node_list *list;
>   	enum roc_nix_tm_tree tree;
> +	struct msg_req *req;
>   	struct mbox *mbox;
>   	struct nix *nix;
> @@ -654,4 +655,10 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
>   		goto cleanup;
>   	}
> +
> +	req = mbox_alloc_msg_nix_rx_sw_sync(mbox);
> +	if (!req)
> +		return -ENOSPC;
> +
> +	rc = mbox_process(mbox);
>   cleanup:
>   	/* Restore cgx state */


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

end of thread, other threads:[~2022-05-25 16:35 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' has been queued to stable release 21.11.2 Kevin Traynor
2022-05-25 16:27 ` patch 'net/netvsc: fix hot adding multiple VF PCI devices' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/nfp: remove unneeded header inclusion' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/bonding: fix RSS key config with extended key length' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/vhost: fix access to freed memory' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/virtio: restore some optimisations with AVX512' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/vhost: fix TSO feature default disablement' " Kevin Traynor
2022-05-25 16:28 ` patch 'vhost: fix missing virtqueue lock protection' " Kevin Traynor
2022-05-25 16:28 ` patch 'vdpa/mlx5: fix interrupt trash that leads to crash' " Kevin Traynor
2022-05-25 16:28 ` patch 'vdpa/mlx5: fix dead loop when process interrupted' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/dpaa: fix event queue detach' " Kevin Traynor
2022-05-25 16:28 ` patch 'doc: update matching versions in ice guide' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bonding: fix stopping non-active slaves' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bonding: fix slave stop and remove on port close' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/tap: fix interrupt handler freeing' " Kevin Traynor
2022-05-25 16:28 ` patch 'ethdev: fix build with vtune option' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix order of clearing imissed register in PF' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix MAC and queues HW statistics overflow' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix pseudo-sharing between threads' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix mbuf free on Tx done cleanup' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix RSS disable' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix rollback on RSS hash update' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: remove redundant RSS tuple field' " Kevin Traynor
2022-05-25 16:28 ` patch 'ethdev: fix RSS update when RSS is disabled' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: remove unnecessary RSS switch' " Kevin Traynor
2022-05-25 16:28 ` patch 'app/testpmd: check statistics query before printing' " Kevin Traynor
2022-05-25 16:28 ` patch 'app/testpmd: fix MTU verification' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/cnxk: add message on flow parsing failure' " Kevin Traynor
2022-05-25 16:28 ` patch 'common/cnxk: fix unaligned access to device memory' " Kevin Traynor
2022-05-25 16:28 ` patch 'common/cnxk: fix null pointer dereference' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/cnxk: fix uninitialized variables' " Kevin Traynor
2022-05-25 16:28 ` patch 'common/cnxk: fix SQ flush sequence' " Kevin Traynor
2022-05-25 16:35   ` Kevin Traynor
2022-05-25 16:28 ` patch 'net/cnxk: add barrier after meta batch free in scalar' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix reordering in NEON Rx' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix device capability reporting' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: remove unused macro' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix Rx configuration' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix RSS action' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix ring group on Rx restart' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: check duplicate queue IDs' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: handle queue stop during RSS flow create' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: avoid unnecessary endianness conversion' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix speed autonegotiation' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: force PHY update on certain configurations' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix link status when port is stopped' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: recheck FW readiness if in reset process' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix freeing VNIC filters' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/mlx5: fix no-green metering with RSS' " Kevin Traynor
2022-05-25 16:28 ` patch 'doc: fix build with sphinx 4.5' " Kevin Traynor
2022-05-25 16:28 ` patch 'eventdev/eth_rx: fix telemetry Rx stats reset' " Kevin Traynor
2022-05-25 16:28 ` patch 'event/cnxk: fix out of bounds access in test' " Kevin Traynor
2022-05-25 16:28 ` patch 'eal/x86: fix unaligned access for small memcpy' " Kevin Traynor
2022-05-25 16:28 ` patch 'devargs: fix leak on hotplug failure' " 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).