patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1
@ 2021-02-05 11:14 luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: " luca.boccassi
                   ` (274 more replies)
  0 siblings, 275 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ab9b79cd737dabf9eb032ca1f328e79f5df85397 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Tue, 1 Dec 2020 19:39:58 +0300
Subject: [PATCH] eal/windows: fix build with MinGW-w64 8

[ upstream commit 93bf432dd58236235e8a930a108dbcaee81fc5fc ]

MinGW-w64 above 8.0.0 exposes VirtualAlloc2() API in headers, but lacks
it in import libraries. Hence, availability of this API at compile-time
can't be used to choose between locating VirtualAlloc2() manually or
relying on the dynamic linker.

Fix redefinition compile-time errors.
Always link VirtualAlloc2() when using GCC.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")

Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/windows/eal_memory.c | 42 +++++++++++++++--------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
index 7f8d3c2fa4..2cf5a5e649 100644
--- a/lib/librte_eal/windows/eal_memory.c
+++ b/lib/librte_eal/windows/eal_memory.c
@@ -18,13 +18,12 @@
 #include <rte_virt2phys.h>
 
 /* MinGW-w64 headers lack VirtualAlloc2() in some distributions.
- * Provide a copy of definitions and code to load it dynamically.
  * Note: definitions are copied verbatim from Microsoft documentation
  * and don't follow DPDK code style.
- *
- * MEM_RESERVE_PLACEHOLDER being defined means VirtualAlloc2() is present too.
  */
-#ifndef MEM_PRESERVE_PLACEHOLDER
+#ifndef MEM_EXTENDED_PARAMETER_TYPE_BITS
+
+#define MEM_EXTENDED_PARAMETER_TYPE_BITS 4
 
 /* https://docs.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-mem_extended_parameter_type */
 typedef enum MEM_EXTENDED_PARAMETER_TYPE {
@@ -37,8 +36,6 @@ typedef enum MEM_EXTENDED_PARAMETER_TYPE {
 	MemExtendedParameterMax
 } *PMEM_EXTENDED_PARAMETER_TYPE;
 
-#define MEM_EXTENDED_PARAMETER_TYPE_BITS 4
-
 /* https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-mem_extended_parameter */
 typedef struct MEM_EXTENDED_PARAMETER {
 	struct {
@@ -54,6 +51,8 @@ typedef struct MEM_EXTENDED_PARAMETER {
 	} DUMMYUNIONNAME;
 } MEM_EXTENDED_PARAMETER, *PMEM_EXTENDED_PARAMETER;
 
+#endif /* defined(MEM_EXTENDED_PARAMETER_TYPE_BITS) */
+
 /* https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc2 */
 typedef PVOID (*VirtualAlloc2_type)(
 	HANDLE                 Process,
@@ -65,17 +64,19 @@ typedef PVOID (*VirtualAlloc2_type)(
 	ULONG                  ParameterCount
 );
 
-/* VirtualAlloc2() flags. */
+/* MinGW-w64 distributions, even those that declare VirtualAlloc2(),
+ * lack it in import libraries, which results in a failure at link time.
+ * Link it dynamically in such case.
+ */
+static VirtualAlloc2_type VirtualAlloc2_ptr;
+
+#ifdef RTE_TOOLCHAIN_GCC
+
 #define MEM_COALESCE_PLACEHOLDERS 0x00000001
 #define MEM_PRESERVE_PLACEHOLDER  0x00000002
 #define MEM_REPLACE_PLACEHOLDER   0x00004000
 #define MEM_RESERVE_PLACEHOLDER   0x00040000
 
-/* Named exactly as the function, so that user code does not depend
- * on it being found at compile time or dynamically.
- */
-static VirtualAlloc2_type VirtualAlloc2;
-
 int
 eal_mem_win32api_init(void)
 {
@@ -89,7 +90,7 @@ eal_mem_win32api_init(void)
 	int ret = 0;
 
 	/* Already done. */
-	if (VirtualAlloc2 != NULL)
+	if (VirtualAlloc2_ptr != NULL)
 		return 0;
 
 	library = LoadLibraryA(library_name);
@@ -98,9 +99,9 @@ eal_mem_win32api_init(void)
 		return -1;
 	}
 
-	VirtualAlloc2 = (VirtualAlloc2_type)(
+	VirtualAlloc2_ptr = (VirtualAlloc2_type)(
 		(void *)GetProcAddress(library, function));
-	if (VirtualAlloc2 == NULL) {
+	if (VirtualAlloc2_ptr == NULL) {
 		RTE_LOG_WIN32_ERR("GetProcAddress(\"%s\", \"%s\")\n",
 			library_name, function);
 
@@ -117,14 +118,15 @@ eal_mem_win32api_init(void)
 
 #else
 
-/* Stub in case VirtualAlloc2() is provided by the compiler. */
+/* Stub in case VirtualAlloc2() is provided by the toolchain. */
 int
 eal_mem_win32api_init(void)
 {
+	VirtualAlloc2_ptr = VirtualAlloc2;
 	return 0;
 }
 
-#endif /* defined(MEM_RESERVE_PLACEHOLDER) */
+#endif /* defined(RTE_TOOLCHAIN_GCC) */
 
 static HANDLE virt2phys_device = INVALID_HANDLE_VALUE;
 
@@ -278,7 +280,7 @@ eal_mem_reserve(void *requested_addr, size_t size, int flags)
 
 	process = GetCurrentProcess();
 
-	virt = VirtualAlloc2(process, requested_addr, size,
+	virt = VirtualAlloc2_ptr(process, requested_addr, size,
 		MEM_RESERVE | MEM_RESERVE_PLACEHOLDER, PAGE_NOACCESS,
 		NULL, 0);
 	if (virt == NULL) {
@@ -364,7 +366,7 @@ eal_mem_commit(void *requested_addr, size_t size, int socket_id)
 	}
 
 	flags = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
-	addr = VirtualAlloc2(process, requested_addr, size,
+	addr = VirtualAlloc2_ptr(process, requested_addr, size,
 		flags, PAGE_READWRITE, &param, param_count);
 	if (addr == NULL) {
 		/* Logging may overwrite GetLastError() result. */
@@ -406,7 +408,7 @@ eal_mem_decommit(void *addr, size_t size)
 	}
 
 	flags = MEM_RESERVE | MEM_RESERVE_PLACEHOLDER;
-	stub = VirtualAlloc2(
+	stub = VirtualAlloc2_ptr(
 		process, addr, size, flags, PAGE_NOACCESS, NULL, 0);
 	if (stub == NULL) {
 		/* We lost the race for the VA. */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.417643482 +0000
+++ 0001-eal-windows-fix-build-with-MinGW-w64-8.patch	2021-02-05 11:18:28.582686848 +0000
@@ -1 +1 @@
-From 93bf432dd58236235e8a930a108dbcaee81fc5fc Mon Sep 17 00:00:00 2001
+From ab9b79cd737dabf9eb032ca1f328e79f5df85397 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 93bf432dd58236235e8a930a108dbcaee81fc5fc ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/pci: fix build with MinGW-w64 8' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'eal/windows: fix debug build with MinGW' " luca.boccassi
                   ` (273 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From d97da41ef8770b08649119ca6f0caf16e8e50d1d Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Tue, 1 Dec 2020 19:39:59 +0300
Subject: [PATCH] bus/pci: fix build with MinGW-w64 8

[ upstream commit de785ba0565ceb5d91d3f397606e5021efd53d84 ]

Fix redefinition of GUID, missing from previous versions.

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/pci/windows/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index b450346bdc..33a5fb1d83 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -11,7 +11,7 @@
 
 #include <devpkey.h>
 
-#ifdef RTE_TOOLCHAIN_GCC
+#if defined RTE_TOOLCHAIN_GCC && (__MINGW64_VERSION_MAJOR < 8)
 #include <devpropdef.h>
 DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Node, 0x540b947e, 0x8b40, 0x45bc,
 	0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 3);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.454167368 +0000
+++ 0002-bus-pci-fix-build-with-MinGW-w64-8.patch	2021-02-05 11:18:28.582686848 +0000
@@ -1 +1 @@
-From de785ba0565ceb5d91d3f397606e5021efd53d84 Mon Sep 17 00:00:00 2001
+From d97da41ef8770b08649119ca6f0caf16e8e50d1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de785ba0565ceb5d91d3f397606e5021efd53d84 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal/windows: fix debug build with MinGW' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'eal/windows: fix vfprintf warning with clang' " luca.boccassi
                   ` (272 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Nick Connolly; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/10c9525d7c957013d288dc06ba01709a3ac8380b

Thanks.

Luca Boccassi

---
From 10c9525d7c957013d288dc06ba01709a3ac8380b Mon Sep 17 00:00:00 2001
From: Nick Connolly <nick.connolly@mayadata.io>
Date: Fri, 27 Nov 2020 11:07:26 +0000
Subject: [PATCH] eal/windows: fix debug build with MinGW

[ upstream commit a7288328a9f5b8e89c86681b35c59ee177566bb9 ]

Compiling with MinGW in --buildtype=debug produces a redefinition
error for strncasecmp.

The root cause is that rte_os.h shouldn't be injecting POSIX definitions
into the environment.  It is the applications responsibility to decide
how to handle missing functionality.

Resolving this properly will require further work, but in the meantime
wrap all such definitions with #ifndef/#endif.  This resolves the specific
issue with strncasecmp and handles similar issues that applications may
encounter.

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

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
---
 lib/librte_eal/windows/include/rte_os.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index 569ed92d51..ea3fe60e53 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -25,22 +25,42 @@ extern "C" {
 #define PATH_MAX _MAX_PATH
 #endif
 
+#ifndef sleep
 #define sleep(x) Sleep(1000 * (x))
+#endif
 
+#ifndef strerror_r
 #define strerror_r(a, b, c) strerror_s(b, c, a)
+#endif
 
+#ifndef strdup
 /* strdup is deprecated in Microsoft libc and _strdup is preferred */
 #define strdup(str) _strdup(str)
+#endif
 
+#ifndef strtok_r
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#endif
 
+#ifndef index
 #define index(a, b)     strchr(a, b)
+#endif
+
+#ifndef rindex
 #define rindex(a, b)    strrchr(a, b)
+#endif
 
+#ifndef strncasecmp
 #define strncasecmp(s1, s2, count)        _strnicmp(s1, s2, count)
+#endif
 
+#ifndef close
 #define close _close
+#endif
+
+#ifndef unlink
 #define unlink _unlink
+#endif
 
 /* cpu_set macros implementation */
 #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2)
@@ -89,7 +109,9 @@ eal_strerror(int code)
 	return buffer;
 }
 
+#ifndef strerror
 #define strerror eal_strerror
+#endif
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.491454157 +0000
+++ 0003-eal-windows-fix-debug-build-with-MinGW.patch	2021-02-05 11:18:28.582686848 +0000
@@ -1 +1 @@
-From a7288328a9f5b8e89c86681b35c59ee177566bb9 Mon Sep 17 00:00:00 2001
+From 10c9525d7c957013d288dc06ba01709a3ac8380b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a7288328a9f5b8e89c86681b35c59ee177566bb9 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal/windows: fix vfprintf warning with clang' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: " luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'eal/windows: fix debug build with MinGW' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'license: add licenses for exception cases' " luca.boccassi
                   ` (271 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Nick Connolly; +Cc: Dmitry Kozlyuk, Pallavi Kadam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 6b2eccd104c1b3a8bba51bf10d40e203ef21baae Mon Sep 17 00:00:00 2001
From: Nick Connolly <nick.connolly@mayadata.io>
Date: Sun, 29 Nov 2020 13:00:47 +0000
Subject: [PATCH] eal/windows: fix vfprintf warning with clang

[ upstream commit 498ec3c6da6da0a8c9e6ad7ddd087e10faa77eb0 ]

When building with clang (11.0,--buildtype=debug), eal_lcore.c
produces a -Wformat-nonliteral warning from the vfprintf call
in log_early.

Add __rte_format_printf annotation.

Fixes: b8a36b086625 ("eal/windows: improve CPU and NUMA node detection")

Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
 lib/librte_eal/windows/eal_lcore.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/windows/eal_lcore.c b/lib/librte_eal/windows/eal_lcore.c
index d5ff721e03..a85149be95 100644
--- a/lib/librte_eal/windows/eal_lcore.c
+++ b/lib/librte_eal/windows/eal_lcore.c
@@ -38,6 +38,7 @@ static struct cpu_map cpu_map = { 0 };
 
 /* eal_create_cpu_map() is called before logging is initialized */
 static void
+__rte_format_printf(1, 2)
 log_early(const char *format, ...)
 {
 	va_list va;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.529448698 +0000
+++ 0004-eal-windows-fix-vfprintf-warning-with-clang.patch	2021-02-05 11:18:28.582686848 +0000
@@ -1 +1 @@
-From 498ec3c6da6da0a8c9e6ad7ddd087e10faa77eb0 Mon Sep 17 00:00:00 2001
+From 6b2eccd104c1b3a8bba51bf10d40e203ef21baae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 498ec3c6da6da0a8c9e6ad7ddd087e10faa77eb0 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'license: add licenses for exception cases' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (2 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'eal/windows: fix vfprintf warning with clang' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'rib: fix insertion in some " luca.boccassi
                   ` (270 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: John McNamara; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/862b67bcbdb0aad602ab8a340a75e1b94270fd41

Thanks.

Luca Boccassi

---
From 862b67bcbdb0aad602ab8a340a75e1b94270fd41 Mon Sep 17 00:00:00 2001
From: John McNamara <john.mcnamara@intel.com>
Date: Wed, 2 Dec 2020 19:01:40 +0000
Subject: [PATCH] license: add licenses for exception cases

[ upstream commit 3745f64b4a3559ac817ca08e85108aa1f161c6fa ]

The license/exceptions.txt file lists a small number of files
that have licenses that are exceptions to the three main
licenses defined in the Intellectual Property Policy of the
DPDK Charter.

The three exception licenses are MIT, ISC and BSD-2-Clause.
Each of these licenses states that the content of the license
message should be included in the code distribution. This
change adds the text of the MIT, ISC and BSD-2-Clause licenses
as defined on the SPDX website.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 license/bsd-2-clause.txt | 20 ++++++++++++++++++++
 license/isc.txt          | 11 +++++++++++
 license/mit.txt          | 18 ++++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 100644 license/bsd-2-clause.txt
 create mode 100644 license/isc.txt
 create mode 100644 license/mit.txt

diff --git a/license/bsd-2-clause.txt b/license/bsd-2-clause.txt
new file mode 100644
index 0000000000..dfb3f1adea
--- /dev/null
+++ b/license/bsd-2-clause.txt
@@ -0,0 +1,20 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/license/isc.txt b/license/isc.txt
new file mode 100644
index 0000000000..34a6a760d5
--- /dev/null
+++ b/license/isc.txt
@@ -0,0 +1,11 @@
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
diff --git a/license/mit.txt b/license/mit.txt
new file mode 100644
index 0000000000..c4037a4605
--- /dev/null
+++ b/license/mit.txt
@@ -0,0 +1,18 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.572775978 +0000
+++ 0005-license-add-licenses-for-exception-cases.patch	2021-02-05 11:18:28.582686848 +0000
@@ -1 +1 @@
-From 3745f64b4a3559ac817ca08e85108aa1f161c6fa Mon Sep 17 00:00:00 2001
+From 862b67bcbdb0aad602ab8a340a75e1b94270fd41 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3745f64b4a3559ac817ca08e85108aa1f161c6fa ]
+
@@ -16,2 +17,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (3 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'license: add licenses for exception cases' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: fix hardware ID limit on Windows' " luca.boccassi
                   ` (269 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73db17f246bfdb1bd44f66b1e936148025a28517

Thanks.

Luca Boccassi

---
From 73db17f246bfdb1bd44f66b1e936148025a28517 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 8 Dec 2020 17:00:04 +0000
Subject: [PATCH] rib: fix insertion in some cases

[ upstream commit e682b020840a9035beacd24cba4f6baabcfaf5ff ]

According to GCC documentation for __builtin_clz:
Returns the number of leading 0-bits in x,
starting at the most significant bit position.
If x is 0, the result is undefined.
__builtin_clz will be called with 0 if the existing
prefix address matches the one we want to insert.

Fixes: 5a5793a5ffa2 ("rib: add RIB library")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c
index 2a370d7f84..6c29e1c49a 100644
--- a/lib/librte_rib/rte_rib.c
+++ b/lib/librte_rib/rte_rib.c
@@ -301,7 +301,7 @@ rte_rib_insert(struct rte_rib *rib, uint32_t ip, uint8_t depth)
 	/* closest node found, new_node should be inserted in the middle */
 	common_depth = RTE_MIN(depth, (*tmp)->depth);
 	common_prefix = ip ^ (*tmp)->ip;
-	d = __builtin_clz(common_prefix);
+	d = (common_prefix == 0) ? 32 : __builtin_clz(common_prefix);
 
 	common_depth = RTE_MIN(d, common_depth);
 	common_prefix = ip & rte_rib_depth_to_mask(common_depth);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.614347527 +0000
+++ 0006-rib-fix-insertion-in-some-cases.patch	2021-02-05 11:18:28.586686923 +0000
@@ -1 +1 @@
-From e682b020840a9035beacd24cba4f6baabcfaf5ff Mon Sep 17 00:00:00 2001
+From 73db17f246bfdb1bd44f66b1e936148025a28517 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e682b020840a9035beacd24cba4f6baabcfaf5ff ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/pci: fix hardware ID limit on Windows' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (4 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'rib: fix insertion in some " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: ignore missing NUMA node " luca.boccassi
                   ` (268 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5740e51b9d7fb13ccb175005d66aa9f31e0948be

Thanks.

Luca Boccassi

---
From 5740e51b9d7fb13ccb175005d66aa9f31e0948be Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Fri, 11 Dec 2020 23:09:30 +0300
Subject: [PATCH] bus/pci: fix hardware ID limit on Windows

[ upstream commit 6d10ddb408fd666e3e2593b6c16ddc943265d62c ]

Length of hardware IDs list is limited by REGSTR_VAL_MAX_HCID_LEN [1],
which is currently 1024. With the old limit of 260, obtaining the list
could fail in a rare occasion of a very long result (no examples known).
This also removes a bogus dependency on the maximum path length.

[1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hardware-ids

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 drivers/bus/pci/windows/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 33a5fb1d83..fbf0785fdb 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -10,6 +10,7 @@
 #include "pci_netuio.h"
 
 #include <devpkey.h>
+#include <regstr.h>
 
 #if defined RTE_TOOLCHAIN_GCC && (__MINGW64_VERSION_MAJOR < 8)
 #include <devpropdef.h>
@@ -303,7 +304,7 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data)
 {
 	struct rte_pci_device *dev;
 	int ret = -1;
-	char  pci_device_info[PATH_MAX];
+	char  pci_device_info[REGSTR_VAL_MAX_HCID_LEN];
 	struct rte_pci_addr addr;
 	struct rte_pci_id pci_id;
 
@@ -314,7 +315,7 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data)
 	memset(dev, 0, sizeof(*dev));
 
 	ret = get_pci_hardware_id(dev_info, device_info_data,
-		pci_device_info, PATH_MAX);
+		pci_device_info, sizeof(pci_device_info));
 	if (ret != 0)
 		goto end;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.657381043 +0000
+++ 0007-bus-pci-fix-hardware-ID-limit-on-Windows.patch	2021-02-05 11:18:28.586686923 +0000
@@ -1 +1 @@
-From 6d10ddb408fd666e3e2593b6c16ddc943265d62c Mon Sep 17 00:00:00 2001
+From 5740e51b9d7fb13ccb175005d66aa9f31e0948be Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6d10ddb408fd666e3e2593b6c16ddc943265d62c ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/pci: ignore missing NUMA node on Windows' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (5 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: fix hardware ID limit on Windows' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'build: fix plugin load on static build' " luca.boccassi
                   ` (267 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Odi Assli, Dmitry Kozlyuk, Ranjit Menon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ac97254b40ded128f07313ced9cd28c89452e06e Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Sun, 13 Dec 2020 16:16:04 +0200
Subject: [PATCH] bus/pci: ignore missing NUMA node on Windows

[ upstream commit ac7c98d04f2c5c8d57c4f87799a669dca9ca9605 ]

On older processors, NUMA isn't bound to PCIe locality.
those cases return ERROR_NOT_FOUND in response to the
SetupDiGetDevicePropertyW call with DEVPKEY_Device_Numa_Node
attribute.

This error fails the probe process for the PCIe device.
this commit will ignore such failure and will set the
numa_node to 0.

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")

Reported-by: Odi Assli <odia@nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Tested-by: Odi Assli <odia@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 drivers/bus/pci/windows/pci.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index fbf0785fdb..f662584528 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -235,6 +235,12 @@ get_device_resource_info(HDEVINFO dev_info,
 		&DEVPKEY_Device_Numa_Node, &property_type,
 		(BYTE *)&numa_node, sizeof(numa_node), NULL, 0);
 	if (!res) {
+		DWORD error = GetLastError();
+		if (error == ERROR_NOT_FOUND) {
+			/* On older CPUs, NUMA is not bound to PCIe locality. */
+			dev->device.numa_node = 0;
+			return ERROR_SUCCESS;
+		}
 		RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
 			"(DEVPKEY_Device_Numa_Node)");
 		return -1;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.699636478 +0000
+++ 0008-bus-pci-ignore-missing-NUMA-node-on-Windows.patch	2021-02-05 11:18:28.586686923 +0000
@@ -1 +1 @@
-From ac7c98d04f2c5c8d57c4f87799a669dca9ca9605 Mon Sep 17 00:00:00 2001
+From ac97254b40ded128f07313ced9cd28c89452e06e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac7c98d04f2c5c8d57c4f87799a669dca9ca9605 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'build: fix plugin load on static build' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (6 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: ignore missing NUMA node " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'app/flow-perf: simplify objects initialization' " luca.boccassi
                   ` (266 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/937675ee69fe1051bca6e3cb31ec5319e453b328

Thanks.

Luca Boccassi

---
From 937675ee69fe1051bca6e3cb31ec5319e453b328 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 18 Dec 2020 14:14:22 +0100
Subject: [PATCH] build: fix plugin load on static build

[ upstream commit b031e13d7f0dc7cba9bc5befe968b67832021a59 ]

When dpdk is compiled as static libraries, it is not possible
to load a plugin from an application. We get the following error:

  EAL: librte_pmd_xxxx.so: undefined symbol: per_lcore__rte_errno

This happens because the dpdk symbols are not exported. Add them to the
dynamic symbol table by using '-Wl,--export-dynamic'. This option was
previously present when compiled with Makefiles, it was introduced in
commit f9a08f650211 ("eal: add support for shared object drivers")

Also add it to the pkg-config file.

Fixes: 16ade738fd0d ("app/testpmd: build with meson")
Fixes: 89f0711f9ddf ("examples: build some samples with meson")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/meson.build                   | 6 ++++++
 buildtools/pkg-config/meson.build | 2 +-
 examples/meson.build              | 7 ++++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index eb74f215a3..fd72d7da68 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -25,6 +25,10 @@ apps = [
 lib_execinfo = cc.find_library('execinfo', required: false)
 
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
+default_ldflags = []
+if get_option('default_library') == 'static'
+	default_ldflags += ['-Wl,--export-dynamic']
+endif
 
 foreach app:apps
 	build = true
@@ -32,6 +36,7 @@ foreach app:apps
 	sources = []
 	includes = []
 	cflags = default_cflags
+	ldflags = default_ldflags
 	objs = [] # other object files to link against, used e.g. for
 	          # instruction-set optimized versions of code
 
@@ -58,6 +63,7 @@ foreach app:apps
 		executable('dpdk-' + name,
 				sources,
 				c_args: cflags,
+				link_args: ldflags,
 				link_whole: link_libs,
 				dependencies: dep_objs,
 				install_rpath: join_paths(get_option('prefix'),
diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 5f19304289..168ee08e58 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -47,7 +47,7 @@ This is required for a number of static inline functions in the public headers.'
 	                  # if libbsd is not enabled, then this is blank
 	libraries_private: ['-Wl,--whole-archive'] +
 			dpdk_drivers + dpdk_static_libraries +
-			['-Wl,--no-whole-archive']
+			['-Wl,--no-whole-archive', '-Wl,--export-dynamic']
 )
 
 # For static linking with dependencies as shared libraries,
diff --git a/examples/meson.build b/examples/meson.build
index 46ec80919e..f643ec1bad 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -63,6 +63,10 @@ default_cflags = machine_args
 if cc.has_argument('-Wno-format-truncation')
 	default_cflags += '-Wno-format-truncation'
 endif
+default_ldflags = dpdk_extra_ldflags
+if get_option('default_library') == 'static'
+	default_ldflags += ['-Wl,--export-dynamic']
+endif
 
 foreach example: examples
 	name = example.split('/')[-1]
@@ -70,6 +74,7 @@ foreach example: examples
 	sources = []
 	allow_experimental_apis = false
 	cflags = default_cflags
+	ldflags = default_ldflags
 
 	ext_deps = [execinfo]
 	includes = [include_directories(example)]
@@ -91,7 +96,7 @@ foreach example: examples
 		executable('dpdk-' + name, sources,
 			include_directories: includes,
 			link_whole: link_whole_libs,
-			link_args: dpdk_extra_ldflags,
+			link_args: ldflags,
 			c_args: cflags,
 			dependencies: dep_objs)
 	elif not allow_skips
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.736566413 +0000
+++ 0009-build-fix-plugin-load-on-static-build.patch	2021-02-05 11:18:28.586686923 +0000
@@ -1 +1 @@
-From b031e13d7f0dc7cba9bc5befe968b67832021a59 Mon Sep 17 00:00:00 2001
+From 937675ee69fe1051bca6e3cb31ec5319e453b328 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b031e13d7f0dc7cba9bc5befe968b67832021a59 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/flow-perf: simplify objects initialization' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (7 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'build: fix plugin load on static build' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'regex/octeontx2: fix PCI table overflow' " luca.boccassi
                   ` (265 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Wisam Jaddo; +Cc: Alexander Kozyrev, Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 1d2f869e7c690437489ff76e2fa08e26e14439c0 Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@nvidia.com>
Date: Thu, 26 Nov 2020 13:15:43 +0200
Subject: [PATCH] app/flow-perf: simplify objects initialization

[ upstream commit 97544f85bd269d4be9e6e9b022a3682e1eb61a7b ]

Since items are static then the default values will be zero,
thus the memset to zero value is just a redundant code.

Also remove the all not needed variables, that can be replaced
with direct set to the structure itself.

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
---
 app/test-flow-perf/actions_gen.c |  30 +++-----
 app/test-flow-perf/items_gen.c   | 123 ++++++++-----------------------
 2 files changed, 44 insertions(+), 109 deletions(-)

diff --git a/app/test-flow-perf/actions_gen.c b/app/test-flow-perf/actions_gen.c
index ac525f6fdb..f265894247 100644
--- a/app/test-flow-perf/actions_gen.c
+++ b/app/test-flow-perf/actions_gen.c
@@ -145,12 +145,10 @@ add_set_meta(struct rte_flow_action *actions,
 	uint8_t actions_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_action_set_meta meta_action;
-
-	do {
-		meta_action.data = RTE_BE32(META_DATA);
-		meta_action.mask = RTE_BE32(0xffffffff);
-	} while (0);
+	static struct rte_flow_action_set_meta meta_action = {
+		.data = RTE_BE32(META_DATA),
+		.mask = RTE_BE32(0xffffffff),
+	};
 
 	actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_SET_META;
 	actions[actions_counter].conf = &meta_action;
@@ -161,13 +159,11 @@ add_set_tag(struct rte_flow_action *actions,
 	uint8_t actions_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_action_set_tag tag_action;
-
-	do {
-		tag_action.data = RTE_BE32(META_DATA);
-		tag_action.mask = RTE_BE32(0xffffffff);
-		tag_action.index = TAG_INDEX;
-	} while (0);
+	static struct rte_flow_action_set_tag tag_action = {
+		.data = RTE_BE32(META_DATA),
+		.mask = RTE_BE32(0xffffffff),
+		.index = TAG_INDEX,
+	};
 
 	actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_SET_TAG;
 	actions[actions_counter].conf = &tag_action;
@@ -178,11 +174,9 @@ add_port_id(struct rte_flow_action *actions,
 	uint8_t actions_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_action_port_id port_id;
-
-	do {
-		port_id.id = PORT_ID_DST;
-	} while (0);
+	static struct rte_flow_action_port_id port_id = {
+		.id = PORT_ID_DST,
+	};
 
 	actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_PORT_ID;
 	actions[actions_counter].conf = &port_id;
diff --git a/app/test-flow-perf/items_gen.c b/app/test-flow-perf/items_gen.c
index 2b1ab41467..aaa243a7c4 100644
--- a/app/test-flow-perf/items_gen.c
+++ b/app/test-flow-perf/items_gen.c
@@ -25,9 +25,6 @@ add_ether(struct rte_flow_item *items,
 	static struct rte_flow_item_eth eth_spec;
 	static struct rte_flow_item_eth eth_mask;
 
-	memset(&eth_spec, 0, sizeof(struct rte_flow_item_eth));
-	memset(&eth_mask, 0, sizeof(struct rte_flow_item_eth));
-
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_ETH;
 	items[items_counter].spec = &eth_spec;
 	items[items_counter].mask = &eth_mask;
@@ -38,16 +35,12 @@ add_vlan(struct rte_flow_item *items,
 	uint8_t items_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_item_vlan vlan_spec;
-	static struct rte_flow_item_vlan vlan_mask;
-
-	uint16_t vlan_value = VLAN_VALUE;
-
-	memset(&vlan_spec, 0, sizeof(struct rte_flow_item_vlan));
-	memset(&vlan_mask, 0, sizeof(struct rte_flow_item_vlan));
-
-	vlan_spec.tci = RTE_BE16(vlan_value);
-	vlan_mask.tci = RTE_BE16(0xffff);
+	static struct rte_flow_item_vlan vlan_spec = {
+		.tci = RTE_BE16(VLAN_VALUE),
+	};
+	static struct rte_flow_item_vlan vlan_mask = {
+		.tci = RTE_BE16(0xffff),
+	};
 
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_VLAN;
 	items[items_counter].spec = &vlan_spec;
@@ -61,9 +54,6 @@ add_ipv4(struct rte_flow_item *items,
 	static struct rte_flow_item_ipv4 ipv4_spec;
 	static struct rte_flow_item_ipv4 ipv4_mask;
 
-	memset(&ipv4_spec, 0, sizeof(struct rte_flow_item_ipv4));
-	memset(&ipv4_mask, 0, sizeof(struct rte_flow_item_ipv4));
-
 	ipv4_spec.hdr.src_addr = RTE_BE32(para.src_ip);
 	ipv4_mask.hdr.src_addr = RTE_BE32(0xffffffff);
 
@@ -80,9 +70,6 @@ add_ipv6(struct rte_flow_item *items,
 	static struct rte_flow_item_ipv6 ipv6_spec;
 	static struct rte_flow_item_ipv6 ipv6_mask;
 
-	memset(&ipv6_spec, 0, sizeof(struct rte_flow_item_ipv6));
-	memset(&ipv6_mask, 0, sizeof(struct rte_flow_item_ipv6));
-
 	/** Set ipv6 src **/
 	memset(&ipv6_spec.hdr.src_addr, para.src_ip,
 		sizeof(ipv6_spec.hdr.src_addr) / 2);
@@ -104,9 +91,6 @@ add_tcp(struct rte_flow_item *items,
 	static struct rte_flow_item_tcp tcp_spec;
 	static struct rte_flow_item_tcp tcp_mask;
 
-	memset(&tcp_spec, 0, sizeof(struct rte_flow_item_tcp));
-	memset(&tcp_mask, 0, sizeof(struct rte_flow_item_tcp));
-
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_TCP;
 	items[items_counter].spec = &tcp_spec;
 	items[items_counter].mask = &tcp_mask;
@@ -120,9 +104,6 @@ add_udp(struct rte_flow_item *items,
 	static struct rte_flow_item_udp udp_spec;
 	static struct rte_flow_item_udp udp_mask;
 
-	memset(&udp_spec, 0, sizeof(struct rte_flow_item_udp));
-	memset(&udp_mask, 0, sizeof(struct rte_flow_item_udp));
-
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_UDP;
 	items[items_counter].spec = &udp_spec;
 	items[items_counter].mask = &udp_mask;
@@ -141,9 +122,6 @@ add_vxlan(struct rte_flow_item *items,
 
 	vni_value = VNI_VALUE;
 
-	memset(&vxlan_spec, 0, sizeof(struct rte_flow_item_vxlan));
-	memset(&vxlan_mask, 0, sizeof(struct rte_flow_item_vxlan));
-
 	/* Set standard vxlan vni */
 	for (i = 0; i < 3; i++) {
 		vxlan_spec.vni[2 - i] = vni_value >> (i * 8);
@@ -171,9 +149,6 @@ add_vxlan_gpe(struct rte_flow_item *items,
 
 	vni_value = VNI_VALUE;
 
-	memset(&vxlan_gpe_spec, 0, sizeof(struct rte_flow_item_vxlan_gpe));
-	memset(&vxlan_gpe_mask, 0, sizeof(struct rte_flow_item_vxlan_gpe));
-
 	/* Set vxlan-gpe vni */
 	for (i = 0; i < 3; i++) {
 		vxlan_gpe_spec.vni[2 - i] = vni_value >> (i * 8);
@@ -193,18 +168,12 @@ add_gre(struct rte_flow_item *items,
 	uint8_t items_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_item_gre gre_spec;
-	static struct rte_flow_item_gre gre_mask;
-
-	uint16_t proto;
-
-	proto = RTE_ETHER_TYPE_TEB;
-
-	memset(&gre_spec, 0, sizeof(struct rte_flow_item_gre));
-	memset(&gre_mask, 0, sizeof(struct rte_flow_item_gre));
-
-	gre_spec.protocol = RTE_BE16(proto);
-	gre_mask.protocol = RTE_BE16(0xffff);
+	static struct rte_flow_item_gre gre_spec = {
+		.protocol = RTE_BE16(RTE_ETHER_TYPE_TEB),
+	};
+	static struct rte_flow_item_gre gre_mask = {
+		.protocol = RTE_BE16(0xffff),
+	};
 
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_GRE;
 	items[items_counter].spec = &gre_spec;
@@ -224,9 +193,6 @@ add_geneve(struct rte_flow_item *items,
 
 	vni_value = VNI_VALUE;
 
-	memset(&geneve_spec, 0, sizeof(struct rte_flow_item_geneve));
-	memset(&geneve_mask, 0, sizeof(struct rte_flow_item_geneve));
-
 	for (i = 0; i < 3; i++) {
 		geneve_spec.vni[2 - i] = vni_value >> (i * 8);
 		geneve_mask.vni[2 - i] = 0xff;
@@ -242,18 +208,12 @@ add_gtp(struct rte_flow_item *items,
 	uint8_t items_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_item_gtp gtp_spec;
-	static struct rte_flow_item_gtp gtp_mask;
-
-	uint32_t teid_value;
-
-	teid_value = TEID_VALUE;
-
-	memset(&gtp_spec, 0, sizeof(struct rte_flow_item_gtp));
-	memset(&gtp_mask, 0, sizeof(struct rte_flow_item_gtp));
-
-	gtp_spec.teid = RTE_BE32(teid_value);
-	gtp_mask.teid = RTE_BE32(0xffffffff);
+	static struct rte_flow_item_gtp gtp_spec = {
+		.teid = RTE_BE32(TEID_VALUE),
+	};
+	static struct rte_flow_item_gtp gtp_mask = {
+		.teid = RTE_BE32(0xffffffff),
+	};
 
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_GTP;
 	items[items_counter].spec = &gtp_spec;
@@ -265,18 +225,12 @@ add_meta_data(struct rte_flow_item *items,
 	uint8_t items_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_item_meta meta_spec;
-	static struct rte_flow_item_meta meta_mask;
-
-	uint32_t data;
-
-	data = META_DATA;
-
-	memset(&meta_spec, 0, sizeof(struct rte_flow_item_meta));
-	memset(&meta_mask, 0, sizeof(struct rte_flow_item_meta));
-
-	meta_spec.data = RTE_BE32(data);
-	meta_mask.data = RTE_BE32(0xffffffff);
+	static struct rte_flow_item_meta meta_spec = {
+		.data = RTE_BE32(META_DATA),
+	};
+	static struct rte_flow_item_meta meta_mask = {
+		.data = RTE_BE32(0xffffffff),
+	};
 
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_META;
 	items[items_counter].spec = &meta_spec;
@@ -289,21 +243,14 @@ add_meta_tag(struct rte_flow_item *items,
 	uint8_t items_counter,
 	__rte_unused struct additional_para para)
 {
-	static struct rte_flow_item_tag tag_spec;
-	static struct rte_flow_item_tag tag_mask;
-	uint32_t data;
-	uint8_t index;
-
-	data = META_DATA;
-	index = TAG_INDEX;
-
-	memset(&tag_spec, 0, sizeof(struct rte_flow_item_tag));
-	memset(&tag_mask, 0, sizeof(struct rte_flow_item_tag));
-
-	tag_spec.data = RTE_BE32(data);
-	tag_mask.data = RTE_BE32(0xffffffff);
-	tag_spec.index = index;
-	tag_mask.index = 0xff;
+	static struct rte_flow_item_tag tag_spec = {
+		.data = RTE_BE32(META_DATA),
+		.index = TAG_INDEX,
+	};
+	static struct rte_flow_item_tag tag_mask = {
+		.data = RTE_BE32(0xffffffff),
+		.index = 0xff,
+	};
 
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_TAG;
 	items[items_counter].spec = &tag_spec;
@@ -318,9 +265,6 @@ add_icmpv4(struct rte_flow_item *items,
 	static struct rte_flow_item_icmp icmpv4_spec;
 	static struct rte_flow_item_icmp icmpv4_mask;
 
-	memset(&icmpv4_spec, 0, sizeof(struct rte_flow_item_icmp));
-	memset(&icmpv4_mask, 0, sizeof(struct rte_flow_item_icmp));
-
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_ICMP;
 	items[items_counter].spec = &icmpv4_spec;
 	items[items_counter].mask = &icmpv4_mask;
@@ -334,9 +278,6 @@ add_icmpv6(struct rte_flow_item *items,
 	static struct rte_flow_item_icmp6 icmpv6_spec;
 	static struct rte_flow_item_icmp6 icmpv6_mask;
 
-	memset(&icmpv6_spec, 0, sizeof(struct rte_flow_item_icmp6));
-	memset(&icmpv6_mask, 0, sizeof(struct rte_flow_item_icmp6));
-
 	items[items_counter].type = RTE_FLOW_ITEM_TYPE_ICMP6;
 	items[items_counter].spec = &icmpv6_spec;
 	items[items_counter].mask = &icmpv6_mask;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.781714435 +0000
+++ 0010-app-flow-perf-simplify-objects-initialization.patch	2021-02-05 11:18:28.590687000 +0000
@@ -1 +1 @@
-From 97544f85bd269d4be9e6e9b022a3682e1eb61a7b Mon Sep 17 00:00:00 2001
+From 1d2f869e7c690437489ff76e2fa08e26e14439c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97544f85bd269d4be9e6e9b022a3682e1eb61a7b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 1364407056..c3545ba32f 100644
+index ac525f6fdb..f265894247 100644
@@ -27 +28 @@
-@@ -143,12 +143,10 @@ add_set_meta(struct rte_flow_action *actions,
+@@ -145,12 +145,10 @@ add_set_meta(struct rte_flow_action *actions,
@@ -44 +45 @@
-@@ -159,13 +157,11 @@ add_set_tag(struct rte_flow_action *actions,
+@@ -161,13 +159,11 @@ add_set_tag(struct rte_flow_action *actions,
@@ -63 +64 @@
-@@ -176,11 +172,9 @@ add_port_id(struct rte_flow_action *actions,
+@@ -178,11 +174,9 @@ add_port_id(struct rte_flow_action *actions,
@@ -79 +80 @@
-index 0950023608..ccebc08b39 100644
+index 2b1ab41467..aaa243a7c4 100644
@@ -82 +83 @@
-@@ -26,9 +26,6 @@ add_ether(struct rte_flow_item *items,
+@@ -25,9 +25,6 @@ add_ether(struct rte_flow_item *items,
@@ -92 +93 @@
-@@ -39,16 +36,12 @@ add_vlan(struct rte_flow_item *items,
+@@ -38,16 +35,12 @@ add_vlan(struct rte_flow_item *items,
@@ -115,13 +116,13 @@
-@@ -63,9 +56,6 @@ add_ipv4(struct rte_flow_item *items,
- 	static struct rte_flow_item_ipv4 ipv4_masks[RTE_MAX_LCORE] __rte_cache_aligned;
- 	uint8_t ti = para.core_idx;
- 
--	memset(&ipv4_specs[ti], 0, sizeof(struct rte_flow_item_ipv4));
--	memset(&ipv4_masks[ti], 0, sizeof(struct rte_flow_item_ipv4));
--
- 	ipv4_specs[ti].hdr.src_addr = RTE_BE32(para.src_ip);
- 	ipv4_masks[ti].hdr.src_addr = RTE_BE32(0xffffffff);
- 
-@@ -83,9 +73,6 @@ add_ipv6(struct rte_flow_item *items,
- 	static struct rte_flow_item_ipv6 ipv6_masks[RTE_MAX_LCORE] __rte_cache_aligned;
- 	uint8_t ti = para.core_idx;
+@@ -61,9 +54,6 @@ add_ipv4(struct rte_flow_item *items,
+ 	static struct rte_flow_item_ipv4 ipv4_spec;
+ 	static struct rte_flow_item_ipv4 ipv4_mask;
+ 
+-	memset(&ipv4_spec, 0, sizeof(struct rte_flow_item_ipv4));
+-	memset(&ipv4_mask, 0, sizeof(struct rte_flow_item_ipv4));
+-
+ 	ipv4_spec.hdr.src_addr = RTE_BE32(para.src_ip);
+ 	ipv4_mask.hdr.src_addr = RTE_BE32(0xffffffff);
+ 
+@@ -80,9 +70,6 @@ add_ipv6(struct rte_flow_item *items,
+ 	static struct rte_flow_item_ipv6 ipv6_spec;
+ 	static struct rte_flow_item_ipv6 ipv6_mask;
@@ -129,2 +130,2 @@
--	memset(&ipv6_specs[ti], 0, sizeof(struct rte_flow_item_ipv6));
--	memset(&ipv6_masks[ti], 0, sizeof(struct rte_flow_item_ipv6));
+-	memset(&ipv6_spec, 0, sizeof(struct rte_flow_item_ipv6));
+-	memset(&ipv6_mask, 0, sizeof(struct rte_flow_item_ipv6));
@@ -133,3 +134,3 @@
- 	memset(&ipv6_specs[ti].hdr.src_addr, para.src_ip,
- 		sizeof(ipv6_specs->hdr.src_addr) / 2);
-@@ -107,9 +94,6 @@ add_tcp(struct rte_flow_item *items,
+ 	memset(&ipv6_spec.hdr.src_addr, para.src_ip,
+ 		sizeof(ipv6_spec.hdr.src_addr) / 2);
+@@ -104,9 +91,6 @@ add_tcp(struct rte_flow_item *items,
@@ -145 +146 @@
-@@ -123,9 +107,6 @@ add_udp(struct rte_flow_item *items,
+@@ -120,9 +104,6 @@ add_udp(struct rte_flow_item *items,
@@ -155 +156 @@
-@@ -144,9 +125,6 @@ add_vxlan(struct rte_flow_item *items,
+@@ -141,9 +122,6 @@ add_vxlan(struct rte_flow_item *items,
@@ -159,2 +160,2 @@
--	memset(&vxlan_specs[ti], 0, sizeof(struct rte_flow_item_vxlan));
--	memset(&vxlan_masks[ti], 0, sizeof(struct rte_flow_item_vxlan));
+-	memset(&vxlan_spec, 0, sizeof(struct rte_flow_item_vxlan));
+-	memset(&vxlan_mask, 0, sizeof(struct rte_flow_item_vxlan));
@@ -164,2 +165,2 @@
- 		vxlan_specs[ti].vni[2 - i] = vni_value >> (i * 8);
-@@ -174,9 +152,6 @@ add_vxlan_gpe(struct rte_flow_item *items,
+ 		vxlan_spec.vni[2 - i] = vni_value >> (i * 8);
+@@ -171,9 +149,6 @@ add_vxlan_gpe(struct rte_flow_item *items,
@@ -169,2 +170,2 @@
--	memset(&vxlan_gpe_specs[ti], 0, sizeof(struct rte_flow_item_vxlan_gpe));
--	memset(&vxlan_gpe_masks[ti], 0, sizeof(struct rte_flow_item_vxlan_gpe));
+-	memset(&vxlan_gpe_spec, 0, sizeof(struct rte_flow_item_vxlan_gpe));
+-	memset(&vxlan_gpe_mask, 0, sizeof(struct rte_flow_item_vxlan_gpe));
@@ -174,2 +175,2 @@
- 		vxlan_gpe_specs[ti].vni[2 - i] = vni_value >> (i * 8);
-@@ -196,18 +171,12 @@ add_gre(struct rte_flow_item *items,
+ 		vxlan_gpe_spec.vni[2 - i] = vni_value >> (i * 8);
+@@ -193,18 +168,12 @@ add_gre(struct rte_flow_item *items,
@@ -200 +201 @@
-@@ -227,9 +196,6 @@ add_geneve(struct rte_flow_item *items,
+@@ -224,9 +193,6 @@ add_geneve(struct rte_flow_item *items,
@@ -204,2 +205,2 @@
--	memset(&geneve_specs[ti], 0, sizeof(struct rte_flow_item_geneve));
--	memset(&geneve_masks[ti], 0, sizeof(struct rte_flow_item_geneve));
+-	memset(&geneve_spec, 0, sizeof(struct rte_flow_item_geneve));
+-	memset(&geneve_mask, 0, sizeof(struct rte_flow_item_geneve));
@@ -208,3 +209,3 @@
- 		geneve_specs[ti].vni[2 - i] = vni_value >> (i * 8);
- 		geneve_masks[ti].vni[2 - i] = 0xff;
-@@ -245,18 +211,12 @@ add_gtp(struct rte_flow_item *items,
+ 		geneve_spec.vni[2 - i] = vni_value >> (i * 8);
+ 		geneve_mask.vni[2 - i] = 0xff;
+@@ -242,18 +208,12 @@ add_gtp(struct rte_flow_item *items,
@@ -235 +236 @@
-@@ -268,18 +228,12 @@ add_meta_data(struct rte_flow_item *items,
+@@ -265,18 +225,12 @@ add_meta_data(struct rte_flow_item *items,
@@ -260 +261 @@
-@@ -292,21 +246,14 @@ add_meta_tag(struct rte_flow_item *items,
+@@ -289,21 +243,14 @@ add_meta_tag(struct rte_flow_item *items,
@@ -290 +291 @@
-@@ -321,9 +268,6 @@ add_icmpv4(struct rte_flow_item *items,
+@@ -318,9 +265,6 @@ add_icmpv4(struct rte_flow_item *items,
@@ -300 +301 @@
-@@ -337,9 +281,6 @@ add_icmpv6(struct rte_flow_item *items,
+@@ -334,9 +278,6 @@ add_icmpv6(struct rte_flow_item *items,

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

* [dpdk-stable] patch 'regex/octeontx2: fix PCI table overflow' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (8 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'app/flow-perf: simplify objects initialization' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' " luca.boccassi
                   ` (264 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Guy Kaneti; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/561b4a3458024edf3cb003bc7eafa1e02d60d57d

Thanks.

Luca Boccassi

---
From 561b4a3458024edf3cb003bc7eafa1e02d60d57d Mon Sep 17 00:00:00 2001
From: Guy Kaneti <guyk@marvell.com>
Date: Sun, 3 Jan 2021 13:01:28 +0200
Subject: [PATCH] regex/octeontx2: fix PCI table overflow

[ upstream commit 86d8b57e37eaea344870ffdf7dd6ead814204096 ]

Sentinel was missing from pci_id_ree_table[] array initialization
which caused it to overflow.

Bugzilla ID: 603
Fixes: 4cd1c5fd9 ("regex/octeontx2: introduce REE driver")

Signed-off-by: Guy Kaneti <guyk@marvell.com>
---
 drivers/regex/octeontx2/otx2_regexdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/regex/octeontx2/otx2_regexdev.c b/drivers/regex/octeontx2/otx2_regexdev.c
index 39eed7a20d..b6e55853e9 100644
--- a/drivers/regex/octeontx2/otx2_regexdev.c
+++ b/drivers/regex/octeontx2/otx2_regexdev.c
@@ -988,6 +988,9 @@ static struct rte_pci_id pci_id_ree_table[] = {
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM,
 				PCI_DEVID_OCTEONTX2_RVU_REE_PF)
 	},
+	{
+		.vendor_id = 0,
+	}
 };
 
 static struct rte_pci_driver otx2_regexdev_pmd = {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.825553278 +0000
+++ 0011-regex-octeontx2-fix-PCI-table-overflow.patch	2021-02-05 11:18:28.590687000 +0000
@@ -1 +1 @@
-From 86d8b57e37eaea344870ffdf7dd6ead814204096 Mon Sep 17 00:00:00 2001
+From 561b4a3458024edf3cb003bc7eafa1e02d60d57d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 86d8b57e37eaea344870ffdf7dd6ead814204096 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (9 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'regex/octeontx2: fix PCI table overflow' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:14 ` [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' " luca.boccassi
                   ` (263 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From cba55caf4b1b7b556e74e689ed4de0e8ace98dc4 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:51 +0000
Subject: [PATCH] app/procinfo: fix _filters stats reporting

[ upstream commit f7605e24baba5c614352ed3db0bf48d7f06e59b0 ]

'_filters' is compared twice, second one will be always false, removing
it using the message more relevant to the '_filters'.

Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index d743209f0d..35e5b596eb 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -420,11 +420,9 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
 	} else if ((type_end != NULL) &&
 		   (strncmp(cnt_name, "flow_", strlen("flow_"))) == 0) {
 		if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
-			strlcpy(cnt_type, "operations", cnt_type_len);
-		else if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
-			strlcpy(cnt_type, "errors", cnt_type_len);
-		else if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
 			strlcpy(cnt_type, "filter_result", cnt_type_len);
+		else if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
+			strlcpy(cnt_type, "errors", cnt_type_len);
 	} else if ((type_end != NULL) &&
 		   (strncmp(cnt_name, "mac_", strlen("mac_"))) == 0) {
 		if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.869284685 +0000
+++ 0012-app-procinfo-fix-_filters-stats-reporting.patch	2021-02-05 11:18:28.594687075 +0000
@@ -1 +1 @@
-From f7605e24baba5c614352ed3db0bf48d7f06e59b0 Mon Sep 17 00:00:00 2001
+From cba55caf4b1b7b556e74e689ed4de0e8ace98dc4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7605e24baba5c614352ed3db0bf48d7f06e59b0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (10 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' " luca.boccassi
@ 2021-02-05 11:14 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/procinfo: remove useless memset' " luca.boccassi
                   ` (262 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/02cd8d2c11761f7c8955f93c9c0a55e35254e857

Thanks.

Luca Boccassi

---
From 02cd8d2c11761f7c8955f93c9c0a55e35254e857 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:52 +0000
Subject: [PATCH] app/procinfo: fix check on xstats-ids

[ upstream commit 59b981c6f69cb1c705bfb93890ce8cc2a8bcdfb5 ]

'parse_xstats_ids()' return 'int'. The return value is assigned to
'nb_xstats_ids' unsigned value, later negative check on this variable is
wrong.

Adding interim 'int' variable for negative check.

Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 35e5b596eb..8ee30ddb71 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -301,14 +301,13 @@ proc_info_parse_args(int argc, char **argv)
 			} else if (!strncmp(long_option[option_index].name,
 					"xstats-ids",
 					MAX_LONG_OPT_SZ))	{
-				nb_xstats_ids = parse_xstats_ids(optarg,
+				int ret = parse_xstats_ids(optarg,
 						xstats_ids, MAX_NB_XSTATS_IDS);
-
-				if (nb_xstats_ids <= 0) {
+				if (ret <= 0) {
 					printf("xstats-id list parse error.\n");
 					return -1;
 				}
-
+				nb_xstats_ids = ret;
 			}
 			break;
 		default:
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.911670553 +0000
+++ 0013-app-procinfo-fix-check-on-xstats-ids.patch	2021-02-05 11:18:28.594687075 +0000
@@ -1 +1 @@
-From 59b981c6f69cb1c705bfb93890ce8cc2a8bcdfb5 Mon Sep 17 00:00:00 2001
+From 02cd8d2c11761f7c8955f93c9c0a55e35254e857 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59b981c6f69cb1c705bfb93890ce8cc2a8bcdfb5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/procinfo: remove useless memset' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (11 preceding siblings ...)
  2021-02-05 11:14 ` [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/procinfo: remove useless assignment' " luca.boccassi
                   ` (261 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c5528cdad362677d1845c310c368f5b8d0026c7c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:53 +0000
Subject: [PATCH] app/procinfo: remove useless memset

[ upstream commit c923be82e06844384c5a4b62df957bf4be6a0af3 ]

The intention with the "sizeof(0)" usage is not clear, but the 'stats'
already 'memset' by 'rte_cryptodev_stats_get()' API, removing 'memset'
in application.

Fixes: fe773600fe3e ("app/procinfo: add --show-crypto")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 8ee30ddb71..106b44d6fb 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1207,7 +1207,6 @@ show_crypto(void)
 
 		display_crypto_feature_info(dev_info.feature_flags);
 
-		memset(&stats, 0, sizeof(0));
 		if (rte_cryptodev_stats_get(i, &stats) == 0) {
 			printf("\t  -- stats\n");
 			printf("\t\t  + enqueue count (%"PRIu64")"
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.957670480 +0000
+++ 0014-app-procinfo-remove-useless-memset.patch	2021-02-05 11:18:28.594687075 +0000
@@ -1 +1 @@
-From c923be82e06844384c5a4b62df957bf4be6a0af3 Mon Sep 17 00:00:00 2001
+From c5528cdad362677d1845c310c368f5b8d0026c7c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c923be82e06844384c5a4b62df957bf4be6a0af3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/procinfo: remove useless assignment' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (12 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/procinfo: remove useless memset' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' " luca.boccassi
                   ` (260 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From d8282edc783a4297291b903f9b87a6176766d4dc Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:54 +0000
Subject: [PATCH] app/procinfo: remove useless assignment

[ upstream commit ff1047ba5b3128bfd710fc05d2f5adaa259bf88c ]

'flag' is initialized to '0' but it is overwritten later, moving the
declaration where it is used and initialize with actual value.

Fixes: 0101a0ec6217 ("app/procinfo: add --show-mempool")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 106b44d6fb..44249dd2cb 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1264,8 +1264,6 @@ show_ring(char *name)
 static void
 show_mempool(char *name)
 {
-	uint64_t flags = 0;
-
 	snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL ");
 	STATS_BDR_STR(10, bdr_str);
 
@@ -1273,8 +1271,8 @@ show_mempool(char *name)
 		struct rte_mempool *ptr = rte_mempool_lookup(name);
 		if (ptr != NULL) {
 			struct rte_mempool_ops *ops;
+			uint64_t flags = ptr->flags;
 
-			flags = ptr->flags;
 			ops = rte_mempool_get_ops(ptr->ops_index);
 			printf("  - Name: %s on socket %d\n"
 				"  - flags:\n"
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:29.999932504 +0000
+++ 0015-app-procinfo-remove-useless-assignment.patch	2021-02-05 11:18:28.594687075 +0000
@@ -1 +1 @@
-From ff1047ba5b3128bfd710fc05d2f5adaa259bf88c Mon Sep 17 00:00:00 2001
+From d8282edc783a4297291b903f9b87a6176766d4dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff1047ba5b3128bfd710fc05d2f5adaa259bf88c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (13 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/procinfo: remove useless assignment' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: " luca.boccassi
                   ` (259 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1256375dc2a32b677c542a81a8c00ba9b5d1a99f

Thanks.

Luca Boccassi

---
From 1256375dc2a32b677c542a81a8c00ba9b5d1a99f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:55 +0000
Subject: [PATCH] net/pcap: remove local variable shadowing outer one

[ upstream commit a18f17470709d8a5f1cb918a8db6535890dee683 ]

'ret' is already defined in the function scope, removing the 'ret' in
the block scope.

Fixes: c9507cd0cada ("net/pcap: support physical interface MAC address")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 4930d7d382..a32b1f3f37 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1324,9 +1324,8 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
 
 		/* phy_mac arg is applied only only if "iface" devarg is provided */
 		if (rx_queues->phy_mac) {
-			int ret = eth_pcap_update_mac(rx_queues->queue[0].name,
-					eth_dev, vdev->device.numa_node);
-			if (ret == 0)
+			if (eth_pcap_update_mac(rx_queues->queue[0].name,
+					eth_dev, vdev->device.numa_node) == 0)
 				internals->phy_mac = 1;
 		}
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.044620130 +0000
+++ 0016-net-pcap-remove-local-variable-shadowing-outer-one.patch	2021-02-05 11:18:28.598687152 +0000
@@ -1 +1 @@
-From a18f17470709d8a5f1cb918a8db6535890dee683 Mon Sep 17 00:00:00 2001
+From 1256375dc2a32b677c542a81a8c00ba9b5d1a99f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a18f17470709d8a5f1cb918a8db6535890dee683 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bonding: remove local variable shadowing outer one' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (14 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/af_xdp: remove useless assignment' " luca.boccassi
                   ` (258 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/218fd70ce7e47126200dfecf5996b7c245d4a423

Thanks.

Luca Boccassi

---
From 218fd70ce7e47126200dfecf5996b7c245d4a423 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:56 +0000
Subject: [PATCH] net/bonding: remove local variable shadowing outer one

[ upstream commit b92b0018b17d3fb86392da58692a30b1c0997d92 ]

'retval' is already defined in the function scope, removing the 'retval'
in the block scope.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 67ca0730fa..5fe004e551 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1334,8 +1334,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 		rte_eth_macaddr_get(slave_id, &m_hdr->eth_hdr.s_addr);
 
 		if (internals->mode4.dedicated_queues.enabled == 0) {
-			int retval = rte_ring_enqueue(port->tx_ring, pkt);
-			if (retval != 0) {
+			if (rte_ring_enqueue(port->tx_ring, pkt) != 0) {
 				/* reset timer */
 				port->rx_marker_timer = 0;
 				wrn = WRN_TX_QUEUE_FULL;
@@ -1355,8 +1354,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 		}
 	} else if (likely(subtype == SLOW_SUBTYPE_LACP)) {
 		if (internals->mode4.dedicated_queues.enabled == 0) {
-			int retval = rte_ring_enqueue(port->rx_ring, pkt);
-			if (retval != 0) {
+			if (rte_ring_enqueue(port->rx_ring, pkt) != 0) {
 				/* If RX fing full free lacpdu message and drop packet */
 				wrn = WRN_RX_QUEUE_FULL;
 				goto free_out;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.083006443 +0000
+++ 0017-net-bonding-remove-local-variable-shadowing-outer-on.patch	2021-02-05 11:18:28.598687152 +0000
@@ -1 +1 @@
-From b92b0018b17d3fb86392da58692a30b1c0997d92 Mon Sep 17 00:00:00 2001
+From 218fd70ce7e47126200dfecf5996b7c245d4a423 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b92b0018b17d3fb86392da58692a30b1c0997d92 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/af_xdp: remove useless assignment' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (15 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: remove redundant return' " luca.boccassi
                   ` (257 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From d1c219fa9d269fb65e4a0b52dc910050342156e3 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:57 +0000
Subject: [PATCH] net/af_xdp: remove useless assignment

[ upstream commit c275321105aad89985bc5e207502625c069ca461 ]

Assignment of function parameter 'umem' removed.

Fixes: f0ce7af0e182 ("net/af_xdp: remove resources when port is closed")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 2c7892bd7e..7fc70df713 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -840,7 +840,6 @@ xdp_umem_destroy(struct xsk_umem_info *umem)
 #endif
 
 	rte_free(umem);
-	umem = NULL;
 }
 
 static int
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.134269806 +0000
+++ 0018-net-af_xdp-remove-useless-assignment.patch	2021-02-05 11:18:28.598687152 +0000
@@ -1 +1 @@
-From c275321105aad89985bc5e207502625c069ca461 Mon Sep 17 00:00:00 2001
+From d1c219fa9d269fb65e4a0b52dc910050342156e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c275321105aad89985bc5e207502625c069ca461 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: remove redundant return' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (16 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/af_xdp: remove useless assignment' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/crypto-perf: remove always true condition' " luca.boccassi
                   ` (256 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/80e6bad8ff9e258783cbbf8c070360374b1589ad

Thanks.

Luca Boccassi

---
From 80e6bad8ff9e258783cbbf8c070360374b1589ad Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:58 +0000
Subject: [PATCH] net/bnxt: remove redundant return

[ upstream commit 5d91d6e1c914b5372baaa9e9937cdba88cd50ff3 ]

Removing useless 'return' statement.

Fixes: b2da02480cb7 ("net/bnxt: support EEM system memory")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_em_common.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/tf_em_common.c b/drivers/net/bnxt/tf_core/tf_em_common.c
index ad92cbdc75..c96c21c2e9 100644
--- a/drivers/net/bnxt/tf_core/tf_em_common.c
+++ b/drivers/net/bnxt/tf_core/tf_em_common.c
@@ -307,7 +307,6 @@ tf_em_page_tbl_pgcnt(uint32_t num_pages,
 {
 	return roundup(num_pages, MAX_PAGE_PTRS(page_size)) /
 		       MAX_PAGE_PTRS(page_size);
-	return 0;
 }
 
 /**
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.175209299 +0000
+++ 0019-net-bnxt-remove-redundant-return.patch	2021-02-05 11:18:28.602687228 +0000
@@ -1 +1 @@
-From 5d91d6e1c914b5372baaa9e9937cdba88cd50ff3 Mon Sep 17 00:00:00 2001
+From 80e6bad8ff9e258783cbbf8c070360374b1589ad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d91d6e1c914b5372baaa9e9937cdba88cd50ff3 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/crypto-perf: remove always true condition' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (17 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: remove redundant return' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/avp: " luca.boccassi
                   ` (255 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From d97fff4bd45b9120ca6bbfdddfbe26d45dd16e3f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:59 +0000
Subject: [PATCH] app/crypto-perf: remove always true condition

[ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]

This is already 'else' leg of the opposite comparison, simple 'else'
will be logically same.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 app/test-crypto-perf/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 5f035519c3..99f86e9019 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 		if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
-		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		} else {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
@@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
 				return -1;
-		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		} else {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.214814461 +0000
+++ 0020-app-crypto-perf-remove-always-true-condition.patch	2021-02-05 11:18:28.602687228 +0000
@@ -1 +1 @@
-From 427ec3b7285d8e8b939f7e5db4976476c931c005 Mon Sep 17 00:00:00 2001
+From d97fff4bd45b9120ca6bbfdddfbe26d45dd16e3f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/avp: remove always true condition' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (18 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/crypto-perf: remove always true condition' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' " luca.boccassi
                   ` (254 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Steven Webster, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/450415e2733360f8e74e4a46ad4ff0511ce2508d

Thanks.

Luca Boccassi

---
From 450415e2733360f8e74e4a46ad4ff0511ce2508d Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:59:00 +0000
Subject: [PATCH] net/avp: remove always true condition

[ upstream commit e6b87501657e681f15b48837fdfcffabc0ed6bef ]

There is already a break above for the case "count >= 1", so at this
stage 'count' should be always '0'.

Fixes: 1a85922369c4 ("net/avp: add device configuration")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Steven Webster <steven.webster@windriver.com>
---
 drivers/net/avp/avp_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 5f8187b905..f531e03c02 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -267,7 +267,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
 			break;
 		}
 
-		if ((count < 1) && (retry == 0)) {
+		if (retry == 0) {
 			PMD_DRV_LOG(ERR, "Timeout while waiting for a response for %u\n",
 				    request->req_id);
 			ret = -ETIME;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.259922424 +0000
+++ 0021-net-avp-remove-always-true-condition.patch	2021-02-05 11:18:28.602687228 +0000
@@ -1 +1 @@
-From e6b87501657e681f15b48837fdfcffabc0ed6bef Mon Sep 17 00:00:00 2001
+From 450415e2733360f8e74e4a46ad4ff0511ce2508d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6b87501657e681f15b48837fdfcffabc0ed6bef ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (19 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/avp: " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' " luca.boccassi
                   ` (253 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Harman Kalra, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a02a695d54234b33f5d1af05b92f5da6105e3609 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 15 Jul 2020 10:40:10 +0800
Subject: [PATCH] eal/linux: fix handling of error events from epoll

[ upstream commit e3e9c87c0fc7c8e65e8f13c7bef133a552d0a597 ]

The "rev->epdata.event" assigned to "events.epdata.event" directly, which
was wrong in case of epoll events. It should be set to the "evs.events".

Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
 lib/librte_eal/linux/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
index 2f03a61254..1dd994bd1f 100644
--- a/lib/librte_eal/linux/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal_interrupts.c
@@ -1241,7 +1241,7 @@ eal_epoll_process_event(struct epoll_event *evs, unsigned int n,
 		events[count].status        = RTE_EPOLL_VALID;
 		events[count].fd            = rev->fd;
 		events[count].epfd          = rev->epfd;
-		events[count].epdata.event  = rev->epdata.event;
+		events[count].epdata.event  = evs[i].events;
 		events[count].epdata.data   = rev->epdata.data;
 		if (rev->epdata.cb_fun)
 			rev->epdata.cb_fun(rev->fd,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.299747703 +0000
+++ 0022-eal-linux-fix-handling-of-error-events-from-epoll.patch	2021-02-05 11:18:28.606687304 +0000
@@ -1 +1 @@
-From e3e9c87c0fc7c8e65e8f13c7bef133a552d0a597 Mon Sep 17 00:00:00 2001
+From a02a695d54234b33f5d1af05b92f5da6105e3609 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e3e9c87c0fc7c8e65e8f13c7bef133a552d0a597 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (20 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' " luca.boccassi
                   ` (252 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ashish Sadanandan; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/81a66f317a38969933d026d8833fdae596b8c8ea

Thanks.

Luca Boccassi

---
From 81a66f317a38969933d026d8833fdae596b8c8ea Mon Sep 17 00:00:00 2001
From: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Date: Wed, 6 Jan 2021 18:31:14 -0700
Subject: [PATCH] mbuf: add C++ include guard for dynamic fields header

[ upstream commit 397fb6a8d96cf06fc83bd87cadf46d2226fc42ed ]

The header was missing the extern "C" directive which causes name
mangling of functions by C++ compilers, leading to linker errors
complaining of undefined references to these functions.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index d88e7bacc5..fc4eee71d0 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -67,6 +67,11 @@
  */
 
 #include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Maximum length of the dynamic field or flag string.
  */
@@ -326,4 +331,8 @@ int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);
 __rte_experimental
 int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag);
 
+#ifdef __cplusplus
+}
 #endif
+
+#endif /* _RTE_MBUF_DYN_H_ */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.337504401 +0000
+++ 0023-mbuf-add-C-include-guard-for-dynamic-fields-header.patch	2021-02-05 11:18:28.606687304 +0000
@@ -1 +1 @@
-From 397fb6a8d96cf06fc83bd87cadf46d2226fc42ed Mon Sep 17 00:00:00 2001
+From 81a66f317a38969933d026d8833fdae596b8c8ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 397fb6a8d96cf06fc83bd87cadf46d2226fc42ed ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (21 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/testpmd: fix queue stats mapping configuration' " luca.boccassi
                   ` (251 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/64fdf34d136ecc642bcecb3f133470844e02e33e

Thanks.

Luca Boccassi

---
From 64fdf34d136ecc642bcecb3f133470844e02e33e Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Fri, 17 Apr 2020 18:42:06 +0200
Subject: [PATCH] net/bonding: fix port id validity check on parsing

[ upstream commit 44cd624a4b8c626fb5444199c06b5e05675c3cc1 ]

If the port_id is equal to RTE_MAX_ETHPORTS, it should be considered
invalid. Additionally, UNUSED ports are also not valid port ids to be
used afterward.

To simplify following the ethdev API rules, use the exposed function
checking whether a port id is valid.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index abdf552610..35616fb8bc 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -108,9 +108,8 @@ parse_port_id(const char *port_str)
 		}
 	}
 
-	if (port_id < 0 || port_id > RTE_MAX_ETHPORTS) {
-		RTE_BOND_LOG(ERR, "Slave port specified (%s) outside expected range",
-				port_str);
+	if (!rte_eth_dev_is_valid_port(port_id)) {
+		RTE_BOND_LOG(ERR, "Specified port (%s) is invalid", port_str);
 		return -1;
 	}
 	return port_id;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.380473090 +0000
+++ 0024-net-bonding-fix-port-id-validity-check-on-parsing.patch	2021-02-05 11:18:28.606687304 +0000
@@ -1 +1 @@
-From 44cd624a4b8c626fb5444199c06b5e05675c3cc1 Mon Sep 17 00:00:00 2001
+From 64fdf34d136ecc642bcecb3f133470844e02e33e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 44cd624a4b8c626fb5444199c06b5e05675c3cc1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/testpmd: fix queue stats mapping configuration' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (22 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: remove warnings about inline specifiers' " luca.boccassi
                   ` (250 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Huisong Li; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ed18af72c56f6c4c2b517844f44b8d330b0318e2 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 2 Dec 2020 20:48:55 +0800
Subject: [PATCH] app/testpmd: fix queue stats mapping configuration

[ upstream commit 08dcd187068666c96e8a16604a1c96160ed310e9 ]

Currently, the queue stats mapping has the following problems:
1) Many PMD drivers don't support queue stats mapping. But there is no
   failure message after executing the command "set stat_qmap rx 0 2 2".
2) Once queue mapping is set, unrelated and unmapped queues are also
   displayed.
3) The configuration result does not take effect or can not be queried
   in real time.
4) The mapping arrays, "tx_queue_stats_mappings_array" &
   "rx_queue_stats_mappings_array" are global and their sizes are based
   on fixed max port and queue size assumptions.
5) These record structures, 'map_port_queue_stats_mapping_registers()'
   and its sub functions are redundant for majority of drivers.
6) The display of the queue stats and queue stats mapping is mixed
   together.

Since xstats is used to obtain queue statistics, we have made the
following simplifications and adjustments:
1) If PMD requires and supports queue stats mapping, configure to driver
   in real time by calling ethdev API after executing the command "set
   stat_qmap rx/tx ...". If not, the command can not be accepted.
2) Based on the above adjustments, these record structures,
   'map_port_queue_stats_mapping_registers()' and its sub functions can
   be removed. "tx-queue-stats-mapping" & "rx-queue-stats-mapping"
   parameters, and 'parse_queue_stats_mapping_config()' can be removed
   too.
3) remove display of queue stats mapping in 'fwd_stats_display()' &
   'nic_stats_display()', and obtain queue stats by xstats.  Since the
   record structures are removed, 'nic_stats_mapping_display()' can be
   deleted.

Fixes: 4dccdc789bf4 ("app/testpmd: simplify handling of stats mappings error")
Fixes: 013af9b6b64f ("app/testpmd: various updates")
Fixes: ed30d9b691b2 ("app/testpmd: add stats per queue")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c    |  17 ++--
 app/test-pmd/config.c     | 144 +++++-----------------------
 app/test-pmd/parameters.c | 107 ---------------------
 app/test-pmd/testpmd.c    | 193 ++++----------------------------------
 app/test-pmd/testpmd.h    |  22 -----
 5 files changed, 47 insertions(+), 436 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0d2d6aad05..2ccbaa039e 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -163,7 +163,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"Display:\n"
 			"--------\n\n"
 
-			"show port (info|stats|summary|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\n"
+			"show port (info|stats|summary|xstats|fdir|dcb_tc|cap) (port_id|all)\n"
 			"    Display information for port_id, or all.\n\n"
 
 			"show port port_id (module_eeprom|eeprom)\n"
@@ -177,7 +177,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"show port (port_id) rss-hash [key]\n"
 			"    Display the RSS hash functions and RSS hash key of port\n\n"
 
-			"clear port (info|stats|xstats|fdir|stat_qmap) (port_id|all)\n"
+			"clear port (info|stats|xstats|fdir) (port_id|all)\n"
 			"    Clear information for port_id, or all.\n\n"
 
 			"show (rxq|txq) info (port_id) (queue_id)\n"
@@ -7555,9 +7555,6 @@ static void cmd_showportall_parsed(void *parsed_result,
 		RTE_ETH_FOREACH_DEV(i)
 			fdir_get_infos(i);
 #endif
-	else if (!strcmp(res->what, "stat_qmap"))
-		RTE_ETH_FOREACH_DEV(i)
-			nic_stats_mapping_display(i);
 	else if (!strcmp(res->what, "dcb_tc"))
 		RTE_ETH_FOREACH_DEV(i)
 			port_dcb_info_display(i);
@@ -7573,14 +7570,14 @@ cmdline_parse_token_string_t cmd_showportall_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
 cmdline_parse_token_string_t cmd_showportall_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
-				 "info#summary#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
+				 "info#summary#stats#xstats#fdir#dcb_tc#cap");
 cmdline_parse_token_string_t cmd_showportall_all =
 	TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
 cmdline_parse_inst_t cmd_showportall = {
 	.f = cmd_showportall_parsed,
 	.data = NULL,
 	.help_str = "show|clear port "
-		"info|summary|stats|xstats|fdir|stat_qmap|dcb_tc|cap all",
+		"info|summary|stats|xstats|fdir|dcb_tc|cap all",
 	.tokens = {
 		(void *)&cmd_showportall_show,
 		(void *)&cmd_showportall_port,
@@ -7622,8 +7619,6 @@ static void cmd_showport_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "fdir"))
 		 fdir_get_infos(res->portnum);
 #endif
-	else if (!strcmp(res->what, "stat_qmap"))
-		nic_stats_mapping_display(res->portnum);
 	else if (!strcmp(res->what, "dcb_tc"))
 		port_dcb_info_display(res->portnum);
 	else if (!strcmp(res->what, "cap"))
@@ -7637,7 +7632,7 @@ cmdline_parse_token_string_t cmd_showport_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
 cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
-				 "info#summary#stats#xstats#fdir#stat_qmap#dcb_tc#cap");
+				 "info#summary#stats#xstats#fdir#dcb_tc#cap");
 cmdline_parse_token_num_t cmd_showport_portnum =
 	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, RTE_UINT16);
 
@@ -7645,7 +7640,7 @@ cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,
 	.data = NULL,
 	.help_str = "show|clear port "
-		"info|summary|stats|xstats|fdir|stat_qmap|dcb_tc|cap "
+		"info|summary|stats|xstats|fdir|dcb_tc|cap "
 		"<port_id>",
 	.tokens = {
 		(void *)&cmd_showport_show,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index b51de59e1e..3f6c8642b1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -183,8 +183,6 @@ nic_stats_display(portid_t port_id)
 								diff_ns;
 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
 	struct rte_eth_stats stats;
-	struct rte_port *port = &ports[port_id];
-	uint8_t i;
 
 	static const char *nic_stats_border = "########################";
 
@@ -196,46 +194,12 @@ nic_stats_display(portid_t port_id)
 	printf("\n  %s NIC statistics for port %-2d %s\n",
 	       nic_stats_border, port_id, nic_stats_border);
 
-	if ((!port->rx_queue_stats_mapping_enabled) && (!port->tx_queue_stats_mapping_enabled)) {
-		printf("  RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes:  "
-		       "%-"PRIu64"\n",
-		       stats.ipackets, stats.imissed, stats.ibytes);
-		printf("  RX-errors: %-"PRIu64"\n", stats.ierrors);
-		printf("  RX-nombuf:  %-10"PRIu64"\n",
-		       stats.rx_nombuf);
-		printf("  TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes:  "
-		       "%-"PRIu64"\n",
-		       stats.opackets, stats.oerrors, stats.obytes);
-	}
-	else {
-		printf("  RX-packets:              %10"PRIu64"    RX-errors: %10"PRIu64
-		       "    RX-bytes: %10"PRIu64"\n",
-		       stats.ipackets, stats.ierrors, stats.ibytes);
-		printf("  RX-errors:  %10"PRIu64"\n", stats.ierrors);
-		printf("  RX-nombuf:               %10"PRIu64"\n",
-		       stats.rx_nombuf);
-		printf("  TX-packets:              %10"PRIu64"    TX-errors: %10"PRIu64
-		       "    TX-bytes: %10"PRIu64"\n",
-		       stats.opackets, stats.oerrors, stats.obytes);
-	}
-
-	if (port->rx_queue_stats_mapping_enabled) {
-		printf("\n");
-		for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
-			printf("  Stats reg %2d RX-packets: %10"PRIu64
-			       "    RX-errors: %10"PRIu64
-			       "    RX-bytes: %10"PRIu64"\n",
-			       i, stats.q_ipackets[i], stats.q_errors[i], stats.q_ibytes[i]);
-		}
-	}
-	if (port->tx_queue_stats_mapping_enabled) {
-		printf("\n");
-		for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
-			printf("  Stats reg %2d TX-packets: %10"PRIu64
-			       "                             TX-bytes: %10"PRIu64"\n",
-			       i, stats.q_opackets[i], stats.q_obytes[i]);
-		}
-	}
+	printf("  RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes:  "
+	       "%-"PRIu64"\n", stats.ipackets, stats.imissed, stats.ibytes);
+	printf("  RX-errors: %-"PRIu64"\n", stats.ierrors);
+	printf("  RX-nombuf:  %-10"PRIu64"\n", stats.rx_nombuf);
+	printf("  TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes:  "
+	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
 	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
@@ -398,54 +362,6 @@ nic_xstats_clear(portid_t port_id)
 	}
 }
 
-void
-nic_stats_mapping_display(portid_t port_id)
-{
-	struct rte_port *port = &ports[port_id];
-	uint16_t i;
-
-	static const char *nic_stats_mapping_border = "########################";
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
-		print_valid_ports();
-		return;
-	}
-
-	if ((!port->rx_queue_stats_mapping_enabled) && (!port->tx_queue_stats_mapping_enabled)) {
-		printf("Port id %d - either does not support queue statistic mapping or"
-		       " no queue statistic mapping set\n", port_id);
-		return;
-	}
-
-	printf("\n  %s NIC statistics mapping for port %-2d %s\n",
-	       nic_stats_mapping_border, port_id, nic_stats_mapping_border);
-
-	if (port->rx_queue_stats_mapping_enabled) {
-		for (i = 0; i < nb_rx_queue_stats_mappings; i++) {
-			if (rx_queue_stats_mappings[i].port_id == port_id) {
-				printf("  RX-queue %2d mapped to Stats Reg %2d\n",
-				       rx_queue_stats_mappings[i].queue_id,
-				       rx_queue_stats_mappings[i].stats_counter_id);
-			}
-		}
-		printf("\n");
-	}
-
-
-	if (port->tx_queue_stats_mapping_enabled) {
-		for (i = 0; i < nb_tx_queue_stats_mappings; i++) {
-			if (tx_queue_stats_mappings[i].port_id == port_id) {
-				printf("  TX-queue %2d mapped to Stats Reg %2d\n",
-				       tx_queue_stats_mappings[i].queue_id,
-				       tx_queue_stats_mappings[i].stats_counter_id);
-			}
-		}
-	}
-
-	printf("  %s####################################%s\n",
-	       nic_stats_mapping_border, nic_stats_mapping_border);
-}
-
 void
 rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 {
@@ -2573,7 +2489,7 @@ tx_queue_id_is_invalid(queueid_t txq_id)
 {
 	if (txq_id < nb_txq)
 		return 0;
-	printf("Invalid TX queue %d (must be < nb_rxq=%d)\n", txq_id, nb_txq);
+	printf("Invalid TX queue %d (must be < nb_txq=%d)\n", txq_id, nb_txq);
 	return 1;
 }
 
@@ -4528,8 +4444,7 @@ tx_vlan_pvid_set(portid_t port_id, uint16_t vlan_id, int on)
 void
 set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value)
 {
-	uint16_t i;
-	uint8_t existing_mapping_found = 0;
+	int ret;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
@@ -4539,40 +4454,23 @@ set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value)
 
 	if (map_value >= RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 		printf("map_value not in required range 0..%d\n",
-				RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
+		       RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
 		return;
 	}
 
-	if (!is_rx) { /*then tx*/
-		for (i = 0; i < nb_tx_queue_stats_mappings; i++) {
-			if ((tx_queue_stats_mappings[i].port_id == port_id) &&
-			    (tx_queue_stats_mappings[i].queue_id == queue_id)) {
-				tx_queue_stats_mappings[i].stats_counter_id = map_value;
-				existing_mapping_found = 1;
-				break;
-			}
+	if (!is_rx) { /* tx */
+		ret = rte_eth_dev_set_tx_queue_stats_mapping(port_id, queue_id,
+							     map_value);
+		if (ret) {
+			printf("failed to set tx queue stats mapping.\n");
+			return;
 		}
-		if (!existing_mapping_found) { /* A new additional mapping... */
-			tx_queue_stats_mappings[nb_tx_queue_stats_mappings].port_id = port_id;
-			tx_queue_stats_mappings[nb_tx_queue_stats_mappings].queue_id = queue_id;
-			tx_queue_stats_mappings[nb_tx_queue_stats_mappings].stats_counter_id = map_value;
-			nb_tx_queue_stats_mappings++;
-		}
-	}
-	else { /*rx*/
-		for (i = 0; i < nb_rx_queue_stats_mappings; i++) {
-			if ((rx_queue_stats_mappings[i].port_id == port_id) &&
-			    (rx_queue_stats_mappings[i].queue_id == queue_id)) {
-				rx_queue_stats_mappings[i].stats_counter_id = map_value;
-				existing_mapping_found = 1;
-				break;
-			}
-		}
-		if (!existing_mapping_found) { /* A new additional mapping... */
-			rx_queue_stats_mappings[nb_rx_queue_stats_mappings].port_id = port_id;
-			rx_queue_stats_mappings[nb_rx_queue_stats_mappings].queue_id = queue_id;
-			rx_queue_stats_mappings[nb_rx_queue_stats_mappings].stats_counter_id = map_value;
-			nb_rx_queue_stats_mappings++;
+	} else { /* rx */
+		ret = rte_eth_dev_set_rx_queue_stats_mapping(port_id, queue_id,
+							     map_value);
+		if (ret) {
+			printf("failed to set rx queue stats mapping.\n");
+			return;
 		}
 	}
 }
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index bbb68a55ff..414a0068fb 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -176,12 +176,6 @@ usage(char* progname)
 	       "(0 <= N <= value of txd).\n");
 	printf("  --txrst=N: set the transmit RS bit threshold of TX rings to N "
 	       "(0 <= N <= value of txd).\n");
-	printf("  --tx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping]: "
-	       "tx queues statistics counters mapping "
-	       "(0 <= mapping <= %d).\n", RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
-	printf("  --rx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping]: "
-	       "rx queues statistics counters mapping "
-	       "(0 <= mapping <= %d).\n", RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
 	printf("  --no-flush-rx: Don't flush RX streams before forwarding."
 	       " Used mainly with PCAP drivers.\n");
 	printf("  --rxoffs=X[,Y]*: set RX segment offsets for split.\n");
@@ -300,93 +294,6 @@ parse_fwd_portmask(const char *portmask)
 		set_fwd_ports_mask((uint64_t) pm);
 }
 
-
-static int
-parse_queue_stats_mapping_config(const char *q_arg, int is_rx)
-{
-	char s[256];
-	const char *p, *p0 = q_arg;
-	char *end;
-	enum fieldnames {
-		FLD_PORT = 0,
-		FLD_QUEUE,
-		FLD_STATS_COUNTER,
-		_NUM_FLD
-	};
-	unsigned long int_fld[_NUM_FLD];
-	char *str_fld[_NUM_FLD];
-	int i;
-	unsigned size;
-
-	/* reset from value set at definition */
-	is_rx ? (nb_rx_queue_stats_mappings = 0) : (nb_tx_queue_stats_mappings = 0);
-
-	while ((p = strchr(p0,'(')) != NULL) {
-		++p;
-		if((p0 = strchr(p,')')) == NULL)
-			return -1;
-
-		size = p0 - p;
-		if(size >= sizeof(s))
-			return -1;
-
-		snprintf(s, sizeof(s), "%.*s", size, p);
-		if (rte_strsplit(s, sizeof(s), str_fld, _NUM_FLD, ',') != _NUM_FLD)
-			return -1;
-		for (i = 0; i < _NUM_FLD; i++){
-			errno = 0;
-			int_fld[i] = strtoul(str_fld[i], &end, 0);
-			if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
-				return -1;
-		}
-		/* Check mapping field is in correct range (0..RTE_ETHDEV_QUEUE_STAT_CNTRS-1) */
-		if (int_fld[FLD_STATS_COUNTER] >= RTE_ETHDEV_QUEUE_STAT_CNTRS) {
-			printf("Stats counter not in the correct range 0..%d\n",
-					RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
-			return -1;
-		}
-
-		if (!is_rx) {
-			if ((nb_tx_queue_stats_mappings >=
-						MAX_TX_QUEUE_STATS_MAPPINGS)) {
-				printf("exceeded max number of TX queue "
-						"statistics mappings: %hu\n",
-						nb_tx_queue_stats_mappings);
-				return -1;
-			}
-			tx_queue_stats_mappings_array[nb_tx_queue_stats_mappings].port_id =
-				(uint8_t)int_fld[FLD_PORT];
-			tx_queue_stats_mappings_array[nb_tx_queue_stats_mappings].queue_id =
-				(uint8_t)int_fld[FLD_QUEUE];
-			tx_queue_stats_mappings_array[nb_tx_queue_stats_mappings].stats_counter_id =
-				(uint8_t)int_fld[FLD_STATS_COUNTER];
-			++nb_tx_queue_stats_mappings;
-		}
-		else {
-			if ((nb_rx_queue_stats_mappings >=
-						MAX_RX_QUEUE_STATS_MAPPINGS)) {
-				printf("exceeded max number of RX queue "
-						"statistics mappings: %hu\n",
-						nb_rx_queue_stats_mappings);
-				return -1;
-			}
-			rx_queue_stats_mappings_array[nb_rx_queue_stats_mappings].port_id =
-				(uint8_t)int_fld[FLD_PORT];
-			rx_queue_stats_mappings_array[nb_rx_queue_stats_mappings].queue_id =
-				(uint8_t)int_fld[FLD_QUEUE];
-			rx_queue_stats_mappings_array[nb_rx_queue_stats_mappings].stats_counter_id =
-				(uint8_t)int_fld[FLD_STATS_COUNTER];
-			++nb_rx_queue_stats_mappings;
-		}
-
-	}
-/* Reassign the rx/tx_queue_stats_mappings pointer to point to this newly populated array rather */
-/* than to the default array (that was set at its definition) */
-	is_rx ? (rx_queue_stats_mappings = rx_queue_stats_mappings_array) :
-		(tx_queue_stats_mappings = tx_queue_stats_mappings_array);
-	return 0;
-}
-
 static void
 print_invalid_socket_id_error(void)
 {
@@ -664,8 +571,6 @@ launch_args_parse(int argc, char** argv)
 		{ "rxht",			1, 0, 0 },
 		{ "rxwt",			1, 0, 0 },
 		{ "rxfreet",                    1, 0, 0 },
-		{ "tx-queue-stats-mapping",	1, 0, 0 },
-		{ "rx-queue-stats-mapping",	1, 0, 0 },
 		{ "no-flush-rx",	0, 0, 0 },
 		{ "flow-isolate-all",	        0, 0, 0 },
 		{ "rxoffs",			1, 0, 0 },
@@ -1279,18 +1184,6 @@ launch_args_parse(int argc, char** argv)
 				else
 					rte_exit(EXIT_FAILURE, "rxfreet must be >= 0\n");
 			}
-			if (!strcmp(lgopts[opt_idx].name, "tx-queue-stats-mapping")) {
-				if (parse_queue_stats_mapping_config(optarg, TX)) {
-					rte_exit(EXIT_FAILURE,
-						 "invalid TX queue statistics mapping config entered\n");
-				}
-			}
-			if (!strcmp(lgopts[opt_idx].name, "rx-queue-stats-mapping")) {
-				if (parse_queue_stats_mapping_config(optarg, RX)) {
-					rte_exit(EXIT_FAILURE,
-						 "invalid RX queue statistics mapping config entered\n");
-				}
-			}
 			if (!strcmp(lgopts[opt_idx].name, "rxoffs")) {
 				unsigned int seg_off[MAX_SEGS_BUFFER_SPLIT];
 				unsigned int nb_offs;
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 33fc0fddf5..33a060dffd 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -476,15 +476,6 @@ struct rte_fdir_conf fdir_conf = {
 
 volatile int test_done = 1; /* stop packet forwarding when set to 1. */
 
-struct queue_stats_mappings tx_queue_stats_mappings_array[MAX_TX_QUEUE_STATS_MAPPINGS];
-struct queue_stats_mappings rx_queue_stats_mappings_array[MAX_RX_QUEUE_STATS_MAPPINGS];
-
-struct queue_stats_mappings *tx_queue_stats_mappings = tx_queue_stats_mappings_array;
-struct queue_stats_mappings *rx_queue_stats_mappings = rx_queue_stats_mappings_array;
-
-uint16_t nb_tx_queue_stats_mappings = 0;
-uint16_t nb_rx_queue_stats_mappings = 0;
-
 /*
  * Display zero values by default for xstats
  */
@@ -520,8 +511,6 @@ enum rte_eth_rx_mq_mode rx_mq_mode = ETH_MQ_RX_VMDQ_DCB_RSS;
 
 /* Forward function declarations */
 static void setup_attached_port(portid_t pi);
-static void map_port_queue_stats_mapping_registers(portid_t pi,
-						   struct rte_port *port);
 static void check_all_ports_link_status(uint32_t port_mask);
 static int eth_event_callback(portid_t port_id,
 			      enum rte_eth_event_type type,
@@ -1857,8 +1846,6 @@ fwd_stats_display(void)
 			fwd_cycles += fs->core_cycles;
 	}
 	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
-		uint8_t j;
-
 		pt_id = fwd_ports_ids[i];
 		port = &ports[pt_id];
 
@@ -1881,88 +1868,34 @@ fwd_stats_display(void)
 		printf("\n  %s Forward statistics for port %-2d %s\n",
 		       fwd_stats_border, pt_id, fwd_stats_border);
 
-		if (!port->rx_queue_stats_mapping_enabled &&
-		    !port->tx_queue_stats_mapping_enabled) {
-			printf("  RX-packets: %-14"PRIu64
-			       " RX-dropped: %-14"PRIu64
-			       "RX-total: %-"PRIu64"\n",
-			       stats.ipackets, stats.imissed,
-			       stats.ipackets + stats.imissed);
-
-			if (cur_fwd_eng == &csum_fwd_engine)
-				printf("  Bad-ipcsum: %-14"PRIu64
-				       " Bad-l4csum: %-14"PRIu64
-				       "Bad-outer-l4csum: %-14"PRIu64"\n",
-				       ports_stats[pt_id].rx_bad_ip_csum,
-				       ports_stats[pt_id].rx_bad_l4_csum,
-				       ports_stats[pt_id].rx_bad_outer_l4_csum);
-			if (stats.ierrors + stats.rx_nombuf > 0) {
-				printf("  RX-error: %-"PRIu64"\n",
-				       stats.ierrors);
-				printf("  RX-nombufs: %-14"PRIu64"\n",
-				       stats.rx_nombuf);
-			}
-
-			printf("  TX-packets: %-14"PRIu64
-			       " TX-dropped: %-14"PRIu64
-			       "TX-total: %-"PRIu64"\n",
-			       stats.opackets, ports_stats[pt_id].tx_dropped,
-			       stats.opackets + ports_stats[pt_id].tx_dropped);
-		} else {
-			printf("  RX-packets:             %14"PRIu64
-			       "    RX-dropped:%14"PRIu64
-			       "    RX-total:%14"PRIu64"\n",
-			       stats.ipackets, stats.imissed,
-			       stats.ipackets + stats.imissed);
-
-			if (cur_fwd_eng == &csum_fwd_engine)
-				printf("  Bad-ipcsum:%14"PRIu64
-				       "    Bad-l4csum:%14"PRIu64
-				       "    Bad-outer-l4csum: %-14"PRIu64"\n",
-				       ports_stats[pt_id].rx_bad_ip_csum,
-				       ports_stats[pt_id].rx_bad_l4_csum,
-				       ports_stats[pt_id].rx_bad_outer_l4_csum);
-			if ((stats.ierrors + stats.rx_nombuf) > 0) {
-				printf("  RX-error:%"PRIu64"\n", stats.ierrors);
-				printf("  RX-nombufs:             %14"PRIu64"\n",
-				       stats.rx_nombuf);
-			}
-
-			printf("  TX-packets:             %14"PRIu64
-			       "    TX-dropped:%14"PRIu64
-			       "    TX-total:%14"PRIu64"\n",
-			       stats.opackets, ports_stats[pt_id].tx_dropped,
-			       stats.opackets + ports_stats[pt_id].tx_dropped);
+		printf("  RX-packets: %-14"PRIu64" RX-dropped: %-14"PRIu64
+		       "RX-total: %-"PRIu64"\n", stats.ipackets, stats.imissed,
+		       stats.ipackets + stats.imissed);
+
+		if (cur_fwd_eng == &csum_fwd_engine)
+			printf("  Bad-ipcsum: %-14"PRIu64
+			       " Bad-l4csum: %-14"PRIu64
+			       "Bad-outer-l4csum: %-14"PRIu64"\n",
+			       ports_stats[pt_id].rx_bad_ip_csum,
+			       ports_stats[pt_id].rx_bad_l4_csum,
+			       ports_stats[pt_id].rx_bad_outer_l4_csum);
+		if (stats.ierrors + stats.rx_nombuf > 0) {
+			printf("  RX-error: %-"PRIu64"\n", stats.ierrors);
+			printf("  RX-nombufs: %-14"PRIu64"\n", stats.rx_nombuf);
 		}
 
+		printf("  TX-packets: %-14"PRIu64" TX-dropped: %-14"PRIu64
+		       "TX-total: %-"PRIu64"\n",
+		       stats.opackets, ports_stats[pt_id].tx_dropped,
+		       stats.opackets + ports_stats[pt_id].tx_dropped);
+
 		if (record_burst_stats) {
 			if (ports_stats[pt_id].rx_stream)
 				pkt_burst_stats_display("RX",
 					&ports_stats[pt_id].rx_stream->rx_burst_stats);
 			if (ports_stats[pt_id].tx_stream)
 				pkt_burst_stats_display("TX",
-					&ports_stats[pt_id].tx_stream->tx_burst_stats);
-		}
-
-		if (port->rx_queue_stats_mapping_enabled) {
-			printf("\n");
-			for (j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS; j++) {
-				printf("  Stats reg %2d RX-packets:%14"PRIu64
-				       "     RX-errors:%14"PRIu64
-				       "    RX-bytes:%14"PRIu64"\n",
-				       j, stats.q_ipackets[j],
-				       stats.q_errors[j], stats.q_ibytes[j]);
-			}
-			printf("\n");
-		}
-		if (port->tx_queue_stats_mapping_enabled) {
-			for (j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS; j++) {
-				printf("  Stats reg %2d TX-packets:%14"PRIu64
-				       "                                 TX-bytes:%14"
-				       PRIu64"\n",
-				       j, stats.q_opackets[j],
-				       stats.q_obytes[j]);
-			}
+				&ports_stats[pt_id].tx_stream->tx_burst_stats);
 		}
 
 		printf("  %s--------------------------------%s\n",
@@ -2236,11 +2169,6 @@ start_packet_forwarding(int with_tx_first)
 	rxtx_config_display();
 
 	fwd_stats_reset();
-	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
-		pt_id = fwd_ports_ids[i];
-		port = &ports[pt_id];
-		map_port_queue_stats_mapping_registers(pt_id, port);
-	}
 	if (with_tx_first) {
 		port_fwd_begin = tx_only_engine.port_fwd_begin;
 		if (port_fwd_begin != NULL) {
@@ -3352,84 +3280,6 @@ dev_event_callback(const char *device_name, enum rte_dev_event_type type,
 	}
 }
 
-static int
-set_tx_queue_stats_mapping_registers(portid_t port_id, struct rte_port *port)
-{
-	uint16_t i;
-	int diag;
-	uint8_t mapping_found = 0;
-
-	for (i = 0; i < nb_tx_queue_stats_mappings; i++) {
-		if ((tx_queue_stats_mappings[i].port_id == port_id) &&
-				(tx_queue_stats_mappings[i].queue_id < nb_txq )) {
-			diag = rte_eth_dev_set_tx_queue_stats_mapping(port_id,
-					tx_queue_stats_mappings[i].queue_id,
-					tx_queue_stats_mappings[i].stats_counter_id);
-			if (diag != 0)
-				return diag;
-			mapping_found = 1;
-		}
-	}
-	if (mapping_found)
-		port->tx_queue_stats_mapping_enabled = 1;
-	return 0;
-}
-
-static int
-set_rx_queue_stats_mapping_registers(portid_t port_id, struct rte_port *port)
-{
-	uint16_t i;
-	int diag;
-	uint8_t mapping_found = 0;
-
-	for (i = 0; i < nb_rx_queue_stats_mappings; i++) {
-		if ((rx_queue_stats_mappings[i].port_id == port_id) &&
-				(rx_queue_stats_mappings[i].queue_id < nb_rxq )) {
-			diag = rte_eth_dev_set_rx_queue_stats_mapping(port_id,
-					rx_queue_stats_mappings[i].queue_id,
-					rx_queue_stats_mappings[i].stats_counter_id);
-			if (diag != 0)
-				return diag;
-			mapping_found = 1;
-		}
-	}
-	if (mapping_found)
-		port->rx_queue_stats_mapping_enabled = 1;
-	return 0;
-}
-
-static void
-map_port_queue_stats_mapping_registers(portid_t pi, struct rte_port *port)
-{
-	int diag = 0;
-
-	diag = set_tx_queue_stats_mapping_registers(pi, port);
-	if (diag != 0) {
-		if (diag == -ENOTSUP) {
-			port->tx_queue_stats_mapping_enabled = 0;
-			printf("TX queue stats mapping not supported port id=%d\n", pi);
-		}
-		else
-			rte_exit(EXIT_FAILURE,
-					"set_tx_queue_stats_mapping_registers "
-					"failed for port id=%d diag=%d\n",
-					pi, diag);
-	}
-
-	diag = set_rx_queue_stats_mapping_registers(pi, port);
-	if (diag != 0) {
-		if (diag == -ENOTSUP) {
-			port->rx_queue_stats_mapping_enabled = 0;
-			printf("RX queue stats mapping not supported port id=%d\n", pi);
-		}
-		else
-			rte_exit(EXIT_FAILURE,
-					"set_rx_queue_stats_mapping_registers "
-					"failed for port id=%d diag=%d\n",
-					pi, diag);
-	}
-}
-
 static void
 rxtx_port_config(struct rte_port *port)
 {
@@ -3526,7 +3376,6 @@ init_port_config(void)
 		if (ret != 0)
 			return;
 
-		map_port_queue_stats_mapping_registers(pid, port);
 #if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
 		rte_pmd_ixgbe_bypass_init(pid);
 #endif
@@ -3737,8 +3586,6 @@ init_port_dcb_config(portid_t pid,
 	if (retval != 0)
 		return retval;
 
-	map_port_queue_stats_mapping_registers(pid, rte_port);
-
 	rte_port->dcb_flag = 1;
 
 	return 0;
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6b901a894f..5f23162107 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -206,8 +206,6 @@ struct rte_port {
 	uint16_t                tunnel_tso_segsz; /**< Segmentation offload MSS for tunneled pkts. */
 	uint16_t                tx_vlan_id;/**< The tag ID */
 	uint16_t                tx_vlan_id_outer;/**< The outer tag ID */
-	uint8_t                 tx_queue_stats_mapping_enabled;
-	uint8_t                 rx_queue_stats_mapping_enabled;
 	volatile uint16_t        port_status;    /**< port started or not */
 	uint8_t                 need_setup;     /**< port just attached */
 	uint8_t                 need_reconfig;  /**< need reconfiguring port or not */
@@ -326,25 +324,6 @@ enum dcb_mode_enable
 	DCB_ENABLED
 };
 
-#define MAX_TX_QUEUE_STATS_MAPPINGS 1024 /* MAX_PORT of 32 @ 32 tx_queues/port */
-#define MAX_RX_QUEUE_STATS_MAPPINGS 4096 /* MAX_PORT of 32 @ 128 rx_queues/port */
-
-struct queue_stats_mappings {
-	portid_t port_id;
-	uint16_t queue_id;
-	uint8_t stats_counter_id;
-} __rte_cache_aligned;
-
-extern struct queue_stats_mappings tx_queue_stats_mappings_array[];
-extern struct queue_stats_mappings rx_queue_stats_mappings_array[];
-
-/* Assign both tx and rx queue stats mappings to the same default values */
-extern struct queue_stats_mappings *tx_queue_stats_mappings;
-extern struct queue_stats_mappings *rx_queue_stats_mappings;
-
-extern uint16_t nb_tx_queue_stats_mappings;
-extern uint16_t nb_rx_queue_stats_mappings;
-
 extern uint8_t xstats_hide_zero; /**< Hide zero values for xstats display */
 
 /* globals used for configuration */
@@ -790,7 +769,6 @@ void nic_stats_display(portid_t port_id);
 void nic_stats_clear(portid_t port_id);
 void nic_xstats_display(portid_t port_id);
 void nic_xstats_clear(portid_t port_id);
-void nic_stats_mapping_display(portid_t port_id);
 void device_infos_display(const char *identifier);
 void port_infos_display(portid_t port_id);
 void port_summary_display(portid_t port_id);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.420030612 +0000
+++ 0025-app-testpmd-fix-queue-stats-mapping-configuration.patch	2021-02-05 11:18:28.630687761 +0000
@@ -1 +1 @@
-From 08dcd187068666c96e8a16604a1c96160ed310e9 Mon Sep 17 00:00:00 2001
+From ed18af72c56f6c4c2b517844f44b8d330b0318e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08dcd187068666c96e8a16604a1c96160ed310e9 ]
+
@@ -39 +40,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: remove warnings about inline specifiers' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (23 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'app/testpmd: fix queue stats mapping configuration' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: fix signed/unsigned mismatch warnings' " luca.boccassi
                   ` (249 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 6b2b02c5cfd68190aa35e217a75bb0ec378a89e2 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Tue, 1 Dec 2020 10:24:20 +0300
Subject: [PATCH] common/sfc_efx/base: remove warnings about inline specifiers

[ upstream commit c87fa3156c4334ccf0e105c3bb1248dff71b7ae5 ]

Windows build of the current libefx rejects these specifiers.
They're unneeded anyway; the compiler should decide inlining.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index ee0a3d3196..cbc1cb28c9 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -760,7 +760,7 @@ efx_mae_match_specs_equal(
 	    ((_mask)[(_bit) / (_mask_page_nbits)] &			\
 		    (1ULL << ((_bit) & ((_mask_page_nbits) - 1))))
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_prefix(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
@@ -780,7 +780,7 @@ efx_mask_is_prefix(
 	return B_TRUE;
 }
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_all_ones(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
@@ -794,7 +794,7 @@ efx_mask_is_all_ones(
 	return (t == (uint8_t)(~0));
 }
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_all_zeros(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.476095869 +0000
+++ 0026-common-sfc_efx-base-remove-warnings-about-inline-spe.patch	2021-02-05 11:18:28.634687837 +0000
@@ -1 +1 @@
-From c87fa3156c4334ccf0e105c3bb1248dff71b7ae5 Mon Sep 17 00:00:00 2001
+From 6b2b02c5cfd68190aa35e217a75bb0ec378a89e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c87fa3156c4334ccf0e105c3bb1248dff71b7ae5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: fix signed/unsigned mismatch warnings' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (24 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: remove warnings about inline specifiers' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: support alternative MAE match fields' " luca.boccassi
                   ` (248 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From b79e4c8ad6e52a9deb26372d34d9faa5e5eaabad Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Tue, 1 Dec 2020 10:24:21 +0300
Subject: [PATCH] common/sfc_efx/base: fix signed/unsigned mismatch warnings

[ upstream commit a0f0b03c817ce14e9dc337c8d9d8770760173dfe ]

Fix signed/unsigned mismatch issues found by Windows build.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Fixes: bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API")
Fixes: e9d5c5fb6872 ("common/sfc_efx/base: avoid reading past buffer")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index cbc1cb28c9..2f5b167275 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -644,7 +644,7 @@ efx_mae_match_spec_field_set(
 		goto fail1;
 	}
 
-	if (field_id >= desc_set_nentries) {
+	if ((unsigned int)field_id >= desc_set_nentries) {
 		rc = EINVAL;
 		goto fail2;
 	}
@@ -844,7 +844,8 @@ efx_mae_match_spec_is_valid(
 	if (field_caps == NULL)
 		return (B_FALSE);
 
-	for (field_id = 0; field_id < desc_set_nentries; ++field_id) {
+	for (field_id = 0; (unsigned int)field_id < desc_set_nentries;
+	     ++field_id) {
 		const efx_mae_mv_desc_t *descp = &desc_setp[field_id];
 		efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id;
 		const uint8_t *m_buf = mvp + descp->emmd_mask_offset;
@@ -853,7 +854,7 @@ efx_mae_match_spec_is_valid(
 		if (m_size == 0)
 			continue; /* Skip array gap */
 
-		if (field_cap_id >= field_ncaps)
+		if ((unsigned int)field_cap_id >= field_ncaps)
 			break;
 
 		switch (field_caps[field_cap_id].emfc_support) {
@@ -1350,14 +1351,15 @@ efx_mae_match_specs_class_cmp(
 		return (0);
 	}
 
-	for (field_id = 0; field_id < desc_set_nentries; ++field_id) {
+	for (field_id = 0; (unsigned int)field_id < desc_set_nentries;
+	     ++field_id) {
 		const efx_mae_mv_desc_t *descp = &desc_setp[field_id];
 		efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id;
 
 		if (descp->emmd_mask_size == 0)
 			continue; /* Skip array gap */
 
-		if (field_cap_id >= field_ncaps)
+		if ((unsigned int)field_cap_id >= field_ncaps)
 			break;
 
 		if (field_caps[field_cap_id].emfc_mask_affects_class) {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.515338258 +0000
+++ 0027-common-sfc_efx-base-fix-signed-unsigned-mismatch-war.patch	2021-02-05 11:18:28.634687837 +0000
@@ -1 +1 @@
-From a0f0b03c817ce14e9dc337c8d9d8770760173dfe Mon Sep 17 00:00:00 2001
+From b79e4c8ad6e52a9deb26372d34d9faa5e5eaabad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a0f0b03c817ce14e9dc337c8d9d8770760173dfe ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: support alternative MAE match fields' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (25 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: fix signed/unsigned mismatch warnings' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ionic: do minor logging fixups' " luca.boccassi
                   ` (247 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/101617a60789f23b9d1807281e0771a0cd5800e2

Thanks.

Luca Boccassi

---
From 101617a60789f23b9d1807281e0771a0cd5800e2 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Tue, 1 Dec 2020 10:30:10 +0300
Subject: [PATCH] common/sfc_efx/base: support alternative MAE match fields

[ upstream commit 429ed2f9ec7a0a0c48cbc90d7ab25185a36c1a85 ]

If MAE slice is configured without conntrack support, outer
rules must match on IP SRC/DST. This isn't reported clearly
by the FW because IPv4 and IPv6 have separate SRC/DST pairs.
The FW reports status ALWAYS for all these four fields, and
having an all-zeros mask for either field prevents the spec
from being certified by the existing spec validation method.

Extend the spec validation to take the "alternative" fields
into account so that legitimate specs don't get turned down.

Fixes: ed15d7f8e064 ("common/sfc_efx/base: validate and compare outer match specs")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 52 ++++++++++++++++++++++++---
 1 file changed, 48 insertions(+), 4 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 2f5b167275..a54d5f6e6c 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -463,6 +463,10 @@ typedef enum efx_mae_field_endianness_e {
  * The information in it is meant to be used internally by
  * APIs for addressing a given field in a mask-value pairs
  * structure and for validation purposes.
+ *
+ * A field may have an alternative one. This structure
+ * has additional members to reference the alternative
+ * field's mask. See efx_mae_match_spec_is_valid().
  */
 typedef struct efx_mae_mv_desc_s {
 	efx_mae_field_cap_id_t		emmd_field_cap_id;
@@ -472,6 +476,14 @@ typedef struct efx_mae_mv_desc_s {
 	size_t				emmd_mask_size;
 	size_t				emmd_mask_offset;
 
+	/*
+	 * Having the alternative field's mask size set to 0
+	 * means that there's no alternative field specified.
+	 */
+	size_t				emmd_alt_mask_size;
+	size_t				emmd_alt_mask_offset;
+
+	/* Primary field and the alternative one are of the same endianness. */
 	efx_mae_field_endianness_t	emmd_endianness;
 } efx_mae_mv_desc_t;
 
@@ -485,6 +497,7 @@ static const efx_mae_mv_desc_t __efx_mae_action_rule_mv_desc_set[] = {
 		MAE_FIELD_MASK_VALUE_PAIRS_##_name##_OFST,		\
 		MAE_FIELD_MASK_VALUE_PAIRS_##_name##_MASK_LEN,		\
 		MAE_FIELD_MASK_VALUE_PAIRS_##_name##_MASK_OFST,		\
+		0, 0 /* no alternative field */,			\
 		_endianness						\
 	}
 
@@ -522,6 +535,21 @@ static const efx_mae_mv_desc_t __efx_mae_outer_rule_mv_desc_set[] = {
 		MAE_ENC_FIELD_PAIRS_##_name##_OFST,			\
 		MAE_ENC_FIELD_PAIRS_##_name##_MASK_LEN,			\
 		MAE_ENC_FIELD_PAIRS_##_name##_MASK_OFST,		\
+		0, 0 /* no alternative field */,			\
+		_endianness						\
+	}
+
+/* Same as EFX_MAE_MV_DESC(), but also indicates an alternative field. */
+#define	EFX_MAE_MV_DESC_ALT(_name, _alt_name, _endianness)		\
+	[EFX_MAE_FIELD_##_name] =					\
+	{								\
+		EFX_MAE_FIELD_ID_##_name,				\
+		MAE_ENC_FIELD_PAIRS_##_name##_LEN,			\
+		MAE_ENC_FIELD_PAIRS_##_name##_OFST,			\
+		MAE_ENC_FIELD_PAIRS_##_name##_MASK_LEN,			\
+		MAE_ENC_FIELD_PAIRS_##_name##_MASK_OFST,		\
+		MAE_ENC_FIELD_PAIRS_##_alt_name##_MASK_LEN,		\
+		MAE_ENC_FIELD_PAIRS_##_alt_name##_MASK_OFST,		\
 		_endianness						\
 	}
 
@@ -533,16 +561,17 @@ static const efx_mae_mv_desc_t __efx_mae_outer_rule_mv_desc_set[] = {
 	EFX_MAE_MV_DESC(ENC_VLAN0_PROTO_BE, EFX_MAE_FIELD_BE),
 	EFX_MAE_MV_DESC(ENC_VLAN1_TCI_BE, EFX_MAE_FIELD_BE),
 	EFX_MAE_MV_DESC(ENC_VLAN1_PROTO_BE, EFX_MAE_FIELD_BE),
-	EFX_MAE_MV_DESC(ENC_SRC_IP4_BE, EFX_MAE_FIELD_BE),
-	EFX_MAE_MV_DESC(ENC_DST_IP4_BE, EFX_MAE_FIELD_BE),
+	EFX_MAE_MV_DESC_ALT(ENC_SRC_IP4_BE, ENC_SRC_IP6_BE, EFX_MAE_FIELD_BE),
+	EFX_MAE_MV_DESC_ALT(ENC_DST_IP4_BE, ENC_DST_IP6_BE, EFX_MAE_FIELD_BE),
 	EFX_MAE_MV_DESC(ENC_IP_PROTO, EFX_MAE_FIELD_BE),
 	EFX_MAE_MV_DESC(ENC_IP_TOS, EFX_MAE_FIELD_BE),
 	EFX_MAE_MV_DESC(ENC_IP_TTL, EFX_MAE_FIELD_BE),
-	EFX_MAE_MV_DESC(ENC_SRC_IP6_BE, EFX_MAE_FIELD_BE),
-	EFX_MAE_MV_DESC(ENC_DST_IP6_BE, EFX_MAE_FIELD_BE),
+	EFX_MAE_MV_DESC_ALT(ENC_SRC_IP6_BE, ENC_SRC_IP4_BE, EFX_MAE_FIELD_BE),
+	EFX_MAE_MV_DESC_ALT(ENC_DST_IP6_BE, ENC_DST_IP4_BE, EFX_MAE_FIELD_BE),
 	EFX_MAE_MV_DESC(ENC_L4_SPORT_BE, EFX_MAE_FIELD_BE),
 	EFX_MAE_MV_DESC(ENC_L4_DPORT_BE, EFX_MAE_FIELD_BE),
 
+#undef EFX_MAE_MV_DESC_ALT
 #undef EFX_MAE_MV_DESC
 };
 
@@ -848,7 +877,9 @@ efx_mae_match_spec_is_valid(
 	     ++field_id) {
 		const efx_mae_mv_desc_t *descp = &desc_setp[field_id];
 		efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id;
+		const uint8_t *alt_m_buf = mvp + descp->emmd_alt_mask_offset;
 		const uint8_t *m_buf = mvp + descp->emmd_mask_offset;
+		size_t alt_m_size = descp->emmd_alt_mask_size;
 		size_t m_size = descp->emmd_mask_size;
 
 		if (m_size == 0)
@@ -870,6 +901,19 @@ efx_mae_match_spec_is_valid(
 			break;
 		case MAE_FIELD_SUPPORTED_MATCH_ALWAYS:
 			is_valid = efx_mask_is_all_ones(m_size, m_buf);
+
+			if ((is_valid == B_FALSE) && (alt_m_size != 0)) {
+				/*
+				 * This field has an alternative one. The FW
+				 * reports ALWAYS for both implying that one
+				 * of them is required to have all-ones mask.
+				 *
+				 * The primary field's mask is incorrect; go
+				 * on to check that of the alternative field.
+				 */
+				is_valid = efx_mask_is_all_ones(alt_m_size,
+								alt_m_buf);
+			}
 			break;
 		case MAE_FIELD_SUPPORTED_MATCH_NEVER:
 		case MAE_FIELD_UNSUPPORTED:
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.559506970 +0000
+++ 0028-common-sfc_efx-base-support-alternative-MAE-match-fi.patch	2021-02-05 11:18:28.634687837 +0000
@@ -1 +1 @@
-From 429ed2f9ec7a0a0c48cbc90d7ab25185a36c1a85 Mon Sep 17 00:00:00 2001
+From 101617a60789f23b9d1807281e0771a0cd5800e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 429ed2f9ec7a0a0c48cbc90d7ab25185a36c1a85 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ionic: do minor logging fixups' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (26 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: support alternative MAE match fields' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix Verbs memory allocation callback' " luca.boccassi
                   ` (246 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Andrew Boyer; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ece2b693aeebc8a54d5cd6e4b94776ecbf686c70 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <aboyer@pensando.io>
Date: Wed, 9 Dec 2020 18:57:37 -0800
Subject: [PATCH] net/ionic: do minor logging fixups

[ upstream commit 4ae96cb88fa06e37766c1bb0d91d1538f8ae34d3 ]

Expose ionic_opcode_to_str() so it can be used for dev cmds, too.
Store the device name in struct adapter.

Switch to memcpy() to work around gcc false positives.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ionic/ionic.h        |  1 +
 drivers/net/ionic/ionic_dev.c    |  5 ++++
 drivers/net/ionic/ionic_dev.h    |  2 ++
 drivers/net/ionic/ionic_ethdev.c |  4 ++--
 drivers/net/ionic/ionic_lif.c    | 26 +++++++++++++-------
 drivers/net/ionic/ionic_main.c   | 31 +++++++++++++-----------
 drivers/net/ionic/ionic_rxtx.c   | 41 ++++++++++++++------------------
 7 files changed, 62 insertions(+), 48 deletions(-)

diff --git a/drivers/net/ionic/ionic.h b/drivers/net/ionic/ionic.h
index 1538df3092..a6d84036e8 100644
--- a/drivers/net/ionic/ionic.h
+++ b/drivers/net/ionic/ionic.h
@@ -48,6 +48,7 @@ struct ionic_hw {
 struct ionic_adapter {
 	struct ionic_hw hw;
 	struct ionic_dev idev;
+	const char *name;
 	struct ionic_dev_bar bars[IONIC_BARS_MAX];
 	struct ionic_identity	ident;
 	struct ionic_lif *lifs[IONIC_LIFS_MAX];
diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c
index 5c2820b7a1..632ca10cf2 100644
--- a/drivers/net/ionic/ionic_dev.c
+++ b/drivers/net/ionic/ionic_dev.c
@@ -103,6 +103,9 @@ ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd)
 	uint32_t cmd_size = sizeof(cmd->words) /
 		sizeof(cmd->words[0]);
 
+	IONIC_PRINT(DEBUG, "Sending %s (%d) via dev_cmd",
+		    ionic_opcode_to_str(cmd->cmd.opcode), cmd->cmd.opcode);
+
 	for (i = 0; i < cmd_size; i++)
 		iowrite32(cmd->words[i], &idev->dev_cmd->cmd.words[i]);
 
@@ -350,6 +353,8 @@ ionic_dev_cmd_adminq_init(struct ionic_dev *idev,
 		.q_init.cq_ring_base = cq->base_pa,
 	};
 
+	IONIC_PRINT(DEBUG, "adminq.q_init.ver %u", cmd.q_init.ver);
+
 	ionic_dev_cmd_go(idev, &cmd);
 }
 
diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h
index 532255a603..6bac96072d 100644
--- a/drivers/net/ionic/ionic_dev.h
+++ b/drivers/net/ionic/ionic_dev.h
@@ -208,6 +208,8 @@ struct ionic_qcq;
 void ionic_intr_init(struct ionic_dev *idev, struct ionic_intr_info *intr,
 	unsigned long index);
 
+const char *ionic_opcode_to_str(enum ionic_cmd_opcode opcode);
+
 int ionic_dev_setup(struct ionic_adapter *adapter);
 
 void ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd);
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 600333e20f..68a6e630c8 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -571,7 +571,7 @@ ionic_dev_rss_reta_update(struct rte_eth_dev *eth_dev,
 
 	if (reta_size != ident->lif.eth.rss_ind_tbl_sz) {
 		IONIC_PRINT(ERR, "The size of hash lookup table configured "
-			"(%d) doesn't match the number hardware can supported "
+			"(%d) does not match the number hardware can support "
 			"(%d)",
 			reta_size, ident->lif.eth.rss_ind_tbl_sz);
 		return -EINVAL;
@@ -605,7 +605,7 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
 
 	if (reta_size != ident->lif.eth.rss_ind_tbl_sz) {
 		IONIC_PRINT(ERR, "The size of hash lookup table configured "
-			"(%d) doesn't match the number hardware can supported "
+			"(%d) does not match the number hardware can support "
 			"(%d)",
 			reta_size, ident->lif.eth.rss_ind_tbl_sz);
 		return -EINVAL;
diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 60a5f3d537..5894f3505a 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -551,7 +551,7 @@ ionic_intr_alloc(struct ionic_lif *lif, struct ionic_intr_info *intr)
 	/*
 	 * Note: interrupt handler is called for index = 0 only
 	 * (we use interrupts for the notifyq only anyway,
-	 * which hash index = 0)
+	 * which has index = 0)
 	 */
 
 	for (index = 0; index < adapter->nintrs; index++)
@@ -684,8 +684,8 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type,
 		ionic_q_sg_map(&new->q, sg_base, sg_base_pa);
 	}
 
-	IONIC_PRINT(DEBUG, "Q-Base-PA = %ju CQ-Base-PA = %ju "
-		"SG-base-PA = %ju",
+	IONIC_PRINT(DEBUG, "Q-Base-PA = %#jx CQ-Base-PA = %#jx "
+		"SG-base-PA = %#jx",
 		q_base_pa, cq_base_pa, sg_base_pa);
 
 	ionic_q_map(&new->q, q_base, q_base_pa);
@@ -824,7 +824,13 @@ ionic_lif_alloc(struct ionic_lif *lif)
 	int dbpage_num;
 	int err;
 
-	snprintf(lif->name, sizeof(lif->name), "lif%u", lif->index);
+	/*
+	 * lif->name was zeroed on allocation.
+	 * Copy (sizeof() - 1) bytes to ensure that it is NULL terminated.
+	 */
+	memcpy(lif->name, lif->eth_dev->data->name, sizeof(lif->name) - 1);
+
+	IONIC_PRINT(DEBUG, "LIF: %s", lif->name);
 
 	IONIC_PRINT(DEBUG, "Allocating Lif Info");
 
@@ -867,8 +873,6 @@ ionic_lif_alloc(struct ionic_lif *lif)
 
 	IONIC_PRINT(DEBUG, "Allocating Admin Queue");
 
-	IONIC_PRINT(DEBUG, "Allocating Admin Queue");
-
 	err = ionic_admin_qcq_alloc(lif);
 	if (err) {
 		IONIC_PRINT(ERR, "Cannot allocate admin queue");
@@ -1224,6 +1228,7 @@ ionic_lif_notifyq_init(struct ionic_lif *lif)
 		ctx.cmd.q_init.ring_base);
 	IONIC_PRINT(DEBUG, "notifyq_init.ring_size %d",
 		ctx.cmd.q_init.ring_size);
+	IONIC_PRINT(DEBUG, "notifyq_init.ver %u", ctx.cmd.q_init.ver);
 
 	err = ionic_adminq_post_wait(lif, &ctx);
 	if (err)
@@ -1335,6 +1340,7 @@ ionic_lif_txq_init(struct ionic_qcq *qcq)
 		ctx.cmd.q_init.ring_base);
 	IONIC_PRINT(DEBUG, "txq_init.ring_size %d",
 		ctx.cmd.q_init.ring_size);
+	IONIC_PRINT(DEBUG, "txq_init.ver %u", ctx.cmd.q_init.ver);
 
 	err = ionic_adminq_post_wait(qcq->lif, &ctx);
 	if (err)
@@ -1383,6 +1389,7 @@ ionic_lif_rxq_init(struct ionic_qcq *qcq)
 		ctx.cmd.q_init.ring_base);
 	IONIC_PRINT(DEBUG, "rxq_init.ring_size %d",
 		ctx.cmd.q_init.ring_size);
+	IONIC_PRINT(DEBUG, "rxq_init.ver %u", ctx.cmd.q_init.ver);
 
 	err = ionic_adminq_post_wait(qcq->lif, &ctx);
 	if (err)
@@ -1453,8 +1460,8 @@ ionic_lif_set_name(struct ionic_lif *lif)
 		},
 	};
 
-	snprintf(ctx.cmd.lif_setattr.name, sizeof(ctx.cmd.lif_setattr.name),
-		"%d", lif->port_id);
+	memcpy(ctx.cmd.lif_setattr.name, lif->name,
+		sizeof(ctx.cmd.lif_setattr.name) - 1);
 
 	ionic_adminq_post_wait(lif, &ctx);
 }
@@ -1685,7 +1692,8 @@ ionic_lifs_size(struct ionic_adapter *adapter)
 	nintrs = nlifs * 1 /* notifyq */;
 
 	if (nintrs > dev_nintrs) {
-		IONIC_PRINT(ERR, "At most %d intr queues supported, minimum required is %u",
+		IONIC_PRINT(ERR,
+			"At most %d intr supported, minimum req'd is %u",
 			dev_nintrs, nintrs);
 		return -ENOSPC;
 	}
diff --git a/drivers/net/ionic/ionic_main.c b/drivers/net/ionic/ionic_main.c
index 2ade213d2d..b963898db0 100644
--- a/drivers/net/ionic/ionic_main.c
+++ b/drivers/net/ionic/ionic_main.c
@@ -61,7 +61,7 @@ ionic_error_to_str(enum ionic_status_code code)
 	}
 }
 
-static const char *
+const char *
 ionic_opcode_to_str(enum ionic_cmd_opcode opcode)
 {
 	switch (opcode) {
@@ -107,6 +107,8 @@ ionic_opcode_to_str(enum ionic_cmd_opcode opcode)
 		return "IONIC_CMD_Q_INIT";
 	case IONIC_CMD_Q_CONTROL:
 		return "IONIC_CMD_Q_CONTROL";
+	case IONIC_CMD_Q_IDENTIFY:
+		return "IONIC_CMD_Q_IDENTIFY";
 	case IONIC_CMD_RDMA_RESET_LIF:
 		return "IONIC_CMD_RDMA_RESET_LIF";
 	case IONIC_CMD_RDMA_CREATE_EQ:
@@ -126,8 +128,9 @@ ionic_adminq_check_err(struct ionic_admin_ctx *ctx, bool timeout)
 	const char *name;
 	const char *status;
 
+	name = ionic_opcode_to_str(ctx->cmd.cmd.opcode);
+
 	if (ctx->comp.comp.status || timeout) {
-		name = ionic_opcode_to_str(ctx->cmd.cmd.opcode);
 		status = ionic_error_to_str(ctx->comp.comp.status);
 		IONIC_PRINT(ERR, "%s (%d) failed: %s (%d)",
 			name,
@@ -137,6 +140,8 @@ ionic_adminq_check_err(struct ionic_admin_ctx *ctx, bool timeout)
 		return -EIO;
 	}
 
+	IONIC_PRINT(DEBUG, "%s (%d) succeeded", name, ctx->cmd.cmd.opcode);
+
 	return 0;
 }
 
@@ -174,14 +179,13 @@ ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx)
 	bool done;
 	int err;
 
-	IONIC_PRINT(DEBUG, "Sending %s to the admin queue",
-		ionic_opcode_to_str(ctx->cmd.cmd.opcode));
+	IONIC_PRINT(DEBUG, "Sending %s (%d) via the admin queue",
+		ionic_opcode_to_str(ctx->cmd.cmd.opcode), ctx->cmd.cmd.opcode);
 
 	err = ionic_adminq_post(lif, ctx);
 	if (err) {
-		IONIC_PRINT(ERR, "Failure posting to the admin queue %d (%d)",
+		IONIC_PRINT(ERR, "Failure posting %d to the admin queue (%d)",
 			ctx->cmd.cmd.opcode, err);
-
 		return err;
 	}
 
@@ -339,12 +343,12 @@ ionic_port_identify(struct ionic_adapter *adapter)
 				ioread32(&idev->dev_cmd->data[i]);
 	}
 
-	IONIC_PRINT(INFO, "speed %d ", ident->port.config.speed);
-	IONIC_PRINT(INFO, "mtu %d ", ident->port.config.mtu);
-	IONIC_PRINT(INFO, "state %d ", ident->port.config.state);
-	IONIC_PRINT(INFO, "an_enable %d ", ident->port.config.an_enable);
-	IONIC_PRINT(INFO, "fec_type %d ", ident->port.config.fec_type);
-	IONIC_PRINT(INFO, "pause_type %d ", ident->port.config.pause_type);
+	IONIC_PRINT(INFO, "speed %d", ident->port.config.speed);
+	IONIC_PRINT(INFO, "mtu %d", ident->port.config.mtu);
+	IONIC_PRINT(INFO, "state %d", ident->port.config.state);
+	IONIC_PRINT(INFO, "an_enable %d", ident->port.config.an_enable);
+	IONIC_PRINT(INFO, "fec_type %d", ident->port.config.fec_type);
+	IONIC_PRINT(INFO, "pause_type %d", ident->port.config.pause_type);
 	IONIC_PRINT(INFO, "loopback_mode %d",
 		ident->port.config.loopback_mode);
 
@@ -385,8 +389,7 @@ ionic_port_init(struct ionic_adapter *adapter)
 	idev->port_info_sz = RTE_ALIGN(sizeof(*idev->port_info), PAGE_SIZE);
 
 	snprintf(z_name, sizeof(z_name), "%s_port_%s_info",
-		IONIC_DRV_NAME,
-		adapter->pci_dev->device.name);
+		IONIC_DRV_NAME, adapter->name);
 
 	idev->port_info_z = ionic_memzone_reserve(z_name, idev->port_info_sz,
 		SOCKET_ID_ANY);
diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 2592f5cab6..26893795a1 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -133,7 +133,7 @@ ionic_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)
 {
 	struct ionic_qcq *txq;
 
-	IONIC_PRINT_CALL();
+	IONIC_PRINT(DEBUG, "Stopping TX queue %u", tx_queue_id);
 
 	txq = eth_dev->data->tx_queues[tx_queue_id];
 
@@ -156,7 +156,7 @@ ionic_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)
 
 int __rte_cold
 ionic_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id,
-		uint16_t nb_desc, uint32_t socket_id __rte_unused,
+		uint16_t nb_desc, uint32_t socket_id,
 		const struct rte_eth_txconf *tx_conf)
 {
 	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
@@ -164,11 +164,6 @@ ionic_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id,
 	uint64_t offloads;
 	int err;
 
-	IONIC_PRINT_CALL();
-
-	IONIC_PRINT(DEBUG, "Configuring TX queue %u with %u buffers",
-		tx_queue_id, nb_desc);
-
 	if (tx_queue_id >= lif->ntxqcqs) {
 		IONIC_PRINT(DEBUG, "Queue index %u not available "
 			"(max %u queues)",
@@ -177,6 +172,9 @@ ionic_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id,
 	}
 
 	offloads = tx_conf->offloads | eth_dev->data->dev_conf.txmode.offloads;
+	IONIC_PRINT(DEBUG,
+		"Configuring skt %u TX queue %u with %u buffers, offloads %jx",
+		socket_id, tx_queue_id, nb_desc, offloads);
 
 	/* Validate number of receive descriptors */
 	if (!rte_is_power_of_2(nb_desc) || nb_desc < IONIC_MIN_RING_DESC)
@@ -214,10 +212,11 @@ ionic_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)
 	struct ionic_qcq *txq;
 	int err;
 
-	IONIC_PRINT_CALL();
-
 	txq = eth_dev->data->tx_queues[tx_queue_id];
 
+	IONIC_PRINT(DEBUG, "Starting TX queue %u, %u descs",
+		tx_queue_id, txq->q.num_descs);
+
 	err = ionic_lif_txq_init(txq);
 	if (err)
 		return err;
@@ -641,7 +640,7 @@ int __rte_cold
 ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 		uint16_t rx_queue_id,
 		uint16_t nb_desc,
-		uint32_t socket_id __rte_unused,
+		uint32_t socket_id,
 		const struct rte_eth_rxconf *rx_conf,
 		struct rte_mempool *mp)
 {
@@ -650,11 +649,6 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 	uint64_t offloads;
 	int err;
 
-	IONIC_PRINT_CALL();
-
-	IONIC_PRINT(DEBUG, "Configuring RX queue %u with %u buffers",
-		rx_queue_id, nb_desc);
-
 	if (rx_queue_id >= lif->nrxqcqs) {
 		IONIC_PRINT(ERR,
 			"Queue index %u not available (max %u queues)",
@@ -663,13 +657,16 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 	}
 
 	offloads = rx_conf->offloads | eth_dev->data->dev_conf.rxmode.offloads;
+	IONIC_PRINT(DEBUG,
+		"Configuring skt %u RX queue %u with %u buffers, offloads %jx",
+		socket_id, rx_queue_id, nb_desc, offloads);
 
 	/* Validate number of receive descriptors */
 	if (!rte_is_power_of_2(nb_desc) ||
 			nb_desc < IONIC_MIN_RING_DESC ||
 			nb_desc > IONIC_MAX_RING_DESC) {
 		IONIC_PRINT(ERR,
-			"Bad number of descriptors (%u) for queue %u (min: %u)",
+			"Bad descriptor count (%u) for queue %u (min: %u)",
 			nb_desc, rx_queue_id, IONIC_MIN_RING_DESC);
 		return -EINVAL; /* or use IONIC_DEFAULT_RING_DESC */
 	}
@@ -686,7 +683,7 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 
 	err = ionic_rx_qcq_alloc(lif, rx_queue_id, nb_desc, &rxq);
 	if (err) {
-		IONIC_PRINT(ERR, "Queue allocation failure");
+		IONIC_PRINT(ERR, "Queue %d allocation failure", rx_queue_id);
 		return -EINVAL;
 	}
 
@@ -957,13 +954,11 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
 	struct ionic_qcq *rxq;
 	int err;
 
-	IONIC_PRINT_CALL();
-
-	IONIC_PRINT(DEBUG, "Allocating RX queue buffers (size: %u)",
-		frame_size);
-
 	rxq = eth_dev->data->rx_queues[rx_queue_id];
 
+	IONIC_PRINT(DEBUG, "Starting RX queue %u, %u descs (size: %u)",
+		rx_queue_id, rxq->q.num_descs, frame_size);
+
 	err = ionic_lif_rxq_init(rxq);
 	if (err)
 		return err;
@@ -1043,7 +1038,7 @@ ionic_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
 {
 	struct ionic_qcq *rxq;
 
-	IONIC_PRINT_CALL();
+	IONIC_PRINT(DEBUG, "Stopping RX queue %u", rx_queue_id);
 
 	rxq = eth_dev->data->rx_queues[rx_queue_id];
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.601283655 +0000
+++ 0029-net-ionic-do-minor-logging-fixups.patch	2021-02-05 11:18:28.642687989 +0000
@@ -1 +1 @@
-From 4ae96cb88fa06e37766c1bb0d91d1538f8ae34d3 Mon Sep 17 00:00:00 2001
+From ece2b693aeebc8a54d5cd6e4b94776ecbf686c70 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ae96cb88fa06e37766c1bb0d91d1538f8ae34d3 ]
+
@@ -18,2 +20,2 @@
- drivers/net/ionic/ionic_lif.c    | 28 ++++++++++++++--------
- drivers/net/ionic/ionic_main.c   | 32 ++++++++++++++-----------
+ drivers/net/ionic/ionic_lif.c    | 26 +++++++++++++-------
+ drivers/net/ionic/ionic_main.c   | 31 +++++++++++++-----------
@@ -21 +23 @@
- 7 files changed, 64 insertions(+), 49 deletions(-)
+ 7 files changed, 62 insertions(+), 48 deletions(-)
@@ -24 +26 @@
-index a931103264..7ad0ab69ef 100644
+index 1538df3092..a6d84036e8 100644
@@ -36 +38 @@
-index fc68f5c741..f329665216 100644
+index 5c2820b7a1..632ca10cf2 100644
@@ -39 +41 @@
-@@ -102,6 +102,9 @@ ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd)
+@@ -103,6 +103,9 @@ ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd)
@@ -49 +51 @@
-@@ -348,6 +351,8 @@ ionic_dev_cmd_adminq_init(struct ionic_dev *idev,
+@@ -350,6 +353,8 @@ ionic_dev_cmd_adminq_init(struct ionic_dev *idev,
@@ -59 +61 @@
-index 7150f7f2c9..026c4a9f35 100644
+index 532255a603..6bac96072d 100644
@@ -62 +64 @@
-@@ -205,6 +205,8 @@ struct ionic_qcq;
+@@ -208,6 +208,8 @@ struct ionic_qcq;
@@ -72 +74 @@
-index ce6ca9671a..5a360ac089 100644
+index 600333e20f..68a6e630c8 100644
@@ -94 +96 @@
-index 722a895655..28ae9dc8a9 100644
+index 60a5f3d537..5894f3505a 100644
@@ -97,10 +99 @@
-@@ -84,7 +84,7 @@ ionic_lif_reset(struct ionic_lif *lif)
- 	ionic_dev_cmd_lif_reset(idev, lif->index);
- 	err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
- 	if (err)
--		IONIC_PRINT(WARNING, "Failed to reset lif");
-+		IONIC_PRINT(WARNING, "Failed to reset %s", lif->name);
- }
- 
- static void
-@@ -554,7 +554,7 @@ ionic_intr_alloc(struct ionic_lif *lif, struct ionic_intr_info *intr)
+@@ -551,7 +551,7 @@ ionic_intr_alloc(struct ionic_lif *lif, struct ionic_intr_info *intr)
@@ -115 +108 @@
-@@ -687,8 +687,8 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type,
+@@ -684,8 +684,8 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type,
@@ -126 +119 @@
-@@ -827,7 +827,13 @@ ionic_lif_alloc(struct ionic_lif *lif)
+@@ -824,7 +824,13 @@ ionic_lif_alloc(struct ionic_lif *lif)
@@ -141 +134 @@
-@@ -868,8 +874,6 @@ ionic_lif_alloc(struct ionic_lif *lif)
+@@ -867,8 +873,6 @@ ionic_lif_alloc(struct ionic_lif *lif)
@@ -150 +143 @@
-@@ -1223,6 +1227,7 @@ ionic_lif_notifyq_init(struct ionic_lif *lif)
+@@ -1224,6 +1228,7 @@ ionic_lif_notifyq_init(struct ionic_lif *lif)
@@ -158 +151 @@
-@@ -1332,6 +1337,7 @@ ionic_lif_txq_init(struct ionic_qcq *qcq)
+@@ -1335,6 +1340,7 @@ ionic_lif_txq_init(struct ionic_qcq *qcq)
@@ -166 +159 @@
-@@ -1378,6 +1384,7 @@ ionic_lif_rxq_init(struct ionic_qcq *qcq)
+@@ -1383,6 +1389,7 @@ ionic_lif_rxq_init(struct ionic_qcq *qcq)
@@ -174 +167 @@
-@@ -1448,8 +1455,8 @@ ionic_lif_set_name(struct ionic_lif *lif)
+@@ -1453,8 +1460,8 @@ ionic_lif_set_name(struct ionic_lif *lif)
@@ -185 +178 @@
-@@ -1680,7 +1687,8 @@ ionic_lifs_size(struct ionic_adapter *adapter)
+@@ -1685,7 +1692,8 @@ ionic_lifs_size(struct ionic_adapter *adapter)
@@ -196 +189 @@
-index 92cf0f3984..ce5d113118 100644
+index 2ade213d2d..b963898db0 100644
@@ -255,9 +248 @@
-@@ -244,6 +248,7 @@ ionic_dev_cmd_wait_check(struct ionic_dev *idev, unsigned long max_wait)
- 	if (!err)
- 		err = ionic_dev_cmd_check_error(idev);
- 
-+	IONIC_PRINT(DEBUG, "dev_cmd returned %d", err);
- 	return err;
- }
- 
-@@ -335,12 +340,12 @@ ionic_port_identify(struct ionic_adapter *adapter)
+@@ -339,12 +343,12 @@ ionic_port_identify(struct ionic_adapter *adapter)
@@ -282 +267 @@
-@@ -381,8 +386,7 @@ ionic_port_init(struct ionic_adapter *adapter)
+@@ -385,8 +389,7 @@ ionic_port_init(struct ionic_adapter *adapter)
@@ -293 +278 @@
-index b953aff49d..b689c83815 100644
+index 2592f5cab6..26893795a1 100644
@@ -336 +321 @@
-@@ -215,10 +213,11 @@ ionic_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)
+@@ -214,10 +212,11 @@ ionic_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)
@@ -350 +335 @@
-@@ -642,7 +641,7 @@ int __rte_cold
+@@ -641,7 +640,7 @@ int __rte_cold
@@ -359 +344 @@
-@@ -651,11 +650,6 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
+@@ -650,11 +649,6 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
@@ -371 +356 @@
-@@ -664,13 +658,16 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
+@@ -663,13 +657,16 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
@@ -389 +374 @@
-@@ -687,7 +684,7 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
+@@ -686,7 +683,7 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
@@ -398 +383 @@
-@@ -959,13 +956,11 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
+@@ -957,13 +954,11 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
@@ -415 +400 @@
-@@ -1045,7 +1040,7 @@ ionic_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
+@@ -1043,7 +1038,7 @@ ionic_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)

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

* [dpdk-stable] patch 'net/mlx5: fix Verbs memory allocation callback' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (27 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ionic: do minor logging fixups' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix shared age action validation' " luca.boccassi
                   ` (245 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ccbc4125d8dcbf2ff347907e20f3fbd280d10fd7 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 24 Nov 2020 10:26:43 +0000
Subject: [PATCH] net/mlx5: fix Verbs memory allocation callback

[ upstream commit 81c3b97735c26b575f8167f2b892edd3a7af451b ]

The rdma-core library uses callbacks to allocate and free memory
from DPDK. The memory allocation callback used the complicated
and incorrect way to get the NUMA socket ID from the context.
The context was wrong that might result in wrong socket ID
and allocating memory from wrong node.

The callbacks are assigned once as Infinibande device context
is created allowing early access to shared DPDK memory for all
Verbs internal objects need that.

Fixes: 36dabcea78f0 ("net/mlx5: use anonymous Direct Verbs allocator argument")
Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Fixes: 17e19bc4dde7 ("net/mlx5: add IB shared context alloc/free functions")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c    | 27 +++++++++++++--------------
 drivers/net/mlx5/linux/mlx5_verbs.c |  8 --------
 drivers/net/mlx5/mlx5.h             | 19 -------------------
 3 files changed, 13 insertions(+), 41 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 4c863db1a7..9062191dd1 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -168,9 +168,8 @@ mlx5_os_get_dev_attr(void *ctx, struct mlx5_dev_attr *device_attr)
 static void *
 mlx5_alloc_verbs_buf(size_t size, void *data)
 {
-	struct mlx5_priv *priv = data;
+	struct mlx5_dev_ctx_shared *sh = data;
 	void *ret;
-	unsigned int socket = SOCKET_ID_ANY;
 	size_t alignment = rte_mem_page_size();
 	if (alignment == (size_t)-1) {
 		DRV_LOG(ERR, "Failed to get mem page size");
@@ -178,18 +177,8 @@ mlx5_alloc_verbs_buf(size_t size, void *data)
 		return NULL;
 	}
 
-	if (priv->verbs_alloc_ctx.type == MLX5_VERBS_ALLOC_TYPE_TX_QUEUE) {
-		const struct mlx5_txq_ctrl *ctrl = priv->verbs_alloc_ctx.obj;
-
-		socket = ctrl->socket;
-	} else if (priv->verbs_alloc_ctx.type ==
-		   MLX5_VERBS_ALLOC_TYPE_RX_QUEUE) {
-		const struct mlx5_rxq_ctrl *ctrl = priv->verbs_alloc_ctx.obj;
-
-		socket = ctrl->socket;
-	}
 	MLX5_ASSERT(data != NULL);
-	ret = mlx5_malloc(0, size, alignment, socket);
+	ret = mlx5_malloc(0, size, alignment, sh->numa_node);
 	if (!ret && size)
 		rte_errno = ENOMEM;
 	return ret;
@@ -1459,7 +1448,7 @@ err_secondary:
 			(void *)((uintptr_t)&(struct mlx5dv_ctx_allocators){
 				.alloc = &mlx5_alloc_verbs_buf,
 				.free = &mlx5_free_verbs_buf,
-				.data = priv,
+				.data = sh,
 			}));
 	/* Bring Ethernet device up. */
 	DRV_LOG(DEBUG, "port %u forcing Ethernet interface up",
@@ -2324,6 +2313,16 @@ mlx5_os_open_device(const struct mlx5_dev_spawn_data *spawn,
 		DRV_LOG(DEBUG, "DevX is NOT supported");
 		err = 0;
 	}
+	if (!err && sh->ctx) {
+		/* Hint libmlx5 to use PMD allocator for data plane resources */
+		mlx5_glue->dv_set_context_attr(sh->ctx,
+			MLX5DV_CTX_ATTR_BUF_ALLOCATORS,
+			(void *)((uintptr_t)&(struct mlx5dv_ctx_allocators){
+				.alloc = &mlx5_alloc_verbs_buf,
+				.free = &mlx5_free_verbs_buf,
+				.data = sh,
+			}));
+	}
 	return err;
 }
 
diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 540ce32990..9161fa3b7d 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -366,8 +366,6 @@ mlx5_rxq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 
 	MLX5_ASSERT(rxq_data);
 	MLX5_ASSERT(tmpl);
-	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_RX_QUEUE;
-	priv->verbs_alloc_ctx.obj = rxq_ctrl;
 	tmpl->rxq_ctrl = rxq_ctrl;
 	if (rxq_ctrl->irq) {
 		tmpl->ibv_channel =
@@ -438,7 +436,6 @@ mlx5_rxq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 	rxq_data->cq_arm_sn = 0;
 	mlx5_rxq_initialize(rxq_data);
 	rxq_data->cq_ci = 0;
-	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_NONE;
 	dev->data->rx_queue_state[idx] = RTE_ETH_QUEUE_STATE_STARTED;
 	rxq_ctrl->wqn = ((struct ibv_wq *)(tmpl->wq))->wq_num;
 	return 0;
@@ -451,7 +448,6 @@ error:
 	if (tmpl->ibv_channel)
 		claim_zero(mlx5_glue->destroy_comp_channel(tmpl->ibv_channel));
 	rte_errno = ret; /* Restore rte_errno. */
-	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_NONE;
 	return -rte_errno;
 }
 
@@ -932,8 +928,6 @@ mlx5_txq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 	MLX5_ASSERT(txq_data);
 	MLX5_ASSERT(txq_obj);
 	txq_obj->txq_ctrl = txq_ctrl;
-	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_TX_QUEUE;
-	priv->verbs_alloc_ctx.obj = txq_ctrl;
 	if (mlx5_getenv_int("MLX5_ENABLE_CQE_COMPRESSION")) {
 		DRV_LOG(ERR, "Port %u MLX5_ENABLE_CQE_COMPRESSION "
 			"must never be set.", dev->data->port_id);
@@ -1039,7 +1033,6 @@ mlx5_txq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 	}
 	txq_uar_init(txq_ctrl);
 	dev->data->tx_queue_state[idx] = RTE_ETH_QUEUE_STATE_STARTED;
-	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_NONE;
 	return 0;
 error:
 	ret = rte_errno; /* Save rte_errno before cleanup. */
@@ -1047,7 +1040,6 @@ error:
 		claim_zero(mlx5_glue->destroy_cq(txq_obj->cq));
 	if (txq_obj->qp)
 		claim_zero(mlx5_glue->destroy_qp(txq_obj->qp));
-	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_NONE;
 	rte_errno = ret; /* Restore rte_errno. */
 	return -rte_errno;
 }
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 041240e6fe..121d726405 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -258,30 +258,12 @@ struct mlx5_dev_config {
 };
 
 
-/**
- * Type of object being allocated.
- */
-enum mlx5_verbs_alloc_type {
-	MLX5_VERBS_ALLOC_TYPE_NONE,
-	MLX5_VERBS_ALLOC_TYPE_TX_QUEUE,
-	MLX5_VERBS_ALLOC_TYPE_RX_QUEUE,
-};
-
 /* Structure for VF VLAN workaround. */
 struct mlx5_vf_vlan {
 	uint32_t tag:12;
 	uint32_t created:1;
 };
 
-/**
- * Verbs allocator needs a context to know in the callback which kind of
- * resources it is allocating.
- */
-struct mlx5_verbs_alloc_ctx {
-	enum mlx5_verbs_alloc_type type; /* Kind of object being allocated. */
-	const void *obj; /* Pointer to the DPDK object. */
-};
-
 /* Flow drop context necessary due to Verbs API. */
 struct mlx5_drop {
 	struct mlx5_hrxq *hrxq; /* Hash Rx queue queue. */
@@ -989,7 +971,6 @@ struct mlx5_priv {
 	struct mlx5_xstats_ctrl xstats_ctrl; /* Extended stats control. */
 	struct mlx5_stats_ctrl stats_ctrl; /* Stats control. */
 	struct mlx5_dev_config config; /* Device configuration. */
-	struct mlx5_verbs_alloc_ctx verbs_alloc_ctx;
 	/* Context for Verbs allocator. */
 	int nl_socket_rdma; /* Netlink socket (NETLINK_RDMA). */
 	int nl_socket_route; /* Netlink socket (NETLINK_ROUTE). */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.641544091 +0000
+++ 0030-net-mlx5-fix-Verbs-memory-allocation-callback.patch	2021-02-05 11:18:28.646688066 +0000
@@ -1 +1 @@
-From 81c3b97735c26b575f8167f2b892edd3a7af451b Mon Sep 17 00:00:00 2001
+From ccbc4125d8dcbf2ff347907e20f3fbd280d10fd7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 81c3b97735c26b575f8167f2b892edd3a7af451b ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix shared age action validation' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (28 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix Verbs memory allocation callback' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' " luca.boccassi
                   ` (244 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3939a6a8ac641b57648dec22e44453a81fd5dd75

Thanks.

Luca Boccassi

---
From 3939a6a8ac641b57648dec22e44453a81fd5dd75 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Tue, 24 Nov 2020 15:45:35 +0200
Subject: [PATCH] net/mlx5: fix shared age action validation

[ upstream commit 4165bfd20d2c2f3670f88f901dcd5e8f7479d0ed ]

Previous patch added support of shared age action.
This feature is supported on group 1 and higher, and validation was
added accordingly.
On FDB table the group 0 is skipped to improve performance.
As a result the mentioned validation is not relevant for transfer rules.
This patch adds the required check to ensure proper validation.

Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index aa21ff9613..e9badb800e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5955,7 +5955,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			rw_act_num += MLX5_ACT_NUM_SET_TAG;
 			break;
 		case MLX5_RTE_FLOW_ACTION_TYPE_AGE:
-			if (!attr->group)
+			if (!attr->transfer && !attr->group)
 				return rte_flow_error_set(error, ENOTSUP,
 						RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 									   NULL,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.686245906 +0000
+++ 0031-net-mlx5-fix-shared-age-action-validation.patch	2021-02-05 11:18:28.658688294 +0000
@@ -1 +1 @@
-From 4165bfd20d2c2f3670f88f901dcd5e8f7479d0ed Mon Sep 17 00:00:00 2001
+From 3939a6a8ac641b57648dec22e44453a81fd5dd75 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4165bfd20d2c2f3670f88f901dcd5e8f7479d0ed ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (29 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix shared age action validation' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' " luca.boccassi
                   ` (243 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/91ddfb63bd326a8709350fe9984eab0a766ec47c

Thanks.

Luca Boccassi

---
From 91ddfb63bd326a8709350fe9984eab0a766ec47c Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 1 Dec 2020 08:59:34 +0800
Subject: [PATCH] net/bnxt: fix memory leak when mapping fails

[ upstream commit b9f0ad21f856b1d577f3369421559582639e53cf ]

We allocated memory for the 'buf' when sending message to HWRM,
but we don't free it when mapping the address to IO address
fails. It will lead to memory leak.

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 24c33185b4..ebbf504c0c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4320,6 +4320,7 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
 		return -ENOMEM;
 	dma_handle = rte_malloc_virt2iova(buf);
 	if (dma_handle == RTE_BAD_IOVA) {
+		rte_free(buf);
 		PMD_DRV_LOG(ERR,
 			"unable to map response address to physical memory\n");
 		return -ENOMEM;
@@ -4354,6 +4355,7 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
 
 	dma_handle = rte_malloc_virt2iova(buf);
 	if (dma_handle == RTE_BAD_IOVA) {
+		rte_free(buf);
 		PMD_DRV_LOG(ERR,
 			"unable to map response address to physical memory\n");
 		return -ENOMEM;
@@ -4407,6 +4409,7 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
 
 	dma_handle = rte_malloc_virt2iova(buf);
 	if (dma_handle == RTE_BAD_IOVA) {
+		rte_free(buf);
 		PMD_DRV_LOG(ERR,
 			"unable to map response address to physical memory\n");
 		return -ENOMEM;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.731362494 +0000
+++ 0032-net-bnxt-fix-memory-leak-when-mapping-fails.patch	2021-02-05 11:18:28.662688370 +0000
@@ -1 +1 @@
-From b9f0ad21f856b1d577f3369421559582639e53cf Mon Sep 17 00:00:00 2001
+From 91ddfb63bd326a8709350fe9984eab0a766ec47c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9f0ad21f856b1d577f3369421559582639e53cf ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (30 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/hns3: fix FEC state query' " luca.boccassi
                   ` (242 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From e16f455e219c61e4479fbf0468c47f5fe9ba48f3 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 3 Dec 2020 09:16:21 -0500
Subject: [PATCH] net/bnxt: disable end of packet padding for Rx

[ upstream commit b4938fad44912967636b96990ddba01ef6bc3064 ]

Testing has shown that the packet forwarding rate for packet sizes
that are not a multiple of the cache line size is reduced when the
DMA size is padded to a multiple of the cache line size. Improve
performance for these packet sizes by disabling EOP padding.

Fixes: f4253e97e7b0 ("net/bnxt: set padding flags in Rx descriptor")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index fdbe6f71ea..af1774844a 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1113,7 +1113,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	size = rte_pktmbuf_data_room_size(rxq->mb_pool) - RTE_PKTMBUF_HEADROOM;
 	size = RTE_MIN(BNXT_MAX_PKT_LEN, size);
 
-	type = RX_PROD_PKT_BD_TYPE_RX_PROD_PKT | RX_PROD_PKT_BD_FLAGS_EOP_PAD;
+	type = RX_PROD_PKT_BD_TYPE_RX_PROD_PKT;
 
 	rxr = rxq->rx_ring;
 	ring = rxr->rx_ring_struct;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.778197431 +0000
+++ 0033-net-bnxt-disable-end-of-packet-padding-for-Rx.patch	2021-02-05 11:18:28.662688370 +0000
@@ -1 +1 @@
-From b4938fad44912967636b96990ddba01ef6bc3064 Mon Sep 17 00:00:00 2001
+From e16f455e219c61e4479fbf0468c47f5fe9ba48f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4938fad44912967636b96990ddba01ef6bc3064 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix FEC state query' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (31 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' " luca.boccassi
                   ` (241 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From f5c23c81806c9ff09e5f4246bf5f2bf3cbe26a36 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 10 Dec 2020 20:48:43 +0800
Subject: [PATCH] net/hns3: fix FEC state query

[ upstream commit 2390bf217f4df0228f238d4ba4b57097feef1d0e ]

As FEC is not supported below 10 Gbps,
CMD(HNS3_OPC_CONFIG_FEC_MODE) offered from
Firmware read will return fail in 10 Gbps device.

This patch will prevent read this CMD when below 10 Gbps,
as this is non-sense.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 40 ++++++++++++++++++++++------------
 drivers/net/hns3/hns3_ethdev.h |  2 ++
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2011378879..c94a325d25 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -100,7 +100,7 @@ static int hns3_add_mc_addr(struct hns3_hw *hw,
 static int hns3_remove_mc_addr(struct hns3_hw *hw,
 			    struct rte_ether_addr *mac_addr);
 static int hns3_restore_fec(struct hns3_hw *hw);
-static int hns3_query_dev_fec_info(struct rte_eth_dev *dev);
+static int hns3_query_dev_fec_info(struct hns3_hw *hw);
 
 static void
 hns3_pf_disable_irq0(struct hns3_hw *hw)
@@ -3001,13 +3001,6 @@ hns3_get_capability(struct hns3_hw *hw)
 	    device_id == HNS3_DEV_ID_200G_RDMA)
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_DCB_B, 1);
 
-	ret = hns3_query_dev_fec_info(eth_dev);
-	if (ret) {
-		PMD_INIT_LOG(ERR,
-			     "failed to query FEC information, ret = %d", ret);
-		return ret;
-	}
-
 	/* Get PCI revision id */
 	ret = rte_pci_read_config(pci_dev, &revision, HNS3_PCI_REVISION_ID_LEN,
 				  HNS3_PCI_REVISION_ID);
@@ -3139,8 +3132,15 @@ hns3_get_configuration(struct hns3_hw *hw)
 	}
 
 	ret = hns3_get_board_configuration(hw);
-	if (ret)
+	if (ret) {
 		PMD_INIT_LOG(ERR, "failed to get board configuration: %d", ret);
+		return ret;
+	}
+
+	ret = hns3_query_dev_fec_info(hw);
+	if (ret)
+		PMD_INIT_LOG(ERR,
+			     "failed to query FEC information, ret = %d", ret);
 
 	return ret;
 }
@@ -5788,6 +5788,16 @@ get_current_fec_auto_state(struct hns3_hw *hw, uint8_t *state)
 	struct hns3_cmd_desc desc;
 	int ret;
 
+	/*
+	 * CMD(HNS3_OPC_CONFIG_FEC_MODE) read is not supported
+	 * in device of link speed
+	 * below 10 Gbps.
+	 */
+	if (hw->mac.link_speed < ETH_SPEED_NUM_10G) {
+		*state = 0;
+		return 0;
+	}
+
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_CONFIG_FEC_MODE, true);
 	req = (struct hns3_config_fec_cmd *)desc.data;
 	ret = hns3_cmd_send(hw, &desc, 1);
@@ -5994,14 +6004,14 @@ hns3_restore_fec(struct hns3_hw *hw)
 }
 
 static int
-hns3_query_dev_fec_info(struct rte_eth_dev *dev)
+hns3_query_dev_fec_info(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(hns);
-	struct hns3_pf *pf = &hns->pf;
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(hns);
+	struct rte_eth_dev *eth_dev = hns->eth_dev;
 	int ret;
 
-	ret = hns3_fec_get(dev, &pf->fec_mode);
+	ret = hns3_fec_get(eth_dev, &pf->fec_mode);
 	if (ret)
 		hns3_err(hw, "query device FEC info failed, ret = %d", ret);
 
@@ -6087,6 +6097,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	hns->eth_dev = eth_dev;
+
 	eth_dev->process_private = (struct hns3_process_private *)
 	    rte_zmalloc_socket("hns3_filter_list",
 			       sizeof(struct hns3_process_private),
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 4c40df1cbb..d59418b8c8 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -743,6 +743,8 @@ struct hns3_adapter {
 		struct hns3_vf vf;
 	};
 
+	struct rte_eth_dev *eth_dev;
+
 	bool rx_simple_allowed;
 	bool rx_vec_allowed;
 	bool tx_simple_allowed;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.817272548 +0000
+++ 0034-net-hns3-fix-FEC-state-query.patch	2021-02-05 11:18:28.670688522 +0000
@@ -1 +1 @@
-From 2390bf217f4df0228f238d4ba4b57097feef1d0e Mon Sep 17 00:00:00 2001
+From f5c23c81806c9ff09e5f4246bf5f2bf3cbe26a36 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2390bf217f4df0228f238d4ba4b57097feef1d0e ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d6d3f03e5c..7c34e382fb 100644
+index 2011378879..c94a325d25 100644
@@ -34,3 +35,3 @@
- void hns3_ether_format_addr(char *buf, uint16_t size,
- 			    const struct rte_ether_addr *ether_addr)
-@@ -3010,13 +3010,6 @@ hns3_get_capability(struct hns3_hw *hw)
+ static void
+ hns3_pf_disable_irq0(struct hns3_hw *hw)
+@@ -3001,13 +3001,6 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -50 +51 @@
-@@ -3148,8 +3141,15 @@ hns3_get_configuration(struct hns3_hw *hw)
+@@ -3139,8 +3132,15 @@ hns3_get_configuration(struct hns3_hw *hw)
@@ -67 +68 @@
-@@ -5797,6 +5797,16 @@ get_current_fec_auto_state(struct hns3_hw *hw, uint8_t *state)
+@@ -5788,6 +5788,16 @@ get_current_fec_auto_state(struct hns3_hw *hw, uint8_t *state)
@@ -84 +85 @@
-@@ -6003,14 +6013,14 @@ hns3_restore_fec(struct hns3_hw *hw)
+@@ -5994,14 +6004,14 @@ hns3_restore_fec(struct hns3_hw *hw)
@@ -104 +105 @@
-@@ -6096,6 +6106,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -6087,6 +6097,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
@@ -114 +115 @@
-index 31f78a175d..8d6b8cdbbc 100644
+index 4c40df1cbb..d59418b8c8 100644

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

* [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (32 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/hns3: fix FEC state query' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' " luca.boccassi
                   ` (240 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Wei Xie, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 2d573942e7980bd30c750093b054807d332cab81 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Mon, 23 Nov 2020 07:05:23 +0000
Subject: [PATCH] net/ice: fix outer UDP Tx checksum offload

[ upstream commit 2ed011776334a742296f2495e2e0c76a7354e7af ]

If hardware outer UDP Tx checksum offload enabled, it doesn't take
effect when 'IPv6/UDP/VXLAN' packet sent with wrong outer UDP checksum.

In order to take effect, set the 'L4T_CS' flag valid only when 'L4TUNT'
equals one and 'EIPT' is not zero. If 'L4T_CS' flag marked, the hardware
can calculate the outer tunneling UDP checksum.

Fixes: bd70c451532c ("net/ice: support Tx checksum offload for tunnel")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 5fbd68eafc..9769e216bf 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2319,8 +2319,11 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 	*cd_tunneling |= (tx_offload.l2_len >> 1) <<
 		ICE_TXD_CTX_QW0_NATLEN_S;
 
-	if ((ol_flags & PKT_TX_OUTER_UDP_CKSUM) &&
-	    (ol_flags & PKT_TX_OUTER_IP_CKSUM) &&
+	/**
+	 * Calculate the tunneling UDP checksum.
+	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
+	 */
+	if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
 	    (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING))
 		*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.866049808 +0000
+++ 0035-net-ice-fix-outer-UDP-Tx-checksum-offload.patch	2021-02-05 11:18:28.674688599 +0000
@@ -1 +1 @@
-From 2ed011776334a742296f2495e2e0c76a7354e7af Mon Sep 17 00:00:00 2001
+From 2d573942e7980bd30c750093b054807d332cab81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ed011776334a742296f2495e2e0c76a7354e7af ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (33 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix global register recovery' " luca.boccassi
                   ` (239 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/54aa2da82fa401c381609ddd2dbebc57ee38b418

Thanks.

Luca Boccassi

---
From 54aa2da82fa401c381609ddd2dbebc57ee38b418 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Thu, 3 Dec 2020 07:50:30 +0000
Subject: [PATCH] net/i40e: fix L4 checksum flag

[ upstream commit c17af95a19e30c8d89eb96ceca99f60474ca2ac4 ]

When tunneled packet received that inner L4 checksum value is correct,
the test_pmd output log shows 'ol_flags' value is
'PKT_RX_L4_CKSUM_UNKNOWN', but expected value is 'PKT_RX_L4_CKSUM_GOOD'.

If the inner l4 checksum is correct, mark the 'PKT_RX_L4_CKSUM_GOOD'
flag to 'l3_l4e_flags' for sse and 'l3_l4_flags_shuf' for avx2 to
ensure that the 'ol_flags' can match correct flags.

Fixes: 9966a00a0688 ("net/i40e: enable bad checksum flags in vector Rx")
Fixes: dafadd73762e ("net/i40e: add AVX2 Rx function")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c | 40 ++++++++++++++++-----------
 drivers/net/i40e/i40e_rxtx_vec_sse.c  | 20 ++++++++------
 2 files changed, 35 insertions(+), 25 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 7a558fc73a..fe6ec7deef 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -342,24 +342,32 @@ _recv_raw_pkts_vec_avx2(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	 */
 	const __m256i l3_l4_flags_shuf = _mm256_set_epi8(0, 0, 0, 0, 0, 0, 0, 0,
 			/* shift right 1 bit to make sure it not exceed 255 */
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			PKT_RX_IP_CKSUM_BAD >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
 			/* second 128-bits */
 			0, 0, 0, 0, 0, 0, 0, 0,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			PKT_RX_IP_CKSUM_BAD >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD) >> 1);
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1);
 
 	const __m256i cksum_mask = _mm256_set1_epi32(
 			PKT_RX_IP_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD |
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 4b2b6a28fc..0bcb48e24e 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -254,16 +254,18 @@ desc_to_olflags_v(struct i40e_rx_queue *rxq, volatile union i40e_rx_desc *rxdp,
 
 	const __m128i l3_l4e_flags = _mm_set_epi8(0, 0, 0, 0, 0, 0, 0, 0,
 			/* shift right 1 bit to make sure it not exceed 255 */
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
 			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD |
-			 PKT_RX_L4_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			PKT_RX_IP_CKSUM_BAD >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD) >> 1);
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1);
 
 	/* Unpack "status" from quadword 1, bits 0:32 */
 	vlan0 = _mm_unpackhi_epi32(descs[0], descs[1]);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.909600967 +0000
+++ 0036-net-i40e-fix-L4-checksum-flag.patch	2021-02-05 11:18:28.678688675 +0000
@@ -1 +1 @@
-From c17af95a19e30c8d89eb96ceca99f60474ca2ac4 Mon Sep 17 00:00:00 2001
+From 54aa2da82fa401c381609ddd2dbebc57ee38b418 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c17af95a19e30c8d89eb96ceca99f60474ca2ac4 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix global register recovery' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (34 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' " luca.boccassi
                   ` (238 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From de803d7e033ee2cdb5df86ab47a46ddae1041875 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Fri, 20 Nov 2020 16:49:47 +0800
Subject: [PATCH] net/i40e: fix global register recovery

[ upstream commit ac241c74ac75b2670788635b1a8e6809afae0827 ]

PMD configures the global register I40E_GLINT_CTL during
device initialization to work around the Rx write back
issue. But when a device is bound from DPDK to kernel,
the global register is not recovered to the original
state, it will cause kernel driver performance drop issue.
This patch fixes this issue.

Fixes: be6c228d4da3 ("i40e: support Rx interrupt")
Fixes: 4ab831449a1c ("net/i40e: fix interrupt conflict with multi-driver")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f54769c29d..2cb18ecc03 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -763,6 +763,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf)
 	I40E_WRITE_REG(hw, I40E_GLINT_CTL, val);
 }
 
+static inline void i40e_clear_automask(struct i40e_pf *pf)
+{
+	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	uint32_t val;
+
+	val = I40E_READ_REG(hw, I40E_GLINT_CTL);
+	val &= ~(I40E_GLINT_CTL_DIS_AUTOMASK_PF0_MASK |
+		 I40E_GLINT_CTL_DIS_AUTOMASK_VF0_MASK);
+
+	if (!pf->support_multi_driver)
+		val &= ~I40E_GLINT_CTL_DIS_AUTOMASK_N_MASK;
+
+	I40E_WRITE_REG(hw, I40E_GLINT_CTL, val);
+}
+
 #define I40E_FLOW_CONTROL_ETHERTYPE  0x8808
 
 /*
@@ -2741,6 +2756,8 @@ i40e_dev_close(struct rte_eth_dev *dev)
 	/* Remove all Traffic Manager configuration */
 	i40e_tm_conf_uninit(dev);
 
+	i40e_clear_automask(pf);
+
 	hw->adapter_closed = 1;
 	return ret;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:30.950659779 +0000
+++ 0037-net-i40e-fix-global-register-recovery.patch	2021-02-05 11:18:28.690688903 +0000
@@ -1 +1 @@
-From ac241c74ac75b2670788635b1a8e6809afae0827 Mon Sep 17 00:00:00 2001
+From de803d7e033ee2cdb5df86ab47a46ddae1041875 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac241c74ac75b2670788635b1a8e6809afae0827 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (35 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix global register recovery' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' " luca.boccassi
                   ` (237 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 87c6bb64850286a80a65477a2c13fad3fd2e8b34 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 2 Dec 2020 17:48:06 +0800
Subject: [PATCH] net/ixgbe: detect failed VF MTU set

[ upstream commit c77866a1690416c279c4153d0416c15e9a26547d ]

If a VF request to set a invalid maximum packet length value,
The PF kernel driver may disable its reception.

This patch add codes to output information and return the error status.

Fixes: 12cd0cccc3db ("ixgbevf: allow to set MTU")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c   | 8 ++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9a47a8b262..d7a1806ab8 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6555,7 +6555,8 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	 * prior to 3.11.33 which contains the following change:
 	 * "ixgbe: Enable jumbo frames support w/ SR-IOV"
 	 */
-	ixgbevf_rlpml_set_vf(hw, max_frame);
+	if (ixgbevf_rlpml_set_vf(hw, max_frame))
+		return -EINVAL;
 
 	/* update max frame size */
 	dev->data->dev_conf.rxmode.max_rx_pkt_len = max_frame;
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 6cfbb582e2..7bb8460359 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -5634,8 +5634,12 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
 	 * ixgbevf_rlpml_set_vf even if jumbo frames are not used. This way,
 	 * VF packets received can work in all cases.
 	 */
-	ixgbevf_rlpml_set_vf(hw,
-		(uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len);
+	if (ixgbevf_rlpml_set_vf(hw,
+	    (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len)) {
+		PMD_INIT_LOG(ERR, "Set max packet length to %d failed.",
+			     dev->data->dev_conf.rxmode.max_rx_pkt_len);
+		return -EINVAL;
+	}
 
 	/*
 	 * Assume no header split and no VLAN strip support
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.002416352 +0000
+++ 0038-net-ixgbe-detect-failed-VF-MTU-set.patch	2021-02-05 11:18:28.698689056 +0000
@@ -1 +1 @@
-From c77866a1690416c279c4153d0416c15e9a26547d Mon Sep 17 00:00:00 2001
+From 87c6bb64850286a80a65477a2c13fad3fd2e8b34 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c77866a1690416c279c4153d0416c15e9a26547d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (36 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' " luca.boccassi
                   ` (236 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Samik Gupta; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/906f23c4c0805a2bb9bb89d1e46c5201c0461a6a

Thanks.

Luca Boccassi

---
From 906f23c4c0805a2bb9bb89d1e46c5201c0461a6a Mon Sep 17 00:00:00 2001
From: Samik Gupta <samik.gupta@broadcom.com>
Date: Thu, 12 Nov 2020 13:28:25 -0800
Subject: [PATCH] net/bnxt: fix Rx rings in RSS redirection table

[ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ]

This commit introduces a limit on the number of RX rings included in
the RSS redirection table to a value no larger than the size supported
by Thor as defined by BNXT_RSS_TBL_SIZE_THOR.

Fixes: d819382543f3 ("net/bnxt: add RSS redirection table operations")

Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Samik Gupta <samik.gupta@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 90ced972c0..9bd4f1da97 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -389,7 +389,7 @@ struct bnxt_coal {
 #define DBR_TYPE_NQ				(0xaULL << 60)
 #define DBR_TYPE_NQ_ARM				(0xbULL << 60)
 
-#define BNXT_RSS_TBL_SIZE_THOR		512
+#define BNXT_RSS_TBL_SIZE_THOR		512U
 #define BNXT_RSS_ENTRIES_PER_CTX_THOR	64
 #define BNXT_MAX_RSS_CTXTS_THOR \
 	(BNXT_RSS_TBL_SIZE_THOR / BNXT_RSS_ENTRIES_PER_CTX_THOR)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 81c8f8d79d..c363c8427a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -207,12 +207,15 @@ int is_bnxt_in_error(struct bnxt *bp)
 
 static uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
 {
+	unsigned int num_rss_rings = RTE_MIN(bp->rx_nr_rings,
+					     BNXT_RSS_TBL_SIZE_THOR);
+
 	if (!BNXT_CHIP_THOR(bp))
 		return 1;
 
-	return RTE_ALIGN_MUL_CEIL(bp->rx_nr_rings,
+	return RTE_ALIGN_MUL_CEIL(num_rss_rings,
 				  BNXT_RSS_ENTRIES_PER_CTX_THOR) /
-				    BNXT_RSS_ENTRIES_PER_CTX_THOR;
+				  BNXT_RSS_ENTRIES_PER_CTX_THOR;
 }
 
 uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
@@ -424,6 +427,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) {
 		int j, nr_ctxs = bnxt_rss_ctxts(bp);
 
+		if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_THOR) {
+			PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
+				    bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_THOR);
+			PMD_DRV_LOG(ERR,
+				    "Only queues 0-%d will be in RSS table\n",
+				    BNXT_RSS_TBL_SIZE_THOR - 1);
+		}
+
 		rc = 0;
 		for (j = 0; j < nr_ctxs; j++) {
 			rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, j);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.048465806 +0000
+++ 0039-net-bnxt-fix-Rx-rings-in-RSS-redirection-table.patch	2021-02-05 11:18:28.706689208 +0000
@@ -1 +1 @@
-From d424af43e6c32aec83be8f1380271ff33ed0b89a Mon Sep 17 00:00:00 2001
+From 906f23c4c0805a2bb9bb89d1e46c5201c0461a6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (37 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' " luca.boccassi
                   ` (235 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Samik Gupta; +Cc: Ajit Khaparde, Lance Richardson, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 87fc956cc92072d5e52d644fda6e352c6478cf0c Mon Sep 17 00:00:00 2001
From: Samik Gupta <samik.gupta@broadcom.com>
Date: Fri, 6 Nov 2020 16:41:21 -0500
Subject: [PATCH] net/bnxt: fix VNIC config on Rx queue stop

[ upstream commit e36b1cd6b8cd20dbb323be7a01b8152cbb07afd4 ]

Reconfigure a vnic's default ring if the current default ring is stopped
by the application. It picks the lowest numbered ring that is currently
active to be the new default, and issues the hwrm_vnic_cfg command to
update the configuration. Applies to adapters that are not Thor-based.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")

Signed-off-by: Samik Gupta <samik.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index e0ec342162..61196eba93 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -557,12 +557,12 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		rc = bnxt_vnic_rss_configure(bp, vnic);
 	}
 
-	if (BNXT_CHIP_THOR(bp)) {
-		/* Compute current number of active receive queues. */
-		for (i = vnic->start_grp_id; i < vnic->end_grp_id; i++)
-			if (bp->rx_queues[i]->rx_started)
-				active_queue_cnt++;
+	/* Compute current number of active receive queues. */
+	for (i = vnic->start_grp_id; i < vnic->end_grp_id; i++)
+		if (bp->rx_queues[i]->rx_started)
+			active_queue_cnt++;
 
+	if (BNXT_CHIP_THOR(bp)) {
 		/*
 		 * For Thor, we need to ensure that the VNIC default receive
 		 * ring corresponds to an active receive queue. When no queue
@@ -582,6 +582,22 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 			/* Reconfigure default receive ring. */
 			bnxt_hwrm_vnic_cfg(bp, vnic);
 		}
+	} else if (active_queue_cnt) {
+		/*
+		 * If the queue being stopped is the current default queue and
+		 * there are other active queues, pick one of them as the
+		 * default and reconfigure the vnic.
+		 */
+		if (vnic->dflt_ring_grp == bp->grp_info[rx_queue_id].fw_grp_id) {
+			for (i = vnic->start_grp_id; i < vnic->end_grp_id; i++) {
+				if (bp->rx_queues[i]->rx_started) {
+					vnic->dflt_ring_grp =
+						bp->grp_info[i].fw_grp_id;
+					bnxt_hwrm_vnic_cfg(bp, vnic);
+					break;
+				}
+			}
+		}
 	}
 
 	if (rc == 0)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.095283209 +0000
+++ 0040-net-bnxt-fix-VNIC-config-on-Rx-queue-stop.patch	2021-02-05 11:18:28.706689208 +0000
@@ -1 +1 @@
-From e36b1cd6b8cd20dbb323be7a01b8152cbb07afd4 Mon Sep 17 00:00:00 2001
+From 87fc956cc92072d5e52d644fda6e352c6478cf0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e36b1cd6b8cd20dbb323be7a01b8152cbb07afd4 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (38 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' " luca.boccassi
                   ` (234 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 6b544c78a3819fa53ac52e97637567bd37ebf085 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 17 Nov 2020 12:40:24 +0530
Subject: [PATCH] net/bnxt: release HWRM lock in error

[ upstream commit ec0a96819d35070276f350c2488203e7ab72aed4 ]

In __bnxt_hwrm_func_qcaps, when memory allocations fails
driver is not releasing the hwrm lock. This patch fixes it
by calling hwrm_unlock in that error case.

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")

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_hwrm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ebbf504c0c..784e9778a3 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -718,6 +718,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 			    sizeof(bp->pf->vf_info[0]) * new_max_vfs, 0);
 			if (bp->pf->vf_info == NULL) {
 				PMD_DRV_LOG(ERR, "Alloc vf info fail\n");
+				HWRM_UNLOCK();
 				return -ENOMEM;
 			}
 			bp->pf->max_vfs = new_max_vfs;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.131728512 +0000
+++ 0041-net-bnxt-release-HWRM-lock-in-error.patch	2021-02-05 11:18:28.706689208 +0000
@@ -1 +1 @@
-From ec0a96819d35070276f350c2488203e7ab72aed4 Mon Sep 17 00:00:00 2001
+From 6b544c78a3819fa53ac52e97637567bd37ebf085 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec0a96819d35070276f350c2488203e7ab72aed4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (39 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' " luca.boccassi
                   ` (233 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From b2a1b765ac391e90dbcf2bdbb6173032708572de Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 12 Nov 2020 16:17:54 +0530
Subject: [PATCH] net/bnxt: propagate FW command failure to application

[ upstream commit 4297cadef3a6eb42c32c12a1b3926316ee0e0f9a ]

In bnxt_reta_update_op() and bnxt_rss_hash_update_op(), driver does not
propagate the error back to the application when the fw command fails.

Fixes: 378ab645bb0b ("net/bnxt: fix RSS RETA indirection table ops")
Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")

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, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c363c8427a..c62320a4b1 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1843,8 +1843,8 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,
 		}
 	}
 
-	bnxt_hwrm_vnic_rss_cfg(bp, vnic);
-	return 0;
+	rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
+	return rc;
 }
 
 static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
@@ -1949,8 +1949,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
 	memcpy(vnic->rss_hash_key, rss_conf->rss_key, rss_conf->rss_key_len);
 
 rss_config:
-	bnxt_hwrm_vnic_rss_cfg(bp, vnic);
-	return 0;
+	rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
+	return rc;
 }
 
 static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.174941146 +0000
+++ 0042-net-bnxt-propagate-FW-command-failure-to-application.patch	2021-02-05 11:18:28.710689284 +0000
@@ -1 +1 @@
-From 4297cadef3a6eb42c32c12a1b3926316ee0e0f9a Mon Sep 17 00:00:00 2001
+From b2a1b765ac391e90dbcf2bdbb6173032708572de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4297cadef3a6eb42c32c12a1b3926316ee0e0f9a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8047b0b5d7..33358779bb 100644
+index c363c8427a..c62320a4b1 100644

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

* [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (40 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix format specifier for unsigned int' " luca.boccassi
                   ` (232 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/919498cea112f93b47bbd3e4a022b23b60fd0a7d

Thanks.

Luca Boccassi

---
From 919498cea112f93b47bbd3e4a022b23b60fd0a7d Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 1 Dec 2020 12:52:53 -0800
Subject: [PATCH] net/bnxt: fix cleanup on mutex init failure

[ upstream commit 5bbf650b7105f867145664bfe1feeba06386a0d8 ]

In case mutex init fails during initialization, start cleanup and
fail the initialization process.

Fixes: a73b8e939f10 ("net/bnxt: fix race between start and interrupt handler")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c62320a4b1..1719995871 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4738,8 +4738,10 @@ bnxt_init_locks(struct bnxt *bp)
 	}
 
 	err = pthread_mutex_init(&bp->def_cp_lock, NULL);
-	if (err)
+	if (err) {
 		PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
+		return err;
+	}
 
 	err = pthread_mutex_init(&bp->health_check_lock, NULL);
 	if (err)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.219107902 +0000
+++ 0043-net-bnxt-fix-cleanup-on-mutex-init-failure.patch	2021-02-05 11:18:28.718689436 +0000
@@ -1 +1 @@
-From 5bbf650b7105f867145664bfe1feeba06386a0d8 Mon Sep 17 00:00:00 2001
+From 919498cea112f93b47bbd3e4a022b23b60fd0a7d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5bbf650b7105f867145664bfe1feeba06386a0d8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 33358779bb..0b14ca2342 100644
+index c62320a4b1..1719995871 100644
@@ -22 +23 @@
-@@ -4739,8 +4739,10 @@ bnxt_init_locks(struct bnxt *bp)
+@@ -4738,8 +4738,10 @@ bnxt_init_locks(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: fix format specifier for unsigned int' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (41 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix max rings computation' " luca.boccassi
                   ` (231 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c35760057e436e82749a8a09b1f43cbd4a4cfec7 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 3 Dec 2020 11:17:14 -0800
Subject: [PATCH] net/bnxt: fix format specifier for unsigned int

[ upstream commit fa24e230b1e5d4326046be4f07f5caf6c5b2f77a ]

&device requires the %u format specifier not the %d specifier, as
&device is unsigned.

Fixes: a46bbb57605b ("net/bnxt: update multi device design")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/tf_core.c b/drivers/net/bnxt/tf_core/tf_core.c
index 24d49096a7..3409cbbcec 100644
--- a/drivers/net/bnxt/tf_core/tf_core.c
+++ b/drivers/net/bnxt/tf_core/tf_core.c
@@ -82,7 +82,7 @@ tf_open_session(struct tf *tfp,
 		return rc;
 
 	TFP_DRV_LOG(INFO,
-		    "domain:%d, bus:%d, device:%d\n",
+		    "domain:%d, bus:%d, device:%u\n",
 		    parms->session_id.internal.domain,
 		    parms->session_id.internal.bus,
 		    parms->session_id.internal.device);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.264312453 +0000
+++ 0044-net-bnxt-fix-format-specifier-for-unsigned-int.patch	2021-02-05 11:18:28.718689436 +0000
@@ -1 +1 @@
-From fa24e230b1e5d4326046be4f07f5caf6c5b2f77a Mon Sep 17 00:00:00 2001
+From c35760057e436e82749a8a09b1f43cbd4a4cfec7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa24e230b1e5d4326046be4f07f5caf6c5b2f77a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: fix max rings computation' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (42 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix format specifier for unsigned int' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix freeing mbuf' " luca.boccassi
                   ` (230 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Sriharsha Basavapatna; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a4ac19d250df84e329d8891cb0e3a7fa95da36ed Mon Sep 17 00:00:00 2001
From: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Date: Fri, 28 Aug 2020 07:13:22 -0400
Subject: [PATCH] net/bnxt: fix max rings computation

[ upstream commit c72fe7ac3b63629f1f46e4d91d9abc0d7c064d93 ]

The current max_rings computation does not take into account the case
when max_nq_rings is <= num_async_cpr. This results in a wrong value
like 0, when max_nq_rings is 1. Fix this by subtracting num_async_cpr
only when max_cp_rings > num_async_cpr.

Apart from this, the entire logic is currently spread across a few
macros, making it hard to read and debug this code. Move this code
into an inline function.

max_msix is not used in the max_rings calculation.
Apparently the max_msix field returned in HWRM_RESC_QCAPS is only valid
for Thor and newer chips. On Wh+ it will be equal to min_compl_rings.
Also, when a function reset is performed on an application quit, FW
will not reset the VF resource pool as per design.
This can lead to a strange condition wherein the max_msix field
on Wh+ keeps changing on each application re-load thereby throwing
throwing off the max_rings computation.

Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 41 +++++++++++++++++++++++-----------
 drivers/net/bnxt/bnxt_ethdev.c |  2 +-
 drivers/net/bnxt/bnxt_rxq.c    |  7 +++---
 drivers/net/bnxt/bnxt_txq.c    |  2 +-
 4 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 9bd4f1da97..21f1604fcb 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -752,19 +752,6 @@ struct bnxt {
 	uint16_t		max_tx_rings;
 	uint16_t		max_rx_rings;
 #define MAX_STINGRAY_RINGS		128U
-/* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */
-#define BNXT_MAX_RX_RINGS(bp) \
-	(BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings / 2U, \
-					     MAX_STINGRAY_RINGS), \
-				     bp->max_stat_ctx / 2U) : \
-				RTE_MIN(bp->max_rx_rings / 2U, \
-					bp->max_stat_ctx / 2U))
-#define BNXT_MAX_TX_RINGS(bp) \
-	(RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp)))
-
-#define BNXT_MAX_RINGS(bp) \
-	(RTE_MIN((((bp)->max_cp_rings - BNXT_NUM_ASYNC_CPR(bp)) / 2U), \
-		 BNXT_MAX_TX_RINGS(bp)))
 
 #define BNXT_MAX_VF_REP_RINGS	8
 
@@ -823,6 +810,34 @@ struct bnxt {
 	uint16_t		tx_cfa_action;
 };
 
+static
+inline uint16_t bnxt_max_rings(struct bnxt *bp)
+{
+	uint16_t max_tx_rings = bp->max_tx_rings;
+	uint16_t max_rx_rings = bp->max_rx_rings;
+	uint16_t max_cp_rings = bp->max_cp_rings;
+	uint16_t max_rings;
+
+	/* For the sake of symmetry:
+	 * max Tx rings == max Rx rings, one stat ctx for each.
+	 */
+	if (BNXT_STINGRAY(bp)) {
+		max_rx_rings = RTE_MIN(RTE_MIN(max_rx_rings / 2U,
+					       MAX_STINGRAY_RINGS),
+				       bp->max_stat_ctx / 2U);
+	} else {
+		max_rx_rings = RTE_MIN(max_rx_rings / 2U,
+				       bp->max_stat_ctx / 2U);
+	}
+
+	max_tx_rings = RTE_MIN(max_tx_rings, max_rx_rings);
+	if (max_cp_rings > BNXT_NUM_ASYNC_CPR(bp))
+		max_cp_rings -= BNXT_NUM_ASYNC_CPR(bp);
+	max_rings = RTE_MIN(max_cp_rings / 2U, max_tx_rings);
+
+	return max_rings;
+}
+
 #define BNXT_FC_TIMER	1 /* Timer freq in Sec Flow Counters */
 
 /**
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1719995871..9c1bf57494 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -920,7 +920,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	if (BNXT_PF(bp))
 		dev_info->max_vfs = pdev->max_vfs;
 
-	max_rx_rings = BNXT_MAX_RINGS(bp);
+	max_rx_rings = bnxt_max_rings(bp);
 	/* For the sake of symmetry, max_rx_queues = max_tx_queues */
 	dev_info->max_rx_queues = max_rx_rings;
 	dev_info->max_tx_queues = max_rx_rings;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 61196eba93..8637559370 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -311,7 +311,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	if (queue_idx >= BNXT_MAX_RINGS(bp)) {
+	if (queue_idx >= bnxt_max_rings(bp)) {
 		PMD_DRV_LOG(ERR,
 			"Cannot create Rx ring %d. Only %d rings available\n",
 			queue_idx, bp->max_rx_rings);
@@ -364,8 +364,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
 	eth_dev->data->rx_queues[queue_idx] = rxq;
 	/* Allocate RX ring hardware descriptors */
-	if (bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring, NULL,
-			     "rxr")) {
+	rc = bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring, NULL,
+			     "rxr");
+	if (rc) {
 		PMD_DRV_LOG(ERR,
 			    "ring_dma_zone_reserve for rx_ring failed!\n");
 		goto err;
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index c9792a2af2..99a31cef28 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -98,7 +98,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	if (queue_idx >= BNXT_MAX_RINGS(bp)) {
+	if (queue_idx >= bnxt_max_rings(bp)) {
 		PMD_DRV_LOG(ERR,
 			"Cannot create Tx ring %d. Only %d rings available\n",
 			queue_idx, bp->max_tx_rings);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.303207226 +0000
+++ 0045-net-bnxt-fix-max-rings-computation.patch	2021-02-05 11:18:28.726689589 +0000
@@ -1 +1 @@
-From c72fe7ac3b63629f1f46e4d91d9abc0d7c064d93 Mon Sep 17 00:00:00 2001
+From a4ac19d250df84e329d8891cb0e3a7fa95da36ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c72fe7ac3b63629f1f46e4d91d9abc0d7c064d93 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 9c1c87489e..bc0935272a 100644
+index 9bd4f1da97..21f1604fcb 100644
@@ -61 +62 @@
-@@ -822,6 +809,34 @@ struct bnxt {
+@@ -823,6 +810,34 @@ struct bnxt {
@@ -97 +98 @@
-index 0b14ca2342..bf89635776 100644
+index 1719995871..9c1bf57494 100644
@@ -110 +111 @@
-index 328cc994da..19e11e47bf 100644
+index 61196eba93..8637559370 100644

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

* [dpdk-stable] patch 'net/bnxt: fix freeing mbuf' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (43 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix max rings computation' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' " luca.boccassi
                   ` (229 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Somnath Kotur, Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 4d96a2da30224164bfba9a9b11b3f5bbedeace64 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 3 Dec 2020 12:47:31 -0800
Subject: [PATCH] net/bnxt: fix freeing mbuf

[ upstream commit 553347153d84c827b78c9700996906447d73e1fe ]

mbufs are being allocated using rte_mbuf_raw_alloc().
Use corresponding rte_mbuf_raw_free() to free mbuf.

Fixes: 84799b868da9 ("net/bnxt: fix freeing mbuf")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_reps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index e5ba0909b9..167c46ad41 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -65,7 +65,7 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
 		/* Representor Rx ring full, drop pkt */
 		vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len;
 		vfr_bp->rx_drop_pkts[que]++;
-		rte_pktmbuf_free(mbuf);
+		rte_mbuf_raw_free(mbuf);
 	}
 
 	return 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.347817643 +0000
+++ 0046-net-bnxt-fix-freeing-mbuf.patch	2021-02-05 11:18:28.726689589 +0000
@@ -1 +1 @@
-From 553347153d84c827b78c9700996906447d73e1fe Mon Sep 17 00:00:00 2001
+From 4d96a2da30224164bfba9a9b11b3f5bbedeace64 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 553347153d84c827b78c9700996906447d73e1fe ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (44 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix freeing mbuf' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix PF resource query' " luca.boccassi
                   ` (228 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0012f36035029ab055b6e70dab184611c0c838a2

Thanks.

Luca Boccassi

---
From 0012f36035029ab055b6e70dab184611c0c838a2 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 7 Oct 2020 09:11:50 +0530
Subject: [PATCH] net/bnxt: fix VNIC RSS configure function

[ upstream commit 5f0f9a45aca26d8462eb2dfce34c6d3561610915 ]

1. Moved invalid VNIC id check to the beginning of the function.
2. Removed a duplicate check which avoids unnecessary code indentation.

Fixes: 49d0709b257f ("net/bnxt: delete and flush L2 filters cleanly")

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_hwrm.c | 42 +++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 784e9778a3..f64df1892e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4896,37 +4896,35 @@ int bnxt_vnic_rss_configure(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 {
 	unsigned int rss_idx, fw_idx, i;
 
+	if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
+		return 0;
+
 	if (!(vnic->rss_table && vnic->hash_type))
 		return 0;
 
 	if (BNXT_CHIP_THOR(bp))
 		return bnxt_vnic_rss_configure_thor(bp, vnic);
 
-	if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
-		return 0;
-
-	if (vnic->rss_table && vnic->hash_type) {
-		/*
-		 * Fill the RSS hash & redirection table with
-		 * ring group ids for all VNICs
-		 */
-		for (rss_idx = 0, fw_idx = 0; rss_idx < HW_HASH_INDEX_SIZE;
-			rss_idx++, fw_idx++) {
-			for (i = 0; i < bp->rx_cp_nr_rings; i++) {
-				fw_idx %= bp->rx_cp_nr_rings;
-				if (vnic->fw_grp_ids[fw_idx] !=
-				    INVALID_HW_RING_ID)
-					break;
-				fw_idx++;
-			}
-			if (i == bp->rx_cp_nr_rings)
-				return 0;
-			vnic->rss_table[rss_idx] = vnic->fw_grp_ids[fw_idx];
+	/*
+	 * Fill the RSS hash & redirection table with
+	 * ring group ids for all VNICs
+	 */
+	for (rss_idx = 0, fw_idx = 0; rss_idx < HW_HASH_INDEX_SIZE;
+	     rss_idx++, fw_idx++) {
+		for (i = 0; i < bp->rx_cp_nr_rings; i++) {
+			fw_idx %= bp->rx_cp_nr_rings;
+			if (vnic->fw_grp_ids[fw_idx] != INVALID_HW_RING_ID)
+				break;
+			fw_idx++;
 		}
-		return bnxt_hwrm_vnic_rss_cfg(bp, vnic);
+
+		if (i == bp->rx_cp_nr_rings)
+			return 0;
+
+		vnic->rss_table[rss_idx] = vnic->fw_grp_ids[fw_idx];
 	}
 
-	return 0;
+	return bnxt_hwrm_vnic_rss_cfg(bp, vnic);
 }
 
 static void bnxt_hwrm_set_coal_params(struct bnxt_coal *hw_coal,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.387704380 +0000
+++ 0047-net-bnxt-fix-VNIC-RSS-configure-function.patch	2021-02-05 11:18:28.730689665 +0000
@@ -1 +1 @@
-From 5f0f9a45aca26d8462eb2dfce34c6d3561610915 Mon Sep 17 00:00:00 2001
+From 0012f36035029ab055b6e70dab184611c0c838a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f0f9a45aca26d8462eb2dfce34c6d3561610915 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6f5402070f..cee2656c14 100644
+index 784e9778a3..f64df1892e 100644
@@ -33,2 +34,2 @@
- 	if (BNXT_CHIP_P5(bp))
- 		return bnxt_vnic_rss_configure_p5(bp, vnic);
+ 	if (BNXT_CHIP_THOR(bp))
+ 		return bnxt_vnic_rss_configure_thor(bp, vnic);

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

* [dpdk-stable] patch 'net/bnxt: fix PF resource query' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (45 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: update MCDI headers for MAE privilege' " luca.boccassi
                   ` (227 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Venkat Duvvuru, Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c1ea3726c6aba856be882fc6bf1c25708ed7810f Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 3 Dec 2020 12:08:47 +0530
Subject: [PATCH] net/bnxt: fix PF resource query

[ upstream commit 70517a3a8f3598ab0f9cd441620296aa7f11c194 ]

This cmd should be called by every driver after 'hwrm_func_cfg'
to get the actual number of resources allocated by the HWRM.
The values returned in the cmd are the max values for that PF.

Also, now that the max values for the PF are computed in probe itself,
no need to invoke FUNC_QCAPs or any other cmd in dev_configure_op()
as that would just override the actual max values obtained above.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c |  7 -------
 drivers/net/bnxt/bnxt_hwrm.c   | 36 +++++++++++++++++++++++++++++++++-
 2 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9c1bf57494..2f08f2b2ba 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1071,13 +1071,6 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
 		}
 
 		pthread_mutex_unlock(&bp->def_cp_lock);
-	} else {
-		/* legacy driver needs to get updated values */
-		rc = bnxt_hwrm_func_qcaps(bp);
-		if (rc) {
-			PMD_DRV_LOG(ERR, "hwrm func qcaps fail:%d\n", rc);
-			return rc;
-		}
 	}
 
 	/* Inherit new configurations */
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index f64df1892e..75d97d6721 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3456,6 +3456,35 @@ static int bnxt_update_max_resources(struct bnxt *bp,
 	return 0;
 }
 
+/* Update the PF resource values based on how many resources
+ * got allocated to it.
+ */
+static int bnxt_update_max_resources_pf_only(struct bnxt *bp)
+{
+	struct hwrm_func_qcfg_input req = {0};
+	struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
+	int rc;
+
+	/* Get the actual allocated values now */
+	HWRM_PREP(&req, HWRM_FUNC_QCFG, BNXT_USE_CHIMP_MB);
+	req.fid = rte_cpu_to_le_16(0xffff);
+	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
+	HWRM_CHECK_RESULT();
+
+	bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->alloc_rsscos_ctx);
+	bp->max_stat_ctx = rte_le_to_cpu_16(resp->alloc_stat_ctx);
+	bp->max_cp_rings = rte_le_to_cpu_16(resp->alloc_cmpl_rings);
+	bp->max_tx_rings = rte_le_to_cpu_16(resp->alloc_tx_rings);
+	bp->max_rx_rings = rte_le_to_cpu_16(resp->alloc_rx_rings);
+	bp->max_l2_ctx = rte_le_to_cpu_16(resp->alloc_l2_ctx);
+	bp->max_ring_grps = rte_le_to_cpu_16(resp->alloc_hw_ring_grps);
+	bp->max_vnics = rte_le_to_cpu_16(resp->alloc_vnics);
+
+	HWRM_UNLOCK();
+
+	return 0;
+}
+
 int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
 {
 	struct hwrm_func_qcfg_input req = {0};
@@ -3555,8 +3584,13 @@ int bnxt_hwrm_allocate_pf_only(struct bnxt *bp)
 		  HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_DISABLE);
 	bp->pf->func_cfg_flags |=
 		HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_DISABLE;
+
 	rc = bnxt_hwrm_pf_func_cfg(bp, &pf_resc);
-	rc = __bnxt_hwrm_func_qcaps(bp);
+	if (rc)
+		return rc;
+
+	rc = bnxt_update_max_resources_pf_only(bp);
+
 	return rc;
 }
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.435082798 +0000
+++ 0048-net-bnxt-fix-PF-resource-query.patch	2021-02-05 11:18:28.738689817 +0000
@@ -1 +1 @@
-From 70517a3a8f3598ab0f9cd441620296aa7f11c194 Mon Sep 17 00:00:00 2001
+From c1ea3726c6aba856be882fc6bf1c25708ed7810f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 70517a3a8f3598ab0f9cd441620296aa7f11c194 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index bf89635776..21d9e26ca8 100644
+index 9c1bf57494..2f08f2b2ba 100644
@@ -45 +46 @@
-index cee2656c14..a3eb133c08 100644
+index f64df1892e..75d97d6721 100644

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

* [dpdk-stable] patch 'common/sfc_efx/base: update MCDI headers for MAE privilege' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (46 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix PF resource query' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: check " luca.boccassi
                   ` (226 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From f1e6d7e9cbde659e362ffeae76cbb2028db2c6b5 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Fri, 11 Dec 2020 18:34:20 +0300
Subject: [PATCH] common/sfc_efx/base: update MCDI headers for MAE privilege

[ upstream commit 1a9e1b7d2734a395269a4d5f8d7bbfc1b47b9ead ]

VFs and unprivileged PFs should not be able to control MAE.
Add MAE privilege to MCDI headers in order to reflect that.

Fixes: 84d3fb7d7e1e ("common/sfc_efx/base: add MAE definitions to MCDI")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx_regs_mcdi.h | 54 +++++++++++++--------
 1 file changed, 34 insertions(+), 20 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_regs_mcdi.h b/drivers/common/sfc_efx/base/efx_regs_mcdi.h
index 0388acf723..689a491d05 100644
--- a/drivers/common/sfc_efx/base/efx_regs_mcdi.h
+++ b/drivers/common/sfc_efx/base/efx_regs_mcdi.h
@@ -20349,6 +20349,8 @@
  * SF-117064-DG for background).
  */
 #define	MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN_TSA_UNBOUND 0x8000
+/* enum: Control the Match-Action Engine if present. See mcdi_mae.yml. */
+#define	MC_CMD_PRIVILEGE_MASK_IN_GRP_MAE 0x10000
 /* enum: Set this bit to indicate that a new privilege mask is to be set,
  * otherwise the command will only read the existing mask.
  */
@@ -26823,7 +26825,7 @@
 #define	MC_CMD_MAE_GET_AR_CAPS 0x141
 #undef	MC_CMD_0x141_PRIVILEGE_CTG
 
-#define	MC_CMD_0x141_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x141_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_GET_AR_CAPS_IN msgrequest */
 #define	MC_CMD_MAE_GET_AR_CAPS_IN_LEN 0
@@ -26855,7 +26857,7 @@
 #define	MC_CMD_MAE_GET_OR_CAPS 0x142
 #undef	MC_CMD_0x142_PRIVILEGE_CTG
 
-#define	MC_CMD_0x142_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x142_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_GET_OR_CAPS_IN msgrequest */
 #define	MC_CMD_MAE_GET_OR_CAPS_IN_LEN 0
@@ -26885,7 +26887,7 @@
 #define	MC_CMD_MAE_COUNTER_ALLOC 0x143
 #undef	MC_CMD_0x143_PRIVILEGE_CTG
 
-#define	MC_CMD_0x143_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x143_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_COUNTER_ALLOC_IN msgrequest */
 #define	MC_CMD_MAE_COUNTER_ALLOC_IN_LEN 4
@@ -26928,7 +26930,7 @@
 #define	MC_CMD_MAE_COUNTER_FREE 0x144
 #undef	MC_CMD_0x144_PRIVILEGE_CTG
 
-#define	MC_CMD_0x144_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x144_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_COUNTER_FREE_IN msgrequest */
 #define	MC_CMD_MAE_COUNTER_FREE_IN_LENMIN 8
@@ -26993,6 +26995,9 @@
  * delivering packets to the current queue first.
  */
 #define	MC_CMD_MAE_COUNTERS_STREAM_START 0x151
+#undef	MC_CMD_0x151_PRIVILEGE_CTG
+
+#define	MC_CMD_0x151_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_COUNTERS_STREAM_START_IN msgrequest */
 #define	MC_CMD_MAE_COUNTERS_STREAM_START_IN_LEN 8
@@ -27026,6 +27031,9 @@
  * Stop streaming counter values to the specified RxQ.
  */
 #define	MC_CMD_MAE_COUNTERS_STREAM_STOP 0x152
+#undef	MC_CMD_0x152_PRIVILEGE_CTG
+
+#define	MC_CMD_0x152_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_COUNTERS_STREAM_STOP_IN msgrequest */
 #define	MC_CMD_MAE_COUNTERS_STREAM_STOP_IN_LEN 2
@@ -27052,6 +27060,9 @@
  * MAE_COUNTERS_PACKETISER_STREAM_START/PACKET_SIZE and rung the doorbell.
  */
 #define	MC_CMD_MAE_COUNTERS_STREAM_GIVE_CREDITS 0x153
+#undef	MC_CMD_0x153_PRIVILEGE_CTG
+
+#define	MC_CMD_0x153_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_COUNTERS_STREAM_GIVE_CREDITS_IN msgrequest */
 #define	MC_CMD_MAE_COUNTERS_STREAM_GIVE_CREDITS_IN_LEN 4
@@ -27070,7 +27081,7 @@
 #define	MC_CMD_MAE_ENCAP_HEADER_ALLOC 0x148
 #undef	MC_CMD_0x148_PRIVILEGE_CTG
 
-#define	MC_CMD_0x148_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x148_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ENCAP_HEADER_ALLOC_IN msgrequest */
 #define	MC_CMD_MAE_ENCAP_HEADER_ALLOC_IN_LENMIN 4
@@ -27103,7 +27114,7 @@
 #define	MC_CMD_MAE_ENCAP_HEADER_UPDATE 0x149
 #undef	MC_CMD_0x149_PRIVILEGE_CTG
 
-#define	MC_CMD_0x149_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x149_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ENCAP_HEADER_UPDATE_IN msgrequest */
 #define	MC_CMD_MAE_ENCAP_HEADER_UPDATE_IN_LENMIN 8
@@ -27132,7 +27143,7 @@
 #define	MC_CMD_MAE_ENCAP_HEADER_FREE 0x14a
 #undef	MC_CMD_0x14a_PRIVILEGE_CTG
 
-#define	MC_CMD_0x14a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x14a_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ENCAP_HEADER_FREE_IN msgrequest */
 #define	MC_CMD_MAE_ENCAP_HEADER_FREE_IN_LENMIN 4
@@ -27170,7 +27181,7 @@
 #define	MC_CMD_MAE_MAC_ADDR_ALLOC 0x15e
 #undef	MC_CMD_0x15e_PRIVILEGE_CTG
 
-#define	MC_CMD_0x15e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x15e_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_MAC_ADDR_ALLOC_IN msgrequest */
 #define	MC_CMD_MAE_MAC_ADDR_ALLOC_IN_LEN 6
@@ -27195,7 +27206,7 @@
 #define	MC_CMD_MAE_MAC_ADDR_FREE 0x15f
 #undef	MC_CMD_0x15f_PRIVILEGE_CTG
 
-#define	MC_CMD_0x15f_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x15f_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_MAC_ADDR_FREE_IN msgrequest */
 #define	MC_CMD_MAE_MAC_ADDR_FREE_IN_LENMIN 4
@@ -27232,7 +27243,7 @@
 #define	MC_CMD_MAE_ACTION_SET_ALLOC 0x14d
 #undef	MC_CMD_0x14d_PRIVILEGE_CTG
 
-#define	MC_CMD_0x14d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x14d_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ACTION_SET_ALLOC_IN msgrequest */
 #define	MC_CMD_MAE_ACTION_SET_ALLOC_IN_LEN 44
@@ -27317,7 +27328,7 @@
 #define	MC_CMD_MAE_ACTION_SET_FREE 0x14e
 #undef	MC_CMD_0x14e_PRIVILEGE_CTG
 
-#define	MC_CMD_0x14e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x14e_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ACTION_SET_FREE_IN msgrequest */
 #define	MC_CMD_MAE_ACTION_SET_FREE_IN_LENMIN 4
@@ -27355,7 +27366,7 @@
 #define	MC_CMD_MAE_ACTION_SET_LIST_ALLOC 0x14f
 #undef	MC_CMD_0x14f_PRIVILEGE_CTG
 
-#define	MC_CMD_0x14f_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x14f_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ACTION_SET_LIST_ALLOC_IN msgrequest */
 #define	MC_CMD_MAE_ACTION_SET_LIST_ALLOC_IN_LENMIN 8
@@ -27398,7 +27409,7 @@
 #define	MC_CMD_MAE_ACTION_SET_LIST_FREE 0x150
 #undef	MC_CMD_0x150_PRIVILEGE_CTG
 
-#define	MC_CMD_0x150_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x150_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ACTION_SET_LIST_FREE_IN msgrequest */
 #define	MC_CMD_MAE_ACTION_SET_LIST_FREE_IN_LENMIN 4
@@ -27435,7 +27446,7 @@
 #define	MC_CMD_MAE_OUTER_RULE_INSERT 0x15a
 #undef	MC_CMD_0x15a_PRIVILEGE_CTG
 
-#define	MC_CMD_0x15a_PRIVILEGE_CTG SRIOV_CTG_ADMIN
+#define	MC_CMD_0x15a_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_OUTER_RULE_INSERT_IN msgrequest */
 #define	MC_CMD_MAE_OUTER_RULE_INSERT_IN_LENMIN 16
@@ -27495,7 +27506,7 @@
 #define	MC_CMD_MAE_OUTER_RULE_REMOVE 0x15b
 #undef	MC_CMD_0x15b_PRIVILEGE_CTG
 
-#define	MC_CMD_0x15b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
+#define	MC_CMD_0x15b_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_OUTER_RULE_REMOVE_IN msgrequest */
 #define	MC_CMD_MAE_OUTER_RULE_REMOVE_IN_LENMIN 4
@@ -27577,7 +27588,7 @@
 #define	MC_CMD_MAE_ACTION_RULE_INSERT 0x15c
 #undef	MC_CMD_0x15c_PRIVILEGE_CTG
 
-#define	MC_CMD_0x15c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x15c_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ACTION_RULE_INSERT_IN msgrequest */
 #define	MC_CMD_MAE_ACTION_RULE_INSERT_IN_LENMIN 28
@@ -27618,7 +27629,7 @@
 #define	MC_CMD_MAE_ACTION_RULE_UPDATE 0x15d
 #undef	MC_CMD_0x15d_PRIVILEGE_CTG
 
-#define	MC_CMD_0x15d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x15d_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ACTION_RULE_UPDATE_IN msgrequest */
 #define	MC_CMD_MAE_ACTION_RULE_UPDATE_IN_LEN 24
@@ -27639,7 +27650,7 @@
 #define	MC_CMD_MAE_ACTION_RULE_DELETE 0x155
 #undef	MC_CMD_0x155_PRIVILEGE_CTG
 
-#define	MC_CMD_0x155_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x155_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_ACTION_RULE_DELETE_IN msgrequest */
 #define	MC_CMD_MAE_ACTION_RULE_DELETE_IN_LENMIN 4
@@ -27696,7 +27707,7 @@
 #define	MC_CMD_MAE_MPORT_ALLOC 0x163
 #undef	MC_CMD_0x163_PRIVILEGE_CTG
 
-#define	MC_CMD_0x163_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x163_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_MPORT_ALLOC_IN msgrequest */
 #define	MC_CMD_MAE_MPORT_ALLOC_IN_LEN 20
@@ -27803,7 +27814,7 @@
 #define	MC_CMD_MAE_MPORT_FREE 0x164
 #undef	MC_CMD_0x164_PRIVILEGE_CTG
 
-#define	MC_CMD_0x164_PRIVILEGE_CTG SRIOV_CTG_GENERAL
+#define	MC_CMD_0x164_PRIVILEGE_CTG SRIOV_CTG_MAE
 
 /* MC_CMD_MAE_MPORT_FREE_IN msgrequest */
 #define	MC_CMD_MAE_MPORT_FREE_IN_LEN 4
@@ -27907,6 +27918,9 @@
 /* MC_CMD_MAE_MPORT_ENUMERATE
  */
 #define	MC_CMD_MAE_MPORT_ENUMERATE 0x17c
+#undef	MC_CMD_0x17c_PRIVILEGE_CTG
+
+#define	MC_CMD_0x17c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
 
 /* MC_CMD_MAE_MPORT_ENUMERATE_IN msgrequest */
 #define	MC_CMD_MAE_MPORT_ENUMERATE_IN_LEN 0
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.483417781 +0000
+++ 0049-common-sfc_efx-base-update-MCDI-headers-for-MAE-priv.patch	2021-02-05 11:18:28.770690427 +0000
@@ -1 +1 @@
-From 1a9e1b7d2734a395269a4d5f8d7bbfc1b47b9ead Mon Sep 17 00:00:00 2001
+From f1e6d7e9cbde659e362ffeae76cbb2028db2c6b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1a9e1b7d2734a395269a4d5f8d7bbfc1b47b9ead ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: check for MAE privilege' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (47 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: update MCDI headers for MAE privilege' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' " luca.boccassi
                   ` (225 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andy Moreton, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From fd0e7135ccd69adf74aa3486cbdb52d2c3be98e7 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Fri, 11 Dec 2020 18:34:21 +0300
Subject: [PATCH] common/sfc_efx/base: check for MAE privilege

[ upstream commit be2f2be77ce2ee52cbc15ba4831152974990ac5c ]

VFs can't control MAE, so it's important to override the general
MAE capability bit by taking MAE privilege into account. Reorder
the code slightly to have the privileges queried before datapath
capabilities are discovered and add required MAE privilege check.

Fixes: eb4e80085fae ("common/sfc_efx/base: indicate support for MAE")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/ef10_nic.c | 48 ++++++++++++++++----------
 1 file changed, 29 insertions(+), 19 deletions(-)

diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c
index 68414d9fa9..9dccde9576 100644
--- a/drivers/common/sfc_efx/base/ef10_nic.c
+++ b/drivers/common/sfc_efx/base/ef10_nic.c
@@ -1423,11 +1423,19 @@ ef10_get_datapath_caps(
 
 #if EFSYS_OPT_MAE
 	/*
-	 * Indicate support for MAE.
-	 * MAE is supported by Riverhead boards starting with R2,
-	 * and it is required that FW is built with MAE support, too.
+	 * Check support for EF100 Match Action Engine (MAE).
+	 * MAE hardware is present on Riverhead boards (from R2),
+	 * and on Keystone, and requires support in firmware.
+	 *
+	 * MAE control operations require MAE control privilege,
+	 * which is not available for VFs.
+	 *
+	 * Privileges can change dynamically at runtime: we assume
+	 * MAE support requires the privilege is granted initially,
+	 * and ignore later dynamic changes.
 	 */
-	if (CAP_FLAGS3(req, MAE_SUPPORTED))
+	if (CAP_FLAGS3(req, MAE_SUPPORTED) &&
+	    EFX_MCDI_HAVE_PRIVILEGE(encp->enc_privilege_mask, MAE))
 		encp->enc_mae_supported = B_TRUE;
 	else
 		encp->enc_mae_supported = B_FALSE;
@@ -1896,6 +1904,18 @@ efx_mcdi_nic_board_cfg(
 
 	EFX_MAC_ADDR_COPY(encp->enc_mac_addr, mac_addr);
 
+	/*
+	 * Get the current privilege mask. Note that this may be modified
+	 * dynamically, so for most cases the value is informational only.
+	 * If the privilege being discovered can't be granted dynamically,
+	 * it's fine to rely on the value. In all other cases, DO NOT use
+	 * the privilege mask to check for sufficient privileges, as that
+	 * can result in time-of-check/time-of-use bugs.
+	 */
+	if ((rc = ef10_get_privilege_mask(enp, &mask)) != 0)
+		goto fail6;
+	encp->enc_privilege_mask = mask;
+
 	/* Board configuration (legacy) */
 	rc = efx_mcdi_get_board_cfg(enp, &board_type, NULL, NULL);
 	if (rc != 0) {
@@ -1903,14 +1923,14 @@ efx_mcdi_nic_board_cfg(
 		if (rc == EACCES)
 			board_type = 0;
 		else
-			goto fail6;
+			goto fail7;
 	}
 
 	encp->enc_board_type = board_type;
 
 	/* Fill out fields in enp->en_port and enp->en_nic_cfg from MCDI */
 	if ((rc = efx_mcdi_get_phy_cfg(enp)) != 0)
-		goto fail7;
+		goto fail8;
 
 	/*
 	 * Firmware with support for *_FEC capability bits does not
@@ -1929,18 +1949,18 @@ efx_mcdi_nic_board_cfg(
 
 	/* Obtain the default PHY advertised capabilities */
 	if ((rc = ef10_phy_get_link(enp, &els)) != 0)
-		goto fail8;
+		goto fail9;
 	epp->ep_default_adv_cap_mask = els.epls.epls_adv_cap_mask;
 	epp->ep_adv_cap_mask = els.epls.epls_adv_cap_mask;
 
 	/* Check capabilities of running datapath firmware */
 	if ((rc = ef10_get_datapath_caps(enp)) != 0)
-		goto fail9;
+		goto fail10;
 
 	/* Get interrupt vector limits */
 	if ((rc = efx_mcdi_get_vector_cfg(enp, &base, &nvec, NULL)) != 0) {
 		if (EFX_PCI_FUNCTION_IS_PF(encp))
-			goto fail10;
+			goto fail11;
 
 		/* Ignore error (cannot query vector limits from a VF). */
 		base = 0;
@@ -1949,16 +1969,6 @@ efx_mcdi_nic_board_cfg(
 	encp->enc_intr_vec_base = base;
 	encp->enc_intr_limit = nvec;
 
-	/*
-	 * Get the current privilege mask. Note that this may be modified
-	 * dynamically, so this value is informational only. DO NOT use
-	 * the privilege mask to check for sufficient privileges, as that
-	 * can result in time-of-check/time-of-use bugs.
-	 */
-	if ((rc = ef10_get_privilege_mask(enp, &mask)) != 0)
-		goto fail11;
-	encp->enc_privilege_mask = mask;
-
 	return (0);
 
 fail11:
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.543744906 +0000
+++ 0050-common-sfc_efx-base-check-for-MAE-privilege.patch	2021-02-05 11:18:28.774690503 +0000
@@ -1 +1 @@
-From be2f2be77ce2ee52cbc15ba4831152974990ac5c Mon Sep 17 00:00:00 2001
+From fd0e7135ccd69adf74aa3486cbdb52d2c3be98e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be2f2be77ce2ee52cbc15ba4831152974990ac5c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (48 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: check " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix memory leak in large VF' " luca.boccassi
                   ` (224 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From e97bb2a91151415c939cfeb9eff73c5724625408 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 11 Dec 2020 12:48:21 -0800
Subject: [PATCH] net/netvsc: ignore unsupported packet on sync command

[ upstream commit 0a4533facb49b0ca0d7520fee09270a82017e8fe ]

On netvsc initialization, the host VSP may send a NVS_TYPE_TXTBL_NOTE
packet while executing a VSP command synchronously.

Instead of returning an error, ignore this packet as we don't use it for
DPDK.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_nvs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index eeb82ab9ee..03b6cc1551 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -97,8 +97,13 @@ __hn_nvs_execute(struct hn_data *hv,
 	hdr = (struct hn_nvs_hdr *)buffer;
 
 	/* Silently drop received packets while waiting for response */
-	if (hdr->type == NVS_TYPE_RNDIS) {
+	switch (hdr->type) {
+	case NVS_TYPE_RNDIS:
 		hn_nvs_ack_rxbuf(chan, xactid);
+		/* fallthrough */
+
+	case NVS_TYPE_TXTBL_NOTE:
+		PMD_DRV_LOG(DEBUG, "discard packet type 0x%x", hdr->type);
 		goto retry;
 	}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.579464106 +0000
+++ 0051-net-netvsc-ignore-unsupported-packet-on-sync-command.patch	2021-02-05 11:18:28.774690503 +0000
@@ -1 +1 @@
-From 0a4533facb49b0ca0d7520fee09270a82017e8fe Mon Sep 17 00:00:00 2001
+From e97bb2a91151415c939cfeb9eff73c5724625408 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a4533facb49b0ca0d7520fee09270a82017e8fe ]
+
@@ -11,2 +12,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/iavf: fix memory leak in large VF' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (49 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: fix outer checksum flags' " luca.boccassi
                   ` (223 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Ting Xu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 2cbc61868038c0101d56587f6706d3cfd29e82f9 Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Mon, 14 Dec 2020 14:04:10 +0800
Subject: [PATCH] net/iavf: fix memory leak in large VF

[ upstream commit 20aa3a899ce0203d179cc5ea3bc5688193116a25 ]

This patch fixed the issue that the memory allocated for structure
virtchnl_del_ena_dis_queues is not released at the end of the functions
iavf_enable_queues_lv, iavf_disable_queues_lv and iavf_switch_queue_lv.

Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 33d03af653..c17ae06227 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -644,12 +644,12 @@ iavf_enable_queues_lv(struct iavf_adapter *adapter)
 	args.out_buffer = vf->aq_resp;
 	args.out_size = IAVF_AQ_BUF_SZ;
 	err = iavf_execute_vf_cmd(adapter, &args);
-	if (err) {
+	if (err)
 		PMD_DRV_LOG(ERR,
 			    "Failed to execute command of OP_ENABLE_QUEUES_V2");
-		return err;
-	}
-	return 0;
+
+	rte_free(queue_select);
+	return err;
 }
 
 int
@@ -688,12 +688,12 @@ iavf_disable_queues_lv(struct iavf_adapter *adapter)
 	args.out_buffer = vf->aq_resp;
 	args.out_size = IAVF_AQ_BUF_SZ;
 	err = iavf_execute_vf_cmd(adapter, &args);
-	if (err) {
+	if (err)
 		PMD_DRV_LOG(ERR,
 			    "Failed to execute command of OP_DISABLE_QUEUES_V2");
-		return err;
-	}
-	return 0;
+
+	rte_free(queue_select);
+	return err;
 }
 
 int
@@ -737,6 +737,8 @@ iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid,
 	if (err)
 		PMD_DRV_LOG(ERR, "Failed to execute command of %s",
 			    on ? "OP_ENABLE_QUEUES_V2" : "OP_DISABLE_QUEUES_V2");
+
+	rte_free(queue_select);
 	return err;
 }
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.616492707 +0000
+++ 0052-net-iavf-fix-memory-leak-in-large-VF.patch	2021-02-05 11:18:28.774690503 +0000
@@ -1 +1 @@
-From 20aa3a899ce0203d179cc5ea3bc5688193116a25 Mon Sep 17 00:00:00 2001
+From 2cbc61868038c0101d56587f6706d3cfd29e82f9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 20aa3a899ce0203d179cc5ea3bc5688193116a25 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice: fix outer checksum flags' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (50 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix memory leak in large VF' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix Direct Verbs flow descriptor allocation' " luca.boccassi
                   ` (222 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/482a49615e6417abd8a1ffa69d861b4783a249b4

Thanks.

Luca Boccassi

---
From 482a49615e6417abd8a1ffa69d861b4783a249b4 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Tue, 15 Dec 2020 08:10:52 +0000
Subject: [PATCH] net/ice: fix outer checksum flags

[ upstream commit 75c6287f250f2ee1f8b3dcfac66ef17376f46149 ]

When received tunneled packets, the testpmd output log shows 'ol_flags'
value always is 'PKT_RX_OUTER_L4_CKSUM_UNKNOWN', but expected value is
'PKT_RX_OUTER_L4_CKSUM_GOOD' or 'PKT_RX_OUTER_L4_CKSUM_BAD'.

Add the 'PKT_RX_OUTER_L4_CKSUM_GOOD' and 'PKT_RX_OUTER_L4_CKSUM_BAD' to
'flags' for normal path, 'l3_l4_flags_shuf' for AVX2 and AVX512 vector
path and 'cksum_flags' for SSE vector path to ensure that the 'ol_flags'
can match correct flags.

Fixes: dbf3c0e77a22 ("net/ice: handle Rx flex descriptor")
Fixes: 4ab7dbb0a0f6 ("net/ice: switch to Rx flexible descriptor in AVX path")
Fixes: ece1f8a8f1c8 ("net/ice: switch to flexible descriptor in SSE path")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c            |   5 ++
 drivers/net/ice/ice_rxtx_vec_avx2.c   | 118 +++++++++++++++++++-------
 drivers/net/ice/ice_rxtx_vec_avx512.c | 117 ++++++++++++++++++-------
 drivers/net/ice/ice_rxtx_vec_sse.c    |  78 ++++++++++++-----
 4 files changed, 233 insertions(+), 85 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 9769e216bf..d052bd0f1b 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1451,6 +1451,11 @@ ice_rxd_error_to_pkt_flags(uint16_t stat_err0)
 	if (unlikely(stat_err0 & (1 << ICE_RX_FLEX_DESC_STATUS0_XSUM_EIPE_S)))
 		flags |= PKT_RX_EIP_CKSUM_BAD;
 
+	if (unlikely(stat_err0 & (1 << ICE_RX_FLEX_DESC_STATUS0_XSUM_EUDPE_S)))
+		flags |= PKT_RX_OUTER_L4_CKSUM_BAD;
+	else
+		flags |= PKT_RX_OUTER_L4_CKSUM_GOOD;
+
 	return flags;
 }
 
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index b72a9e7025..7838e17787 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -251,43 +251,88 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	 * bit13 is for VLAN indication.
 	 */
 	const __m256i flags_mask =
-		 _mm256_set1_epi32((7 << 4) | (1 << 12) | (1 << 13));
+		 _mm256_set1_epi32((0xF << 4) | (1 << 12) | (1 << 13));
 	/**
 	 * data to be shuffled by the result of the flags mask shifted by 4
 	 * bits.  This gives use the l3_l4 flags.
 	 */
-	const __m256i l3_l4_flags_shuf = _mm256_set_epi8(0, 0, 0, 0, 0, 0, 0, 0,
-			/* shift right 1 bit to make sure it not exceed 255 */
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
-			/* second 128-bits */
-			0, 0, 0, 0, 0, 0, 0, 0,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1);
+	const __m256i l3_l4_flags_shuf =
+		_mm256_set_epi8((PKT_RX_OUTER_L4_CKSUM_BAD >> 20 |
+		 PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
+		  PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		/**
+		 * second 128-bits
+		 * shift right 20 bits to use the low two bits to indicate
+		 * outer checksum status
+		 * shift right 1 bit to make sure it not exceed 255
+		 */
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1);
 	const __m256i cksum_mask =
-		 _mm256_set1_epi32(PKT_RX_IP_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD |
-				   PKT_RX_L4_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD |
-				   PKT_RX_EIP_CKSUM_BAD);
+		 _mm256_set1_epi32(PKT_RX_IP_CKSUM_MASK |
+				   PKT_RX_L4_CKSUM_MASK |
+				   PKT_RX_EIP_CKSUM_BAD |
+				   PKT_RX_OUTER_L4_CKSUM_MASK);
 	/**
 	 * data to be shuffled by result of flag mask, shifted down 12.
 	 * If RSS(bit12)/VLAN(bit13) are set,
@@ -469,6 +514,15 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		__m256i l3_l4_flags = _mm256_shuffle_epi8(l3_l4_flags_shuf,
 				_mm256_srli_epi32(flag_bits, 4));
 		l3_l4_flags = _mm256_slli_epi32(l3_l4_flags, 1);
+
+		__m256i l4_outer_mask = _mm256_set1_epi32(0x6);
+		__m256i l4_outer_flags =
+				_mm256_and_si256(l3_l4_flags, l4_outer_mask);
+		l4_outer_flags = _mm256_slli_epi32(l4_outer_flags, 20);
+
+		__m256i l3_l4_mask = _mm256_set1_epi32(~0x6);
+		l3_l4_flags = _mm256_and_si256(l3_l4_flags, l3_l4_mask);
+		l3_l4_flags = _mm256_or_si256(l3_l4_flags, l4_outer_flags);
 		l3_l4_flags = _mm256_and_si256(l3_l4_flags, cksum_mask);
 		/* set rss and vlan flags */
 		const __m256i rss_vlan_flag_bits =
diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c
index df5d2be1e6..fd5d724329 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx512.c
@@ -230,43 +230,88 @@ _ice_recv_raw_pkts_vec_avx512(struct ice_rx_queue *rxq,
 	 * bit13 is for VLAN indication.
 	 */
 	const __m256i flags_mask =
-		 _mm256_set1_epi32((7 << 4) | (1 << 12) | (1 << 13));
+		 _mm256_set1_epi32((0xF << 4) | (1 << 12) | (1 << 13));
 	/**
 	 * data to be shuffled by the result of the flags mask shifted by 4
 	 * bits.  This gives use the l3_l4 flags.
 	 */
-	const __m256i l3_l4_flags_shuf = _mm256_set_epi8(0, 0, 0, 0, 0, 0, 0, 0,
-			/* shift right 1 bit to make sure it not exceed 255 */
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
-			/* 2nd 128-bits */
-			0, 0, 0, 0, 0, 0, 0, 0,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1);
+	const __m256i l3_l4_flags_shuf =
+		_mm256_set_epi8((PKT_RX_OUTER_L4_CKSUM_BAD >> 20 |
+		 PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
+		  PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		/**
+		 * second 128-bits
+		 * shift right 20 bits to use the low two bits to indicate
+		 * outer checksum status
+		 * shift right 1 bit to make sure it not exceed 255
+		 */
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD  |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1);
 	const __m256i cksum_mask =
-		 _mm256_set1_epi32(PKT_RX_IP_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD |
-				   PKT_RX_L4_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD |
-				   PKT_RX_EIP_CKSUM_BAD);
+		 _mm256_set1_epi32(PKT_RX_IP_CKSUM_MASK |
+				   PKT_RX_L4_CKSUM_MASK |
+				   PKT_RX_EIP_CKSUM_BAD |
+				   PKT_RX_OUTER_L4_CKSUM_MASK);
 	/**
 	 * data to be shuffled by result of flag mask, shifted down 12.
 	 * If RSS(bit12)/VLAN(bit13) are set,
@@ -451,6 +496,14 @@ _ice_recv_raw_pkts_vec_avx512(struct ice_rx_queue *rxq,
 		__m256i l3_l4_flags = _mm256_shuffle_epi8(l3_l4_flags_shuf,
 				_mm256_srli_epi32(flag_bits, 4));
 		l3_l4_flags = _mm256_slli_epi32(l3_l4_flags, 1);
+		__m256i l4_outer_mask = _mm256_set1_epi32(0x6);
+		__m256i l4_outer_flags =
+				_mm256_and_si256(l3_l4_flags, l4_outer_mask);
+		l4_outer_flags = _mm256_slli_epi32(l4_outer_flags, 20);
+
+		__m256i l3_l4_mask = _mm256_set1_epi32(~0x6);
+		l3_l4_flags = _mm256_and_si256(l3_l4_flags, l3_l4_mask);
+		l3_l4_flags = _mm256_or_si256(l3_l4_flags, l4_outer_flags);
 		l3_l4_flags = _mm256_and_si256(l3_l4_flags, cksum_mask);
 		/* set rss and vlan flags */
 		const __m256i rss_vlan_flag_bits =
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index 626364719b..87e0c3db2e 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -114,39 +114,67 @@ ice_rx_desc_to_olflags_v(struct ice_rx_queue *rxq, __m128i descs[4],
 	 * bit12 for RSS indication.
 	 * bit13 for VLAN indication.
 	 */
-	const __m128i desc_mask = _mm_set_epi32(0x3070, 0x3070,
-						0x3070, 0x3070);
-
+	const __m128i desc_mask = _mm_set_epi32(0x30f0, 0x30f0,
+						0x30f0, 0x30f0);
 	const __m128i cksum_mask = _mm_set_epi32(PKT_RX_IP_CKSUM_MASK |
 						 PKT_RX_L4_CKSUM_MASK |
+						 PKT_RX_OUTER_L4_CKSUM_MASK |
 						 PKT_RX_EIP_CKSUM_BAD,
 						 PKT_RX_IP_CKSUM_MASK |
 						 PKT_RX_L4_CKSUM_MASK |
+						 PKT_RX_OUTER_L4_CKSUM_MASK |
 						 PKT_RX_EIP_CKSUM_BAD,
 						 PKT_RX_IP_CKSUM_MASK |
 						 PKT_RX_L4_CKSUM_MASK |
+						 PKT_RX_OUTER_L4_CKSUM_MASK |
 						 PKT_RX_EIP_CKSUM_BAD,
 						 PKT_RX_IP_CKSUM_MASK |
 						 PKT_RX_L4_CKSUM_MASK |
+						 PKT_RX_OUTER_L4_CKSUM_MASK |
 						 PKT_RX_EIP_CKSUM_BAD);
 
 	/* map the checksum, rss and vlan fields to the checksum, rss
 	 * and vlan flag
 	 */
-	const __m128i cksum_flags = _mm_set_epi8(0, 0, 0, 0, 0, 0, 0, 0,
-			/* shift right 1 bit to make sure it not exceed 255 */
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
-			 PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1);
+	const __m128i cksum_flags =
+		_mm_set_epi8((PKT_RX_OUTER_L4_CKSUM_BAD >> 20 |
+		 PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
+		  PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_BAD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		/**
+		 * shift right 20 bits to use the low two bits to indicate
+		 * outer checksum status
+		 * shift right 1 bit to make sure it not exceed 255
+		 */
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_EIP_CKSUM_BAD |
+		 PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_BAD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_BAD) >> 1,
+		(PKT_RX_OUTER_L4_CKSUM_GOOD >> 20 | PKT_RX_L4_CKSUM_GOOD |
+		 PKT_RX_IP_CKSUM_GOOD) >> 1);
 
 	const __m128i rss_vlan_flags = _mm_set_epi8(0, 0, 0, 0,
 			0, 0, 0, 0,
@@ -166,6 +194,14 @@ ice_rx_desc_to_olflags_v(struct ice_rx_queue *rxq, __m128i descs[4],
 	flags = _mm_shuffle_epi8(cksum_flags, tmp_desc);
 	/* then we shift left 1 bit */
 	flags = _mm_slli_epi32(flags, 1);
+
+	__m128i l4_outer_mask = _mm_set_epi32(0x6, 0x6, 0x6, 0x6);
+	__m128i l4_outer_flags = _mm_and_si128(flags, l4_outer_mask);
+	l4_outer_flags = _mm_slli_epi32(l4_outer_flags, 20);
+
+	__m128i l3_l4_mask = _mm_set_epi32(~0x6, ~0x6, ~0x6, ~0x6);
+	__m128i l3_l4_flags = _mm_and_si128(flags, l3_l4_mask);
+	flags = _mm_or_si128(l3_l4_flags, l4_outer_flags);
 	/* we need to mask out the reduntant bits introduced by RSS or
 	 * VLAN fields.
 	 */
@@ -217,10 +253,10 @@ ice_rx_desc_to_olflags_v(struct ice_rx_queue *rxq, __m128i descs[4],
 	 * appropriate flags means that we have to do a shift and blend for
 	 * each mbuf before we do the write.
 	 */
-	rearm0 = _mm_blend_epi16(mbuf_init, _mm_slli_si128(flags, 8), 0x10);
-	rearm1 = _mm_blend_epi16(mbuf_init, _mm_slli_si128(flags, 4), 0x10);
-	rearm2 = _mm_blend_epi16(mbuf_init, flags, 0x10);
-	rearm3 = _mm_blend_epi16(mbuf_init, _mm_srli_si128(flags, 4), 0x10);
+	rearm0 = _mm_blend_epi16(mbuf_init, _mm_slli_si128(flags, 8), 0x30);
+	rearm1 = _mm_blend_epi16(mbuf_init, _mm_slli_si128(flags, 4), 0x30);
+	rearm2 = _mm_blend_epi16(mbuf_init, flags, 0x30);
+	rearm3 = _mm_blend_epi16(mbuf_init, _mm_srli_si128(flags, 4), 0x30);
 
 	/* write the rearm data and the olflags in one write */
 	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.656378221 +0000
+++ 0053-net-ice-fix-outer-checksum-flags.patch	2021-02-05 11:18:28.778690579 +0000
@@ -1 +1 @@
-From 75c6287f250f2ee1f8b3dcfac66ef17376f46149 Mon Sep 17 00:00:00 2001
+From 482a49615e6417abd8a1ffa69d861b4783a249b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75c6287f250f2ee1f8b3dcfac66ef17376f46149 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix Direct Verbs flow descriptor allocation' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (51 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: fix outer checksum flags' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix mbuf freeing in vectorized MPRQ' " luca.boccassi
                   ` (221 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ac07d94045b17b52ae9048804b2cbe81432e55aa Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 8 Dec 2020 10:17:05 +0200
Subject: [PATCH] net/mlx5: fix Direct Verbs flow descriptor allocation

[ upstream commit 3ab5a3a7acafdf35ad4b8b1e7805ce7663c786c6 ]

Initialize flow descriptor tunnel member during flow creation.
Prevent access to stale data and pointers when flow descriptor is
reallocated after release.
Fix flow index validation.

Fixes: e7bfa3596a0a ("net/mlx5: separate the flow handle resource")
Fixes: 8bb81f2649b1 ("net/mlx5: use thread specific flow workspace")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e9badb800e..f61943f193 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6232,8 +6232,9 @@ flow_dv_prepare(struct rte_eth_dev *dev,
 				   "not enough memory to create flow handle");
 		return NULL;
 	}
-	MLX5_ASSERT(wks->flow_idx + 1 < RTE_DIM(wks->flows));
+	MLX5_ASSERT(wks->flow_idx < RTE_DIM(wks->flows));
 	dev_flow = &wks->flows[wks->flow_idx++];
+	memset(dev_flow, 0, sizeof(*dev_flow));
 	dev_flow->handle = dev_handle;
 	dev_flow->handle_idx = handle_idx;
 	/*
@@ -6245,12 +6246,6 @@ flow_dv_prepare(struct rte_eth_dev *dev,
 	 */
 	dev_flow->dv.value.size = MLX5_ST_SZ_BYTES(fte_match_param) -
 				  MLX5_ST_SZ_BYTES(fte_match_set_misc4);
-	/*
-	 * The matching value needs to be cleared to 0 before using. In the
-	 * past, it will be automatically cleared when using rte_*alloc
-	 * API. The time consumption will be almost the same as before.
-	 */
-	memset(dev_flow->dv.value.buf, 0, MLX5_ST_SZ_BYTES(fte_match_param));
 	dev_flow->ingress = attr->ingress;
 	dev_flow->dv.transfer = attr->transfer;
 	return dev_flow;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.697864897 +0000
+++ 0054-net-mlx5-fix-Direct-Verbs-flow-descriptor-allocation.patch	2021-02-05 11:18:28.790690807 +0000
@@ -1 +1 @@
-From 3ab5a3a7acafdf35ad4b8b1e7805ce7663c786c6 Mon Sep 17 00:00:00 2001
+From ac07d94045b17b52ae9048804b2cbe81432e55aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ab5a3a7acafdf35ad4b8b1e7805ce7663c786c6 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c31737652c..7c2b389c63 100644
+index e9badb800e..f61943f193 100644
@@ -25 +26 @@
-@@ -6230,8 +6230,9 @@ flow_dv_prepare(struct rte_eth_dev *dev,
+@@ -6232,8 +6232,9 @@ flow_dv_prepare(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -6243,12 +6244,6 @@ flow_dv_prepare(struct rte_eth_dev *dev,
+@@ -6245,12 +6246,6 @@ flow_dv_prepare(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix mbuf freeing in vectorized MPRQ' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (52 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix Direct Verbs flow descriptor allocation' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix buffer split offload advertising' " luca.boccassi
                   ` (220 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 3d5ab0eacb07440b78317e8b09c12fde83bb3954 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Thu, 10 Dec 2020 15:14:23 +0000
Subject: [PATCH] net/mlx5: fix mbuf freeing in vectorized MPRQ

[ upstream commit ac340e1fe5fdaa6cd3ed90feaf5443a3c906e2ff ]

Wrong index is used to find mbufs belonging to an application in
the rxq_free_elts_sprq() function in the case of vectorized MPRQ.
elts_ci points to the last allocated mbuf in this case, not rq_ci.
Use this field to avoid double free of mbuf and segmentation fault.

Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index da7a8b3cd7..114f75b42b 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -346,7 +346,9 @@ rxq_free_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
 		(1 << rxq->elts_n) * (1 << rxq->strd_num_n) :
 		(1 << rxq->elts_n);
 	const uint16_t q_mask = q_n - 1;
-	uint16_t used = q_n - (rxq->rq_ci - rxq->rq_pi);
+	uint16_t elts_ci = mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq) ?
+		rxq->elts_ci : rxq->rq_ci;
+	uint16_t used = q_n - (elts_ci - rxq->rq_pi);
 	uint16_t i;
 
 	DRV_LOG(DEBUG, "port %u Rx queue %u freeing %d WRs",
@@ -359,8 +361,8 @@ rxq_free_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
 	 */
 	if (mlx5_rxq_check_vec_support(rxq) > 0) {
 		for (i = 0; i < used; ++i)
-			(*rxq->elts)[(rxq->rq_ci + i) & q_mask] = NULL;
-		rxq->rq_pi = rxq->rq_ci;
+			(*rxq->elts)[(elts_ci + i) & q_mask] = NULL;
+		rxq->rq_pi = elts_ci;
 	}
 	for (i = 0; i != q_n; ++i) {
 		if ((*rxq->elts)[i] != NULL)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.756034873 +0000
+++ 0055-net-mlx5-fix-mbuf-freeing-in-vectorized-MPRQ.patch	2021-02-05 11:18:28.790690807 +0000
@@ -1 +1 @@
-From ac340e1fe5fdaa6cd3ed90feaf5443a3c906e2ff Mon Sep 17 00:00:00 2001
+From 3d5ab0eacb07440b78317e8b09c12fde83bb3954 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac340e1fe5fdaa6cd3ed90feaf5443a3c906e2ff ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix buffer split offload advertising' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (53 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix mbuf freeing in vectorized MPRQ' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: fix PCI address comparison on non-PCI ports' " luca.boccassi
                   ` (219 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Asaf Penso, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/68a10f5e5acb13cd68102f4cef4b4f80350695e4

Thanks.

Luca Boccassi

---
From 68a10f5e5acb13cd68102f4cef4b4f80350695e4 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 11 Dec 2020 11:44:52 +0000
Subject: [PATCH] net/mlx5: fix buffer split offload advertising

[ upstream commit ddb0384346be3e1a0f0f478831b3c5f4adc20be9 ]

The buffer split Rx offload is not compatible with Multi-Packet
Receiving Queue (MPRQ) Rx offload, hence, the buffer split
offload flag RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT and other related
values should be advertised only if there is no MPRQ engaged.

Fixes: 6c8f7f1c1877 ("net/mlx5: report Rx buffer split capabilities")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Asaf Penso <asafp@nvidia.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 4 ++--
 drivers/net/mlx5/mlx5_rxq.c    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index a3910cf922..45ee7e4488 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -310,8 +310,8 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->max_mac_addrs = MLX5_MAX_UC_MAC_ADDRESSES;
 	info->rx_queue_offload_capa = mlx5_get_rx_queue_offloads(dev);
 	info->rx_seg_capa.max_nseg = MLX5_MAX_RXQ_NSEG;
-	info->rx_seg_capa.multi_pools = 1;
-	info->rx_seg_capa.offset_allowed = 1;
+	info->rx_seg_capa.multi_pools = !config->mprq.enabled;
+	info->rx_seg_capa.offset_allowed = !config->mprq.enabled;
 	info->rx_seg_capa.offset_align_log2 = 0;
 	info->rx_offload_capa = (mlx5_get_rx_port_offloads() |
 				 info->rx_queue_offload_capa);
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 114f75b42b..4d788788e1 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -404,14 +404,14 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_dev_config *config = &priv->config;
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
-			     RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
 			     DEV_RX_OFFLOAD_JUMBO_FRAME |
 			     DEV_RX_OFFLOAD_RSS_HASH);
 
+	if (!config->mprq.enabled)
+		offloads |= RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT;
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
-
 	if (config->hw_csum)
 		offloads |= (DEV_RX_OFFLOAD_IPV4_CKSUM |
 			     DEV_RX_OFFLOAD_UDP_CKSUM |
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.797285479 +0000
+++ 0056-net-mlx5-fix-buffer-split-offload-advertising.patch	2021-02-05 11:18:28.794690883 +0000
@@ -1 +1 @@
-From ddb0384346be3e1a0f0f478831b3c5f4adc20be9 Mon Sep 17 00:00:00 2001
+From 68a10f5e5acb13cd68102f4cef4b4f80350695e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ddb0384346be3e1a0f0f478831b3c5f4adc20be9 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bonding: fix PCI address comparison on non-PCI ports' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (54 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix buffer split offload advertising' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix stats counters' " luca.boccassi
                   ` (218 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a58c0ccd1bd9f7f0ca09524903fb6f2847b76421 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Fri, 17 Apr 2020 18:42:07 +0200
Subject: [PATCH] net/bonding: fix PCI address comparison on non-PCI ports

[ upstream commit 3b37cc0c28f3d01ced424e72641aa63f494899b1 ]

The bonding PMD will iterate over all available ETH ports and for each,
compare a chunk of bytes at an offset that would correspond to the PCI
address in an rte_pci_device.

This is incorrect and unsafe. Also, the rte_device using this PCI
address is already found, no need to compare again the PCI address of
all eth devices.

Refactoring the code to fix this, the initial check to find the PCI bus
is out of scope.

Fixes: c848b518bbc7 ("net/bonding: support bifurcated driver in eal")

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 58 +++++++++++--------------
 1 file changed, 25 insertions(+), 33 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 35616fb8bc..8c5f90dc63 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -22,23 +22,37 @@ const char *pmd_bond_init_valid_arguments[] = {
 	NULL
 };
 
+static inline int
+bond_pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
+{
+	const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev);
+	const struct rte_pci_addr *paddr = _pci_addr;
+
+	return rte_pci_addr_cmp(&pdev->addr, paddr);
+}
+
 static inline int
 find_port_id_by_pci_addr(const struct rte_pci_addr *pci_addr)
 {
-	struct rte_pci_device *pci_dev;
-	struct rte_pci_addr *eth_pci_addr;
+	struct rte_bus *pci_bus;
+	struct rte_device *dev;
 	unsigned i;
 
-	RTE_ETH_FOREACH_DEV(i) {
-		pci_dev = RTE_ETH_DEV_TO_PCI(&rte_eth_devices[i]);
-		eth_pci_addr = &pci_dev->addr;
+	pci_bus = rte_bus_find_by_name("pci");
+	if (pci_bus == NULL) {
+		RTE_BOND_LOG(ERR, "No PCI bus found");
+		return -1;
+	}
 
-		if (pci_addr->bus == eth_pci_addr->bus &&
-			pci_addr->devid == eth_pci_addr->devid &&
-			pci_addr->domain == eth_pci_addr->domain &&
-			pci_addr->function == eth_pci_addr->function)
+	dev = pci_bus->find_device(NULL, bond_pci_addr_cmp, pci_addr);
+	if (dev == NULL) {
+		RTE_BOND_LOG(ERR, "unable to find PCI device");
+		return -1;
+	}
+
+	RTE_ETH_FOREACH_DEV(i)
+		if (rte_eth_devices[i].device == dev)
 			return i;
-	}
 	return -1;
 }
 
@@ -57,15 +71,6 @@ find_port_id_by_dev_name(const char *name)
 	return -1;
 }
 
-static inline int
-bond_pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
-{
-	const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev);
-	const struct rte_pci_addr *paddr = _pci_addr;
-
-	return rte_pci_addr_cmp(&pdev->addr, paddr);
-}
-
 /**
  * Parses a port identifier string to a port id by pci address, then by name,
  * and finally port id.
@@ -74,23 +79,10 @@ static inline int
 parse_port_id(const char *port_str)
 {
 	struct rte_pci_addr dev_addr;
-	struct rte_bus *pci_bus;
-	struct rte_device *dev;
 	int port_id;
 
-	pci_bus = rte_bus_find_by_name("pci");
-	if (pci_bus == NULL) {
-		RTE_BOND_LOG(ERR, "unable to find PCI bus\n");
-		return -1;
-	}
-
 	/* try parsing as pci address, physical devices */
-	if (pci_bus->parse(port_str, &dev_addr) == 0) {
-		dev = pci_bus->find_device(NULL, bond_pci_addr_cmp, &dev_addr);
-		if (dev == NULL) {
-			RTE_BOND_LOG(ERR, "unable to find PCI device");
-			return -1;
-		}
+	if (rte_pci_addr_parse(port_str, &dev_addr) == 0) {
 		port_id = find_port_id_by_pci_addr(&dev_addr);
 		if (port_id < 0)
 			return -1;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.839169226 +0000
+++ 0057-net-bonding-fix-PCI-address-comparison-on-non-PCI-po.patch	2021-02-05 11:18:28.794690883 +0000
@@ -1 +1 @@
-From 3b37cc0c28f3d01ced424e72641aa63f494899b1 Mon Sep 17 00:00:00 2001
+From a58c0ccd1bd9f7f0ca09524903fb6f2847b76421 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b37cc0c28f3d01ced424e72641aa63f494899b1 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix stats counters' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (55 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: fix PCI address comparison on non-PCI ports' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'doc: fix some statements for ice vector PMD' " luca.boccassi
                   ` (217 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/935edd8d9578f59e2970c68936cf50474faa8227

Thanks.

Luca Boccassi

---
From 935edd8d9578f59e2970c68936cf50474faa8227 Mon Sep 17 00:00:00 2001
From: Igor Ryzhov <iryzhov@nfware.com>
Date: Tue, 17 Nov 2020 11:56:39 +0300
Subject: [PATCH] net/i40e: fix stats counters

[ upstream commit d8d652ec7266d9ea4c8763d4a71a2c7853b9c23b ]

When low and high registers are read separately, this opens the door to
a race condition:
- low register is read
- NIC updates the registers
- high register is read

Because of this, we may end up with an incorrect counter value.
Let's read the registers in one shot, as it is done in Linux kernel
since the introduction of the i40e driver.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_osdep.h | 10 ++++++++++
 drivers/net/i40e/i40e_ethdev.c     | 10 +++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 9b5033024f..c9287ff255 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -133,6 +133,14 @@ static inline uint32_t i40e_read_addr(volatile void *addr)
 	return rte_le_to_cpu_32(I40E_PCI_REG(addr));
 }
 
+#define I40E_PCI_REG64(reg)		rte_read64(reg)
+#define I40E_PCI_REG64_ADDR(a, reg) \
+	((volatile uint64_t *)((char *)(a)->hw_addr + (reg)))
+static inline uint64_t i40e_read64_addr(volatile void *addr)
+{
+	return rte_le_to_cpu_64(I40E_PCI_REG64(addr));
+}
+
 #define I40E_PCI_REG_WRITE(reg, value)		\
 	rte_write32((rte_cpu_to_le_32(value)), reg)
 #define I40E_PCI_REG_WRITE_RELAXED(reg, value)	\
@@ -150,6 +158,8 @@ static inline uint32_t i40e_read_addr(volatile void *addr)
 #define I40E_WRITE_REG(hw, reg, value) \
 	I40E_PCI_REG_WRITE(I40E_PCI_REG_ADDR((hw), (reg)), (value))
 
+#define I40E_READ_REG64(hw, reg) i40e_read64_addr(I40E_PCI_REG64_ADDR((hw), (reg)))
+
 #define rd32(a, reg) i40e_read_addr(I40E_PCI_REG_ADDR((a), (reg)))
 #define wr32(a, reg, value) \
 	I40E_PCI_REG_WRITE(I40E_PCI_REG_ADDR((a), (reg)), (value))
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2cb18ecc03..7f9bba4052 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6620,9 +6620,13 @@ i40e_stat_update_48(struct i40e_hw *hw,
 {
 	uint64_t new_data;
 
-	new_data = (uint64_t)I40E_READ_REG(hw, loreg);
-	new_data |= ((uint64_t)(I40E_READ_REG(hw, hireg) &
-			I40E_16_BIT_MASK)) << I40E_32_BIT_WIDTH;
+	if (hw->device_id == I40E_DEV_ID_QEMU) {
+		new_data = (uint64_t)I40E_READ_REG(hw, loreg);
+		new_data |= ((uint64_t)(I40E_READ_REG(hw, hireg) &
+				I40E_16_BIT_MASK)) << I40E_32_BIT_WIDTH;
+	} else {
+		new_data = I40E_READ_REG64(hw, loreg);
+	}
 
 	if (!offset_loaded)
 		*offset = new_data;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.880440689 +0000
+++ 0058-net-i40e-fix-stats-counters.patch	2021-02-05 11:18:28.802691036 +0000
@@ -1 +1 @@
-From d8d652ec7266d9ea4c8763d4a71a2c7853b9c23b Mon Sep 17 00:00:00 2001
+From 935edd8d9578f59e2970c68936cf50474faa8227 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d8d652ec7266d9ea4c8763d4a71a2c7853b9c23b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'doc: fix some statements for ice vector PMD' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (56 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix stats counters' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' " luca.boccassi
                   ` (216 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Leyi Rong, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/47e1440e2e9ee47b3b74d835f43a71fd7c93a357

Thanks.

Luca Boccassi

---
From 47e1440e2e9ee47b3b74d835f43a71fd7c93a357 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 16 Dec 2020 08:21:58 +0800
Subject: [PATCH] doc: fix some statements for ice vector PMD

[ upstream commit c2e129698dd6c03a598be3084abffb38ab0c801c ]

1. Add descriptions for how to select avx512 datapath.
2. Add explanation for "P" in ice.ini.

Fixes: 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")
Fixes: 271cc8c5028a ("doc: update ice features list")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Leyi Rong <leyi.rong@intel.com>
---
 doc/guides/nics/ice.rst | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index a0887f129f..ccda26f82f 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -211,9 +211,12 @@ are chosen based on 2 conditions.
 - ``CPU``
   On the X86 platform, the driver checks if the CPU supports AVX2.
   If it's supported, AVX2 paths will be chosen. If not, SSE is chosen.
+  If the CPU supports AVX512 and EAL argument ``--force-max-simd-bitwidth``
+  is set to 512, AVX512 paths will be chosen.
 
 - ``Offload features``
-  The supported HW offload features are described in the document ice_vec.ini.
+  The supported HW offload features are described in the document ice.ini,
+  A value "P" means the offload feature is not supported by vector path.
   If any not supported features are used, ICE vector PMD is disabled and the
   normal paths are chosen.
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.935038170 +0000
+++ 0059-doc-fix-some-statements-for-ice-vector-PMD.patch	2021-02-05 11:18:28.802691036 +0000
@@ -1 +1 @@
-From c2e129698dd6c03a598be3084abffb38ab0c801c Mon Sep 17 00:00:00 2001
+From 47e1440e2e9ee47b3b74d835f43a71fd7c93a357 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c2e129698dd6c03a598be3084abffb38ab0c801c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (57 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'doc: fix some statements for ice vector PMD' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' " luca.boccassi
                   ` (215 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Souvik Dey; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From b9b4af40296d5235615ada1d794991f69851d4b5 Mon Sep 17 00:00:00 2001
From: Souvik Dey <sodey@rbbn.com>
Date: Tue, 15 Dec 2020 08:28:15 -0500
Subject: [PATCH] net/i40e: fix VLAN stripping in VF

[ upstream commit 95ba3f72110c10dd51517d6544be64854c5a1208 ]

When VF adds VLAN, Linux PF driver enables VLAN stripping by default,
this might have issues if the app configured DEV_RX_OFFLOAD_VLAN_STRIP.

This behavior of the Linux driver causes confusion with the DPDK app
using i40e_pmd. So it is better to reconfigure the vlan_offload, which
checks for DEV_RX_OFFLOAD_VLAN_STRIP flag in the dev_conf and enables or
disables the vlan strip in the PF.

Application cannot use rte_eth_dev_set_vlan_offload() to set
the VLAN_STRIP, as this will only work for the first time when
original and current config mismatch, but for all subsequent call
it will be ignored.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Souvik Dey <sodey@rbbn.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index c26b036b85..2faee1d7e1 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1078,8 +1078,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid)
 	args.out_buffer = vf->aq_resp;
 	args.out_size = I40E_AQ_BUF_SZ;
 	err = i40evf_execute_vf_cmd(dev, &args);
-	if (err)
+	if (err) {
 		PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN");
+		return err;
+	}
+	/**
+	 * In linux kernel driver on receiving ADD_VLAN it enables
+	 * VLAN_STRIP by default. So reconfigure the vlan_offload
+	 * as it was done by the app earlier.
+	 */
+	err = i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+	if (err)
+		PMD_DRV_LOG(ERR, "fail to set vlan_strip");
 
 	return err;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.976675158 +0000
+++ 0060-net-i40e-fix-VLAN-stripping-in-VF.patch	2021-02-05 11:18:28.802691036 +0000
@@ -1 +1 @@
-From 95ba3f72110c10dd51517d6544be64854c5a1208 Mon Sep 17 00:00:00 2001
+From b9b4af40296d5235615ada1d794991f69851d4b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95ba3f72110c10dd51517d6544be64854c5a1208 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (58 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' " luca.boccassi
                   ` (214 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Jun W Zhou, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/85b6748f06dd7f448311e489286a62a98da8dbdb

Thanks.

Luca Boccassi

---
From 85b6748f06dd7f448311e489286a62a98da8dbdb Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Tue, 15 Dec 2020 18:10:31 +0800
Subject: [PATCH] net/ixgbe: fix flex bytes flow director rule

[ upstream commit 06cad275fecf4e1892b076796065942cdc1ef44e ]

When a flexbytes flow director rule is created, the FDIRCTRL.FLEX_OFFSET
register is set, and it keeps its affect even after the flow director
flexbytes rule is destroyed, causing packets to be transferred to the
wrong place.

It is because setting FDIRCTRL shall only be permitted on Flow Director
initialization flow or clearing the Flow Director table according to the
datasheet, otherwise device may behave unexpectedly.

In order to evade this limitation, simulate the Flow Director
initialization flow or clearing the Flow Director table by setting
FDIRCMD.CLEARHT to 0x1B and then clear it back to 0x0B.

Fixes: f35fec63dde1 ("net/ixgbe: enable flex bytes for generic flow API")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_fdir.c | 29 +++++++++++++++++++++++++++++
 drivers/net/ixgbe/ixgbe_flow.c | 15 ++++++++-------
 2 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index a0fab5070d..11b9effeba 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -503,9 +503,30 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
 				uint16_t offset)
 {
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct ixgbe_hw_fdir_info *fdir_info =
+		IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
 	uint32_t fdirctrl;
 	int i;
 
+	if (fdir_info->flex_bytes_offset == offset)
+		return 0;
+
+	/**
+	 * 82599 adapters flow director init flow cannot be restarted,
+	 * Workaround 82599 silicon errata by performing the following steps
+	 * before re-writing the FDIRCTRL control register with the same value.
+	 * - write 1 to bit 8 of FDIRCMD register &
+	 * - write 0 to bit 8 of FDIRCMD register
+	 */
+	IXGBE_WRITE_REG(hw, IXGBE_FDIRCMD,
+			(IXGBE_READ_REG(hw, IXGBE_FDIRCMD) |
+			 IXGBE_FDIRCMD_CLEARHT));
+	IXGBE_WRITE_FLUSH(hw);
+	IXGBE_WRITE_REG(hw, IXGBE_FDIRCMD,
+			(IXGBE_READ_REG(hw, IXGBE_FDIRCMD) &
+			 ~IXGBE_FDIRCMD_CLEARHT));
+	IXGBE_WRITE_FLUSH(hw);
+
 	fdirctrl = IXGBE_READ_REG(hw, IXGBE_FDIRCTRL);
 
 	fdirctrl &= ~IXGBE_FDIRCTRL_FLEX_MASK;
@@ -520,6 +541,14 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
 			break;
 		msec_delay(1);
 	}
+
+	if (i >= IXGBE_FDIR_INIT_DONE_POLL) {
+		PMD_DRV_LOG(ERR, "Flow Director poll time exceeded!");
+		return -ETIMEDOUT;
+	}
+
+	fdir_info->flex_bytes_offset = offset;
+
 	return 0;
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 39f6ed73f6..9aeb2e4a49 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -3137,13 +3137,13 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
 				rte_memcpy(&fdir_info->mask,
 					&fdir_rule.mask,
 					sizeof(struct ixgbe_hw_fdir_mask));
-				fdir_info->flex_bytes_offset =
-					fdir_rule.flex_bytes_offset;
 
-				if (fdir_rule.mask.flex_bytes_mask)
-					ixgbe_fdir_set_flexbytes_offset(dev,
+				if (fdir_rule.mask.flex_bytes_mask) {
+					ret = ixgbe_fdir_set_flexbytes_offset(dev,
 						fdir_rule.flex_bytes_offset);
-
+					if (ret)
+						goto out;
+				}
 				ret = ixgbe_fdir_set_input_mask(dev);
 				if (ret)
 					goto out;
@@ -3161,8 +3161,9 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
 				if (ret)
 					goto out;
 
-				if (fdir_info->flex_bytes_offset !=
-						fdir_rule.flex_bytes_offset)
+				if (fdir_rule.mask.flex_bytes_mask &&
+				    fdir_info->flex_bytes_offset !=
+				    fdir_rule.flex_bytes_offset)
 					goto out;
 			}
 		}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.019403947 +0000
+++ 0061-net-ixgbe-fix-flex-bytes-flow-director-rule.patch	2021-02-05 11:18:28.806691112 +0000
@@ -1 +1 @@
-From 06cad275fecf4e1892b076796065942cdc1ef44e Mon Sep 17 00:00:00 2001
+From 85b6748f06dd7f448311e489286a62a98da8dbdb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06cad275fecf4e1892b076796065942cdc1ef44e ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (59 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' " luca.boccassi
                   ` (213 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jun W Zhou, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From dcbf79a10720d17d226d68ef8f4b894281124c29 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Tue, 15 Dec 2020 17:50:59 +0800
Subject: [PATCH] net/i40e: fix Rx bytes statistics

[ upstream commit e8326d35d14406df936164bbac171563555a888b ]

Update the Rx-bytes statistics by subtract CRC bytes count from original
bytes count.

Fixes: bd7883c07d4a ("net/i40e: refactor some stats related functions")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 2faee1d7e1..dc076ae552 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2416,6 +2416,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->imissed = pstats->rx_discards;
 		stats->oerrors = pstats->tx_errors + pstats->tx_discards;
 		stats->ibytes = pstats->rx_bytes;
+		stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN;
 		stats->obytes = pstats->tx_bytes;
 	} else {
 		PMD_DRV_LOG(ERR, "Get statistics failed");
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.057278999 +0000
+++ 0062-net-i40e-fix-Rx-bytes-statistics.patch	2021-02-05 11:18:28.810691188 +0000
@@ -1 +1 @@
-From e8326d35d14406df936164bbac171563555a888b Mon Sep 17 00:00:00 2001
+From dcbf79a10720d17d226d68ef8f4b894281124c29 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8326d35d14406df936164bbac171563555a888b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (60 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' " luca.boccassi
                   ` (212 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From b2b5767a2e2f64494d54838bcbdd036ee119ec3c Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Wed, 23 Dec 2020 13:30:18 +0800
Subject: [PATCH] net/ice: check Rx queue number on RSS init

[ upstream commit bfa4f648728a742f0b38edb628e2978fa5721b01 ]

When RSS is initialized, rx queues number is used as denominator to set
default value into the RSS lookup table. If it is zero, there will be
error of being divided by 0. So add value check to avoid the error.

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9a5d6a559f..bbb8c14606 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3182,6 +3182,12 @@ static int ice_init_rss(struct ice_pf *pf)
 	vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
 	vsi->rss_lut_size = pf->hash_lut_size;
 
+	if (nb_q == 0) {
+		PMD_DRV_LOG(WARNING,
+			"RSS is not supported as rx queues number is zero\n");
+		return 0;
+	}
+
 	if (is_safe_mode) {
 		PMD_DRV_LOG(WARNING, "RSS is not supported in safe mode\n");
 		return 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.100727739 +0000
+++ 0063-net-ice-check-Rx-queue-number-on-RSS-init.patch	2021-02-05 11:18:28.810691188 +0000
@@ -1 +1 @@
-From bfa4f648728a742f0b38edb628e2978fa5721b01 Mon Sep 17 00:00:00 2001
+From b2b5767a2e2f64494d54838bcbdd036ee119ec3c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfa4f648728a742f0b38edb628e2978fa5721b01 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (61 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' " luca.boccassi
                   ` (211 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Xiao Zhang, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 66a184240864ee8fe35fbdf1f4f0eec4707ecdbe Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 15 Dec 2020 12:13:57 +0800
Subject: [PATCH] net/ice/base: fix tunnel destroy

[ upstream commit c7ff2213a5fe884d56adcd4a7b50ecd5810bebf2 ]

The TCAM information in AQ command buffer is not correct when destroying
the tunnel entries. The TCAM count was always ONE even multiple entries
are destroyed, and the offset of TCAM memory was also incorrect.
This patch is to fix this issue.

Fixes: 884efe3ca1f3 ("net/ice/base: add VXLAN/generic tunnel management")

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 7594df1696..d74fecbf5b 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -2156,7 +2156,7 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
 	u16 count = 0;
 	u16 index;
 	u16 size;
-	u16 i;
+	u16 i, j;
 
 	ice_acquire_lock(&hw->tnl_lock);
 
@@ -2196,30 +2196,31 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
 					  size);
 	if (!sect_rx)
 		goto ice_destroy_tunnel_err;
-	sect_rx->count = CPU_TO_LE16(1);
+	sect_rx->count = CPU_TO_LE16(count);
 
 	sect_tx = (struct ice_boost_tcam_section *)
 		ice_pkg_buf_alloc_section(bld, ICE_SID_TXPARSER_BOOST_TCAM,
 					  size);
 	if (!sect_tx)
 		goto ice_destroy_tunnel_err;
-	sect_tx->count = CPU_TO_LE16(1);
+	sect_tx->count = CPU_TO_LE16(count);
 
 	/* copy original boost entry to update package buffer, one copy to Rx
 	 * section, another copy to the Tx section
 	 */
-	for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
+	for (i = 0, j = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
 		if (hw->tnl.tbl[i].valid && hw->tnl.tbl[i].in_use &&
 		    (all || hw->tnl.tbl[i].port == port)) {
-			ice_memcpy(sect_rx->tcam + i,
+			ice_memcpy(sect_rx->tcam + j,
 				   hw->tnl.tbl[i].boost_entry,
 				   sizeof(*sect_rx->tcam),
 				   ICE_NONDMA_TO_NONDMA);
-			ice_memcpy(sect_tx->tcam + i,
+			ice_memcpy(sect_tx->tcam + j,
 				   hw->tnl.tbl[i].boost_entry,
 				   sizeof(*sect_tx->tcam),
 				   ICE_NONDMA_TO_NONDMA);
 			hw->tnl.tbl[i].marked = true;
+			j++;
 		}
 
 	status = ice_update_pkg(hw, ice_pkg_buf(bld), 1);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.143369973 +0000
+++ 0064-net-ice-base-fix-tunnel-destroy.patch	2021-02-05 11:18:28.818691340 +0000
@@ -1 +1 @@
-From c7ff2213a5fe884d56adcd4a7b50ecd5810bebf2 Mon Sep 17 00:00:00 2001
+From 66a184240864ee8fe35fbdf1f4f0eec4707ecdbe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7ff2213a5fe884d56adcd4a7b50ecd5810bebf2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 0812135cf5..6c7f83899d 100644
+index 7594df1696..d74fecbf5b 100644
@@ -25 +26 @@
-@@ -2163,7 +2163,7 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
+@@ -2156,7 +2156,7 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
@@ -34 +35 @@
-@@ -2203,30 +2203,31 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
+@@ -2196,30 +2196,31 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)

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

* [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (62 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix queue pairs configuration' " luca.boccassi
                   ` (210 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jacek Bułatek, Haiyue Wang, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c22554616fe96ef617c6ad35ec70a521263ab5fd Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 15 Dec 2020 12:42:46 +0800
Subject: [PATCH] net/ice/base: fix null pointer dereference
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 09f918e8bc5131eb07d88e39c1e035716acf7d82 ]

Added handling of allocation fault for ice_vsi_list_map_info
Should also check dereference of NULL pointer to filters VSI list
information for FWD_TO_VSI_LISt type only, otherwise, the FWD_TO_VSI type
filters by the given VSI can't be located.

Also the point *pi should not be NULL pointer, it is a reference to raw
data field, so remove this variable, use the reference directly.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")

Signed-off-by: Jacek Bułatek <jacekx.bulatek@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index dc55d7e3ce..247c3acb67 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -3683,6 +3683,9 @@ ice_add_update_vsi_list(struct ice_hw *hw,
 			ice_create_vsi_list_map(hw, &vsi_handle_arr[0], 2,
 						vsi_list_id);
 
+		if (!m_entry->vsi_list_info)
+			return ICE_ERR_NO_MEMORY;
+
 		/* If this entry was large action then the large action needs
 		 * to be updated to point to FWD to VSI list
 		 */
@@ -5016,6 +5019,7 @@ ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
 	return ((fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI &&
 		 fm_entry->fltr_info.vsi_handle == vsi_handle) ||
 		(fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI_LIST &&
+		 fm_entry->vsi_list_info &&
 		 (ice_is_bit_set(fm_entry->vsi_list_info->vsi_map,
 				 vsi_handle))));
 }
@@ -5090,14 +5094,12 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
 
 	LIST_FOR_EACH_ENTRY(fm_entry, lkup_list_head,
 			    ice_fltr_mgmt_list_entry, list_entry) {
-		struct ice_fltr_info *fi;
-
-		fi = &fm_entry->fltr_info;
-		if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
+		if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
 			continue;
 
 		status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
-							vsi_list_head, fi);
+							vsi_list_head,
+							&fm_entry->fltr_info);
 		if (status)
 			return status;
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.190872373 +0000
+++ 0065-net-ice-base-fix-null-pointer-dereference.patch	2021-02-05 11:18:28.826691493 +0000
@@ -1 +1 @@
-From 09f918e8bc5131eb07d88e39c1e035716acf7d82 Mon Sep 17 00:00:00 2001
+From c22554616fe96ef617c6ad35ec70a521263ab5fd Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 09f918e8bc5131eb07d88e39c1e035716acf7d82 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 45c44ca256..fd2c1ccceb 100644
+index dc55d7e3ce..247c3acb67 100644
@@ -32 +33 @@
-@@ -4090,6 +4090,9 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -3683,6 +3683,9 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -42 +43 @@
-@@ -5423,6 +5426,7 @@ ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
+@@ -5016,6 +5019,7 @@ ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
@@ -50 +51 @@
-@@ -5497,14 +5501,12 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
+@@ -5090,14 +5094,12 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,

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

* [dpdk-stable] patch 'net/iavf: fix queue pairs configuration' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (63 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix GTPU UL and DL support for flow director' " luca.boccassi
                   ` (209 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Zhimin Huang, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From f8779d9a362955e703963487356e264528740091 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 23 Dec 2020 13:29:36 +0800
Subject: [PATCH] net/iavf: fix queue pairs configuration

[ upstream commit 403aebc44c04952f98fc7501e26eb77098d74bc8 ]

Check if there are enough queue pairs currently allocated, and if not,
request PF to allocate them.

Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 7e3c26a94e..f0151215e6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -372,8 +372,10 @@ iavf_dev_configure(struct rte_eth_dev *dev)
 	} else {
 		/* Check if large VF is already enabled. If so, disable and
 		 * release redundant queue resource.
+		 * Or check if enough queue pairs. If not, request them from PF.
 		 */
-		if (vf->lv_enabled) {
+		if (vf->lv_enabled ||
+		    num_queue_pairs > vf->vsi_res->num_queue_pairs) {
 			ret = iavf_queues_req_reset(dev, num_queue_pairs);
 			if (ret)
 				return ret;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.236339725 +0000
+++ 0066-net-iavf-fix-queue-pairs-configuration.patch	2021-02-05 11:18:28.826691493 +0000
@@ -1 +1 @@
-From 403aebc44c04952f98fc7501e26eb77098d74bc8 Mon Sep 17 00:00:00 2001
+From f8779d9a362955e703963487356e264528740091 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 403aebc44c04952f98fc7501e26eb77098d74bc8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d2fa168256..7bf31d4f4e 100644
+index 7e3c26a94e..f0151215e6 100644
@@ -23 +24 @@
-@@ -375,8 +375,10 @@ iavf_dev_configure(struct rte_eth_dev *dev)
+@@ -372,8 +372,10 @@ iavf_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/iavf: fix GTPU UL and DL support for flow director' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (64 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix queue pairs configuration' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix flex payload rule conflict' " luca.boccassi
                   ` (208 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Hailin Xu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6876722e0fcad6aa11574f32712ffd6e6506c59d

Thanks.

Luca Boccassi

---
From 6876722e0fcad6aa11574f32712ffd6e6506c59d Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Thu, 31 Dec 2020 13:13:07 +0800
Subject: [PATCH] net/iavf: fix GTPU UL and DL support for flow director

[ upstream commit 78e8a87f6324349e06238f869edaecd53405d7aa ]

For AVF FDIR, GTPU uplink and downlink are not supported in previous
code. This patch distinguishes GTPU with IP/EH/DL/UL for AVF FDIR.

Fixes: 4c7a41ae6b23 ("net/iavf: support flow director GTPU outer IPv4/IPv6")

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Tested-by: Hailin Xu <hailinx.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_fdir.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 7054bde0b9..253213f8b5 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -25,6 +25,9 @@
 #define IAVF_FDIR_IPV6_TC_OFFSET 20
 #define IAVF_IPV6_TC_MASK  (0xFF << IAVF_FDIR_IPV6_TC_OFFSET)
 
+#define IAVF_GTPU_EH_DWLINK 0
+#define IAVF_GTPU_EH_UPLINK 1
+
 #define IAVF_FDIR_INSET_ETH (\
 	IAVF_INSET_ETHERTYPE)
 
@@ -807,7 +810,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 
 			hdr = &filter->add_fltr.rule_cfg.proto_hdrs.proto_hdr[layer];
 
-			VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, GTPU_EH);
+			if (!gtp_psc_spec)
+				VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, GTPU_EH);
+			else if ((gtp_psc_mask->qfi) && !(gtp_psc_mask->pdu_type))
+				VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, GTPU_EH);
+			else if (gtp_psc_spec->pdu_type == IAVF_GTPU_EH_UPLINK)
+				VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, GTPU_EH_PDU_UP);
+			else if (gtp_psc_spec->pdu_type == IAVF_GTPU_EH_DWLINK)
+				VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, GTPU_EH_PDU_DWN);
 
 			if (gtp_psc_spec && gtp_psc_mask) {
 				if (gtp_psc_mask->qfi == UINT8_MAX) {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.271575130 +0000
+++ 0067-net-iavf-fix-GTPU-UL-and-DL-support-for-flow-directo.patch	2021-02-05 11:18:28.826691493 +0000
@@ -1 +1 @@
-From 78e8a87f6324349e06238f869edaecd53405d7aa Mon Sep 17 00:00:00 2001
+From 6876722e0fcad6aa11574f32712ffd6e6506c59d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78e8a87f6324349e06238f869edaecd53405d7aa ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 64bdb2193e..cce54f994e 100644
+index 7054bde0b9..253213f8b5 100644
@@ -33 +34 @@
-@@ -814,7 +817,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
+@@ -807,7 +810,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,

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

* [dpdk-stable] patch 'net/i40e: fix flex payload rule conflict' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (65 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix GTPU UL and DL support for flow director' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: limit Rx representor packets per poll' " luca.boccassi
                   ` (207 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Chenmin Sun, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 9bfd012b73890134478a04be2a0c0d219fc46d4a Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 5 Jan 2021 11:12:56 +0800
Subject: [PATCH] net/i40e: fix flex payload rule conflict

[ upstream commit 47193beea5035ac27665efe9ba96b64b19ac220f ]

With the following commands, the second flow can't
be created successfully.

1. flow create 0 ingress pattern eth / ipv4 / udp /
   raw relative is 1 pattern is 0102030405 / end
   actions drop / end
2. flow destroy 0 rule 0
3. flow create 0 ingress pattern eth / ipv4 / udp /
   raw relative is 1 pattern is 010203040506 / end
   actions drop / end

The root cause is that a flag for flex pit isn't reset.

Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")

Reported-by: Chenmin Sun <chenmin.sun@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev.h |  3 +++
 drivers/net/i40e/i40e_fdir.c   | 19 ++++++++++++++++---
 drivers/net/i40e/i40e_flow.c   |  4 ++++
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 696c5aaf7e..aac226999c 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -636,6 +636,7 @@ struct i40e_fdir_flow_ext {
 	bool is_udp; /* ipv4|ipv6 udp flow */
 	enum i40e_flxpld_layer_idx layer_idx;
 	struct i40e_fdir_flex_pit flex_pit[I40E_MAX_FLXPLD_LAYER * I40E_MAX_FLXPLD_FIED];
+	bool is_flex_flow;
 };
 
 /* A structure used to define the input for a flow director filter entry */
@@ -784,6 +785,8 @@ struct i40e_fdir_info {
 	bool flex_mask_flag[I40E_FILTER_PCTYPE_MAX];
 
 	bool inset_flag[I40E_FILTER_PCTYPE_MAX]; /* Mark if input set is set */
+
+	uint32_t flex_flow_count[I40E_MAX_FLXPLD_LAYER];
 };
 
 /* Ethertype filter number HW supports */
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 50c0eee9f2..0343e8b09a 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -355,6 +355,7 @@ i40e_init_flx_pld(struct i40e_pf *pf)
 			I40E_PRTQF_FLX_PIT(index + 1), 0x0000FC29);/*non-used*/
 		I40E_WRITE_REG(hw,
 			I40E_PRTQF_FLX_PIT(index + 2), 0x0000FC2A);/*non-used*/
+		pf->fdir.flex_pit_flag[i] = 0;
 	}
 
 	/* initialize the masks */
@@ -1513,8 +1514,6 @@ i40e_flow_set_fdir_flex_pit(struct i40e_pf *pf,
 		I40E_WRITE_REG(hw, I40E_PRTQF_FLX_PIT(field_idx), flx_pit);
 		min_next_off++;
 	}
-
-	pf->fdir.flex_pit_flag[layer_idx] = 1;
 }
 
 static int
@@ -1686,7 +1685,7 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 	i40e_fdir_filter_convert(filter, &check_filter);
 
 	if (add) {
-		if (!filter->input.flow_ext.customized_pctype) {
+		if (filter->input.flow_ext.is_flex_flow) {
 			for (i = 0; i < filter->input.flow_ext.raw_id; i++) {
 				layer_idx = filter->input.flow_ext.layer_idx;
 				field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i;
@@ -1738,6 +1737,9 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 				fdir_info->fdir_guarantee_free_space > 0)
 			wait_status = false;
 	} else {
+		if (filter->input.flow_ext.is_flex_flow)
+			layer_idx = filter->input.flow_ext.layer_idx;
+
 		node = i40e_sw_fdir_filter_lookup(fdir_info,
 				&check_filter.fdir.input);
 		if (!node) {
@@ -1785,6 +1787,17 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 		goto error_op;
 	}
 
+	if (filter->input.flow_ext.is_flex_flow) {
+		if (add) {
+			fdir_info->flex_flow_count[layer_idx]++;
+			pf->fdir.flex_pit_flag[layer_idx] = 1;
+		} else {
+			fdir_info->flex_flow_count[layer_idx]--;
+			if (!fdir_info->flex_flow_count[layer_idx])
+				pf->fdir.flex_pit_flag[layer_idx] = 0;
+		}
+	}
+
 	if (add) {
 		fdir_info->fdir_actual_cnt++;
 		if (fdir_info->fdir_invalprio == 1 &&
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index b09ff6590d..bbd666b7a0 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3069,6 +3069,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 			       &flex_pit, sizeof(struct i40e_fdir_flex_pit));
 			filter->input.flow_ext.layer_idx = layer_idx;
 			filter->input.flow_ext.raw_id = raw_id;
+			filter->input.flow_ext.is_flex_flow = true;
 			break;
 		case RTE_FLOW_ITEM_TYPE_VF:
 			vf_spec = item->spec;
@@ -5515,6 +5516,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 			pf->fdir.flex_mask_flag[pctype] = 0;
 		}
 
+		for (i = 0; i < I40E_MAX_FLXPLD_LAYER; i++)
+			pf->fdir.flex_pit_flag[i] = 0;
+
 		/* Disable FDIR processing as all FDIR rules are now flushed */
 		i40e_fdir_rx_proc_enable(dev, 0);
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.314774046 +0000
+++ 0068-net-i40e-fix-flex-payload-rule-conflict.patch	2021-02-05 11:18:28.834691645 +0000
@@ -1 +1 @@
-From 47193beea5035ac27665efe9ba96b64b19ac220f Mon Sep 17 00:00:00 2001
+From 9bfd012b73890134478a04be2a0c0d219fc46d4a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 47193beea5035ac27665efe9ba96b64b19ac220f ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: limit Rx representor packets per poll' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (66 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix flex payload rule conflict' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix doorbell write ordering' " luca.boccassi
                   ` (206 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From fe18437e3489fa06bdecf616fa62e14b00e6d698 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Mon, 14 Dec 2020 13:53:52 -0500
Subject: [PATCH] net/bnxt: limit Rx representor packets per poll

[ upstream commit f0beaf802145e21e1ce60d4ca2724436b70c316e ]

Without some limit on the number of packets transferred from the
HW ring to the representor ring per burst receive call, an entire ring's
worth of packets can be transferred. This can break assumptions
about ring indices (index on return could be identical to the index
on entry, which is assumed to mean that no packets were processed),
and can result in representor packets being dropped unnecessarily
due to representor ring overflow.

Fix by limiting the number of representor packets transferred per
poll to requested burst size.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index af1774844a..cadc598cf2 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -891,7 +891,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		}
 
 		raw_cons = NEXT_RAW_CMP(raw_cons);
-		if (nb_rx_pkts == nb_pkts || evt)
+		if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt)
 			break;
 		/* Post some Rx buf early in case of larger burst processing */
 		if (nb_rx_pkts == BNXT_RX_POST_THRESH)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.362865018 +0000
+++ 0069-net-bnxt-limit-Rx-representor-packets-per-poll.patch	2021-02-05 11:18:28.834691645 +0000
@@ -1 +1 @@
-From f0beaf802145e21e1ce60d4ca2724436b70c316e Mon Sep 17 00:00:00 2001
+From fe18437e3489fa06bdecf616fa62e14b00e6d698 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0beaf802145e21e1ce60d4ca2724436b70c316e ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 445e6150d1..e2d388e69f 100644
+index af1774844a..cadc598cf2 100644
@@ -31 +32 @@
-@@ -901,7 +901,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -891,7 +891,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,

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

* [dpdk-stable] patch 'net/bnxt: fix doorbell write ordering' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (67 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: limit Rx representor packets per poll' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix outer UDP checksum Rx offload capability' " luca.boccassi
                   ` (205 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/21d9bef593e7bd47558e9dd54f5057efa1c9f7b4

Thanks.

Luca Boccassi

---
From 21d9bef593e7bd47558e9dd54f5057efa1c9f7b4 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Mon, 14 Dec 2020 13:56:38 -0500
Subject: [PATCH] net/bnxt: fix doorbell write ordering

[ upstream commit 73d1cc96be6a7b49d7d3d79b5a1daa1d94d57956 ]

Write completion queue doorbell before receive descriptor
doorbell to avoid possibility of completion queue overflow
when completion queue size is equal to receive descriptor
ring size. Remove unnecessary compiler barriers (db write
functions have the necessary barriers.)

Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index cadc598cf2..c5d23050e6 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -907,6 +907,10 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		goto done;
 	}
 
+	/* Ring the completion queue doorbell. */
+	bnxt_db_cq(cpr);
+
+	/* Ring the receive descriptor doorbell. */
 	if (prod != rxr->rx_prod)
 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 
@@ -914,8 +918,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	if (ag_prod != rxr->ag_prod)
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 
-	bnxt_db_cq(cpr);
-
 	/* Attempt to alloc Rx buf in case of a previous allocation failure. */
 	if (rc == -ENOMEM) {
 		int i = RING_NEXT(rxr->rx_ring_struct, prod);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.402716787 +0000
+++ 0070-net-bnxt-fix-doorbell-write-ordering.patch	2021-02-05 11:18:28.838691721 +0000
@@ -1 +1 @@
-From 73d1cc96be6a7b49d7d3d79b5a1daa1d94d57956 Mon Sep 17 00:00:00 2001
+From 21d9bef593e7bd47558e9dd54f5057efa1c9f7b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 73d1cc96be6a7b49d7d3d79b5a1daa1d94d57956 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- drivers/net/bnxt/bnxt_rxr.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
+ drivers/net/bnxt/bnxt_rxr.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
@@ -23 +24 @@
-index e2d388e69f..ffdeeecc3a 100644
+index cadc598cf2..c5d23050e6 100644
@@ -26 +27 @@
-@@ -917,17 +917,17 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -907,6 +907,10 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -30 +30,0 @@
--	rte_compiler_barrier();
@@ -35,2 +35,2 @@
- 	if (rx_raw_prod != rxr->rx_raw_prod)
- 		bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod);
+ 	if (prod != rxr->rx_prod)
+ 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
@@ -38,4 +38,3 @@
--	rte_compiler_barrier();
- 	/* Ring the AGG ring DB */
- 	if (ag_raw_prod != rxr->ag_raw_prod)
- 		bnxt_db_write(&rxr->ag_db, rxr->ag_raw_prod);
+@@ -914,8 +918,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+ 	if (ag_prod != rxr->ag_prod)
+ 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
@@ -47 +46 @@
- 		int i = RING_NEXT(rx_raw_prod);
+ 		int i = RING_NEXT(rxr->rx_ring_struct, prod);

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

* [dpdk-stable] patch 'net/bnxt: fix outer UDP checksum Rx offload capability' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (68 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix doorbell write ordering' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: make offload flags mapping per-ring' " luca.boccassi
                   ` (204 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 1c1c4916806c6dc07c94aea6d29474e2981ee412 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 17 Dec 2020 14:24:31 -0500
Subject: [PATCH] net/bnxt: fix outer UDP checksum Rx offload capability

[ upstream commit e750acef45e7e21036750e81f4c72ae609c6470f ]

Rx outer UDP checksum offload has been supported for
some time, but this has not been advertised in offload
capability flags. Fix this, and allow vector mode
receive to be enabled when DEV_RX_OFFLOAD_OUTER_UDP_CKSUM
is requested.

Fixes: 04a681426d49 ("net/bnxt: fix L4 checksum error indication in Rx")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 21f1604fcb..b912fd8564 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -583,6 +583,7 @@ struct bnxt_rep_info {
 				     DEV_RX_OFFLOAD_UDP_CKSUM | \
 				     DEV_RX_OFFLOAD_TCP_CKSUM | \
 				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
+				     DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
 				     DEV_RX_OFFLOAD_VLAN_EXTEND | \
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2f08f2b2ba..b2e3683eeb 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1179,6 +1179,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+		DEV_RX_OFFLOAD_OUTER_UDP_CKSUM |
 		DEV_RX_OFFLOAD_RSS_HASH |
 		DEV_RX_OFFLOAD_VLAN_FILTER)) &&
 	    !BNXT_TRUFLOW_EN(bp) && BNXT_NUM_ASYNC_CPR(bp) &&
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.454643252 +0000
+++ 0071-net-bnxt-fix-outer-UDP-checksum-Rx-offload-capabilit.patch	2021-02-05 11:18:28.842691797 +0000
@@ -1 +1 @@
-From e750acef45e7e21036750e81f4c72ae609c6470f Mon Sep 17 00:00:00 2001
+From 1c1c4916806c6dc07c94aea6d29474e2981ee412 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e750acef45e7e21036750e81f4c72ae609c6470f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 07d39ee937..ad7d59458c 100644
+index 21f1604fcb..b912fd8564 100644
@@ -35 +36 @@
-index 9d5c8aa0f8..a3035def5e 100644
+index 2f08f2b2ba..b2e3683eeb 100644

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

* [dpdk-stable] patch 'net/bnxt: make offload flags mapping per-ring' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (69 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix outer UDP checksum Rx offload capability' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: set correct checksum status in mbuf' " luca.boccassi
                   ` (203 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From cee5f387737a1208eed369f423d96320a970f21f Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 18 Dec 2020 15:28:36 -0500
Subject: [PATCH] net/bnxt: make offload flags mapping per-ring

[ upstream commit d5bbd722469b61c0bc8bc95c51c46b80de045149 ]

Refactor offload flags mapping table to be dynamic  and
per-ring instead of static and global.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c           | 34 +++++++++------------------
 drivers/net/bnxt/bnxt_rxr.h           | 12 +++++-----
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 10 ++++----
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c  | 10 ++++----
 4 files changed, 29 insertions(+), 37 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index c5d23050e6..cba03bb38e 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -406,24 +406,14 @@ bnxt_parse_pkt_type(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1)
 	return bnxt_ptype_table[index];
 }
 
-uint32_t
-bnxt_ol_flags_table[BNXT_OL_FLAGS_TBL_DIM] __rte_cache_aligned;
-
-uint32_t
-bnxt_ol_flags_err_table[BNXT_OL_FLAGS_ERR_TBL_DIM] __rte_cache_aligned;
-
 static void __rte_cold
-bnxt_init_ol_flags_tables(void)
+bnxt_init_ol_flags_tables(struct bnxt_rx_ring_info *rxr)
 {
-	static bool initialized;
 	uint32_t *pt;
 	int i;
 
-	if (initialized)
-		return;
-
 	/* Initialize ol_flags table. */
-	pt = bnxt_ol_flags_table;
+	pt = rxr->ol_flags_table;
 	for (i = 0; i < BNXT_OL_FLAGS_TBL_DIM; i++) {
 		pt[i] = 0;
 		if (i & RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN)
@@ -440,7 +430,7 @@ bnxt_init_ol_flags_tables(void)
 	}
 
 	/* Initialize checksum error table. */
-	pt = bnxt_ol_flags_err_table;
+	pt = rxr->ol_flags_err_table;
 	for (i = 0; i < BNXT_OL_FLAGS_ERR_TBL_DIM; i++) {
 		pt[i] = 0;
 		if (i & (RX_PKT_CMPL_ERRORS_IP_CS_ERROR >> 4))
@@ -455,13 +445,11 @@ bnxt_init_ol_flags_tables(void)
 		if (i & (RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR >> 4))
 			pt[i] |= PKT_RX_OUTER_L4_CKSUM_BAD;
 	}
-
-	initialized = true;
 }
 
 static void
-bnxt_set_ol_flags(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1,
-		  struct rte_mbuf *mbuf)
+bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
+		  struct rx_pkt_cmpl_hi *rxcmp1, struct rte_mbuf *mbuf)
 {
 	uint16_t flags_type, errors, flags;
 	uint64_t ol_flags;
@@ -482,10 +470,10 @@ bnxt_set_ol_flags(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1,
 				 RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR);
 	errors = (errors >> 4) & flags;
 
-	ol_flags = bnxt_ol_flags_table[flags & ~errors];
+	ol_flags = rxr->ol_flags_table[flags & ~errors];
 
 	if (errors)
-		ol_flags |= bnxt_ol_flags_err_table[errors];
+		ol_flags |= rxr->ol_flags_err_table[errors];
 
 	if (flags_type & RX_PKT_CMPL_FLAGS_RSS_VALID) {
 		mbuf->hash.rss = rte_le_to_cpu_32(rxcmp->rss_hash);
@@ -740,7 +728,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	mbuf->data_len = mbuf->pkt_len;
 	mbuf->port = rxq->port_id;
 
-	bnxt_set_ol_flags(rxcmp, rxcmp1, mbuf);
+	bnxt_set_ol_flags(rxr, rxcmp, rxcmp1, mbuf);
 
 #ifdef RTE_LIBRTE_IEEE1588
 	if (unlikely((rte_le_to_cpu_16(rxcmp->flags_type) &
@@ -1109,9 +1097,6 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	/* Initialize packet type table. */
 	bnxt_init_ptype_table();
 
-	/* Initialize offload flags parsing table. */
-	bnxt_init_ol_flags_tables();
-
 	size = rte_pktmbuf_data_room_size(rxq->mb_pool) - RTE_PKTMBUF_HEADROOM;
 	size = RTE_MIN(BNXT_MAX_PKT_LEN, size);
 
@@ -1121,6 +1106,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	ring = rxr->rx_ring_struct;
 	bnxt_init_rxbds(ring, type, size);
 
+	/* Initialize offload flags parsing table. */
+	bnxt_init_ol_flags_tables(rxr);
+
 	prod = rxr->rx_prod;
 	for (i = 0; i < ring->ring_size; i++) {
 		if (unlikely(!rxr->rx_buf_ring[i])) {
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 3fc901fdf0..6ba997e150 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -42,6 +42,9 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
 /* Number of descriptors to process per inner loop in vector mode. */
 #define RTE_BNXT_DESCS_PER_LOOP		4U
 
+#define BNXT_OL_FLAGS_TBL_DIM	32
+#define BNXT_OL_FLAGS_ERR_TBL_DIM 16
+
 struct bnxt_tpa_info {
 	struct rte_mbuf			*mbuf;
 	uint16_t			len;
@@ -73,6 +76,9 @@ struct bnxt_rx_ring_info {
 	struct rte_bitmap	*ag_bitmap;
 
 	struct bnxt_tpa_info *tpa_info;
+
+	uint32_t ol_flags_table[BNXT_OL_FLAGS_TBL_DIM];
+	uint32_t ol_flags_err_table[BNXT_OL_FLAGS_ERR_TBL_DIM];
 };
 
 uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -116,10 +122,4 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf)
 
 #define BNXT_PTYPE_TBL_DIM	128
 extern uint32_t bnxt_ptype_table[BNXT_PTYPE_TBL_DIM];
-
-#define BNXT_OL_FLAGS_TBL_DIM	32
-extern uint32_t bnxt_ol_flags_table[BNXT_OL_FLAGS_TBL_DIM];
-
-#define BNXT_OL_FLAGS_ERR_TBL_DIM 16
-extern uint32_t bnxt_ol_flags_err_table[BNXT_OL_FLAGS_ERR_TBL_DIM];
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index de1d96570c..226a3f22d4 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -27,11 +27,11 @@
 	uint32_t tmp, of;						       \
 									       \
 	of = vgetq_lane_u32((rss_flags), (pi)) |			       \
-		   bnxt_ol_flags_table[vgetq_lane_u32((ol_idx), (pi))];	       \
+		   rxr->ol_flags_table[vgetq_lane_u32((ol_idx), (pi))];	       \
 									       \
 	tmp = vgetq_lane_u32((errors), (pi));				       \
 	if (tmp)							       \
-		of |= bnxt_ol_flags_err_table[tmp];			       \
+		of |= rxr->ol_flags_err_table[tmp];			       \
 	(ol_flags) = of;						       \
 }
 
@@ -58,7 +58,8 @@
 
 static void
 descs_to_mbufs(uint32x4_t mm_rxcmp[4], uint32x4_t mm_rxcmp1[4],
-	       uint64x2_t mb_init, struct rte_mbuf **mbuf)
+	       uint64x2_t mb_init, struct rte_mbuf **mbuf,
+	       struct bnxt_rx_ring_info *rxr)
 {
 	const uint8x16_t shuf_msk = {
 		0xFF, 0xFF, 0xFF, 0xFF,    /* pkt_type (zeroes) */
@@ -286,7 +287,8 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			goto out;
 		}
 
-		descs_to_mbufs(rxcmp, rxcmp1, mb_init, &rx_pkts[nb_rx_pkts]);
+		descs_to_mbufs(rxcmp, rxcmp1, mb_init, &rx_pkts[nb_rx_pkts],
+			       rxr);
 		nb_rx_pkts += num_valid;
 
 		if (num_valid < RTE_BNXT_DESCS_PER_LOOP)
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index e12bf8bb76..982dac0d9c 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -27,11 +27,11 @@
 	uint32_t tmp, of;						       \
 									       \
 	of = _mm_extract_epi32((rss_flags), (pi)) |			       \
-		bnxt_ol_flags_table[_mm_extract_epi32((ol_index), (pi))];      \
+		rxr->ol_flags_table[_mm_extract_epi32((ol_index), (pi))];      \
 									       \
 	tmp = _mm_extract_epi32((errors), (pi));			       \
 	if (tmp)							       \
-		of |= bnxt_ol_flags_err_table[tmp];			       \
+		of |= rxr->ol_flags_err_table[tmp];			       \
 	(ol_flags) = of;						       \
 }
 
@@ -54,7 +54,8 @@
 
 static inline void
 descs_to_mbufs(__m128i mm_rxcmp[4], __m128i mm_rxcmp1[4],
-	       __m128i mbuf_init, struct rte_mbuf **mbuf)
+	       __m128i mbuf_init, struct rte_mbuf **mbuf,
+	       struct bnxt_rx_ring_info *rxr)
 {
 	const __m128i shuf_msk =
 		_mm_set_epi8(15, 14, 13, 12,          /* rss */
@@ -268,7 +269,8 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			goto out;
 		}
 
-		descs_to_mbufs(rxcmp, rxcmp1, mbuf_init, &rx_pkts[nb_rx_pkts]);
+		descs_to_mbufs(rxcmp, rxcmp1, mbuf_init, &rx_pkts[nb_rx_pkts],
+			       rxr);
 		nb_rx_pkts += num_valid;
 
 		if (num_valid < RTE_BNXT_DESCS_PER_LOOP)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.492987274 +0000
+++ 0072-net-bnxt-make-offload-flags-mapping-per-ring.patch	2021-02-05 11:18:28.846691874 +0000
@@ -1 +1 @@
-From d5bbd722469b61c0bc8bc95c51c46b80de045149 Mon Sep 17 00:00:00 2001
+From cee5f387737a1208eed369f423d96320a970f21f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5bbd722469b61c0bc8bc95c51c46b80de045149 ]
+
@@ -9,2 +10,0 @@
-Cc: stable@dpdk.org
-
@@ -22 +22 @@
-index 288b403bf0..1edc8dac43 100644
+index c5d23050e6..cba03bb38e 100644
@@ -25 +25 @@
-@@ -415,24 +415,14 @@ bnxt_parse_pkt_type(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1)
+@@ -406,24 +406,14 @@ bnxt_parse_pkt_type(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1)
@@ -52 +52 @@
-@@ -449,7 +439,7 @@ bnxt_init_ol_flags_tables(void)
+@@ -440,7 +430,7 @@ bnxt_init_ol_flags_tables(void)
@@ -61 +61 @@
-@@ -464,13 +454,11 @@ bnxt_init_ol_flags_tables(void)
+@@ -455,13 +445,11 @@ bnxt_init_ol_flags_tables(void)
@@ -77 +77 @@
-@@ -491,10 +479,10 @@ bnxt_set_ol_flags(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1,
+@@ -482,10 +470,10 @@ bnxt_set_ol_flags(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1,
@@ -90 +90 @@
-@@ -749,7 +737,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+@@ -740,7 +728,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
@@ -99 +99 @@
-@@ -1127,9 +1115,6 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -1109,9 +1097,6 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
@@ -109 +109 @@
-@@ -1139,6 +1124,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -1121,6 +1106,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
@@ -116 +116 @@
- 	raw_prod = rxr->rx_raw_prod;
+ 	prod = rxr->rx_prod;
@@ -120 +120 @@
-index af6ff0972d..4db1e8761e 100644
+index 3fc901fdf0..6ba997e150 100644
@@ -155 +155 @@
-index 81f9a7da2b..d9ac822be8 100644
+index de1d96570c..226a3f22d4 100644
@@ -193 +193 @@
-index ce92629ab0..7f5825d333 100644
+index e12bf8bb76..982dac0d9c 100644

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

* [dpdk-stable] patch 'net/bnxt: set correct checksum status in mbuf' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (70 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: make offload flags mapping per-ring' " luca.boccassi
@ 2021-02-05 11:15 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'app/testpmd: release flows left before port stop' " luca.boccassi
                   ` (202 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:15 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9784d3a37c39e6820fdb06ff04f958491c1d075b

Thanks.

Luca Boccassi

---
From 9784d3a37c39e6820fdb06ff04f958491c1d075b Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 18 Dec 2020 15:28:37 -0500
Subject: [PATCH] net/bnxt: set correct checksum status in mbuf

[ upstream commit 48a580c5df78b3addac6f57969167bb86c7428f5 ]

The setting of the mbuf ol_flags field for tunneled packets
should be different depending upon whether DEV_RX_OFFLOAD_OUTER_*
offloads are enabled. Initialize ol_flags mappings based on
the receive offload configuration when the receive ring is
initialized.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c           | 85 +++++++++++++++++++++------
 drivers/net/bnxt/bnxt_rxr.h           |  4 +-
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c |  6 +-
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c  |  6 +-
 4 files changed, 80 insertions(+), 21 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index cba03bb38e..46e3fed127 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -407,43 +407,91 @@ bnxt_parse_pkt_type(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1)
 }
 
 static void __rte_cold
-bnxt_init_ol_flags_tables(struct bnxt_rx_ring_info *rxr)
+bnxt_init_ol_flags_tables(struct bnxt_rx_queue *rxq)
 {
+	struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
+	struct rte_eth_conf *dev_conf;
+	bool outer_cksum_enabled;
+	uint64_t offloads;
 	uint32_t *pt;
 	int i;
 
+	dev_conf = &rxq->bp->eth_dev->data->dev_conf;
+	offloads = dev_conf->rxmode.offloads;
+
+	outer_cksum_enabled = !!(offloads & (DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+					     DEV_RX_OFFLOAD_OUTER_UDP_CKSUM));
+
 	/* Initialize ol_flags table. */
 	pt = rxr->ol_flags_table;
 	for (i = 0; i < BNXT_OL_FLAGS_TBL_DIM; i++) {
 		pt[i] = 0;
+
 		if (i & RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN)
 			pt[i] |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 
-		if (i & RX_PKT_CMPL_FLAGS2_IP_CS_CALC)
-			pt[i] |= PKT_RX_IP_CKSUM_GOOD;
+		if (i & (RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC << 3)) {
+			/* Tunnel case. */
+			if (outer_cksum_enabled) {
+				if (i & RX_PKT_CMPL_FLAGS2_IP_CS_CALC)
+					pt[i] |= PKT_RX_IP_CKSUM_GOOD;
 
-		if (i & RX_PKT_CMPL_FLAGS2_L4_CS_CALC)
-			pt[i] |= PKT_RX_L4_CKSUM_GOOD;
+				if (i & RX_PKT_CMPL_FLAGS2_L4_CS_CALC)
+					pt[i] |= PKT_RX_L4_CKSUM_GOOD;
 
-		if (i & RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC)
-			pt[i] |= PKT_RX_OUTER_L4_CKSUM_GOOD;
+				if (i & RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC)
+					pt[i] |= PKT_RX_OUTER_L4_CKSUM_GOOD;
+			} else {
+				if (i & RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC)
+					pt[i] |= PKT_RX_IP_CKSUM_GOOD;
+
+				if (i & RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC)
+					pt[i] |= PKT_RX_L4_CKSUM_GOOD;
+			}
+		} else {
+			/* Non-tunnel case. */
+			if (i & RX_PKT_CMPL_FLAGS2_IP_CS_CALC)
+				pt[i] |= PKT_RX_IP_CKSUM_GOOD;
+
+			if (i & RX_PKT_CMPL_FLAGS2_L4_CS_CALC)
+				pt[i] |= PKT_RX_L4_CKSUM_GOOD;
+		}
 	}
 
 	/* Initialize checksum error table. */
 	pt = rxr->ol_flags_err_table;
 	for (i = 0; i < BNXT_OL_FLAGS_ERR_TBL_DIM; i++) {
 		pt[i] = 0;
-		if (i & (RX_PKT_CMPL_ERRORS_IP_CS_ERROR >> 4))
-			pt[i] |= PKT_RX_IP_CKSUM_BAD;
 
-		if (i & (RX_PKT_CMPL_ERRORS_L4_CS_ERROR >> 4))
-			pt[i] |= PKT_RX_L4_CKSUM_BAD;
+		if (i & (RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC << 2)) {
+			/* Tunnel case. */
+			if (outer_cksum_enabled) {
+				if (i & (RX_PKT_CMPL_ERRORS_IP_CS_ERROR >> 4))
+					pt[i] |= PKT_RX_IP_CKSUM_BAD;
 
-		if (i & (RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR >> 4))
-			pt[i] |= PKT_RX_EIP_CKSUM_BAD;
+				if (i & (RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR >> 4))
+					pt[i] |= PKT_RX_EIP_CKSUM_BAD;
 
-		if (i & (RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR >> 4))
-			pt[i] |= PKT_RX_OUTER_L4_CKSUM_BAD;
+				if (i & (RX_PKT_CMPL_ERRORS_L4_CS_ERROR >> 4))
+					pt[i] |= PKT_RX_L4_CKSUM_BAD;
+
+				if (i & (RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR >> 4))
+					pt[i] |= PKT_RX_OUTER_L4_CKSUM_BAD;
+			} else {
+				if (i & (RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR >> 4))
+					pt[i] |= PKT_RX_IP_CKSUM_BAD;
+
+				if (i & (RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR >> 4))
+					pt[i] |= PKT_RX_L4_CKSUM_BAD;
+			}
+		} else {
+			/* Non-tunnel case. */
+			if (i & (RX_PKT_CMPL_ERRORS_IP_CS_ERROR >> 4))
+				pt[i] |= PKT_RX_IP_CKSUM_BAD;
+
+			if (i & (RX_PKT_CMPL_ERRORS_L4_CS_ERROR >> 4))
+				pt[i] |= PKT_RX_L4_CKSUM_BAD;
+		}
 	}
 }
 
@@ -463,6 +511,7 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
 				 RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC |
 				 RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN);
 
+	flags |= (flags & RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC) << 3;
 	errors = rte_le_to_cpu_16(rxcmp1->errors_v2) &
 				(RX_PKT_CMPL_ERRORS_IP_CS_ERROR |
 				 RX_PKT_CMPL_ERRORS_L4_CS_ERROR |
@@ -472,8 +521,10 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
 
 	ol_flags = rxr->ol_flags_table[flags & ~errors];
 
-	if (errors)
+	if (unlikely(errors)) {
+		errors |= (flags & RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC) << 2;
 		ol_flags |= rxr->ol_flags_err_table[errors];
+	}
 
 	if (flags_type & RX_PKT_CMPL_FLAGS_RSS_VALID) {
 		mbuf->hash.rss = rte_le_to_cpu_32(rxcmp->rss_hash);
@@ -1107,7 +1158,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	bnxt_init_rxbds(ring, type, size);
 
 	/* Initialize offload flags parsing table. */
-	bnxt_init_ol_flags_tables(rxr);
+	bnxt_init_ol_flags_tables(rxq);
 
 	prod = rxr->rx_prod;
 	for (i = 0; i < ring->ring_size; i++) {
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 6ba997e150..46c34e6e16 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -42,8 +42,8 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
 /* Number of descriptors to process per inner loop in vector mode. */
 #define RTE_BNXT_DESCS_PER_LOOP		4U
 
-#define BNXT_OL_FLAGS_TBL_DIM	32
-#define BNXT_OL_FLAGS_ERR_TBL_DIM 16
+#define BNXT_OL_FLAGS_TBL_DIM	64
+#define BNXT_OL_FLAGS_ERR_TBL_DIM 32
 
 struct bnxt_tpa_info {
 	struct rte_mbuf			*mbuf;
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 226a3f22d4..54f47a3fe1 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -80,7 +80,7 @@ descs_to_mbufs(uint32x4_t mm_rxcmp[4], uint32x4_t mm_rxcmp1[4],
 	const uint32x4_t flags2_index_mask = vdupq_n_u32(0x1F);
 	const uint32x4_t flags2_error_mask = vdupq_n_u32(0x0F);
 	uint32x4_t flags_type, flags2, index, errors, rss_flags;
-	uint32x4_t tmp, ptype_idx;
+	uint32x4_t tmp, ptype_idx, is_tunnel;
 	uint64x2_t t0, t1;
 	uint32_t ol_flags;
 
@@ -117,10 +117,14 @@ descs_to_mbufs(uint32x4_t mm_rxcmp[4], uint32x4_t mm_rxcmp1[4],
 						    vget_low_u64(t1)));
 
 	/* Compute ol_flags and checksum error indexes for four packets. */
+	is_tunnel = vandq_u32(flags2, vdupq_n_u32(4));
+	is_tunnel = vshlq_n_u32(is_tunnel, 3);
 	errors = vandq_u32(vshrq_n_u32(errors, 4), flags2_error_mask);
 	errors = vandq_u32(errors, flags2);
 
 	index = vbicq_u32(flags2, errors);
+	errors = vorrq_u32(errors, vshrq_n_u32(is_tunnel, 1));
+	index = vorrq_u32(index, is_tunnel);
 
 	/* Update mbuf rearm_data for four packets. */
 	GET_OL_FLAGS(rss_flags, index, errors, 0, ol_flags);
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 982dac0d9c..621f567890 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -73,7 +73,7 @@ descs_to_mbufs(__m128i mm_rxcmp[4], __m128i mm_rxcmp1[4],
 	const __m128i rss_mask =
 		_mm_set1_epi32(RX_PKT_CMPL_FLAGS_RSS_VALID);
 	__m128i t0, t1, flags_type, flags2, index, errors, rss_flags;
-	__m128i ptype_idx;
+	__m128i ptype_idx, is_tunnel;
 	uint32_t ol_flags;
 
 	/* Compute packet type table indexes for four packets */
@@ -100,6 +100,8 @@ descs_to_mbufs(__m128i mm_rxcmp[4], __m128i mm_rxcmp1[4],
 	t1 = _mm_unpackhi_epi32(mm_rxcmp1[2], mm_rxcmp1[3]);
 
 	/* Compute ol_flags and checksum error indexes for four packets. */
+	is_tunnel = _mm_and_si128(flags2, _mm_set1_epi32(4));
+	is_tunnel = _mm_slli_epi32(is_tunnel, 3);
 	flags2 = _mm_and_si128(flags2, _mm_set1_epi32(0x1F));
 
 	errors = _mm_srli_epi32(_mm_unpacklo_epi64(t0, t1), 4);
@@ -107,6 +109,8 @@ descs_to_mbufs(__m128i mm_rxcmp[4], __m128i mm_rxcmp1[4],
 	errors = _mm_and_si128(errors, flags2);
 
 	index = _mm_andnot_si128(errors, flags2);
+	errors = _mm_or_si128(errors, _mm_srli_epi32(is_tunnel, 1));
+	index = _mm_or_si128(index, is_tunnel);
 
 	/* Update mbuf rearm_data for four packets. */
 	GET_OL_FLAGS(rss_flags, index, errors, 0, ol_flags);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.535741146 +0000
+++ 0073-net-bnxt-set-correct-checksum-status-in-mbuf.patch	2021-02-05 11:18:28.846691874 +0000
@@ -1 +1 @@
-From 48a580c5df78b3addac6f57969167bb86c7428f5 Mon Sep 17 00:00:00 2001
+From 9784d3a37c39e6820fdb06ff04f958491c1d075b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48a580c5df78b3addac6f57969167bb86c7428f5 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -25 +25 @@
-index 1edc8dac43..14901f1b99 100644
+index cba03bb38e..46e3fed127 100644
@@ -28 +28 @@
-@@ -416,43 +416,91 @@ bnxt_parse_pkt_type(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1)
+@@ -407,43 +407,91 @@ bnxt_parse_pkt_type(struct rx_pkt_cmpl *rxcmp, struct rx_pkt_cmpl_hi *rxcmp1)
@@ -135 +135 @@
-@@ -472,6 +520,7 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
+@@ -463,6 +511,7 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
@@ -143 +143 @@
-@@ -481,8 +530,10 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
+@@ -472,8 +521,10 @@ bnxt_set_ol_flags(struct bnxt_rx_ring_info *rxr, struct rx_pkt_cmpl *rxcmp,
@@ -155 +155 @@
-@@ -1125,7 +1176,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -1107,7 +1158,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
@@ -162 +162 @@
- 	raw_prod = rxr->rx_raw_prod;
+ 	prod = rxr->rx_prod;
@@ -165 +165 @@
-index 4db1e8761e..b2942030ab 100644
+index 6ba997e150..46c34e6e16 100644
@@ -180 +180 @@
-index d9ac822be8..4839e2a38d 100644
+index 226a3f22d4..54f47a3fe1 100644
@@ -208 +208 @@
-index 7f5825d333..c2523040e8 100644
+index 982dac0d9c..621f567890 100644

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

* [dpdk-stable] patch 'app/testpmd: release flows left before port stop' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (71 preceding siblings ...)
  2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: set correct checksum status in mbuf' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix tunnel rules validation on VF representor' " luca.boccassi
                   ` (201 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Ori Kam, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 3e33fc7c8b0f68d34f3053daafd591245e712f25 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 26 Nov 2020 18:43:02 +0200
Subject: [PATCH] app/testpmd: release flows left before port stop

[ upstream commit 0f93edbf7c874480e21e365f527fecdb305984b9 ]

According to RTE flow user guide, PMD will not keep flow rules after
port stop. Application resources that refer to flow rules become
obsolete after port stop and must not be used.
Testpmd maintains linked list of active flows for each port. Entries in
that list are allocated dynamically and must be explicitly released to
prevent memory leak.
The patch releases testpmd port flow_list that holds remaining flows
before port is stopped.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 app/test-pmd/testpmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 33a060dffd..2b60f6c5d3 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2734,6 +2734,9 @@ stop_port(portid_t pid)
 			}
 		}
 
+		if (port->flow_list)
+			port_flow_flush(pi);
+
 		if (rte_eth_dev_stop(pi) != 0)
 			RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n",
 				pi);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.579515480 +0000
+++ 0074-app-testpmd-release-flows-left-before-port-stop.patch	2021-02-05 11:18:28.850691949 +0000
@@ -1 +1 @@
-From 0f93edbf7c874480e21e365f527fecdb305984b9 Mon Sep 17 00:00:00 2001
+From 3e33fc7c8b0f68d34f3053daafd591245e712f25 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f93edbf7c874480e21e365f527fecdb305984b9 ]
+
@@ -14,2 +15,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix tunnel rules validation on VF representor' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (72 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'app/testpmd: release flows left before port stop' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix constant array size' " luca.boccassi
                   ` (200 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 09a68cd6a088cac78547fc7778cbe77d46dc3816 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Fri, 11 Dec 2020 16:46:14 +0200
Subject: [PATCH] net/mlx5: fix tunnel rules validation on VF representor

[ upstream commit 187f942b2de0856e62ae10a8b79469f8c4c487fa ]

MLX5 PMD implicitly adds vxlan_decap flow action to tunnel offload
match type rules. However, VXLAN decap action on VF representors is
not supported on MLX5 PMD hardware.

The patch rejects attempt to create tunnel offload flow rules on VF
representor.

Refer commit 9c4971e5231d ("net/mlx5: update VLAN and encap actions validation")

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f61943f193..7225c8074d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5282,6 +5282,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	} else {
 		tunnel = NULL;
 	}
+	if (tunnel && priv->representor)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					  "decap not supported "
+					  "for VF representor");
 	grp_info.std_tbl_fix = tunnel_use_standard_attr_group_translate
 				(dev, tunnel, attr, items, actions);
 	ret = flow_dv_validate_attributes(dev, tunnel, attr, &grp_info, error);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.618268919 +0000
+++ 0075-net-mlx5-fix-tunnel-rules-validation-on-VF-represent.patch	2021-02-05 11:18:28.858692102 +0000
@@ -1 +1 @@
-From 187f942b2de0856e62ae10a8b79469f8c4c487fa Mon Sep 17 00:00:00 2001
+From 09a68cd6a088cac78547fc7778cbe77d46dc3816 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 187f942b2de0856e62ae10a8b79469f8c4c487fa ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7c2b389c63..4f638e24ad 100644
+index f61943f193..7225c8074d 100644
@@ -28 +29 @@
-@@ -5280,6 +5280,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5282,6 +5282,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,

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

* [dpdk-stable] patch 'net/mlx5: fix constant array size' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (73 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix tunnel rules validation on VF representor' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix freeing packet pacing' " luca.boccassi
                   ` (199 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Ophir Munk, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 89e0cd5ca7baa647abacbc96093d04a7e52dafd5 Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Mon, 28 Dec 2020 11:54:05 +0200
Subject: [PATCH] net/mlx5: fix constant array size

[ upstream commit 09a5e9777e7eb0179e0f9a3b6830c89702df0bd7 ]

Before this commit the PMD used:
   const int elt_n = 8
   const int *stack[elt_n];

In Windows clang compiler complains:
net/mlx5/mlx5_flow.c:215:19: error: variable length array folded
to constant array as an extension [-Werror,-Wgnu-folding-constant]

Fix it by using a constant macro definition instead of a variable:
   #define MLX5_RSS_EXP_ELT_N 8
   const int *stack[MLX5_RSS_EXP_ELT_N];

Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 52ade39a42..a4cf63b235 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -212,6 +212,8 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 	return ret;
 }
 
+#define MLX5_RSS_EXP_ELT_N 8
+
 /**
  * Expand RSS flows into several possible flows according to the RSS hash
  * fields requested and the driver capabilities.
@@ -242,13 +244,12 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
 		     const struct mlx5_flow_expand_node graph[],
 		     int graph_root_index)
 {
-	const int elt_n = 8;
 	const struct rte_flow_item *item;
 	const struct mlx5_flow_expand_node *node = &graph[graph_root_index];
 	const int *next_node;
-	const int *stack[elt_n];
+	const int *stack[MLX5_RSS_EXP_ELT_N];
 	int stack_pos = 0;
-	struct rte_flow_item flow_items[elt_n];
+	struct rte_flow_item flow_items[MLX5_RSS_EXP_ELT_N];
 	unsigned int i;
 	size_t lsize;
 	size_t user_pattern_size = 0;
@@ -261,10 +262,10 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
 
 	memset(&missed_item, 0, sizeof(missed_item));
 	lsize = offsetof(struct mlx5_flow_expand_rss, entry) +
-		elt_n * sizeof(buf->entry[0]);
+		MLX5_RSS_EXP_ELT_N * sizeof(buf->entry[0]);
 	if (lsize <= size) {
 		buf->entry[0].priority = 0;
-		buf->entry[0].pattern = (void *)&buf->entry[elt_n];
+		buf->entry[0].pattern = (void *)&buf->entry[MLX5_RSS_EXP_ELT_N];
 		buf->entries = 0;
 		addr = buf->entry[0].pattern;
 	}
@@ -367,7 +368,7 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
 		/* Go deeper. */
 		if (node->next) {
 			next_node = node->next;
-			if (stack_pos++ == elt_n) {
+			if (stack_pos++ == MLX5_RSS_EXP_ELT_N) {
 				rte_errno = E2BIG;
 				return -rte_errno;
 			}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.671293426 +0000
+++ 0076-net-mlx5-fix-constant-array-size.patch	2021-02-05 11:18:28.866692254 +0000
@@ -1 +1 @@
-From 09a5e9777e7eb0179e0f9a3b6830c89702df0bd7 Mon Sep 17 00:00:00 2001
+From 89e0cd5ca7baa647abacbc96093d04a7e52dafd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 09a5e9777e7eb0179e0f9a3b6830c89702df0bd7 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 82e24d7067..bf86aaaa39 100644
+index 52ade39a42..a4cf63b235 100644

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

* [dpdk-stable] patch 'net/mlx5: fix freeing packet pacing' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (74 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix constant array size' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix flow action destroy wrapper' " luca.boccassi
                   ` (198 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ophir Munk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c9de97e2e9339f7e6220823b716ee09040944229 Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@nvidia.com>
Date: Mon, 28 Dec 2020 11:54:08 +0200
Subject: [PATCH] net/mlx5: fix freeing packet pacing

[ upstream commit b492e28882f7009421d133126aa7524c02339ba3 ]

Packet pacing is allocated under condition #ifdef HAVE_MLX5DV_PP_ALLOC.
In a similar way - free packet pacing index under the same condition.
This update is required to successfully compile under operating systems
which do not support packet pacing.

Fixes: aef1e20ebeb2 ("net/mlx5: allocate packet pacing context")

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_txpp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c
index 2438bf1f1d..21675ab17a 100644
--- a/drivers/net/mlx5/mlx5_txpp.c
+++ b/drivers/net/mlx5/mlx5_txpp.c
@@ -57,11 +57,16 @@ mlx5_txpp_create_event_channel(struct mlx5_dev_ctx_shared *sh)
 static void
 mlx5_txpp_free_pp_index(struct mlx5_dev_ctx_shared *sh)
 {
+#ifdef HAVE_MLX5DV_PP_ALLOC
 	if (sh->txpp.pp) {
 		mlx5_glue->dv_free_pp(sh->txpp.pp);
 		sh->txpp.pp = NULL;
 		sh->txpp.pp_id = 0;
 	}
+#else
+	RTE_SET_USED(sh);
+	DRV_LOG(ERR, "Freeing pacing index is not supported.");
+#endif
 }
 
 /* Allocate Packet Pacing index from kernel via mlx5dv call. */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.716437556 +0000
+++ 0077-net-mlx5-fix-freeing-packet-pacing.patch	2021-02-05 11:18:28.866692254 +0000
@@ -1 +1 @@
-From b492e28882f7009421d133126aa7524c02339ba3 Mon Sep 17 00:00:00 2001
+From c9de97e2e9339f7e6220823b716ee09040944229 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b492e28882f7009421d133126aa7524c02339ba3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix flow action destroy wrapper' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (75 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix freeing packet pacing' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix flow operation wrapper per OS' " luca.boccassi
                   ` (197 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ophir Munk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a49c923bd11c28be38038094d3d0a0c7881de194 Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@nvidia.com>
Date: Mon, 28 Dec 2020 11:54:15 +0200
Subject: [PATCH] net/mlx5: fix flow action destroy wrapper

[ upstream commit 223f2c2162bfd8c5f9ac51dfb1eb3d8f87554880 ]

Glue function destroy_flow_action() was wrapped by OS specific operation
mlx5_flow_os_destroy_flow_action(). It was skipped in file mlx5.c.

Fixes: b293fbf9672b ("net/mlx5: add OS specific flow actions operations")

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5.c         | 7 ++++---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ca3667a469..591750a3ff 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -37,6 +37,7 @@
 #include "mlx5_autoconf.h"
 #include "mlx5_mr.h"
 #include "mlx5_flow.h"
+#include "mlx5_flow_os.h"
 #include "rte_pmd_mlx5.h"
 
 /* Device parameter to enable RX completion queue compression. */
@@ -413,8 +414,8 @@ mlx5_flow_aso_age_mng_close(struct mlx5_dev_ctx_shared *sh)
 			for (j = 0; j < MLX5_COUNTERS_PER_POOL; ++j)
 				if (pool->actions[j].dr_action)
 					claim_zero
-						(mlx5_glue->destroy_flow_action
-						  (pool->actions[j].dr_action));
+					    (mlx5_flow_os_destroy_flow_action
+					      (pool->actions[j].dr_action));
 			mlx5_free(pool);
 		}
 		mlx5_free(sh->aso_age_mng->pools);
@@ -521,7 +522,7 @@ mlx5_flow_counters_mng_close(struct mlx5_dev_ctx_shared *sh)
 
 				if (cnt->action)
 					claim_zero
-					 (mlx5_glue->destroy_flow_action
+					 (mlx5_flow_os_destroy_flow_action
 					  (cnt->action));
 				if (fallback && MLX5_POOL_GET_CNT
 				    (pool, j)->dcs_when_free)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7225c8074d..618e248799 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11092,11 +11092,11 @@ flow_dv_sample_remove_cb(struct mlx5_cache_list *list __rte_unused,
 	struct mlx5_priv *priv = dev->data->dev_private;
 
 	if (cache_resource->verbs_action)
-		claim_zero(mlx5_glue->destroy_flow_action
+		claim_zero(mlx5_flow_os_destroy_flow_action
 				(cache_resource->verbs_action));
 	if (cache_resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB) {
 		if (cache_resource->default_miss)
-			claim_zero(mlx5_glue->destroy_flow_action
+			claim_zero(mlx5_flow_os_destroy_flow_action
 			  (cache_resource->default_miss));
 	}
 	if (cache_resource->normal_path_tbl)
@@ -11149,7 +11149,7 @@ flow_dv_dest_array_remove_cb(struct mlx5_cache_list *list __rte_unused,
 
 	MLX5_ASSERT(cache_resource->action);
 	if (cache_resource->action)
-		claim_zero(mlx5_glue->destroy_flow_action
+		claim_zero(mlx5_flow_os_destroy_flow_action
 					(cache_resource->action));
 	for (; i < cache_resource->num_of_dest; i++)
 		flow_dv_sample_sub_actions_release(dev,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.758584521 +0000
+++ 0078-net-mlx5-fix-flow-action-destroy-wrapper.patch	2021-02-05 11:18:28.874692407 +0000
@@ -1 +1 @@
-From 223f2c2162bfd8c5f9ac51dfb1eb3d8f87554880 Mon Sep 17 00:00:00 2001
+From a49c923bd11c28be38038094d3d0a0c7881de194 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 223f2c2162bfd8c5f9ac51dfb1eb3d8f87554880 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 84123f8e3d..60301d3244 100644
+index ca3667a469..591750a3ff 100644
@@ -23 +24 @@
-@@ -38,6 +38,7 @@
+@@ -37,6 +37,7 @@
@@ -31 +32 @@
-@@ -415,8 +416,8 @@ mlx5_flow_aso_age_mng_close(struct mlx5_dev_ctx_shared *sh)
+@@ -413,8 +414,8 @@ mlx5_flow_aso_age_mng_close(struct mlx5_dev_ctx_shared *sh)
@@ -42 +43 @@
-@@ -523,7 +524,7 @@ mlx5_flow_counters_mng_close(struct mlx5_dev_ctx_shared *sh)
+@@ -521,7 +522,7 @@ mlx5_flow_counters_mng_close(struct mlx5_dev_ctx_shared *sh)
@@ -52 +53 @@
-index 4f638e24ad..20ff1fb5dd 100644
+index 7225c8074d..618e248799 100644
@@ -55 +56 @@
-@@ -11117,11 +11117,11 @@ flow_dv_sample_remove_cb(struct mlx5_cache_list *list __rte_unused,
+@@ -11092,11 +11092,11 @@ flow_dv_sample_remove_cb(struct mlx5_cache_list *list __rte_unused,
@@ -69 +70 @@
-@@ -11174,7 +11174,7 @@ flow_dv_dest_array_remove_cb(struct mlx5_cache_list *list __rte_unused,
+@@ -11149,7 +11149,7 @@ flow_dv_dest_array_remove_cb(struct mlx5_cache_list *list __rte_unused,

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

* [dpdk-stable] patch 'net/mlx5: fix flow operation wrapper per OS' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (76 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix flow action destroy wrapper' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: unify operations for all " luca.boccassi
                   ` (196 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ophir Munk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 6cb2325330a3468535094b469cc9c1c1288c4f64 Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@nvidia.com>
Date: Mon, 28 Dec 2020 14:32:50 +0200
Subject: [PATCH] net/mlx5: fix flow operation wrapper per OS

[ upstream commit 880197231387ce597a1b3d3d6ae50d7eff052870 ]

Wrap glue call dv_create_flow_action_dest_devx_tir() with an OS API.

Fixes: b293fbf9672b ("net/mlx5: add OS specific flow actions operations")

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_flow_os.h | 26 ++++++++++++++++++++++++++
 drivers/net/mlx5/mlx5_devx.c          |  7 +++----
 2 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.h b/drivers/net/mlx5/linux/mlx5_flow_os.h
index a6bd2c01e1..73ed62655e 100644
--- a/drivers/net/mlx5/linux/mlx5_flow_os.h
+++ b/drivers/net/mlx5/linux/mlx5_flow_os.h
@@ -350,6 +350,32 @@ mlx5_flow_os_create_flow_action_drop(void **action)
 	return (*action) ? 0 : -1;
 }
 
+/**
+ * Create flow action: dest_devx_tir
+ *
+ * @param[in] tir
+ *   Pointer to DevX tir object
+ * @param[out] action
+ *   Pointer to a valid action on success, NULL otherwise.
+ *
+ * @return
+ *   0 on success, or -1 on failure and errno is set.
+ */
+static inline int
+mlx5_flow_os_create_flow_action_dest_devx_tir(struct mlx5_devx_obj *tir,
+					      void **action)
+{
+#ifdef HAVE_IBV_FLOW_DV_SUPPORT
+	*action = mlx5_glue->dv_create_flow_action_dest_devx_tir(tir->obj);
+	return (*action) ? 0 : -1;
+#else
+	/* If no DV support - skip the operation and return success */
+	RTE_SET_USED(tir);
+	*action = 0;
+	return 0;
+#endif
+}
+
 /**
  * Destroy flow action.
  *
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index de9b204075..33213a3df2 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -23,7 +23,7 @@
 #include "mlx5_utils.h"
 #include "mlx5_devx.h"
 #include "mlx5_flow.h"
-
+#include "mlx5_flow_os.h"
 
 /**
  * Modify RQ vlan stripping offload
@@ -942,9 +942,8 @@ mlx5_devx_hrxq_new(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq,
 		goto error;
 	}
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
-	hrxq->action = mlx5_glue->dv_create_flow_action_dest_devx_tir
-							       (hrxq->tir->obj);
-	if (!hrxq->action) {
+	if (mlx5_flow_os_create_flow_action_dest_devx_tir(hrxq->tir,
+							  &hrxq->action)) {
 		rte_errno = errno;
 		goto error;
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.803648251 +0000
+++ 0079-net-mlx5-fix-flow-operation-wrapper-per-OS.patch	2021-02-05 11:18:28.878692483 +0000
@@ -1 +1 @@
-From 880197231387ce597a1b3d3d6ae50d7eff052870 Mon Sep 17 00:00:00 2001
+From 6cb2325330a3468535094b469cc9c1c1288c4f64 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 880197231387ce597a1b3d3d6ae50d7eff052870 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 7706b3be48..6f3b7324ff 100644
+index a6bd2c01e1..73ed62655e 100644
@@ -22 +23 @@
-@@ -366,6 +366,32 @@ mlx5_flow_os_create_flow_action_default_miss(void **action)
+@@ -350,6 +350,32 @@ mlx5_flow_os_create_flow_action_drop(void **action)
@@ -56 +57 @@
-index 84a5c55ee0..aa8ca7f401 100644
+index de9b204075..33213a3df2 100644

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

* [dpdk-stable] patch 'net/mlx5: unify operations for all OS' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (77 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix flow operation wrapper per OS' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix device name size on Windows' " luca.boccassi
                   ` (195 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ophir Munk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From d8277bf9f26d0fdfbcd9a05fb45f15ea02bbd67a Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@nvidia.com>
Date: Mon, 28 Dec 2020 14:32:56 +0200
Subject: [PATCH] net/mlx5: unify operations for all OS

[ upstream commit b012b4ce72d7168c886ec00b1346c0f768541ad7 ]

There are three types of eth_dev_ops: primary, secondary and isolate
represented in three callback tables per OS.  In this commit the OS
specific eth dev tables are unified into shared tables in file mlx5.c.
Starting from this commit all operating systems must implement the same
eth dev APIs. In case an OS does not support an API - it can return in
its implementation an error ENOTSUP.

Fixes: 042f5c94fd3a ("net/mlx5: refactor device operations for Linux")

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 154 +------------------------------
 drivers/net/mlx5/mlx5.c          | 150 ++++++++++++++++++++++++++++++
 drivers/net/mlx5/mlx5.h          |   6 +-
 drivers/net/mlx5/mlx5_flow.c     |   4 +-
 4 files changed, 157 insertions(+), 157 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 9062191dd1..750ca7557f 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -751,7 +751,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 				rte_eth_devices[priv->sh->bond_dev].device;
 		else
 			eth_dev->device = dpdk_dev;
-		eth_dev->dev_ops = &mlx5_os_dev_sec_ops;
+		eth_dev->dev_ops = &mlx5_dev_sec_ops;
 		eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
 		eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
 		err = mlx5_proc_priv_init(eth_dev);
@@ -1426,7 +1426,7 @@ err_secondary:
 	/* Initialize burst functions to prevent crashes before link-up. */
 	eth_dev->rx_pkt_burst = removed_rx_burst;
 	eth_dev->tx_pkt_burst = removed_tx_burst;
-	eth_dev->dev_ops = &mlx5_os_dev_ops;
+	eth_dev->dev_ops = &mlx5_dev_ops;
 	eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
 	eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
 	eth_dev->rx_queue_count = mlx5_rx_queue_count;
@@ -2605,153 +2605,3 @@ mlx5_os_mac_addr_flush(struct rte_eth_dev *dev)
 			       dev->data->mac_addrs,
 			       MLX5_MAX_MAC_ADDRESSES, priv->mac_own);
 }
-
-const struct eth_dev_ops mlx5_os_dev_ops = {
-	.dev_configure = mlx5_dev_configure,
-	.dev_start = mlx5_dev_start,
-	.dev_stop = mlx5_dev_stop,
-	.dev_set_link_down = mlx5_set_link_down,
-	.dev_set_link_up = mlx5_set_link_up,
-	.dev_close = mlx5_dev_close,
-	.promiscuous_enable = mlx5_promiscuous_enable,
-	.promiscuous_disable = mlx5_promiscuous_disable,
-	.allmulticast_enable = mlx5_allmulticast_enable,
-	.allmulticast_disable = mlx5_allmulticast_disable,
-	.link_update = mlx5_link_update,
-	.stats_get = mlx5_stats_get,
-	.stats_reset = mlx5_stats_reset,
-	.xstats_get = mlx5_xstats_get,
-	.xstats_reset = mlx5_xstats_reset,
-	.xstats_get_names = mlx5_xstats_get_names,
-	.fw_version_get = mlx5_fw_version_get,
-	.dev_infos_get = mlx5_dev_infos_get,
-	.read_clock = mlx5_txpp_read_clock,
-	.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
-	.vlan_filter_set = mlx5_vlan_filter_set,
-	.rx_queue_setup = mlx5_rx_queue_setup,
-	.rx_hairpin_queue_setup = mlx5_rx_hairpin_queue_setup,
-	.tx_queue_setup = mlx5_tx_queue_setup,
-	.tx_hairpin_queue_setup = mlx5_tx_hairpin_queue_setup,
-	.rx_queue_release = mlx5_rx_queue_release,
-	.tx_queue_release = mlx5_tx_queue_release,
-	.rx_queue_start = mlx5_rx_queue_start,
-	.rx_queue_stop = mlx5_rx_queue_stop,
-	.tx_queue_start = mlx5_tx_queue_start,
-	.tx_queue_stop = mlx5_tx_queue_stop,
-	.flow_ctrl_get = mlx5_dev_get_flow_ctrl,
-	.flow_ctrl_set = mlx5_dev_set_flow_ctrl,
-	.mac_addr_remove = mlx5_mac_addr_remove,
-	.mac_addr_add = mlx5_mac_addr_add,
-	.mac_addr_set = mlx5_mac_addr_set,
-	.set_mc_addr_list = mlx5_set_mc_addr_list,
-	.mtu_set = mlx5_dev_set_mtu,
-	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
-	.vlan_offload_set = mlx5_vlan_offload_set,
-	.reta_update = mlx5_dev_rss_reta_update,
-	.reta_query = mlx5_dev_rss_reta_query,
-	.rss_hash_update = mlx5_rss_hash_update,
-	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
-	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rxq_info_get = mlx5_rxq_info_get,
-	.txq_info_get = mlx5_txq_info_get,
-	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
-	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.rx_queue_intr_enable = mlx5_rx_intr_enable,
-	.rx_queue_intr_disable = mlx5_rx_intr_disable,
-	.is_removed = mlx5_is_removed,
-	.udp_tunnel_port_add  = mlx5_udp_tunnel_port_add,
-	.get_module_info = mlx5_get_module_info,
-	.get_module_eeprom = mlx5_get_module_eeprom,
-	.hairpin_cap_get = mlx5_hairpin_cap_get,
-	.mtr_ops_get = mlx5_flow_meter_ops_get,
-	.hairpin_bind = mlx5_hairpin_bind,
-	.hairpin_unbind = mlx5_hairpin_unbind,
-	.hairpin_get_peer_ports = mlx5_hairpin_get_peer_ports,
-	.hairpin_queue_peer_update = mlx5_hairpin_queue_peer_update,
-	.hairpin_queue_peer_bind = mlx5_hairpin_queue_peer_bind,
-	.hairpin_queue_peer_unbind = mlx5_hairpin_queue_peer_unbind,
-};
-
-/* Available operations from secondary process. */
-const struct eth_dev_ops mlx5_os_dev_sec_ops = {
-	.stats_get = mlx5_stats_get,
-	.stats_reset = mlx5_stats_reset,
-	.xstats_get = mlx5_xstats_get,
-	.xstats_reset = mlx5_xstats_reset,
-	.xstats_get_names = mlx5_xstats_get_names,
-	.fw_version_get = mlx5_fw_version_get,
-	.dev_infos_get = mlx5_dev_infos_get,
-	.read_clock = mlx5_txpp_read_clock,
-	.rx_queue_start = mlx5_rx_queue_start,
-	.rx_queue_stop = mlx5_rx_queue_stop,
-	.tx_queue_start = mlx5_tx_queue_start,
-	.tx_queue_stop = mlx5_tx_queue_stop,
-	.rxq_info_get = mlx5_rxq_info_get,
-	.txq_info_get = mlx5_txq_info_get,
-	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
-	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.get_module_info = mlx5_get_module_info,
-	.get_module_eeprom = mlx5_get_module_eeprom,
-};
-
-/* Available operations in flow isolated mode. */
-const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
-	.dev_configure = mlx5_dev_configure,
-	.dev_start = mlx5_dev_start,
-	.dev_stop = mlx5_dev_stop,
-	.dev_set_link_down = mlx5_set_link_down,
-	.dev_set_link_up = mlx5_set_link_up,
-	.dev_close = mlx5_dev_close,
-	.promiscuous_enable = mlx5_promiscuous_enable,
-	.promiscuous_disable = mlx5_promiscuous_disable,
-	.allmulticast_enable = mlx5_allmulticast_enable,
-	.allmulticast_disable = mlx5_allmulticast_disable,
-	.link_update = mlx5_link_update,
-	.stats_get = mlx5_stats_get,
-	.stats_reset = mlx5_stats_reset,
-	.xstats_get = mlx5_xstats_get,
-	.xstats_reset = mlx5_xstats_reset,
-	.xstats_get_names = mlx5_xstats_get_names,
-	.fw_version_get = mlx5_fw_version_get,
-	.dev_infos_get = mlx5_dev_infos_get,
-	.read_clock = mlx5_txpp_read_clock,
-	.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
-	.vlan_filter_set = mlx5_vlan_filter_set,
-	.rx_queue_setup = mlx5_rx_queue_setup,
-	.rx_hairpin_queue_setup = mlx5_rx_hairpin_queue_setup,
-	.tx_queue_setup = mlx5_tx_queue_setup,
-	.tx_hairpin_queue_setup = mlx5_tx_hairpin_queue_setup,
-	.rx_queue_release = mlx5_rx_queue_release,
-	.tx_queue_release = mlx5_tx_queue_release,
-	.rx_queue_start = mlx5_rx_queue_start,
-	.rx_queue_stop = mlx5_rx_queue_stop,
-	.tx_queue_start = mlx5_tx_queue_start,
-	.tx_queue_stop = mlx5_tx_queue_stop,
-	.flow_ctrl_get = mlx5_dev_get_flow_ctrl,
-	.flow_ctrl_set = mlx5_dev_set_flow_ctrl,
-	.mac_addr_remove = mlx5_mac_addr_remove,
-	.mac_addr_add = mlx5_mac_addr_add,
-	.mac_addr_set = mlx5_mac_addr_set,
-	.set_mc_addr_list = mlx5_set_mc_addr_list,
-	.mtu_set = mlx5_dev_set_mtu,
-	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
-	.vlan_offload_set = mlx5_vlan_offload_set,
-	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rxq_info_get = mlx5_rxq_info_get,
-	.txq_info_get = mlx5_txq_info_get,
-	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
-	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.rx_queue_intr_enable = mlx5_rx_intr_enable,
-	.rx_queue_intr_disable = mlx5_rx_intr_disable,
-	.is_removed = mlx5_is_removed,
-	.get_module_info = mlx5_get_module_info,
-	.get_module_eeprom = mlx5_get_module_eeprom,
-	.hairpin_cap_get = mlx5_hairpin_cap_get,
-	.mtr_ops_get = mlx5_flow_meter_ops_get,
-	.hairpin_bind = mlx5_hairpin_bind,
-	.hairpin_unbind = mlx5_hairpin_unbind,
-	.hairpin_get_peer_ports = mlx5_hairpin_get_peer_ports,
-	.hairpin_queue_peer_update = mlx5_hairpin_queue_peer_update,
-	.hairpin_queue_peer_bind = mlx5_hairpin_queue_peer_bind,
-	.hairpin_queue_peer_unbind = mlx5_hairpin_queue_peer_unbind,
-};
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 591750a3ff..ebad6a0709 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1427,6 +1427,156 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	return 0;
 }
 
+const struct eth_dev_ops mlx5_dev_ops = {
+	.dev_configure = mlx5_dev_configure,
+	.dev_start = mlx5_dev_start,
+	.dev_stop = mlx5_dev_stop,
+	.dev_set_link_down = mlx5_set_link_down,
+	.dev_set_link_up = mlx5_set_link_up,
+	.dev_close = mlx5_dev_close,
+	.promiscuous_enable = mlx5_promiscuous_enable,
+	.promiscuous_disable = mlx5_promiscuous_disable,
+	.allmulticast_enable = mlx5_allmulticast_enable,
+	.allmulticast_disable = mlx5_allmulticast_disable,
+	.link_update = mlx5_link_update,
+	.stats_get = mlx5_stats_get,
+	.stats_reset = mlx5_stats_reset,
+	.xstats_get = mlx5_xstats_get,
+	.xstats_reset = mlx5_xstats_reset,
+	.xstats_get_names = mlx5_xstats_get_names,
+	.fw_version_get = mlx5_fw_version_get,
+	.dev_infos_get = mlx5_dev_infos_get,
+	.read_clock = mlx5_txpp_read_clock,
+	.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
+	.vlan_filter_set = mlx5_vlan_filter_set,
+	.rx_queue_setup = mlx5_rx_queue_setup,
+	.rx_hairpin_queue_setup = mlx5_rx_hairpin_queue_setup,
+	.tx_queue_setup = mlx5_tx_queue_setup,
+	.tx_hairpin_queue_setup = mlx5_tx_hairpin_queue_setup,
+	.rx_queue_release = mlx5_rx_queue_release,
+	.tx_queue_release = mlx5_tx_queue_release,
+	.rx_queue_start = mlx5_rx_queue_start,
+	.rx_queue_stop = mlx5_rx_queue_stop,
+	.tx_queue_start = mlx5_tx_queue_start,
+	.tx_queue_stop = mlx5_tx_queue_stop,
+	.flow_ctrl_get = mlx5_dev_get_flow_ctrl,
+	.flow_ctrl_set = mlx5_dev_set_flow_ctrl,
+	.mac_addr_remove = mlx5_mac_addr_remove,
+	.mac_addr_add = mlx5_mac_addr_add,
+	.mac_addr_set = mlx5_mac_addr_set,
+	.set_mc_addr_list = mlx5_set_mc_addr_list,
+	.mtu_set = mlx5_dev_set_mtu,
+	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
+	.vlan_offload_set = mlx5_vlan_offload_set,
+	.reta_update = mlx5_dev_rss_reta_update,
+	.reta_query = mlx5_dev_rss_reta_query,
+	.rss_hash_update = mlx5_rss_hash_update,
+	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
+	.filter_ctrl = mlx5_dev_filter_ctrl,
+	.rxq_info_get = mlx5_rxq_info_get,
+	.txq_info_get = mlx5_txq_info_get,
+	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
+	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
+	.rx_queue_intr_enable = mlx5_rx_intr_enable,
+	.rx_queue_intr_disable = mlx5_rx_intr_disable,
+	.is_removed = mlx5_is_removed,
+	.udp_tunnel_port_add  = mlx5_udp_tunnel_port_add,
+	.get_module_info = mlx5_get_module_info,
+	.get_module_eeprom = mlx5_get_module_eeprom,
+	.hairpin_cap_get = mlx5_hairpin_cap_get,
+	.mtr_ops_get = mlx5_flow_meter_ops_get,
+	.hairpin_bind = mlx5_hairpin_bind,
+	.hairpin_unbind = mlx5_hairpin_unbind,
+	.hairpin_get_peer_ports = mlx5_hairpin_get_peer_ports,
+	.hairpin_queue_peer_update = mlx5_hairpin_queue_peer_update,
+	.hairpin_queue_peer_bind = mlx5_hairpin_queue_peer_bind,
+	.hairpin_queue_peer_unbind = mlx5_hairpin_queue_peer_unbind,
+};
+
+/* Available operations from secondary process. */
+const struct eth_dev_ops mlx5_dev_sec_ops = {
+	.stats_get = mlx5_stats_get,
+	.stats_reset = mlx5_stats_reset,
+	.xstats_get = mlx5_xstats_get,
+	.xstats_reset = mlx5_xstats_reset,
+	.xstats_get_names = mlx5_xstats_get_names,
+	.fw_version_get = mlx5_fw_version_get,
+	.dev_infos_get = mlx5_dev_infos_get,
+	.read_clock = mlx5_txpp_read_clock,
+	.rx_queue_start = mlx5_rx_queue_start,
+	.rx_queue_stop = mlx5_rx_queue_stop,
+	.tx_queue_start = mlx5_tx_queue_start,
+	.tx_queue_stop = mlx5_tx_queue_stop,
+	.rxq_info_get = mlx5_rxq_info_get,
+	.txq_info_get = mlx5_txq_info_get,
+	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
+	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
+	.get_module_info = mlx5_get_module_info,
+	.get_module_eeprom = mlx5_get_module_eeprom,
+};
+
+/* Available operations in flow isolated mode. */
+const struct eth_dev_ops mlx5_dev_ops_isolate = {
+	.dev_configure = mlx5_dev_configure,
+	.dev_start = mlx5_dev_start,
+	.dev_stop = mlx5_dev_stop,
+	.dev_set_link_down = mlx5_set_link_down,
+	.dev_set_link_up = mlx5_set_link_up,
+	.dev_close = mlx5_dev_close,
+	.promiscuous_enable = mlx5_promiscuous_enable,
+	.promiscuous_disable = mlx5_promiscuous_disable,
+	.allmulticast_enable = mlx5_allmulticast_enable,
+	.allmulticast_disable = mlx5_allmulticast_disable,
+	.link_update = mlx5_link_update,
+	.stats_get = mlx5_stats_get,
+	.stats_reset = mlx5_stats_reset,
+	.xstats_get = mlx5_xstats_get,
+	.xstats_reset = mlx5_xstats_reset,
+	.xstats_get_names = mlx5_xstats_get_names,
+	.fw_version_get = mlx5_fw_version_get,
+	.dev_infos_get = mlx5_dev_infos_get,
+	.read_clock = mlx5_txpp_read_clock,
+	.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
+	.vlan_filter_set = mlx5_vlan_filter_set,
+	.rx_queue_setup = mlx5_rx_queue_setup,
+	.rx_hairpin_queue_setup = mlx5_rx_hairpin_queue_setup,
+	.tx_queue_setup = mlx5_tx_queue_setup,
+	.tx_hairpin_queue_setup = mlx5_tx_hairpin_queue_setup,
+	.rx_queue_release = mlx5_rx_queue_release,
+	.tx_queue_release = mlx5_tx_queue_release,
+	.rx_queue_start = mlx5_rx_queue_start,
+	.rx_queue_stop = mlx5_rx_queue_stop,
+	.tx_queue_start = mlx5_tx_queue_start,
+	.tx_queue_stop = mlx5_tx_queue_stop,
+	.flow_ctrl_get = mlx5_dev_get_flow_ctrl,
+	.flow_ctrl_set = mlx5_dev_set_flow_ctrl,
+	.mac_addr_remove = mlx5_mac_addr_remove,
+	.mac_addr_add = mlx5_mac_addr_add,
+	.mac_addr_set = mlx5_mac_addr_set,
+	.set_mc_addr_list = mlx5_set_mc_addr_list,
+	.mtu_set = mlx5_dev_set_mtu,
+	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
+	.vlan_offload_set = mlx5_vlan_offload_set,
+	.filter_ctrl = mlx5_dev_filter_ctrl,
+	.rxq_info_get = mlx5_rxq_info_get,
+	.txq_info_get = mlx5_txq_info_get,
+	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
+	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
+	.rx_queue_intr_enable = mlx5_rx_intr_enable,
+	.rx_queue_intr_disable = mlx5_rx_intr_disable,
+	.is_removed = mlx5_is_removed,
+	.get_module_info = mlx5_get_module_info,
+	.get_module_eeprom = mlx5_get_module_eeprom,
+	.hairpin_cap_get = mlx5_hairpin_cap_get,
+	.mtr_ops_get = mlx5_flow_meter_ops_get,
+	.hairpin_bind = mlx5_hairpin_bind,
+	.hairpin_unbind = mlx5_hairpin_unbind,
+	.hairpin_get_peer_ports = mlx5_hairpin_get_peer_ports,
+	.hairpin_queue_peer_update = mlx5_hairpin_queue_peer_update,
+	.hairpin_queue_peer_bind = mlx5_hairpin_queue_peer_bind,
+	.hairpin_queue_peer_unbind = mlx5_hairpin_queue_peer_unbind,
+};
+
 /**
  * Verify and store value for device argument.
  *
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 121d726405..df27983ad9 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -135,9 +135,9 @@ struct mlx5_local_data {
 extern struct mlx5_shared_data *mlx5_shared_data;
 
 /* Dev ops structs */
-extern const struct eth_dev_ops mlx5_os_dev_ops;
-extern const struct eth_dev_ops mlx5_os_dev_sec_ops;
-extern const struct eth_dev_ops mlx5_os_dev_ops_isolate;
+extern const struct eth_dev_ops mlx5_dev_ops;
+extern const struct eth_dev_ops mlx5_dev_sec_ops;
+extern const struct eth_dev_ops mlx5_dev_ops_isolate;
 
 struct mlx5_counter_ctrl {
 	/* Name of the counter. */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a4cf63b235..e0c23927eb 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -6125,9 +6125,9 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 	}
 	priv->isolated = !!enable;
 	if (enable)
-		dev->dev_ops = &mlx5_os_dev_ops_isolate;
+		dev->dev_ops = &mlx5_dev_ops_isolate;
 	else
-		dev->dev_ops = &mlx5_os_dev_ops;
+		dev->dev_ops = &mlx5_dev_ops;
 
 	dev->rx_descriptor_status = mlx5_rx_descriptor_status;
 	dev->tx_descriptor_status = mlx5_tx_descriptor_status;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.846085548 +0000
+++ 0080-net-mlx5-unify-operations-for-all-OS.patch	2021-02-05 11:18:28.886692635 +0000
@@ -1 +1 @@
-From b012b4ce72d7168c886ec00b1346c0f768541ad7 Mon Sep 17 00:00:00 2001
+From d8277bf9f26d0fdfbcd9a05fb45f15ea02bbd67a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b012b4ce72d7168c886ec00b1346c0f768541ad7 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19,6 +20,5 @@
- drivers/net/mlx5/linux/mlx5_os.c   | 154 +----------------------------
- drivers/net/mlx5/mlx5.c            | 150 ++++++++++++++++++++++++++++
- drivers/net/mlx5/mlx5.h            |   6 +-
- drivers/net/mlx5/mlx5_flow.c       |   4 +-
- drivers/net/mlx5/windows/mlx5_os.c | 110 +--------------------
- 5 files changed, 158 insertions(+), 266 deletions(-)
+ drivers/net/mlx5/linux/mlx5_os.c | 154 +------------------------------
+ drivers/net/mlx5/mlx5.c          | 150 ++++++++++++++++++++++++++++++
+ drivers/net/mlx5/mlx5.h          |   6 +-
+ drivers/net/mlx5/mlx5_flow.c     |   4 +-
+ 4 files changed, 157 insertions(+), 157 deletions(-)
@@ -27 +27 @@
-index 4f68c74267..8353ac22e0 100644
+index 9062191dd1..750ca7557f 100644
@@ -30 +30 @@
-@@ -757,7 +757,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -751,7 +751,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
@@ -39 +39 @@
-@@ -1432,7 +1432,7 @@ err_secondary:
+@@ -1426,7 +1426,7 @@ err_secondary:
@@ -48 +48 @@
-@@ -2611,153 +2611,3 @@ mlx5_os_mac_addr_flush(struct rte_eth_dev *dev)
+@@ -2605,153 +2605,3 @@ mlx5_os_mac_addr_flush(struct rte_eth_dev *dev)
@@ -203 +203 @@
-index 05c23aecba..a91c240bcc 100644
+index 591750a3ff..ebad6a0709 100644
@@ -206 +206 @@
-@@ -1430,6 +1430,156 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -1427,6 +1427,156 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -364 +364 @@
-index 2fbeb9112d..0cb907c599 100644
+index 121d726405..df27983ad9 100644
@@ -367 +367 @@
-@@ -140,9 +140,9 @@ struct mlx5_local_data {
+@@ -135,9 +135,9 @@ struct mlx5_local_data {
@@ -381 +381 @@
-index 4035090cbb..b1c061a3f0 100644
+index a4cf63b235..e0c23927eb 100644
@@ -384 +384 @@
-@@ -6135,9 +6135,9 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
+@@ -6125,9 +6125,9 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
@@ -396,125 +395,0 @@
-diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
-index 95e4e1e68a..4fbd8893cf 100644
---- a/drivers/net/mlx5/windows/mlx5_os.c
-+++ b/drivers/net/mlx5/windows/mlx5_os.c
-@@ -571,7 +571,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
- 	/* Initialize burst functions to prevent crashes before link-up. */
- 	eth_dev->rx_pkt_burst = removed_rx_burst;
- 	eth_dev->tx_pkt_burst = removed_tx_burst;
--	eth_dev->dev_ops = &mlx5_os_dev_ops;
-+	eth_dev->dev_ops = &mlx5_dev_ops;
- 	eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
- 	eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
- 	eth_dev->rx_queue_count = mlx5_rx_queue_count;
-@@ -1156,111 +1156,3 @@ mlx5_os_get_pdn(void *pd, uint32_t *pdn)
- }
- 
- const struct mlx5_flow_driver_ops mlx5_flow_verbs_drv_ops = {0};
--
--const struct eth_dev_ops mlx5_os_dev_ops = {
--	.dev_configure = mlx5_dev_configure,
--	.dev_start = mlx5_dev_start,
--	.dev_stop = mlx5_dev_stop,
--	.dev_close = mlx5_dev_close,
--	.mtu_set = mlx5_dev_set_mtu,
--	.link_update = mlx5_link_update,
--	.stats_get = mlx5_stats_get,
--	.stats_reset = mlx5_stats_reset,
--	.dev_infos_get = mlx5_dev_infos_get,
--	.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
--	.promiscuous_enable = mlx5_promiscuous_enable,
--	.promiscuous_disable = mlx5_promiscuous_disable,
--	.allmulticast_enable = mlx5_allmulticast_enable,
--	.allmulticast_disable = mlx5_allmulticast_disable,
--	.xstats_get = mlx5_xstats_get,
--	.xstats_reset = mlx5_xstats_reset,
--	.xstats_get_names = mlx5_xstats_get_names,
--	.fw_version_get = mlx5_fw_version_get,
--	.read_clock = mlx5_read_clock,
--	.vlan_filter_set = mlx5_vlan_filter_set,
--	.rx_queue_setup = mlx5_rx_queue_setup,
--	.rx_hairpin_queue_setup = mlx5_rx_hairpin_queue_setup,
--	.tx_queue_setup = mlx5_tx_queue_setup,
--	.tx_hairpin_queue_setup = mlx5_tx_hairpin_queue_setup,
--	.rx_queue_release = mlx5_rx_queue_release,
--	.tx_queue_release = mlx5_tx_queue_release,
--	.flow_ctrl_get = mlx5_dev_get_flow_ctrl,
--	.flow_ctrl_set = mlx5_dev_set_flow_ctrl,
--	.mac_addr_remove = mlx5_mac_addr_remove,
--	.mac_addr_add = mlx5_mac_addr_add,
--	.mac_addr_set = mlx5_mac_addr_set,
--	.set_mc_addr_list = mlx5_set_mc_addr_list,
--	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
--	.vlan_offload_set = mlx5_vlan_offload_set,
--	.reta_update = mlx5_dev_rss_reta_update,
--	.reta_query = mlx5_dev_rss_reta_query,
--	.rss_hash_update = mlx5_rss_hash_update,
--	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
--	.filter_ctrl = mlx5_dev_filter_ctrl,
--	.rxq_info_get = mlx5_rxq_info_get,
--	.txq_info_get = mlx5_txq_info_get,
--	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
--	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
--	.rx_queue_intr_enable = mlx5_rx_intr_enable,
--	.rx_queue_intr_disable = mlx5_rx_intr_disable,
--	.is_removed = mlx5_is_removed,
--	.udp_tunnel_port_add  = mlx5_udp_tunnel_port_add,
--	.get_module_info = mlx5_get_module_info,
--	.get_module_eeprom = mlx5_get_module_eeprom,
--	.hairpin_cap_get = mlx5_hairpin_cap_get,
--	.mtr_ops_get = mlx5_flow_meter_ops_get,
--};
--
--/* Available operations from secondary process. */
--const struct eth_dev_ops mlx5_os_dev_sec_ops = {0};
--
--/* Available operations in flow isolated mode. */
--const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
--	.dev_configure = mlx5_dev_configure,
--	.dev_start = mlx5_dev_start,
--	.dev_stop = mlx5_dev_stop,
--	.dev_close = mlx5_dev_close,
--	.mtu_set = mlx5_dev_set_mtu,
--	.link_update = mlx5_link_update,
--	.stats_get = mlx5_stats_get,
--	.stats_reset = mlx5_stats_reset,
--	.dev_infos_get = mlx5_dev_infos_get,
--	.dev_set_link_down = mlx5_set_link_down,
--	.dev_set_link_up = mlx5_set_link_up,
--	.promiscuous_enable = mlx5_promiscuous_enable,
--	.promiscuous_disable = mlx5_promiscuous_disable,
--	.allmulticast_enable = mlx5_allmulticast_enable,
--	.allmulticast_disable = mlx5_allmulticast_disable,
--	.xstats_get = mlx5_xstats_get,
--	.xstats_reset = mlx5_xstats_reset,
--	.xstats_get_names = mlx5_xstats_get_names,
--	.fw_version_get = mlx5_fw_version_get,
--	.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
--	.vlan_filter_set = mlx5_vlan_filter_set,
--	.rx_queue_setup = mlx5_rx_queue_setup,
--	.rx_hairpin_queue_setup = mlx5_rx_hairpin_queue_setup,
--	.tx_queue_setup = mlx5_tx_queue_setup,
--	.tx_hairpin_queue_setup = mlx5_tx_hairpin_queue_setup,
--	.rx_queue_release = mlx5_rx_queue_release,
--	.tx_queue_release = mlx5_tx_queue_release,
--	.flow_ctrl_get = mlx5_dev_get_flow_ctrl,
--	.flow_ctrl_set = mlx5_dev_set_flow_ctrl,
--	.mac_addr_remove = mlx5_mac_addr_remove,
--	.mac_addr_add = mlx5_mac_addr_add,
--	.mac_addr_set = mlx5_mac_addr_set,
--	.set_mc_addr_list = mlx5_set_mc_addr_list,
--	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
--	.vlan_offload_set = mlx5_vlan_offload_set,
--	.filter_ctrl = mlx5_dev_filter_ctrl,
--	.rxq_info_get = mlx5_rxq_info_get,
--	.txq_info_get = mlx5_txq_info_get,
--	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
--	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
--	.rx_queue_intr_enable = mlx5_rx_intr_enable,
--	.rx_queue_intr_disable = mlx5_rx_intr_disable,
--	.is_removed = mlx5_is_removed,
--	.get_module_info = mlx5_get_module_info,
--	.get_module_eeprom = mlx5_get_module_eeprom,
--	.hairpin_cap_get = mlx5_hairpin_cap_get,
--	.mtr_ops_get = mlx5_flow_meter_ops_get,
--};

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

* [dpdk-stable] patch 'net/mlx5: fix device name size on Windows' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (78 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: unify operations for all " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix comparison sign in flow engine' " luca.boccassi
                   ` (194 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/06c3e3e3c2b6d22a7bc738ba55ea2985b28f6faa

Thanks.

Luca Boccassi

---
From 06c3e3e3c2b6d22a7bc738ba55ea2985b28f6faa Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Mon, 28 Dec 2020 14:32:57 +0200
Subject: [PATCH] net/mlx5: fix device name size on Windows

[ upstream commit 28743807e8b717141eb381ce90565ce26adb93fd ]

Windows Devx interface name is the same as device name with
different size then IF_NAMESIZE. To support it MLX5_NAMESIZE
is defined with IF_NAMESIZE value for Linux and MLX5_FS_NAME_MAX
value for Windows.

Fixes: e9c0b96e3526 ("net/mlx5: move Linux ifname function")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++--
 drivers/net/mlx5/linux/mlx5_os.c        | 2 +-
 drivers/net/mlx5/linux/mlx5_os.h        | 6 ++----
 drivers/net/mlx5/mlx5.h                 | 4 +++-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 128845cb52..e36a78091c 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -143,7 +143,7 @@ struct ethtool_link_settings {
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE])
+mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[MLX5_NAMESIZE])
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	unsigned int ifindex;
@@ -151,7 +151,7 @@ mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE])
 	MLX5_ASSERT(priv);
 	MLX5_ASSERT(priv->sh);
 	if (priv->bond_ifindex > 0) {
-		memcpy(ifname, priv->bond_name, IF_NAMESIZE);
+		memcpy(ifname, priv->bond_name, MLX5_NAMESIZE);
 		return 0;
 	}
 	ifindex = mlx5_ifindex(dev);
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 750ca7557f..a77793890a 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1405,7 +1405,7 @@ err_secondary:
 		mac.addr_bytes[4], mac.addr_bytes[5]);
 #ifdef RTE_LIBRTE_MLX5_DEBUG
 	{
-		char ifname[IF_NAMESIZE];
+		char ifname[MLX5_NAMESIZE];
 
 		if (mlx5_get_ifname(eth_dev, &ifname) == 0)
 			DRV_LOG(DEBUG, "port %u ifname is \"%s\"",
diff --git a/drivers/net/mlx5/linux/mlx5_os.h b/drivers/net/mlx5/linux/mlx5_os.h
index 759def2f4b..7dbacceabe 100644
--- a/drivers/net/mlx5/linux/mlx5_os.h
+++ b/drivers/net/mlx5/linux/mlx5_os.h
@@ -14,11 +14,9 @@ enum {
 	DEV_SYSFS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1
 };
 
+#define MLX5_NAMESIZE IF_NAMESIZE
+
 #define PCI_DRV_FLAGS  (RTE_PCI_DRV_INTR_LSC | \
 			RTE_PCI_DRV_INTR_RMV | \
 			RTE_PCI_DRV_PROBE_AGAIN)
-
-/* mlx5_ethdev_os.c */
-
-int mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]);
 #endif /* RTE_PMD_MLX5_OS_H_ */
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index df27983ad9..fff2422ea6 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -939,7 +939,7 @@ struct mlx5_priv {
 	int32_t pf_bond; /* >=0 means PF index in bonding configuration. */
 	unsigned int if_index; /* Associated kernel network device index. */
 	uint32_t bond_ifindex; /**< Bond interface index. */
-	char bond_name[IF_NAMESIZE]; /**< Bond interface name. */
+	char bond_name[MLX5_NAMESIZE]; /**< Bond interface name. */
 	/* RX/TX queues. */
 	unsigned int rxqs_n; /* RX queues array size. */
 	unsigned int txqs_n; /* TX queues array size. */
@@ -1056,6 +1056,8 @@ int mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev);
 
 /* mlx5_ethdev_os.c */
 
+int mlx5_get_ifname(const struct rte_eth_dev *dev,
+			char (*ifname)[MLX5_NAMESIZE]);
 unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);
 int mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN]);
 int mlx5_get_mtu(struct rte_eth_dev *dev, uint16_t *mtu);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.899185205 +0000
+++ 0081-net-mlx5-fix-device-name-size-on-Windows.patch	2021-02-05 11:18:28.894692787 +0000
@@ -1 +1 @@
-From 28743807e8b717141eb381ce90565ce26adb93fd Mon Sep 17 00:00:00 2001
+From 06c3e3e3c2b6d22a7bc738ba55ea2985b28f6faa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 28743807e8b717141eb381ce90565ce26adb93fd ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,8 +18,5 @@
- drivers/net/mlx5/linux/mlx5_ethdev_os.c   | 4 ++--
- drivers/net/mlx5/linux/mlx5_os.c          | 2 +-
- drivers/net/mlx5/linux/mlx5_os.h          | 6 ++----
- drivers/net/mlx5/mlx5.h                   | 4 +++-
- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 4 ++--
- drivers/net/mlx5/windows/mlx5_os.c        | 2 +-
- drivers/net/mlx5/windows/mlx5_os.h        | 2 ++
- 7 files changed, 13 insertions(+), 11 deletions(-)
+ drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++--
+ drivers/net/mlx5/linux/mlx5_os.c        | 2 +-
+ drivers/net/mlx5/linux/mlx5_os.h        | 6 ++----
+ drivers/net/mlx5/mlx5.h                 | 4 +++-
+ 4 files changed, 8 insertions(+), 8 deletions(-)
@@ -49 +47 @@
-index 8353ac22e0..6812a1f215 100644
+index 750ca7557f..a77793890a 100644
@@ -52 +50 @@
-@@ -1411,7 +1411,7 @@ err_secondary:
+@@ -1405,7 +1405,7 @@ err_secondary:
@@ -62 +60 @@
-index f38c2f3015..6100a130e0 100644
+index 759def2f4b..7dbacceabe 100644
@@ -66 +64 @@
- 	MLX5_FS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1
+ 	DEV_SYSFS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1
@@ -80 +78 @@
-index 0cb907c599..41034f5d19 100644
+index df27983ad9..fff2422ea6 100644
@@ -83 +81 @@
-@@ -950,7 +950,7 @@ struct mlx5_priv {
+@@ -939,7 +939,7 @@ struct mlx5_priv {
@@ -92 +90 @@
-@@ -1067,6 +1067,8 @@ int mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev);
+@@ -1056,6 +1056,8 @@ int mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev);
@@ -101,46 +98,0 @@
-diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
-index f4ec855302..076c688699 100644
---- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
-+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
-@@ -56,7 +56,7 @@ mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN])
-  *   0 on success, a negative errno value otherwise and rte_errno is set.
-  */
- int
--mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE])
-+mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[MLX5_NAMESIZE])
- {
- 	struct mlx5_priv *priv;
- 	mlx5_context_st *context_obj;
-@@ -67,7 +67,7 @@ mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE])
- 	}
- 	priv = dev->data->dev_private;
- 	context_obj = (mlx5_context_st *)priv->sh->ctx;
--	strncpy(*ifname, context_obj->mlx5_dev.name, IF_NAMESIZE);
-+	strncpy(*ifname, context_obj->mlx5_dev.name, MLX5_NAMESIZE);
- 	return 0;
- }
- 
-diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
-index 4fbd8893cf..fdd69fd3c1 100644
---- a/drivers/net/mlx5/windows/mlx5_os.c
-+++ b/drivers/net/mlx5/windows/mlx5_os.c
-@@ -550,7 +550,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
- 		mac.addr_bytes[4], mac.addr_bytes[5]);
- #ifdef RTE_LIBRTE_MLX5_DEBUG
- 	{
--		char ifname[IF_NAMESIZE];
-+		char ifname[MLX5_NAMESIZE];
- 
- 		if (mlx5_get_ifname(eth_dev, &ifname) == 0)
- 			DRV_LOG(DEBUG, "port %u ifname is \"%s\"",
-diff --git a/drivers/net/mlx5/windows/mlx5_os.h b/drivers/net/mlx5/windows/mlx5_os.h
-index b94f588461..7fe41d4e90 100644
---- a/drivers/net/mlx5/windows/mlx5_os.h
-+++ b/drivers/net/mlx5/windows/mlx5_os.h
-@@ -14,4 +14,6 @@ enum {
- 
- #define PCI_DRV_FLAGS 0
- 
-+#define MLX5_NAMESIZE MLX5_FS_NAME_MAX
-+
- #endif /* RTE_PMD_MLX5_OS_H_ */

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

* [dpdk-stable] patch 'net/mlx5: fix comparison sign in flow engine' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (79 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix device name size on Windows' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS and mark actions combination' " luca.boccassi
                   ` (193 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 8e9f688bdbd058b84c0501a5a12af52b1851516c Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Mon, 28 Dec 2020 14:33:02 +0200
Subject: [PATCH] net/mlx5: fix comparison sign in flow engine

[ upstream commit 16047bd015e292df2a6c61b8f4584f7c166d2f51 ]

The clang compiler warns on size mismatches of several
comparisons.

warning: comparison of integers of different signs

To resolve those the right types is used/cast to.

Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
Fixes: e554b672aa05 ("net/mlx5: support flow tag")
Fixes: c8f0abe7f89d ("net/mlx5: fix meter color register consideration")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 4 ++--
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e0c23927eb..522d238c27 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -798,7 +798,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
 		start_reg = priv->mtr_color_reg != REG_C_2 ? REG_C_2 :
 			    (priv->mtr_reg_share ? REG_C_3 : REG_C_4);
 		skip_mtr_reg = !!(priv->mtr_en && start_reg == REG_C_2);
-		if (id > (REG_C_7 - start_reg))
+		if (id > (uint32_t)(REG_C_7 - start_reg))
 			return rte_flow_error_set(error, EINVAL,
 						  RTE_FLOW_ERROR_TYPE_ITEM,
 						  NULL, "invalid tag id");
@@ -814,7 +814,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
 		 */
 		if (skip_mtr_reg && config->flow_mreg_c
 		    [id + start_reg - REG_C_0] >= priv->mtr_color_reg) {
-			if (id >= (REG_C_7 - start_reg))
+			if (id >= (uint32_t)(REG_C_7 - start_reg))
 				return rte_flow_error_set(error, EINVAL,
 						       RTE_FLOW_ERROR_TYPE_ITEM,
 							NULL, "invalid tag id");
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 618e248799..30ceb143ef 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -955,7 +955,7 @@ flow_dv_convert_action_set_reg
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "too many items to modify");
 	MLX5_ASSERT(conf->id != REG_NON);
-	MLX5_ASSERT(conf->id < RTE_DIM(reg_to_field));
+	MLX5_ASSERT(conf->id < (enum modify_reg)RTE_DIM(reg_to_field));
 	actions[i] = (struct mlx5_modification_cmd) {
 		.action_type = MLX5_MODIFICATION_TYPE_SET,
 		.field = reg_to_field[conf->id],
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.943178282 +0000
+++ 0082-net-mlx5-fix-comparison-sign-in-flow-engine.patch	2021-02-05 11:18:28.906693016 +0000
@@ -1 +1 @@
-From 16047bd015e292df2a6c61b8f4584f7c166d2f51 Mon Sep 17 00:00:00 2001
+From 8e9f688bdbd058b84c0501a5a12af52b1851516c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16047bd015e292df2a6c61b8f4584f7c166d2f51 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21,4 +22,3 @@
- drivers/net/mlx5/mlx5_flow.c            | 4 ++--
- drivers/net/mlx5/mlx5_flow_dv.c         | 2 +-
- drivers/net/mlx5/windows/mlx5_flow_os.c | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
+ drivers/net/mlx5/mlx5_flow.c    | 4 ++--
+ drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
@@ -27 +27 @@
-index b1c061a3f0..f110c6b714 100644
+index e0c23927eb..522d238c27 100644
@@ -49 +49 @@
-index f628268344..ce229dbe85 100644
+index 618e248799..30ceb143ef 100644
@@ -61,13 +60,0 @@
-diff --git a/drivers/net/mlx5/windows/mlx5_flow_os.c b/drivers/net/mlx5/windows/mlx5_flow_os.c
-index daf4e15ddb..acd7de61e0 100644
---- a/drivers/net/mlx5/windows/mlx5_flow_os.c
-+++ b/drivers/net/mlx5/windows/mlx5_flow_os.c
-@@ -188,7 +188,7 @@ mlx5_flow_os_create_flow(void *matcher, void *match_value,
- 			 void *actions[], void **flow)
- {
- 	struct mlx5_action *action;
--	int i;
-+	size_t i;
- 	struct mlx5_matcher *mlx5_matcher = matcher;
- 	struct mlx5_flow_dv_match_params *mlx5_match_value = match_value;
- 	uint32_t in[MLX5_ST_SZ_DW(devx_fs_rule_add_in)] = {0};

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

* [dpdk-stable] patch 'net/mlx5: fix shared RSS and mark actions combination' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (80 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix comparison sign in flow engine' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN decap on non-VXLAN flow' " luca.boccassi
                   ` (192 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1102e4b5747e4e3e0db882d6296ac0ae6636a179

Thanks.

Luca Boccassi

---
From 1102e4b5747e4e3e0db882d6296ac0ae6636a179 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Tue, 15 Dec 2020 11:46:24 +0800
Subject: [PATCH] net/mlx5: fix shared RSS and mark actions combination

[ upstream commit 8e61555657b227d967a91b8964c8d1e4e9d17695 ]

In order to allow mbuf mark ID update in Rx data-path, there is a
mechanism in the PMD to enable it according to the rte_flows.
When a flow with mark ID and RSS/QUEUE action exists, all the relevant
Rx queues will be enabled to report the mark ID.

When shared RSS action is combined with mark action, the PMD mechanism
misses the Rx queues updates.

This commit handles the shared RSS case in the mechanism too.

Fixes: e1592b6c4dea ("net/mlx5: make Rx queue thread safe")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 52 +++++++++++++-----
 drivers/net/mlx5/mlx5_flow_dv.c | 95 +++++++++++++--------------------
 2 files changed, 75 insertions(+), 72 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 522d238c27..5138af9208 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1002,17 +1002,29 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
 	struct mlx5_priv *priv = dev->data->dev_private;
 	const int mark = dev_handle->mark;
 	const int tunnel = !!(dev_handle->layers & MLX5_FLOW_LAYER_TUNNEL);
-	struct mlx5_hrxq *hrxq;
+	struct mlx5_ind_table_obj *ind_tbl = NULL;
 	unsigned int i;
 
-	if (dev_handle->fate_action != MLX5_FLOW_FATE_QUEUE)
-		return;
-	hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
+	if (dev_handle->fate_action == MLX5_FLOW_FATE_QUEUE) {
+		struct mlx5_hrxq *hrxq;
+
+		hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
 			      dev_handle->rix_hrxq);
-	if (!hrxq)
+		if (hrxq)
+			ind_tbl = hrxq->ind_table;
+	} else if (dev_handle->fate_action == MLX5_FLOW_FATE_SHARED_RSS) {
+		struct mlx5_shared_action_rss *shared_rss;
+
+		shared_rss = mlx5_ipool_get
+			(priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS],
+			 dev_handle->rix_srss);
+		if (shared_rss)
+			ind_tbl = shared_rss->ind_tbl;
+	}
+	if (!ind_tbl)
 		return;
-	for (i = 0; i != hrxq->ind_table->queues_n; ++i) {
-		int idx = hrxq->ind_table->queues[i];
+	for (i = 0; i != ind_tbl->queues_n; ++i) {
+		int idx = ind_tbl->queues[i];
 		struct mlx5_rxq_ctrl *rxq_ctrl =
 			container_of((*priv->rxqs)[idx],
 				     struct mlx5_rxq_ctrl, rxq);
@@ -1084,18 +1096,30 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
 	struct mlx5_priv *priv = dev->data->dev_private;
 	const int mark = dev_handle->mark;
 	const int tunnel = !!(dev_handle->layers & MLX5_FLOW_LAYER_TUNNEL);
-	struct mlx5_hrxq *hrxq;
+	struct mlx5_ind_table_obj *ind_tbl = NULL;
 	unsigned int i;
 
-	if (dev_handle->fate_action != MLX5_FLOW_FATE_QUEUE)
-		return;
-	hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
+	if (dev_handle->fate_action == MLX5_FLOW_FATE_QUEUE) {
+		struct mlx5_hrxq *hrxq;
+
+		hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
 			      dev_handle->rix_hrxq);
-	if (!hrxq)
+		if (hrxq)
+			ind_tbl = hrxq->ind_table;
+	} else if (dev_handle->fate_action == MLX5_FLOW_FATE_SHARED_RSS) {
+		struct mlx5_shared_action_rss *shared_rss;
+
+		shared_rss = mlx5_ipool_get
+			(priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS],
+			 dev_handle->rix_srss);
+		if (shared_rss)
+			ind_tbl = shared_rss->ind_tbl;
+	}
+	if (!ind_tbl)
 		return;
 	MLX5_ASSERT(dev->data->dev_started);
-	for (i = 0; i != hrxq->ind_table->queues_n; ++i) {
-		int idx = hrxq->ind_table->queues[i];
+	for (i = 0; i != ind_tbl->queues_n; ++i) {
+		int idx = ind_tbl->queues[i];
 		struct mlx5_rxq_ctrl *rxq_ctrl =
 			container_of((*priv->rxqs)[idx],
 				     struct mlx5_rxq_ctrl, rxq);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 30ceb143ef..ddeaa32b66 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10652,47 +10652,6 @@ __flow_dv_action_rss_hrxq_lookup(struct rte_eth_dev *dev, uint32_t idx,
 	}
 }
 
-/**
- * Retrieves hash RX queue suitable for the *flow*.
- * If shared action configured for *flow* suitable hash RX queue will be
- * retrieved from attached shared action.
- *
- * @param[in] dev
- *   Pointer to the Ethernet device structure.
- * @param[in] dev_flow
- *   Pointer to the sub flow.
- * @param[in] rss_desc
- *   Pointer to the RSS descriptor.
- * @param[out] hrxq
- *   Pointer to retrieved hash RX queue object.
- *
- * @return
- *   Valid hash RX queue index, otherwise 0 and rte_errno is set.
- */
-static uint32_t
-__flow_dv_rss_get_hrxq(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
-		       struct mlx5_flow_rss_desc *rss_desc,
-		       struct mlx5_hrxq **hrxq)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	uint32_t hrxq_idx;
-
-	if (rss_desc->shared_rss) {
-		hrxq_idx = __flow_dv_action_rss_hrxq_lookup
-				(dev, rss_desc->shared_rss,
-				 dev_flow->hash_fields,
-				 !!(dev_flow->handle->layers &
-				    MLX5_FLOW_LAYER_TUNNEL));
-		if (hrxq_idx)
-			*hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
-					       hrxq_idx);
-	} else {
-		*hrxq = flow_dv_hrxq_prepare(dev, dev_flow, rss_desc,
-					     &hrxq_idx);
-	}
-	return hrxq_idx;
-}
-
 /**
  * Apply the flow to the NIC, lock free,
  * (mutex should be acquired by caller).
@@ -10724,11 +10683,6 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
 	struct mlx5_flow_rss_desc *rss_desc = &wks->rss_desc;
 
 	MLX5_ASSERT(wks);
-	if (rss_desc->shared_rss) {
-		dh = wks->flows[wks->flow_idx - 1].handle;
-		MLX5_ASSERT(dh->fate_action == MLX5_FLOW_FATE_SHARED_RSS);
-		dh->rix_srss = rss_desc->shared_rss;
-	}
 	for (idx = wks->flow_idx - 1; idx >= 0; idx--) {
 		dev_flow = &wks->flows[idx];
 		dv = &dev_flow->dv;
@@ -10744,11 +10698,34 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
 						priv->drop_queue.hrxq->action;
 			}
 		} else if ((dh->fate_action == MLX5_FLOW_FATE_QUEUE &&
-			   !dv_h->rix_sample && !dv_h->rix_dest_array) ||
-			    (dh->fate_action == MLX5_FLOW_FATE_SHARED_RSS)) {
+			   !dv_h->rix_sample && !dv_h->rix_dest_array)) {
+			struct mlx5_hrxq *hrxq;
+			uint32_t hrxq_idx;
+
+			hrxq = flow_dv_hrxq_prepare(dev, dev_flow, rss_desc,
+						    &hrxq_idx);
+			if (!hrxq) {
+				rte_flow_error_set
+					(error, rte_errno,
+					 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					 "cannot get hash queue");
+				goto error;
+			}
+			dh->rix_hrxq = hrxq_idx;
+			dv->actions[n++] = hrxq->action;
+		} else if (dh->fate_action == MLX5_FLOW_FATE_SHARED_RSS) {
 			struct mlx5_hrxq *hrxq = NULL;
-			uint32_t hrxq_idx = __flow_dv_rss_get_hrxq
-					(dev, dev_flow, rss_desc, &hrxq);
+			uint32_t hrxq_idx;
+
+			hrxq_idx = __flow_dv_action_rss_hrxq_lookup(dev,
+						rss_desc->shared_rss,
+						dev_flow->hash_fields,
+						!!(dh->layers &
+						MLX5_FLOW_LAYER_TUNNEL));
+			if (hrxq_idx)
+				hrxq = mlx5_ipool_get
+					(priv->sh->ipool[MLX5_IPOOL_HRXQ],
+					 hrxq_idx);
 			if (!hrxq) {
 				rte_flow_error_set
 					(error, rte_errno,
@@ -10756,8 +10733,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
 					 "cannot get hash queue");
 				goto error;
 			}
-			if (dh->fate_action == MLX5_FLOW_FATE_QUEUE)
-				dh->rix_hrxq = hrxq_idx;
+			dh->rix_srss = rss_desc->shared_rss;
 			dv->actions[n++] = hrxq->action;
 		} else if (dh->fate_action == MLX5_FLOW_FATE_DEFAULT_MISS) {
 			if (!priv->sh->default_miss_action) {
@@ -10799,12 +10775,12 @@ error:
 		if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq) {
 			mlx5_hrxq_release(dev, dh->rix_hrxq);
 			dh->rix_hrxq = 0;
+		} else if (dh->fate_action == MLX5_FLOW_FATE_SHARED_RSS) {
+			dh->rix_srss = 0;
 		}
 		if (dh->vf_vlan.tag && dh->vf_vlan.created)
 			mlx5_vlan_vmwa_release(dev, &dh->vf_vlan);
 	}
-	if (rss_desc->shared_rss)
-		wks->flows[wks->flow_idx - 1].handle->rix_srss = 0;
 	rte_errno = err; /* Restore rte_errno. */
 	return -rte_errno;
 }
@@ -11072,9 +11048,6 @@ flow_dv_fate_resource_release(struct rte_eth_dev *dev,
 		flow_dv_port_id_action_resource_release(dev,
 				handle->rix_port_id_action);
 		break;
-	case MLX5_FLOW_FATE_SHARED_RSS:
-		flow_dv_shared_rss_action_release(dev, handle->rix_srss);
-		break;
 	default:
 		DRV_LOG(DEBUG, "Incorrect fate action:%d", handle->fate_action);
 		break;
@@ -11237,6 +11210,7 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 {
 	struct mlx5_flow_handle *dev_handle;
 	struct mlx5_priv *priv = dev->data->dev_private;
+	uint32_t srss = 0;
 
 	if (!flow)
 		return;
@@ -11281,10 +11255,15 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 		if (dev_handle->dvh.rix_tag)
 			flow_dv_tag_release(dev,
 					    dev_handle->dvh.rix_tag);
-		flow_dv_fate_resource_release(dev, dev_handle);
+		if (dev_handle->fate_action != MLX5_FLOW_FATE_SHARED_RSS)
+			flow_dv_fate_resource_release(dev, dev_handle);
+		else if (!srss)
+			srss = dev_handle->rix_srss;
 		mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW],
 			   tmp_idx);
 	}
+	if (srss)
+		flow_dv_shared_rss_action_release(dev, srss);
 }
 
 /**
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.996158504 +0000
+++ 0083-net-mlx5-fix-shared-RSS-and-mark-actions-combination.patch	2021-02-05 11:18:28.922693320 +0000
@@ -1 +1 @@
-From 8e61555657b227d967a91b8964c8d1e4e9d17695 Mon Sep 17 00:00:00 2001
+From 1102e4b5747e4e3e0db882d6296ac0ae6636a179 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e61555657b227d967a91b8964c8d1e4e9d17695 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index f110c6b714..2a4073c126 100644
+index 522d238c27..5138af9208 100644
@@ -106 +107 @@
-index ce229dbe85..50673ced25 100644
+index 30ceb143ef..ddeaa32b66 100644
@@ -109 +110 @@
-@@ -10680,47 +10680,6 @@ __flow_dv_action_rss_hrxq_lookup(struct rte_eth_dev *dev, uint32_t idx,
+@@ -10652,47 +10652,6 @@ __flow_dv_action_rss_hrxq_lookup(struct rte_eth_dev *dev, uint32_t idx,
@@ -157 +158 @@
-@@ -10752,11 +10711,6 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -10724,11 +10683,6 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -169 +170 @@
-@@ -10772,11 +10726,34 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -10744,11 +10698,34 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -208 +209 @@
-@@ -10784,8 +10761,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -10756,8 +10733,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -218 +219 @@
-@@ -10827,12 +10803,12 @@ error:
+@@ -10799,12 +10775,12 @@ error:
@@ -233 +234 @@
-@@ -11100,9 +11076,6 @@ flow_dv_fate_resource_release(struct rte_eth_dev *dev,
+@@ -11072,9 +11048,6 @@ flow_dv_fate_resource_release(struct rte_eth_dev *dev,
@@ -243 +244 @@
-@@ -11265,6 +11238,7 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -11237,6 +11210,7 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
@@ -251 +252 @@
-@@ -11309,10 +11283,15 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -11281,10 +11255,15 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)

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

* [dpdk-stable] patch 'net/mlx5: fix VXLAN decap on non-VXLAN flow' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (81 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS and mark actions combination' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' " luca.boccassi
                   ` (191 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Shiri Kuzin; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/353dafe2e3746df887cccffcc1654d57930d02cc

Thanks.

Luca Boccassi

---
From 353dafe2e3746df887cccffcc1654d57930d02cc Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@nvidia.com>
Date: Thu, 31 Dec 2020 11:33:28 +0200
Subject: [PATCH] net/mlx5: fix VXLAN decap on non-VXLAN flow

[ upstream commit d362e6f6ac6d90c02dc773bd0e39ec0c05db2925 ]

The vxlan_decap action performs decapsulation of the VXLAN tunnel.

Currently we can create a flow with vxlan_decap without
matching on VXLAN header.

To solve this issue this patch adds validation verifying
that the VXLAN item was detected when specifying
vxlan_decap action.

Fixes: 49d6465af3e1 ("net/mlx5: add VXLAN decap action to Direct Verbs")

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 35 ++++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ddeaa32b66..407e76e7b1 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2612,6 +2612,10 @@ flow_dv_validate_action_l2_encap(struct rte_eth_dev *dev,
  *   Pointer to the rte_eth_dev structure.
  * @param[in] action_flags
  *   Holds the actions detected until now.
+ * @param[in] action
+ *   Pointer to the action structure.
+ * @param[in] item_flags
+ *   Holds the items detected.
  * @param[in] attr
  *   Pointer to flow attributes
  * @param[out] error
@@ -2623,6 +2627,8 @@ flow_dv_validate_action_l2_encap(struct rte_eth_dev *dev,
 static int
 flow_dv_validate_action_decap(struct rte_eth_dev *dev,
 			      uint64_t action_flags,
+			      const struct rte_flow_action *action,
+			      const uint64_t item_flags,
 			      const struct rte_flow_attr *attr,
 			      struct rte_flow_error *error)
 {
@@ -2656,6 +2662,11 @@ flow_dv_validate_action_decap(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
 					  "decap action for VF representor "
 					  "not supported on NIC table");
+	if (action->type == RTE_FLOW_ACTION_TYPE_VXLAN_DECAP &&
+	    !(item_flags & MLX5_FLOW_LAYER_VXLAN))
+		return rte_flow_error_set(error, ENOTSUP,
+				RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+				"VXLAN item should be present for VXLAN decap");
 	return 0;
 }
 
@@ -2676,6 +2687,10 @@ const struct rte_flow_action_raw_decap empty_decap = {.data = NULL, .size = 0,};
  *   Holds the actions detected until now.
  * @param[out] actions_n
  *   pointer to the number of actions counter.
+ * @param[in] action
+ *   Pointer to the action structure.
+ * @param[in] item_flags
+ *   Holds the items detected.
  * @param[out] error
  *   Pointer to error structure.
  *
@@ -2688,7 +2703,8 @@ flow_dv_validate_action_raw_encap_decap
 	 const struct rte_flow_action_raw_decap *decap,
 	 const struct rte_flow_action_raw_encap *encap,
 	 const struct rte_flow_attr *attr, uint64_t *action_flags,
-	 int *actions_n, struct rte_flow_error *error)
+	 int *actions_n, const struct rte_flow_action *action,
+	 uint64_t item_flags, struct rte_flow_error *error)
 {
 	const struct mlx5_priv *priv = dev->data->dev_private;
 	int ret;
@@ -2723,8 +2739,8 @@ flow_dv_validate_action_raw_encap_decap
 				"encap combination");
 	}
 	if (decap) {
-		ret = flow_dv_validate_action_decap(dev, *action_flags, attr,
-						    error);
+		ret = flow_dv_validate_action_decap(dev, *action_flags, action,
+						    item_flags, attr, error);
 		if (ret < 0)
 			return ret;
 		*action_flags |= MLX5_FLOW_ACTION_DECAP;
@@ -4329,6 +4345,8 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
  *   Pointer to the Ethernet device structure.
  * @param[in] attr
  *   Attributes of flow that includes this action.
+ * @param[in] item_flags
+ *   Holds the items detected.
  * @param[out] error
  *   Pointer to error structure.
  *
@@ -4340,6 +4358,7 @@ flow_dv_validate_action_sample(uint64_t action_flags,
 			       const struct rte_flow_action *action,
 			       struct rte_eth_dev *dev,
 			       const struct rte_flow_attr *attr,
+			       const uint64_t item_flags,
 			       struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
@@ -4433,7 +4452,7 @@ flow_dv_validate_action_sample(uint64_t action_flags,
 		case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
 			ret = flow_dv_validate_action_raw_encap_decap
 				(dev, NULL, act->conf, attr, &sub_action_flags,
-				 &actions_n, error);
+				 &actions_n, action, item_flags, error);
 			if (ret < 0)
 				return ret;
 			++actions_n;
@@ -5766,6 +5785,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP:
 		case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP:
 			ret = flow_dv_validate_action_decap(dev, action_flags,
+							    actions, item_flags,
 							    attr, error);
 			if (ret < 0)
 				return ret;
@@ -5775,7 +5795,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
 			ret = flow_dv_validate_action_raw_encap_decap
 				(dev, NULL, actions->conf, attr, &action_flags,
-				 &actions_n, error);
+				 &actions_n, actions, item_flags, error);
 			if (ret < 0)
 				return ret;
 			break;
@@ -5793,7 +5813,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					   (dev,
 					    decap ? decap : &empty_decap, encap,
 					    attr, &action_flags, &actions_n,
-					    error);
+					    actions, item_flags, error);
 			if (ret < 0)
 				return ret;
 			break;
@@ -6008,7 +6028,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		case RTE_FLOW_ACTION_TYPE_SAMPLE:
 			ret = flow_dv_validate_action_sample(action_flags,
 							     actions, dev,
-							     attr, error);
+							     attr, item_flags,
+							     error);
 			if (ret < 0)
 				return ret;
 			action_flags |= MLX5_FLOW_ACTION_SAMPLE;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.052623756 +0000
+++ 0084-net-mlx5-fix-VXLAN-decap-on-non-VXLAN-flow.patch	2021-02-05 11:18:28.930693473 +0000
@@ -1 +1 @@
-From d362e6f6ac6d90c02dc773bd0e39ec0c05db2925 Mon Sep 17 00:00:00 2001
+From 353dafe2e3746df887cccffcc1654d57930d02cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d362e6f6ac6d90c02dc773bd0e39ec0c05db2925 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 50673ced25..2f1c71774e 100644
+index ddeaa32b66..407e76e7b1 100644
@@ -92 +93 @@
-@@ -4326,6 +4342,8 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
+@@ -4329,6 +4345,8 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
@@ -101 +102 @@
-@@ -4337,6 +4355,7 @@ flow_dv_validate_action_sample(uint64_t action_flags,
+@@ -4340,6 +4358,7 @@ flow_dv_validate_action_sample(uint64_t action_flags,
@@ -109 +110 @@
-@@ -4430,7 +4449,7 @@ flow_dv_validate_action_sample(uint64_t action_flags,
+@@ -4433,7 +4452,7 @@ flow_dv_validate_action_sample(uint64_t action_flags,
@@ -118 +119 @@
-@@ -5764,6 +5783,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5766,6 +5785,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -126 +127 @@
-@@ -5773,7 +5793,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5775,7 +5795,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -135 +136 @@
-@@ -5791,7 +5811,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5793,7 +5813,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -144 +145 @@
-@@ -6006,7 +6026,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6008,7 +6028,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,

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

* [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (82 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN decap on non-VXLAN flow' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on Tx " luca.boccassi
                   ` (190 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 5c53bc1ac215b01ee2d3e12f05d96f218c1d74b9 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 15 Dec 2020 08:48:31 +0000
Subject: [PATCH] net/mlx5: fix leak on Rx queue creation failure

[ upstream commit e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d ]

In Rx queue creation, there are some validations for the Rx
configuration.

When one of them fails, the MR btree memory was not freed what caused a
memory leak.

Free it.

Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 4d788788e1..e4cbe6430b 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1691,6 +1691,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next);
 	return tmpl;
 error:
+	mlx5_mr_btree_free(&tmpl->rxq.mr_ctrl.cache_bh);
 	mlx5_free(tmpl);
 	return NULL;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.104955540 +0000
+++ 0085-net-mlx5-fix-leak-on-Rx-queue-creation-failure.patch	2021-02-05 11:18:28.930693473 +0000
@@ -1 +1 @@
-From e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d Mon Sep 17 00:00:00 2001
+From 5c53bc1ac215b01ee2d3e12f05d96f218c1d74b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index df08f977bf..787b2b74dd 100644
+index 4d788788e1..e4cbe6430b 100644
@@ -27 +28 @@
-@@ -1620,6 +1620,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1691,6 +1691,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,

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

* [dpdk-stable] patch 'net/mlx5: fix leak on Tx queue creation failure' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (83 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' " luca.boccassi
                   ` (189 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 0be706e99f560b0ef79fd3a8d1e7d261448e07f8 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 15 Dec 2020 08:48:32 +0000
Subject: [PATCH] net/mlx5: fix leak on Tx queue creation failure

[ upstream commit b689b00dd253356567c4d95f55921ce6c0e87d80 ]

In Tx queue creation, there are two validations for the Tx
configuration.

When one of them fails, the MR btree memory was not freed what caused a
memory leak.

Free it.

Fixes: f6d9ab4e769f ("net/mlx5: check Tx queue size overflow")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_txq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index d96abef883..b81bb4a12d 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1146,6 +1146,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	LIST_INSERT_HEAD(&priv->txqsctrl, tmpl, next);
 	return tmpl;
 error:
+	mlx5_mr_btree_free(&tmpl->txq.mr_ctrl.cache_bh);
 	mlx5_free(tmpl);
 	return NULL;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.144799934 +0000
+++ 0086-net-mlx5-fix-leak-on-Tx-queue-creation-failure.patch	2021-02-05 11:18:28.934693549 +0000
@@ -1 +1 @@
-From b689b00dd253356567c4d95f55921ce6c0e87d80 Mon Sep 17 00:00:00 2001
+From 0be706e99f560b0ef79fd3a8d1e7d261448e07f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b689b00dd253356567c4d95f55921ce6c0e87d80 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (84 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on Tx " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio-user: fix protocol features advertising' " luca.boccassi
                   ` (188 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Jiawei Zhu; +Cc: Chenbo Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c778b2b2480175f09d0c8fdf2addee4e8f470fe2 Mon Sep 17 00:00:00 2001
From: Jiawei Zhu <zhujiawei12@huawei.com>
Date: Sat, 12 Dec 2020 00:53:18 +0800
Subject: [PATCH] net/virtio-user: fix run closing stdin and close callfd

[ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ]

When i < VIRTIO_MAX_VIRTQUEUES and j == i,
dev->callfds[i] and dev->kickfds[i] are default 0.
So it will close(0), close the standard input (stdin).

And when the code fails in kickfd creation,
it will leaves one callfd not closed.

Fixes: e6e7ad8b3024 ("net/virtio-user: move eventfd open/close into init/uninit")
Cc: stable@dpdk.org:

Signed-off-by: Jiawei Zhu <zhujiawei12@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 053f0267ca..e1cbad0d90 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -276,6 +276,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
 		}
 		kickfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
 		if (kickfd < 0) {
+			close(callfd);
 			PMD_DRV_LOG(ERR, "kickfd error, %s", strerror(errno));
 			break;
 		}
@@ -284,7 +285,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
 	}
 
 	if (i < VIRTIO_MAX_VIRTQUEUES) {
-		for (j = 0; j <= i; ++j) {
+		for (j = 0; j < i; ++j) {
 			close(dev->callfds[j]);
 			close(dev->kickfds[j]);
 		}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.188307977 +0000
+++ 0087-net-virtio-user-fix-run-closing-stdin-and-close-call.patch	2021-02-05 11:18:28.934693549 +0000
@@ -1 +1 @@
-From 97ed740c3498afab4162cb85492cd3109e21c604 Mon Sep 17 00:00:00 2001
+From c778b2b2480175f09d0c8fdf2addee4e8f470fe2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ]

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

* [dpdk-stable] patch 'net/virtio-user: fix protocol features advertising' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (85 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice/base: fix memory handling' " luca.boccassi
                   ` (187 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ef713f3b0c0d9dc3c3c6155221bfcfac6942cf34 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 18 Dec 2020 14:23:52 +0100
Subject: [PATCH] net/virtio-user: fix protocol features advertising

[ upstream commit c3243eb5a88c59fba9334ace253068c35fc16894 ]

When connected to a vhost-user backend, the flag
VHOST_USER_F_PROTOCOL_FEATURES is not advertised, preventing to do
multiqueue (the VHOST_USER_PROTOCOL_F_MQ protocol feature is ignored by
some backends if the VHOST_USER_F_PROTOCOL_FEATURES feature is not set).

When setting vhost-user features, advertise this flag if it was
advertised by our peer.

Fixes: 8e7561054ac7 ("net/virtio: support vhost-user protocol features")

Suggested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/vhost_user.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index b93e65c60b..350eed4182 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -297,13 +297,18 @@ vhost_user_sock(struct virtio_user_dev *dev,
 		if (has_reply_ack)
 			msg.flags |= VHOST_USER_NEED_REPLY_MASK;
 		/* Fallthrough */
-	case VHOST_USER_SET_FEATURES:
 	case VHOST_USER_SET_PROTOCOL_FEATURES:
 	case VHOST_USER_SET_LOG_BASE:
 		msg.payload.u64 = *((__u64 *)arg);
 		msg.size = sizeof(m.payload.u64);
 		break;
 
+	case VHOST_USER_SET_FEATURES:
+		msg.payload.u64 = *((__u64 *)arg) | (dev->device_features &
+			(1ULL << VHOST_USER_F_PROTOCOL_FEATURES));
+		msg.size = sizeof(m.payload.u64);
+		break;
+
 	case VHOST_USER_SET_OWNER:
 	case VHOST_USER_RESET_OWNER:
 		break;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.228454436 +0000
+++ 0088-net-virtio-user-fix-protocol-features-advertising.patch	2021-02-05 11:18:28.934693549 +0000
@@ -1 +1 @@
-From c3243eb5a88c59fba9334ace253068c35fc16894 Mon Sep 17 00:00:00 2001
+From ef713f3b0c0d9dc3c3c6155221bfcfac6942cf34 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c3243eb5a88c59fba9334ace253068c35fc16894 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice/base: fix memory handling' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (86 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio-user: fix protocol features advertising' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'doc: fix RSS flow description in i40e guide' " luca.boccassi
                   ` (186 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Andrii Pypchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/56997e8283ff16fc9104047a9c8f275020e25d90

Thanks.

Luca Boccassi

---
From 56997e8283ff16fc9104047a9c8f275020e25d90 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Fri, 8 Jan 2021 12:03:52 +0800
Subject: [PATCH] net/ice/base: fix memory handling

[ upstream commit 964bafcf5e75cddfbd8bc49485922b01fc491182 ]

Fixed memory handling when memory allocated in user space was handled
as memory allocated in kernel space within QV os_dep implementation
of the ice_memdup function.

Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Andrii Pypchenko <andrii.pypchenko@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index ac48bbe279..882448671e 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1345,7 +1345,7 @@ enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw)
 			 ice_memdup(hw, buf->layer_props,
 				    (hw->num_tx_sched_layers *
 				     sizeof(*hw->layer_info)),
-				    ICE_DMA_TO_DMA);
+				    ICE_NONDMA_TO_NONDMA);
 	if (!hw->layer_info) {
 		status = ICE_ERR_NO_MEMORY;
 		goto sched_query_out;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.267187742 +0000
+++ 0089-net-ice-base-fix-memory-handling.patch	2021-02-05 11:18:28.938693625 +0000
@@ -1 +1 @@
-From 964bafcf5e75cddfbd8bc49485922b01fc491182 Mon Sep 17 00:00:00 2001
+From 56997e8283ff16fc9104047a9c8f275020e25d90 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 964bafcf5e75cddfbd8bc49485922b01fc491182 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b75a44f54c..1cce8eaff1 100644
+index ac48bbe279..882448671e 100644
@@ -23 +24 @@
-@@ -1361,7 +1361,7 @@ enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw)
+@@ -1345,7 +1345,7 @@ enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw)

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

* [dpdk-stable] patch 'doc: fix RSS flow description in i40e guide' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (87 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice/base: fix memory handling' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' " luca.boccassi
                   ` (185 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From e094eaf4a23491b9d3dc2518036ac361199d554a Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Fri, 8 Jan 2021 13:35:38 +0800
Subject: [PATCH] doc: fix RSS flow description in i40e guide

[ upstream commit 742d9f87f6b8fffb8133099bbc916911d35ee619 ]

The command here does not create a queue region, but only sets the
lookup table, so the descriptions in the doc is not exact.

Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/i40e.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 4e5c4679b8..64f20e7dab 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -562,9 +562,9 @@ Generic flow API
 - ``RSS Flow``
 
   RSS Flow supports to set hash input set, hash function, enable hash
-  and configure queue region.
+  and configure queues.
   For example:
-  Configure queue region as queue 0, 1, 2, 3.
+  Configure queues as queue 0, 1, 2, 3.
 
   .. code-block:: console
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.320335392 +0000
+++ 0090-doc-fix-RSS-flow-description-in-i40e-guide.patch	2021-02-05 11:18:28.938693625 +0000
@@ -1 +1 @@
-From 742d9f87f6b8fffb8133099bbc916911d35ee619 Mon Sep 17 00:00:00 2001
+From e094eaf4a23491b9d3dc2518036ac361199d554a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 742d9f87f6b8fffb8133099bbc916911d35ee619 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (88 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'doc: fix RSS flow description in i40e guide' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'doc: add vtune profiling config to prog guide' " luca.boccassi
                   ` (184 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From b944df6b68c04f6075bfe4eed81246de85dc0d81 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Fri, 8 Jan 2021 13:35:39 +0800
Subject: [PATCH] net/i40e: fix returned code for RSS hardware failure

[ upstream commit c222d2a1d00719564526e5a14ca24622bebc0712 ]

The API should return the system error status, but it returned the
hardware error status, this is confuses the caller.
This patch adds check on hardware execution status and returns -EIO
in case of hardware execution failure.

Fixes: 1d4b2b4966bb ("net/i40e: fix VF overwrite PF RSS LUT for X722")
Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7f9bba4052..5984e52abd 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4443,7 +4443,6 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
 {
 	struct i40e_pf *pf;
 	struct i40e_hw *hw;
-	int ret;
 
 	if (!vsi || !lut)
 		return -EINVAL;
@@ -4452,12 +4451,16 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
 	hw = I40E_VSI_TO_HW(vsi);
 
 	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
-		ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id,
-					  vsi->type != I40E_VSI_SRIOV,
-					  lut, lut_size);
-		if (ret) {
-			PMD_DRV_LOG(ERR, "Failed to set RSS lookup table");
-			return ret;
+		enum i40e_status_code status;
+
+		status = i40e_aq_set_rss_lut(hw, vsi->vsi_id,
+					     vsi->type != I40E_VSI_SRIOV,
+					     lut, lut_size);
+		if (status) {
+			PMD_DRV_LOG(ERR,
+				    "Failed to update RSS lookup table, error status: %d",
+				    status);
+			return -EIO;
 		}
 	} else {
 		uint32_t *lut_dw = (uint32_t *)lut;
@@ -7612,7 +7615,6 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
 	uint16_t key_idx = (vsi->type == I40E_VSI_SRIOV) ?
 			   I40E_VFQF_HKEY_MAX_INDEX :
 			   I40E_PFQF_HKEY_MAX_INDEX;
-	int ret = 0;
 
 	if (!key || key_len == 0) {
 		PMD_DRV_LOG(DEBUG, "No key to be configured");
@@ -7625,11 +7627,16 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
 
 	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
 		struct i40e_aqc_get_set_rss_key_data *key_dw =
-			(struct i40e_aqc_get_set_rss_key_data *)key;
+				(struct i40e_aqc_get_set_rss_key_data *)key;
+		enum i40e_status_code status =
+				i40e_aq_set_rss_key(hw, vsi->vsi_id, key_dw);
 
-		ret = i40e_aq_set_rss_key(hw, vsi->vsi_id, key_dw);
-		if (ret)
-			PMD_INIT_LOG(ERR, "Failed to configure RSS key via AQ");
+		if (status) {
+			PMD_DRV_LOG(ERR,
+				    "Failed to configure RSS key via AQ, error status: %d",
+				    status);
+			return -EIO;
+		}
 	} else {
 		uint32_t *hash_key = (uint32_t *)key;
 		uint16_t i;
@@ -7649,7 +7656,7 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
 		I40E_WRITE_FLUSH(hw);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.363257364 +0000
+++ 0091-net-i40e-fix-returned-code-for-RSS-hardware-failure.patch	2021-02-05 11:18:28.942693701 +0000
@@ -1 +1 @@
-From c222d2a1d00719564526e5a14ca24622bebc0712 Mon Sep 17 00:00:00 2001
+From b944df6b68c04f6075bfe4eed81246de85dc0d81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c222d2a1d00719564526e5a14ca24622bebc0712 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'doc: add vtune profiling config to prog guide' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (89 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'build: fix linker flags on Windows' " luca.boccassi
                   ` (183 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Eugeny Parshutin; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 6bec454347991aa04c8eeb3bdebda0dc532b8a78 Mon Sep 17 00:00:00 2001
From: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
Date: Wed, 2 Dec 2020 20:48:06 +0300
Subject: [PATCH] doc: add vtune profiling config to prog guide

[ upstream commit 6a9d1e28f173031ab6a7f1d26c90f7515331bb20 ]

Return back 'profiling with vtune' section to profiling programmers
guide with updated instruction on how to enable vtune profiling
with meson configuration option.

Fixes: 89c67ae2cba7 ("doc: remove references to make from prog guide")

Signed-off-by: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/prog_guide/profile_app.rst | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/doc/guides/prog_guide/profile_app.rst b/doc/guides/prog_guide/profile_app.rst
index 7093681983..52f85bb9e0 100644
--- a/doc/guides/prog_guide/profile_app.rst
+++ b/doc/guides/prog_guide/profile_app.rst
@@ -33,6 +33,20 @@ Refer to the
 for details about application profiling.
 
 
+Profiling with VTune
+~~~~~~~~~~~~~~~~~~~~
+
+To allow VTune attaching to the DPDK application, reconfigure a DPDK build
+folder by passing ``-Dc_args=-DRTE_ETHDEV_PROFILE_WITH_VTUNE`` meson option
+and recompile the DPDK:
+
+.. code-block:: console
+
+   meson build
+   meson configure build -Dc_args=-DRTE_ETHDEV_PROFILE_WITH_VTUNE
+   ninja -C build
+
+
 Profiling on ARM64
 ------------------
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.417265916 +0000
+++ 0092-doc-add-vtune-profiling-config-to-prog-guide.patch	2021-02-05 11:18:28.946693778 +0000
@@ -1 +1 @@
-From 6a9d1e28f173031ab6a7f1d26c90f7515331bb20 Mon Sep 17 00:00:00 2001
+From 6bec454347991aa04c8eeb3bdebda0dc532b8a78 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6a9d1e28f173031ab6a7f1d26c90f7515331bb20 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'build: fix linker flags on Windows' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (90 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'doc: add vtune profiling config to prog guide' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' " luca.boccassi
                   ` (182 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Ranjit Menon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a0e0fe9adf716b5a723fff45ca60cc198d3b2802 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Tue, 12 Jan 2021 03:36:02 +0300
Subject: [PATCH] build: fix linker flags on Windows

[ upstream commit da042bcfc6c870fd067329a22e4084c4b2c4be2a ]

The --export-dynamic linker option is only applicable to ELF.
On Windows, where COFF is used, it causes warnings:

    x86_64-w64-mingw32-ld: warning: --export-dynamic is not supported
    for PE+ targets, did you mean --export-all-symbols? (MinGW)

    LINK : warning LNK4044: unrecognized option '/-export-dynamic';
    ignored (clang)

Don't add --export-dynamic on Windows anywhere.

Fixes: b031e13d7f0d ("build: fix plugin load on static build")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 app/meson.build                   | 2 +-
 buildtools/pkg-config/meson.build | 6 +++++-
 examples/meson.build              | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index fd72d7da68..903117b866 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -26,7 +26,7 @@ lib_execinfo = cc.find_library('execinfo', required: false)
 
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
-if get_option('default_library') == 'static'
+if get_option('default_library') == 'static' and not is_windows
 	default_ldflags += ['-Wl,--export-dynamic']
 endif
 
diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 168ee08e58..39a8fd1c8e 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -37,6 +37,10 @@ Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',
 	libraries: ['-Wl,--as-needed'] + dpdk_libraries,
 	libraries_private: dpdk_extra_ldflags)
 
+platform_flags = []
+if not is_windows
+	platform_flags += ['-Wl,--export-dynamic'] # ELF only
+endif
 pkg.generate(name: 'DPDK', # main DPDK pkgconfig file
 	filebase: 'libdpdk',
 	version: meson.project_version(),
@@ -47,7 +51,7 @@ This is required for a number of static inline functions in the public headers.'
 	                  # if libbsd is not enabled, then this is blank
 	libraries_private: ['-Wl,--whole-archive'] +
 			dpdk_drivers + dpdk_static_libraries +
-			['-Wl,--no-whole-archive', '-Wl,--export-dynamic']
+			['-Wl,--no-whole-archive'] + platform_flags
 )
 
 # For static linking with dependencies as shared libraries,
diff --git a/examples/meson.build b/examples/meson.build
index f643ec1bad..b9ab24223f 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -64,7 +64,7 @@ if cc.has_argument('-Wno-format-truncation')
 	default_cflags += '-Wno-format-truncation'
 endif
 default_ldflags = dpdk_extra_ldflags
-if get_option('default_library') == 'static'
+if get_option('default_library') == 'static' and not is_windows
 	default_ldflags += ['-Wl,--export-dynamic']
 endif
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.457265458 +0000
+++ 0093-build-fix-linker-flags-on-Windows.patch	2021-02-05 11:18:28.946693778 +0000
@@ -1 +1 @@
-From da042bcfc6c870fd067329a22e4084c4b2c4be2a Mon Sep 17 00:00:00 2001
+From a0e0fe9adf716b5a723fff45ca60cc198d3b2802 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da042bcfc6c870fd067329a22e4084c4b2c4be2a ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (91 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'build: fix linker flags on Windows' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix build with SVE' " luca.boccassi
                   ` (181 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: David Christensen, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c9a4a0dcf9f4c379dc8b88fcffafefeedc7f45d4 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 14 Jan 2021 06:59:22 +0000
Subject: [PATCH] lpm: fix vector IPv4 lookup

[ upstream commit 5702b7bf1ce509d2f40d732ba4e2af5b1269e0d8 ]

rte_lpm_lookupx4 could return wrong next hop when more than 256 tbl8
groups are created. This is caused by incorrect type casting of tbl8
group index that been stored in tbl24 entry. The casting caused group
index truncation and hence wrong tbl8 group been searched.

Issue fixed by applying proper mask to tbl24 entry to get tbl8 group index.

Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Fixes: cbc2f1dccfba ("lpm/arm: support NEON")
Fixes: d2cc7959342b ("lpm: add AltiVec for ppc64")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_lpm/rte_lpm_altivec.h | 8 ++++----
 lib/librte_lpm/rte_lpm_neon.h    | 8 ++++----
 lib/librte_lpm/rte_lpm_sse.h     | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm_altivec.h b/lib/librte_lpm/rte_lpm_altivec.h
index 228c41b38e..4fbc1b595d 100644
--- a/lib/librte_lpm/rte_lpm_altivec.h
+++ b/lib/librte_lpm/rte_lpm_altivec.h
@@ -88,28 +88,28 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
 	if (unlikely((pt & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[0] = i8.u32[0] +
-			(uint8_t)tbl[0] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[0] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]];
 		tbl[0] = *ptbl;
 	}
 	if (unlikely((pt >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[1] = i8.u32[1] +
-			(uint8_t)tbl[1] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[1] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]];
 		tbl[1] = *ptbl;
 	}
 	if (unlikely((pt2 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[2] = i8.u32[2] +
-			(uint8_t)tbl[2] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[2] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]];
 		tbl[2] = *ptbl;
 	}
 	if (unlikely((pt2 >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[3] = i8.u32[3] +
-			(uint8_t)tbl[3] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[3] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]];
 		tbl[3] = *ptbl;
 	}
diff --git a/lib/librte_lpm/rte_lpm_neon.h b/lib/librte_lpm/rte_lpm_neon.h
index 6c131d3125..4642a866f1 100644
--- a/lib/librte_lpm/rte_lpm_neon.h
+++ b/lib/librte_lpm/rte_lpm_neon.h
@@ -81,28 +81,28 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
 	if (unlikely((pt & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[0] = i8.u32[0] +
-			(uint8_t)tbl[0] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[0] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]];
 		tbl[0] = *ptbl;
 	}
 	if (unlikely((pt >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[1] = i8.u32[1] +
-			(uint8_t)tbl[1] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[1] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]];
 		tbl[1] = *ptbl;
 	}
 	if (unlikely((pt2 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[2] = i8.u32[2] +
-			(uint8_t)tbl[2] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[2] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]];
 		tbl[2] = *ptbl;
 	}
 	if (unlikely((pt2 >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[3] = i8.u32[3] +
-			(uint8_t)tbl[3] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[3] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]];
 		tbl[3] = *ptbl;
 	}
diff --git a/lib/librte_lpm/rte_lpm_sse.h b/lib/librte_lpm/rte_lpm_sse.h
index 44770b6ff8..eaa863c522 100644
--- a/lib/librte_lpm/rte_lpm_sse.h
+++ b/lib/librte_lpm/rte_lpm_sse.h
@@ -82,28 +82,28 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
 	if (unlikely((pt & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[0] = i8.u32[0] +
-			(uint8_t)tbl[0] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[0] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]];
 		tbl[0] = *ptbl;
 	}
 	if (unlikely((pt >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[1] = i8.u32[1] +
-			(uint8_t)tbl[1] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[1] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]];
 		tbl[1] = *ptbl;
 	}
 	if (unlikely((pt2 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[2] = i8.u32[2] +
-			(uint8_t)tbl[2] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[2] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]];
 		tbl[2] = *ptbl;
 	}
 	if (unlikely((pt2 >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[3] = i8.u32[3] +
-			(uint8_t)tbl[3] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[3] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]];
 		tbl[3] = *ptbl;
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.497241716 +0000
+++ 0094-lpm-fix-vector-IPv4-lookup.patch	2021-02-05 11:18:28.946693778 +0000
@@ -1 +1 @@
-From 5702b7bf1ce509d2f40d732ba4e2af5b1269e0d8 Mon Sep 17 00:00:00 2001
+From c9a4a0dcf9f4c379dc8b88fcffafefeedc7f45d4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5702b7bf1ce509d2f40d732ba4e2af5b1269e0d8 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix build with SVE' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (92 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/octeontx: " luca.boccassi
                   ` (180 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ee5c26341a3fcadd55c47436ccac9962cc6317a0 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 12 Jan 2021 02:57:05 +0000
Subject: [PATCH] net/hns3: fix build with SVE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 21c4f1c7b2f8e637ecff9b9180e21f6b4505715f ]

Building with SVE extension enabled stopped with error:

 error: ACLE function ‘svwhilelt_b64_s32’ requires ISA extension ‘sve’
   18 | #define PG64_256BIT  svwhilelt_b64(0, 4)

This is caused by unintentional cflags reset.
Fixed the issue by not touching cflags, and using flags defined by
compiler.

Fixes: 952ebacce4f2 ("net/hns3: support SVE Rx")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 drivers/net/hns3/hns3_rxtx.c | 4 ++--
 drivers/net/hns3/meson.build | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 88d3baba4a..5ac36b314d 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -10,7 +10,7 @@
 #include <rte_io.h>
 #include <rte_net.h>
 #include <rte_malloc.h>
-#if defined(RTE_ARCH_ARM64) && defined(CC_SVE_SUPPORT)
+#if defined(RTE_ARCH_ARM64) && defined(__ARM_FEATURE_SVE)
 #include <rte_cpuflags.h>
 #endif
 
@@ -2467,7 +2467,7 @@ hns3_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 static bool
 hns3_check_sve_support(void)
 {
-#if defined(RTE_ARCH_ARM64) && defined(CC_SVE_SUPPORT)
+#if defined(RTE_ARCH_ARM64) && defined(__ARM_FEATURE_SVE)
 	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SVE))
 		return true;
 #endif
diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build
index 45cee34d9d..5674d986ba 100644
--- a/drivers/net/hns3/meson.build
+++ b/drivers/net/hns3/meson.build
@@ -32,7 +32,6 @@ deps += ['hash']
 if arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
 	sources += files('hns3_rxtx_vec.c')
 	if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
-		cflags = ['-DCC_SVE_SUPPORT']
 		sources += files('hns3_rxtx_vec_sve.c')
 	endif
 endif
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.535949489 +0000
+++ 0095-net-hns3-fix-build-with-SVE.patch	2021-02-05 11:18:28.946693778 +0000
@@ -1 +1 @@
-From 21c4f1c7b2f8e637ecff9b9180e21f6b4505715f Mon Sep 17 00:00:00 2001
+From ee5c26341a3fcadd55c47436ccac9962cc6317a0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 21c4f1c7b2f8e637ecff9b9180e21f6b4505715f ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/octeontx: fix build with SVE' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (93 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix build with SVE' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'common/octeontx2: " luca.boccassi
                   ` (179 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/450da6bd01601534cdb350a8c1050e2653eccbba

Thanks.

Luca Boccassi

---
From 450da6bd01601534cdb350a8c1050e2653eccbba Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 12 Jan 2021 02:57:06 +0000
Subject: [PATCH] net/octeontx: fix build with SVE

[ upstream commit e88bd4746737a1ca464b866d29f20ff5a739cd3f ]

Building with gcc 10.2 with SVE extension enabled got error:

{standard input}: Assembler messages:
{standard input}:91: Error: selected processor does not support `addvl x4,x8,#-1'
{standard input}:95: Error: selected processor does not support `ptrue p1.d,all'
{standard input}:135: Error: selected processor does not support `whilelo p2.d,xzr,x5'
{standard input}:137: Error: selected processor does not support `decb x1'

This is because inline assembly code explicitly resets cpu model to
not have SVE support. Thus SVE instructions generated by compiler
auto vectorization got rejected by assembler.

Added SVE to the cpu model specified by inline assembly for SVE support.
Not replacing the inline assembly with C atomics because the driver relies
on specific LSE instruction to interface to co-processor [1].

Fixes: f0c7bb1bf778 ("net/octeontx/base: add octeontx IO operations")

[1] https://mails.dpdk.org/archives/dev/2021-January/196092.html

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx/base/octeontx_io.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx/base/octeontx_io.h b/drivers/net/octeontx/base/octeontx_io.h
index 04b9ce1910..d0b9cfbc67 100644
--- a/drivers/net/octeontx/base/octeontx_io.h
+++ b/drivers/net/octeontx/base/octeontx_io.h
@@ -52,6 +52,11 @@ do {							\
 #endif
 
 #if defined(RTE_ARCH_ARM64)
+#if defined(__ARM_FEATURE_SVE)
+#define __LSE_PREAMBLE " .cpu	generic+lse+sve\n"
+#else
+#define __LSE_PREAMBLE " .cpu	generic+lse\n"
+#endif
 /**
  * Perform an atomic fetch-and-add operation.
  */
@@ -61,7 +66,7 @@ octeontx_reg_ldadd_u64(void *addr, int64_t off)
 	uint64_t old_val;
 
 	__asm__ volatile(
-		" .cpu		generic+lse\n"
+		__LSE_PREAMBLE
 		" ldadd	%1, %0, [%2]\n"
 		: "=r" (old_val) : "r" (off), "r" (addr) : "memory");
 
@@ -98,12 +103,13 @@ octeontx_reg_lmtst(void *lmtline_va, void *ioreg_va, const uint64_t cmdbuf[],
 
 		/* LDEOR initiates atomic transfer to I/O device */
 		__asm__ volatile(
-			" .cpu		generic+lse\n"
+			__LSE_PREAMBLE
 			" ldeor	xzr, %0, [%1]\n"
 			: "=r" (result) : "r" (ioreg_va) : "memory");
 	} while (!result);
 }
 
+#undef __LSE_PREAMBLE
 #else
 
 static inline uint64_t
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.578075743 +0000
+++ 0096-net-octeontx-fix-build-with-SVE.patch	2021-02-05 11:18:28.946693778 +0000
@@ -1 +1 @@
-From e88bd4746737a1ca464b866d29f20ff5a739cd3f Mon Sep 17 00:00:00 2001
+From 450da6bd01601534cdb350a8c1050e2653eccbba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e88bd4746737a1ca464b866d29f20ff5a739cd3f ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/octeontx2: fix build with SVE' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (94 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/octeontx: " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/cxgbe: accept VLAN flow items without ethertype' " luca.boccassi
                   ` (178 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 4d2a3f2dff4e59f747df9ad934c1c0a223017371 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 12 Jan 2021 02:57:07 +0000
Subject: [PATCH] common/octeontx2: fix build with SVE

[ upstream commit fe558028140662ba8488399714d8fe21281851f0 ]

Building with gcc 10.2 with SVE extension enabled got error:

{standard input}: Assembler messages:
{standard input}:4002: Error: selected processor does not support `mov z3.b,#0'
{standard input}:4003: Error: selected processor does not support `whilelo p1.b,xzr,x7'
{standard input}:4005: Error: selected processor does not support `ld1b z0.b,p1/z,[x8]'
{standard input}:4006: Error: selected processor does not support `whilelo p4.s,wzr,w7'

This is because inline assembly code explicitly resets cpu model to
not have SVE support. Thus SVE instructions generated by compiler
auto vectorization got rejected by assembler.

Added SVE to the cpu model specified by inline assembly for SVE support.
Not replacing the inline assembly with C atomics because the driver relies
on specific LSE instruction to interface to co-processor [1].

Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")

[1] https://mails.dpdk.org/archives/dev/2021-January/196092.html

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/octeontx2/otx2_io_arm64.h | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/common/octeontx2/otx2_io_arm64.h b/drivers/common/octeontx2/otx2_io_arm64.h
index b5c85d9a6e..34268e3af3 100644
--- a/drivers/common/octeontx2/otx2_io_arm64.h
+++ b/drivers/common/octeontx2/otx2_io_arm64.h
@@ -21,6 +21,12 @@
 #define otx2_prefetch_store_keep(ptr) ({\
 	asm volatile("prfm pstl1keep, [%x0]\n" : : "r" (ptr)); })
 
+#if defined(__ARM_FEATURE_SVE)
+#define __LSE_PREAMBLE " .cpu  generic+lse+sve\n"
+#else
+#define __LSE_PREAMBLE " .cpu  generic+lse\n"
+#endif
+
 static __rte_always_inline uint64_t
 otx2_atomic64_add_nosync(int64_t incr, int64_t *ptr)
 {
@@ -28,7 +34,7 @@ otx2_atomic64_add_nosync(int64_t incr, int64_t *ptr)
 
 	/* Atomic add with no ordering */
 	asm volatile (
-		".cpu  generic+lse\n"
+		__LSE_PREAMBLE
 		"ldadd %x[i], %x[r], [%[b]]"
 		: [r] "=r" (result), "+m" (*ptr)
 		: [i] "r" (incr), [b] "r" (ptr)
@@ -43,7 +49,7 @@ otx2_atomic64_add_sync(int64_t incr, int64_t *ptr)
 
 	/* Atomic add with ordering */
 	asm volatile (
-		".cpu  generic+lse\n"
+		__LSE_PREAMBLE
 		"ldadda %x[i], %x[r], [%[b]]"
 		: [r] "=r" (result), "+m" (*ptr)
 		: [i] "r" (incr), [b] "r" (ptr)
@@ -57,7 +63,7 @@ otx2_lmt_submit(rte_iova_t io_address)
 	uint64_t result;
 
 	asm volatile (
-		".cpu  generic+lse\n"
+		__LSE_PREAMBLE
 		"ldeor xzr,%x[rf],[%[rs]]" :
 		 [rf] "=r"(result): [rs] "r"(io_address));
 	return result;
@@ -69,7 +75,7 @@ otx2_lmt_submit_release(rte_iova_t io_address)
 	uint64_t result;
 
 	asm volatile (
-		".cpu  generic+lse\n"
+		__LSE_PREAMBLE
 		"ldeorl xzr,%x[rf],[%[rs]]" :
 		 [rf] "=r"(result) : [rs] "r"(io_address));
 	return result;
@@ -104,4 +110,5 @@ otx2_lmt_mov_seg(void *out, const void *in, const uint16_t segdw)
 		dst128[i] = src128[i];
 }
 
+#undef __LSE_PREAMBLE
 #endif /* _OTX2_IO_ARM64_H_ */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.618118057 +0000
+++ 0097-common-octeontx2-fix-build-with-SVE.patch	2021-02-05 11:18:28.946693778 +0000
@@ -1 +1 @@
-From fe558028140662ba8488399714d8fe21281851f0 Mon Sep 17 00:00:00 2001
+From 4d2a3f2dff4e59f747df9ad934c1c0a223017371 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fe558028140662ba8488399714d8fe21281851f0 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/cxgbe: accept VLAN flow items without ethertype' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (95 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'common/octeontx2: " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio: add missing backend features negotiation' " luca.boccassi
                   ` (177 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Karra Satwik; +Cc: Rahul Lakkireddy, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From ae734622835b1e111caeae48b8f69c47f1494ea4 Mon Sep 17 00:00:00 2001
From: Karra Satwik <kaara.satwik@chelsio.com>
Date: Mon, 21 Dec 2020 04:14:43 +0530
Subject: [PATCH] net/cxgbe: accept VLAN flow items without ethertype

[ upstream commit c3bbc381477f299eef3078ab7c4ef57165fe3121 ]

When apps pass the RTE_FLOW_ITEM_TYPE_VLAN without setting the
ethertype field in RTE_FLOW_ITEM_TYPE_ETH, then assume 0x8100
VLAN by default and don't reject the rule.

Fixes: 55f003d8884c ("net/cxgbe: support flow API for matching QinQ VLAN")

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_flow.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index f7c4f36962..520a5a5c9a 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -245,11 +245,6 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
 	/* If user has not given any mask, then use chelsio supported mask. */
 	mask = umask ? umask : (const struct rte_flow_item_vlan *)dmask;
 
-	if (!fs->mask.ethtype)
-		return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
-					  item,
-					  "Can't parse VLAN item without knowing ethertype");
-
 	/* If ethertype is already set and is not VLAN (0x8100) or
 	 * QINQ(0x88A8), then don't proceed further. Otherwise,
 	 * reset the outer ethertype, so that it can be replaced by
@@ -275,7 +270,7 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
 			fs->mask.ethtype = 0;
 			fs->val.ethtype = 0;
 		}
-	} else if (fs->val.ethtype == RTE_ETHER_TYPE_VLAN) {
+	} else {
 		CXGBE_FILL_FS(1, 1, ivlan_vld);
 		if (spec) {
 			if (spec->tci || (umask && umask->tci))
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.658431296 +0000
+++ 0098-net-cxgbe-accept-VLAN-flow-items-without-ethertype.patch	2021-02-05 11:18:28.950693853 +0000
@@ -1 +1 @@
-From c3bbc381477f299eef3078ab7c4ef57165fe3121 Mon Sep 17 00:00:00 2001
+From ae734622835b1e111caeae48b8f69c47f1494ea4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c3bbc381477f299eef3078ab7c4ef57165fe3121 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/virtio: add missing backend features negotiation' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (96 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/cxgbe: accept VLAN flow items without ethertype' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio: fix memory init with vDPA backend' " luca.boccassi
                   ` (176 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a1d428777e2f1acc4af57c8c6525bd90be8bb153 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 8 Jan 2021 10:41:48 +0100
Subject: [PATCH] net/virtio: add missing backend features negotiation

[ upstream commit 35a6630e2b51b872cfbaf19459888045750592fd ]

This patch adds missing backend features negotiation for
in Vhost-vDPA. Without it, IOTLB messages v2 could be sent
by Virtio-user PMD while not supported by the backend.

Fixes: 6b901437056e ("net/virtio: introduce vhost-vDPA backend")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_user/vhost.h           |  4 ++++
 drivers/net/virtio/virtio_user/vhost_vdpa.c      | 14 ++++++++++++++
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 14 ++++++++++----
 drivers/net/virtio/virtio_user/virtio_user_dev.h |  4 +---
 4 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h
index 210a3704e7..c1dcc50b58 100644
--- a/drivers/net/virtio/virtio_user/vhost.h
+++ b/drivers/net/virtio/virtio_user/vhost.h
@@ -86,6 +86,10 @@ enum vhost_user_request {
 	VHOST_USER_MAX
 };
 
+#ifndef VHOST_BACKEND_F_IOTLB_MSG_V2
+#define VHOST_BACKEND_F_IOTLB_MSG_V2 1
+#endif
+
 extern const char * const vhost_msg_strings[VHOST_USER_MAX];
 
 struct vhost_memory_region {
diff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c b/drivers/net/virtio/virtio_user/vhost_vdpa.c
index c7b9349fc8..b6c81d6f17 100644
--- a/drivers/net/virtio/virtio_user/vhost_vdpa.c
+++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c
@@ -35,6 +35,8 @@
 #define VHOST_VDPA_SET_STATUS _IOW(VHOST_VIRTIO, 0x72, __u8)
 #define VHOST_VDPA_SET_VRING_ENABLE	_IOW(VHOST_VIRTIO, 0x75, \
 					     struct vhost_vring_state)
+#define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
 
 static uint64_t vhost_req_user_to_vdpa[] = {
 	[VHOST_USER_SET_OWNER] = VHOST_SET_OWNER,
@@ -51,6 +53,8 @@ static uint64_t vhost_req_user_to_vdpa[] = {
 	[VHOST_USER_SET_STATUS] = VHOST_VDPA_SET_STATUS,
 	[VHOST_USER_GET_STATUS] = VHOST_VDPA_GET_STATUS,
 	[VHOST_USER_SET_VRING_ENABLE] = VHOST_VDPA_SET_VRING_ENABLE,
+	[VHOST_USER_GET_PROTOCOL_FEATURES] = VHOST_GET_BACKEND_FEATURES,
+	[VHOST_USER_SET_PROTOCOL_FEATURES] = VHOST_SET_BACKEND_FEATURES,
 };
 
 /* no alignment requirement */
@@ -86,6 +90,11 @@ vhost_vdpa_dma_map(struct virtio_user_dev *dev, void *addr,
 {
 	struct vhost_msg msg = {};
 
+	if (!(dev->protocol_features & (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2))) {
+		PMD_DRV_LOG(ERR, "IOTLB_MSG_V2 not supported by the backend.");
+		return -1;
+	}
+
 	msg.type = VHOST_IOTLB_MSG_V2;
 	msg.iotlb.type = VHOST_IOTLB_UPDATE;
 	msg.iotlb.iova = iova;
@@ -108,6 +117,11 @@ vhost_vdpa_dma_unmap(struct virtio_user_dev *dev, __rte_unused void *addr,
 {
 	struct vhost_msg msg = {};
 
+	if (!(dev->protocol_features & (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2))) {
+		PMD_DRV_LOG(ERR, "IOTLB_MSG_V2 not supported by the backend.");
+		return -1;
+	}
+
 	msg.type = VHOST_IOTLB_MSG_V2;
 	msg.iotlb.type = VHOST_IOTLB_INVALIDATE;
 	msg.iotlb.iova = iova;
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index e1cbad0d90..39c5dfc9e4 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -440,11 +440,13 @@ virtio_user_dev_setup(struct virtio_user_dev *dev)
 	 1ULL << VIRTIO_F_RING_PACKED		|	\
 	 1ULL << VHOST_USER_F_PROTOCOL_FEATURES)
 
-#define VIRTIO_USER_SUPPORTED_PROTOCOL_FEATURES		\
+#define VHOST_USER_SUPPORTED_PROTOCOL_FEATURES		\
 	(1ULL << VHOST_USER_PROTOCOL_F_MQ |		\
 	 1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK |	\
 	 1ULL << VHOST_USER_PROTOCOL_F_STATUS)
 
+#define VHOST_VDPA_SUPPORTED_PROTOCOL_FEATURES		\
+	(1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
 int
 virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 		     int cq, int queue_size, const char *mac, char **ifname,
@@ -463,9 +465,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	dev->mac_specified = 0;
 	dev->frontend_features = 0;
 	dev->unsupported_features = ~VIRTIO_USER_SUPPORTED_FEATURES;
-	dev->protocol_features = VIRTIO_USER_SUPPORTED_PROTOCOL_FEATURES;
 	dev->backend_type = backend_type;
 
+	if (dev->backend_type == VIRTIO_USER_BACKEND_VHOST_USER)
+		dev->protocol_features = VHOST_USER_SUPPORTED_PROTOCOL_FEATURES;
+	else if (dev->backend_type == VIRTIO_USER_BACKEND_VHOST_VDPA)
+		dev->protocol_features = VHOST_VDPA_SUPPORTED_PROTOCOL_FEATURES;
+
 	parse_mac(dev, mac);
 
 	if (*ifname) {
@@ -498,8 +504,8 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 		}
 
 
-		if (dev->device_features &
-				(1ULL << VHOST_USER_F_PROTOCOL_FEATURES)) {
+		if ((dev->device_features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)) ||
+				(dev->backend_type == VIRTIO_USER_BACKEND_VHOST_VDPA)) {
 			if (dev->ops->send_request(dev,
 					VHOST_USER_GET_PROTOCOL_FEATURES,
 					&protocol_features))
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
index e053897d8f..3b5b6bc3ae 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
@@ -48,9 +48,7 @@ struct virtio_user_dev {
 	uint64_t	device_features; /* supported features by device */
 	uint64_t	frontend_features; /* enabled frontend features */
 	uint64_t	unsupported_features; /* unsupported features mask */
-	uint64_t	protocol_features; /* negotiated protocol features
-					    * (Vhost-user only)
-					    */
+	uint64_t	protocol_features; /* negotiated protocol features */
 	uint8_t		status;
 	uint16_t	net_status;
 	uint16_t	port_id;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.701602683 +0000
+++ 0099-net-virtio-add-missing-backend-features-negotiation.patch	2021-02-05 11:18:28.950693853 +0000
@@ -1 +1 @@
-From 35a6630e2b51b872cfbaf19459888045750592fd Mon Sep 17 00:00:00 2001
+From a1d428777e2f1acc4af57c8c6525bd90be8bb153 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35a6630e2b51b872cfbaf19459888045750592fd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index c5b59e2f95..83c60ea660 100644
+index c7b9349fc8..b6c81d6f17 100644
@@ -71 +72 @@
-@@ -111,6 +120,11 @@ vhost_vdpa_dma_unmap(struct virtio_user_dev *dev, __rte_unused void *addr,
+@@ -108,6 +117,11 @@ vhost_vdpa_dma_unmap(struct virtio_user_dev *dev, __rte_unused void *addr,

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

* [dpdk-stable] patch 'net/virtio: fix memory init with vDPA backend' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (97 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio: add missing backend features negotiation' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/iavf: fix conflicting RSS combination rules' " luca.boccassi
                   ` (175 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/093202401799d533d5a1c17108e8028eaae85889

Thanks.

Luca Boccassi

---
From 093202401799d533d5a1c17108e8028eaae85889 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 8 Jan 2021 10:41:49 +0100
Subject: [PATCH] net/virtio: fix memory init with vDPA backend

[ upstream commit a121f175722f7b717cb7576c5baff1c20dd3920e ]

This patch fixes an overhead met with mlx5-vdpa Kernel
driver, where for every page in the mapped area, all the
memory tables gets updated. For example, with 2MB hugepages,
a single IOTLB_UPDATE for a 1GB region causes 512 memory
updates on mlx5-vdpa side.

Using batching mode, the mlx5 driver will only trigger a
single memory update for all the IOTLB updates that happen
between the batch begin and batch end commands.

Fixes: 6b901437056e ("net/virtio: introduce vhost-vDPA backend")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_user/vhost.h        |   4 +
 drivers/net/virtio/virtio_user/vhost_vdpa.c   | 106 +++++++++++++++++-
 .../net/virtio/virtio_user/virtio_user_dev.c  |   3 +-
 3 files changed, 107 insertions(+), 6 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h
index c1dcc50b58..be286173b0 100644
--- a/drivers/net/virtio/virtio_user/vhost.h
+++ b/drivers/net/virtio/virtio_user/vhost.h
@@ -90,6 +90,10 @@ enum vhost_user_request {
 #define VHOST_BACKEND_F_IOTLB_MSG_V2 1
 #endif
 
+#ifndef VHOST_BACKEND_F_IOTLB_BATCH
+#define VHOST_BACKEND_F_IOTLB_BATCH 2
+#endif
+
 extern const char * const vhost_msg_strings[VHOST_USER_MAX];
 
 struct vhost_memory_region {
diff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c b/drivers/net/virtio/virtio_user/vhost_vdpa.c
index b6c81d6f17..269bab2f8e 100644
--- a/drivers/net/virtio/virtio_user/vhost_vdpa.c
+++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c
@@ -70,6 +70,8 @@ struct vhost_iotlb_msg {
 #define VHOST_IOTLB_UPDATE         2
 #define VHOST_IOTLB_INVALIDATE     3
 #define VHOST_IOTLB_ACCESS_FAIL    4
+#define VHOST_IOTLB_BATCH_BEGIN    5
+#define VHOST_IOTLB_BATCH_END      6
 	uint8_t type;
 };
 
@@ -84,6 +86,56 @@ struct vhost_msg {
 	};
 };
 
+static int
+vhost_vdpa_iotlb_batch_begin(struct virtio_user_dev *dev)
+{
+	struct vhost_msg msg = {};
+
+	if (!(dev->protocol_features & (1ULL << VHOST_BACKEND_F_IOTLB_BATCH)))
+		return 0;
+
+	if (!(dev->protocol_features & (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2))) {
+		PMD_DRV_LOG(ERR, "IOTLB_MSG_V2 not supported by the backend.");
+		return -1;
+	}
+
+	msg.type = VHOST_IOTLB_MSG_V2;
+	msg.iotlb.type = VHOST_IOTLB_BATCH_BEGIN;
+
+	if (write(dev->vhostfd, &msg, sizeof(msg)) != sizeof(msg)) {
+		PMD_DRV_LOG(ERR, "Failed to send IOTLB batch begin (%s)",
+				strerror(errno));
+		return -1;
+	}
+
+	return 0;
+}
+
+static int
+vhost_vdpa_iotlb_batch_end(struct virtio_user_dev *dev)
+{
+	struct vhost_msg msg = {};
+
+	if (!(dev->protocol_features & (1ULL << VHOST_BACKEND_F_IOTLB_BATCH)))
+		return 0;
+
+	if (!(dev->protocol_features & (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2))) {
+		PMD_DRV_LOG(ERR, "IOTLB_MSG_V2 not supported by the backend.");
+		return -1;
+	}
+
+	msg.type = VHOST_IOTLB_MSG_V2;
+	msg.iotlb.type = VHOST_IOTLB_BATCH_END;
+
+	if (write(dev->vhostfd, &msg, sizeof(msg)) != sizeof(msg)) {
+		PMD_DRV_LOG(ERR, "Failed to send IOTLB batch end (%s)",
+				strerror(errno));
+		return -1;
+	}
+
+	return 0;
+}
+
 static int
 vhost_vdpa_dma_map(struct virtio_user_dev *dev, void *addr,
 				  uint64_t iova, size_t len)
@@ -136,6 +188,39 @@ vhost_vdpa_dma_unmap(struct virtio_user_dev *dev, __rte_unused void *addr,
 	return 0;
 }
 
+static int
+vhost_vdpa_dma_map_batch(struct virtio_user_dev *dev, void *addr,
+				  uint64_t iova, size_t len)
+{
+	int ret;
+
+	if (vhost_vdpa_iotlb_batch_begin(dev) < 0)
+		return -1;
+
+	ret = vhost_vdpa_dma_map(dev, addr, iova, len);
+
+	if (vhost_vdpa_iotlb_batch_end(dev) < 0)
+		return -1;
+
+	return ret;
+}
+
+static int
+vhost_vdpa_dma_unmap_batch(struct virtio_user_dev *dev, void *addr,
+				  uint64_t iova, size_t len)
+{
+	int ret;
+
+	if (vhost_vdpa_iotlb_batch_begin(dev) < 0)
+		return -1;
+
+	ret = vhost_vdpa_dma_unmap(dev, addr, iova, len);
+
+	if (vhost_vdpa_iotlb_batch_end(dev) < 0)
+		return -1;
+
+	return ret;
+}
 
 static int
 vhost_vdpa_map_contig(const struct rte_memseg_list *msl,
@@ -173,21 +258,32 @@ vhost_vdpa_map(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
 static int
 vhost_vdpa_dma_map_all(struct virtio_user_dev *dev)
 {
+	int ret;
+
+	if (vhost_vdpa_iotlb_batch_begin(dev) < 0)
+		return -1;
+
 	vhost_vdpa_dma_unmap(dev, NULL, 0, SIZE_MAX);
 
 	if (rte_eal_iova_mode() == RTE_IOVA_VA) {
 		/* with IOVA as VA mode, we can get away with mapping contiguous
 		 * chunks rather than going page-by-page.
 		 */
-		int ret = rte_memseg_contig_walk_thread_unsafe(
+		ret = rte_memseg_contig_walk_thread_unsafe(
 				vhost_vdpa_map_contig, dev);
 		if (ret)
-			return ret;
+			goto batch_end;
 		/* we have to continue the walk because we've skipped the
 		 * external segments during the config walk.
 		 */
 	}
-	return rte_memseg_walk_thread_unsafe(vhost_vdpa_map, dev);
+	ret = rte_memseg_walk_thread_unsafe(vhost_vdpa_map, dev);
+
+batch_end:
+	if (vhost_vdpa_iotlb_batch_end(dev) < 0)
+		return -1;
+
+	return ret;
 }
 
 /* with below features, vhost vdpa does not need to do the checksum and TSO,
@@ -307,6 +403,6 @@ struct virtio_user_backend_ops virtio_ops_vdpa = {
 	.setup = vhost_vdpa_setup,
 	.send_request = vhost_vdpa_ioctl,
 	.enable_qp = vhost_vdpa_enable_queue_pair,
-	.dma_map = vhost_vdpa_dma_map,
-	.dma_unmap = vhost_vdpa_dma_unmap,
+	.dma_map = vhost_vdpa_dma_map_batch,
+	.dma_unmap = vhost_vdpa_dma_unmap_batch,
 };
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 39c5dfc9e4..202431ca22 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -446,7 +446,8 @@ virtio_user_dev_setup(struct virtio_user_dev *dev)
 	 1ULL << VHOST_USER_PROTOCOL_F_STATUS)
 
 #define VHOST_VDPA_SUPPORTED_PROTOCOL_FEATURES		\
-	(1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
+	(1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2	|	\
+	1ULL << VHOST_BACKEND_F_IOTLB_BATCH)
 int
 virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 		     int cq, int queue_size, const char *mac, char **ifname,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.745396908 +0000
+++ 0100-net-virtio-fix-memory-init-with-vDPA-backend.patch	2021-02-05 11:18:28.950693853 +0000
@@ -1 +1 @@
-From a121f175722f7b717cb7576c5baff1c20dd3920e Mon Sep 17 00:00:00 2001
+From 093202401799d533d5a1c17108e8028eaae85889 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a121f175722f7b717cb7576c5baff1c20dd3920e ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index 83c60ea660..004802b9eb 100644
+index b6c81d6f17..269bab2f8e 100644
@@ -112 +113 @@
-@@ -142,6 +194,39 @@ vhost_vdpa_dma_unmap(struct virtio_user_dev *dev, __rte_unused void *addr,
+@@ -136,6 +188,39 @@ vhost_vdpa_dma_unmap(struct virtio_user_dev *dev, __rte_unused void *addr,
@@ -152 +153 @@
-@@ -179,21 +264,32 @@ vhost_vdpa_map(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
+@@ -173,21 +258,32 @@ vhost_vdpa_map(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
@@ -188 +189 @@
-@@ -313,6 +409,6 @@ struct virtio_user_backend_ops virtio_ops_vdpa = {
+@@ -307,6 +403,6 @@ struct virtio_user_backend_ops virtio_ops_vdpa = {

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

* [dpdk-stable] patch 'net/iavf: fix conflicting RSS combination rules' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (98 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio: fix memory init with vDPA backend' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' " luca.boccassi
                   ` (174 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a6f9886c7a9d6d8bd1004e7cee93152d3677844a Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Thu, 7 Jan 2021 09:17:10 +0000
Subject: [PATCH] net/iavf: fix conflicting RSS combination rules

[ upstream commit 653b88893b75cc5d1cd5edcc8eb7813e8dfbb21d ]

Currently, when use 'flow' command to create a rule with following
invalid RSS type combination, it can be created successfully.

Invalid RSS combinations list:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP

This patch adds these combinations in 'invalid_rss_comb' array to do
valid check, if the combination check failed, the rule will be created
unsuccessful.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index c4c73e6644..27cafdf2b4 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -806,7 +806,9 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.785562771 +0000
+++ 0101-net-iavf-fix-conflicting-RSS-combination-rules.patch	2021-02-05 11:18:28.954693930 +0000
@@ -1 +1 @@
-From 653b88893b75cc5d1cd5edcc8eb7813e8dfbb21d Mon Sep 17 00:00:00 2001
+From a6f9886c7a9d6d8bd1004e7cee93152d3677844a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 653b88893b75cc5d1cd5edcc8eb7813e8dfbb21d ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 7620876b58..ebaac58254 100644
+index c4c73e6644..27cafdf2b4 100644
@@ -30 +31 @@
-@@ -863,7 +863,9 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
+@@ -806,7 +806,9 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,

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

* [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (99 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/iavf: fix conflicting RSS combination rules' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' " luca.boccassi
                   ` (173 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Wei Xie, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/746f4e243da19cf00443a44aca36841363811094

Thanks.

Luca Boccassi

---
From 746f4e243da19cf00443a44aca36841363811094 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Fri, 8 Jan 2021 15:29:10 +0800
Subject: [PATCH] net/ice: fix RSS lookup table initialization

[ upstream commit 7fe2fde05ac8766afaed4344659e39e8fc6b2514 ]

RSS look-up table initialization is done incorrectly due to
divide-by-zero error.
Add a check to rx-queue count.

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index bbb8c14606..4dcaa87350 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3274,10 +3274,12 @@ ice_dev_configure(struct rte_eth_dev *dev)
 	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
-	ret = ice_init_rss(pf);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
-		return ret;
+	if (dev->data->nb_rx_queues) {
+		ret = ice_init_rss(pf);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
+			return ret;
+		}
 	}
 
 	return 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.823063271 +0000
+++ 0102-net-ice-fix-RSS-lookup-table-initialization.patch	2021-02-05 11:18:28.954693930 +0000
@@ -1 +1 @@
-From 7fe2fde05ac8766afaed4344659e39e8fc6b2514 Mon Sep 17 00:00:00 2001
+From 746f4e243da19cf00443a44aca36841363811094 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fe2fde05ac8766afaed4344659e39e8fc6b2514 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 587f485ee3..e2799a8eb2 100644
+index bbb8c14606..4dcaa87350 100644

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

* [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (100 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' " luca.boccassi
                   ` (172 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From bf4a202a3ae18913fc175371994574fd0b53e2bf Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Fri, 8 Jan 2021 07:17:52 +0000
Subject: [PATCH] net/ice: disable IPv4 checksum offload in vector Tx

[ upstream commit 30dc028802b440d6ce223078a1992ba77667af34 ]

ICE choices vector TX path or basic TX path by macro
'ICE_NO_VECTOR_FLAGS'.

This patch adds 'DEV_TX_OFFLOAD_IPV4_CKSUM' in 'ICE_NO_VECTOR_FLAGS'
to make IPv4 checksum offload processed by basic TX path.

Fixes: a22483208800 ("net/ice: disable TSO offload in vector path")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index ae2ac29f2a..c09ac7f667 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -266,6 +266,7 @@ ice_rx_vec_queue_default(struct ice_rx_queue *rxq)
 #define ICE_NO_VECTOR_FLAGS (				 \
 		DEV_TX_OFFLOAD_MULTI_SEGS |		 \
 		DEV_TX_OFFLOAD_VLAN_INSERT |		 \
+		DEV_TX_OFFLOAD_IPV4_CKSUM |		 \
 		DEV_TX_OFFLOAD_SCTP_CKSUM |		 \
 		DEV_TX_OFFLOAD_UDP_CKSUM |		 \
 		DEV_TX_OFFLOAD_TCP_TSO |		 \
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.869536687 +0000
+++ 0103-net-ice-disable-IPv4-checksum-offload-in-vector-Tx.patch	2021-02-05 11:18:28.954693930 +0000
@@ -1 +1 @@
-From 30dc028802b440d6ce223078a1992ba77667af34 Mon Sep 17 00:00:00 2001
+From bf4a202a3ae18913fc175371994574fd0b53e2bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 30dc028802b440d6ce223078a1992ba77667af34 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (101 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: add null input checks' " luca.boccassi
                   ` (171 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Leyi Rong; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From d2475d6fa474d8aff9cf26e442e0c90db7fcae4b Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Wed, 6 Jan 2021 13:35:48 +0800
Subject: [PATCH] net/ice: enlarge Rx queue rearm threshold to 64

[ upstream commit 295906ffaad9bd8e730248fb24be8fb437df1769 ]

We observe performance drop on ice AVX512 data path after stop and
start by using testpmd.

As CPU polling is faster in AVX512 path, L3 contested accesses is
intensified when rxrearm_start is a random value after testpmd
stop/start.

Enlarge ICE_RXQ_REARM_THRESH to 64 to ease the contested accesses and
fix the performance drop issue.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index 6b16716063..adfae016a9 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -31,7 +31,7 @@
 
 #define ICE_VPMD_RX_BURST           32
 #define ICE_VPMD_TX_BURST           32
-#define ICE_RXQ_REARM_THRESH        32
+#define ICE_RXQ_REARM_THRESH        64
 #define ICE_MAX_RX_BURST            ICE_RXQ_REARM_THRESH
 #define ICE_TX_MAX_FREE_BUF_SZ      64
 #define ICE_DESCS_PER_LOOP          4
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.911047106 +0000
+++ 0104-net-ice-enlarge-Rx-queue-rearm-threshold-to-64.patch	2021-02-05 11:18:28.954693930 +0000
@@ -1 +1 @@
-From 295906ffaad9bd8e730248fb24be8fb437df1769 Mon Sep 17 00:00:00 2001
+From d2475d6fa474d8aff9cf26e442e0c90db7fcae4b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 295906ffaad9bd8e730248fb24be8fb437df1769 ]
+
@@ -15,2 +16,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: add null input checks' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (102 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/bnxt: fix lock init and destroy' " luca.boccassi
                   ` (170 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/920206bad83711cf9fa539e94e780275447ba5cb

Thanks.

Luca Boccassi

---
From 920206bad83711cf9fa539e94e780275447ba5cb Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Fri, 8 Jan 2021 08:30:11 +0000
Subject: [PATCH] net/i40e: add null input checks

[ upstream commit 696ad314ccfcd708534aeaefbd946f872278e023 ]

Pointer 'NULL' check for 'mac_addr' or 'conf' within i40e PMD APIs.

Fixes: 66c78f4799ff ("net/i40e: add support for packet template to flow director")
Fixes: 04b443fb2c43 ("net/i40e: fix port id type")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 790d042002..2e34140c5b 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2366,6 +2366,9 @@ rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
 	struct i40e_mac_filter_info mac_filter;
 	int ret;
 
+	if (mac_addr == NULL)
+		return -EINVAL;
+
 	if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
 		return -EINVAL;
 
@@ -3042,6 +3045,9 @@ int rte_pmd_i40e_flow_add_del_packet_template(
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
 
+	if (conf == NULL)
+		return -EINVAL;
+
 	if (!is_i40e_supported(dev))
 		return -ENOTSUP;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.946698368 +0000
+++ 0105-net-i40e-add-null-input-checks.patch	2021-02-05 11:18:28.958694006 +0000
@@ -1 +1 @@
-From 696ad314ccfcd708534aeaefbd946f872278e023 Mon Sep 17 00:00:00 2001
+From 920206bad83711cf9fa539e94e780275447ba5cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 696ad314ccfcd708534aeaefbd946f872278e023 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: fix lock init and destroy' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (103 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: add null input checks' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/bnxt: fix error handling in device start' " luca.boccassi
                   ` (169 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/56c042f48df51cfd8c0524b3b1fccc18bf17c8d0

Thanks.

Luca Boccassi

---
From 56c042f48df51cfd8c0524b3b1fccc18bf17c8d0 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 24 Dec 2020 15:07:32 +0530
Subject: [PATCH] net/bnxt: fix lock init and destroy

[ upstream commit c9ffd6f88653163d51c497bb56c62ec3276caf3d ]

Invoking init/uninit locks in init_resources and uninit_resources
would end up initializing and destroying locks on every port start
stop which is not desired.
Move the 2 routines to dev_init and dev_close respectively as
locks need to be initialized and destroyed only once during the
lifetime of the driver.

Fixes: 1cb3d39a48f7 ("net/bnxt: synchronize between flow related functions")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b2e3683eeb..ff34d54964 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1434,6 +1434,18 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	return 0;
 }
 
+static void
+bnxt_uninit_locks(struct bnxt *bp)
+{
+	pthread_mutex_destroy(&bp->flow_lock);
+	pthread_mutex_destroy(&bp->def_cp_lock);
+	pthread_mutex_destroy(&bp->health_check_lock);
+	if (bp->rep_info) {
+		pthread_mutex_destroy(&bp->rep_info->vfr_lock);
+		pthread_mutex_destroy(&bp->rep_info->vfr_start_lock);
+	}
+}
+
 static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
@@ -1459,6 +1471,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
 	bnxt_free_link_info(bp);
 	bnxt_free_pf_info(bp);
 	bnxt_free_parent_info(bp);
+	bnxt_uninit_locks(bp);
 
 	rte_memzone_free((const struct rte_memzone *)bp->tx_mem_zone);
 	bp->tx_mem_zone = NULL;
@@ -4804,10 +4817,6 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
 		return rc;
 	}
 
-	rc = bnxt_init_locks(bp);
-	if (rc)
-		return rc;
-
 	return 0;
 }
 
@@ -5294,6 +5303,10 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 	if (rc)
 		goto error_free;
 
+	rc = bnxt_init_locks(bp);
+	if (rc)
+		goto error_free;
+
 	rc = bnxt_init_resources(bp, false);
 	if (rc)
 		goto error_free;
@@ -5385,18 +5398,6 @@ bnxt_free_error_recovery_info(struct bnxt *bp)
 	bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY;
 }
 
-static void
-bnxt_uninit_locks(struct bnxt *bp)
-{
-	pthread_mutex_destroy(&bp->flow_lock);
-	pthread_mutex_destroy(&bp->def_cp_lock);
-	pthread_mutex_destroy(&bp->health_check_lock);
-	if (bp->rep_info) {
-		pthread_mutex_destroy(&bp->rep_info->vfr_lock);
-		pthread_mutex_destroy(&bp->rep_info->vfr_start_lock);
-	}
-}
-
 static int
 bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 {
@@ -5418,7 +5419,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 
 	bnxt_uninit_ctx_mem(bp);
 
-	bnxt_uninit_locks(bp);
 	bnxt_free_flow_stats_info(bp);
 	bnxt_free_rep_info(bp);
 	rte_free(bp->ptp_cfg);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.989890192 +0000
+++ 0106-net-bnxt-fix-lock-init-and-destroy.patch	2021-02-05 11:18:28.962694082 +0000
@@ -1 +1 @@
-From c9ffd6f88653163d51c497bb56c62ec3276caf3d Mon Sep 17 00:00:00 2001
+From 56c042f48df51cfd8c0524b3b1fccc18bf17c8d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c9ffd6f88653163d51c497bb56c62ec3276caf3d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index ef6b611beb..bd7bcbdfdf 100644
+index b2e3683eeb..ff34d54964 100644
@@ -26 +27 @@
-@@ -1440,6 +1440,18 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -1434,6 +1434,18 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
@@ -45 +46 @@
-@@ -1465,6 +1477,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
+@@ -1459,6 +1471,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
@@ -53 +54 @@
-@@ -4832,10 +4845,6 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -4804,10 +4817,6 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
@@ -64 +65 @@
-@@ -5322,6 +5331,10 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+@@ -5294,6 +5303,10 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
@@ -75 +76 @@
-@@ -5413,18 +5426,6 @@ bnxt_free_error_recovery_info(struct bnxt *bp)
+@@ -5385,18 +5398,6 @@ bnxt_free_error_recovery_info(struct bnxt *bp)
@@ -94 +95 @@
-@@ -5446,7 +5447,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5418,7 +5419,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)

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

* [dpdk-stable] patch 'net/bnxt: fix error handling in device start' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (104 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/bnxt: fix lock init and destroy' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' " luca.boccassi
                   ` (168 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/800d74c40c6c86326342285848038453cf2ffc71

Thanks.

Luca Boccassi

---
From 800d74c40c6c86326342285848038453cf2ffc71 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 24 Dec 2020 15:07:33 +0530
Subject: [PATCH] net/bnxt: fix error handling in device start

[ upstream commit 9d276b439aafab582c5e07e82ded75570b4dc9b4 ]

Call bnxt_dev_stop in error path of bnxt_dev_start_op() to keep
it simple and consistent

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

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 145 ++++++++++++++++-----------------
 1 file changed, 70 insertions(+), 75 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ff34d54964..9a6eb19bf2 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1253,81 +1253,6 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
 	return rc;
 }
 
-static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
-{
-	struct bnxt *bp = eth_dev->data->dev_private;
-	uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
-	int vlan_mask = 0;
-	int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;
-
-	if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) {
-		PMD_DRV_LOG(ERR, "Queues are not configured yet!\n");
-		return -EINVAL;
-	}
-
-	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) {
-		PMD_DRV_LOG(ERR,
-			"RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
-			bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
-	}
-
-	do {
-		rc = bnxt_hwrm_if_change(bp, true);
-		if (rc == 0 || rc != -EAGAIN)
-			break;
-
-		rte_delay_ms(BNXT_IF_CHANGE_RETRY_INTERVAL);
-	} while (retry_cnt--);
-
-	if (rc)
-		return rc;
-
-	if (bp->flags & BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE) {
-		rc = bnxt_handle_if_change_status(bp);
-		if (rc)
-			return rc;
-	}
-
-	bnxt_enable_int(bp);
-
-	rc = bnxt_init_chip(bp);
-	if (rc)
-		goto error;
-
-	eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
-	eth_dev->data->dev_started = 1;
-
-	bnxt_link_update_op(eth_dev, 1);
-
-	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
-		vlan_mask |= ETH_VLAN_FILTER_MASK;
-	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
-		vlan_mask |= ETH_VLAN_STRIP_MASK;
-	rc = bnxt_vlan_offload_set_op(eth_dev, vlan_mask);
-	if (rc)
-		goto error;
-
-	/* Initialize bnxt ULP port details */
-	rc = bnxt_ulp_port_init(bp);
-	if (rc)
-		goto error;
-
-	eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
-	eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
-
-	bnxt_schedule_fw_health_check(bp);
-
-	return 0;
-
-error:
-	bnxt_shutdown_nic(bp);
-	bnxt_free_tx_mbufs(bp);
-	bnxt_free_rx_mbufs(bp);
-	bnxt_hwrm_if_change(bp, false);
-	eth_dev->data->dev_started = 0;
-	return rc;
-}
-
 static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
@@ -1434,6 +1359,76 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	return 0;
 }
 
+static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+{
+	struct bnxt *bp = eth_dev->data->dev_private;
+	uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
+	int vlan_mask = 0;
+	int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;
+
+	if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) {
+		PMD_DRV_LOG(ERR, "Queues are not configured yet!\n");
+		return -EINVAL;
+	}
+
+	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS)
+		PMD_DRV_LOG(ERR,
+			    "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
+			    bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+
+	do {
+		rc = bnxt_hwrm_if_change(bp, true);
+		if (rc == 0 || rc != -EAGAIN)
+			break;
+
+		rte_delay_ms(BNXT_IF_CHANGE_RETRY_INTERVAL);
+	} while (retry_cnt--);
+
+	if (rc)
+		return rc;
+
+	if (bp->flags & BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE) {
+		rc = bnxt_handle_if_change_status(bp);
+		if (rc)
+			return rc;
+	}
+
+	bnxt_enable_int(bp);
+
+	rc = bnxt_init_chip(bp);
+	if (rc)
+		goto error;
+
+	eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
+	eth_dev->data->dev_started = 1;
+
+	bnxt_link_update_op(eth_dev, 1);
+
+	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
+		vlan_mask |= ETH_VLAN_FILTER_MASK;
+	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
+		vlan_mask |= ETH_VLAN_STRIP_MASK;
+	rc = bnxt_vlan_offload_set_op(eth_dev, vlan_mask);
+	if (rc)
+		goto error;
+
+	/* Initialize bnxt ULP port details */
+	rc = bnxt_ulp_port_init(bp);
+	if (rc)
+		goto error;
+
+	eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
+	eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
+
+	bnxt_schedule_fw_health_check(bp);
+
+	return 0;
+
+error:
+	bnxt_dev_stop_op(eth_dev);
+	return rc;
+}
+
 static void
 bnxt_uninit_locks(struct bnxt *bp)
 {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.035887431 +0000
+++ 0107-net-bnxt-fix-error-handling-in-device-start.patch	2021-02-05 11:18:28.966694159 +0000
@@ -1 +1 @@
-From 9d276b439aafab582c5e07e82ded75570b4dc9b4 Mon Sep 17 00:00:00 2001
+From 800d74c40c6c86326342285848038453cf2ffc71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9d276b439aafab582c5e07e82ded75570b4dc9b4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- drivers/net/bnxt/bnxt_ethdev.c | 144 ++++++++++++++++-----------------
- 1 file changed, 70 insertions(+), 74 deletions(-)
+ drivers/net/bnxt/bnxt_ethdev.c | 145 ++++++++++++++++-----------------
+ 1 file changed, 70 insertions(+), 75 deletions(-)
@@ -19 +20 @@
-index bd7bcbdfdf..b4a23366ee 100644
+index ff34d54964..9a6eb19bf2 100644
@@ -22 +23 @@
-@@ -1260,80 +1260,6 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
+@@ -1253,81 +1253,6 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
@@ -38 +39 @@
--	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS)
+-	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) {
@@ -40,2 +41,3 @@
--			    "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
--			    bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+-			"RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
+-			bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+-	}
@@ -103 +105 @@
-@@ -1440,6 +1366,76 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -1434,6 +1359,76 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (105 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/bnxt: fix error handling in device start' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' " luca.boccassi
                   ` (167 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Liron Himi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From b3ff422b868710cc8e53302f07c01b80ed0fcea6 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 7 Dec 2020 19:37:15 +0800
Subject: [PATCH] net/mvneta: check allocation in Rx queue flush

[ upstream commit 565789662e7bc7608681cb93e3ccf7a4a2744f0b ]

The function rte_malloc() could return NULL, the return value
need to be checked.

Fixes: ce7ea764597e ("net/mvneta: support Rx/Tx")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvneta/mvneta_rxtx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/mvneta/mvneta_rxtx.c b/drivers/net/mvneta/mvneta_rxtx.c
index 10b6f57584..dfa7ecc090 100644
--- a/drivers/net/mvneta/mvneta_rxtx.c
+++ b/drivers/net/mvneta/mvneta_rxtx.c
@@ -872,7 +872,17 @@ mvneta_rx_queue_flush(struct mvneta_rxq *rxq)
 	int ret, i;
 
 	descs = rte_malloc("rxdesc", MRVL_NETA_RXD_MAX * sizeof(*descs), 0);
+	if (descs == NULL) {
+		MVNETA_LOG(ERR, "Failed to allocate descs.");
+		return;
+	}
+
 	bufs = rte_malloc("buffs", MRVL_NETA_RXD_MAX * sizeof(*bufs), 0);
+	if (bufs == NULL) {
+		MVNETA_LOG(ERR, "Failed to allocate bufs.");
+		rte_free(descs);
+		return;
+	}
 
 	do {
 		num = MRVL_NETA_RXD_MAX;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.081330340 +0000
+++ 0108-net-mvneta-check-allocation-in-Rx-queue-flush.patch	2021-02-05 11:18:28.966694159 +0000
@@ -1 +1 @@
-From 565789662e7bc7608681cb93e3ccf7a4a2744f0b Mon Sep 17 00:00:00 2001
+From b3ff422b868710cc8e53302f07c01b80ed0fcea6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 565789662e7bc7608681cb93e3ccf7a4a2744f0b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (106 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix hairpin flow split decision' " luca.boccassi
                   ` (166 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: Nithin Dabilpuram, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From d777e0539606c6c5bcdef5195069b148b1d06742 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Mon, 21 Dec 2020 19:33:08 +0530
Subject: [PATCH] net/octeontx2: fix corruption in segments list

[ upstream commit 54b79ac220b16465bf67d2bd65e3098379a5ce25 ]

On Tx, lastseg->next is not being reset to null for multi segmented
packet and same mbuf can be used on Rx which has a stale mbuf entry into
mbuf->next.

On Rx, application receives mbuf with mbuf->next uninitialized though
mbuf->nb_segs is correct. Application iterates over all segments using
mbuf->next ignoring mbuf->nb_segs which leads to undefined behavior.

So earlier assumption of just having right value in mbuf->nb_segs is
enough, is incorrect. Mbuf must contain valid and synced value in
nb_segs and next pointer.

Fixes: 364eb0e46683 ("net/octeontx2: avoid per packet barrier with multi segment")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/octeontx2/otx2_rx.c | 6 ++++++
 drivers/net/octeontx2/otx2_rx.h | 7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_rx.c b/drivers/net/octeontx2/otx2_rx.c
index 2da8efe77c..ffeade5952 100644
--- a/drivers/net/octeontx2/otx2_rx.c
+++ b/drivers/net/octeontx2/otx2_rx.c
@@ -279,6 +279,12 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
 		vst1q_u64((uint64_t *)mbuf2->rearm_data, rearm2);
 		vst1q_u64((uint64_t *)mbuf3->rearm_data, rearm3);
 
+		/* Update that no more segments */
+		mbuf0->next = NULL;
+		mbuf1->next = NULL;
+		mbuf2->next = NULL;
+		mbuf3->next = NULL;
+
 		/* Store the mbufs to rx_pkts */
 		vst1q_u64((uint64_t *)&rx_pkts[packets], mbuf01);
 		vst1q_u64((uint64_t *)&rx_pkts[packets + 2], mbuf23);
diff --git a/drivers/net/octeontx2/otx2_rx.h b/drivers/net/octeontx2/otx2_rx.h
index 926f614a4e..0ba3d3d96c 100644
--- a/drivers/net/octeontx2/otx2_rx.h
+++ b/drivers/net/octeontx2/otx2_rx.h
@@ -215,6 +215,7 @@ nix_cqe_xtract_mseg(const struct nix_rx_parse_s *rx,
 			iova_list = (const rte_iova_t *)(iova_list + 1);
 		}
 	}
+	mbuf->next = NULL;
 }
 
 static __rte_always_inline uint16_t
@@ -330,10 +331,12 @@ otx2_nix_cqe_to_mbuf(const struct nix_cqe_hdr_s *cq, const uint32_t tag,
 	*(uint64_t *)(&mbuf->rearm_data) = val;
 	mbuf->pkt_len = len;
 
-	if (flag & NIX_RX_MULTI_SEG_F)
+	if (flag & NIX_RX_MULTI_SEG_F) {
 		nix_cqe_xtract_mseg(rx, mbuf, val);
-	else
+	} else {
 		mbuf->data_len = len;
+		mbuf->next = NULL;
+	}
 }
 
 #define CKSUM_F NIX_RX_OFFLOAD_CHECKSUM_F
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.123353905 +0000
+++ 0109-net-octeontx2-fix-corruption-in-segments-list.patch	2021-02-05 11:18:28.966694159 +0000
@@ -1 +1 @@
-From 54b79ac220b16465bf67d2bd65e3098379a5ce25 Mon Sep 17 00:00:00 2001
+From d777e0539606c6c5bcdef5195069b148b1d06742 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 54b79ac220b16465bf67d2bd65e3098379a5ce25 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix hairpin flow split decision' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (107 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'common/mlx5: fix completion queue entry size configuration' " luca.boccassi
                   ` (165 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From f66821ebc55ff70b57321b2465229c1772bd36fa Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Sun, 10 Jan 2021 19:37:56 +0200
Subject: [PATCH] net/mlx5: fix hairpin flow split decision

[ upstream commit 19e13263ed2fc47a32e9ec3ddcfdbf44168d72ac ]

Previously, the identification of hairpin queue was done using
mlx5_rxq_get_type() function.
Recent patch replaced it with use of mlx5_rxq_get_hairpin_conf(),
and check of the return value conf != NULL.
The case of return value is NULL (queue is not hairpin) was not handled.
As result, non-hairpin flows were wrongly handled.
This patch adds the required check for return value is NULL.

Fixes: 509f8470de55 ("net/mlx5: do not split hairpin flow in explicit mode")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 5138af9208..bceecdb902 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3548,7 +3548,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
 			if (queue == NULL)
 				return 0;
 			conf = mlx5_rxq_get_hairpin_conf(dev, queue->index);
-			if (conf != NULL && !!conf->tx_explicit)
+			if (conf == NULL || conf->tx_explicit != 0)
 				return 0;
 			queue_action = 1;
 			action_n++;
@@ -3558,7 +3558,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
 			if (rss == NULL || rss->queue_num == 0)
 				return 0;
 			conf = mlx5_rxq_get_hairpin_conf(dev, rss->queue[0]);
-			if (conf != NULL && !!conf->tx_explicit)
+			if (conf == NULL || conf->tx_explicit != 0)
 				return 0;
 			queue_action = 1;
 			action_n++;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.165150083 +0000
+++ 0110-net-mlx5-fix-hairpin-flow-split-decision.patch	2021-02-05 11:18:28.974694310 +0000
@@ -1 +1 @@
-From 19e13263ed2fc47a32e9ec3ddcfdbf44168d72ac Mon Sep 17 00:00:00 2001
+From f66821ebc55ff70b57321b2465229c1772bd36fa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 19e13263ed2fc47a32e9ec3ddcfdbf44168d72ac ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 9c2e0900b6..1790e774ba 100644
+index 5138af9208..bceecdb902 100644
@@ -27 +28 @@
-@@ -3543,7 +3543,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
+@@ -3548,7 +3548,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -3553,7 +3553,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
+@@ -3558,7 +3558,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'common/mlx5: fix completion queue entry size configuration' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (108 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix hairpin flow split decision' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: remove CQE padding device argument' " luca.boccassi
                   ` (164 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From c12ce55e812ace1afa69a82f73b1bbef7c0dba41 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 6 Jan 2021 08:19:23 +0000
Subject: [PATCH] common/mlx5: fix completion queue entry size configuration

[ upstream commit a2521c8f983727449bb776133e98bd4ed7534a47 ]

According to the current data-path implementation in the PMD the CQE
size must follow the cache-line size.
So, the configuration of the CQE size should be depended in
RTE_CACHE_LINE_SIZE.

Wrongly, part of the CQE creations didn't follow it exactly what caused
an incompatibility between HW and SW in the data-path when working in
128B cache-line size systems.

Adjust the rule for any CQE creation.
Remove the cqe_size attribute from the DevX CQ creation command and set
it inside the command translation according to the cache-line size.

Fixes: 79a7e409a2f6 ("common/mlx5: prepare support of packet pacing")
Fixes: 5cd0a83f413e ("common/mlx5: support more fields in DevX CQ create")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
 drivers/common/mlx5/mlx5_devx_cmds.h | 1 -
 drivers/net/mlx5/mlx5_devx.c         | 4 ----
 drivers/net/mlx5/mlx5_txpp.c         | 4 ----
 4 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 9c1d1883ea..a0277b7cc0 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1558,7 +1558,8 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
 	} else {
 		MLX5_SET64(cqc, cqctx, dbr_addr, attr->db_addr);
 	}
-	MLX5_SET(cqc, cqctx, cqe_sz, attr->cqe_size);
+	MLX5_SET(cqc, cqctx, cqe_sz, (RTE_CACHE_LINE_SIZE == 128) ?
+				     MLX5_CQE_SIZE_128B : MLX5_CQE_SIZE_64B);
 	MLX5_SET(cqc, cqctx, cc, attr->use_first_only);
 	MLX5_SET(cqc, cqctx, oi, attr->overrun_ignore);
 	MLX5_SET(cqc, cqctx, log_cq_size, attr->log_cq_size);
@@ -1571,7 +1572,6 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
 		 attr->mini_cqe_res_format);
 	MLX5_SET(cqc, cqctx, mini_cqe_res_format_ext,
 		 attr->mini_cqe_res_format_ext);
-	MLX5_SET(cqc, cqctx, cqe_sz, attr->cqe_size);
 	if (attr->q_umem_valid) {
 		MLX5_SET(create_cq_in, in, cq_umem_valid, attr->q_umem_valid);
 		MLX5_SET(create_cq_in, in, cq_umem_id, attr->q_umem_id);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 726e9f5192..bddeabf0ea 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -267,7 +267,6 @@ struct mlx5_devx_cq_attr {
 	uint32_t cqe_comp_en:1;
 	uint32_t mini_cqe_res_format:2;
 	uint32_t mini_cqe_res_format_ext:2;
-	uint32_t cqe_size:3;
 	uint32_t log_cq_size:5;
 	uint32_t log_page_size:5;
 	uint32_t uar_page_id;
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 33213a3df2..0ac403b980 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -486,8 +486,6 @@ mlx5_rxq_create_devx_cq_resources(struct rte_eth_dev *dev, uint16_t idx)
 			"Port %u Rx CQE compression is disabled for LRO.",
 			dev->data->port_id);
 	}
-	if (priv->config.cqe_pad)
-		cq_attr.cqe_size = MLX5_CQE_SIZE_128B;
 	log_cqe_n = log2above(cqe_n);
 	cq_size = sizeof(struct mlx5_cqe) * (1 << log_cqe_n);
 	buf = rte_calloc_socket(__func__, 1, cq_size, page_size,
@@ -1262,8 +1260,6 @@ mlx5_txq_create_devx_cq_resources(struct rte_eth_dev *dev, uint16_t idx)
 		DRV_LOG(ERR, "Failed to allocate CQ door-bell.");
 		goto error;
 	}
-	cq_attr.cqe_size = (sizeof(struct mlx5_cqe) == 128) ?
-			    MLX5_CQE_SIZE_128B : MLX5_CQE_SIZE_64B;
 	cq_attr.uar_page_id = mlx5_os_get_devx_uar_page_id(priv->sh->tx_uar);
 	cq_attr.eqn = priv->sh->eqn;
 	cq_attr.q_umem_valid = 1;
diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c
index 21675ab17a..28afda28cb 100644
--- a/drivers/net/mlx5/mlx5_txpp.c
+++ b/drivers/net/mlx5/mlx5_txpp.c
@@ -275,8 +275,6 @@ mlx5_txpp_create_rearm_queue(struct mlx5_dev_ctx_shared *sh)
 		goto error;
 	}
 	/* Create completion queue object for Rearm Queue. */
-	cq_attr.cqe_size = (sizeof(struct mlx5_cqe) == 128) ?
-			    MLX5_CQE_SIZE_128B : MLX5_CQE_SIZE_64B;
 	cq_attr.uar_page_id = mlx5_os_get_devx_uar_page_id(sh->tx_uar);
 	cq_attr.eqn = sh->eqn;
 	cq_attr.q_umem_valid = 1;
@@ -513,8 +511,6 @@ mlx5_txpp_create_clock_queue(struct mlx5_dev_ctx_shared *sh)
 		goto error;
 	}
 	/* Create completion queue object for Clock Queue. */
-	cq_attr.cqe_size = (sizeof(struct mlx5_cqe) == 128) ?
-			    MLX5_CQE_SIZE_128B : MLX5_CQE_SIZE_64B;
 	cq_attr.use_first_only = 1;
 	cq_attr.overrun_ignore = 1;
 	cq_attr.uar_page_id = mlx5_os_get_devx_uar_page_id(sh->tx_uar);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.203542683 +0000
+++ 0111-common-mlx5-fix-completion-queue-entry-size-configur.patch	2021-02-05 11:18:28.978694387 +0000
@@ -1 +1 @@
-From a2521c8f983727449bb776133e98bd4ed7534a47 Mon Sep 17 00:00:00 2001
+From c12ce55e812ace1afa69a82f73b1bbef7c0dba41 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a2521c8f983727449bb776133e98bd4ed7534a47 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 3bf5279ff1..6a4d6ee7b2 100644
+index 9c1d1883ea..a0277b7cc0 100644
@@ -36 +37 @@
-@@ -1569,7 +1569,8 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
+@@ -1558,7 +1558,8 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
@@ -46 +47 @@
-@@ -1582,7 +1583,6 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
+@@ -1571,7 +1572,6 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
@@ -55 +56 @@
-index 94e9bbb906..8d993dfad7 100644
+index 726e9f5192..bddeabf0ea 100644
@@ -58 +59 @@
-@@ -277,7 +277,6 @@ struct mlx5_devx_cq_attr {
+@@ -267,7 +267,6 @@ struct mlx5_devx_cq_attr {
@@ -67 +68 @@
-index da3bb784be..5c5bea6fd8 100644
+index 33213a3df2..0ac403b980 100644
@@ -89 +90 @@
-index 726bdc6ae1..e998de34b2 100644
+index 21675ab17a..28afda28cb 100644
@@ -92 +93 @@
-@@ -278,8 +278,6 @@ mlx5_txpp_create_rearm_queue(struct mlx5_dev_ctx_shared *sh)
+@@ -275,8 +275,6 @@ mlx5_txpp_create_rearm_queue(struct mlx5_dev_ctx_shared *sh)
@@ -101 +102 @@
-@@ -516,8 +514,6 @@ mlx5_txpp_create_clock_queue(struct mlx5_dev_ctx_shared *sh)
+@@ -513,8 +511,6 @@ mlx5_txpp_create_clock_queue(struct mlx5_dev_ctx_shared *sh)

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

* [dpdk-stable] patch 'net/mlx5: remove CQE padding device argument' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (109 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'common/mlx5: fix completion queue entry size configuration' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on ASO SQ creation failure' " luca.boccassi
                   ` (163 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 5b16f4717a145acd8e87c2e23afda55ddbe5dd8f Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 6 Jan 2021 08:19:24 +0000
Subject: [PATCH] net/mlx5: remove CQE padding device argument

[ upstream commit 4a7f979af28ee94080a5cb02dd21493aa4363777 ]

The data-path code doesn't take care on 'rxq_cqe_pad_en' and use padded
CQE for any case when the system cache-line size is 128B.

This makes the argument redundant.

Remove it.

Fixes: bc91e8db12cd ("net/mlx5: add 128B padding of Rx completion entry")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 doc/guides/nics/mlx5.rst            | 18 ------------------
 drivers/net/mlx5/linux/mlx5_os.c    | 12 ------------
 drivers/net/mlx5/linux/mlx5_verbs.c |  2 +-
 drivers/net/mlx5/mlx5.c             |  6 ------
 drivers/net/mlx5/mlx5.h             |  1 -
 5 files changed, 1 insertion(+), 38 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 3bda0f8417..6950cc1188 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -448,24 +448,6 @@ Driver options
   - POWER9 and ARMv8 with ConnectX-4 Lx, ConnectX-5, ConnectX-6, ConnectX-6 Dx,
     ConnectX-6 Lx, BlueField and BlueField-2.
 
-- ``rxq_cqe_pad_en`` parameter [int]
-
-  A nonzero value enables 128B padding of CQE on RX side. The size of CQE
-  is aligned with the size of a cacheline of the core. If cacheline size is
-  128B, the CQE size is configured to be 128B even though the device writes
-  only 64B data on the cacheline. This is to avoid unnecessary cache
-  invalidation by device's two consecutive writes on to one cacheline.
-  However in some architecture, it is more beneficial to update entire
-  cacheline with padding the rest 64B rather than striding because
-  read-modify-write could drop performance a lot. On the other hand,
-  writing extra data will consume more PCIe bandwidth and could also drop
-  the maximum throughput. It is recommended to empirically set this
-  parameter. Disabled by default.
-
-  Supported on:
-
-  - CPU having 128B cacheline with ConnectX-5 and BlueField.
-
 - ``rxq_pkt_pad_en`` parameter [int]
 
   A nonzero value enables padding Rx packet to the size of cacheline on PCI
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index a77793890a..01bbc14ea5 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -671,7 +671,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	unsigned int hw_padding = 0;
 	unsigned int mps;
 	unsigned int cqe_comp;
-	unsigned int cqe_pad = 0;
 	unsigned int tunnel_en = 0;
 	unsigned int mpls_en = 0;
 	unsigned int swp = 0;
@@ -869,11 +868,6 @@ err_secondary:
 	else
 		cqe_comp = 1;
 	config->cqe_comp = cqe_comp;
-#ifdef HAVE_IBV_MLX5_MOD_CQE_128B_PAD
-	/* Whether device supports 128B Rx CQE padding. */
-	cqe_pad = RTE_CACHE_LINE_SIZE == 128 &&
-		  (dv_attr.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_PAD);
-#endif
 #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
 	if (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {
 		tunnel_en = ((dv_attr.tunnel_offloads_caps &
@@ -1110,12 +1104,6 @@ err_secondary:
 		DRV_LOG(WARNING, "Rx CQE compression isn't supported");
 		config->cqe_comp = 0;
 	}
-	if (config->cqe_pad && !cqe_pad) {
-		DRV_LOG(WARNING, "Rx CQE padding isn't supported");
-		config->cqe_pad = 0;
-	} else if (config->cqe_pad) {
-		DRV_LOG(INFO, "Rx CQE padding is enabled");
-	}
 	if (config->devx) {
 		err = mlx5_devx_cmd_query_hca_attr(sh->ctx, &config->hca_attr);
 		if (err) {
diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 9161fa3b7d..abd167ef14 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -234,7 +234,7 @@ mlx5_rxq_ibv_cq_create(struct rte_eth_dev *dev, uint16_t idx)
 			dev->data->port_id);
 	}
 #ifdef HAVE_IBV_MLX5_MOD_CQE_128B_PAD
-	if (priv->config.cqe_pad) {
+	if (RTE_CACHE_LINE_SIZE == 128) {
 		cq_attr.mlx5.comp_mask |= MLX5DV_CQ_INIT_ATTR_MASK_FLAGS;
 		cq_attr.mlx5.flags |= MLX5DV_CQ_INIT_ATTR_FLAGS_CQE_PAD;
 	}
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ebad6a0709..53ccd1656d 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -43,9 +43,6 @@
 /* Device parameter to enable RX completion queue compression. */
 #define MLX5_RXQ_CQE_COMP_EN "rxq_cqe_comp_en"
 
-/* Device parameter to enable RX completion entry padding to 128B. */
-#define MLX5_RXQ_CQE_PAD_EN "rxq_cqe_pad_en"
-
 /* Device parameter to enable padding Rx packet to cacheline size. */
 #define MLX5_RXQ_PKT_PAD_EN "rxq_pkt_pad_en"
 
@@ -1623,8 +1620,6 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
 		}
 		config->cqe_comp = !!tmp;
 		config->cqe_comp_fmt = tmp;
-	} else if (strcmp(MLX5_RXQ_CQE_PAD_EN, key) == 0) {
-		config->cqe_pad = !!tmp;
 	} else if (strcmp(MLX5_RXQ_PKT_PAD_EN, key) == 0) {
 		config->hw_padding = !!tmp;
 	} else if (strcmp(MLX5_RX_MPRQ_EN, key) == 0) {
@@ -1753,7 +1748,6 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
 {
 	const char **params = (const char *[]){
 		MLX5_RXQ_CQE_COMP_EN,
-		MLX5_RXQ_CQE_PAD_EN,
 		MLX5_RXQ_PKT_PAD_EN,
 		MLX5_RX_MPRQ_EN,
 		MLX5_RX_MPRQ_LOG_STRIDE_NUM,
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index fff2422ea6..4902960052 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -207,7 +207,6 @@ struct mlx5_dev_config {
 	unsigned int mpls_en:1; /* MPLS over GRE/UDP is enabled. */
 	unsigned int cqe_comp:1; /* CQE compression is enabled. */
 	unsigned int cqe_comp_fmt:3; /* CQE compression format. */
-	unsigned int cqe_pad:1; /* CQE padding is enabled. */
 	unsigned int tso:1; /* Whether TSO is supported. */
 	unsigned int rx_vec_en:1; /* Rx vector is enabled. */
 	unsigned int mr_ext_memseg_en:1;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.248915852 +0000
+++ 0112-net-mlx5-remove-CQE-padding-device-argument.patch	2021-02-05 11:18:28.986694539 +0000
@@ -1 +1 @@
-From 4a7f979af28ee94080a5cb02dd21493aa4363777 Mon Sep 17 00:00:00 2001
+From 5b16f4717a145acd8e87c2e23afda55ddbe5dd8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4a7f979af28ee94080a5cb02dd21493aa4363777 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +25 @@
- drivers/net/mlx5/windows/mlx5_os.c  |  7 -------
- 6 files changed, 1 insertion(+), 45 deletions(-)
+ 5 files changed, 1 insertion(+), 38 deletions(-)
@@ -57 +57 @@
-index 6812a1f215..9ac1d46b1b 100644
+index a77793890a..01bbc14ea5 100644
@@ -60 +60 @@
-@@ -677,7 +677,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -671,7 +671,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
@@ -68 +68 @@
-@@ -875,11 +874,6 @@ err_secondary:
+@@ -869,11 +868,6 @@ err_secondary:
@@ -80 +80 @@
-@@ -1116,12 +1110,6 @@ err_secondary:
+@@ -1110,12 +1104,6 @@ err_secondary:
@@ -94 +94 @@
-index b52ae2e6c1..318e39b1df 100644
+index 9161fa3b7d..abd167ef14 100644
@@ -107 +107 @@
-index e47ad6bd42..1afad046b5 100644
+index ebad6a0709..53ccd1656d 100644
@@ -110 +110 @@
-@@ -44,9 +44,6 @@
+@@ -43,9 +43,6 @@
@@ -120 +120 @@
-@@ -1633,8 +1630,6 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
+@@ -1623,8 +1620,6 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
@@ -129 +129 @@
-@@ -1763,7 +1758,6 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
+@@ -1753,7 +1748,6 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
@@ -138 +138 @@
-index 41034f5d19..92a5d04225 100644
+index fff2422ea6..4902960052 100644
@@ -141 +141 @@
-@@ -212,7 +212,6 @@ struct mlx5_dev_config {
+@@ -207,7 +207,6 @@ struct mlx5_dev_config {
@@ -149,25 +148,0 @@
-diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
-index fdd69fd3c1..b036432937 100644
---- a/drivers/net/mlx5/windows/mlx5_os.c
-+++ b/drivers/net/mlx5/windows/mlx5_os.c
-@@ -313,7 +313,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
- 	struct mlx5_priv *priv = NULL;
- 	int err = 0;
- 	unsigned int cqe_comp;
--	unsigned int cqe_pad = 0;
- 	struct rte_ether_addr mac;
- 	char name[RTE_ETH_NAME_MAX_LEN];
- 	int own_domain_id = 0;
-@@ -461,12 +460,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
- 		DRV_LOG(WARNING, "Rx CQE compression isn't supported.");
- 		config->cqe_comp = 0;
- 	}
--	if (config->cqe_pad && !cqe_pad) {
--		DRV_LOG(WARNING, "Rx CQE padding isn't supported.");
--		config->cqe_pad = 0;
--	} else if (config->cqe_pad) {
--		DRV_LOG(INFO, "Rx CQE padding is enabled.");
--	}
- 	if (config->devx) {
- 		err = mlx5_devx_cmd_query_hca_attr(sh->ctx, &config->hca_attr);
- 		if (err) {

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

* [dpdk-stable] patch 'net/mlx5: fix leak on ASO SQ creation failure' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (110 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: remove CQE padding device argument' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' " luca.boccassi
                   ` (162 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From bc316de164b02f7675023aa1d27ac6a0c63ba5ee Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 6 Jan 2021 08:19:25 +0000
Subject: [PATCH] net/mlx5: fix leak on ASO SQ creation failure

[ upstream commit 0e8273176e60d813a8a905e4ce38bbd18a1e2470 ]

In ASO SQ creation, the PMD allocates umem buffer for SQ.

When umem buffer allocation fails, the MR and CQ memory are not freed
what caused a memory leak.

Free it.

Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_age.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_age.c b/drivers/net/mlx5/mlx5_flow_age.c
index cea2cf769d..0ea61be4eb 100644
--- a/drivers/net/mlx5/mlx5_flow_age.c
+++ b/drivers/net/mlx5/mlx5_flow_age.c
@@ -278,7 +278,8 @@ mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket,
 				   sizeof(*sq->db_rec) * 2, 4096, socket);
 	if (!sq->umem_buf) {
 		DRV_LOG(ERR, "Can't allocate wqe buffer.");
-		return -ENOMEM;
+		rte_errno = ENOMEM;
+		goto error;
 	}
 	sq->wqe_umem = mlx5_glue->devx_umem_reg(ctx,
 						(void *)(uintptr_t)sq->umem_buf,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.294325380 +0000
+++ 0113-net-mlx5-fix-leak-on-ASO-SQ-creation-failure.patch	2021-02-05 11:18:28.986694539 +0000
@@ -1 +1 @@
-From 0e8273176e60d813a8a905e4ce38bbd18a1e2470 Mon Sep 17 00:00:00 2001
+From bc316de164b02f7675023aa1d27ac6a0c63ba5ee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e8273176e60d813a8a905e4ce38bbd18a1e2470 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 1f15f19800..e8676071fc 100644
+index cea2cf769d..0ea61be4eb 100644
@@ -26 +27 @@
-@@ -279,7 +279,8 @@ mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket,
+@@ -278,7 +278,8 @@ mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket,
@@ -34 +35 @@
- 	sq->wqe_umem = mlx5_os_umem_reg(ctx,
+ 	sq->wqe_umem = mlx5_glue->devx_umem_reg(ctx,

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

* [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (111 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on ASO SQ creation failure' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'ip_frag: remove padding length of fragment' " luca.boccassi
                   ` (161 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 6c89a5d52f4a0d95726b9b837419ff3f20cefbaa Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Thu, 7 Jan 2021 13:45:45 +0200
Subject: [PATCH] common/mlx5: fix pointer cast on Windows

[ upstream commit 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 ]

While compiling with clang 11 the callers of the
__mlx5_bit_off macro warns on the cast of pointers to
unsigned long which is a smaller int type in Windows.

warning: cast to smaller integer type 'unsigned long'
from 'u8 (*)[16]' [-Wpointer-to-int-cast]

To resolve it the type is changed to uintptr_t to be
compatible for both Linux and Windows.

Fixes: 865a0c15672c ("net/mlx5: add Direct Verbs prepare function")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_prm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 58d180486e..6f5e5dc5f6 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -600,7 +600,7 @@ typedef uint8_t u8;
 
 #define __mlx5_nullp(typ) ((struct mlx5_ifc_##typ##_bits *)0)
 #define __mlx5_bit_sz(typ, fld) sizeof(__mlx5_nullp(typ)->fld)
-#define __mlx5_bit_off(typ, fld) ((unsigned int)(unsigned long) \
+#define __mlx5_bit_off(typ, fld) ((unsigned int)(uintptr_t) \
 				  (&(__mlx5_nullp(typ)->fld)))
 #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - \
 				    (__mlx5_bit_off(typ, fld) & 0x1f))
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.332577887 +0000
+++ 0114-common-mlx5-fix-pointer-cast-on-Windows.patch	2021-02-05 11:18:28.986694539 +0000
@@ -1 +1 @@
-From 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 Mon Sep 17 00:00:00 2001
+From 6c89a5d52f4a0d95726b9b837419ff3f20cefbaa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 7d5cf961b1..9e2d1d0c81 100644
+index 58d180486e..6f5e5dc5f6 100644
@@ -29 +30 @@
-@@ -601,7 +601,7 @@ typedef uint8_t u8;
+@@ -600,7 +600,7 @@ typedef uint8_t u8;

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

* [dpdk-stable] patch 'ip_frag: remove padding length of fragment' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (112 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'doc: fix figure numbering in graph guide' " luca.boccassi
                   ` (160 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Yicai Lu; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From e78b76e24992c33236a9cfbc59c7665bb108f5ef Mon Sep 17 00:00:00 2001
From: Yicai Lu <luyicai@huawei.com>
Date: Wed, 16 Dec 2020 21:36:30 +0800
Subject: [PATCH] ip_frag: remove padding length of fragment

[ upstream commit 324242fb510b65644f025a996404abcd0b8199a6 ]

In some situations, we would get several ip fragments, which total
data length is less than min_ip_len(64) and padding with zeros.
We simulated intermediate fragments by modifying the MTU.
To illustrate the problem, we simplify the packet format and
ignore the impact of the packet header.In namespace2,
a packet whose data length is 1520 is sent.
When the packet passes tap2, the packet is divided into two
fragments: fragment A and B, similar to (1520 = 1510 + 10).
When the packet passes tap3, the larger fragment packet A is
divided into two fragments A1 and A2, similar to (1510 = 1500 + 10).
Finally, the bond interface receives three fragments:
A1, A2, and B (1520 = 1500 + 10 + 10).
One fragmented packet A2 is smaller than the minimum Ethernet
frame length, so it needs to be padded.

|---------------------------------------------------|
|                      HOST                         |
| |--------------|   |----------------------------| |
| |      ns2     |   |      |--------------|      | |
| |  |--------|  |   |  |--------|    |--------|  | |
| |  |  tap1  |  |   |  |  tap2  | ns1|  tap3  |  | |
| |  |mtu=1510|  |   |  |mtu=1510|    |mtu=1500|  | |
| |--|1.1.1.1 |--|   |--|1.1.1.2 |----|2.1.1.1 |--| |
|    |--------|         |--------|    |--------|    |
|         |                 |              |        |
|         |-----------------|              |        |
|                                          |        |
|                                      |--------|   |
|                                      |  bond  |   |
|--------------------------------------|mtu=1500|---|
                                       |--------|

When processing the preceding packets above,
DPDK would aggregate fragmented packets A2 and B.
And error packets are generated, which padding(zero)
is displayed in the middle of the packet.

A2 + B:
0000   fa 16 3e 9f fb 82 fa 47 b2 57 dc 20 08 00 45 00
0010   00 33 b4 66 00 ba 3f 01 c1 a5 01 01 01 01 02 01
0020   01 02 c0 c1 c2 c3 c4 c5 c6 c7 00 00 00 00 00 00
0030   00 00 00 00 00 00 00 00 00 00 00 00 c8 c9 ca cb
0040   cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db
0050   dc dd de df e0 e1 e2 e3 e4 e5 e6

So, we would calculate the length of padding, and remove
the padding in pkt_len and data_len before aggregation.
And also we have the fix for both ipv4 and ipv6.

Fixes: 7f0983ee331c ("ip_frag: check fragment length of incoming packet")

Signed-off-by: Yicai Lu <luyicai@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/rte_ipv4_reassembly.c | 11 ++++++++---
 lib/librte_ip_frag/rte_ipv6_reassembly.c |  9 +++++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index 1dda8aca02..69666c8b82 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -104,6 +104,7 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	const unaligned_uint64_t *psd;
 	uint16_t flag_offset, ip_ofs, ip_flag;
 	int32_t ip_len;
+	int32_t trim;
 
 	flag_offset = rte_be_to_cpu_16(ip_hdr->fragment_offset);
 	ip_ofs = (uint16_t)(flag_offset & RTE_IPV4_HDR_OFFSET_MASK);
@@ -117,14 +118,15 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 
 	ip_ofs *= RTE_IPV4_HDR_OFFSET_UNITS;
 	ip_len = rte_be_to_cpu_16(ip_hdr->total_length) - mb->l3_len;
+	trim = mb->pkt_len - (ip_len + mb->l3_len + mb->l2_len);
 
 	IP_FRAG_LOG(DEBUG, "%s:%d:\n"
-		"mbuf: %p, tms: %" PRIu64
-		", key: <%" PRIx64 ", %#x>, ofs: %u, len: %d, flags: %#x\n"
+		"mbuf: %p, tms: %" PRIu64 ", key: <%" PRIx64 ", %#x>"
+		"ofs: %u, len: %d, padding: %d, flags: %#x\n"
 		"tbl: %p, max_cycles: %" PRIu64 ", entry_mask: %#x, "
 		"max_entries: %u, use_entries: %u\n\n",
 		__func__, __LINE__,
-		mb, tms, key.src_dst[0], key.id, ip_ofs, ip_len, ip_flag,
+		mb, tms, key.src_dst[0], key.id, ip_ofs, ip_len, trim, ip_flag,
 		tbl, tbl->max_cycles, tbl->entry_mask, tbl->max_entries,
 		tbl->use_entries);
 
@@ -134,6 +136,9 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		return NULL;
 	}
 
+	if (unlikely(trim > 0))
+		rte_pktmbuf_trim(mb, trim);
+
 	/* try to find/add entry into the fragment's table. */
 	if ((fp = ip_frag_find(tbl, dr, &key, tms)) == NULL) {
 		IP_FRAG_MBUF2DR(dr, mb);
diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_frag/rte_ipv6_reassembly.c
index ad01055184..6bc0bf792a 100644
--- a/lib/librte_ip_frag/rte_ipv6_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c
@@ -142,6 +142,7 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	struct ip_frag_key key;
 	uint16_t ip_ofs;
 	int32_t ip_len;
+	int32_t trim;
 
 	rte_memcpy(&key.src_dst[0], ip_hdr->src_addr, 16);
 	rte_memcpy(&key.src_dst[2], ip_hdr->dst_addr, 16);
@@ -158,16 +159,17 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	 * this is what we remove from the payload len.
 	 */
 	ip_len = rte_be_to_cpu_16(ip_hdr->payload_len) - sizeof(*frag_hdr);
+	trim = mb->pkt_len - (ip_len + mb->l3_len + mb->l2_len);
 
 	IP_FRAG_LOG(DEBUG, "%s:%d:\n"
 		"mbuf: %p, tms: %" PRIu64
 		", key: <" IPv6_KEY_BYTES_FMT ", %#x>, "
-		"ofs: %u, len: %d, flags: %#x\n"
+		"ofs: %u, len: %d, padding: %d, flags: %#x\n"
 		"tbl: %p, max_cycles: %" PRIu64 ", entry_mask: %#x, "
 		"max_entries: %u, use_entries: %u\n\n",
 		__func__, __LINE__,
 		mb, tms, IPv6_KEY_BYTES(key.src_dst), key.id, ip_ofs, ip_len,
-		RTE_IPV6_GET_MF(frag_hdr->frag_data),
+		trim, RTE_IPV6_GET_MF(frag_hdr->frag_data),
 		tbl, tbl->max_cycles, tbl->entry_mask, tbl->max_entries,
 		tbl->use_entries);
 
@@ -177,6 +179,9 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		return NULL;
 	}
 
+	if (unlikely(trim > 0))
+		rte_pktmbuf_trim(mb, trim);
+
 	/* try to find/add entry into the fragment's table. */
 	fp = ip_frag_find(tbl, dr, &key, tms);
 	if (fp == NULL) {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.376287249 +0000
+++ 0115-ip_frag-remove-padding-length-of-fragment.patch	2021-02-05 11:18:28.986694539 +0000
@@ -1 +1 @@
-From 324242fb510b65644f025a996404abcd0b8199a6 Mon Sep 17 00:00:00 2001
+From e78b76e24992c33236a9cfbc59c7665bb108f5ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 324242fb510b65644f025a996404abcd0b8199a6 ]
+
@@ -56 +57,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'doc: fix figure numbering in graph guide' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (113 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'ip_frag: remove padding length of fragment' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'bus/pci: fix build with Windows SDK >= 10.0.20253' " luca.boccassi
                   ` (159 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/01438181b837a4be60f0e51db3c2b66d0fc54f89

Thanks.

Luca Boccassi

---
From 01438181b837a4be60f0e51db3c2b66d0fc54f89 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 6 Jan 2021 10:19:43 +0100
Subject: [PATCH] doc: fix figure numbering in graph guide

[ upstream commit 924e7d8f6776838b6f27a08f644e65d8a80d6c14 ]

Some figures had a title inside the picture but not in RST file.
As a consequence, some versions of Sphinx are emitting a warning.

	Warning, treated as error:
	doc/guides/prog_guide/graph_lib.rst:64:
	no number is assigned for figure: figure-anatomy-of-a-node

The titles are moved from SVG to RST,
except for graph_mem_layout.svg where in-picture title must be kept.

Fixes: 4dc6d8e63c16 ("doc: add graph library guide")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 doc/guides/prog_guide/graph_lib.rst             | 10 +++++-----
 doc/guides/prog_guide/img/anatomy_of_a_node.svg |  5 -----
 doc/guides/prog_guide/img/link_the_nodes.svg    |  5 -----
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/doc/guides/prog_guide/graph_lib.rst b/doc/guides/prog_guide/graph_lib.rst
index 5d183f86d7..fcff9c4286 100644
--- a/doc/guides/prog_guide/graph_lib.rst
+++ b/doc/guides/prog_guide/graph_lib.rst
@@ -61,7 +61,7 @@ Anatomy of Node:
 
 .. figure:: img/anatomy_of_a_node.*
 
-The :numref:`figure_anatomy_of_a_node` diagram depicts the anatomy of a node.
+   Anatomy of a node
 
 The node is the basic building block of the graph framework.
 
@@ -138,8 +138,7 @@ Link the Nodes to create the graph topology
 
 .. figure:: img/link_the_nodes.*
 
-The :numref:`figure_link_the_nodes` diagram shows a graph topology after
-linking the N nodes.
+   Topology after linking the nodes
 
 Once nodes are available to the program, Application or node public API
 functions can links them together to create a complex packet processing graph.
@@ -322,8 +321,9 @@ Graph object memory layout
 
 .. figure:: img/graph_mem_layout.*
 
-The :numref:`figure_graph_mem_layout` diagram shows ``rte_graph`` object memory
-layout. Understanding the memory layout helps to debug the graph library and
+   Memory layout
+
+Understanding the memory layout helps to debug the graph library and
 improve the performance if needed.
 
 Graph object consists of a header, circular buffer to store the pending
diff --git a/doc/guides/prog_guide/img/anatomy_of_a_node.svg b/doc/guides/prog_guide/img/anatomy_of_a_node.svg
index fa4b5b2d5a..d3bc742e77 100644
--- a/doc/guides/prog_guide/img/anatomy_of_a_node.svg
+++ b/doc/guides/prog_guide/img/anatomy_of_a_node.svg
@@ -309,11 +309,6 @@
        id="path109"
        inkscape:connector-curvature="0"
        style="fill:#000000;fill-opacity:0;fill-rule:evenodd" />
-    <path
-       d="m 98.084236,54.98299 5.125004,-13.359375 h 1.90625 l 5.46875,13.359375 h -2.01563 l -1.54687,-4.046875 h -5.59375 l -1.468754,4.046875 z m 3.859374,-5.484375 h 4.53125 l -1.40625,-3.703125 q -0.625,-1.6875 -0.9375,-2.765625 -0.26562,1.28125 -0.71875,2.546875 z m 9.84982,5.484375 v -9.671875 h 1.46875 v 1.375 q 1.0625,-1.59375 3.07813,-1.59375 0.875,0 1.60937,0.3125 0.73438,0.3125 1.09375,0.828125 0.375,0.5 0.51563,1.203125 0.0937,0.453125 0.0937,1.59375 v 5.953125 h -1.64063 v -5.890625 q 0,-1 -0.20312,-1.484375 -0.1875,-0.5 -0.67188,-0.796875 -0.48437,-0.296875 -1.14062,-0.296875 -1.04688,0 -1.8125,0.671875 -0.75,0.65625 -0.75,2.515625 v 5.28125 z m 16.68821,-1.1875 q -0.92186,0.765625 -1.76561,1.09375 -0.82813,0.3125 -1.79688,0.3125 -1.59375,0 -2.45312,-0.78125 -0.85938,-0.78125 -0.85938,-1.984375 0,-0.71875 0.32813,-1.296875 0.32812,-0.59375 0.84375,-0.9375 0.53125,-0.359375 1.1875,-0.546875 0.46875,-0.125 1.45312,-0.25 1.98438,-0.234375 2.92187,-0.5625 0.0156,-0.34375 0.0156,-0.421875 0,-1 -0.46874,-1.421875 -0.625,-0.546875 -1.875,-0.546875 -1.15625,0 -1.70312,0.40625 -0.54688,0.40625 -0.8125,1.421875 l -1.60938,-0.21875 q 0.21875,-1.015625 0.71875,-1.640625 0.5,-0.640625 1.45313,-0.984375 0.95312,-0.34375 2.1875,-0.34375 1.25,0 2.01561,0.296875 0.78125,0.28125 1.14063,0.734375 0.375,0.4375 0.51562,1.109375 0.0781,0.421875 0.0781,1.515625 v 2.1875 q 0,2.28125 0.10937,2.890625 0.10938,0.59375 0.40625,1.15625 h -1.70312 q -0.26563,-0.515625 -0.32813,-1.1875 z m -0.14062,-3.671875 q -0.89062,0.375 -2.67187,0.625 -1.01562,0.140625 -1.4375,0.328125 -0.42187,0.1875 -0.65625,0.53125 -0.21875,0.34375 -0.21875,0.78125 0,0.65625 0.5,1.09375 0.5,0.4375 1.45313,0.4375 0.9375,0 1.67187,-0.40625 0.75,-0.421875 1.09374,-1.140625 0.26563,-0.5625 0.26563,-1.640625 z m 7.78197,3.390625 0.23437,1.453125 q -0.6875,0.140625 -1.23437,0.140625 -0.89063,0 -1.39063,-0.28125 -0.48437,-0.28125 -0.6875,-0.734375 -0.20312,-0.46875 -0.20312,-1.9375 V 46.57674 h -1.20313 v -1.265625 h 1.20313 V 42.92049 l 1.625,-0.984375 v 3.375 h 1.65625 v 1.265625 h -1.65625 v 5.671875 q 0,0.6875 0.0781,0.890625 0.0937,0.203125 0.28125,0.328125 0.20313,0.109375 0.57813,0.109375 0.26562,0 0.71875,-0.0625 z m 0.9958,-3.375 q 0,-2.6875 1.48437,-3.96875 1.25,-1.078125 3.04688,-1.078125 2,0 3.26562,1.3125 1.26563,1.296875 1.26563,3.609375 0,1.859375 -0.5625,2.9375 -0.5625,1.0625 -1.64063,1.65625 -1.0625,0.59375 -2.32812,0.59375 -2.03125,0 -3.28125,-1.296875 -1.25,-1.3125 -1.25,-3.765625 z m 1.6875,0 q 0,1.859375 0.79687,2.796875 0.8125,0.921875 2.04688,0.921875 1.21875,0 2.03125,-0.921875 0.8125,-0.9375 0.8125,-2.84375 0,-1.796875 -0.8125,-2.71875 -0.8125,-0.921875 -2.03125,-0.921875 -1.23438,0 -2.04688,0.921875 -0.79687,0.90625 -0.79687,2.765625 z m 9.29759,4.84375 v -9.671875 h 1.46875 v 1.359375 q 0.45313,-0.71875 1.20313,-1.140625 0.76562,-0.4375 1.71875,-0.4375 1.07812,0 1.76562,0.453125 0.6875,0.4375 0.96875,1.234375 1.15625,-1.6875 2.98438,-1.6875 1.45312,0 2.21875,0.796875 0.78125,0.796875 0.78125,2.453125 v 6.640625 h -1.64063 v -6.09375 q 0,-0.984375 -0.15625,-1.40625 -0.15625,-0.4375 -0.57812,-0.703125 -0.42188,-0.265625 -0.98438,-0.265625 -1.01562,0 -1.6875,0.6875 -0.67187,0.671875 -0.67187,2.15625 v 5.625 h -1.64063 v -6.28125 q 0,-1.09375 -0.40625,-1.640625 -0.40625,-0.546875 -1.3125,-0.546875 -0.6875,0 -1.28125,0.359375 -0.59375,0.359375 -0.85937,1.0625 -0.25,0.703125 -0.25,2.03125 v 5.015625 z m 15.46268,3.71875 -0.1875,-1.53125 q 0.54687,0.140625 0.9375,0.140625 0.54687,0 0.875,-0.1875 0.32812,-0.171875 0.54687,-0.5 0.15625,-0.25 0.5,-1.21875 0.0469,-0.140625 0.14063,-0.40625 l -3.67188,-9.6875 h 1.76563 l 2.01562,5.59375 q 0.39063,1.078125 0.70313,2.25 0.28125,-1.125 0.67187,-2.203125 l 2.07813,-5.640625 h 1.64062 l -3.6875,9.828125 q -0.59375,1.609375 -0.92187,2.203125 -0.4375,0.8125 -1,1.1875 -0.5625,0.375 -1.34375,0.375 -0.48438,0 -1.0625,-0.203125 z m 13.98018,-8.5625 q 0,-2.6875 1.48437,-3.96875 1.25,-1.078125 3.04688,-1.078125 2,0 3.26562,1.3125 1.26563,1.296875 1.26563,3.609375 0,1.859375 -0.5625,2.9375 -0.5625,1.0625 -1.64063,1.65625 -1.0625,0.59375 -2.32812,0.59375 -2.03125,0 -3.28125,-1.296875 -1.25,-1.3125 -1.25,-3.765625 z m 1.6875,0 q 0,1.859375 0.79687,2.796875 0.8125,0.921875 2.04688,0.921875 1.21875,0 2.03125,-0.921875 0.8125,-0.9375 0.8125,-2.84375 0,-1.796875 -0.8125,-2.71875 -0.8125,-0.921875 -2.03125,-0.921875 -1.23438,0 -2.04688,0.921875 -0.79687,0.90625 -0.79687,2.765625 z m 9.68821,4.84375 v -8.40625 h -1.45312 v -1.265625 h 1.45312 v -1.03125 q 0,-0.96875 0.17188,-1.453125 0.23437,-0.640625 0.82812,-1.03125 0.59375,-0.390625 1.67188,-0.390625 0.6875,0 1.53125,0.15625 l -0.25,1.4375 q -0.5,-0.09375 -0.95313,-0.09375 -0.75,0 -1.0625,0.328125 -0.3125,0.3125 -0.3125,1.1875 v 0.890625 h 1.89063 v 1.265625 h -1.89063 v 8.40625 z m 16.28849,-1.1875 q -0.92188,0.765625 -1.76563,1.09375 -0.82812,0.3125 -1.79687,0.3125 -1.59375,0 -2.45313,-0.78125 -0.85937,-0.78125 -0.85937,-1.984375 0,-0.71875 0.32812,-1.296875 0.32813,-0.59375 0.84375,-0.9375 0.53125,-0.359375 1.1875,-0.546875 0.46875,-0.125 1.45313,-0.25 1.98437,-0.234375 2.92187,-0.5625 0.0156,-0.34375 0.0156,-0.421875 0,-1 -0.46875,-1.421875 -0.625,-0.546875 -1.875,-0.546875 -1.15625,0 -1.70313,0.40625 -0.54687,0.40625 -0.8125,1.421875 l -1.60937,-0.21875 q 0.21875,-1.015625 0.71875,-1.640625 0.5,-0.640625 1.45312,-0.984375 0.95313,-0.34375 2.1875,-0.34375 1.25,0 2.01563,0.296875 0.78125,0.28125 1.14062,0.734375 0.375,0.4375 0.51563,1.109375 0.0781,0.421875 0.0781,1.515625 v 2.1875 q 0,2.28125 0.10938,2.890625 0.10937,0.59375 0.40625,1.15625 h -1.70313 q -0.26562,-0.515625 -0.32812,-1.1875 z m -0.14063,-3.671875 q -0.89062,0.375 -2.67187,0.625 -1.01563,0.140625 -1.4375,0.328125 -0.42188,0.1875 -0.65625,0.53125 -0.21875,0.34375 -0.21875,0.78125 0,0.65625 0.5,1.09375 0.5,0.4375 1.45312,0.4375 0.9375,0 1.67188,-0.40625 0.75,-0.421875 1.09375,-1.140625 0.26562,-0.5625 0.26562,-1.640625 z m 9.38715,4.859375 v -9.671875 h 1.46875 v 1.375 q 1.0625,-1.59375 3.07812,-1.59375 0.875,0 1.60938,0.3125 0.73437,0.3125 1.09375,0.828125 0.375,0.5 0.51562,1.203125 0.0937,0.453125 0.0937,1.59375 v 5.953125 h -1.64062 v -5.890625 q 0,-1 -0.20313,-1.484375 -0.1875,-0.5 -0.67187,-0.796875 -0.48438,-0.296875 -1.14063,-0.296875 -1.04687,0 -1.8125,0.671875 -0.75,0.65625 -0.75,2.515625 v 5.28125 z m 9.76634,-4.84375 q 0,-2.6875 1.48438,-3.96875 1.25,-1.078125 3.04687,-1.078125 2,0 3.26563,1.3125 1.26562,1.296875 1.26562,3.609375 0,1.859375 -0.5625,2.9375 -0.5625,1.0625 -1.64062,1.65625 -1.0625,0.59375 -2.32813,0.59375 -2.03125,0 -3.28125,-1.296875 -1.25,-1.3125 -1.25,-3.765625 z m 1.6875,0 q 0,1.859375 0.79688,2.796875 0.8125,0.921875 2.04687,0.921875 1.21875,0 2.03125,-0.921875 0.8125,-0.9375 0.8125,-2.84375 0,-1.796875 -0.8125,-2.71875 -0.8125,-0.921875 -2.03125,-0.921875 -1.23437,0 -2.04687,0.921875 -0.79688,0.90625 -0.79688,2.765625 z m 15.56322,4.84375 v -1.21875 q -0.90625,1.4375 -2.70313,1.4375 -1.15625,0 -2.125,-0.640625 -0.96875,-0.640625 -1.5,-1.78125 -0.53125,-1.140625 -0.53125,-2.625 0,-1.453125 0.48438,-2.625 0.48437,-1.1875 1.4375,-1.8125 0.96875,-0.625 2.17187,-0.625 0.875,0 1.54688,0.375 0.6875,0.359375 1.10937,0.953125 v -4.796875 h 1.64063 V 54.98299 Z m -5.17188,-4.828125 q 0,1.859375 0.78125,2.78125 0.78125,0.921875 1.84375,0.921875 1.07813,0 1.82813,-0.875 0.75,-0.890625 0.75,-2.6875 0,-1.984375 -0.76563,-2.90625 -0.76562,-0.9375 -1.89062,-0.9375 -1.07813,0 -1.8125,0.890625 -0.73438,0.890625 -0.73438,2.8125 z m 15.90697,1.71875 1.6875,0.203125 q -0.40625,1.484375 -1.48438,2.3125 -1.07812,0.8125 -2.76562,0.8125 -2.125,0 -3.375,-1.296875 -1.23438,-1.3125 -1.23438,-3.671875 0,-2.453125 1.25,-3.796875 1.26563,-1.34375 3.26563,-1.34375 1.9375,0 3.15625,1.328125 1.23437,1.3125 1.23437,3.703125 0,0.15625 0,0.4375 h -7.21875 q 0.0937,1.59375 0.90625,2.453125 0.8125,0.84375 2.01563,0.84375 0.90625,0 1.54687,-0.46875 0.64063,-0.484375 1.01563,-1.515625 z m -5.39063,-2.65625 h 5.40625 q -0.10937,-1.21875 -0.625,-1.828125 -0.78125,-0.953125 -2.03125,-0.953125 -1.125,0 -1.90625,0.765625 -0.76562,0.75 -0.84375,2.015625 z"
-       id="path111"
-       inkscape:connector-curvature="0"
-       style="fill:#000000;fill-rule:nonzero" />
     <path
        d="m 784.2409,84.97754 h 86.01471 v 74.04492 H 784.2409 Z"
        id="path113"
diff --git a/doc/guides/prog_guide/img/link_the_nodes.svg b/doc/guides/prog_guide/img/link_the_nodes.svg
index 4a127e67c5..4b7d3f7f89 100644
--- a/doc/guides/prog_guide/img/link_the_nodes.svg
+++ b/doc/guides/prog_guide/img/link_the_nodes.svg
@@ -3321,10 +3321,5 @@
        d="m49.937008 5.086614l504.22046 0l0 27.464567l-504.22046 0z"
        fill-rule="evenodd"
        id="path997" />
-    <path
-       fill="#000000"
-       d="m60.296383 32.00661l0 -13.359373l1.78125 0l0 11.78125l6.562496 0l0 1.5781231l-8.343746 0zm10.250713 -11.468748l0 -1.890625l1.640625 0l0 1.890625l-1.640625 0zm0 11.468748l0 -9.671873l1.640625 0l0 9.671873l-1.640625 0zm4.144821 0l0 -9.671873l1.46875 0l0 1.375q1.0625 -1.59375 3.078125 -1.59375q0.875 0 1.609375 0.3125q0.734375 0.3125 1.09375 0.828125q0.375 0.5 0.515625 1.203125q0.09375 0.453125 0.09375 1.59375l0 5.953123l-1.640625 0l0 -5.890623q0 -1.0 -0.203125 -1.484375q-0.1875 -0.5 -0.671875 -0.796875q-0.484375 -0.296875 -1.140625 -0.296875q-1.046875 0 -1.8125 0.671875q-0.75 0.65625 -0.75 2.515625l0 5.281248l-1.640625 0zm10.375717 0l0 -13.359373l1.640625 0l0 7.625l3.890625 -3.9375l2.109375 0l-3.6875 3.59375l4.0625 6.078123l-2.015625 0l-3.203125 -4.953123l-1.15625 1.125l0 3.828123l-1.640625 0zm18.089554 -1.4687481l0.234375 1.453125q-0.6875 0.1406231 -1.234375 0.1406231q-0.890625 0 -1.390625 -0.2812481q-0.484375 -0.28125 -0.6875 -0.734375q-0.203125 -0.46875 -0.203125 -1.9375l0 -5.578125l-1.203125 0l0 -1.265625l1.203125 0l0 -2.390625l1.625 -0.984375l0 3.375l1.65625 0l0 1.265625l-1.65625 0l0 5.671875q0 0.6875 0.078125 0.890625q0.09375 0.203125 0.28125 0.328125q0.203125 0.109375 0.578125 0.109375q0.265625 0 0.71875 -0.0625zm1.6051788 1.4687481l0 -13.359373l1.640625 0l0 4.796875q1.140625 -1.328125 2.890625 -1.328125q1.078125 0 1.859375 0.421875q0.796875 0.421875 1.140625 1.171875q0.34375 0.75 0.34375 2.171875l0 6.124998l-1.640625 0l0 -6.124998q0 -1.234375 -0.53125 -1.796875q-0.53125 -0.5625 -1.515625 -0.5625q-0.71875 0 -1.359375 0.390625q-0.640625 0.375 -0.921875 1.015625q-0.265625 0.640625 -0.265625 1.78125l0 5.296873l-1.640625 0zm17.000717 -3.109373l1.6875 0.203125q-0.40625 1.484375 -1.484375 2.3125q-1.078125 0.8124981 -2.765625 0.8124981q-2.125 0 -3.375 -1.2968731q-1.234375 -1.3125 -1.234375 -3.671875q0 -2.453125 1.25 -3.796875q1.265625 -1.34375 3.265625 -1.34375q1.9375 0 3.15625 1.328125q1.234375 1.3125 1.234375 3.703125q0 0.15625 0 0.4375l-7.21875 0q0.09375 1.59375 0.90625 2.453125q0.8125 0.84375 2.015625 0.84375q0.90625 0 1.546875 -0.46875q0.640625 -0.484375 1.015625 -1.515625zm-5.390625 -2.65625l5.40625 0q-0.109375 -1.21875 -0.625 -1.828125q-0.78125 -0.953125 -2.03125 -0.953125q-1.125 0 -1.90625 0.765625q-0.765625 0.75 -0.84375 2.015625zm14.324654 5.765623l0 -9.671873l1.46875 0l0 1.375q1.0625 -1.59375 3.078125 -1.59375q0.875 0 1.609375 0.3125q0.734375 0.3125 1.09375 0.828125q0.375 0.5 0.515625 1.203125q0.09375 0.453125 0.09375 1.59375l0 5.953123l-1.640625 0l0 -5.890623q0 -1.0 -0.203125 -1.484375q-0.1875 -0.5 -0.671875 -0.796875q-0.484375 -0.296875 -1.140625 -0.296875q-1.046875 0 -1.8125 0.671875q-0.75 0.65625 -0.75 2.515625l0 5.281248l-1.640625 0zm9.766342 -4.843748q0 -2.6875 1.484375 -3.96875q1.25 -1.078125 3.046875 -1.078125q2.0 0 3.265625 1.3125q1.265625 1.296875 1.265625 3.609375q0 1.859375 -0.5625 2.9375q-0.5625 1.0625 -1.640625 1.65625q-1.0625 0.5937481 -2.328125 0.5937481q-2.03125 0 -3.28125 -1.2968731q-1.25 -1.3125 -1.25 -3.765625zm1.6875 0q0 1.859375 0.796875 2.796875q0.8125 0.921875 2.046875 0.921875q1.21875 0 2.03125 -0.921875q0.8125 -0.9375 0.8125 -2.84375q0 -1.796875 -0.8125 -2.71875q-0.8125 -0.921875 -2.03125 -0.921875q-1.234375 0 -2.046875 0.921875q-0.796875 0.90625 -0.796875 2.765625zm15.563217 4.843748l0 -1.2187481q-0.90625 1.4374981 -2.703125 1.4374981q-1.15625 0 -2.125 -0.6406231q-0.96875 -0.640625 -1.5 -1.78125q-0.53125 -1.140625 -0.53125 -2.625q0 -1.453125 0.484375 -2.625q0.484375 -1.1875 1.4375 -1.8125q0.96875 -0.625 2.171875 -0.625q0.875 0 1.546875 0.375q0.6875 0.359375 1.109375 0.953125l0 -4.796875l1.640625 0l0 13.359373l-1.53125 0zm-5.171875 -4.828123q0 1.859375 0.78125 2.78125q0.78125 0.921875 1.84375 0.921875q1.078125 0 1.828125 -0.875q0.75 -0.890625 0.75 -2.6875q0 -1.984375 -0.765625 -2.90625q-0.765625 -0.9375 -1.890625 -0.9375q-1.078125 0 -1.8125 0.890625q-0.734375 0.890625 -0.734375 2.8125zm15.906967 1.71875l1.6875 0.203125q-0.40625 1.484375 -1.484375 2.3125q-1.078125 0.8124981 -2.765625 0.8124981q-2.125 0 -3.375 -1.2968731q-1.234375 -1.3125 -1.234375 -3.671875q0 -2.453125 1.25 -3.796875q1.265625 -1.34375 3.265625 -1.34375q1.9375 0 3.15625 1.328125q1.234375 1.3125 1.234375 3.703125q0 0.15625 0 0.4375l-7.21875 0q0.09375 1.59375 0.90625 2.453125q0.8125 0.84375 2.015625 0.84375q0.90625 0 1.546875 -0.46875q0.640625 -0.484375 1.015625 -1.515625zm-5.390625 -2.65625l5.40625 0q-0.109375 -1.21875 -0.625 -1.828125q-0.78125 -0.953125 -2.03125 -0.953125q-1.125 0 -1.90625 0.765625q-0.765625 0.75 -0.84375 2.015625zm8.485092 2.875l1.625 -0.25q0.125 0.96875 0.75 1.5q0.625 0.515625 1.75 0.515625q1.125 0 1.671875 -0.453125q0.546875 -0.46875 0.546875 -1.09375q0 -0.546875 -0.484375 -0.875q-0.328125 -0.21875 -1.671875 -0.546875q-1.8125 -0.46875 -2.515625 -0.796875q-0.6875 -0.328125 -1.046875 -0.90625q-0.359375 -0.59375 -0.359375 -1.3125q0 -0.640625 0.296875 -1.1875q0.296875 -0.5625 0.8125 -0.921875q0.375 -0.28125 1.03125 -0.46875q0.671875 -0.203125 1.421875 -0.203125q1.140625 0 2.0 0.328125q0.859375 0.328125 1.265625 0.890625q0.421875 0.5625 0.578125 1.5l-1.609375 0.21875q-0.109375 -0.75 -0.640625 -1.171875q-0.515625 -0.421875 -1.46875 -0.421875q-1.140625 0 -1.625 0.375q-0.46875 0.375 -0.46875 0.875q0 0.3125 0.1875 0.578125q0.203125 0.265625 0.640625 0.4375q0.234375 0.09375 1.4375 0.421875q1.75 0.453125 2.4375 0.75q0.6875 0.296875 1.078125 0.859375q0.390625 0.5625 0.390625 1.40625q0 0.828125 -0.484375 1.546875q-0.46875 0.71875 -1.375 1.125q-0.90625 0.3906231 -2.046875 0.3906231q-1.875 0 -2.875 -0.7812481q-0.984375 -0.78125 -1.25 -2.328125zm18.745804 1.421875l0.234375 1.453125q-0.6875 0.1406231 -1.234375 0.1406231q-0.890625 0 -1.390625 -0.2812481q-0.484375 -0.28125 -0.6875 -0.734375q-0.203125 -0.46875 -0.203125 -1.9375l0 -5.578125l-1.203125 0l0 -1.265625l1.203125 0l0 -2.390625l1.625 -0.984375l0 3.375l1.65625 0l0 1.265625l-1.65625 0l0 5.671875q0 0.6875 0.078125 0.890625q0.09375 0.203125 0.28125 0.328125q0.203125 0.109375 0.578125 0.109375q0.265625 0 0.71875 -0.0625zm0.99580383 -3.375q0 -2.6875 1.484375 -3.96875q1.25 -1.078125 3.046875 -1.078125q2.0 0 3.265625 1.3125q1.265625 1.296875 1.265625 3.609375q0 1.859375 -0.5625 2.9375q-0.5625 1.0625 -1.640625 1.65625q-1.0625 0.5937481 -2.328125 0.5937481q-2.03125 0 -3.28125 -1.2968731q-1.25 -1.3125 -1.25 -3.765625zm1.6875 0q0 1.859375 0.796875 2.796875q0.8125 0.921875 2.046875 0.921875q1.21875 0 2.03125 -0.921875q0.8125 -0.9375 0.8125 -2.84375q0 -1.796875 -0.8125 -2.71875q-0.8125 -0.921875 -2.03125 -0.921875q-1.234375 0 -2.046875 0.921875q-0.796875 0.90625 -0.796875 2.765625zm20.793396 1.296875l1.609375 0.21875q-0.265625 1.65625 -1.359375 2.609375q-1.078125 0.9374981 -2.671875 0.9374981q-1.984375 0 -3.1875 -1.2968731q-1.203125 -1.296875 -1.203125 -3.71875q0 -1.578125 0.515625 -2.75q0.515625 -1.171875 1.578125 -1.75q1.0625 -0.59375 2.3125 -0.59375q1.578125 0 2.578125 0.796875q1.0 0.796875 1.28125 2.265625l-1.59375 0.234375q-0.234375 -0.96875 -0.8125 -1.453125q-0.578125 -0.5 -1.390625 -0.5q-1.234375 0 -2.015625 0.890625q-0.78125 0.890625 -0.78125 2.8125q0 1.953125 0.75 2.84375q0.75 0.875 1.953125 0.875q0.96875 0 1.609375 -0.59375q0.65625 -0.59375 0.828125 -1.828125zm3.0 3.546873l0 -9.671873l1.46875 0l0 1.46875q0.5625 -1.03125 1.03125 -1.359375q0.484375 -0.328125 1.0625 -0.328125q0.828125 0 1.6875 0.53125l-0.5625 1.515625q-0.609375 -0.359375 -1.203125 -0.359375q-0.546875 0 -0.96875 0.328125q-0.421875 0.328125 -0.609375 0.890625q-0.28125 0.875 -0.28125 1.921875l0 5.062498l-1.625 0zm12.853302 -3.109373l1.6875 0.203125q-0.40625 1.484375 -1.484375 2.3125q-1.078125 0.8124981 -2.765625 0.8124981q-2.125 0 -3.375 -1.2968731q-1.234375 -1.3125 -1.234375 -3.671875q0 -2.453125 1.25 -3.796875q1.265625 -1.34375 3.265625 -1.34375q1.9375 0 3.15625 1.328125q1.234375 1.3125 1.234375 3.703125q0 0.15625 0 0.4375l-7.21875 0q0.09375 1.59375 0.90625 2.453125q0.8125 0.84375 2.015625 0.84375q0.90625 0 1.546875 -0.46875q0.640625 -0.484375 1.015625 -1.515625zm-5.390625 -2.65625l5.40625 0q-0.109375 -1.21875 -0.625 -1.828125q-0.78125 -0.953125 -2.03125 -0.953125q-1.125 0 -1.90625 0.765625q-0.765625 0.75 -0.84375 2.015625zm15.453842 4.578125q-0.921875 0.765625 -1.765625 1.09375q-0.828125 0.3124981 -1.796875 0.3124981q-1.59375 0 -2.453125 -0.7812481q-0.859375 -0.78125 -0.859375 -1.984375q0 -0.71875 0.328125 -1.296875q0.328125 -0.59375 0.84375 -0.9375q0.53125 -0.359375 1.1875 -0.546875q0.46875 -0.125 1.453125 -0.25q1.984375 -0.234375 2.921875 -0.5625q0.015625 -0.34375 0.015625 -0.421875q0 -1.0 -0.46875 -1.421875q-0.625 -0.546875 -1.875 -0.546875q-1.15625 0 -1.703125 0.40625q-0.546875 0.40625 -0.8125 1.421875l-1.609375 -0.21875q0.21875 -1.015625 0.71875 -1.640625q0.5 -0.640625 1.453125 -0.984375q0.953125 -0.34375 2.1875 -0.34375q1.25 0 2.015625 0.296875q0.78125 0.28125 1.140625 0.734375q0.375 0.4375 0.515625 1.109375q0.078125 0.421875 0.078125 1.515625l0 2.1875q0 2.28125 0.109375 2.890625q0.109375 0.59375 0.40625 1.1562481l-1.703125 0q-0.265625 -0.5156231 -0.328125 -1.1874981zm-0.140625 -3.671875q-0.890625 0.375 -2.671875 0.625q-1.015625 0.140625 -1.4375 0.328125q-0.421875 0.1875 -0.65625 0.53125q-0.21875 0.34375 -0.21875 0.78125q0 0.65625 0.5 1.09375q0.5 0.4375 1.453125 0.4375q0.9375 0 1.671875 -0.40625q0.75 -0.421875 1.09375 -1.140625q0.265625 -0.5625 0.265625 -1.640625l0 -0.609375zm7.781967 3.390625l0.234375 1.453125q-0.6875 0.1406231 -1.234375 0.1406231q-0.890625 0 -1.390625 -0.2812481q-0.484375 -0.28125 -0.6875 -0.734375q-0.203125 -0.46875 -0.203125 -1.9375l0 -5.578125l-1.203125 0l0 -1.265625l1.203125 0l0 -2.390625l1.625 -0.984375l0 3.375l1.65625 0l0 1.265625l-1.65625 0l0 5.671875q0 0.6875 0.078125 0.890625q0.09375 0.203125 0.28125 0.328125q0.203125 0.109375 0.578125 0.109375q0.265625 0 0.71875 -0.0625zm8.230179 -1.640625l1.6874847 0.203125q-0.40625 1.484375 -1.4843597 2.3125q-1.078125 0.8124981 -2.765625 0.8124981q-2.125 0 -3.375 -1.2968731q-1.234375 -1.3125 -1.234375 -3.671875q0 -2.453125 1.25 -3.796875q1.265625 -1.34375 3.265625 -1.34375q1.9375 0 3.1562347 1.328125q1.234375 1.3125 1.234375 3.703125q0 0.15625 0 0.4375l-7.2187347 0q0.09375 1.59375 0.90625 2.453125q0.8125 0.84375 2.015625 0.84375q0.90625 0 1.546875 -0.46875q0.640625 -0.484375 1.015625 -1.515625zm-5.390625 -2.65625l5.40625 0q-0.109375 -1.21875 -0.625 -1.828125q-0.78125 -0.953125 -2.03125 -0.953125q-1.125 0 -1.90625 0.765625q-0.765625 0.75 -0.84375 2.015625zm17.902756 4.296875l0.234375 1.453125q-0.6875 0.1406231 -1.234375 0.1406231q-0.890625 0 -1.390625 -0.2812481q-0.484375 -0.28125 -0.6875 -0.734375q-0.203125 -0.46875 -0.203125 -1.9375l0 -5.578125l-1.203125 0l0 -1.265625l1.203125 0l0 -2.390625l1.625 -0.984375l0 3.375l1.65625 0l0 1.265625l-1.65625 0l0 5.671875q0 0.6875 0.078125 0.890625q0.09375 0.203125 0.28125 0.328125q0.203125 0.109375 0.578125 0.109375q0.265625 0 0.71875 -0.0625zm1.6051941 1.4687481l0 -13.359373l1.640625 0l0 4.796875q1.140625 -1.328125 2.890625 -1.328125q1.078125 0 1.859375 0.421875q0.796875 0.421875 1.140625 1.171875q0.34375 0.75 0.34375 2.171875l0 6.124998l-1.640625 0l0 -6.124998q0 -1.234375 -0.53125 -1.796875q-0.53125 -0.5625 -1.515625 -0.5625q-0.71875 0 -1.359375 0.390625q-0.640625 0.375 -0.921875 1.015625q-0.265625 0.640625 -0.265625 1.78125l0 5.296873l-1.640625 0zm17.000702 -3.109373l1.6875 0.203125q-0.40625 1.484375 -1.484375 2.3125q-1.078125 0.8124981 -2.765625 0.8124981q-2.125 0 -3.375 -1.2968731q-1.234375 -1.3125 -1.234375 -3.671875q0 -2.453125 1.25 -3.796875q1.265625 -1.34375 3.265625 -1.34375q1.9375 0 3.15625 1.328125q1.234375 1.3125 1.234375 3.703125q0 0.15625 0 0.4375l-7.21875 0q0.09375 1.59375 0.90625 2.453125q0.8125 0.84375 2.015625 0.84375q0.90625 0 1.546875 -0.46875q0.640625 -0.484375 1.015625 -1.515625zm-5.390625 -2.65625l5.40625 0q-0.109375 -1.21875 -0.625 -1.828125q-0.78125 -0.953125 -2.03125 -0.953125q-1.125 0 -1.90625 0.765625q-0.765625 0.75 -0.84375 2.015625zm14.324646 9.468748l0 -13.374998l1.484375 0l0 1.25q0.53125 -0.734375 1.1875 -1.09375q0.671875 -0.375 1.625 -0.375q1.234375 0 2.171875 0.640625q0.953125 0.625 1.4375 1.796875q0.484375 1.15625 0.484375 2.546875q0 1.484375 -0.53125 2.671875q-0.53125 1.1875 -1.546875 1.828125q-1.015625 0.6249981 -2.140625 0.6249981q-0.8125 0 -1.46875 -0.3437481q-0.65625 -0.34375 -1.0625 -0.875l0 4.703123l-1.640625 0zm1.484375 -8.484373q0 1.859375 0.75 2.765625q0.765625 0.890625 1.828125 0.890625q1.09375 0 1.875 -0.921875q0.78125 -0.9375 0.78125 -2.875q0 -1.84375 -0.765625 -2.765625q-0.75 -0.921875 -1.8125 -0.921875q-1.046875 0 -1.859375 0.984375q-0.796875 0.96875 -0.796875 2.84375zm15.203857 3.59375q-0.921875 0.765625 -1.765625 1.09375q-0.828125 0.3124981 -1.796875 0.3124981q-1.59375 0 -2.453125 -0.7812481q-0.859375 -0.78125 -0.859375 -1.984375q0 -0.71875 0.328125 -1.296875q0.328125 -0.59375 0.84375 -0.9375q0.53125 -0.359375 1.1875 -0.546875q0.46875 -0.125 1.453125 -0.25q1.984375 -0.234375 2.921875 -0.5625q0.015625 -0.34375 0.015625 -0.421875q0 -1.0 -0.46875 -1.421875q-0.625 -0.546875 -1.875 -0.546875q-1.15625 0 -1.703125 0.40625q-0.546875 0.40625 -0.8125 1.421875l-1.609375 -0.21875q0.21875 -1.015625 0.71875 -1.640625q0.5 -0.640625 1.453125 -0.984375q0.953125 -0.34375 2.1875 -0.34375q1.25 0 2.015625 0.296875q0.78125 0.28125 1.140625 0.734375q0.375 0.4375 0.515625 1.109375q0.078125 0.421875 0.078125 1.515625l0 2.1875q0 2.28125 0.109375 2.890625q0.109375 0.59375 0.40625 1.1562481l-1.703125 0q-0.265625 -0.5156231 -0.328125 -1.1874981zm-0.140625 -3.671875q-0.890625 0.375 -2.671875 0.625q-1.015625 0.140625 -1.4375 0.328125q-0.421875 0.1875 -0.65625 0.53125q-0.21875 0.34375 -0.21875 0.78125q0 0.65625 0.5 1.09375q0.5 0.4375 1.453125 0.4375q0.9375 0 1.671875 -0.40625q0.75 -0.421875 1.09375 -1.140625q0.265625 -0.5625 0.265625 -1.640625l0 -0.609375zm10.516357 1.3125l1.609375 0.21875q-0.265625 1.65625 -1.359375 2.609375q-1.078125 0.9374981 -2.671875 0.9374981q-1.984375 0 -3.1875 -1.2968731q-1.203125 -1.296875 -1.203125 -3.71875q0 -1.578125 0.515625 -2.75q0.515625 -1.171875 1.578125 -1.75q1.0625 -0.59375 2.3125 -0.59375q1.578125 0 2.578125 0.796875q1.0 0.796875 1.28125 2.265625l-1.59375 0.234375q-0.234375 -0.96875 -0.8125 -1.453125q-0.578125 -0.5 -1.390625 -0.5q-1.234375 0 -2.015625 0.890625q-0.78125 0.890625 -0.78125 2.8125q0 1.953125 0.75 2.84375q0.75 0.875 1.953125 0.875q0.96875 0 1.609375 -0.59375q0.65625 -0.59375 0.828125 -1.828125zm3.015625 3.546873l0 -13.359373l1.640625 0l0 7.625l3.890625 -3.9375l2.109375 0l-3.6875 3.59375l4.0625 6.078123l-2.015625 0l-3.203125 -4.953123l-1.15625 1.125l0 3.828123l-1.640625 0zm15.953125 -3.109373l1.6875 0.203125q-0.40625 1.484375 -1.484375 2.3125q-1.078125 0.8124981 -2.765625 0.8124981q-2.125 0 -3.375 -1.2968731q-1.234375 -1.3125 -1.234375 -3.671875q0 -2.453125 1.25 -3.796875q1.265625 -1.34375 3.265625 -1.34375q1.9375 0 3.15625 1.328125q1.234375 1.3125 1.234375 3.703125q0 0.15625 0 0.4375l-7.21875 0q0.09375 1.59375 0.90625 2.453125q0.8125 0.84375 2.015625 0.84375q0.90625 0 1.546875 -0.46875q0.640625 -0.484375 1.015625 -1.515625zm-5.390625 -2.65625l5.40625 0q-0.109375 -1.21875 -0.625 -1.828125q-0.78125 -0.953125 -2.03125 -0.953125q-1.125 0 -1.90625 0.765625q-0.765625 0.75 -0.84375 2.015625zm12.719482 4.296875l0.234375 1.453125q-0.6875 0.1406231 -1.234375 0.1406231q-0.890625 0 -1.390625 -0.2812481q-0.484375 -0.28125 -0.6875 -0.734375q-0.203125 -0.46875 -0.203125 -1.9375l0 -5.578125l-1.203125 0l0 -1.265625l1.203125 0l0 -2.390625l1.625 -0.984375l0 3.375l1.65625 0l0 1.265625l-1.65625 0l0 5.671875q0 0.6875 0.078125 0.890625q0.09375 0.203125 0.28125 0.328125q0.203125 0.109375 0.578125 0.109375q0.265625 0 0.71875 -0.0625zm7.179077 1.4687481l0 -8.406248l-1.453125 0l0 -1.265625l1.453125 0l0 -1.03125q0 -0.96875 0.171875 -1.453125q0.234375 -0.640625 0.828125 -1.03125q0.59375 -0.390625 1.671875 -0.390625q0.6875 0 1.53125 0.15625l-0.25 1.4375q-0.5 -0.09375 -0.953125 -0.09375q-0.75 0 -1.0625 0.328125q-0.3125 0.3125 -0.3125 1.1875l0 0.890625l1.890625 0l0 1.265625l-1.890625 0l0 8.406248l-1.625 0zm4.7457886 0l0 -13.359373l1.640625 0l0 13.359373l-1.640625 0zm3.5823364 -4.843748q0 -2.6875 1.484375 -3.96875q1.25 -1.078125 3.046875 -1.078125q2.0 0 3.265625 1.3125q1.265625 1.296875 1.265625 3.609375q0 1.859375 -0.5625 2.9375q-0.5625 1.0625 -1.640625 1.65625q-1.0625 0.5937481 -2.328125 0.5937481q-2.03125 0 -3.28125 -1.2968731q-1.25 -1.3125 -1.25 -3.765625zm1.6875 0q0 1.859375 0.796875 2.796875q0.8125 0.921875 2.046875 0.921875q1.21875 0 2.03125 -0.921875q0.8125 -0.9375 0.8125 -2.84375q0 -1.796875 -0.8125 -2.71875q-0.8125 -0.921875 -2.03125 -0.921875q-1.234375 0 -2.046875 0.921875q-0.796875 0.90625 -0.796875 2.765625zm11.078857 4.843748l-2.96875 -9.671873l1.703125 0l1.53125 5.578125l0.578125 2.078125q0.046875 -0.15625 0.5 -2.0l1.546875 -5.65625l1.6875 0l1.4375 5.609375l0.484375 1.84375l0.5625 -1.859375l1.65625 -5.59375l1.59375 0l-3.03125 9.671873l-1.703125 0l-1.53125 -5.796873l-0.375 -1.640625l-1.953125 7.437498l-1.71875 0z"
-       fill-rule="nonzero"
-       id="path999" />
   </g>
 </svg>
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.420739488 +0000
+++ 0116-doc-fix-figure-numbering-in-graph-guide.patch	2021-02-05 11:18:28.990694615 +0000
@@ -1 +1 @@
-From 924e7d8f6776838b6f27a08f644e65d8a80d6c14 Mon Sep 17 00:00:00 2001
+From 01438181b837a4be60f0e51db3c2b66d0fc54f89 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 924e7d8f6776838b6f27a08f644e65d8a80d6c14 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/pci: fix build with Windows SDK >= 10.0.20253' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (114 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'doc: fix figure numbering in graph guide' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'service: propagate init error in EAL' " luca.boccassi
                   ` (158 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Dmitry Kozlyuk, Ranjit Menon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/508b619978817e3629f81010a596a8f546c641a6

Thanks.

Luca Boccassi

---
From 508b619978817e3629f81010a596a8f546c641a6 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Thu, 14 Jan 2021 13:22:35 -0800
Subject: [PATCH] bus/pci: fix build with Windows SDK >= 10.0.20253

[ upstream commit 6605c7f02e2410e932019ee554c21287c727d34f ]

NetUIO device class and interface GUIDs are defined in system
headers starting from platform SDK v10.0.20253. Inspect SDK
version to avoid redefinition.

Pre-release SDKs do not promise compatibility and a narrow
subset of SDKs may still be subject to redefinition.

Fixes: c76ec01b4591 (bus/pci: support netuio on Windows)

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 drivers/bus/pci/windows/pci_netuio.c | 6 ++++++
 drivers/bus/pci/windows/pci_netuio.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/bus/pci/windows/pci_netuio.c b/drivers/bus/pci/windows/pci_netuio.c
index 6701948392..1bf9133f71 100644
--- a/drivers/bus/pci/windows/pci_netuio.c
+++ b/drivers/bus/pci/windows/pci_netuio.c
@@ -7,6 +7,12 @@
 #include <rte_log.h>
 #include <rte_eal.h>
 
+#ifdef __MINGW32__
+#include <ddk/ndisguid.h>
+#else
+#include <ndisguid.h>
+#endif
+
 #include "private.h"
 #include "pci_netuio.h"
 
diff --git a/drivers/bus/pci/windows/pci_netuio.h b/drivers/bus/pci/windows/pci_netuio.h
index 9a77806b57..2f6c97ea73 100644
--- a/drivers/bus/pci/windows/pci_netuio.h
+++ b/drivers/bus/pci/windows/pci_netuio.h
@@ -5,6 +5,7 @@
 #ifndef _PCI_NETUIO_H_
 #define _PCI_NETUIO_H_
 
+#if !defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE
 /* GUID definition for device class netUIO */
 DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 	0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f);
@@ -12,6 +13,7 @@ DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 /* GUID definition for the netuio device interface */
 DEFINE_GUID(GUID_DEVINTERFACE_NETUIO, 0x08336f60, 0x0679, 0x4c6c,
 	0x85, 0xd2, 0xae, 0x7c, 0xed, 0x65, 0xff, 0xf7);
+#endif
 
 /* IOCTL code definitions */
 #define IOCTL_NETUIO_MAP_HW_INTO_USERSPACE \
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.467105396 +0000
+++ 0117-bus-pci-fix-build-with-Windows-SDK-10.0.20253.patch	2021-02-05 11:18:28.990694615 +0000
@@ -1 +1 @@
-From 6605c7f02e2410e932019ee554c21287c727d34f Mon Sep 17 00:00:00 2001
+From 508b619978817e3629f81010a596a8f546c641a6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6605c7f02e2410e932019ee554c21287c727d34f ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'service: propagate init error in EAL' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (115 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'bus/pci: fix build with Windows SDK >= 10.0.20253' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' " luca.boccassi
                   ` (157 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/43447841b4c02597a6d47d2b4de11d932f141a2f

Thanks.

Luca Boccassi

---
From 43447841b4c02597a6d47d2b4de11d932f141a2f Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 13 Jan 2021 09:28:06 +0100
Subject: [PATCH] service: propagate init error in EAL

[ upstream commit de6aede17bd3abe51478f33131a4c41da83c42da ]

Currently, when rte_service_init() fails at initialization, the
application always gets a ENOEXEC error code. For example, with testpmd,
this is displayed as:

  Cannot init EAL: Exec format error

This error code does not describe the real issue. Instead, use the error
code returned by the function.

Fixes: e39824500825 ("service: initialize with EAL")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/freebsd/eal.c | 4 ++--
 lib/librte_eal/linux/eal.c   | 4 ++--
 lib/librte_eal/windows/eal.c | 6 ++++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index d6ea023750..51478358c7 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -906,7 +906,7 @@ rte_eal_init(int argc, char **argv)
 	ret = rte_service_init();
 	if (ret) {
 		rte_eal_init_alert("rte_service_init() failed");
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
@@ -922,7 +922,7 @@ rte_eal_init(int argc, char **argv)
 	 */
 	ret = rte_service_start_with_defaults();
 	if (ret < 0 && ret != -ENOTSUP) {
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index a4161be630..32b48c3de9 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -1273,7 +1273,7 @@ rte_eal_init(int argc, char **argv)
 	ret = rte_service_init();
 	if (ret) {
 		rte_eal_init_alert("rte_service_init() failed");
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
@@ -1295,7 +1295,7 @@ rte_eal_init(int argc, char **argv)
 	 */
 	ret = rte_service_start_with_defaults();
 	if (ret < 0 && ret != -ENOTSUP) {
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 105549de1b..1e5f6576f0 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -264,6 +264,7 @@ rte_eal_init(int argc, char **argv)
 	const struct rte_config *config = rte_eal_get_configuration();
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
+	int ret;
 
 	rte_eal_log_init(NULL, 0);
 
@@ -387,9 +388,10 @@ rte_eal_init(int argc, char **argv)
 	}
 
 	/* Initialize services so drivers can register services during probe. */
-	if (rte_service_init()) {
+	ret = rte_service_init();
+	if (ret) {
 		rte_eal_init_alert("rte_service_init() failed");
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.508377088 +0000
+++ 0118-service-propagate-init-error-in-EAL.patch	2021-02-05 11:18:28.994694692 +0000
@@ -1 +1 @@
-From de6aede17bd3abe51478f33131a4c41da83c42da Mon Sep 17 00:00:00 2001
+From 43447841b4c02597a6d47d2b4de11d932f141a2f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de6aede17bd3abe51478f33131a4c41da83c42da ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (116 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'service: propagate init error in EAL' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'eal/windows: fix C++ compatibility' " luca.boccassi
                   ` (156 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From a6e138519f022c7493317dafb8b32d92e7fbe32f Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 4 Nov 2020 18:04:25 +0100
Subject: [PATCH] test/mcslock: remove unneeded per lcore copy

[ upstream commit 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 ]

Each core already comes with its local storage for mcslock (in its
stack), therefore there is no need to define an additional per-lcore
mcslock.

Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 app/test/test_mcslock.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c
index fbca78707d..80eaecc90a 100644
--- a/app/test/test_mcslock.c
+++ b/app/test/test_mcslock.c
@@ -37,10 +37,6 @@
  *   lock multiple times.
  */
 
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_me);
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_try_me);
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_perf_me);
-
 rte_mcslock_t *p_ml;
 rte_mcslock_t *p_ml_try;
 rte_mcslock_t *p_ml_perf;
@@ -53,7 +49,7 @@ static int
 test_mcslock_per_core(__rte_unused void *arg)
 {
 	/* Per core me node. */
-	rte_mcslock_t ml_me = RTE_PER_LCORE(_ml_me);
+	rte_mcslock_t ml_me;
 
 	rte_mcslock_lock(&p_ml, &ml_me);
 	printf("MCS lock taken on core %u\n", rte_lcore_id());
@@ -77,7 +73,7 @@ load_loop_fn(void *func_param)
 	const unsigned int lcore = rte_lcore_id();
 
 	/**< Per core me node. */
-	rte_mcslock_t ml_perf_me = RTE_PER_LCORE(_ml_perf_me);
+	rte_mcslock_t ml_perf_me;
 
 	/* wait synchro */
 	while (rte_atomic32_read(&synchro) == 0)
@@ -151,8 +147,8 @@ static int
 test_mcslock_try(__rte_unused void *arg)
 {
 	/**< Per core me node. */
-	rte_mcslock_t ml_me     = RTE_PER_LCORE(_ml_me);
-	rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me);
+	rte_mcslock_t ml_me;
+	rte_mcslock_t ml_try_me;
 
 	/* Locked ml_try in the main lcore, so it should fail
 	 * when trying to lock it in the worker lcore.
@@ -178,8 +174,8 @@ test_mcslock(void)
 	int i;
 
 	/* Define per core me node. */
-	rte_mcslock_t ml_me     = RTE_PER_LCORE(_ml_me);
-	rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me);
+	rte_mcslock_t ml_me;
+	rte_mcslock_t ml_try_me;
 
 	/*
 	 * Test mcs lock & unlock on each core
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.551189455 +0000
+++ 0119-test-mcslock-remove-unneeded-per-lcore-copy.patch	2021-02-05 11:18:28.994694692 +0000
@@ -1 +1 @@
-From 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 Mon Sep 17 00:00:00 2001
+From a6e138519f022c7493317dafb8b32d92e7fbe32f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 ]

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

* [dpdk-stable] patch 'eal/windows: fix C++ compatibility' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (117 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'test/rwlock: fix spelling and missing whitespace' " luca.boccassi
                   ` (155 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From aba3a242ef9551e1ca87112ce89834308064015a Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Fri, 15 Jan 2021 11:38:21 -0800
Subject: [PATCH] eal/windows: fix C++ compatibility

[ upstream commit 56446c913f0a0c28fb1d734986942da122b1174a ]

Explicitly cast void * to type * so that EAL headers may be compiled
as C or C++.

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

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_eal/windows/include/rte_os.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index ea3fe60e53..7ef38ff06c 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -86,7 +86,7 @@ asprintf(char **buffer, const char *format, ...)
 		return -1;
 	size++;
 
-	*buffer = malloc(size);
+	*buffer = (char *)malloc(size);
 	if (*buffer == NULL)
 		return -1;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.589618816 +0000
+++ 0120-eal-windows-fix-C-compatibility.patch	2021-02-05 11:18:28.994694692 +0000
@@ -1 +1 @@
-From 56446c913f0a0c28fb1d734986942da122b1174a Mon Sep 17 00:00:00 2001
+From aba3a242ef9551e1ca87112ce89834308064015a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 56446c913f0a0c28fb1d734986942da122b1174a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/rwlock: fix spelling and missing whitespace' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (118 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'eal/windows: fix C++ compatibility' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'test: fix terminal settings on exit' " luca.boccassi
                   ` (154 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/509325cede3349148b3fb74ffb4c7ec014aa7d87

Thanks.

Luca Boccassi

---
From 509325cede3349148b3fb74ffb4c7ec014aa7d87 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Jan 2021 08:48:37 -0800
Subject: [PATCH] test/rwlock: fix spelling and missing whitespace

[ upstream commit 14df4f2987fd9de51a026f2bbc94fbb7a7a1379a ]

Trivial fix to for spelling errors and incorrect spacing.
No change to any built code.

Fixes: 7a61fc5d1b09 ("test/rwlock: add new test-cases")
Fixes: af75078fece3 ("first public release")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_rwlock.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c
index 701187f398..b47150a86a 100644
--- a/app/test/test_rwlock.c
+++ b/app/test/test_rwlock.c
@@ -46,6 +46,7 @@ enum {
 static struct {
 	rte_rwlock_t lock;
 	uint64_t tick;
+
 	volatile union {
 		uint8_t u8[RTE_CACHE_LINE_SIZE];
 		uint64_t u64[RTE_CACHE_LINE_SIZE / sizeof(uint64_t)];
@@ -182,7 +183,7 @@ rwlock_test1(void)
 	int i;
 
 	rte_rwlock_init(&sl);
-	for (i=0; i<RTE_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rwlock_init(&sl_tab[i]);
 
 	rte_rwlock_write_lock(&sl);
@@ -252,7 +253,7 @@ try_write(uint32_t lc)
 	if (rc != 0)
 		return rc;
 
-	/* update by bytes in reverese order */
+	/* update by bytes in reverse order */
 	for (i = RTE_DIM(try_rwlock_data.data.u8); i-- != 0; ) {
 
 		/* race condition occurred, lock doesn't work properly */
@@ -269,7 +270,7 @@ try_write(uint32_t lc)
 		try_rwlock_data.data.u8[i] = v;
 	}
 
-	/* restore by bytes in reverese order */
+	/* restore by bytes in reverse order */
 	for (i = RTE_DIM(try_rwlock_data.data.u8); i-- != 0; ) {
 
 		/* race condition occurred, lock doesn't work properly */
@@ -461,7 +462,7 @@ try_rwlock_test_rda(void)
 {
 	try_test_reset();
 
-	/* start read test on all avaialble lcores */
+	/* start read test on all available lcores */
 	rte_eal_mp_remote_launch(try_read_lcore, NULL, CALL_MAIN);
 	rte_eal_mp_wait_lcore();
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.628385183 +0000
+++ 0121-test-rwlock-fix-spelling-and-missing-whitespace.patch	2021-02-05 11:18:28.994694692 +0000
@@ -1 +1 @@
-From 14df4f2987fd9de51a026f2bbc94fbb7a7a1379a Mon Sep 17 00:00:00 2001
+From 509325cede3349148b3fb74ffb4c7ec014aa7d87 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 14df4f2987fd9de51a026f2bbc94fbb7a7a1379a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test: fix terminal settings on exit' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (119 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'test/rwlock: fix spelling and missing whitespace' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' " luca.boccassi
                   ` (153 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/77ce48ce03e93b6ad72091a0399be7ee22387e67

Thanks.

Luca Boccassi

---
From 77ce48ce03e93b6ad72091a0399be7ee22387e67 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Jan 2021 08:45:37 -0800
Subject: [PATCH] test: fix terminal settings on exit

[ upstream commit acdabc450ea087815f8d93cf139ac265c638f99f ]

When running one test (via DPDK_TEST) the test program
would leave the terminal in raw mode.  This was because
it was setting up cmdline to do interactive input.

The fix is to use cmdline_new() for the interactive case.

This also fixes a memory leak because the test
runner was never calling cmdline_free().

Fixes: 9b848774a5dc ("test: use env variable to run tests")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test/test.c | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/app/test/test.c b/app/test/test.c
index ba0b0309b5..624dd48042 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -164,29 +164,38 @@ main(int argc, char **argv)
 
 
 #ifdef RTE_LIB_CMDLINE
-	cl = cmdline_stdin_new(main_ctx, "RTE>>");
-	if (cl == NULL) {
-		ret = -1;
-		goto out;
-	}
-
 	char *dpdk_test = getenv("DPDK_TEST");
 	if (dpdk_test && strlen(dpdk_test)) {
 		char buf[1024];
+
+		cl = cmdline_new(main_ctx, "RTE>>", 0, 1);
+		if (cl == NULL) {
+			ret = -1;
+			goto out;
+		}
+
 		snprintf(buf, sizeof(buf), "%s\n", dpdk_test);
 		if (cmdline_in(cl, buf, strlen(buf)) < 0) {
 			printf("error on cmdline input\n");
+
+			ret = -1;
+		} else {
+			ret = last_test_result;
+		}
+		cmdline_free(cl);
+		goto out;
+	} else {
+		/* if no DPDK_TEST env variable, go interactive */
+		cl = cmdline_stdin_new(main_ctx, "RTE>>");
+		if (cl == NULL) {
 			ret = -1;
 			goto out;
 		}
 
+		cmdline_interact(cl);
 		cmdline_stdin_exit(cl);
-		ret = last_test_result;
-		goto out;
+		cmdline_free(cl);
 	}
-	/* if no DPDK_TEST env variable, go interactive */
-	cmdline_interact(cl);
-	cmdline_stdin_exit(cl);
 #endif
 	ret = 0;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.667808271 +0000
+++ 0122-test-fix-terminal-settings-on-exit.patch	2021-02-05 11:18:28.994694692 +0000
@@ -1 +1 @@
-From acdabc450ea087815f8d93cf139ac265c638f99f Mon Sep 17 00:00:00 2001
+From 77ce48ce03e93b6ad72091a0399be7ee22387e67 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acdabc450ea087815f8d93cf139ac265c638f99f ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (120 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'test: fix terminal settings on exit' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'fbarray: fix overlap check' " luca.boccassi
                   ` (152 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jeff Guo, Wei Ling, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 3f39b9182dd705b7e5aec944411cfee3987f79c4 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 25 Nov 2020 17:46:22 +0800
Subject: [PATCH] test: fix buffer overflow in Tx burst

[ upstream commit 58325f094a059e8ef4e1085d322a46107aad468f ]

The Tx buffer may overflow when there is more than one port.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
---
 app/test/test_pmd_perf.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 4db816a360..3a248d512c 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -606,10 +606,10 @@ timeout:
 static int
 exec_burst(uint32_t flags, int lcore)
 {
-	unsigned i, portid, nb_tx = 0;
+	unsigned int portid, nb_tx = 0;
 	struct lcore_conf *conf;
 	uint32_t pkt_per_port;
-	int num, idx = 0;
+	int num, i, idx = 0;
 	int diff_tsc;
 
 	conf = &lcore_conf[lcore];
@@ -628,16 +628,14 @@ exec_burst(uint32_t flags, int lcore)
 		rte_atomic64_set(&start, 1);
 
 	/* start xmit */
+	i = 0;
 	while (num) {
 		nb_tx = RTE_MIN(MAX_PKT_BURST, num);
-		for (i = 0; i < conf->nb_ports; i++) {
-			portid = conf->portlist[i];
-			nb_tx = rte_eth_tx_burst(portid, 0,
-					 &tx_burst[idx], nb_tx);
-			idx += nb_tx;
-			num -= nb_tx;
-		}
-
+		portid = conf->portlist[i];
+		nb_tx = rte_eth_tx_burst(portid, 0, &tx_burst[idx], nb_tx);
+		idx += nb_tx;
+		num -= nb_tx;
+		i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
 	}
 
 	sleep(5);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.710114484 +0000
+++ 0123-test-fix-buffer-overflow-in-Tx-burst.patch	2021-02-05 11:18:28.994694692 +0000
@@ -1 +1 @@
-From 58325f094a059e8ef4e1085d322a46107aad468f Mon Sep 17 00:00:00 2001
+From 3f39b9182dd705b7e5aec944411cfee3987f79c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 58325f094a059e8ef4e1085d322a46107aad468f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'fbarray: fix overlap check' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (121 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' " luca.boccassi
                   ` (151 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Zhihong Peng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From 5a949c60c8694f5fd80d3dea2cf5f68aa0d8b728 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 14 Jan 2021 15:02:45 +0000
Subject: [PATCH] fbarray: fix overlap check

[ upstream commit 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 ]

When we're attaching fbarrays in secondary processes, we check for
whether the intended memory address for the fbarray is already in use by
some other, local fbarray. However, the check for end-overlap (i.e. to
see if our memory area's end overlaps with some other fbarray) is
incorrectly counting end offset as part of the overlap. Fix the check.

Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
---
 lib/librte_eal/common/eal_common_fbarray.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 1220e2bae9..d974f3dab7 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -110,7 +110,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)
 	if (start >= ma_start && start < ma_end)
 		return 1;
 	/* end overlap? */
-	if (end >= ma_start && end < ma_end)
+	if (end > ma_start && end < ma_end)
 		return 1;
 	return 0;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.750184566 +0000
+++ 0124-fbarray-fix-overlap-check.patch	2021-02-05 11:18:28.998694767 +0000
@@ -1 +1 @@
-From 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 Mon Sep 17 00:00:00 2001
+From 5a949c60c8694f5fd80d3dea2cf5f68aa0d8b728 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (122 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'fbarray: fix overlap check' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix memory rule alignment' " luca.boccassi
                   ` (150 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Harman Kalra; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/746a7c2fb33bbcec031d79e068ab4b9baf4a4c2c

Thanks.

Luca Boccassi

---
From 746a7c2fb33bbcec031d79e068ab4b9baf4a4c2c Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Tue, 12 Jan 2021 23:54:46 +0530
Subject: [PATCH] examples/l3fwd: remove limitation on Tx queue count

[ upstream commit 88256ed85338c572d73006e4c4530a52d3b477ff ]

In l3fwd no of transmit queues is calculated based on no of
lcores with which it is launched. Hence maximum no of tx
queues possible per port should depend on RTE_MAX_LCORE value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index d62dec434c..bb49e5faff 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -48,7 +48,7 @@
 #include "l3fwd.h"
 #include "l3fwd_event.h"
 
-#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
+#define MAX_TX_QUEUE_PER_PORT RTE_MAX_LCORE
 #define MAX_RX_QUEUE_PER_PORT 128
 
 #define MAX_LCORE_PARAMS 1024
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.790594902 +0000
+++ 0125-examples-l3fwd-remove-limitation-on-Tx-queue-count.patch	2021-02-05 11:18:28.998694767 +0000
@@ -1 +1 @@
-From 88256ed85338c572d73006e4c4530a52d3b477ff Mon Sep 17 00:00:00 2001
+From 746a7c2fb33bbcec031d79e068ab4b9baf4a4c2c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 88256ed85338c572d73006e4c4530a52d3b477ff ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'regex/mlx5: fix memory rule alignment' has been queued to stable release 20.11.1
  2021-02-05 11:14 [dpdk-stable] patch 'eal/windows: fix build with MinGW-w64 8' has been queued to stable release 20.11.1 luca.boccassi
                   ` (123 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix support for group id' " luca.boccassi
                   ` (149 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ori Kam; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.1

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

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

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

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

Thanks.

Luca Boccassi

---
From dfbcce979787a17d93f05c45308804796c754a4b Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@nvidia.com>
Dat