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>
Date: Thu, 7 Jan 2021 18:57:07 +0200
Subject: [PATCH] regex/mlx5: fix memory rule alignment

[ upstream commit 7e8b42e89aaa9217472fc2a3aa37718391ae08a5 ]

Due to Kernel requirement the memory allocated must be aligned to 2M.

Fixes: b34d816363b5 ("regex/mlx5: support rules import")

Signed-off-by: Ori Kam <orika@nvidia.com>
---
 drivers/regex/mlx5/mlx5_rxp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c
index fcbc766441..bd721f0b11 100644
--- a/drivers/regex/mlx5/mlx5_rxp.c
+++ b/drivers/regex/mlx5/mlx5_rxp.c
@@ -892,7 +892,7 @@ rxp_db_setup(struct mlx5_regex_priv *priv)
 
 	/* Setup database memories for both RXP engines + reprogram memory. */
 	for (i = 0; i < (priv->nb_engines + MLX5_RXP_EM_COUNT); i++) {
-		priv->db[i].ptr = rte_malloc("", MLX5_MAX_DB_SIZE, 0);
+		priv->db[i].ptr = rte_malloc("", MLX5_MAX_DB_SIZE, 1 << 21);
 		if (!priv->db[i].ptr) {
 			DRV_LOG(ERR, "Failed to alloc db memory!");
 			ret = ENODEV;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.833450377 +0000
+++ 0126-regex-mlx5-fix-memory-rule-alignment.patch	2021-02-05 11:18:28.998694767 +0000
@@ -1 +1 @@
-From 7e8b42e89aaa9217472fc2a3aa37718391ae08a5 Mon Sep 17 00:00:00 2001
+From dfbcce979787a17d93f05c45308804796c754a4b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7e8b42e89aaa9217472fc2a3aa37718391ae08a5 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'regex/mlx5: fix support for group id' 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
                   ` (124 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix memory rule alignment' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix number of supported queues' " luca.boccassi
                   ` (148 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/89c875ea01a89936a7dd45155f21ed0923ea35fe

Thanks.

Luca Boccassi

---
From 89c875ea01a89936a7dd45155f21ed0923ea35fe Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@nvidia.com>
Date: Thu, 7 Jan 2021 18:57:09 +0200
Subject: [PATCH] regex/mlx5: fix support for group id

[ upstream commit 2cace110ea018e49aec4fd75370f2006e711d4d7 ]

In order to know which groups in the RegEx engine
should be used there is a need to check the req_flags.

This commit adds the missing check.

Fixes: 4d4e245ad637 ("regex/mlx5: support enqueue")

Signed-off-by: Ori Kam <orika@nvidia.com>
---
 drivers/regex/mlx5/mlx5_regex_fastpath.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c
index 5857617282..8d134ac98e 100644
--- a/drivers/regex/mlx5/mlx5_regex_fastpath.c
+++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c
@@ -105,7 +105,21 @@ prep_one(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp,
 {
 	size_t wqe_offset = (sq->pi & (sq_size_get(sq) - 1)) * MLX5_SEND_WQE_BB;
 	uint32_t lkey;
+	uint16_t group0 = op->req_flags & RTE_REGEX_OPS_REQ_GROUP_ID0_VALID_F ?
+				op->group_id0 : 0;
+	uint16_t group1 = op->req_flags & RTE_REGEX_OPS_REQ_GROUP_ID1_VALID_F ?
+				op->group_id1 : 0;
+	uint16_t group2 = op->req_flags & RTE_REGEX_OPS_REQ_GROUP_ID2_VALID_F ?
+				op->group_id2 : 0;
+	uint16_t group3 = op->req_flags & RTE_REGEX_OPS_REQ_GROUP_ID3_VALID_F ?
+				op->group_id3 : 0;
 
+	/* For backward compatibility. */
+	if (!(op->req_flags & (RTE_REGEX_OPS_REQ_GROUP_ID0_VALID_F |
+			       RTE_REGEX_OPS_REQ_GROUP_ID1_VALID_F |
+			       RTE_REGEX_OPS_REQ_GROUP_ID2_VALID_F |
+			       RTE_REGEX_OPS_REQ_GROUP_ID3_VALID_F)))
+		group0 = op->group_id0;
 	lkey = mlx5_mr_addr2mr_bh(priv->pd, 0,
 				  &priv->mr_scache, &qp->mr_ctrl,
 				  rte_pktmbuf_mtod(op->mbuf, uintptr_t),
@@ -116,9 +130,8 @@ prep_one(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp,
 	set_wqe_ctrl_seg((struct mlx5_wqe_ctrl_seg *)wqe, sq->pi,
 			 MLX5_OPCODE_MMO, MLX5_OPC_MOD_MMO_REGEX, sq->obj->id,
 			 0, ds, 0, 0);
-	set_regex_ctrl_seg(wqe + 12, 0, op->group_id0, op->group_id1,
-			   op->group_id2,
-			   op->group_id3, 0);
+	set_regex_ctrl_seg(wqe + 12, 0, group0, group1, group2, group3,
+			   0);
 	struct mlx5_wqe_data_seg *input_seg =
 		(struct mlx5_wqe_data_seg *)(wqe +
 					     MLX5_REGEX_WQE_GATHER_OFFSET);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.875221024 +0000
+++ 0127-regex-mlx5-fix-support-for-group-id.patch	2021-02-05 11:18:28.998694767 +0000
@@ -1 +1 @@
-From 2cace110ea018e49aec4fd75370f2006e711d4d7 Mon Sep 17 00:00:00 2001
+From 89c875ea01a89936a7dd45155f21ed0923ea35fe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2cace110ea018e49aec4fd75370f2006e711d4d7 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3a0a2189b9..35ebcd9408 100644
+index 5857617282..8d134ac98e 100644
@@ -47,2 +48,2 @@
- 			 MLX5_OPCODE_MMO, MLX5_OPC_MOD_MMO_REGEX,
- 			 sq->sq_obj.sq->id, 0, ds, 0, 0);
+ 			 MLX5_OPCODE_MMO, MLX5_OPC_MOD_MMO_REGEX, sq->obj->id,
+ 			 0, ds, 0, 0);

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

* [dpdk-stable] patch 'regex/mlx5: fix number of supported queues' 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
                   ` (125 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix support for group id' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'crypto/qat: fix access to uninitialized variable' " luca.boccassi
                   ` (147 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/caa3b2541d4e8b495432ac63595a14d0262de256

Thanks.

Luca Boccassi

---
From caa3b2541d4e8b495432ac63595a14d0262de256 Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@nvidia.com>
Date: Thu, 7 Jan 2021 18:57:11 +0200
Subject: [PATCH] regex/mlx5: fix number of supported queues

[ upstream commit 7a7a9907bf919101ead845c7b9a4b29aa67a2fb6 ]

The RegEx engine has no limitation on number of queues.
This commits modifies the max supported queues reported to the application.

Fixes: fbc8c7003b93 ("regex/mlx5: add completion queue creation")

Signed-off-by: Ori Kam <orika@nvidia.com>
---
 drivers/regex/mlx5/mlx5_rxp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c
index bd721f0b11..0753ab3bdc 100644
--- a/drivers/regex/mlx5/mlx5_rxp.c
+++ b/drivers/regex/mlx5/mlx5_rxp.c
@@ -115,11 +115,10 @@ mlx5_regex_info_get(struct rte_regexdev *dev __rte_unused,
 	info->max_payload_size = MLX5_REGEX_MAX_PAYLOAD_SIZE;
 	info->max_rules_per_group = MLX5_REGEX_MAX_RULES_PER_GROUP;
 	info->max_groups = MLX5_REGEX_MAX_GROUPS;
-	info->max_queue_pairs = 1;
 	info->regexdev_capa = RTE_REGEXDEV_SUPP_PCRE_GREEDY_F |
 			      RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F;
 	info->rule_flags = 0;
-	info->max_queue_pairs = 10;
+	info->max_queue_pairs = UINT16_MAX;
 	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.915493749 +0000
+++ 0128-regex-mlx5-fix-number-of-supported-queues.patch	2021-02-05 11:18:28.998694767 +0000
@@ -1 +1 @@
-From 7a7a9907bf919101ead845c7b9a4b29aa67a2fb6 Mon Sep 17 00:00:00 2001
+From caa3b2541d4e8b495432ac63595a14d0262de256 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a7a9907bf919101ead845c7b9a4b29aa67a2fb6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 4449aa8c3d..380037e24c 100644
+index bd721f0b11..0753ab3bdc 100644
@@ -21 +22 @@
-@@ -103,11 +103,10 @@ mlx5_regex_info_get(struct rte_regexdev *dev __rte_unused,
+@@ -115,11 +115,10 @@ mlx5_regex_info_get(struct rte_regexdev *dev __rte_unused,

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

* [dpdk-stable] patch 'crypto/qat: fix access to uninitialized variable' 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
                   ` (126 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix number of supported queues' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' " luca.boccassi
                   ` (146 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Arek Kusztal, Declan Doherty, 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/cf7cd53c7a3f988b47d529e212e18f9a547229ba

Thanks.

Luca Boccassi

---
From cf7cd53c7a3f988b47d529e212e18f9a547229ba Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 15 Dec 2020 18:23:51 +0000
Subject: [PATCH] crypto/qat: fix access to uninitialized variable

[ upstream commit 87086b3398edf20d46628481a2959a40ad95b477 ]

QAT_LOG() has access to the uninitialized variable "name"

Fixes: 21792c443205 ("crypto/qat: add multi-process handling of driver ID")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/crypto/qat/qat_asym_pmd.c | 8 ++++----
 drivers/crypto/qat/qat_sym_pmd.c  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index ed8a2a50b4..a2c8aca2c1 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -251,6 +251,10 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
 	struct rte_cryptodev *cryptodev;
 	struct qat_asym_dev_private *internals;
 
+	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
+			qat_pci_dev->name, "asym");
+	QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
+
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		qat_pci_dev->qat_asym_driver_id =
 				qat_asym_driver_id;
@@ -264,10 +268,6 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
 		}
 	}
 
-	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
-			qat_pci_dev->name, "asym");
-	QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
-
 	/* Populate subset device to use in cryptodev device creation */
 	qat_dev_instance->asym_rte_dev.driver = &cryptodev_qat_asym_driver;
 	qat_dev_instance->asym_rte_dev.numa_node =
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 6da9512fe4..93666fdade 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -330,6 +330,10 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
 	const struct rte_cryptodev_capabilities *capabilities;
 	uint64_t capa_size;
 
+	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
+			qat_pci_dev->name, "sym");
+	QAT_LOG(DEBUG, "Creating QAT SYM device %s", name);
+
 	/*
 	 * All processes must use same driver id so they can share sessions.
 	 * Store driver_id so we can validate that all processes have the same
@@ -349,10 +353,6 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
 		}
 	}
 
-	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
-			qat_pci_dev->name, "sym");
-	QAT_LOG(DEBUG, "Creating QAT SYM device %s", name);
-
 	/* Populate subset device to use in cryptodev device creation */
 	qat_dev_instance->sym_rte_dev.driver = &cryptodev_qat_sym_driver;
 	qat_dev_instance->sym_rte_dev.numa_node =
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.951697273 +0000
+++ 0129-crypto-qat-fix-access-to-uninitialized-variable.patch	2021-02-05 11:18:29.002694843 +0000
@@ -1 +1 @@
-From 87086b3398edf20d46628481a2959a40ad95b477 Mon Sep 17 00:00:00 2001
+From cf7cd53c7a3f988b47d529e212e18f9a547229ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87086b3398edf20d46628481a2959a40ad95b477 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' 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
                   ` (127 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'crypto/qat: fix access to uninitialized variable' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' " luca.boccassi
                   ` (145 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Ciara Power; +Cc: Declan Doherty, 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/e20b5bc06f3635b05d91d69d23f0fab07f3958eb

Thanks.

Luca Boccassi

---
From e20b5bc06f3635b05d91d69d23f0fab07f3958eb Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Mon, 18 Jan 2021 11:34:10 +0000
Subject: [PATCH] app/crypto-perf: fix spelling in output

[ upstream commit 7d3046ed73fdcf705d7c571f1b8e7ca9e9b53e33 ]

Fixes some spelling errors in app logs and help text.

Fixes: 7da018731c56 ("app/crypto-perf: add help option")
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 2 +-
 app/test-crypto-perf/main.c                  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 03ed6f5942..0466f7baf8 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -24,7 +24,7 @@ usage(char *progname)
 {
 	printf("%s [EAL options] --\n"
 		" --silent: disable options dump\n"
-		" --ptest throughput / latency / verify / pmd-cycleount :"
+		" --ptest throughput / latency / verify / pmd-cyclecount :"
 		" set test type\n"
 		" --pool_sz N: set the number of crypto ops/mbufs allocated\n"
 		" --total-ops N: set the number of total operations performed\n"
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 99f86e9019..49af812d8b 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -530,14 +530,14 @@ main(int argc, char **argv)
 
 	ret = cperf_options_parse(&opts, argc, argv);
 	if (ret) {
-		RTE_LOG(ERR, USER1, "Parsing on or more user options failed\n");
+		RTE_LOG(ERR, USER1, "Parsing one or more user options failed\n");
 		goto err;
 	}
 
 	ret = cperf_options_check(&opts);
 	if (ret) {
 		RTE_LOG(ERR, USER1,
-				"Checking on or more user options failed\n");
+				"Checking one or more user options failed\n");
 		goto err;
 	}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.994812448 +0000
+++ 0130-app-crypto-perf-fix-spelling-in-output.patch	2021-02-05 11:18:29.002694843 +0000
@@ -1 +1 @@
-From 7d3046ed73fdcf705d7c571f1b8e7ca9e9b53e33 Mon Sep 17 00:00:00 2001
+From e20b5bc06f3635b05d91d69d23f0fab07f3958eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d3046ed73fdcf705d7c571f1b8e7ca9e9b53e33 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' 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
                   ` (128 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix interception with flow director' " luca.boccassi
                   ` (144 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Weifeng Li; +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/cf0957a9178c4f569401e5a57141228fc38eee35

Thanks.

Luca Boccassi

---
From cf0957a9178c4f569401e5a57141228fc38eee35 Mon Sep 17 00:00:00 2001
From: Weifeng Li <liweifeng96@126.com>
Date: Sun, 10 Jan 2021 16:34:17 +0800
Subject: [PATCH] net/i40e: fix X722 for 802.1ad frames ability

[ upstream commit 591bd5e4ae8c0256614417ee5f2645edf6d0f61c ]

I40E_DEV_ID_SFP_I_X722 does not support 802.1ad frames ability,
so I40E_HW_FLAG_802_1AD_CAPABLE should not be set.
The patch also correct the comment for I40E_HW_FLAG_802_1AD_CAPABLE
configure.

Fixes: 9efa8d28b4da ("net/i40e: fix SFP X722 with FW4.16")

Signed-off-by: Weifeng Li <liweifeng96@126.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5984e52abd..213fb99ca9 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1549,8 +1549,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
 		return -EIO;
 	}
-	/* Firmware of SFP x722 does not support adminq option */
-	if (hw->device_id == I40E_DEV_ID_SFP_X722)
+	/* Firmware of SFP x722 does not support 802.1ad frames ability */
+	if (hw->device_id == I40E_DEV_ID_SFP_X722 ||
+		hw->device_id == I40E_DEV_ID_SFP_I_X722)
 		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
 
 	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.034910020 +0000
+++ 0131-net-i40e-fix-X722-for-802.1ad-frames-ability.patch	2021-02-05 11:18:29.010694996 +0000
@@ -1 +1 @@
-From 591bd5e4ae8c0256614417ee5f2645edf6d0f61c Mon Sep 17 00:00:00 2001
+From cf0957a9178c4f569401e5a57141228fc38eee35 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 591bd5e4ae8c0256614417ee5f2645edf6d0f61c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ba1abc584f..acf7a0f010 100644
+index 5984e52abd..213fb99ca9 100644
@@ -24 +25 @@
-@@ -1550,8 +1550,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1549,8 +1549,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)

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

* [dpdk-stable] patch 'net/hns3: fix interception with 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
                   ` (129 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix xstats with id and names' " luca.boccassi
                   ` (143 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Lijun Ou; +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/3520eeda0e717f7a1b8d1162c9b2e26802bc9191

Thanks.

Luca Boccassi

---
From 3520eeda0e717f7a1b8d1162c9b2e26802bc9191 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Wed, 6 Jan 2021 11:46:27 +0800
Subject: [PATCH] net/hns3: fix interception with flow director

[ upstream commit 35ec45adf7a49d8ac2091e9f06dcf74d92083510 ]

The rte_fdir_conf structure has deprecated and users need
to use the specified rule parameters of rte_flow structure
when configure a flow rule. As a result, it is incorrectly
used in the rte_flow API.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index ee6ec15498..f303df4ad8 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1208,11 +1208,6 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					  "Fdir not supported in VF");
 
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
-					  "fdir_conf.mode isn't perfect");
-
 	step_mngr.items = first_items;
 	step_mngr.count = ARRAY_SIZE(first_items);
 	for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.081333187 +0000
+++ 0132-net-hns3-fix-interception-with-flow-director.patch	2021-02-05 11:18:29.010694996 +0000
@@ -1 +1 @@
-From 35ec45adf7a49d8ac2091e9f06dcf74d92083510 Mon Sep 17 00:00:00 2001
+From 3520eeda0e717f7a1b8d1162c9b2e26802bc9191 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35ec45adf7a49d8ac2091e9f06dcf74d92083510 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix xstats with id and names' 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
                   ` (130 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix interception with flow director' " luca.boccassi
@ 2021-02-05 11:16 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix error code in xstats' " luca.boccassi
                   ` (142 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:16 UTC (permalink / raw)
  To: Huisong Li; +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/642e10664fdc74999403bc2c65c843c3f73ed4f2

Thanks.

Luca Boccassi

---
From 642e10664fdc74999403bc2c65c843c3f73ed4f2 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Jan 2021 11:46:28 +0800
Subject: [PATCH] net/hns3: fix xstats with id and names

[ upstream commit 3213d584b698f41dbef14599a41ab0a7a78739b4 ]

Currently, validity check for ids and values in the
hns3_dev_xstats_get_by_id API is incorrect, which will
cause a problem. Namely, if the ID range of the xstats
stats item does not include the basic stats item, the
app can not obtain the corresponding xstats statistics
in hns3_dev_xstats_get_by_id.

Similarly, the hns3_dev_xstats_get_names_by_id interface
also has a problem.

Although the input parameter verification code cannot be
executed due to the implementation of the ethdev framework
interface, the driver needs to ensure the correctness of
the input parameters.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_stats.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 91168ac95a..1597af3545 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -933,9 +933,13 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 	uint32_t i;
 	int ret;
 
-	if (ids == NULL || size < cnt_stats)
+	if (ids == NULL && values == NULL)
 		return cnt_stats;
 
+	if (ids == NULL)
+		if (size < cnt_stats)
+			return cnt_stats;
+
 	/* Update tqp stats by read register */
 	ret = hns3_update_tqp_stats(hw);
 	if (ret) {
@@ -957,6 +961,15 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 		return -EINVAL;
 	}
 
+	if (ids == NULL && values != NULL) {
+		for (i = 0; i < cnt_stats; i++)
+			memcpy(&values[i], &values_copy[i].value,
+			       sizeof(values[i]));
+
+		rte_free(values_copy);
+		return cnt_stats;
+	}
+
 	for (i = 0; i < size; i++) {
 		if (ids[i] >= cnt_stats) {
 			hns3_err(hw, "ids[%u] (%" PRIx64 ") is invalid, "
@@ -1005,9 +1018,16 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 	uint64_t len;
 	uint32_t i;
 
-	if (ids == NULL || xstats_names == NULL)
+	if (xstats_names == NULL)
 		return cnt_stats;
 
+	if (ids == NULL) {
+		if (size < cnt_stats)
+			return cnt_stats;
+
+		return hns3_dev_xstats_get_names(dev, xstats_names, cnt_stats);
+	}
+
 	len = cnt_stats * sizeof(struct rte_eth_xstat_name);
 	names_copy = rte_zmalloc("hns3_xstats_names", len, 0);
 	if (names_copy == NULL) {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.125683847 +0000
+++ 0133-net-hns3-fix-xstats-with-id-and-names.patch	2021-02-05 11:18:29.010694996 +0000
@@ -1 +1 @@
-From 3213d584b698f41dbef14599a41ab0a7a78739b4 Mon Sep 17 00:00:00 2001
+From 642e10664fdc74999403bc2c65c843c3f73ed4f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3213d584b698f41dbef14599a41ab0a7a78739b4 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix error code in xstats' 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
                   ` (131 preceding siblings ...)
  2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix xstats with id and names' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix Rx/Tx errors stats' " luca.boccassi
                   ` (141 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Huisong Li; +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/d7c724f1c3448932485175fb9d0dac65b86a89ef

Thanks.

Luca Boccassi

---
From d7c724f1c3448932485175fb9d0dac65b86a89ef Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Jan 2021 11:46:29 +0800
Subject: [PATCH] net/hns3: fix error code in xstats

[ upstream commit dcb33fd7602408dbb7c3bc78537667b3ee33e05c ]

The ethdev API has processed the failure to obtain
xstats statistics. Therefore, driver should return
an error code instead of 0 in 'hns3_dev_xstats_get'
API.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_stats.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 1597af3545..42ec9b870f 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -739,9 +739,9 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	if (!hns->is_vf) {
 		/* Update Mac stats */
 		ret = hns3_query_update_mac_stats(dev);
-		if (ret) {
+		if (ret < 0) {
 			hns3_err(hw, "Update Mac stats fail : %d", ret);
-			return 0;
+			return ret;
 		}
 
 		/* Get MAC stats from hw->hw_xstats.mac_stats struct */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.166380777 +0000
+++ 0134-net-hns3-fix-error-code-in-xstats.patch	2021-02-05 11:18:29.010694996 +0000
@@ -1 +1 @@
-From dcb33fd7602408dbb7c3bc78537667b3ee33e05c Mon Sep 17 00:00:00 2001
+From d7c724f1c3448932485175fb9d0dac65b86a89ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dcb33fd7602408dbb7c3bc78537667b3ee33e05c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix Rx/Tx errors stats' 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
                   ` (132 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix error code in xstats' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix crash with multi-process' " luca.boccassi
                   ` (140 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Huisong Li; +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/c8f0d15cc5c0768cd762c1074144dbfb55484c7b

Thanks.

Luca Boccassi

---
From c8f0d15cc5c0768cd762c1074144dbfb55484c7b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Jan 2021 11:46:30 +0800
Subject: [PATCH] net/hns3: fix Rx/Tx errors stats

[ upstream commit ec12dc5a554ab4f8dd8a90cab54426dfa685ba80 ]

Abnormal errors stats in Rx/Tx datapath are statistics
items in driver, and displayed in xstats. They should
be cleared by the rte_eth_xstats_reset api, instead of
the rte_eth_stats_reset.

Fixes: c4b7d6761d01 ("net/hns3: get Tx abnormal errors in xstats")
Fixes: 521ab3e93361 ("net/hns3: add simple Rx path")
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_stats.c | 59 +++++++++++++++++++++++------------
 1 file changed, 39 insertions(+), 20 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 42ec9b870f..62a712b1a4 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -551,7 +551,6 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_cmd_desc desc_reset;
 	struct hns3_rx_queue *rxq;
-	struct hns3_tx_queue *txq;
 	uint16_t i;
 	int ret;
 
@@ -581,29 +580,15 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 		}
 	}
 
-	/* Clear the Rx BD errors stats */
-	for (i = 0; i != eth_dev->data->nb_rx_queues; ++i) {
+	/*
+	 * Clear soft stats of rx error packet which will be dropped
+	 * in driver.
+	 */
+	for (i = 0; i < eth_dev->data->nb_rx_queues; ++i) {
 		rxq = eth_dev->data->rx_queues[i];
 		if (rxq) {
 			rxq->pkt_len_errors = 0;
 			rxq->l2_errors = 0;
-			rxq->l3_csum_errors = 0;
-			rxq->l4_csum_errors = 0;
-			rxq->ol3_csum_errors = 0;
-			rxq->ol4_csum_errors = 0;
-		}
-	}
-
-	/* Clear the Tx errors stats */
-	for (i = 0; i != eth_dev->data->nb_tx_queues; ++i) {
-		txq = eth_dev->data->tx_queues[i];
-		if (txq) {
-			txq->over_length_pkt_cnt = 0;
-			txq->exceed_limit_bd_pkt_cnt = 0;
-			txq->exceed_limit_bd_reassem_fail = 0;
-			txq->unsupported_tunnel_pkt_cnt = 0;
-			txq->queue_full_cnt = 0;
-			txq->pkt_padding_fail_cnt = 0;
 		}
 	}
 
@@ -1053,6 +1038,38 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 	return size;
 }
 
+static void
+hns3_tqp_dfx_stats_clear(struct rte_eth_dev *dev)
+{
+	struct hns3_rx_queue *rxq;
+	struct hns3_tx_queue *txq;
+	int i;
+
+	/* Clear Rx dfx stats */
+	for (i = 0; i < dev->data->nb_rx_queues; ++i) {
+		rxq = dev->data->rx_queues[i];
+		if (rxq) {
+			rxq->l3_csum_errors = 0;
+			rxq->l4_csum_errors = 0;
+			rxq->ol3_csum_errors = 0;
+			rxq->ol4_csum_errors = 0;
+		}
+	}
+
+	/* Clear Tx dfx stats */
+	for (i = 0; i < dev->data->nb_tx_queues; ++i) {
+		txq = dev->data->tx_queues[i];
+		if (txq) {
+			txq->over_length_pkt_cnt = 0;
+			txq->exceed_limit_bd_pkt_cnt = 0;
+			txq->exceed_limit_bd_reassem_fail = 0;
+			txq->unsupported_tunnel_pkt_cnt = 0;
+			txq->queue_full_cnt = 0;
+			txq->pkt_padding_fail_cnt = 0;
+		}
+	}
+}
+
 int
 hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 {
@@ -1068,6 +1085,8 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 	/* Clear reset stats */
 	memset(&hns->hw.reset.stats, 0, sizeof(struct hns3_reset_stats));
 
+	hns3_tqp_dfx_stats_clear(dev);
+
 	if (hns->is_vf)
 		return 0;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.211049257 +0000
+++ 0135-net-hns3-fix-Rx-Tx-errors-stats.patch	2021-02-05 11:18:29.014695072 +0000
@@ -1 +1 @@
-From ec12dc5a554ab4f8dd8a90cab54426dfa685ba80 Mon Sep 17 00:00:00 2001
+From c8f0d15cc5c0768cd762c1074144dbfb55484c7b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec12dc5a554ab4f8dd8a90cab54426dfa685ba80 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix crash with multi-process' 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
                   ` (133 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix Rx/Tx errors stats' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/qede: fix promiscuous enable' " luca.boccassi
                   ` (139 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 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/708ae015b3797504a78cdd69d80d4ecb0e7e7a50

Thanks.

Luca Boccassi

---
From 708ae015b3797504a78cdd69d80d4ecb0e7e7a50 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 6 Jan 2021 11:46:31 +0800
Subject: [PATCH] net/hns3: fix crash with multi-process

[ upstream commit 6b978ead2bbef03f77dca495034fc6ba7eee347f ]

In current version, procedure of saving eth_dev in
hns3 PMD init will be called more than twice, one
for primary, the other for secondary. That will cause
segmentation fault in Multi-process as eth_dev will
be changed in secondary process, which is different
from one in primary process.

The initial problem was access to 'rte_eth_devices'
global variable, which is wrong. But current approach
can cause problem for the secondaries, moving 'eth_dev'
to process private can work but before making things
more complex.

This patch deserted the procedure of saving eth_dev in
hns3 PMD init. Instead, it creates an internal function
that gets "struct hns3_hw" as parameter and it can be
called internally without knowing 'eth_dev'and the
.dev_ops can be wrapper to this.

Fixes: 2390bf217f4d ("net/hns3: fix FEC state query")

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index c94a325d25..3f6ba61a37 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5812,10 +5812,9 @@ get_current_fec_auto_state(struct hns3_hw *hw, uint8_t *state)
 }
 
 static int
-hns3_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
+hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
 {
 #define QUERY_ACTIVE_SPEED	1
-	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_sfp_speed_cmd *resp;
 	uint32_t tmp_fec_capa;
 	uint8_t auto_state;
@@ -5875,6 +5874,14 @@ hns3_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
 	return 0;
 }
 
+static int
+hns3_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	return hns3_fec_get_internal(hw, fec_capa);
+}
+
 static int
 hns3_set_fec_hw(struct hns3_hw *hw, uint32_t mode)
 {
@@ -6008,10 +6015,9 @@ hns3_query_dev_fec_info(struct hns3_hw *hw)
 {
 	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(eth_dev, &pf->fec_mode);
+	ret = hns3_fec_get_internal(hw, &pf->fec_mode);
 	if (ret)
 		hns3_err(hw, "query device FEC info failed, ret = %d", ret);
 
@@ -6097,8 +6103,6 @@ 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 d59418b8c8..4c40df1cbb 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -743,8 +743,6 @@ 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:35.252172744 +0000
+++ 0136-net-hns3-fix-crash-with-multi-process.patch	2021-02-05 11:18:29.018695148 +0000
@@ -1 +1 @@
-From 6b978ead2bbef03f77dca495034fc6ba7eee347f Mon Sep 17 00:00:00 2001
+From 708ae015b3797504a78cdd69d80d4ecb0e7e7a50 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b978ead2bbef03f77dca495034fc6ba7eee347f ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index 7c34e382fb..90544fe328 100644
+index c94a325d25..3f6ba61a37 100644
@@ -39 +40 @@
-@@ -5821,10 +5821,9 @@ get_current_fec_auto_state(struct hns3_hw *hw, uint8_t *state)
+@@ -5812,10 +5812,9 @@ get_current_fec_auto_state(struct hns3_hw *hw, uint8_t *state)
@@ -51 +52 @@
-@@ -5884,6 +5883,14 @@ hns3_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
+@@ -5875,6 +5874,14 @@ hns3_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
@@ -66 +67 @@
-@@ -6017,10 +6024,9 @@ hns3_query_dev_fec_info(struct hns3_hw *hw)
+@@ -6008,10 +6015,9 @@ hns3_query_dev_fec_info(struct hns3_hw *hw)
@@ -78 +79 @@
-@@ -6106,8 +6112,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -6097,8 +6103,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
@@ -88 +89 @@
-index 8d6b8cdbbc..31f78a175d 100644
+index d59418b8c8..4c40df1cbb 100644

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

* [dpdk-stable] patch 'net/qede: fix promiscuous enable' 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
                   ` (134 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix crash with multi-process' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix start index for showing FEC array' " luca.boccassi
                   ` (138 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Balazs Nemeth; +Cc: Rasesh Mody, 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/ff1e5f3b5ca227f77643aba4c01677cac714d7de

Thanks.

Luca Boccassi

---
From ff1e5f3b5ca227f77643aba4c01677cac714d7de Mon Sep 17 00:00:00 2001
From: Balazs Nemeth <bnemeth@redhat.com>
Date: Wed, 23 Dec 2020 15:15:49 +0100
Subject: [PATCH] net/qede: fix promiscuous enable

[ upstream commit a91fb48a8c248293f1035cdd8b36ad712ae9478f ]

When calling rte_eth_promiscuous_enable(port_id) followed by
rte_eth_allmulticast_enable(port_id), the port is not in promisc mode
anymore. This patch ensures that promisc mode takes precedence over
allmulticast mode fixing the regression introduced by b10231aed1ed.

Fixes: b10231aed1ed ("net/qede: fix multicast drop in promiscuous mode")

Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 549013557c..3bec62d828 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1885,6 +1885,8 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
 	    QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC;
 	enum _ecore_status_t ecore_status;
 
+	if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1)
+		type = QED_FILTER_RX_MODE_TYPE_PROMISC;
 	ecore_status = qed_configure_filter_rx_mode(eth_dev, type);
 
 	return ecore_status >= ECORE_SUCCESS ? 0 : -EAGAIN;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.291934194 +0000
+++ 0137-net-qede-fix-promiscuous-enable.patch	2021-02-05 11:18:29.018695148 +0000
@@ -1 +1 @@
-From a91fb48a8c248293f1035cdd8b36ad712ae9478f Mon Sep 17 00:00:00 2001
+From ff1e5f3b5ca227f77643aba4c01677cac714d7de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a91fb48a8c248293f1035cdd8b36ad712ae9478f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/testpmd: fix start index for showing FEC array' 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
                   ` (135 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/qede: fix promiscuous enable' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MPORT related byte order handling' " luca.boccassi
                   ` (137 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Karra Satwik; +Cc: Rahul Lakkireddy, Xiaoyun Li, 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/d616d6687130931cd93d6a8b10b0dbf8e9a0b3a1

Thanks.

Luca Boccassi

---
From d616d6687130931cd93d6a8b10b0dbf8e9a0b3a1 Mon Sep 17 00:00:00 2001
From: Karra Satwik <kaara.satwik@chelsio.com>
Date: Mon, 21 Dec 2020 04:17:01 +0530
Subject: [PATCH] app/testpmd: fix start index for showing FEC array

[ upstream commit 3de0881210ce974c591561da096f33a1e77c3c5f ]

Start from index 0 when going through the FEC array. This will allow
"off" to get printed for RTE_ETH_FEC_NOFEC mode.

Fixes: b19da32e3151 ("app/testpmd: add FEC command")

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3f6c8642b1..a6a5baa4e1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3701,7 +3701,7 @@ show_fec_capability(unsigned int num, struct rte_eth_fec_capa *speed_fec_capa)
 		printf("%s : ",
 			rte_eth_link_speed_to_str(speed_fec_capa[i].speed));
 
-		for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name); j++) {
+		for (j = 0; j < RTE_DIM(fec_mode_name); j++) {
 			if (RTE_ETH_FEC_MODE_TO_CAPA(j) &
 						speed_fec_capa[i].capa)
 				printf("%s ", fec_mode_name[j].name);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.328191858 +0000
+++ 0138-app-testpmd-fix-start-index-for-showing-FEC-array.patch	2021-02-05 11:18:29.022695225 +0000
@@ -1 +1 @@
-From 3de0881210ce974c591561da096f33a1e77c3c5f Mon Sep 17 00:00:00 2001
+From d616d6687130931cd93d6a8b10b0dbf8e9a0b3a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3de0881210ce974c591561da096f33a1e77c3c5f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: fix MPORT related byte order 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
                   ` (136 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix start index for showing FEC array' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec validation helper' " luca.boccassi
                   ` (136 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 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/7e813f306102a74f9655b5cb3d01324fb0f25bb9

Thanks.

Luca Boccassi

---
From 7e813f306102a74f9655b5cb3d01324fb0f25bb9 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 28 Dec 2020 06:00:23 +0300
Subject: [PATCH] common/sfc_efx/base: fix MPORT related byte order handling

[ upstream commit f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f ]

MPORT values derived by helper functions are little-endian.
At the same time, MCDIs which consume these values perform
one more host-order to little-endian conversion internally.

Fix the helper functions to return host-order MPORT values.

Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec")
Fixes: bb024542fffd ("common/sfc_efx/base: add API for adding action drop")
Fixes: 097058033f03 ("common/sfc_efx/base: add API to get mport of PF/VF")

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

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index a54d5f6e6c..22f29d454c 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -593,7 +593,13 @@ efx_mae_mport_by_phy_port(
 	    MAE_MPORT_SELECTOR_PPORT_ID, phy_port);
 
 	memset(mportp, 0, sizeof (*mportp));
-	mportp->sel = dword.ed_u32[0];
+	/*
+	 * The constructed DWORD is little-endian,
+	 * but the resulting value is meant to be
+	 * passed to MCDIs, where it will undergo
+	 * host-order to little endian conversion.
+	 */
+	mportp->sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0);
 
 	return (0);
 
@@ -630,7 +636,13 @@ efx_mae_mport_by_pcie_function(
 	    MAE_MPORT_SELECTOR_FUNC_VF_ID, vf);
 
 	memset(mportp, 0, sizeof (*mportp));
-	mportp->sel = dword.ed_u32[0];
+	/*
+	 * The constructed DWORD is little-endian,
+	 * but the resulting value is meant to be
+	 * passed to MCDIs, where it will undergo
+	 * host-order to little endian conversion.
+	 */
+	mportp->sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0);
 
 	return (0);
 
@@ -1319,7 +1331,13 @@ efx_mae_action_set_populate_drop(
 	EFX_POPULATE_DWORD_1(dword,
 	    MAE_MPORT_SELECTOR_FLAT, MAE_MPORT_SELECTOR_NULL);
 
-	mport.sel = dword.ed_u32[0];
+	/*
+	 * The constructed DWORD is little-endian,
+	 * but the resulting value is meant to be
+	 * passed to MCDIs, where it will undergo
+	 * host-order to little endian conversion.
+	 */
+	mport.sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0);
 
 	arg = (const uint8_t *)&mport.sel;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.374446275 +0000
+++ 0139-common-sfc_efx-base-fix-MPORT-related-byte-order-han.patch	2021-02-05 11:18:29.022695225 +0000
@@ -1 +1 @@
-From f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f Mon Sep 17 00:00:00 2001
+From 7e813f306102a74f9655b5cb3d01324fb0f25bb9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec validation helper' 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
                   ` (137 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MPORT related byte order handling' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec class comparison API' " luca.boccassi
                   ` (135 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 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/df8185a23676498f4da4297c99b0bf2a19691909

Thanks.

Luca Boccassi

---
From df8185a23676498f4da4297c99b0bf2a19691909 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 6 Jan 2021 13:05:59 +0300
Subject: [PATCH] common/sfc_efx/base: fix MAE match spec validation helper

[ upstream commit 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 ]

A particular FW version is aware of some set of match fields.
Depending on FW configuration and match specification type, a
known field may not necessarily be allowed to have a non-zero
mask. FW communicates such restrictions via field capabilities
MCDI. Newer FW may be aware of more fields. For such fields,
older FW simply does not report any capabilities.

A situation may occur when libefx is aware of a match field
which the FW is unaware of (eg., older FW), that is, FW does
not report capability status for this field. In this case,
libefx must consider such field as unsupported and demand
all-zeros mask for it when validating match specifications.

Currently, the helper in question simply exits and reports
that the specification is valid when it encounters a field
with no capability status available. This is clearly wrong.

Introduce the missing check to fix the problem.

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

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

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 22f29d454c..7fd42218f6 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -897,8 +897,17 @@ efx_mae_match_spec_is_valid(
 		if (m_size == 0)
 			continue; /* Skip array gap */
 
-		if ((unsigned int)field_cap_id >= field_ncaps)
-			break;
+		if ((unsigned int)field_cap_id >= field_ncaps) {
+			/*
+			 * The FW has not reported capability status for
+			 * this field. Make sure that its mask is zeroed.
+			 */
+			is_valid = efx_mask_is_all_zeros(m_size, m_buf);
+			if (is_valid != B_FALSE)
+				continue;
+			else
+				break;
+		}
 
 		switch (field_caps[field_cap_id].emfc_support) {
 		case MAE_FIELD_SUPPORTED_MATCH_MASK:
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.413711002 +0000
+++ 0140-common-sfc_efx-base-fix-MAE-match-spec-validation-he.patch	2021-02-05 11:18:29.022695225 +0000
@@ -1 +1 @@
-From 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 Mon Sep 17 00:00:00 2001
+From df8185a23676498f4da4297c99b0bf2a19691909 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec class comparison API' 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
                   ` (138 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec validation helper' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: enhance field ID check in field set " luca.boccassi
                   ` (134 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 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/ccae4e808af42dffdfb7064bb1cd984eda4d22d6

Thanks.

Luca Boccassi

---
From ccae4e808af42dffdfb7064bb1cd984eda4d22d6 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 6 Jan 2021 13:06:00 +0300
Subject: [PATCH] common/sfc_efx/base: fix MAE match spec class comparison API

[ upstream commit 76631541aa2de49562e262af085f9e4afdeb1baf ]

The helper exits once it encounters a field which hasn't its
capability status reported by the FW. Handle the corner case
when the two mask-value pairs match for the field, which, in
the absence of capability information, is sufficient to deem
the class unaffected by the field. Explain this in a comment.

Fixes: bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API")

Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx.h     |  5 +++++
 drivers/common/sfc_efx/base/efx_mae.c | 32 ++++++++++++++++++---------
 2 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 3b40e28b4e..ccf9c7ab8a 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -4283,6 +4283,11 @@ efx_mae_action_set_specs_equal(
  * Conduct a comparison to check whether two match specifications
  * of equal rule type (action / outer) and priority would map to
  * the very same rule class from the firmware's standpoint.
+ *
+ * For match specification fields that are not supported by firmware,
+ * the rule class only matches if the mask/value pairs for that field
+ * are equal. Clients should use efx_mae_match_spec_is_valid() before
+ * calling this API to detect usage of unsupported fields.
  */
 LIBEFX_API
 extern	__checkReturn			efx_rc_t
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 7fd42218f6..eb91753ec5 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -1426,18 +1426,32 @@ efx_mae_match_specs_class_cmp(
 	     ++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 *lmaskp = mvpl + descp->emmd_mask_offset;
+		const uint8_t *rmaskp = mvpr + descp->emmd_mask_offset;
+		size_t mask_size = descp->emmd_mask_size;
+		const uint8_t *lvalp = mvpl + descp->emmd_value_offset;
+		const uint8_t *rvalp = mvpr + descp->emmd_value_offset;
+		size_t value_size = descp->emmd_value_size;
 
-		if (descp->emmd_mask_size == 0)
+		if (mask_size == 0)
 			continue; /* Skip array gap */
 
-		if ((unsigned int)field_cap_id >= field_ncaps)
-			break;
+		if ((unsigned int)field_cap_id >= field_ncaps) {
+			/*
+			 * The FW has not reported capability status for this
+			 * field. It's unknown whether any difference between
+			 * the two masks / values affects the class. The only
+			 * case when the class must be the same is when these
+			 * mask-value pairs match. Otherwise, report mismatch.
+			 */
+			if ((memcmp(lmaskp, rmaskp, mask_size) == 0) &&
+			    (memcmp(lvalp, rvalp, value_size) == 0))
+				continue;
+			else
+				break;
+		}
 
 		if (field_caps[field_cap_id].emfc_mask_affects_class) {
-			const uint8_t *lmaskp = mvpl + descp->emmd_mask_offset;
-			const uint8_t *rmaskp = mvpr + descp->emmd_mask_offset;
-			size_t mask_size = descp->emmd_mask_size;
-
 			if (memcmp(lmaskp, rmaskp, mask_size) != 0) {
 				have_same_class = B_FALSE;
 				break;
@@ -1445,10 +1459,6 @@ efx_mae_match_specs_class_cmp(
 		}
 
 		if (field_caps[field_cap_id].emfc_match_affects_class) {
-			const uint8_t *lvalp = mvpl + descp->emmd_value_offset;
-			const uint8_t *rvalp = mvpr + descp->emmd_value_offset;
-			size_t value_size = descp->emmd_value_size;
-
 			if (memcmp(lvalp, rvalp, value_size) != 0) {
 				have_same_class = B_FALSE;
 				break;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.458044857 +0000
+++ 0141-common-sfc_efx-base-fix-MAE-match-spec-class-compari.patch	2021-02-05 11:18:29.026695300 +0000
@@ -1 +1 @@
-From 76631541aa2de49562e262af085f9e4afdeb1baf Mon Sep 17 00:00:00 2001
+From ccae4e808af42dffdfb7064bb1cd984eda4d22d6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76631541aa2de49562e262af085f9e4afdeb1baf ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: enhance field ID check in field set API' 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
                   ` (139 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec class comparison API' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: fix max Rx packet length check' " luca.boccassi
                   ` (133 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 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/e7fd91ef16c4f092aa5a39a8a871d2054ac53a45

Thanks.

Luca Boccassi

---
From e7fd91ef16c4f092aa5a39a8a871d2054ac53a45 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 6 Jan 2021 13:06:01 +0300
Subject: [PATCH] common/sfc_efx/base: enhance field ID check in field set API

[ upstream commit 5da37ab56e144686e5cc87153c9bd929db7c11b7 ]

A field ID passed to the API may point to a gap in the array
of field descriptors. Turn down such invocations as improper.

Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec")

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

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index eb91753ec5..cc5d8cfc4f 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -690,14 +690,20 @@ efx_mae_match_spec_field_set(
 		goto fail2;
 	}
 
+	if (descp->emmd_mask_size == 0) {
+		/* The ID points to a gap in the array of field descriptors. */
+		rc = EINVAL;
+		goto fail3;
+	}
+
 	if (value_size != descp->emmd_value_size) {
 		rc = EINVAL;
-		goto fail3;
+		goto fail4;
 	}
 
 	if (mask_size != descp->emmd_mask_size) {
 		rc = EINVAL;
-		goto fail4;
+		goto fail5;
 	}
 
 	if (descp->emmd_endianness == EFX_MAE_FIELD_BE) {
@@ -741,6 +747,8 @@ efx_mae_match_spec_field_set(
 
 	return (0);
 
+fail5:
+	EFSYS_PROBE(fail5);
 fail4:
 	EFSYS_PROBE(fail4);
 fail3:
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.603278648 +0000
+++ 0142-common-sfc_efx-base-enhance-field-ID-check-in-field-.patch	2021-02-05 11:18:29.026695300 +0000
@@ -1 +1 @@
-From 5da37ab56e144686e5cc87153c9bd929db7c11b7 Mon Sep 17 00:00:00 2001
+From e7fd91ef16c4f092aa5a39a8a871d2054ac53a45 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5da37ab56e144686e5cc87153c9bd929db7c11b7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'ethdev: fix max Rx packet length 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
                   ` (140 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: enhance field ID check in field set " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' " luca.boccassi
                   ` (132 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/be78a4db33176cc20cea883d2702972ac60aa8b4

Thanks.

Luca Boccassi

---
From be78a4db33176cc20cea883d2702972ac60aa8b4 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:07 +0000
Subject: [PATCH] ethdev: fix max Rx packet length check

[ upstream commit bf0f90d92d3010431c9187ed9a2b412030cded4e ]

Ethdev is using default Ethernet overhead to decide if provided
'max_rx_pkt_len' value is bigger than max (non jumbo) MTU value,
and limits it to MAX if it is.

Since the application/driver used Ethernet overhead is different than
the ethdev one, check result is wrong.

If the driver is using Ethernet overhead bigger than the default one,
the provided 'max_rx_pkt_len' is trimmed down, and in the driver when
correct Ethernet overhead is used to convert back, the resulting MTU is
less than the intended one, causing some packets to be dropped.

Like,
app     -> max_rx_pkt_len = 1500/*mtu*/ + 22/*overhead*/ = 1522
ethdev  -> 1522 > 1518/*MAX*/; max_rx_pkt_len = 1518
driver  -> MTU = 1518 - 22 = 1496
Packets with size 1497-1500 are dropped although intention is to be able
to send/receive them.

The fix is to make ethdev use the correct Ethernet overhead for port,
instead of default one.

Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 17ddacc78d..71e1e9a6db 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1292,8 +1292,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_conf orig_conf;
+	uint16_t overhead_len;
 	int diag;
 	int ret;
+	uint16_t old_mtu;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 
@@ -1319,10 +1321,20 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 		memcpy(&dev->data->dev_conf, dev_conf,
 		       sizeof(dev->data->dev_conf));
 
+	/* Backup mtu for rollback */
+	old_mtu = dev->data->mtu;
+
 	ret = rte_eth_dev_info_get(port_id, &dev_info);
 	if (ret != 0)
 		goto rollback;
 
+	/* Get the real Ethernet overhead length */
+	if (dev_info.max_mtu != UINT16_MAX &&
+	    dev_info.max_rx_pktlen > dev_info.max_mtu)
+		overhead_len = dev_info.max_rx_pktlen - dev_info.max_mtu;
+	else
+		overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
 	/* If number of queues specified by application for both Rx and Tx is
 	 * zero, use driver preferred values. This cannot be done individually
 	 * as it is valid for either Tx or Rx (but not both) to be zero.
@@ -1409,12 +1421,17 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 			ret = -EINVAL;
 			goto rollback;
 		}
+
+		/* Scale the MTU size to adapt max_rx_pkt_len */
+		dev->data->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len -
+				overhead_len;
 	} else {
-		if (dev_conf->rxmode.max_rx_pkt_len < RTE_ETHER_MIN_LEN ||
-			dev_conf->rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN)
+		uint16_t pktlen = dev_conf->rxmode.max_rx_pkt_len;
+		if (pktlen < RTE_ETHER_MIN_MTU + overhead_len ||
+		    pktlen > RTE_ETHER_MTU + overhead_len)
 			/* Use default value */
 			dev->data->dev_conf.rxmode.max_rx_pkt_len =
-							RTE_ETHER_MAX_LEN;
+						RTE_ETHER_MTU + overhead_len;
 	}
 
 	/*
@@ -1549,6 +1566,8 @@ reset_queues:
 	eth_dev_tx_queue_config(dev, 0);
 rollback:
 	memcpy(&dev->data->dev_conf, &orig_conf, sizeof(dev->data->dev_conf));
+	if (old_mtu != dev->data->mtu)
+		dev->data->mtu = old_mtu;
 
 	rte_ethdev_trace_configure(port_id, nb_rx_q, nb_tx_q, dev_conf, 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:35.689108179 +0000
+++ 0143-ethdev-fix-max-Rx-packet-length-check.patch	2021-02-05 11:18:29.030695376 +0000
@@ -1 +1 @@
-From bf0f90d92d3010431c9187ed9a2b412030cded4e Mon Sep 17 00:00:00 2001
+From be78a4db33176cc20cea883d2702972ac60aa8b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf0f90d92d3010431c9187ed9a2b412030cded4e ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index e19dbd838b..9fe1c9d769 100644
+index 17ddacc78d..71e1e9a6db 100644

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

* [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' 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
                   ` (141 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: fix max Rx packet length check' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for MTU set' " luca.boccassi
                   ` (131 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/613019ac4195ba77942ee7c4af5f1a3eaaef01d2

Thanks.

Luca Boccassi

---
From 613019ac4195ba77942ee7c4af5f1a3eaaef01d2 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:08 +0000
Subject: [PATCH] app/testpmd: fix max Rx packet length for VLAN packets

[ upstream commit 761c4d66900fd7db6927f57eb610f543cc0908e4 ]

When the max rx packet length is smaller than the sum of mtu size and
ether overhead size, it should be enlarged, otherwise the VLAN packets
will be dropped.

Removed the rx_offloads assignment for jumbo frame during command line
parsing, and set the correct jumbo frame flag if MTU size is larger than
the default value 'RTE_ETHER_MTU' within 'init_config()'.

Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration")
Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines")
Fixes: ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c    |  6 ------
 app/test-pmd/config.c     |  2 +-
 app/test-pmd/parameters.c |  7 ++-----
 app/test-pmd/testpmd.c    | 18 ++++++++++++++++++
 4 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2ccbaa039e..65042fcff5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1886,7 +1886,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 
 	RTE_ETH_FOREACH_DEV(pid) {
 		struct rte_port *port = &ports[pid];
-		uint64_t rx_offloads = port->dev_conf.rxmode.offloads;
 
 		if (!strcmp(res->name, "max-pkt-len")) {
 			if (res->value < RTE_ETHER_MIN_LEN) {
@@ -1898,11 +1897,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 				return;
 
 			port->dev_conf.rxmode.max_rx_pkt_len = res->value;
-			if (res->value > RTE_ETHER_MAX_LEN)
-				rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
-			else
-				rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-			port->dev_conf.rxmode.offloads = rx_offloads;
 		} else {
 			printf("Unknown parameter\n");
 			return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a6a5baa4e1..0e2b9f7d3c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1434,7 +1434,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
 		 * device supports jumbo frame.
 		 */
 		eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
-		if (mtu > RTE_ETHER_MAX_LEN - eth_overhead) {
+		if (mtu > RTE_ETHER_MTU) {
 			rte_port->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 			rte_port->dev_conf.rxmode.max_rx_pkt_len =
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 414a0068fb..df5eb10d84 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -834,12 +834,9 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
 				n = atoi(optarg);
-				if (n >= RTE_ETHER_MIN_LEN) {
+				if (n >= RTE_ETHER_MIN_LEN)
 					rx_mode.max_rx_pkt_len = (uint32_t) n;
-					if (n > RTE_ETHER_MAX_LEN)
-						rx_offloads |=
-							DEV_RX_OFFLOAD_JUMBO_FRAME;
-				} else
+				else
 					rte_exit(EXIT_FAILURE,
 						 "Invalid max-pkt-len=%d - should be > %d\n",
 						 n, RTE_ETHER_MIN_LEN);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 2b60f6c5d3..c256e719ae 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1410,6 +1410,7 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
+	uint16_t eth_overhead;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1446,6 +1447,23 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
+		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
+		if (port->dev_info.max_mtu != UINT16_MAX &&
+		    port->dev_info.max_rx_pktlen > port->dev_info.max_mtu)
+			eth_overhead = port->dev_info.max_rx_pktlen -
+				port->dev_info.max_mtu;
+		else
+			eth_overhead =
+				RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+		if (port->dev_conf.rxmode.max_rx_pkt_len <=
+			(uint32_t)(RTE_ETHER_MTU + eth_overhead))
+			port->dev_conf.rxmode.max_rx_pkt_len =
+					RTE_ETHER_MTU + eth_overhead;
+		else
+			port->dev_conf.rxmode.offloads |=
+					DEV_RX_OFFLOAD_JUMBO_FRAME;
+
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
 			port->dev_conf.txmode.offloads &=
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.740844898 +0000
+++ 0144-app-testpmd-fix-max-Rx-packet-length-for-VLAN-packet.patch	2021-02-05 11:18:29.046695681 +0000
@@ -1 +1 @@
-From 761c4d66900fd7db6927f57eb610f543cc0908e4 Mon Sep 17 00:00:00 2001
+From 613019ac4195ba77942ee7c4af5f1a3eaaef01d2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 761c4d66900fd7db6927f57eb610f543cc0908e4 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 855dbc2dec..89034c8b72 100644
+index 2ccbaa039e..65042fcff5 100644

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

* [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for 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
                   ` (142 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/dpaa2: " luca.boccassi
                   ` (130 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +Cc: Hemant Agrawal, 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/291718e0cc95e40cde80dbf496a481c62f91950b

Thanks.

Luca Boccassi

---
From 291718e0cc95e40cde80dbf496a481c62f91950b Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:09 +0000
Subject: [PATCH] net/dpaa: fix jumbo frame flag condition for MTU set

[ upstream commit 1d57225d0e6992d3671843cdfc3efe10cf5b068c ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 25f854197abc ("net/dpaa: support jumbo frames")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 2 +-
 drivers/net/dpaa/dpaa_ethdev.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index f00279e004..0c87c136d7 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -184,7 +184,7 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > DPAA_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index 659bceb467..a858b1372c 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -51,6 +51,10 @@
 #define VLAN_TAG_SIZE   4 /** < Vlan Header Length */
 #endif
 
+#define DPAA_ETH_MAX_LEN (RTE_ETHER_MTU + \
+			  RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \
+			  VLAN_TAG_SIZE)
+
 /* PCD frame queues */
 #define DPAA_DEFAULT_NUM_PCD_QUEUES	1
 #define DPAA_VSP_PROFILE_MAX_NUM	8
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.805992963 +0000
+++ 0145-net-dpaa-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.046695681 +0000
@@ -1 +1 @@
-From 1d57225d0e6992d3671843cdfc3efe10cf5b068c Mon Sep 17 00:00:00 2001
+From 291718e0cc95e40cde80dbf496a481c62f91950b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d57225d0e6992d3671843cdfc3efe10cf5b068c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/dpaa2: fix jumbo frame flag condition for 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
                   ` (143 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for MTU set' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
                   ` (129 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +Cc: Hemant Agrawal, 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/b6cf1f01e6e46167a94f7212451e2e3a67096898

Thanks.

Luca Boccassi

---
From b6cf1f01e6e46167a94f7212451e2e3a67096898 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:10 +0000
Subject: [PATCH] net/dpaa2: fix jumbo frame flag condition for MTU set

[ upstream commit 043b57155615f4d046733c0c538bdf720f06f80e ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: e16408499412 ("net/dpaa2: configure jumbo frames")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
 drivers/net/dpaa2/dpaa2_ethdev.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index ab6863300e..6f38da3cce 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1420,7 +1420,7 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	if (mtu < RTE_ETHER_MIN_MTU || frame_size > DPAA2_MAX_RX_PKT_LEN)
 		return -EINVAL;
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > DPAA2_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 8d82f74684..cacb11bd3e 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -26,6 +26,10 @@
 
 #define DPAA2_RX_DEFAULT_NBDESC 512
 
+#define DPAA2_ETH_MAX_LEN (RTE_ETHER_MTU + \
+			   RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \
+			   VLAN_TAG_SIZE)
+
 /*default tc to be used for ,congestion, distribution etc configuration. */
 #define DPAA2_DEF_TC		0
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.850792845 +0000
+++ 0146-net-dpaa2-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.050695758 +0000
@@ -1 +1 @@
-From 043b57155615f4d046733c0c538bdf720f06f80e Mon Sep 17 00:00:00 2001
+From b6cf1f01e6e46167a94f7212451e2e3a67096898 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 043b57155615f4d046733c0c538bdf720f06f80e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/e1000: fix jumbo frame flag condition for 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
                   ` (144 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/dpaa2: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: " luca.boccassi
                   ` (128 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve 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/8e419ba40ca20a9d1df5256eec8e676da408a79e

Thanks.

Luca Boccassi

---
From 8e419ba40ca20a9d1df5256eec8e676da408a79e Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:11 +0000
Subject: [PATCH] net/e1000: fix jumbo frame flag condition for MTU set

[ upstream commit b6c4c94175e8a72b3de9781bff3453a143cd868f ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: ef990fb56e55 ("net/e1000: convert to new Rx offloads API")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/e1000/e1000_ethdev.h | 2 +-
 drivers/net/e1000/em_ethdev.c    | 5 ++---
 drivers/net/e1000/igb_ethdev.c   | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h
index 4755a5f333..3b4d9c3ee6 100644
--- a/drivers/net/e1000/e1000_ethdev.h
+++ b/drivers/net/e1000/e1000_ethdev.h
@@ -97,7 +97,7 @@
  */
 #define E1000_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \
 				VLAN_TAG_SIZE)
-
+#define E1000_ETH_MAX_LEN (RTE_ETHER_MTU + E1000_ETH_OVERHEAD)
 /*
  * Maximum number of Ring Descriptors.
  *
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 8ee9422bf4..2036c6e917 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1799,8 +1799,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	if (ret != 0)
 		return ret;
 
-	frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN +
-		VLAN_TAG_SIZE;
+	frame_size = mtu + E1000_ETH_OVERHEAD;
 
 	/* check that mtu is within the allowed range */
 	if (mtu < RTE_ETHER_MIN_MTU || frame_size > dev_info.max_rx_pktlen)
@@ -1816,7 +1815,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	rctl = E1000_READ_REG(hw, E1000_RCTL);
 
 	/* switch to jumbo mode if needed */
-	if (frame_size > RTE_ETHER_MAX_LEN) {
+	if (frame_size > E1000_ETH_MAX_LEN) {
 		dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 		rctl |= E1000_RCTL_LPE;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 647aa8d995..dfe87508c2 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -4369,7 +4369,7 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	rctl = E1000_READ_REG(hw, E1000_RCTL);
 
 	/* switch to jumbo mode if needed */
-	if (frame_size > RTE_ETHER_MAX_LEN) {
+	if (frame_size > E1000_ETH_MAX_LEN) {
 		dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 		rctl |= E1000_RCTL_LPE;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.890453090 +0000
+++ 0147-net-e1000-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.054695833 +0000
@@ -1 +1 @@
-From b6c4c94175e8a72b3de9781bff3453a143cd868f Mon Sep 17 00:00:00 2001
+From 8e419ba40ca20a9d1df5256eec8e676da408a79e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6c4c94175e8a72b3de9781bff3453a143cd868f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix jumbo frame flag condition for 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
                   ` (145 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/i40e: fix jumbo frame flag condition' " luca.boccassi
                   ` (127 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/825fcdb26dd57849331d68fb3d88c57b0714e5d3

Thanks.

Luca Boccassi

---
From 825fcdb26dd57849331d68fb3d88c57b0714e5d3 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:12 +0000
Subject: [PATCH] net/hns3: fix jumbo frame flag condition for MTU set

[ upstream commit 3ec35c64be8f93619a04e725bf4af9ecb5329ef0 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'HSN3_DEFAULT_FRAME_LEN',
that perhaps impacts the cases of the jumbo frame related.

Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 2 +-
 drivers/net/hns3/hns3_ethdev_vf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 3f6ba61a37..03d6df716d 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2458,7 +2458,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	}
 
 	rte_spinlock_lock(&hw->lock);
-	is_jumbo_frame = frame_size > RTE_ETHER_MAX_LEN ? true : false;
+	is_jumbo_frame = frame_size > HNS3_DEFAULT_FRAME_LEN ? true : false;
 	frame_size = RTE_MAX(frame_size, HNS3_DEFAULT_FRAME_LEN);
 
 	/*
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 0366b9d4dc..d47af417bf 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -928,7 +928,7 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		rte_spinlock_unlock(&hw->lock);
 		return ret;
 	}
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (mtu > RTE_ETHER_MTU)
 		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.933267946 +0000
+++ 0148-net-hns3-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.058695910 +0000
@@ -1 +1 @@
-From 3ec35c64be8f93619a04e725bf4af9ecb5329ef0 Mon Sep 17 00:00:00 2001
+From 825fcdb26dd57849331d68fb3d88c57b0714e5d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ec35c64be8f93619a04e725bf4af9ecb5329ef0 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 90544fe328..bf633a3d71 100644
+index 3f6ba61a37..03d6df716d 100644
@@ -29 +30 @@
-@@ -2467,7 +2467,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2458,7 +2458,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -39 +40 @@
-index f09cabcd82..ef03fb1c4e 100644
+index 0366b9d4dc..d47af417bf 100644

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

* [dpdk-stable] patch 'net/i40e: fix jumbo frame flag 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
                   ` (146 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
                   ` (126 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve 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/e4eafd1fe30bd40ebef6d4392868289b1ff102f1

Thanks.

Luca Boccassi

---
From e4eafd1fe30bd40ebef6d4392868289b1ff102f1 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:13 +0000
Subject: [PATCH] net/i40e: fix jumbo frame flag condition

[ upstream commit c12f0976cb2e915ab7c93a46310ba826ffb5496b ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: c1715402df8f ("i40evf: fix jumbo frame support")
Fixes: 43e5488c0ac6 ("net/i40e: support MTU configuration")
Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Fixes: c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    |  2 +-
 drivers/net/i40e/i40e_ethdev.h    |  1 +
 drivers/net/i40e/i40e_ethdev_vf.c | 10 +++++-----
 drivers/net/i40e/i40e_fdir.c      |  2 +-
 drivers/net/i40e/i40e_rxtx.c      |  8 ++++----
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 213fb99ca9..ef4f28fe53 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11782,7 +11782,7 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > I40E_ETH_MAX_LEN)
 		dev_data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index aac226999c..20d051db8b 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -281,6 +281,7 @@ struct rte_flow {
  */
 #define I40E_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2)
+#define I40E_ETH_MAX_LEN (RTE_ETHER_MTU + I40E_ETH_OVERHEAD)
 
 #define I40E_RXTX_BYTES_H_16_BIT(bytes) ((bytes) & ~I40E_48_BIT_MASK)
 #define I40E_RXTX_BYTES_L_48_BIT(bytes) ((bytes) & I40E_48_BIT_MASK)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index dc076ae552..bca8cb80e4 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1899,22 +1899,22 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
 	 * Check if the jumbo frame and maximum packet length are set correctly
 	 */
 	if (dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (rxq->max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (rxq->max_pkt_len <= I40E_ETH_MAX_LEN ||
 		    rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				"larger than %u and smaller than %u, as jumbo "
-				"frame is enabled", (uint32_t)RTE_ETHER_MAX_LEN,
+				"frame is enabled", (uint32_t)I40E_ETH_MAX_LEN,
 					(uint32_t)I40E_FRAME_SIZE_MAX);
 			return I40E_ERR_CONFIG;
 		}
 	} else {
 		if (rxq->max_pkt_len < RTE_ETHER_MIN_LEN ||
-		    rxq->max_pkt_len > RTE_ETHER_MAX_LEN) {
+		    rxq->max_pkt_len > I40E_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				"larger than %u and smaller than %u, as jumbo "
 				"frame is disabled",
 				(uint32_t)RTE_ETHER_MIN_LEN,
-				(uint32_t)RTE_ETHER_MAX_LEN);
+				(uint32_t)I40E_ETH_MAX_LEN);
 			return I40E_ERR_CONFIG;
 		}
 	}
@@ -2836,7 +2836,7 @@ i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > I40E_ETH_MAX_LEN)
 		dev_data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 0343e8b09a..f5defcf585 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -116,7 +116,7 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)
 #endif
 	rx_ctx.dtype = i40e_header_split_none;
 	rx_ctx.hsplit_0 = I40E_HEADER_SPLIT_NONE;
-	rx_ctx.rxmax = RTE_ETHER_MAX_LEN;
+	rx_ctx.rxmax = I40E_ETH_MAX_LEN;
 	rx_ctx.tphrdesc_ena = 1;
 	rx_ctx.tphwdesc_ena = 1;
 	rx_ctx.tphdata_ena = 1;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 5df9a9df56..b8859bbff2 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2797,23 +2797,23 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
 		RTE_MIN((uint32_t)(hw->func_caps.rx_buf_chain_len *
 			rxq->rx_buf_len), data->dev_conf.rxmode.max_rx_pkt_len);
 	if (data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (rxq->max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (rxq->max_pkt_len <= I40E_ETH_MAX_LEN ||
 			rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must "
 				    "be larger than %u and smaller than %u,"
 				    "as jumbo frame is enabled",
-				    (uint32_t)RTE_ETHER_MAX_LEN,
+				    (uint32_t)I40E_ETH_MAX_LEN,
 				    (uint32_t)I40E_FRAME_SIZE_MAX);
 			return I40E_ERR_CONFIG;
 		}
 	} else {
 		if (rxq->max_pkt_len < RTE_ETHER_MIN_LEN ||
-			rxq->max_pkt_len > RTE_ETHER_MAX_LEN) {
+			rxq->max_pkt_len > I40E_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is disabled",
 				    (uint32_t)RTE_ETHER_MIN_LEN,
-				    (uint32_t)RTE_ETHER_MAX_LEN);
+				    (uint32_t)I40E_ETH_MAX_LEN);
 			return I40E_ERR_CONFIG;
 		}
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.983420719 +0000
+++ 0149-net-i40e-fix-jumbo-frame-flag-condition.patch	2021-02-05 11:18:29.074696214 +0000
@@ -1 +1 @@
-From c12f0976cb2e915ab7c93a46310ba826ffb5496b Mon Sep 17 00:00:00 2001
+From e4eafd1fe30bd40ebef6d4392868289b1ff102f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c12f0976cb2e915ab7c93a46310ba826ffb5496b ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 42987c5dab..946994b80a 100644
+index 213fb99ca9..ef4f28fe53 100644
@@ -34 +35 @@
-@@ -11687,7 +11687,7 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -11782,7 +11782,7 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -44 +45 @@
-index cd484710b0..1e8f5d3a87 100644
+index aac226999c..20d051db8b 100644
@@ -47 +48 @@
-@@ -283,6 +283,7 @@ struct rte_flow {
+@@ -281,6 +281,7 @@ struct rte_flow {
@@ -56 +57 @@
-index 346ec29cbe..5d7db7fe13 100644
+index dc076ae552..bca8cb80e4 100644
@@ -59 +60 @@
-@@ -1900,22 +1900,22 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
+@@ -1899,22 +1899,22 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
@@ -86 +87 @@
-@@ -2837,7 +2837,7 @@ i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2836,7 +2836,7 @@ i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -109 +110 @@
-index 3574867685..1ae62d4334 100644
+index 5df9a9df56..b8859bbff2 100644
@@ -112 +113 @@
-@@ -2845,23 +2845,23 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
+@@ -2797,23 +2797,23 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/iavf: fix jumbo frame flag 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
                   ` (147 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/i40e: fix jumbo frame flag condition' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ice: " luca.boccassi
                   ` (125 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/625dcdf1c9db8c0ecdde31e057c4a257431d1c06

Thanks.

Luca Boccassi

---
From 625dcdf1c9db8c0ecdde31e057c4a257431d1c06 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:14 +0000
Subject: [PATCH] net/iavf: fix jumbo frame flag condition

[ upstream commit 7abd466423c356dfc45e1046c009f23ce0b02c49 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 3fd7a3719c66 ("net/avf: enable ops for MTU setting")
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/iavf/iavf.h        |  1 +
 drivers/net/iavf/iavf_ethdev.c | 10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 6d5912d8c1..3328bd9327 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -66,6 +66,7 @@
 #define IAVF_VLAN_TAG_SIZE               4
 #define IAVF_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + IAVF_VLAN_TAG_SIZE * 2)
+#define IAVF_ETH_MAX_LEN (RTE_ETHER_MTU + IAVF_ETH_OVERHEAD)
 
 #define IAVF_32_BIT_WIDTH (CHAR_BIT * 4)
 #define IAVF_48_BIT_WIDTH (CHAR_BIT * 6)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index f0151215e6..2a8b47c127 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -420,23 +420,23 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
 	 * correctly.
 	 */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (max_pkt_len <= IAVF_ETH_MAX_LEN ||
 		    max_pkt_len > IAVF_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is enabled",
-				    (uint32_t)RTE_ETHER_MAX_LEN,
+				    (uint32_t)IAVF_ETH_MAX_LEN,
 				    (uint32_t)IAVF_FRAME_SIZE_MAX);
 			return -EINVAL;
 		}
 	} else {
 		if (max_pkt_len < RTE_ETHER_MIN_LEN ||
-		    max_pkt_len > RTE_ETHER_MAX_LEN) {
+		    max_pkt_len > IAVF_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is disabled",
 				    (uint32_t)RTE_ETHER_MIN_LEN,
-				    (uint32_t)RTE_ETHER_MAX_LEN);
+				    (uint32_t)IAVF_ETH_MAX_LEN);
 			return -EINVAL;
 		}
 	}
@@ -1169,7 +1169,7 @@ iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > IAVF_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |=
 				DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.042705245 +0000
+++ 0150-net-iavf-fix-jumbo-frame-flag-condition.patch	2021-02-05 11:18:29.078696291 +0000
@@ -1 +1 @@
-From 7abd466423c356dfc45e1046c009f23ce0b02c49 Mon Sep 17 00:00:00 2001
+From 625dcdf1c9db8c0ecdde31e057c4a257431d1c06 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7abd466423c356dfc45e1046c009f23ce0b02c49 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index af11268fe3..c934d2e614 100644
+index 6d5912d8c1..3328bd9327 100644
@@ -29 +30 @@
-@@ -73,6 +73,7 @@
+@@ -66,6 +66,7 @@
@@ -38 +39 @@
-index 87e6062737..871c3ed126 100644
+index f0151215e6..2a8b47c127 100644
@@ -41 +42 @@
-@@ -460,23 +460,23 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
+@@ -420,23 +420,23 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
@@ -69 +70 @@
-@@ -1303,7 +1303,7 @@ iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1169,7 +1169,7 @@ iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/ice: fix jumbo frame flag 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
                   ` (148 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for MTU set' " luca.boccassi
                   ` (124 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/54fcc7ffdabf42cd7d0816f01c78fe3564bb1cc1

Thanks.

Luca Boccassi

---
From 54fcc7ffdabf42cd7d0816f01c78fe3564bb1cc1 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:15 +0000
Subject: [PATCH] net/ice: fix jumbo frame flag condition

[ upstream commit 14801aa3fb3587347c739d6e55afdbe130f319be ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF")
Fixes: ae2bdd0219cb ("net/ice: support MTU setting")
Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c |  8 ++++----
 drivers/net/ice/ice_ethdev.c     |  2 +-
 drivers/net/ice/ice_ethdev.h     |  1 +
 drivers/net/ice/ice_rxtx.c       | 10 +++++-----
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index b0b2ecb0d6..e5c877805f 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -60,23 +60,23 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
 	 * correctly.
 	 */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (max_pkt_len <= ICE_ETH_MAX_LEN ||
 		    max_pkt_len > ICE_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is enabled",
-				    (uint32_t)RTE_ETHER_MAX_LEN,
+				    (uint32_t)ICE_ETH_MAX_LEN,
 				    (uint32_t)ICE_FRAME_SIZE_MAX);
 			return -EINVAL;
 		}
 	} else {
 		if (max_pkt_len < RTE_ETHER_MIN_LEN ||
-		    max_pkt_len > RTE_ETHER_MAX_LEN) {
+		    max_pkt_len > ICE_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is disabled",
 				    (uint32_t)RTE_ETHER_MIN_LEN,
-				    (uint32_t)RTE_ETHER_MAX_LEN);
+				    (uint32_t)ICE_ETH_MAX_LEN);
 			return -EINVAL;
 		}
 	}
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 4dcaa87350..70e5f74b2f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3912,7 +3912,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > ICE_ETH_MAX_LEN)
 		dev_data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 899f446cde..2b03c59671 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -135,6 +135,7 @@
  */
 #define ICE_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + ICE_VLAN_TAG_SIZE * 2)
+#define ICE_ETH_MAX_LEN (RTE_ETHER_MTU + ICE_ETH_OVERHEAD)
 
 #define ICE_RXTX_BYTES_HIGH(bytes) ((bytes) & ~ICE_40_BIT_MASK)
 #define ICE_RXTX_BYTES_LOW(bytes) ((bytes) & ICE_40_BIT_MASK)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index d052bd0f1b..c98328ce0b 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -246,23 +246,23 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
 				   dev->data->dev_conf.rxmode.max_rx_pkt_len);
 
 	if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (rxq->max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (rxq->max_pkt_len <= ICE_ETH_MAX_LEN ||
 		    rxq->max_pkt_len > ICE_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must "
 				    "be larger than %u and smaller than %u,"
 				    "as jumbo frame is enabled",
-				    (uint32_t)RTE_ETHER_MAX_LEN,
+				    (uint32_t)ICE_ETH_MAX_LEN,
 				    (uint32_t)ICE_FRAME_SIZE_MAX);
 			return -EINVAL;
 		}
 	} else {
 		if (rxq->max_pkt_len < RTE_ETHER_MIN_LEN ||
-		    rxq->max_pkt_len > RTE_ETHER_MAX_LEN) {
+		    rxq->max_pkt_len > ICE_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is disabled",
 				    (uint32_t)RTE_ETHER_MIN_LEN,
-				    (uint32_t)RTE_ETHER_MAX_LEN);
+				    (uint32_t)ICE_ETH_MAX_LEN);
 			return -EINVAL;
 		}
 	}
@@ -701,7 +701,7 @@ ice_fdir_program_hw_rx_queue(struct ice_rx_queue *rxq)
 	rx_ctx.hbuf = rxq->rx_hdr_len >> ICE_RLAN_CTX_HBUF_S;
 	rx_ctx.dtype = 0; /* No Header Split mode */
 	rx_ctx.dsize = 1; /* 32B descriptors */
-	rx_ctx.rxmax = RTE_ETHER_MAX_LEN;
+	rx_ctx.rxmax = ICE_ETH_MAX_LEN;
 	/* TPH: Transaction Layer Packet (TLP) processing hints */
 	rx_ctx.tphrdesc_ena = 1;
 	rx_ctx.tphwdesc_ena = 1;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.081911263 +0000
+++ 0151-net-ice-fix-jumbo-frame-flag-condition.patch	2021-02-05 11:18:29.086696443 +0000
@@ -1 +1 @@
-From 14801aa3fb3587347c739d6e55afdbe130f319be Mon Sep 17 00:00:00 2001
+From 54fcc7ffdabf42cd7d0816f01c78fe3564bb1cc1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 14801aa3fb3587347c739d6e55afdbe130f319be ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index a9e78064d4..d46734a57b 100644
+index b0b2ecb0d6..e5c877805f 100644
@@ -62 +63 @@
-index 7cee541112..ec29f0fe40 100644
+index 4dcaa87350..70e5f74b2f 100644
@@ -65 +66 @@
-@@ -3913,7 +3913,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -3912,7 +3912,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -87 +88 @@
-index 2d3dd05c2f..7286e3a445 100644
+index d052bd0f1b..c98328ce0b 100644
@@ -90 +91 @@
-@@ -272,23 +272,23 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -246,23 +246,23 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -118 +119 @@
-@@ -727,7 +727,7 @@ ice_fdir_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -701,7 +701,7 @@ ice_fdir_program_hw_rx_queue(struct ice_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for 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
                   ` (149 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ice: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/octeontx: " luca.boccassi
                   ` (123 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +Cc: Rosen Xu, 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/1cad5abaa6b8a5f6391a8fc6e2c4bd21c676e940

Thanks.

Luca Boccassi

---
From 1cad5abaa6b8a5f6391a8fc6e2c4bd21c676e940 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:16 +0000
Subject: [PATCH] net/ipn3ke: fix jumbo frame flag condition for MTU set

[ upstream commit 6f4edbadeabb0a5204de972df99607046e79e77c ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/net/ipn3ke/ipn3ke_ethdev.h      | 1 +
 drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h
index 9b0cf309c8..a6815a9cca 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.h
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h
@@ -640,6 +640,7 @@ ipn3ke_tm_ops_get(struct rte_eth_dev *ethdev,
  */
 #define IPN3KE_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + IPN3KE_VLAN_TAG_SIZE * 2)
+#define IPN3KE_ETH_MAX_LEN (RTE_ETHER_MTU + IPN3KE_ETH_OVERHEAD)
 
 #define IPN3KE_MAC_FRAME_SIZE_MAX    9728
 #define IPN3KE_MAC_RX_FRAME_MAXLENGTH    0x00AE
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 8a53602576..9e15cce34f 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2801,7 +2801,7 @@ ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > IPN3KE_ETH_MAX_LEN)
 		dev_data->dev_conf.rxmode.offloads |=
 			(uint64_t)(DEV_RX_OFFLOAD_JUMBO_FRAME);
 	else
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.130432469 +0000
+++ 0152-net-ipn3ke-fix-jumbo-frame-flag-condition-for-MTU-se.patch	2021-02-05 11:18:29.086696443 +0000
@@ -1 +1 @@
-From 6f4edbadeabb0a5204de972df99607046e79e77c Mon Sep 17 00:00:00 2001
+From 1cad5abaa6b8a5f6391a8fc6e2c4bd21c676e940 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f4edbadeabb0a5204de972df99607046e79e77c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/octeontx: fix jumbo frame flag condition for 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
                   ` (150 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for MTU set' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' " luca.boccassi
                   ` (122 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, 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/d077817ac65df8fc9604f9c843e27b7fd8365166

Thanks.

Luca Boccassi

---
From d077817ac65df8fc9604f9c843e27b7fd8365166 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:17 +0000
Subject: [PATCH] net/octeontx: fix jumbo frame flag condition for MTU set

[ upstream commit e6ad69e40f17063b5b9526399610b70deb6c09db ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 3151e6a687a3 ("net/octeontx: support MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 2 +-
 drivers/net/octeontx/octeontx_ethdev.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 3ee7b043fd..81779885d5 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -552,7 +552,7 @@ octeontx_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	if (rc)
 		return rc;
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > OCCTX_L2_MAX_LEN)
 		nic->rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		nic->rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h
index 7246fb6d1d..780a094ffa 100644
--- a/drivers/net/octeontx/octeontx_ethdev.h
+++ b/drivers/net/octeontx/octeontx_ethdev.h
@@ -44,6 +44,7 @@
 /* ETH_HLEN+ETH_FCS+2*VLAN_HLEN */
 #define OCCTX_L2_OVERHEAD	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \
 				 OCCTX_MAX_VTAG_ACT_SIZE)
+#define OCCTX_L2_MAX_LEN	(RTE_ETHER_MTU + OCCTX_L2_OVERHEAD)
 
 /* Since HW FRS includes NPC VTAG insertion space, user has reduced FRS */
 #define OCCTX_MAX_FRS	\
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.171701055 +0000
+++ 0153-net-octeontx-fix-jumbo-frame-flag-condition-for-MTU-.patch	2021-02-05 11:18:29.090696519 +0000
@@ -1 +1 @@
-From e6ad69e40f17063b5b9526399610b70deb6c09db Mon Sep 17 00:00:00 2001
+From d077817ac65df8fc9604f9c843e27b7fd8365166 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6ad69e40f17063b5b9526399610b70deb6c09db ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' 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
                   ` (151 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/octeontx: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for MTU set' " luca.boccassi
                   ` (121 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/297cbb21e3659824caa835830d8e0b7a0464529b

Thanks.

Luca Boccassi

---
From 297cbb21e3659824caa835830d8e0b7a0464529b Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:18 +0000
Subject: [PATCH] net/octeontx2: fix jumbo frame flag condition for MTU

[ upstream commit 3a921cd69bdbf39ba2a17af0c01f0000c6efb893 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 0e2efd02db58 ("net/octeontx2: add MTU set operation")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.h     | 2 ++
 drivers/net/octeontx2/otx2_ethdev_ops.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 3b9871f4dc..99f0469d89 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -51,6 +51,8 @@
 /* ETH_HLEN+ETH_FCS+2*VLAN_HLEN */
 #define NIX_L2_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + 8)
+#define NIX_L2_MAX_LEN \
+	(RTE_ETHER_MTU + NIX_L2_OVERHEAD)
 
 /* HW config of frame size doesn't include FCS */
 #define NIX_MAX_HW_FRS			9212
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index b36d37b9f7..963cc285ed 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -58,7 +58,7 @@ otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	if (rc)
 		return rc;
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > NIX_L2_MAX_LEN)
 		dev->rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		dev->rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.209650038 +0000
+++ 0154-net-octeontx2-fix-jumbo-frame-flag-condition-for-MTU.patch	2021-02-05 11:18:29.090696519 +0000
@@ -1 +1 @@
-From 3a921cd69bdbf39ba2a17af0c01f0000c6efb893 Mon Sep 17 00:00:00 2001
+From 297cbb21e3659824caa835830d8e0b7a0464529b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a921cd69bdbf39ba2a17af0c01f0000c6efb893 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for 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
                   ` (152 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/sfc: " luca.boccassi
                   ` (120 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/e51e0295b6ed6357d541238b4d55f64dfd6eac66

Thanks.

Luca Boccassi

---
From e51e0295b6ed6357d541238b4d55f64dfd6eac66 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:19 +0000
Subject: [PATCH] net/qede: fix jumbo frame flag condition for MTU set

[ upstream commit f9a69f8b5e94cae87d96ca5c160261687e0b9ec2 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 200645ac7909 ("net/qede: set MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/qede/qede_ethdev.c | 2 +-
 drivers/net/qede/qede_rxtx.h   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 3bec62d828..ab5f5b1065 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2369,7 +2369,7 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 			fp->rxq->rx_buf_size = rc;
 		}
 	}
-	if (max_rx_pkt_len > RTE_ETHER_MAX_LEN)
+	if (frame_size > QEDE_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		dev->data->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
index d7ff870b20..fcb564a1bb 100644
--- a/drivers/net/qede/qede_rxtx.h
+++ b/drivers/net/qede/qede_rxtx.h
@@ -71,6 +71,7 @@
 				 + (QEDE_LLC_SNAP_HDR_LEN) + 2)
 
 #define QEDE_MAX_ETHER_HDR_LEN	(RTE_ETHER_HDR_LEN + QEDE_ETH_OVERHEAD)
+#define QEDE_ETH_MAX_LEN	(RTE_ETHER_MTU + QEDE_MAX_ETHER_HDR_LEN)
 
 #define QEDE_RSS_OFFLOAD_ALL    (ETH_RSS_IPV4			|\
 				 ETH_RSS_NONFRAG_IPV4_TCP	|\
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.250254819 +0000
+++ 0155-net-qede-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.090696519 +0000
@@ -1 +1 @@
-From f9a69f8b5e94cae87d96ca5c160261687e0b9ec2 Mon Sep 17 00:00:00 2001
+From e51e0295b6ed6357d541238b4d55f64dfd6eac66 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f9a69f8b5e94cae87d96ca5c160261687e0b9ec2 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/sfc: fix jumbo frame flag condition for 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
                   ` (153 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for MTU set' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/thunderx: " luca.boccassi
                   ` (119 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/b026826262e2f2ac49bd7bde50b41aad80482b5f

Thanks.

Luca Boccassi

---
From b026826262e2f2ac49bd7bde50b41aad80482b5f Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:20 +0000
Subject: [PATCH] net/sfc: fix jumbo frame flag condition for MTU set

[ upstream commit 7910fd21211f402aac7b7e7d4b6d70f224f0f9be ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU',
that perhaps impacts the cases of the jumbo frame related.

Fixes: ff6a1197c3b1 ("net/sfc: convert to new Rx offload API")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/sfc/sfc_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 93fc7baa0d..f2f5336435 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1017,7 +1017,7 @@ sfc_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	 * The driver does not use it, but other PMDs update jumbo frame
 	 * flag and max_rx_pkt_len when MTU is set.
 	 */
-	if (mtu > RTE_ETHER_MAX_LEN) {
+	if (mtu > RTE_ETHER_MTU) {
 		struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 		rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.287271907 +0000
+++ 0156-net-sfc-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.094696595 +0000
@@ -1 +1 @@
-From 7910fd21211f402aac7b7e7d4b6d70f224f0f9be Mon Sep 17 00:00:00 2001
+From b026826262e2f2ac49bd7bde50b41aad80482b5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7910fd21211f402aac7b7e7d4b6d70f224f0f9be ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/thunderx: fix jumbo frame flag condition for 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
                   ` (154 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/sfc: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ixgbe: fix jumbo frame flag condition' " luca.boccassi
                   ` (118 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/698666b4988f60471ae8dd55b7fb751672a7f0ac

Thanks.

Luca Boccassi

---
From 698666b4988f60471ae8dd55b7fb751672a7f0ac Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:21 +0000
Subject: [PATCH] net/thunderx: fix jumbo frame flag condition for MTU set

[ upstream commit d2869184ae39d2773df12d1f7a0b96e5fb2d4ed4 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 65d9804edc05 ("net/thunderx: support MTU configuration")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/thunderx/base/nicvf_hw_defs.h | 1 +
 drivers/net/thunderx/nicvf_ethdev.c       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/thunderx/base/nicvf_hw_defs.h b/drivers/net/thunderx/base/nicvf_hw_defs.h
index b12c8ec50a..adc8ec943d 100644
--- a/drivers/net/thunderx/base/nicvf_hw_defs.h
+++ b/drivers/net/thunderx/base/nicvf_hw_defs.h
@@ -176,6 +176,7 @@
 #define NIC_HW_MAX_MTU                  (9190)
 #define NIC_HW_MAX_FRS                  (NIC_HW_MAX_MTU + NIC_HW_L2_OVERHEAD)
 #define NIC_HW_MAX_SEGS                 (12)
+#define NIC_HW_L2_MAX_LEN		(RTE_ETHER_MTU + NIC_HW_L2_OVERHEAD)
 
 /* Descriptor alignments */
 #define NICVF_RBDR_BASE_ALIGN_BYTES     (128) /* 7 bits */
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index b6bb05e500..c2e7c334d4 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -176,7 +176,7 @@ nicvf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 		(frame_size + 2 * VLAN_TAG_SIZE > buffsz * NIC_HW_MAX_SEGS))
 		return -EINVAL;
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > NIC_HW_L2_MAX_LEN)
 		rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		rxmode->offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.332147620 +0000
+++ 0157-net-thunderx-fix-jumbo-frame-flag-condition-for-MTU-.patch	2021-02-05 11:18:29.094696595 +0000
@@ -1 +1 @@
-From d2869184ae39d2773df12d1f7a0b96e5fb2d4ed4 Mon Sep 17 00:00:00 2001
+From 698666b4988f60471ae8dd55b7fb751672a7f0ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d2869184ae39d2773df12d1f7a0b96e5fb2d4ed4 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ixgbe: fix jumbo frame flag 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
                   ` (155 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/thunderx: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/cxgbe: " luca.boccassi
                   ` (117 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve 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/3d98b60dab993ef5103a11aa2912c005f8bb6817

Thanks.

Luca Boccassi

---
From 3d98b60dab993ef5103a11aa2912c005f8bb6817 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:22 +0000
Subject: [PATCH] net/ixgbe: fix jumbo frame flag condition

[ upstream commit 48554c7db7eaef9b7c69f7ad8dd60fe53e78fbde ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors")
Fixes: 95a27b3ba5f5 ("net/ixgbe: enable jumbo frame for VF")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 drivers/net/ixgbe/ixgbe_ethdev.h | 3 +++
 drivers/net/ixgbe/ixgbe_pf.c     | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d7a1806ab8..fa0f5afd03 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5173,7 +5173,7 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);
 
 	/* switch to jumbo mode if needed */
-	if (frame_size > RTE_ETHER_MAX_LEN) {
+	if (frame_size > IXGBE_ETH_MAX_LEN) {
 		dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 		hlreg0 |= IXGBE_HLREG0_JUMBOEN;
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 3d35ea791b..a0ce18ca24 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -104,6 +104,9 @@
 /* The overhead from MTU to max frame size. */
 #define IXGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
 
+/* The max frame size with default MTU */
+#define IXGBE_ETH_MAX_LEN  (RTE_ETHER_MTU + IXGBE_ETH_OVERHEAD)
+
 /* bit of VXLAN tunnel type | 7 bits of zeros  | 8 bits of zeros*/
 #define IXGBE_FDIR_VXLAN_TUNNEL_TYPE    0x8000
 /* bit of NVGRE tunnel type | 7 bits of zeros  | 8 bits of zeros*/
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 833863af5a..89698e8470 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -575,7 +575,7 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *ms
 		   IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT;
 	if (max_frs < new_mtu) {
 		hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);
-		if (new_mtu > RTE_ETHER_MAX_LEN) {
+		if (new_mtu > IXGBE_ETH_MAX_LEN) {
 			dev->data->dev_conf.rxmode.offloads |=
 				DEV_RX_OFFLOAD_JUMBO_FRAME;
 			hlreg0 |= IXGBE_HLREG0_JUMBOEN;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.377806590 +0000
+++ 0158-net-ixgbe-fix-jumbo-frame-flag-condition.patch	2021-02-05 11:18:29.102696747 +0000
@@ -1 +1 @@
-From 48554c7db7eaef9b7c69f7ad8dd60fe53e78fbde Mon Sep 17 00:00:00 2001
+From 3d98b60dab993ef5103a11aa2912c005f8bb6817 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48554c7db7eaef9b7c69f7ad8dd60fe53e78fbde ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 97acf35d24..c8b9ec8c11 100644
+index d7a1806ab8..fa0f5afd03 100644
@@ -30 +31 @@
-@@ -5174,7 +5174,7 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -5173,7 +5173,7 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/cxgbe: fix jumbo frame flag 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
                   ` (156 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ixgbe: fix jumbo frame flag condition' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/axgbe: fix jumbo frame flag condition for MTU set' " luca.boccassi
                   ` (116 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/9326ad37af4c1c8876e71b09234e57967666d581

Thanks.

Luca Boccassi

---
From 9326ad37af4c1c8876e71b09234e57967666d581 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:23 +0000
Subject: [PATCH] net/cxgbe: fix jumbo frame flag condition

[ upstream commit 5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 4b2eff452d2e ("cxgbe: enable jumbo frames")
Fixes: 0ec33be4c857 ("cxgbe: allow to change mtu")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/cxgbe/cxgbe.h        | 4 ++++
 drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index ef62af1c3f..7c89a028bf 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -19,6 +19,10 @@
 #define CXGBE_MAX_RX_PKTLEN (9000 + RTE_ETHER_HDR_LEN + \
 				RTE_ETHER_CRC_LEN) /* max pkt */
 
+/* The max frame size with default MTU */
+#define CXGBE_ETH_MAX_LEN (RTE_ETHER_MTU + \
+		RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
+
 /* Max poll time is 100 * 100msec = 10 sec */
 #define CXGBE_LINK_STATUS_POLL_MS 100 /* 100ms */
 #define CXGBE_LINK_STATUS_POLL_CNT 100 /* Max number of times to poll */
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 98d0362fa3..480d6f58a8 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -300,7 +300,7 @@ int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 		return -EINVAL;
 
 	/* set to jumbo mode if needed */
-	if (new_mtu > RTE_ETHER_MAX_LEN)
+	if (new_mtu > CXGBE_ETH_MAX_LEN)
 		eth_dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
@@ -669,7 +669,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 		rxq->fl.size = temp_nb_desc;
 
 	/* Set to jumbo mode if necessary */
-	if (pkt_len > RTE_ETHER_MAX_LEN)
+	if (pkt_len > CXGBE_ETH_MAX_LEN)
 		eth_dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.420344213 +0000
+++ 0159-net-cxgbe-fix-jumbo-frame-flag-condition.patch	2021-02-05 11:18:29.106696824 +0000
@@ -1 +1 @@
-From 5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa Mon Sep 17 00:00:00 2001
+From 9326ad37af4c1c8876e71b09234e57967666d581 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -41 +42 @@
-index eb4258fe17..cfa385bab7 100644
+index 98d0362fa3..480d6f58a8 100644
@@ -44 +45 @@
-@@ -301,7 +301,7 @@ int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -300,7 +300,7 @@ int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
@@ -53 +54 @@
-@@ -670,7 +670,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
+@@ -669,7 +669,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/axgbe: fix jumbo frame flag condition for 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
                   ` (157 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/cxgbe: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/enetc: " luca.boccassi
                   ` (115 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/9075d36723329aacb57d8b006d059bbaa7bcfe17

Thanks.

Luca Boccassi

---
From 9075d36723329aacb57d8b006d059bbaa7bcfe17 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:24 +0000
Subject: [PATCH] net/axgbe: fix jumbo frame flag condition for MTU set

[ upstream commit 2570c033579aa8bf51bd995d8c4df8c3e3966386 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: b58d8781fa1f ("net/axgbe: support setting MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 2 +-
 drivers/net/axgbe/axgbe_ethdev.h | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index cfe6aba73a..9cd056d04a 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -1439,7 +1439,7 @@ static int axgb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 				dev->data->port_id);
 		return -EBUSY;
 	}
-	if (frame_size > RTE_ETHER_MAX_LEN) {
+	if (frame_size > AXGBE_ETH_MAX_LEN) {
 		dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 		val = 1;
diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index 35a8476466..ac9210f2c8 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -125,6 +125,12 @@
 /* MDIO port types */
 #define AXGMAC_MAX_C22_PORT		3
 
+/* The max frame size with default MTU */
+#define AXGBE_ETH_MAX_LEN ( \
+	RTE_ETHER_MTU + \
+	RTE_ETHER_HDR_LEN + \
+	RTE_ETHER_CRC_LEN)
+
 /* Helper macro for descriptor handling
  *  Always use AXGBE_GET_DESC_DATA to access the descriptor data
  *  since the index is free-running and needs to be and-ed
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.463368613 +0000
+++ 0160-net-axgbe-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.106696824 +0000
@@ -1 +1 @@
-From 2570c033579aa8bf51bd995d8c4df8c3e3966386 Mon Sep 17 00:00:00 2001
+From 9075d36723329aacb57d8b006d059bbaa7bcfe17 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2570c033579aa8bf51bd995d8c4df8c3e3966386 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index ddd903680d..ebe9a2876d 100644
+index cfe6aba73a..9cd056d04a 100644
@@ -28 +29 @@
-@@ -1490,7 +1490,7 @@ static int axgb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1439,7 +1439,7 @@ static int axgb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -38 +39 @@
-index 1481fd9ff3..a6226729fe 100644
+index 35a8476466..ac9210f2c8 100644

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

* [dpdk-stable] patch 'net/enetc: fix jumbo frame flag condition for 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
                   ` (158 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/axgbe: fix jumbo frame flag condition for MTU set' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hinic: " luca.boccassi
                   ` (114 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/b60c9ab0dcd9fb18c470e8da1e11de2850b29c25

Thanks.

Luca Boccassi

---
From b60c9ab0dcd9fb18c470e8da1e11de2850b29c25 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:25 +0000
Subject: [PATCH] net/enetc: fix jumbo frame flag condition for MTU set

[ upstream commit 4d44217b0641c19e750b57c7392c4531c91dda7f ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 5d5589b0c858 ("net/enetc: support MTU update and jumbo frames")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/enetc/enetc.h        | 4 ++++
 drivers/net/enetc/enetc_ethdev.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/enetc/enetc.h b/drivers/net/enetc/enetc.h
index 14ef3bc18b..7163633bce 100644
--- a/drivers/net/enetc/enetc.h
+++ b/drivers/net/enetc/enetc.h
@@ -29,6 +29,10 @@
 /* maximum frame size supported */
 #define ENETC_MAC_MAXFRM_SIZE	9600
 
+/* The max frame size with default MTU */
+#define ENETC_ETH_MAX_LEN (RTE_ETHER_MTU + \
+		RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
+
 /*
  * upper_32_bits - return bits 32-63 of a number
  * @n: the number we're accessing
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 6ff3022874..4d2c9c0474 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -677,7 +677,7 @@ enetc_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > ENETC_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads &=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.504451184 +0000
+++ 0161-net-enetc-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.110696899 +0000
@@ -1 +1 @@
-From 4d44217b0641c19e750b57c7392c4531c91dda7f Mon Sep 17 00:00:00 2001
+From b60c9ab0dcd9fb18c470e8da1e11de2850b29c25 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d44217b0641c19e750b57c7392c4531c91dda7f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hinic: fix jumbo frame flag condition for 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
                   ` (159 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/enetc: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/nfp: " luca.boccassi
                   ` (113 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/4d55d2fb91722fb1cab5f81ecf0ed2ab7922cfce

Thanks.

Luca Boccassi

---
From 4d55d2fb91722fb1cab5f81ecf0ed2ab7922cfce Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:26 +0000
Subject: [PATCH] net/hinic: fix jumbo frame flag condition for MTU set

[ upstream commit e542ab51ab27356ed2f2797b3ec2887ec0226bcf ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 254bd849b132 ("net/hinic: set jumbo frame offload flag")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/hinic/hinic_pmd_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 62642354cf..5a2c171099 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -75,6 +75,9 @@
 #define HINIC_PKTLEN_TO_MTU(pktlen)	\
 	((pktlen) - (ETH_HLEN + ETH_CRC_LEN))
 
+/* The max frame size with default MTU */
+#define HINIC_ETH_MAX_LEN (RTE_ETHER_MTU + ETH_HLEN + ETH_CRC_LEN)
+
 /* lro numer limit for one packet */
 #define HINIC_LRO_WQE_NUM_DEFAULT	8
 
@@ -1556,7 +1559,7 @@ static int hinic_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 
 	/* update max frame size */
 	frame_size = HINIC_MTU_TO_PKTLEN(mtu);
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > HINIC_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.543728714 +0000
+++ 0162-net-hinic-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.110696899 +0000
@@ -1 +1 @@
-From e542ab51ab27356ed2f2797b3ec2887ec0226bcf Mon Sep 17 00:00:00 2001
+From 4d55d2fb91722fb1cab5f81ecf0ed2ab7922cfce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e542ab51ab27356ed2f2797b3ec2887ec0226bcf ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/nfp: fix jumbo frame flag condition for 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
                   ` (160 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hinic: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/liquidio: " luca.boccassi
                   ` (112 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/102de11806c224ac90f65892d6f93cb3e551105a

Thanks.

Luca Boccassi

---
From 102de11806c224ac90f65892d6f93cb3e551105a Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:27 +0000
Subject: [PATCH] net/nfp: fix jumbo frame flag condition for MTU set

[ upstream commit a36974f43c69f7a714ffec237461854ae924ce29 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU',
that perhaps impacts the cases of the jumbo frame related.

Fixes: d4a27a3b092a ("nfp: add basic features")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/nfp/nfp_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 1608bf5ea1..9ea24e5bda 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1508,7 +1508,7 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	}
 
 	/* switch to jumbo mode if needed */
-	if ((uint32_t)mtu > RTE_ETHER_MAX_LEN)
+	if ((uint32_t)mtu > RTE_ETHER_MTU)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		dev->data->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.584899541 +0000
+++ 0163-net-nfp-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-05 11:18:29.114696976 +0000
@@ -1 +1 @@
-From a36974f43c69f7a714ffec237461854ae924ce29 Mon Sep 17 00:00:00 2001
+From 102de11806c224ac90f65892d6f93cb3e551105a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a36974f43c69f7a714ffec237461854ae924ce29 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/liquidio: fix jumbo frame flag condition for 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
                   ` (161 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/nfp: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hinic: restore vectorised code' " luca.boccassi
                   ` (111 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Steve Yang; +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/323ebde1407fb49f024176e845ff957c1c27dae2

Thanks.

Luca Boccassi

---
From 323ebde1407fb49f024176e845ff957c1c27dae2 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:28 +0000
Subject: [PATCH] net/liquidio: fix jumbo frame flag condition for MTU set

[ upstream commit 92c87229a9b096a53a5a9763bfee0198d20a91ea ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 9f1c00266d82 ("net/liquidio: add API to set MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/liquidio/lio_ethdev.c | 2 +-
 drivers/net/liquidio/lio_ethdev.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index d4dd3768cd..eb0fdab45a 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -481,7 +481,7 @@ lio_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 		return -1;
 	}
 
-	if (frame_len > RTE_ETHER_MAX_LEN)
+	if (frame_len > LIO_ETH_MAX_LEN)
 		eth_dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/liquidio/lio_ethdev.h b/drivers/net/liquidio/lio_ethdev.h
index 74cd2fb6c6..d33be1c44d 100644
--- a/drivers/net/liquidio/lio_ethdev.h
+++ b/drivers/net/liquidio/lio_ethdev.h
@@ -13,6 +13,9 @@
 #define LIO_LSC_TIMEOUT		100000 /* 100000us (100ms) */
 #define LIO_MAX_CMD_TIMEOUT     10000 /* 10000ms (10s) */
 
+/* The max frame size with default MTU */
+#define LIO_ETH_MAX_LEN (RTE_ETHER_MTU + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
+
 #define LIO_DEV(_eth_dev)		((_eth_dev)->data->dev_private)
 
 /* LIO Response condition variable */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.625406128 +0000
+++ 0164-net-liquidio-fix-jumbo-frame-flag-condition-for-MTU-.patch	2021-02-05 11:18:29.114696976 +0000
@@ -1 +1 @@
-From 92c87229a9b096a53a5a9763bfee0198d20a91ea Mon Sep 17 00:00:00 2001
+From 323ebde1407fb49f024176e845ff957c1c27dae2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 92c87229a9b096a53a5a9763bfee0198d20a91ea ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hinic: restore vectorised code' 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
                   ` (162 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/liquidio: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: avoid blocking telemetry for link status' " luca.boccassi
                   ` (110 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: David Marchand; +Cc: Ruifeng 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/7759c40b06911920218c72c75102b5264fc9db36

Thanks.

Luca Boccassi

---
From 7759c40b06911920218c72c75102b5264fc9db36 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 15 Jan 2021 14:40:19 +0100
Subject: [PATCH] net/hinic: restore vectorised code

[ upstream commit 36f98ed2e33f08d93e570cfed958b666f23bd87a ]

Following make support removal, the vectorised code is not built
anymore, fix the build flag check.

Fixes: 3cc6ecfdfe85 ("build: remove makefiles")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/hinic/hinic_pmd_rx.c |  6 +++---
 drivers/net/hinic/hinic_pmd_tx.c | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
index a49769a863..842399cc4c 100644
--- a/drivers/net/hinic/hinic_pmd_rx.c
+++ b/drivers/net/hinic/hinic_pmd_rx.c
@@ -4,7 +4,7 @@
 
 #include <rte_ether.h>
 #include <rte_mbuf.h>
-#ifdef __ARM64_NEON__
+#ifdef RTE_ARCH_ARM64
 #include <arm_neon.h>
 #endif
 
@@ -762,7 +762,7 @@ void hinic_free_all_rx_mbufs(struct hinic_rxq *rxq)
 static inline void hinic_rq_cqe_be_to_cpu32(void *dst_le32,
 					    volatile void *src_be32)
 {
-#if defined(__X86_64_SSE__)
+#if defined(RTE_ARCH_X86_64)
 	volatile __m128i *wqe_be = (volatile __m128i *)src_be32;
 	__m128i *wqe_le = (__m128i *)dst_le32;
 	__m128i shuf_mask =  _mm_set_epi8(12, 13, 14, 15, 8, 9, 10,
@@ -770,7 +770,7 @@ static inline void hinic_rq_cqe_be_to_cpu32(void *dst_le32,
 
 	/* l2nic just use first 128 bits */
 	wqe_le[0] = _mm_shuffle_epi8(wqe_be[0], shuf_mask);
-#elif defined(__ARM64_NEON__)
+#elif defined(RTE_ARCH_ARM64)
 	volatile uint8x16_t *wqe_be = (volatile uint8x16_t *)src_be32;
 	uint8x16_t *wqe_le = (uint8x16_t *)dst_le32;
 	const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10,
diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index 9d0264e67a..669f82389c 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -7,7 +7,7 @@
 #include <rte_sctp.h>
 #include <rte_udp.h>
 #include <rte_ip.h>
-#ifdef __ARM64_NEON__
+#ifdef RTE_ARCH_ARM64
 #include <arm_neon.h>
 #endif
 
@@ -203,7 +203,7 @@
 
 static inline void hinic_sq_wqe_cpu_to_be32(void *data, int nr_wqebb)
 {
-#if defined(__X86_64_SSE__)
+#if defined(RTE_ARCH_X86_64)
 	int i;
 	__m128i *wqe_line = (__m128i *)data;
 	__m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10,
@@ -217,7 +217,7 @@ static inline void hinic_sq_wqe_cpu_to_be32(void *data, int nr_wqebb)
 		wqe_line[3] = _mm_shuffle_epi8(wqe_line[3], shuf_mask);
 		wqe_line += 4;
 	}
-#elif defined(__ARM64_NEON__)
+#elif defined(RTE_ARCH_ARM64)
 	int i;
 	uint8x16_t *wqe_line = (uint8x16_t *)data;
 	const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10,
@@ -237,7 +237,7 @@ static inline void hinic_sq_wqe_cpu_to_be32(void *data, int nr_wqebb)
 
 static inline void hinic_sge_cpu_to_be32(void *data, int nr_sge)
 {
-#if defined(__X86_64_SSE__)
+#if defined(RTE_ARCH_X86_64)
 	int i;
 	__m128i *sge_line = (__m128i *)data;
 	__m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10,
@@ -248,7 +248,7 @@ static inline void hinic_sge_cpu_to_be32(void *data, int nr_sge)
 		*sge_line = _mm_shuffle_epi8(*sge_line, shuf_mask);
 		sge_line++;
 	}
-#elif defined(__ARM64_NEON__)
+#elif defined(RTE_ARCH_ARM64)
 	int i;
 	uint8x16_t *sge_line = (uint8x16_t *)data;
 	const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.666387477 +0000
+++ 0165-net-hinic-restore-vectorised-code.patch	2021-02-05 11:18:29.114696976 +0000
@@ -1 +1 @@
-From 36f98ed2e33f08d93e570cfed958b666f23bd87a Mon Sep 17 00:00:00 2001
+From 7759c40b06911920218c72c75102b5264fc9db36 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36f98ed2e33f08d93e570cfed958b666f23bd87a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'ethdev: avoid blocking telemetry for link status' 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
                   ` (163 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hinic: restore vectorised code' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' " luca.boccassi
                   ` (109 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ciara Power, 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/7cef99775d947c9b34c5d62df62374e3cdf2fc0d

Thanks.

Luca Boccassi

---
From 7cef99775d947c9b34c5d62df62374e3cdf2fc0d Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 14 Jan 2021 12:17:33 +0000
Subject: [PATCH] ethdev: avoid blocking telemetry for link status

[ upstream commit 26fe208ad81fc7439728d743bccd4b2a32701bfe ]

When querying the link status via telemetry interface, we don't want the
client to have to wait for multiple seconds for a reply. Therefore use
"rte_eth_link_get_nowait()" rather than "rte_eth_link_get()" in the
telemetry callback.

Fixes: c190daedb9b1 ("ethdev: add telemetry callbacks")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 71e1e9a6db..8c584e4c83 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5711,7 +5711,7 @@ eth_dev_handle_port_link_status(const char *cmd __rte_unused,
 	if (!rte_eth_dev_is_valid_port(port_id))
 		return -1;
 
-	ret = rte_eth_link_get(port_id, &link);
+	ret = rte_eth_link_get_nowait(port_id, &link);
 	if (ret < 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:36.700173021 +0000
+++ 0166-ethdev-avoid-blocking-telemetry-for-link-status.patch	2021-02-05 11:18:29.122697128 +0000
@@ -1 +1 @@
-From 26fe208ad81fc7439728d743bccd4b2a32701bfe Mon Sep 17 00:00:00 2001
+From 7cef99775d947c9b34c5d62df62374e3cdf2fc0d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26fe208ad81fc7439728d743bccd4b2a32701bfe ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9fe1c9d769..daf5f24f7e 100644
+index 71e1e9a6db..8c584e4c83 100644
@@ -25 +26 @@
-@@ -5739,7 +5739,7 @@ eth_dev_handle_port_link_status(const char *cmd __rte_unused,
+@@ -5711,7 +5711,7 @@ eth_dev_handle_port_link_status(const char *cmd __rte_unused,

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

* [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' 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
                   ` (164 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: avoid blocking telemetry for link status' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ionic: fix link speed and autonegotiation' " luca.boccassi
                   ` (108 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: George Prekas; +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/a098bebd49fe766384d43cf1e23882201b50d7e6

Thanks.

Luca Boccassi

---
From a098bebd49fe766384d43cf1e23882201b50d7e6 Mon Sep 17 00:00:00 2001
From: George Prekas <prekageo@amazon.com>
Date: Thu, 7 Jan 2021 14:42:28 -0600
Subject: [PATCH] app/testpmd: fix IP checksum calculation

[ upstream commit d841ef857dac00657aeff0a764947e064f86f550 ]

Strict-aliasing rules are violated by cast to uint16_t* in flowgen.c and
the calculated IP checksum is wrong. Use attribute __may_alias__ to fix
the problem.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")

Signed-off-by: George Prekas <prekageo@amazon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/flowgen.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index acf3e24605..cabfc688ff 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -53,8 +53,11 @@ static struct rte_ether_addr cfg_ether_dst =
 
 #define IP_DEFTTL  64   /* from RFC 1340. */
 
+/* Use this type to inform GCC that ip_sum violates aliasing rules. */
+typedef unaligned_uint16_t alias_int16_t __attribute__((__may_alias__));
+
 static inline uint16_t
-ip_sum(const unaligned_uint16_t *hdr, int hdr_len)
+ip_sum(const alias_int16_t *hdr, int hdr_len)
 {
 	uint32_t sum = 0;
 
@@ -150,7 +153,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 							   next_flow);
 		ip_hdr->total_length	= RTE_CPU_TO_BE_16(pkt_size -
 							   sizeof(*eth_hdr));
-		ip_hdr->hdr_checksum	= ip_sum((unaligned_uint16_t *)ip_hdr,
+		ip_hdr->hdr_checksum	= ip_sum((const alias_int16_t *)ip_hdr,
 						 sizeof(*ip_hdr));
 
 		/* Initialize UDP header. */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.748416777 +0000
+++ 0167-app-testpmd-fix-IP-checksum-calculation.patch	2021-02-05 11:18:29.122697128 +0000
@@ -1 +1 @@
-From d841ef857dac00657aeff0a764947e064f86f550 Mon Sep 17 00:00:00 2001
+From a098bebd49fe766384d43cf1e23882201b50d7e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d841ef857dac00657aeff0a764947e064f86f550 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ionic: fix link speed and autonegotiation' 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
                   ` (165 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix VF query link status in dev init' " luca.boccassi
                   ` (107 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Andrew Boyer; +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/a457b9a8d853a924067e536b4f2e819c6884e8bc

Thanks.

Luca Boccassi

---
From a457b9a8d853a924067e536b4f2e819c6884e8bc Mon Sep 17 00:00:00 2001
From: Andrew Boyer <aboyer@pensando.io>
Date: Mon, 11 Jan 2021 11:02:09 -0800
Subject: [PATCH] net/ionic: fix link speed and autonegotiation

[ upstream commit 0dad8b3d4cbca12907f6bf7b4204ac7de6e76aeb ]

Don't assume autoneg in link_update().

Always call ionic_dev_cmd_port_autoneg() in start().

This allows the client to specify the link settings.

Fixes: 598f6726390f ("net/ionic: add basic port operations")

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_ethdev.c | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 68a6e630c8..fe778043eb 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -289,7 +289,10 @@ ionic_dev_link_update(struct rte_eth_dev *eth_dev,
 
 	/* Initialize */
 	memset(&link, 0, sizeof(link));
-	link.link_autoneg = ETH_LINK_AUTONEG;
+
+	if (adapter->idev.port_info->config.an_enable) {
+		link.link_autoneg = ETH_LINK_AUTONEG;
+	}
 
 	if (!adapter->link_up) {
 		/* Interface is down */
@@ -901,7 +904,8 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
 	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
 	struct ionic_adapter *adapter = lif->adapter;
 	struct ionic_dev *idev = &adapter->idev;
-	uint32_t allowed_speeds;
+	uint32_t speed = 0, allowed_speeds;
+	uint8_t an_enable;
 	int err;
 
 	IONIC_PRINT_CALL();
@@ -925,11 +929,23 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
 		return err;
 	}
 
-	if (eth_dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		uint32_t speed = ionic_parse_link_speeds(dev_conf->link_speeds);
+	/* Configure link */
+	an_enable = (dev_conf->link_speeds & ETH_LINK_SPEED_FIXED) == 0;
 
-		if (speed)
-			ionic_dev_cmd_port_speed(idev, speed);
+	ionic_dev_cmd_port_autoneg(idev, an_enable);
+	err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
+	if (err)
+		IONIC_PRINT(WARNING, "Failed to %s autonegotiation",
+			an_enable ? "enable" : "disable");
+
+	if (!an_enable)
+		speed = ionic_parse_link_speeds(dev_conf->link_speeds);
+	if (speed) {
+		ionic_dev_cmd_port_speed(idev, speed);
+		err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
+		if (err)
+			IONIC_PRINT(WARNING, "Failed to set link speed %u",
+				speed);
 	}
 
 	ionic_dev_link_update(eth_dev, 0);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.784624307 +0000
+++ 0168-net-ionic-fix-link-speed-and-autonegotiation.patch	2021-02-05 11:18:29.122697128 +0000
@@ -1 +1 @@
-From 0dad8b3d4cbca12907f6bf7b4204ac7de6e76aeb Mon Sep 17 00:00:00 2001
+From a457b9a8d853a924067e536b4f2e819c6884e8bc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0dad8b3d4cbca12907f6bf7b4204ac7de6e76aeb ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 838e93ef75..2face7c635 100644
+index 68a6e630c8..fe778043eb 100644
@@ -24 +25 @@
-@@ -276,7 +276,10 @@ ionic_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -289,7 +289,10 @@ ionic_dev_link_update(struct rte_eth_dev *eth_dev,
@@ -34,3 +35,3 @@
- 	if (!adapter->link_up ||
- 	    !(lif->state & IONIC_LIF_F_UP)) {
-@@ -869,7 +872,8 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
+ 	if (!adapter->link_up) {
+ 		/* Interface is down */
+@@ -901,7 +904,8 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
@@ -46 +47 @@
-@@ -896,11 +900,23 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
+@@ -925,11 +929,23 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/hns3: fix VF query link status in dev 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
                   ` (166 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ionic: fix link speed and autonegotiation' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' " luca.boccassi
                   ` (106 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Chengwen Feng; +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/c74bd44eeadf71292eb012e8da79e0dfa32e45e4

Thanks.

Luca Boccassi

---
From c74bd44eeadf71292eb012e8da79e0dfa32e45e4 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 14 Jan 2021 21:33:32 +0800
Subject: [PATCH] net/hns3: fix VF query link status in dev init

[ upstream commit de63cf0d90a05edf911b2c7013d2651f5f6a92eb ]

Current hns3vf queried link status in dev init stage, but the link
status should be maintained in dev start stage, this patch fix this.

Also, in the dev start stage, we use quick query instead of delayed
query to make sure update the link status soon.

Fixes: a5475d61fa34 ("net/hns3: support VF")
Fixes: 958edf6627d5 ("net/hns3: fix VF link status")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index d47af417bf..32e35dc463 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1749,7 +1749,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
 		goto err_init_hardware;
 	}
 
-	hns3vf_request_link_info(hw);
 	return 0;
 
 err_init_hardware:
@@ -2238,7 +2237,7 @@ hns3vf_dev_start(struct rte_eth_dev *dev)
 	hns3_rx_scattered_calc(dev);
 	hns3_set_rxtx_function(dev);
 	hns3_mp_req_start_rxtx(dev);
-	rte_eal_alarm_set(HNS3VF_SERVICE_INTERVAL, hns3vf_service_handler, dev);
+	hns3vf_service_handler(dev);
 
 	hns3vf_restore_filter(dev);
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.827085308 +0000
+++ 0169-net-hns3-fix-VF-query-link-status-in-dev-init.patch	2021-02-05 11:18:29.126697205 +0000
@@ -1 +1 @@
-From de63cf0d90a05edf911b2c7013d2651f5f6a92eb Mon Sep 17 00:00:00 2001
+From c74bd44eeadf71292eb012e8da79e0dfa32e45e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de63cf0d90a05edf911b2c7013d2651f5f6a92eb ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c126384ae7..ee895059d7 100644
+index d47af417bf..32e35dc463 100644

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

* [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' 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
                   ` (167 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix VF query link status in dev init' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' " luca.boccassi
                   ` (105 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Hongbo Zheng; +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/61f236f23435b1f9ac0a8171056ebc63653eca94

Thanks.

Luca Boccassi

---
From 61f236f23435b1f9ac0a8171056ebc63653eca94 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Thu, 14 Jan 2021 21:33:33 +0800
Subject: [PATCH] net/hns3: use new opcode for clearing hardware resource

[ upstream commit e5d179078b611035395317c80a9285c8a2de18a2 ]

The original command opcode '0x700A' may cause firmware error,
so '0x700A' is deserted, now use '0x700B' to replace it.

Fixes: 223d9eceaeee ("net/hns3: clear residual hardware configurations on init")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 194c3a731b..e40293b309 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -203,7 +203,7 @@ enum hns3_opcode_type {
 	HNS3_OPC_FD_COUNTER_OP          = 0x1205,
 
 	/* Clear hardware state command */
-	HNS3_OPC_CLEAR_HW_STATE         = 0x700A,
+	HNS3_OPC_CLEAR_HW_STATE         = 0x700B,
 
 	/* SFP command */
 	HNS3_OPC_SFP_GET_SPEED          = 0x7104,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.864951915 +0000
+++ 0170-net-hns3-use-new-opcode-for-clearing-hardware-resour.patch	2021-02-05 11:18:29.126697205 +0000
@@ -1 +1 @@
-From e5d179078b611035395317c80a9285c8a2de18a2 Mon Sep 17 00:00:00 2001
+From 61f236f23435b1f9ac0a8171056ebc63653eca94 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e5d179078b611035395317c80a9285c8a2de18a2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' 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
                   ` (168 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' " luca.boccassi
                   ` (104 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Chengchang Tang; +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/3878bb2da912ef247cddbe4f72735961d4dec8b3

Thanks.

Luca Boccassi

---
From 3878bb2da912ef247cddbe4f72735961d4dec8b3 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 14 Jan 2021 21:33:34 +0800
Subject: [PATCH] net/hns3: fix register length when dumping registers

[ upstream commit 2d0467532b1a2c10739a89ead3bd03042486b1de ]

Currently, the reg length return by HNS3 is the total length of all the
registers. But for upper layer user, the total register length is the
length multiplied by width. This can lead to a waste of memory and print
some invalid information.

This patch corrects the length and width of the register.

Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index b2cc599f12..32597fe21c 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -104,6 +104,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	uint32_t cmdq_lines, common_lines, ring_lines, tqp_intr_lines;
 	uint32_t regs_num_32_bit, regs_num_64_bit;
+	uint32_t dfx_reg_lines;
 	uint32_t len;
 	int ret;
 
@@ -117,7 +118,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 	tqp_intr_lines = sizeof(tqp_intr_reg_addrs) / REG_LEN_PER_LINE + 1;
 
 	len = (cmdq_lines + common_lines + ring_lines * hw->tqps_num +
-	      tqp_intr_lines * hw->num_msi) * REG_LEN_PER_LINE;
+	      tqp_intr_lines * hw->num_msi) * REG_NUM_PER_LINE;
 
 	if (!hns->is_vf) {
 		ret = hns3_get_regs_num(hw, &regs_num_32_bit, &regs_num_64_bit);
@@ -126,8 +127,11 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 				 ret);
 			return -ENOTSUP;
 		}
-		len += regs_num_32_bit * sizeof(uint32_t) +
-		       regs_num_64_bit * sizeof(uint64_t);
+		dfx_reg_lines = regs_num_32_bit * sizeof(uint32_t) /
+					REG_LEN_PER_LINE + 1;
+		dfx_reg_lines += regs_num_64_bit * sizeof(uint64_t) /
+					REG_LEN_PER_LINE + 1;
+		len += dfx_reg_lines * REG_NUM_PER_LINE;
 	}
 
 	*length = len;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.911128824 +0000
+++ 0171-net-hns3-fix-register-length-when-dumping-registers.patch	2021-02-05 11:18:29.126697205 +0000
@@ -1 +1 @@
-From 2d0467532b1a2c10739a89ead3bd03042486b1de Mon Sep 17 00:00:00 2001
+From 3878bb2da912ef247cddbe4f72735961d4dec8b3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d0467532b1a2c10739a89ead3bd03042486b1de ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' 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
                   ` (169 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix dump register out of range' " luca.boccassi
                   ` (103 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Chengchang Tang; +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/febf166092ad6a786641951356f3b594a4a39716

Thanks.

Luca Boccassi

---
From febf166092ad6a786641951356f3b594a4a39716 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 14 Jan 2021 21:33:35 +0800
Subject: [PATCH] net/hns3: fix data overwriting during register dump

[ upstream commit 6da903befad6a7da52ee6b80554f63bf74bb9ad1 ]

The data pointer has not moved after BAR register dumped. This causes
the later register to overwrite the previous data.

This patch fix the overwriting by move the pointer after every dump
function. And the missing separator between 32-bit register and the
64-bit register is also added to avoid a parsing error.

Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 70 ++++++++++++++++++++----------------
 1 file changed, 40 insertions(+), 30 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 32597fe21c..775e0965f7 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -252,63 +252,68 @@ hns3_get_64_bit_regs(struct hns3_hw *hw, uint32_t regs_num, void *data)
 	return 0;
 }
 
-static void
+static int
+hns3_insert_reg_separator(int reg_num, uint32_t *data)
+{
+	int separator_num;
+	int i;
+
+	separator_num = MAX_SEPARATE_NUM - reg_num % REG_NUM_PER_LINE;
+	for (i = 0; i < separator_num; i++)
+		*data++ = SEPARATOR_VALUE;
+	return separator_num;
+}
+
+static int
 hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
 {
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+	uint32_t *origin_data_ptr = data;
 	uint32_t reg_offset;
-	int separator_num;
-	int reg_um;
+	int reg_num;
 	int i, j;
 
 	/* fetching per-PF registers values from PF PCIe register space */
-	reg_um = sizeof(cmdq_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
-	for (i = 0; i < reg_um; i++)
+	reg_num = sizeof(cmdq_reg_addrs) / sizeof(uint32_t);
+	for (i = 0; i < reg_num; i++)
 		*data++ = hns3_read_dev(hw, cmdq_reg_addrs[i]);
-	for (i = 0; i < separator_num; i++)
-		*data++ = SEPARATOR_VALUE;
+	data += hns3_insert_reg_separator(reg_num, data);
 
 	if (hns->is_vf)
-		reg_um = sizeof(common_vf_reg_addrs) / sizeof(uint32_t);
+		reg_num = sizeof(common_vf_reg_addrs) / sizeof(uint32_t);
 	else
-		reg_um = sizeof(common_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
-	for (i = 0; i < reg_um; i++)
+		reg_num = sizeof(common_reg_addrs) / sizeof(uint32_t);
+	for (i = 0; i < reg_num; i++)
 		if (hns->is_vf)
 			*data++ = hns3_read_dev(hw, common_vf_reg_addrs[i]);
 		else
 			*data++ = hns3_read_dev(hw, common_reg_addrs[i]);
-	for (i = 0; i < separator_num; i++)
-		*data++ = SEPARATOR_VALUE;
+	data += hns3_insert_reg_separator(reg_num, data);
 
-	reg_um = sizeof(ring_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
+	reg_num = sizeof(ring_reg_addrs) / sizeof(uint32_t);
 	for (j = 0; j < hw->tqps_num; j++) {
 		reg_offset = hns3_get_tqp_reg_offset(j);
-		for (i = 0; i < reg_um; i++)
+		for (i = 0; i < reg_num; i++)
 			*data++ = hns3_read_dev(hw,
 						ring_reg_addrs[i] + reg_offset);
-		for (i = 0; i < separator_num; i++)
-			*data++ = SEPARATOR_VALUE;
+		data += hns3_insert_reg_separator(reg_num, data);
 	}
 
-	reg_um = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
+	reg_num = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
 	for (j = 0; j < hw->num_msi; j++) {
 		reg_offset = HNS3_TQP_INTR_REG_SIZE * j;
-		for (i = 0; i < reg_um; i++)
-			*data++ = hns3_read_dev(hw,
-						tqp_intr_reg_addrs[i] +
+		for (i = 0; i < reg_num; i++)
+			*data++ = hns3_read_dev(hw, tqp_intr_reg_addrs[i] +
 						reg_offset);
-		for (i = 0; i < separator_num; i++)
-			*data++ = SEPARATOR_VALUE;
+		data += hns3_insert_reg_separator(reg_num, data);
 	}
+	return data - origin_data_ptr;
 }
 
 int
 hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 {
+#define HNS3_64_BIT_REG_SIZE (sizeof(uint64_t) / sizeof(uint32_t))
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	uint32_t regs_num_32_bit;
@@ -338,7 +343,7 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 		return -ENOTSUP;
 
 	/* fetching per-PF registers values from PF PCIe register space */
-	hns3_direct_access_regs(hw, data);
+	data += hns3_direct_access_regs(hw, data);
 
 	if (hns->is_vf)
 		return 0;
@@ -355,11 +360,16 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 		hns3_err(hw, "Get 32 bit register failed, ret = %d", ret);
 		return ret;
 	}
-
 	data += regs_num_32_bit;
+	data += hns3_insert_reg_separator(regs_num_32_bit, data);
+
 	ret = hns3_get_64_bit_regs(hw, regs_num_64_bit, data);
-	if (ret)
+	if (ret) {
 		hns3_err(hw, "Get 64 bit register failed, ret = %d", ret);
-
+		return ret;
+	}
+	data += regs_num_64_bit * HNS3_64_BIT_REG_SIZE;
+	data += hns3_insert_reg_separator(regs_num_64_bit *
+					  HNS3_64_BIT_REG_SIZE, data);
 	return ret;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.951437534 +0000
+++ 0172-net-hns3-fix-data-overwriting-during-register-dump.patch	2021-02-05 11:18:29.130697280 +0000
@@ -1 +1 @@
-From 6da903befad6a7da52ee6b80554f63bf74bb9ad1 Mon Sep 17 00:00:00 2001
+From febf166092ad6a786641951356f3b594a4a39716 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6da903befad6a7da52ee6b80554f63bf74bb9ad1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix dump register out of range' 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
                   ` (170 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: apply mask to value on match field set' " luca.boccassi
                   ` (102 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Chengchang Tang; +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/9c81b4b8883ec958ac04f9a81311c35e7487ae8d

Thanks.

Luca Boccassi

---
From 9c81b4b8883ec958ac04f9a81311c35e7487ae8d Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 14 Jan 2021 21:33:36 +0800
Subject: [PATCH] net/hns3: fix dump register out of range

[ upstream commit acb3260fac5c93d953876172ce322e9f2801a33c ]

Currently, when dump the queue interrupt registers, the number of
registers that should be dumped is calculated from num_msi. But the
value of num_msi includes the number of misc interrupts. So, for some
hardware version, like kupeng930, it will lead to an illegal access.

This patch replace num_msi with intr_tqps_num which indicate the
number of interrupts used by the tqps.

Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 775e0965f7..f2cb465eed 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -300,7 +300,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
 	}
 
 	reg_num = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
-	for (j = 0; j < hw->num_msi; j++) {
+	for (j = 0; j < hw->intr_tqps_num; j++) {
 		reg_offset = HNS3_TQP_INTR_REG_SIZE * j;
 		for (i = 0; i < reg_num; i++)
 			*data++ = hns3_read_dev(hw, tqp_intr_reg_addrs[i] +
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.992602632 +0000
+++ 0173-net-hns3-fix-dump-register-out-of-range.patch	2021-02-05 11:18:29.130697280 +0000
@@ -1 +1 @@
-From acb3260fac5c93d953876172ce322e9f2801a33c Mon Sep 17 00:00:00 2001
+From 9c81b4b8883ec958ac04f9a81311c35e7487ae8d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acb3260fac5c93d953876172ce322e9f2801a33c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx/base: apply mask to value on match field 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
                   ` (171 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix dump register out of range' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/mlx5: fix unnecessary checking for RSS action' " luca.boccassi
                   ` (101 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 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/f2a58ea165c68c17130a54e810622266b771fb82

Thanks.

Luca Boccassi

---
From f2a58ea165c68c17130a54e810622266b771fb82 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 18 Jan 2021 01:21:11 +0300
Subject: [PATCH] common/sfc_efx/base: apply mask to value on match field set

[ upstream commit f80487b9c79cc0cc3710c28e3115a348da022772 ]

An application may submit all-zeros masks for a given field
to be used in two given specifications and, in the meantime,
use different unmasked values. Later on, when compared, the
two specifications will prove unequal, and, if the rules in
question are outer, the client driver will have to allocate
a separate rule for the second specification. Provided that
all other match criteria are the same, the HW will deem the
two outer rules being duplicates, which is in fact the case.

Apply masks to values in efx_mae_match_spec_field_set() API
to fix the issue and avoid duplicate outer rule allocations.

Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec")

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
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 | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index cc5d8cfc4f..338a0013f9 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -707,12 +707,32 @@ efx_mae_match_spec_field_set(
 	}
 
 	if (descp->emmd_endianness == EFX_MAE_FIELD_BE) {
+		unsigned int i;
+
 		/*
 		 * The mask/value are in network (big endian) order.
 		 * The MCDI request field is also big endian.
 		 */
-		memcpy(mvp + descp->emmd_value_offset, value, value_size);
-		memcpy(mvp + descp->emmd_mask_offset, mask, mask_size);
+
+		EFSYS_ASSERT3U(value_size, ==, mask_size);
+
+		for (i = 0; i < value_size; ++i) {
+			uint8_t *v_bytep = mvp + descp->emmd_value_offset + i;
+			uint8_t *m_bytep = mvp + descp->emmd_mask_offset + i;
+
+			/*
+			 * Apply the mask (which may be all-zeros) to the value.
+			 *
+			 * If this API is provided with some value to set for a
+			 * given field in one specification and with some other
+			 * value to set for this field in another specification,
+			 * then, if the two masks are all-zeros, the field will
+			 * avoid being counted as a mismatch when comparing the
+			 * specifications using efx_mae_match_specs_equal() API.
+			 */
+			*v_bytep = value[i] & mask[i];
+			*m_bytep = mask[i];
+		}
 	} else {
 		efx_dword_t dword;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.032120708 +0000
+++ 0174-common-sfc_efx-base-apply-mask-to-value-on-match-fie.patch	2021-02-05 11:18:29.130697280 +0000
@@ -1 +1 @@
-From f80487b9c79cc0cc3710c28e3115a348da022772 Mon Sep 17 00:00:00 2001
+From f2a58ea165c68c17130a54e810622266b771fb82 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f80487b9c79cc0cc3710c28e3115a348da022772 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix unnecessary checking for RSS action' 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
                   ` (172 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: apply mask to value on match field set' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ixgbe: fix configuration of max frame size' " luca.boccassi
                   ` (100 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Jiawei Wang; +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/27250328c7b66146b45f997831dfdce2ce3f10be

Thanks.

Luca Boccassi

---
From 27250328c7b66146b45f997831dfdce2ce3f10be Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Thu, 14 Jan 2021 09:24:46 +0200
Subject: [PATCH] net/mlx5: fix unnecessary checking for RSS action

[ upstream commit 6c2a3a90496527affc566bda518b8c33908b00d2 ]

RSS action is valid only in NIC-RX domain, this fix bypass
the function that getting RSS action from the flow action list
under no NIC-RX domain.

Fixes: e745f900072e ("net/mlx5: optimize flow RSS struct")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index bceecdb902..ba9a90210f 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5268,7 +5268,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct rte_flow *flow = NULL;
 	struct mlx5_flow *dev_flow;
-	const struct rte_flow_action_rss *rss;
+	const struct rte_flow_action_rss *rss = NULL;
 	struct mlx5_translated_shared_action
 		shared_actions[MLX5_MAX_SHARED_ACTIONS];
 	int shared_actions_n = MLX5_MAX_SHARED_ACTIONS;
@@ -5346,7 +5346,9 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
 	MLX5_ASSERT(flow->drv_type > MLX5_FLOW_TYPE_MIN &&
 		    flow->drv_type < MLX5_FLOW_TYPE_MAX);
 	memset(rss_desc, 0, offsetof(struct mlx5_flow_rss_desc, queue));
-	rss = flow_get_rss_action(p_actions_rx);
+	/* RSS Action only works on NIC RX domain */
+	if (attr->ingress && !attr->transfer)
+		rss = flow_get_rss_action(p_actions_rx);
 	if (rss) {
 		if (flow_rss_workspace_adjust(wks, rss_desc, rss->queue_num))
 			return 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.074307884 +0000
+++ 0175-net-mlx5-fix-unnecessary-checking-for-RSS-action.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From 6c2a3a90496527affc566bda518b8c33908b00d2 Mon Sep 17 00:00:00 2001
+From 27250328c7b66146b45f997831dfdce2ce3f10be Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c2a3a90496527affc566bda518b8c33908b00d2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3c4ef6d7d2..e656ad6cd6 100644
+index bceecdb902..ba9a90210f 100644
@@ -23 +24 @@
-@@ -5416,7 +5416,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
+@@ -5268,7 +5268,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
@@ -32 +33 @@
-@@ -5494,7 +5494,9 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
+@@ -5346,7 +5346,9 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,

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

* [dpdk-stable] patch 'net/ixgbe: fix configuration of max frame 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
                   ` (173 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/mlx5: fix unnecessary checking for RSS action' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' " luca.boccassi
                   ` (99 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Alvin Zhang; +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/9129f6275b6f856e064624d71fbba76ea57e4530

Thanks.

Luca Boccassi

---
From 9129f6275b6f856e064624d71fbba76ea57e4530 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Tue, 19 Jan 2021 13:25:51 +0800
Subject: [PATCH] net/ixgbe: fix configuration of max frame size

[ upstream commit 15cfb0bfc4968e8a9da49c07ee2e57c9cd947473 ]

For some types of NIC, jumbo frame is not supported in IOV mode,
so if a VF requests to configure the frame size to not bigger
than IXGBE_ETH_MAX_LEN, the kernel driver returns 0, but the DPDK
ixgbe PMD returns -1, this will cause the VF to fail to start
when the PF driven by DPDK ixgbe PMD.

This patch keeps ixgbe PMD's handling mode consistent with kernel
driver in above situation.

In addition, the value set by the command IXGBE_VF_SET_LPE
represents the max frame size, not the mtu.

Fixes: 1b9ea09c067b ("ixgbe: support X550")
Fixes: 95a27b3ba5f5 ("net/ixgbe: enable jumbo frame for VF")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 43 +++++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 89698e8470..15982af8da 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -552,20 +552,47 @@ ixgbe_vf_set_vlan(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 }
 
 static int
-ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *msgbuf)
+ixgbe_set_vf_lpe(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 {
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint32_t new_mtu = msgbuf[1];
+	uint32_t max_frame = msgbuf[1];
 	uint32_t max_frs;
 	uint32_t hlreg0;
-	int max_frame = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
 
 	/* X540 and X550 support jumbo frames in IOV mode */
 	if (hw->mac.type != ixgbe_mac_X540 &&
 		hw->mac.type != ixgbe_mac_X550 &&
 		hw->mac.type != ixgbe_mac_X550EM_x &&
-		hw->mac.type != ixgbe_mac_X550EM_a)
-		return -1;
+		hw->mac.type != ixgbe_mac_X550EM_a) {
+		struct ixgbe_vf_info *vfinfo =
+			*IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
+
+		switch (vfinfo[vf].api_version) {
+		case ixgbe_mbox_api_11:
+		case ixgbe_mbox_api_12:
+		case ixgbe_mbox_api_13:
+			 /**
+			  * Version 1.1&1.2&1.3 supports jumbo frames on VFs
+			  * if PF has jumbo frames enabled which means legacy
+			  * VFs are disabled.
+			  */
+			if (dev->data->dev_conf.rxmode.max_rx_pkt_len >
+			    IXGBE_ETH_MAX_LEN)
+				break;
+			/* fall through */
+		default:
+			/**
+			 * If the PF or VF are running w/ jumbo frames enabled,
+			 * we return -1 as we cannot support jumbo frames on
+			 * legacy VFs.
+			 */
+			if (max_frame > IXGBE_ETH_MAX_LEN ||
+			    dev->data->dev_conf.rxmode.max_rx_pkt_len >
+			    IXGBE_ETH_MAX_LEN)
+				return -1;
+			break;
+		}
+	}
 
 	if (max_frame < RTE_ETHER_MIN_LEN ||
 			max_frame > RTE_ETHER_MAX_JUMBO_FRAME_LEN)
@@ -573,9 +600,9 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *ms
 
 	max_frs = (IXGBE_READ_REG(hw, IXGBE_MAXFRS) &
 		   IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT;
-	if (max_frs < new_mtu) {
+	if (max_frs < max_frame) {
 		hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);
-		if (new_mtu > IXGBE_ETH_MAX_LEN) {
+		if (max_frame > IXGBE_ETH_MAX_LEN) {
 			dev->data->dev_conf.rxmode.offloads |=
 				DEV_RX_OFFLOAD_JUMBO_FRAME;
 			hlreg0 |= IXGBE_HLREG0_JUMBOEN;
@@ -586,7 +613,7 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *ms
 		}
 		IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);
 
-		max_frs = new_mtu << IXGBE_MHADD_MFS_SHIFT;
+		max_frs = max_frame << IXGBE_MHADD_MFS_SHIFT;
 		IXGBE_WRITE_REG(hw, IXGBE_MAXFRS, max_frs);
 	}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.114438259 +0000
+++ 0176-net-ixgbe-fix-configuration-of-max-frame-size.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From 15cfb0bfc4968e8a9da49c07ee2e57c9cd947473 Mon Sep 17 00:00:00 2001
+From 9129f6275b6f856e064624d71fbba76ea57e4530 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 15cfb0bfc4968e8a9da49c07ee2e57c9cd947473 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' 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
                   ` (174 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net/ixgbe: fix configuration of max frame size' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'eal: fix reciprocal header include' " luca.boccassi
                   ` (98 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Andrew Boyer, Honnappa Nagarahalli, 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/9072f5e1e00cfadece396e998461fb5c30e1eef0

Thanks.

Luca Boccassi

---
From 9072f5e1e00cfadece396e998461fb5c30e1eef0 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 11 Jan 2021 13:55:59 +0000
Subject: [PATCH] build: provide suitable error for "both" libraries option

[ upstream commit 08895f10e7729c07ccd063501acd04e77c7730f5 ]

Rather than having the DPDK configuration error out when linking apps
and examples when "both" is select for "default_library" option, we can
detect that setting earlier in the build config and provide a suitable
error message to the user.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 config/meson.build | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index c02802c18e..d5bfbcec3e 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -303,3 +303,12 @@ if get_option('b_lto')
 		add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
 	endif
 endif
+
+if get_option('default_library') == 'both'
+	error( '''
+    Unsupported value "both" for "default_library" option.
+
+    NOTE: DPDK always builds both shared and static libraries.  Please set
+    "default_library" to either "static" or "shared" to select default linkage
+    for apps and any examples.''')
+endif
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.158642319 +0000
+++ 0177-build-provide-suitable-error-for-both-libraries-opti.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From 08895f10e7729c07ccd063501acd04e77c7730f5 Mon Sep 17 00:00:00 2001
+From 9072f5e1e00cfadece396e998461fb5c30e1eef0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08895f10e7729c07ccd063501acd04e77c7730f5 ]
+
@@ -11,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -22 +22 @@
-index 1e6dfe0753..9abb30c39f 100644
+index c02802c18e..d5bfbcec3e 100644
@@ -25 +25 @@
-@@ -330,3 +330,12 @@ if get_option('b_lto')
+@@ -303,3 +303,12 @@ if get_option('b_lto')

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

* [dpdk-stable] patch 'eal: fix reciprocal header include' 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
                   ` (175 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'telemetry: fix missing " luca.boccassi
                   ` (97 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/ceabc10d763cdc45a67ede075b4600cf57d92bcf

Thanks.

Luca Boccassi

---
From ceabc10d763cdc45a67ede075b4600cf57d92bcf Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:33 +0000
Subject: [PATCH] eal: fix reciprocal header include

[ upstream commit 8fc617099ec28e4690e460461f8872ae7b50e86a ]

The rte_reciprocal header file used standard __rte_always_inline from
rte_common.h but does not include that header file, leading to compiler
errors when the reciprocal header is included alone.

Fixes: 6d45659eacb8 ("eal: add u64-bit variant for reciprocal divide")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/include/rte_reciprocal.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/include/rte_reciprocal.h b/lib/librte_eal/include/rte_reciprocal.h
index 63e16fde0a..735adb029b 100644
--- a/lib/librte_eal/include/rte_reciprocal.h
+++ b/lib/librte_eal/include/rte_reciprocal.h
@@ -27,6 +27,8 @@
 
 #include <stdint.h>
 
+#include <rte_common.h>
+
 struct rte_reciprocal {
 	uint32_t m;
 	uint8_t sh1, sh2;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.199105288 +0000
+++ 0178-eal-fix-reciprocal-header-include.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From 8fc617099ec28e4690e460461f8872ae7b50e86a Mon Sep 17 00:00:00 2001
+From ceabc10d763cdc45a67ede075b4600cf57d92bcf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8fc617099ec28e4690e460461f8872ae7b50e86a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'telemetry: fix missing header include' 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
                   ` (176 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'eal: fix reciprocal header include' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: " luca.boccassi
                   ` (96 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/3a35f5f961a270a64df4fb00d3b47b464cdffefd

Thanks.

Luca Boccassi

---
From 3a35f5f961a270a64df4fb00d3b47b464cdffefd Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:34 +0000
Subject: [PATCH] telemetry: fix missing header include

[ upstream commit 354e43b1aa082e74239000a42673a8b247787481 ]

The telemetry header file uses the rte_cpuset_t type, but does not
include any header providing that type. Include rte_os.h to provide the
necessary type.

Fixes: febbebf7f255 ("telemetry: keep threads separate from data plane")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_telemetry/rte_telemetry.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index 4693275c24..76172222c9 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -4,7 +4,9 @@
 
 #include <stdint.h>
 #include <sched.h>
+
 #include <rte_compat.h>
+#include <rte_os.h>
 
 #ifndef _RTE_TELEMETRY_H_
 #define _RTE_TELEMETRY_H_
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.238331309 +0000
+++ 0179-telemetry-fix-missing-header-include.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From 354e43b1aa082e74239000a42673a8b247787481 Mon Sep 17 00:00:00 2001
+From 3a35f5f961a270a64df4fb00d3b47b464cdffefd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 354e43b1aa082e74239000a42673a8b247787481 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'ethdev: fix missing header include' 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
                   ` (177 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'telemetry: fix missing " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'net: " luca.boccassi
                   ` (95 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Andrew Rybchenko, 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/e40bd3ef0153bff60c7631ffbd4485b934a72c70

Thanks.

Luca Boccassi

---
From e40bd3ef0153bff60c7631ffbd4485b934a72c70 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:35 +0000
Subject: [PATCH] ethdev: fix missing header include

[ upstream commit ebbd4d33d78555f083033d7bbf5668eecb285b94 ]

The define for RTE_ETH_FLOW_MAX is defined in rte_ethdev.h, so that
header should be included in rte_eth_ctrl.h to allow it to be compiled
independently.

Fixes: 7fa96d696f2c ("ethdev: unification of flow types")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_ethdev/rte_eth_ctrl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h
index 1cca522fa3..8a50dbfef9 100644
--- a/lib/librte_ethdev/rte_eth_ctrl.h
+++ b/lib/librte_ethdev/rte_eth_ctrl.h
@@ -9,6 +9,7 @@
 #include <rte_common.h>
 #include <rte_ether.h>
 #include "rte_flow.h"
+#include "rte_ethdev.h"
 
 /**
  * @deprecated Please use rte_flow API instead of this legacy one.
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.282883100 +0000
+++ 0180-ethdev-fix-missing-header-include.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From ebbd4d33d78555f083033d7bbf5668eecb285b94 Mon Sep 17 00:00:00 2001
+From e40bd3ef0153bff60c7631ffbd4485b934a72c70 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ebbd4d33d78555f083033d7bbf5668eecb285b94 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net: fix missing header include' 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
                   ` (178 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'mbuf: " luca.boccassi
                   ` (94 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ophir Munk, 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/dcec6bcfee3693f88953821f20ec6fc2dbd9540c

Thanks.

Luca Boccassi

---
From dcec6bcfee3693f88953821f20ec6fc2dbd9540c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:36 +0000
Subject: [PATCH] net: fix missing header include

[ upstream commit a6bf1fd8170da8b5f58e5421091502b9879f650e ]

The Geneve protocol header file is missing the rte_byteorder.h header.

Fixes: ea0e711b8ae0 ("app/testpmd: add GENEVE parsing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ophir Munk <ophirmu@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_net/rte_geneve.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_net/rte_geneve.h b/lib/librte_net/rte_geneve.h
index bb67724c31..3bbc561847 100644
--- a/lib/librte_net/rte_geneve.h
+++ b/lib/librte_net/rte_geneve.h
@@ -12,6 +12,8 @@
  */
 #include <stdint.h>
 
+#include <rte_byteorder.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.323478222 +0000
+++ 0181-net-fix-missing-header-include.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From a6bf1fd8170da8b5f58e5421091502b9879f650e Mon Sep 17 00:00:00 2001
+From dcec6bcfee3693f88953821f20ec6fc2dbd9540c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a6bf1fd8170da8b5f58e5421091502b9879f650e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'mbuf: fix missing header include' 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
                   ` (179 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'net: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'bitrate: " luca.boccassi
                   ` (93 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Andrew Rybchenko, 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/d46998a2a459c502103112edc11c47a5a22bf5a7

Thanks.

Luca Boccassi

---
From d46998a2a459c502103112edc11c47a5a22bf5a7 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:37 +0000
Subject: [PATCH] mbuf: fix missing header include

[ upstream commit b7c0591fd6117be644b16fc85bfdb2bbb362820f ]

The rte_mbuf_dyn.h header file uses a number of types and macros without
including the required header files to get the definitions of those
macros/types.  Similarly, the rte_mbuf_core.h file was missing an
include for rte_byteorder.h header.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Fixes: 3eb860b08eb7 ("mbuf: move definitions into a separate file")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_mbuf/rte_mbuf_core.h | 2 ++
 lib/librte_mbuf/rte_mbuf_dyn.h  | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 567551deab..a85cabdd18 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -17,7 +17,9 @@
  */
 
 #include <stdint.h>
+
 #include <rte_compat.h>
+#include <rte_byteorder.h>
 #include <generic/rte_atomic.h>
 
 #ifdef __cplusplus
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index fc4eee71d0..13f06d8ed2 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -66,8 +66,12 @@
  * - any name that does not start with "rte_" in an application
  */
 
+#include <stdio.h>
+#include <stdint.h>
 #include <sys/types.h>
 
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.366782768 +0000
+++ 0182-mbuf-fix-missing-header-include.patch	2021-02-05 11:18:29.138697432 +0000
@@ -1 +1 @@
-From b7c0591fd6117be644b16fc85bfdb2bbb362820f Mon Sep 17 00:00:00 2001
+From d46998a2a459c502103112edc11c47a5a22bf5a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b7c0591fd6117be644b16fc85bfdb2bbb362820f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bitrate: fix missing header include' 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
                   ` (180 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'mbuf: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'rib: fix missing header includes' " luca.boccassi
                   ` (92 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/cea9c3719c6c34f8f823742422f044118de0abfe

Thanks.

Luca Boccassi

---
From cea9c3719c6c34f8f823742422f044118de0abfe Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:38 +0000
Subject: [PATCH] bitrate: fix missing header include

[ upstream commit 29a3ec7f0e99903fd0950898892dd164745e0aae ]

The rte_compat.h header file must be included to get the definition of
__rte_experimental.

Fixes: f030bff72f81 ("bitrate: add free function")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_bitratestats/rte_bitrate.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index 4865929e8f..fcd1564ddc 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -7,6 +7,8 @@
 
 #include <stdint.h>
 
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.405076860 +0000
+++ 0183-bitrate-fix-missing-header-include.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From 29a3ec7f0e99903fd0950898892dd164745e0aae Mon Sep 17 00:00:00 2001
+From cea9c3719c6c34f8f823742422f044118de0abfe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29a3ec7f0e99903fd0950898892dd164745e0aae ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'rib: fix missing header includes' 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
                   ` (181 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'bitrate: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'vhost: " luca.boccassi
                   ` (91 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Vladimir Medvedkin, 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/9a6e70d770ee98b71f0202dc66fbef82dc4fac9d

Thanks.

Luca Boccassi

---
From 9a6e70d770ee98b71f0202dc66fbef82dc4fac9d Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:39 +0000
Subject: [PATCH] rib: fix missing header includes

[ upstream commit 585617c32008f1f75d8830b7b2f7e2b191e40508 ]

The standard integer types, and the size_t types are missing their
required header includes in the rib header file.

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

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_rib/rte_rib.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h
index f80752e5bd..ec97079c35 100644
--- a/lib/librte_rib/rte_rib.h
+++ b/lib/librte_rib/rte_rib.h
@@ -18,6 +18,9 @@
  * Level compressed tree implementation for IPv4 Longest Prefix Match
  */
 
+#include <stdlib.h>
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 #ifdef __cplusplus
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.448641906 +0000
+++ 0184-rib-fix-missing-header-includes.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From 585617c32008f1f75d8830b7b2f7e2b191e40508 Mon Sep 17 00:00:00 2001
+From 9a6e70d770ee98b71f0202dc66fbef82dc4fac9d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 585617c32008f1f75d8830b7b2f7e2b191e40508 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'vhost: fix missing header includes' 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
                   ` (182 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'rib: fix missing header includes' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'ipsec: fix missing header include' " luca.boccassi
                   ` (90 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Maxime Coquelin, 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/f00a750c1f06fc536b48445af783cd98d9fb1ca3

Thanks.

Luca Boccassi

---
From f00a750c1f06fc536b48445af783cd98d9fb1ca3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:40 +0000
Subject: [PATCH] vhost: fix missing header includes

[ upstream commit 820778fad6fad2c1570efe9b25c81d068bbdcd30 ]

The vhost header files were missing definitions from headers to allow
them to be compiled up individually.

Fixes: d7280c9fffcb ("vhost: support selective datapath")
Fixes: a49f758d1170 ("vhost: split vDPA header file")
Fixes: 939066d96563 ("vhost/crypto: add public function implementation")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_vhost/rte_vdpa.h         | 2 ++
 lib/librte_vhost/rte_vdpa_dev.h     | 1 +
 lib/librte_vhost/rte_vhost_crypto.h | 8 ++++++++
 3 files changed, 11 insertions(+)

diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
index f074ec0c4a..1437f400bf 100644
--- a/lib/librte_vhost/rte_vdpa.h
+++ b/lib/librte_vhost/rte_vdpa.h
@@ -11,6 +11,8 @@
  * Device specific vhost lib
  */
 
+#include <stdint.h>
+
 /** Maximum name length for statistics counters */
 #define RTE_VDPA_STATS_NAME_SIZE 64
 
diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h
index a60183f780..bfada387b0 100644
--- a/lib/librte_vhost/rte_vdpa_dev.h
+++ b/lib/librte_vhost/rte_vdpa_dev.h
@@ -8,6 +8,7 @@
 #include <stdbool.h>
 
 #include "rte_vhost.h"
+#include "rte_vdpa.h"
 
 #define RTE_VHOST_QUEUE_ALL UINT16_MAX
 
diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
index c809c46a21..8531757285 100644
--- a/lib/librte_vhost/rte_vhost_crypto.h
+++ b/lib/librte_vhost/rte_vhost_crypto.h
@@ -5,6 +5,14 @@
 #ifndef _VHOST_CRYPTO_H_
 #define _VHOST_CRYPTO_H_
 
+#include <stdint.h>
+
+#include <rte_compat.h>
+
+/* pre-declare structs to avoid including full headers */
+struct rte_mempool;
+struct rte_crypto_op;
+
 #define VHOST_CRYPTO_MBUF_POOL_SIZE		(8192)
 #define VHOST_CRYPTO_MAX_BURST_SIZE		(64)
 #define VHOST_CRYPTO_MAX_DATA_SIZE		(4096)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.487908101 +0000
+++ 0185-vhost-fix-missing-header-includes.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From 820778fad6fad2c1570efe9b25c81d068bbdcd30 Mon Sep 17 00:00:00 2001
+From f00a750c1f06fc536b48445af783cd98d9fb1ca3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 820778fad6fad2c1570efe9b25c81d068bbdcd30 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'ipsec: fix missing header include' 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
                   ` (183 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'vhost: " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'fib: fix missing header includes' " luca.boccassi
                   ` (89 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Konstantin Ananyev, Vladimir Medvedkin, 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/91e11a6a3f0fae17e88ea508565af594dbfdc90c

Thanks.

Luca Boccassi

---
From 91e11a6a3f0fae17e88ea508565af594dbfdc90c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:41 +0000
Subject: [PATCH] ipsec: fix missing header include

[ upstream commit 071b9b78c441ee6f87775651fb2080061704d901 ]

The rte_ipsec_sad.h header used the standard uintXX_t types, but did not
include stdint.h header for them.

Fixes: 401633d9c112 ("ipsec: add inbound SAD API")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_ipsec/rte_ipsec_sad.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_ipsec/rte_ipsec_sad.h b/lib/librte_ipsec/rte_ipsec_sad.h
index 3e67ab1e4b..b65d295831 100644
--- a/lib/librte_ipsec/rte_ipsec_sad.h
+++ b/lib/librte_ipsec/rte_ipsec_sad.h
@@ -6,6 +6,8 @@
 #ifndef _RTE_IPSEC_SAD_H_
 #define _RTE_IPSEC_SAD_H_
 
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 /**
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.528642339 +0000
+++ 0186-ipsec-fix-missing-header-include.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From 071b9b78c441ee6f87775651fb2080061704d901 Mon Sep 17 00:00:00 2001
+From 91e11a6a3f0fae17e88ea508565af594dbfdc90c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 071b9b78c441ee6f87775651fb2080061704d901 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'fib: fix missing header includes' 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
                   ` (184 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'ipsec: fix missing header include' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'table: fix missing header include' " luca.boccassi
                   ` (88 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Vladimir Medvedkin, 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/c98913bfada8867d08491c3b2e318e0dfb948b91

Thanks.

Luca Boccassi

---
From c98913bfada8867d08491c3b2e318e0dfb948b91 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:42 +0000
Subject: [PATCH] fib: fix missing header includes

[ upstream commit f5bf8249d52527345100b2f3d703b15edaabf088 ]

Add stdint.h to get definitions of standard integer types

Fixes: 39e927248416 ("fib: add FIB library")
Fixes: 40d41a8a7b34 ("fib: support IPv6")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_fib/rte_fib.h  | 2 ++
 lib/librte_fib/rte_fib6.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h
index fef0749525..acad20963c 100644
--- a/lib/librte_fib/rte_fib.h
+++ b/lib/librte_fib/rte_fib.h
@@ -19,6 +19,8 @@
  * for IPv4 Longest Prefix Match
  */
 
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 #ifdef __cplusplus
diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h
index 668bffb2ba..0e193b8e7b 100644
--- a/lib/librte_fib/rte_fib6.h
+++ b/lib/librte_fib/rte_fib6.h
@@ -19,6 +19,8 @@
  * for IPv6 Longest Prefix Match
  */
 
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 #ifdef __cplusplus
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.570258508 +0000
+++ 0187-fib-fix-missing-header-includes.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From f5bf8249d52527345100b2f3d703b15edaabf088 Mon Sep 17 00:00:00 2001
+From c98913bfada8867d08491c3b2e318e0dfb948b91 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5bf8249d52527345100b2f3d703b15edaabf088 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'table: fix missing header include' 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
                   ` (185 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'fib: fix missing header includes' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'pipeline: fix missing header includes' " luca.boccassi
                   ` (87 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/b7afbabcfeb813edd3d8852b982ac63ab5596125

Thanks.

Luca Boccassi

---
From b7afbabcfeb813edd3d8852b982ac63ab5596125 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:43 +0000
Subject: [PATCH] table: fix missing header include

[ upstream commit 3b4d434e531acafed757b80d14f4b5bb57d1d4aa ]

The rte_lru_x86.h header, included from the main rte_lru.h header, uses
the RTE_CC_IS_GNU macro from rte_common.h but fails to include that
header file.

Fixes: 0c9a5735a947 ("eal: fix compiler detection in public headers")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_table/rte_lru_x86.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_table/rte_lru_x86.h b/lib/librte_table/rte_lru_x86.h
index 0e24906c2c..38476d956e 100644
--- a/lib/librte_table/rte_lru_x86.h
+++ b/lib/librte_table/rte_lru_x86.h
@@ -12,6 +12,7 @@ extern "C" {
 #include <stdint.h>
 
 #include <rte_config.h>
+#include <rte_common.h>
 
 #ifndef RTE_TABLE_HASH_LRU_STRATEGY
 #define RTE_TABLE_HASH_LRU_STRATEGY                        2
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.606496164 +0000
+++ 0188-table-fix-missing-header-include.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From 3b4d434e531acafed757b80d14f4b5bb57d1d4aa Mon Sep 17 00:00:00 2001
+From b7afbabcfeb813edd3d8852b982ac63ab5596125 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b4d434e531acafed757b80d14f4b5bb57d1d4aa ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'pipeline: fix missing header includes' 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
                   ` (186 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'table: fix missing header include' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'metrics: fix variable declaration in header' " luca.boccassi
                   ` (86 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/1bc86cf411d7b6ce3edbae7307d94474c20d6160

Thanks.

Luca Boccassi

---
From 1bc86cf411d7b6ce3edbae7307d94474c20d6160 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:44 +0000
Subject: [PATCH] pipeline: fix missing header includes

[ upstream commit cd93ec896191060310ec8761b3a10a5e02bc841c ]

The stdio.h header needs to be included to get the definition of the
FILE type.

Fixes: b32c0a2c5e4c ("pipeline: add SWX table update high level API")
Fixes: 3ca60ceed79a ("pipeline: add SWX pipeline specification file")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_pipeline/rte_swx_ctl.h      | 1 +
 lib/librte_pipeline/rte_swx_pipeline.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_pipeline/rte_swx_ctl.h b/lib/librte_pipeline/rte_swx_ctl.h
index bab1894944..32815b69e2 100644
--- a/lib/librte_pipeline/rte_swx_ctl.h
+++ b/lib/librte_pipeline/rte_swx_ctl.h
@@ -15,6 +15,7 @@ extern "C" {
 
 #include <stddef.h>
 #include <stdint.h>
+#include <stdio.h>
 
 #include <rte_compat.h>
 
diff --git a/lib/librte_pipeline/rte_swx_pipeline.h b/lib/librte_pipeline/rte_swx_pipeline.h
index d0a3439edf..f0a2cef777 100644
--- a/lib/librte_pipeline/rte_swx_pipeline.h
+++ b/lib/librte_pipeline/rte_swx_pipeline.h
@@ -15,6 +15,7 @@ extern "C" {
 
 #include <stddef.h>
 #include <stdint.h>
+#include <stdio.h>
 
 #include <rte_compat.h>
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.643653760 +0000
+++ 0189-pipeline-fix-missing-header-includes.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From cd93ec896191060310ec8761b3a10a5e02bc841c Mon Sep 17 00:00:00 2001
+From 1bc86cf411d7b6ce3edbae7307d94474c20d6160 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cd93ec896191060310ec8761b3a10a5e02bc841c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'metrics: fix variable declaration in 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
                   ` (187 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'pipeline: fix missing header includes' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'node: fix missing header include' " luca.boccassi
                   ` (85 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/6946b6cff01bbdb17fd799d3b25610ccd5cf09a4

Thanks.

Luca Boccassi

---
From 6946b6cff01bbdb17fd799d3b25610ccd5cf09a4 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:45 +0000
Subject: [PATCH] metrics: fix variable declaration in header

[ upstream commit 701283309404e394693fba46ed71834593af808e ]

The global variable "tel_met_data" was declared in a header file, rather
than in a C file, leading to duplicate definitions if more than one C
file included the header.

Fixes: c5b7197f662e ("telemetry: move some functions to metrics library")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_metrics/rte_metrics_telemetry.c | 2 ++
 lib/librte_metrics/rte_metrics_telemetry.h | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_metrics/rte_metrics_telemetry.c b/lib/librte_metrics/rte_metrics_telemetry.c
index 901cbeb0a3..b8ee56ef01 100644
--- a/lib/librte_metrics/rte_metrics_telemetry.c
+++ b/lib/librte_metrics/rte_metrics_telemetry.c
@@ -13,6 +13,8 @@
 #include "rte_metrics.h"
 #include "rte_metrics_telemetry.h"
 
+struct telemetry_metrics_data tel_met_data;
+
 int metrics_log_level;
 
 /* Logging Macros */
diff --git a/lib/librte_metrics/rte_metrics_telemetry.h b/lib/librte_metrics/rte_metrics_telemetry.h
index 3435a55425..5dbb32ca0c 100644
--- a/lib/librte_metrics/rte_metrics_telemetry.h
+++ b/lib/librte_metrics/rte_metrics_telemetry.h
@@ -34,8 +34,6 @@ struct telemetry_metrics_data {
 	int metrics_register_done;
 };
 
-struct telemetry_metrics_data tel_met_data;
-
 __rte_experimental
 int32_t rte_metrics_tel_reg_all_ethdev(int *metrics_register_done,
 		int *reg_index_list);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.682600593 +0000
+++ 0190-metrics-fix-variable-declaration-in-header.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From 701283309404e394693fba46ed71834593af808e Mon Sep 17 00:00:00 2001
+From 6946b6cff01bbdb17fd799d3b25610ccd5cf09a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 701283309404e394693fba46ed71834593af808e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'node: fix missing header include' 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
                   ` (188 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'metrics: fix variable declaration in header' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'app: fix build with extra include paths' " luca.boccassi
                   ` (84 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/bd76caab7ec34e9506d3efe8e521196831d7b7d5

Thanks.

Luca Boccassi

---
From bd76caab7ec34e9506d3efe8e521196831d7b7d5 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:46 +0000
Subject: [PATCH] node: fix missing header include

[ upstream commit b9a396b0fd4e04c107254768199007c3963510ee ]

The rte_compat header file is needed for the '__rte_experimental' macro.

Fixes: f00708c2aa53 ("node: add IPv4 rewrite and lookup control")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_node/rte_node_ip4_api.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_node/rte_node_ip4_api.h b/lib/librte_node/rte_node_ip4_api.h
index eb9ebd5f89..46d0d8976b 100644
--- a/lib/librte_node/rte_node_ip4_api.h
+++ b/lib/librte_node/rte_node_ip4_api.h
@@ -21,6 +21,7 @@ extern "C" {
 #endif
 
 #include <rte_common.h>
+#include <rte_compat.h>
 
 /**
  * IP4 lookup next nodes.
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.723597622 +0000
+++ 0191-node-fix-missing-header-include.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From b9a396b0fd4e04c107254768199007c3963510ee Mon Sep 17 00:00:00 2001
+From bd76caab7ec34e9506d3efe8e521196831d7b7d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9a396b0fd4e04c107254768199007c3963510ee ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app: fix build with extra include paths' 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
                   ` (189 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'node: fix missing header include' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:17 ` [dpdk-stable] patch 'examples/pipeline: fix VXLAN script permission' " luca.boccassi
                   ` (83 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: Bruce Richardson; +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/1594f31afde9a181b09efb4bdd5c7a7864ed5658

Thanks.

Luca Boccassi

---
From 1594f31afde9a181b09efb4bdd5c7a7864ed5658 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:47 +0000
Subject: [PATCH] app: fix build with extra include paths

[ upstream commit 64fd2124301eb246f12c316f9f619e36cf6d1bdc ]

The "includes" variable in the app/meson.build file was ignored when
building the executable, meaning that apps couldn't pass additional
include paths directly back. Fix this to align with drivers and libs.

Fixes: fa036e70d794 ("app: generalize meson build")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/meson.build b/app/meson.build
index 903117b866..87fc195dbf 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -66,6 +66,7 @@ foreach app:apps
 				link_args: ldflags,
 				link_whole: link_libs,
 				dependencies: dep_objs,
+				include_directories: includes,
 				install_rpath: join_paths(get_option('prefix'),
 						 driver_install_path),
 				install: true)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.760119246 +0000
+++ 0192-app-fix-build-with-extra-include-paths.patch	2021-02-05 11:18:29.142697509 +0000
@@ -1 +1 @@
-From 64fd2124301eb246f12c316f9f619e36cf6d1bdc Mon Sep 17 00:00:00 2001
+From 1594f31afde9a181b09efb4bdd5c7a7864ed5658 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 64fd2124301eb246f12c316f9f619e36cf6d1bdc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/pipeline: fix VXLAN script permission' 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
                   ` (190 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'app: fix build with extra include paths' " luca.boccassi
@ 2021-02-05 11:17 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'build: force pkg-config for dependency detection' " luca.boccassi
                   ` (82 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:17 UTC (permalink / raw)
  To: David Marchand; +Cc: Timothy Redaelli, Cristian Dumitrescu, 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/5cc7fd3ffaa5f3c1f277aeb90b1b4e5bf2b95c0c

Thanks.

Luca Boccassi

---
From 5cc7fd3ffaa5f3c1f277aeb90b1b4e5bf2b95c0c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 22 Jan 2021 10:30:37 +0100
Subject: [PATCH] examples/pipeline: fix VXLAN script permission

[ upstream commit 6c51ba3c42a3784b0cb5f4cafe0c5276b687b49d ]

This python script provides a shebang that only makes sense if the
script has the executable bit set.

Fixes: fde7a772701a ("examples/pipeline: add VXLAN encapsulation example")

Reported-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/pipeline/examples/vxlan_table.py | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 examples/pipeline/examples/vxlan_table.py

diff --git a/examples/pipeline/examples/vxlan_table.py b/examples/pipeline/examples/vxlan_table.py
old mode 100644
new mode 100755
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.804306620 +0000
+++ 0193-examples-pipeline-fix-VXLAN-script-permission.patch	2021-02-05 11:18:29.146697586 +0000
@@ -1 +1 @@
-From 6c51ba3c42a3784b0cb5f4cafe0c5276b687b49d Mon Sep 17 00:00:00 2001
+From 5cc7fd3ffaa5f3c1f277aeb90b1b4e5bf2b95c0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c51ba3c42a3784b0cb5f4cafe0c5276b687b49d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'build: force pkg-config for dependency detection' 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
                   ` (191 preceding siblings ...)
  2021-02-05 11:17 ` [dpdk-stable] patch 'examples/pipeline: fix VXLAN script permission' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/procinfo: fix security context info' " luca.boccassi
                   ` (81 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Ruifeng Wang, Liron Himi, Lee Daly, Hemant Agrawal,
	Martin Spinler, 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/0b48c2e92cbf6db4879620ef853ebea5db6e59de

Thanks.

Luca Boccassi

---
From 0b48c2e92cbf6db4879620ef853ebea5db6e59de Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 18 Jan 2021 14:29:57 +0000
Subject: [PATCH] build: force pkg-config for dependency detection

[ upstream commit 7be7dc6dea927da7d458cb4172d70338f9eea164 ]

Meson can use cmake as a fallback for detecting packages, and this can
lead to picking up 64-libs for 32-bit builds. To work around this, force
the use of pkg-config only for detecting libcrypto, zlib, jansson and
other package dependencies.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Liron Himi <lironh@marvell.com>
Tested-by: Lee Daly <lee.daly@intel.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Martin Spinler <spinler@cesnet.cz>
---
 app/test/meson.build                  | 2 +-
 config/meson.build                    | 2 +-
 drivers/common/mlx5/linux/meson.build | 3 ++-
 drivers/common/qat/meson.build        | 2 +-
 drivers/compress/isal/meson.build     | 2 +-
 drivers/compress/zlib/meson.build     | 2 +-
 drivers/crypto/armv8/meson.build      | 2 +-
 drivers/crypto/ccp/meson.build        | 2 +-
 drivers/crypto/openssl/meson.build    | 2 +-
 drivers/crypto/qat/meson.build        | 2 +-
 drivers/net/af_xdp/meson.build        | 5 +++--
 drivers/net/bnx2x/meson.build         | 2 +-
 drivers/net/mlx4/meson.build          | 3 ++-
 drivers/net/nfb/meson.build           | 2 +-
 drivers/net/szedata2/meson.build      | 2 +-
 examples/vm_power_manager/meson.build | 2 +-
 lib/librte_bpf/meson.build            | 2 +-
 lib/librte_metrics/meson.build        | 2 +-
 18 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 94fd39fecb..bdbc619476 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -406,7 +406,7 @@ cflags += ['-DALLOW_INTERNAL_API']
 
 test_dep_objs = []
 if dpdk_conf.has('RTE_LIB_COMPRESSDEV')
-	compress_test_dep = dependency('zlib', required: false)
+	compress_test_dep = dependency('zlib', required: false, method: 'pkg-config')
 	if compress_test_dep.found()
 		test_dep_objs += compress_test_dep
 		test_sources += 'test_compressdev.c'
diff --git a/config/meson.build b/config/meson.build
index d5bfbcec3e..2f150de3b8 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -160,7 +160,7 @@ if fdt_dep.found() and cc.has_header('fdt.h')
 endif
 
 # check for libbsd
-libbsd = dependency('libbsd', required: false)
+libbsd = dependency('libbsd', required: false, method: 'pkg-config')
 if libbsd.found()
 	dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 63b78e4bce..fa9686fdaf 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -19,7 +19,8 @@ endif
 libnames = [ 'mlx5', 'ibverbs' ]
 libs = []
 foreach libname:libnames
-	lib = dependency('lib' + libname, static:static_ibverbs, required:false)
+	lib = dependency('lib' + libname, static:static_ibverbs,
+			required:false, method: 'pkg-config')
 	if not lib.found() and not static_ibverbs
 		lib = cc.find_library(libname, required:false)
 	endif
diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index 29e1299f20..b2915c91fe 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -23,7 +23,7 @@ if disabled_drivers.contains(qat_compress_path)
 			'Explicitly disabled via build config')
 endif
 
-libcrypto = dependency('libcrypto', required: false)
+libcrypto = dependency('libcrypto', required: false, method: 'pkg-config')
 if qat_crypto and not libcrypto.found()
 	qat_crypto = false
 	dpdk_drvs_disabled += qat_crypto_path
diff --git a/drivers/compress/isal/meson.build b/drivers/compress/isal/meson.build
index 5ee17e28f5..d847c2ea6f 100644
--- a/drivers/compress/isal/meson.build
+++ b/drivers/compress/isal/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2018 Intel Corporation
 
-dep = dependency('libisal', required: false)
+dep = dependency('libisal', required: false, method: 'pkg-config')
 if not dep.found()
 	build = false
 	reason = 'missing dependency, "libisal"'
diff --git a/drivers/compress/zlib/meson.build b/drivers/compress/zlib/meson.build
index b19a6d2b16..82cf0dddd6 100644
--- a/drivers/compress/zlib/meson.build
+++ b/drivers/compress/zlib/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Cavium Networks
 
-dep = dependency('zlib', required: false)
+dep = dependency('zlib', required: false, method: 'pkg-config')
 if not dep.found()
 	build = false
 	reason = 'missing dependency, "zlib"'
diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build
index 3289a2adca..027173bc1e 100644
--- a/drivers/crypto/armv8/meson.build
+++ b/drivers/crypto/armv8/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Arm Limited
 
-dep = dependency('libAArch64crypto', required: false)
+dep = dependency('libAArch64crypto', required: false, method: 'pkg-config')
 if not dep.found()
 	build = false
 	reason = 'missing dependency, "libAArch64crypto"'
diff --git a/drivers/crypto/ccp/meson.build b/drivers/crypto/ccp/meson.build
index a0e0b379eb..ff66427ae8 100644
--- a/drivers/crypto/ccp/meson.build
+++ b/drivers/crypto/ccp/meson.build
@@ -5,7 +5,7 @@ if not is_linux
 	build = false
 	reason = 'only supported on Linux'
 endif
-dep = dependency('libcrypto', required: false)
+dep = dependency('libcrypto', required: false, method: 'pkg-config')
 if not dep.found()
 	build = false
 	reason = 'missing dependency, "libcrypto"'
diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build
index d9ac698971..47fb2bb751 100644
--- a/drivers/crypto/openssl/meson.build
+++ b/drivers/crypto/openssl/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-dep = dependency('libcrypto', required: false)
+dep = dependency('libcrypto', required: false, method: 'pkg-config')
 if not dep.found()
 	build = false
 	reason = 'missing dependency, "libcrypto"'
diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build
index bc90ec44cc..92e0ed6565 100644
--- a/drivers/crypto/qat/meson.build
+++ b/drivers/crypto/qat/meson.build
@@ -5,7 +5,7 @@
 # driver which comes later. Here we just add our sources files to the list
 build = false
 reason = '' # sentinal value to suppress printout
-dep = dependency('libcrypto', required: false)
+dep = dependency('libcrypto', required: false, method: 'pkg-config')
 qat_includes += include_directories('.')
 qat_deps += 'cryptodev'
 qat_deps += 'net'
diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index fead8dd99f..ae7355c8c9 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -3,14 +3,15 @@
 
 sources = files('rte_eth_af_xdp.c')
 
-bpf_dep = dependency('libbpf', required: false)
+bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
 if not bpf_dep.found()
 	bpf_dep = cc.find_library('bpf', required: false)
 endif
 
 if bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('linux/if_xdp.h')
 	ext_deps += bpf_dep
-	bpf_ver_dep = dependency('libbpf', version : '>=0.2.0', required: false)
+	bpf_ver_dep = dependency('libbpf', version : '>=0.2.0',
+			required: false, method: 'pkg-config')
 	if bpf_ver_dep.found()
 		dpdk_conf.set('RTE_LIBRTE_AF_XDP_PMD_SHARED_UMEM', 1)
 	endif
diff --git a/drivers/net/bnx2x/meson.build b/drivers/net/bnx2x/meson.build
index 4892bb234c..9801697949 100644
--- a/drivers/net/bnx2x/meson.build
+++ b/drivers/net/bnx2x/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-dep = dependency('zlib', required: false)
+dep = dependency('zlib', required: false, method: 'pkg-config')
 build = dep.found()
 reason = 'missing dependency, "zlib"'
 ext_deps += dep
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 0cf9938a88..d7602b748e 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -24,7 +24,8 @@ endif
 libnames = [ 'mlx4', 'ibverbs' ]
 libs = []
 foreach libname:libnames
-	lib = dependency('lib' + libname, static:static_ibverbs, required:false)
+	lib = dependency('lib' + libname, static:static_ibverbs,
+			required:false, method: 'pkg-config')
 	if not lib.found() and not static_ibverbs
 		lib = cc.find_library(libname, required:false)
 	endif
diff --git a/drivers/net/nfb/meson.build b/drivers/net/nfb/meson.build
index d53e8eca7d..995c44c61c 100644
--- a/drivers/net/nfb/meson.build
+++ b/drivers/net/nfb/meson.build
@@ -3,7 +3,7 @@
 # Copyright(c) 2019 Netcope Technologies, a.s. <info@netcope.com>
 # All rights reserved.
 
-dep = dependency('netcope-common', required: false)
+dep = dependency('netcope-common', required: false, method: 'pkg-config')
 reason = 'missing dependency, "libnfb"'
 build = dep.found()
 ext_deps += dep
diff --git a/drivers/net/szedata2/meson.build b/drivers/net/szedata2/meson.build
index b53fcbc591..77a5b0ed80 100644
--- a/drivers/net/szedata2/meson.build
+++ b/drivers/net/szedata2/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-dep = dependency('libsze2', required: false)
+dep = dependency('libsze2', required: false, method: 'pkg-config')
 build = dep.found()
 reason = 'missing dependency, "libsze2"'
 ext_deps += dep
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index 1f813fbe87..637bd23235 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -41,7 +41,7 @@ opt_dep = cc.find_library('virt', required : false)
 build = opt_dep.found()
 ext_deps += opt_dep
 
-opt_dep = dependency('jansson', required : false)
+opt_dep = dependency('jansson', required : false, method: 'pkg-config')
 if opt_dep.found()
 	ext_deps += opt_dep
 	cflags += '-DUSE_JANSSON'
diff --git a/lib/librte_bpf/meson.build b/lib/librte_bpf/meson.build
index 48460e9505..614277effd 100644
--- a/lib/librte_bpf/meson.build
+++ b/lib/librte_bpf/meson.build
@@ -19,7 +19,7 @@ headers = files('bpf_def.h',
 
 deps += ['mbuf', 'net', 'ethdev']
 
-dep = dependency('libelf', required: false)
+dep = dependency('libelf', required: false, method: 'pkg-config')
 if dep.found()
 	dpdk_conf.set('RTE_LIBRTE_BPF_ELF', 1)
 	sources += files('bpf_load_elf.c')
diff --git a/lib/librte_metrics/meson.build b/lib/librte_metrics/meson.build
index eed27b880a..28a8cc1155 100644
--- a/lib/librte_metrics/meson.build
+++ b/lib/librte_metrics/meson.build
@@ -4,7 +4,7 @@
 sources = files('rte_metrics.c')
 headers = files('rte_metrics.h')
 
-jansson = dependency('jansson', required: false)
+jansson = dependency('jansson', required: false, method: 'pkg-config')
 if jansson.found()
 	ext_deps += jansson
 	sources += files('rte_metrics_telemetry.c')
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.839618434 +0000
+++ 0194-build-force-pkg-config-for-dependency-detection.patch	2021-02-05 11:18:29.146697586 +0000
@@ -1 +1 @@
-From 7be7dc6dea927da7d458cb4172d70338f9eea164 Mon Sep 17 00:00:00 2001
+From 0b48c2e92cbf6db4879620ef853ebea5db6e59de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7be7dc6dea927da7d458cb4172d70338f9eea164 ]
+
@@ -11,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -23 +22,0 @@
- drivers/common/mvep/meson.build       | 2 +-
@@ -29 +27,0 @@
- drivers/crypto/mvsam/meson.build      | 2 +-
@@ -35,2 +32,0 @@
- drivers/net/mvneta/meson.build        | 2 +-
- drivers/net/mvpp2/meson.build         | 2 +-
@@ -42 +38 @@
- 22 files changed, 26 insertions(+), 23 deletions(-)
+ 18 files changed, 22 insertions(+), 19 deletions(-)
@@ -45 +41 @@
-index 0889ad4c23..561e493a29 100644
+index 94fd39fecb..bdbc619476 100644
@@ -48 +44 @@
-@@ -408,7 +408,7 @@ cflags += ['-DALLOW_INTERNAL_API']
+@@ -406,7 +406,7 @@ cflags += ['-DALLOW_INTERNAL_API']
@@ -58 +54 @@
-index 9abb30c39f..3cf560b8a3 100644
+index d5bfbcec3e..2f150de3b8 100644
@@ -61 +57 @@
-@@ -167,7 +167,7 @@ if fdt_dep.found() and cc.has_header('fdt.h')
+@@ -160,7 +160,7 @@ if fdt_dep.found() and cc.has_header('fdt.h')
@@ -71 +67 @@
-index 580419e6d9..220de35420 100644
+index 63b78e4bce..fa9686fdaf 100644
@@ -84,13 +79,0 @@
-diff --git a/drivers/common/mvep/meson.build b/drivers/common/mvep/meson.build
-index 863a20ab90..7cd968b382 100644
---- a/drivers/common/mvep/meson.build
-+++ b/drivers/common/mvep/meson.build
-@@ -4,7 +4,7 @@
- # All rights reserved.
- #
- 
--dep = dependency('libmusdk', required: false)
-+dep = dependency('libmusdk', required: false, method: 'pkg-config')
- if not dep.found()
- 	build = false
- 	reason = 'missing dependency, "libmusdk"'
@@ -98 +81 @@
-index 7dd80cc53f..67f7aca974 100644
+index 29e1299f20..b2915c91fe 100644
@@ -101 +84 @@
-@@ -21,7 +21,7 @@ if disabled_drivers.contains(qat_compress_path)
+@@ -23,7 +23,7 @@ if disabled_drivers.contains(qat_compress_path)
@@ -162,13 +144,0 @@
-diff --git a/drivers/crypto/mvsam/meson.build b/drivers/crypto/mvsam/meson.build
-index 384eacff03..b4c55b5ff5 100644
---- a/drivers/crypto/mvsam/meson.build
-+++ b/drivers/crypto/mvsam/meson.build
-@@ -3,7 +3,7 @@
- # Copyright(c) 2018 Semihalf.
- # All rights reserved.
- 
--dep = dependency('libmusdk', required: false)
-+dep = dependency('libmusdk', required: false, method: 'pkg-config')
- if not dep.found()
- 	build = false
- 	reason = 'missing dependency, "libmusdk"'
@@ -202 +172 @@
-index dce1230365..60ccffabb9 100644
+index fead8dd99f..ae7355c8c9 100644
@@ -205 +175 @@
-@@ -9,14 +9,15 @@ endif
+@@ -3,14 +3,15 @@
@@ -224 +194 @@
-index 8837ef4247..e260b75926 100644
+index 4892bb234c..9801697949 100644
@@ -227,3 +197,3 @@
-@@ -7,7 +7,7 @@ if is_windows
- 	subdir_done()
- endif
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2018 Intel Corporation
@@ -250,26 +219,0 @@
-diff --git a/drivers/net/mvneta/meson.build b/drivers/net/mvneta/meson.build
-index 4e073e0d2d..0be7b3d8ba 100644
---- a/drivers/net/mvneta/meson.build
-+++ b/drivers/net/mvneta/meson.build
-@@ -9,7 +9,7 @@ if is_windows
- 	subdir_done()
- endif
- 
--dep = dependency('libmusdk', required: false)
-+dep = dependency('libmusdk', required: false, method: 'pkg-config')
- if not dep.found()
- 	build = false
- 	reason = 'missing dependency, "libmusdk"'
-diff --git a/drivers/net/mvpp2/meson.build b/drivers/net/mvpp2/meson.build
-index c509d89164..bfda5439ba 100644
---- a/drivers/net/mvpp2/meson.build
-+++ b/drivers/net/mvpp2/meson.build
-@@ -9,7 +9,7 @@ if is_windows
- 	subdir_done()
- endif
- 
--dep = dependency('libmusdk', required: false)
-+dep = dependency('libmusdk', required: false, method: 'pkg-config')
- if not dep.found()
- 	build = false
- 	reason = 'missing dependency, "libmusdk"'
@@ -277 +221 @@
-index 42f7921dce..f4a89b87d5 100644
+index d53e8eca7d..995c44c61c 100644
@@ -280,3 +224,3 @@
-@@ -9,7 +9,7 @@ if is_windows
- 	subdir_done()
- endif
+@@ -3,7 +3,7 @@
+ # Copyright(c) 2019 Netcope Technologies, a.s. <info@netcope.com>
+ # All rights reserved.
@@ -290 +234 @@
-index 4c02830b04..4f8f3325f6 100644
+index b53fcbc591..77a5b0ed80 100644
@@ -293,3 +237,3 @@
-@@ -7,7 +7,7 @@ if is_windows
- 	subdir_done()
- endif
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2018 Intel Corporation

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

* [dpdk-stable] patch 'app/procinfo: fix security context info' 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
                   ` (192 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'build: force pkg-config for dependency detection' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' " luca.boccassi
                   ` (80 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Hemant Agrawal; +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/3aad6dffd819aae936127e40f522f55d8dde32e4

Thanks.

Luca Boccassi

---
From 3aad6dffd819aae936127e40f522f55d8dde32e4 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 20 Jan 2021 10:47:11 +0530
Subject: [PATCH] app/procinfo: fix security context info

[ upstream commit 026a546a22ab20c325f07435e3a12debd267524d ]

We need to differentiate between crypto and ethernet security
context as they belong to different devices.

Fixes: d82d6ac64338 ("app/procinfo: add crypto security context info")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/proc-info/main.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 44249dd2cb..b9587f7ded 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -5,6 +5,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdint.h>
+#include <stdbool.h>
 #include <errno.h>
 #include <stdarg.h>
 #include <inttypes.h>
@@ -645,11 +646,16 @@ metrics_display(int port_id)
 }
 
 static void
-show_security_context(uint16_t portid)
+show_security_context(uint16_t portid, bool inline_offload)
 {
-	void *p_ctx = rte_eth_dev_get_sec_ctx(portid);
+	void *p_ctx;
 	const struct rte_security_capability *s_cap;
 
+	if (inline_offload)
+		p_ctx = rte_eth_dev_get_sec_ctx(portid);
+	else
+		p_ctx = rte_cryptodev_get_sec_ctx(portid);
+
 	if (p_ctx == NULL)
 		return;
 
@@ -856,7 +862,7 @@ show_port(void)
 		}
 
 #ifdef RTE_LIB_SECURITY
-		show_security_context(i);
+		show_security_context(i, true);
 #endif
 	}
 }
@@ -1220,7 +1226,7 @@ show_crypto(void)
 		}
 
 #ifdef RTE_LIB_SECURITY
-		show_security_context(i);
+		show_security_context(i, false);
 #endif
 	}
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.886640914 +0000
+++ 0195-app-procinfo-fix-security-context-info.patch	2021-02-05 11:18:29.150697661 +0000
@@ -1 +1 @@
-From 026a546a22ab20c325f07435e3a12debd267524d Mon Sep 17 00:00:00 2001
+From 3aad6dffd819aae936127e40f522f55d8dde32e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 026a546a22ab20c325f07435e3a12debd267524d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' 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
                   ` (193 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/procinfo: fix security context info' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' " luca.boccassi
                   ` (79 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Ruifeng Wang, 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/e89a62391eb8d9da9e47e231bbae339d94df5b90

Thanks.

Luca Boccassi

---
From e89a62391eb8d9da9e47e231bbae339d94df5b90 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Fri, 15 Jan 2021 17:58:21 +0800
Subject: [PATCH] eal/arm: fix debug build with gcc for 128-bit atomics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 36d406c5139fa0160a1d3686f5b2413a2f9ee83b ]

Compiling with "meson build -Dbuildtype=debug --cross-file
config/arm/arm64_thunderx2_linux_gcc" shows the warnings
"function returns an aggregate [-Waggregate-return]":
../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In
function ‘__cas_128_relaxed’:
../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20:
error: function returns an aggregate [-Werror=aggregate-return]
 __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp")
                    ^~~~~~~~~~~~~~~~~

Fix the compiling issue by defining __ATOMIC128_CAS_OP as a void
function and passing the address pointer into it.

Fixes: 7e2c3e17fe2c ("eal/arm64: add 128-bit atomic compare exchange")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eal/arm/include/rte_atomic_64.h | 28 +++++++++++-----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h
index 467d32a455..fa6f334c0d 100644
--- a/lib/librte_eal/arm/include/rte_atomic_64.h
+++ b/lib/librte_eal/arm/include/rte_atomic_64.h
@@ -53,15 +53,15 @@ rte_atomic_thread_fence(int memorder)
 #endif
 
 #define __ATOMIC128_CAS_OP(cas_op_name, op_string)                          \
-static __rte_noinline rte_int128_t                                          \
-cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
+static __rte_noinline void                                                  \
+cas_op_name(rte_int128_t *dst, rte_int128_t *old, rte_int128_t updated)     \
 {                                                                           \
 	/* caspX instructions register pair must start from even-numbered
 	 * register at operand 1.
 	 * So, specify registers for local variables here.
 	 */                                                                 \
-	register uint64_t x0 __asm("x0") = (uint64_t)old.val[0];            \
-	register uint64_t x1 __asm("x1") = (uint64_t)old.val[1];            \
+	register uint64_t x0 __asm("x0") = (uint64_t)old->val[0];           \
+	register uint64_t x1 __asm("x1") = (uint64_t)old->val[1];           \
 	register uint64_t x2 __asm("x2") = (uint64_t)updated.val[0];        \
 	register uint64_t x3 __asm("x3") = (uint64_t)updated.val[1];        \
 	asm volatile(                                                       \
@@ -73,9 +73,8 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
 		[upd1] "r" (x3),                                            \
 		[dst] "r" (dst)                                             \
 		: "memory");                                                \
-	old.val[0] = x0;                                                    \
-	old.val[1] = x1;                                                    \
-	return old;                                                         \
+	old->val[0] = x0;                                                   \
+	old->val[1] = x1;                                                   \
 }
 
 __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp")
@@ -113,13 +112,14 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,
 
 #if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS)
 	if (success == __ATOMIC_RELAXED)
-		old = __cas_128_relaxed(dst, expected, desired);
+		__cas_128_relaxed(dst, exp, desired);
 	else if (success == __ATOMIC_ACQUIRE)
-		old = __cas_128_acquire(dst, expected, desired);
+		__cas_128_acquire(dst, exp, desired);
 	else if (success == __ATOMIC_RELEASE)
-		old = __cas_128_release(dst, expected, desired);
+		__cas_128_release(dst, exp, desired);
 	else
-		old = __cas_128_acq_rel(dst, expected, desired);
+		__cas_128_acq_rel(dst, exp, desired);
+	old = *exp;
 #else
 #define __HAS_ACQ(mo) ((mo) != __ATOMIC_RELAXED && (mo) != __ATOMIC_RELEASE)
 #define __HAS_RLS(mo) ((mo) == __ATOMIC_RELEASE || (mo) == __ATOMIC_ACQ_REL || \
@@ -183,12 +183,12 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,
 #undef __STORE_128
 
 	} while (unlikely(ret));
-#endif
 
-	/* Unconditionally updating expected removes an 'if' statement.
-	 * expected should already be in register if not in the cache.
+	/* Unconditionally updating the value of exp removes an 'if' statement.
+	 * The value of exp should already be in register if not in the cache.
 	 */
 	*exp = old;
+#endif
 
 	return (old.int128 == expected.int128);
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.927166041 +0000
+++ 0196-eal-arm-fix-debug-build-with-gcc-for-128-bit-atomics.patch	2021-02-05 11:18:29.150697661 +0000
@@ -1 +1 @@
-From 36d406c5139fa0160a1d3686f5b2413a2f9ee83b Mon Sep 17 00:00:00 2001
+From e89a62391eb8d9da9e47e231bbae339d94df5b90 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 36d406c5139fa0160a1d3686f5b2413a2f9ee83b ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' 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
                   ` (194 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: create guest channel public header file' " luca.boccassi
                   ` (78 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Marchand, David Hunt, 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/319aae05f903d5c4b126ef2665653763eb4d29f2

Thanks.

Luca Boccassi

---
From 319aae05f903d5c4b126ef2665653763eb4d29f2 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Tue, 19 Jan 2021 04:59:10 +0100
Subject: [PATCH] test/distributor: fix return buffer queue overload

[ upstream commit 95bb2477022e6153419adc41f829e69b83b18925 ]

The distributor library implementation uses a cyclic queue to store
packets returned from workers. These packets can be later collected
with rte_distributor_returned_pkts() call.
However the queue has limited capacity. It is able to contain only
127 packets (RTE_DISTRIB_RETURNS_MASK).

Big burst tests sent 1024 packets in 32 packets bursts without waiting
until they are processed by the distributor. In case when tests were
run with big number of worker threads, it happened that more than
127 packets were returned from workers and put into cyclic queue.
This caused packets to be dropped by the queue, making them impossible
to be collected later with rte_distributor_returned_pkts() calls.
However the test waited for all packets to be returned infinitely.

This patch fixes the big burst test by not allowing more than
queue capacity packets to be processed at the same time, making
impossible to drop any packets.
It also cleans up duplicated code in the same test.

Bugzilla ID: 612
Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_distributor.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index f4c6229f16..961f326cd5 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -217,6 +217,8 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	clear_packet_count();
 	struct rte_mbuf *many_bufs[BIG_BATCH], *return_bufs[BIG_BATCH];
 	unsigned num_returned = 0;
+	unsigned int num_being_processed = 0;
+	unsigned int return_buffer_capacity = 127;/* RTE_DISTRIB_RETURNS_MASK */
 
 	/* flush out any remaining packets */
 	rte_distributor_flush(db);
@@ -233,16 +235,16 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	for (i = 0; i < BIG_BATCH/BURST; i++) {
 		rte_distributor_process(db,
 				&many_bufs[i*BURST], BURST);
-		count = rte_distributor_returned_pkts(db,
-				&return_bufs[num_returned],
-				BIG_BATCH - num_returned);
-		num_returned += count;
+		num_being_processed += BURST;
+		do {
+			count = rte_distributor_returned_pkts(db,
+					&return_bufs[num_returned],
+					BIG_BATCH - num_returned);
+			num_being_processed -= count;
+			num_returned += count;
+			rte_distributor_flush(db);
+		} while (num_being_processed + BURST > return_buffer_capacity);
 	}
-	rte_distributor_flush(db);
-	count = rte_distributor_returned_pkts(db,
-		&return_bufs[num_returned],
-			BIG_BATCH - num_returned);
-	num_returned += count;
 	retries = 0;
 	do {
 		rte_distributor_flush(db);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:37.969905774 +0000
+++ 0197-test-distributor-fix-return-buffer-queue-overload.patch	2021-02-05 11:18:29.150697661 +0000
@@ -1 +1 @@
-From 95bb2477022e6153419adc41f829e69b83b18925 Mon Sep 17 00:00:00 2001
+From 319aae05f903d5c4b126ef2665653763eb4d29f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95bb2477022e6153419adc41f829e69b83b18925 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: create guest channel public header file' 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
                   ` (195 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: make channel message functions public' " luca.boccassi
                   ` (77 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, 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/74d0a5daad7db604836d8054850411cb96915b53

Thanks.

Luca Boccassi

---
From 74d0a5daad7db604836d8054850411cb96915b53 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:56 +0000
Subject: [PATCH] power: create guest channel public header file

[ upstream commit 5f443cc0f905a9bf25f6274aff58e6e29f049466 ]

In preparation for making the header file public, we first rename
channel_commands.h as rte_power_guest_channel.h.

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/channel_manager.c              | 2 +-
 examples/vm_power_manager/channel_monitor.c              | 2 +-
 examples/vm_power_manager/channel_monitor.h              | 2 +-
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.h | 2 +-
 examples/vm_power_manager/vm_power_cli.c                 | 2 +-
 lib/librte_power/guest_channel.c                         | 2 +-
 lib/librte_power/guest_channel.h                         | 2 +-
 lib/librte_power/power_kvm_vm.c                          | 2 +-
 .../{channel_commands.h => rte_power_guest_channel.h}    | 9 ++++-----
 9 files changed, 12 insertions(+), 13 deletions(-)
 rename lib/librte_power/{channel_commands.h => rte_power_guest_channel.h} (94%)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index a26315051b..c7d5bf5a87 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -27,7 +27,7 @@
 #include <libvirt/libvirt.h>
 
 #include "channel_manager.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
 
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 228f06803d..08306105d3 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -35,7 +35,7 @@
 
 #include <libvirt/libvirt.h>
 #include "channel_monitor.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 #include "channel_manager.h"
 #include "power_manager.h"
 #include "oob_monitor.h"
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 7362a80d26..4a526ff670 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -6,7 +6,7 @@
 #define CHANNEL_MONITOR_H_
 
 #include "channel_manager.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 struct core_share {
 	unsigned int pcpu;
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index 6ad14a3dea..2299d23dce 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -9,7 +9,7 @@
 extern "C" {
 #endif
 
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 struct channel_packet *get_policy(void);
 
diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c
index ed0623a41d..f7e1b596ec 100644
--- a/examples/vm_power_manager/vm_power_cli.c
+++ b/examples/vm_power_manager/vm_power_cli.c
@@ -21,7 +21,7 @@
 #include "channel_manager.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 struct cmd_quit_result {
 	cmdline_fixed_string_t quit;
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 7b5926e5c4..4cb5ae1ddf 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -17,7 +17,7 @@
 #include <rte_log.h>
 
 #include "guest_channel.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 #define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
 
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index e15db46fc7..d3d87f0ae2 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -8,7 +8,7 @@
 extern "C" {
 #endif
 
-#include <channel_commands.h>
+#include <rte_power_guest_channel.h>
 
 /**
  * Check if any Virtio-Serial VM end-points exist in path.
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 409c3e03ab..649ebe85c4 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -7,7 +7,7 @@
 #include <rte_log.h>
 
 #include "guest_channel.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 #include "power_kvm_vm.h"
 #include "power_common.h"
 
diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/rte_power_guest_channel.h
similarity index 94%
rename from lib/librte_power/channel_commands.h
rename to lib/librte_power/rte_power_guest_channel.h
index adc8e5ca27..ef3b064a85 100644
--- a/lib/librte_power/channel_commands.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -1,9 +1,8 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+ * Copyright(c) 2010-2021 Intel Corporation
  */
-
-#ifndef CHANNEL_COMMANDS_H_
-#define CHANNEL_COMMANDS_H_
+#ifndef RTE_POWER_GUEST_CHANNEL_H
+#define RTE_POWER_GUEST_CHANNEL_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -122,4 +121,4 @@ struct channel_packet_caps_list {
 }
 #endif
 
-#endif /* CHANNEL_COMMANDS_H_ */
+#endif /* RTE_POWER_GUEST_CHANNEL_H_ */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.010178559 +0000
+++ 0198-power-create-guest-channel-public-header-file.patch	2021-02-05 11:18:29.154697738 +0000
@@ -1 +1 @@
-From 5f443cc0f905a9bf25f6274aff58e6e29f049466 Mon Sep 17 00:00:00 2001
+From 74d0a5daad7db604836d8054850411cb96915b53 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f443cc0f905a9bf25f6274aff58e6e29f049466 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 9dca6f6863..58a243b230 100644
+index a26315051b..c7d5bf5a87 100644

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

* [dpdk-stable] patch 'power: make channel message functions public' 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
                   ` (196 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: create guest channel public header file' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: rename public structs' " luca.boccassi
                   ` (76 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, 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/0823ac52bfb4d7023ef9b8f30df267878204872a

Thanks.

Luca Boccassi

---
From 0823ac52bfb4d7023ef9b8f30df267878204872a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:57 +0000
Subject: [PATCH] power: make channel message functions public

[ upstream commit 4d3892dcd77b2f9dc657b426f4871f703cb819b6 ]

Move the 2 public functions into rte_power_guest_channel.h

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_power/guest_channel.h           | 40 -----------------
 lib/librte_power/rte_power_guest_channel.h | 50 ++++++++++++++++++++++
 lib/librte_power/version.map               |  4 ++
 3 files changed, 54 insertions(+), 40 deletions(-)

diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index d3d87f0ae2..83186cfbba 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -65,22 +65,6 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
  */
 int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);
 
-/**
- * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
- *
- * @param pkt
- *  Pointer to a populated struct channel_packet
- *
- * @param lcore_id
- *  lcore_id.
- *
- * @return
- *  - 0 on success.
- *  - Negative on error.
- */
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
-			unsigned int lcore_id);
-
 /**
  * Read a message contained in pkt over the Virtio-Serial
  * from the host endpoint.
@@ -103,30 +87,6 @@ int power_guest_channel_read_msg(void *pkt,
 		size_t pkt_len,
 		unsigned int lcore_id);
 
-/**
- * Receive a message contained in pkt over the Virtio-Serial
- * from the host endpoint.
- *
- * @param pkt
- *  Pointer to channel_packet or
- *  channel_packet_freq_list struct.
- *
- * @param pkt_len
- *  Size of expected data packet.
- *
- * @param lcore_id
- *  lcore_id.
- *
- * @return
- *  - 0 on success.
- *  - Negative on error.
- */
-__rte_experimental
-int
-rte_power_guest_channel_receive_msg(void *pkt,
-		size_t pkt_len,
-		unsigned int lcore_id);
-
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index ef3b064a85..c500c0cda6 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -116,6 +116,56 @@ struct channel_packet_caps_list {
 	uint8_t num_vcpu;
 };
 
+/**
+ * @internal
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
+ *
+ * @param pkt
+ *  Pointer to a populated struct channel_packet.
+ *
+ * @param lcore_id
+ *  Use channel specific to this lcore_id.
+ *
+ * @return
+ *  - 0 on success.
+ *  - Negative on error.
+ */
+__rte_experimental
+int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+			unsigned int lcore_id);
+
+/**
+ * @internal
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Receive a message contained in pkt over the Virtio-Serial
+ * from the host endpoint.
+ *
+ * @param pkt
+ *  Pointer to channel_packet or
+ *  channel_packet_freq_list struct.
+ *
+ * @param pkt_len
+ *  Size of expected data packet.
+ *
+ * @param lcore_id
+ *  Use channel specific to this lcore_id.
+ *
+ * @return
+ *  - 0 on success.
+ *  - Negative on error.
+ */
+__rte_experimental
+int rte_power_guest_channel_receive_msg(void *pkt,
+		size_t pkt_len,
+		unsigned int lcore_id);
+
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map
index 69ca9af616..13f0af3b2d 100644
--- a/lib/librte_power/version.map
+++ b/lib/librte_power/version.map
@@ -34,4 +34,8 @@ EXPERIMENTAL {
 	rte_power_guest_channel_receive_msg;
 	rte_power_poll_stat_fetch;
 	rte_power_poll_stat_update;
+
+	# added in 21.02
+	rte_power_guest_channel_receive_msg;
+	rte_power_guest_channel_send_msg;
 };
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.056006117 +0000
+++ 0199-power-make-channel-message-functions-public.patch	2021-02-05 11:18:29.154697738 +0000
@@ -1 +1 @@
-From 4d3892dcd77b2f9dc657b426f4871f703cb819b6 Mon Sep 17 00:00:00 2001
+From 0823ac52bfb4d7023ef9b8f30df267878204872a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d3892dcd77b2f9dc657b426f4871f703cb819b6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: rename public structs' 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
                   ` (197 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: make channel message functions public' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: rename constants' " luca.boccassi
                   ` (75 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, 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/9bb069b024c61fb995069bce8643392ca958d73f

Thanks.

Luca Boccassi

---
From 9bb069b024c61fb995069bce8643392ca958d73f Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:58 +0000
Subject: [PATCH] power: rename public structs

[ upstream commit bd5b6720fe6588ff2d48c70879f355243466f155 ]

Rename the public structs to have an rte_power_ prefix.

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/vm_power_manager/channel_monitor.c   | 33 ++++++------
 examples/vm_power_manager/channel_monitor.h   |  2 +-
 examples/vm_power_manager/guest_cli/main.c    |  2 +-
 .../guest_cli/vm_power_cli_guest.c            | 38 +++++++-------
 .../guest_cli/vm_power_cli_guest.h            |  4 +-
 lib/librte_power/guest_channel.c              |  7 +--
 lib/librte_power/guest_channel.h              |  7 +--
 lib/librte_power/power_kvm_vm.c               |  2 +-
 lib/librte_power/rte_power_guest_channel.h    | 51 +++++++++----------
 9 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 08306105d3..1b6041b6f8 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -108,7 +108,7 @@ str_to_ether_addr(const char *a, struct rte_ether_addr *ether_addr)
 }
 
 static int
-set_policy_mac(struct channel_packet *pkt, int idx, char *mac)
+set_policy_mac(struct rte_power_channel_packet *pkt, int idx, char *mac)
 {
 	union PFID pfid;
 	int ret;
@@ -165,7 +165,7 @@ get_resource_id_from_vmname(const char *vm_name)
 }
 
 static int
-parse_json_to_pkt(json_t *element, struct channel_packet *pkt,
+parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 					const char *vm_name)
 {
 	const char *key;
@@ -173,7 +173,7 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt,
 	int ret;
 	int resource_id;
 
-	memset(pkt, 0, sizeof(struct channel_packet));
+	memset(pkt, 0, sizeof(*pkt));
 
 	pkt->nb_mac_to_monitor = 0;
 	pkt->t_boost_status.tbEnabled = false;
@@ -463,7 +463,7 @@ get_pfid(struct policy *pol)
 }
 
 static int
-update_policy(struct channel_packet *pkt)
+update_policy(struct rte_power_channel_packet *pkt)
 {
 
 	unsigned int updated = 0;
@@ -512,7 +512,7 @@ update_policy(struct channel_packet *pkt)
 }
 
 static int
-remove_policy(struct channel_packet *pkt __rte_unused)
+remove_policy(struct rte_power_channel_packet *pkt __rte_unused)
 {
 	unsigned int i;
 
@@ -673,7 +673,7 @@ static void
 apply_policy(struct policy *pol)
 {
 
-	struct channel_packet *pkt = &pol->pkt;
+	struct rte_power_channel_packet *pkt = &pol->pkt;
 
 	/*Check policy to use*/
 	if (pkt->policy_to_use == TRAFFIC)
@@ -715,12 +715,12 @@ write_binary_packet(void *buffer,
 }
 
 static int
-send_freq(struct channel_packet *pkt,
+send_freq(struct rte_power_channel_packet *pkt,
 		struct channel_info *chan_info,
 		bool freq_list)
 {
 	unsigned int vcore_id = pkt->resource_id;
-	struct channel_packet_freq_list channel_pkt_freq_list;
+	struct rte_power_channel_packet_freq_list channel_pkt_freq_list;
 	struct vm_info info;
 
 	if (get_info_vm(pkt->vm_name, &info) != 0)
@@ -751,12 +751,12 @@ send_freq(struct channel_packet *pkt,
 }
 
 static int
-send_capabilities(struct channel_packet *pkt,
+send_capabilities(struct rte_power_channel_packet *pkt,
 		struct channel_info *chan_info,
 		bool list_requested)
 {
 	unsigned int vcore_id = pkt->resource_id;
-	struct channel_packet_caps_list channel_pkt_caps_list;
+	struct rte_power_channel_packet_caps_list channel_pkt_caps_list;
 	struct vm_info info;
 	struct rte_power_core_capabilities caps;
 	int ret;
@@ -805,18 +805,19 @@ send_capabilities(struct channel_packet *pkt,
 }
 
 static int
-send_ack_for_received_cmd(struct channel_packet *pkt,
+send_ack_for_received_cmd(struct rte_power_channel_packet *pkt,
 		struct channel_info *chan_info,
 		uint32_t command)
 {
 	pkt->command = command;
 	return write_binary_packet(pkt,
-			sizeof(struct channel_packet),
+			sizeof(*pkt),
 			chan_info);
 }
 
 static int
-process_request(struct channel_packet *pkt, struct channel_info *chan_info)
+process_request(struct rte_power_channel_packet *pkt,
+		struct channel_info *chan_info)
 {
 	int ret;
 
@@ -988,7 +989,7 @@ channel_monitor_init(void)
 static void
 read_binary_packet(struct channel_info *chan_info)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	void *buffer = &pkt;
 	int buffer_len = sizeof(pkt);
 	int n_bytes, err = 0;
@@ -1019,7 +1020,7 @@ read_binary_packet(struct channel_info *chan_info)
 static void
 read_json_packet(struct channel_info *chan_info)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	int n_bytes, ret;
 	json_t *root;
 	json_error_t error;
@@ -1063,7 +1064,7 @@ read_json_packet(struct channel_info *chan_info)
 			/*
 			 * Because our data is now in the json
 			 * object, we can overwrite the pkt
-			 * with a channel_packet struct, using
+			 * with a rte_power_channel_packet struct, using
 			 * parse_json_to_pkt()
 			 */
 			ret = parse_json_to_pkt(root, &pkt, resource_name);
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 4a526ff670..0ca6207ad8 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -18,7 +18,7 @@ struct core_share {
 };
 
 struct policy {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	uint32_t pfid[MAX_VFS];
 	uint32_t port[MAX_VFS];
 	unsigned int enabled;
diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index f63b3c988a..fc7a8c30af 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -48,7 +48,7 @@ parse_args(int argc, char **argv)
 		{ "policy", required_argument, 0, 'o'},
 		{NULL, 0, 0, 0}
 	};
-	struct channel_packet *policy;
+	struct rte_power_channel_packet *policy;
 	unsigned short int hours[MAX_HOURS];
 	unsigned short int cores[MAX_VCPU_PER_VM];
 	unsigned short int ports[MAX_VCPU_PER_VM];
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index cf1636e784..125dfeb10a 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -38,9 +38,9 @@ union PFID {
 	uint64_t pfid;
 };
 
-static struct channel_packet policy;
+static struct rte_power_channel_packet policy;
 
-struct channel_packet *
+struct rte_power_channel_packet *
 get_policy(void)
 {
 	return &policy;
@@ -49,7 +49,7 @@ get_policy(void)
 int
 set_policy_mac(int port, int idx)
 {
-	struct channel_packet *policy;
+	struct rte_power_channel_packet *policy;
 	union PFID pfid;
 	int ret;
 
@@ -73,7 +73,7 @@ set_policy_mac(int port, int idx)
 }
 
 int
-set_policy_defaults(struct channel_packet *pkt)
+set_policy_defaults(struct rte_power_channel_packet *pkt)
 {
 	int ret;
 
@@ -145,7 +145,7 @@ struct cmd_freq_list_result {
 };
 
 static int
-query_data(struct channel_packet *pkt, unsigned int lcore_id)
+query_data(struct rte_power_channel_packet *pkt, unsigned int lcore_id)
 {
 	int ret;
 	ret = rte_power_guest_channel_send_msg(pkt, lcore_id);
@@ -157,13 +157,13 @@ query_data(struct channel_packet *pkt, unsigned int lcore_id)
 }
 
 static int
-receive_freq_list(struct channel_packet_freq_list *pkt_freq_list,
+receive_freq_list(struct rte_power_channel_packet_freq_list *pkt_freq_list,
 		unsigned int lcore_id)
 {
 	int ret;
 
 	ret = rte_power_guest_channel_receive_msg(pkt_freq_list,
-			sizeof(struct channel_packet_freq_list),
+			sizeof(*pkt_freq_list),
 			lcore_id);
 	if (ret < 0) {
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
@@ -183,14 +183,14 @@ cmd_query_freq_list_parsed(void *parsed_result,
 {
 	struct cmd_freq_list_result *res = parsed_result;
 	unsigned int lcore_id;
-	struct channel_packet_freq_list pkt_freq_list;
-	struct channel_packet pkt;
+	struct rte_power_channel_packet_freq_list pkt_freq_list;
+	struct rte_power_channel_packet pkt;
 	bool query_list = false;
 	int ret;
 	char *ep;
 
-	memset(&pkt, 0, sizeof(struct channel_packet));
-	memset(&pkt_freq_list, 0, sizeof(struct channel_packet_freq_list));
+	memset(&pkt, 0, sizeof(pkt));
+	memset(&pkt_freq_list, 0, sizeof(pkt_freq_list));
 
 	if (!strcmp(res->cpu_num, "all")) {
 
@@ -267,13 +267,13 @@ struct cmd_query_caps_result {
 };
 
 static int
-receive_capabilities(struct channel_packet_caps_list *pkt_caps_list,
+receive_capabilities(struct rte_power_channel_packet_caps_list *pkt_caps_list,
 		unsigned int lcore_id)
 {
 	int ret;
 
 	ret = rte_power_guest_channel_receive_msg(pkt_caps_list,
-		sizeof(struct channel_packet_caps_list),
+		sizeof(*pkt_caps_list),
 		lcore_id);
 	if (ret < 0) {
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
@@ -293,14 +293,14 @@ cmd_query_caps_list_parsed(void *parsed_result,
 {
 	struct cmd_query_caps_result *res = parsed_result;
 	unsigned int lcore_id;
-	struct channel_packet_caps_list pkt_caps_list;
-	struct channel_packet pkt;
+	struct rte_power_channel_packet_caps_list pkt_caps_list;
+	struct rte_power_channel_packet pkt;
 	bool query_list = false;
 	int ret;
 	char *ep;
 
-	memset(&pkt, 0, sizeof(struct channel_packet));
-	memset(&pkt_caps_list, 0, sizeof(struct channel_packet_caps_list));
+	memset(&pkt, 0, sizeof(pkt));
+	memset(&pkt_caps_list, 0, sizeof(pkt_caps_list));
 
 	if (!strcmp(res->cpu_num, "all")) {
 
@@ -380,7 +380,7 @@ cmdline_parse_inst_t cmd_query_caps_list = {
 static int
 check_response_cmd(unsigned int lcore_id, int *result)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	int ret;
 
 	ret = rte_power_guest_channel_receive_msg(&pkt, sizeof pkt, lcore_id);
@@ -473,7 +473,7 @@ struct cmd_send_policy_result {
 };
 
 static inline int
-send_policy(struct channel_packet *pkt, struct cmdline *cl)
+send_policy(struct rte_power_channel_packet *pkt, struct cmdline *cl)
 {
 	int ret;
 
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index 2299d23dce..5d285ca9de 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -11,11 +11,11 @@ extern "C" {
 
 #include "rte_power_guest_channel.h"
 
-struct channel_packet *get_policy(void);
+struct rte_power_channel_packet *get_policy(void);
 
 int set_policy_mac(int port, int idx);
 
-int set_policy_defaults(struct channel_packet *pkt);
+int set_policy_defaults(struct rte_power_channel_packet *pkt);
 
 void run_cli(__rte_unused void *arg);
 
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 4cb5ae1ddf..9eb2f63306 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -55,7 +55,7 @@ int
 guest_channel_host_connect(const char *path, unsigned int lcore_id)
 {
 	int flags, ret;
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	char fd_path[PATH_MAX];
 	int fd = -1;
 
@@ -119,7 +119,8 @@ error:
 }
 
 int
-guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
+guest_channel_send_msg(struct rte_power_channel_packet *pkt,
+		unsigned int lcore_id)
 {
 	int ret, buffer_len = sizeof(*pkt);
 	void *buffer = pkt;
@@ -149,7 +150,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
 	return 0;
 }
 
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+int rte_power_guest_channel_send_msg(struct rte_power_channel_packet *pkt,
 			unsigned int lcore_id)
 {
 	return guest_channel_send_msg(pkt, lcore_id);
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index 83186cfbba..a1db4b0580 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -63,15 +63,16 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
  *  - Negative on channel not connected.
  *  - errno on write to channel error.
  */
-int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);
+int guest_channel_send_msg(struct rte_power_channel_packet *pkt,
+		unsigned int lcore_id);
 
 /**
  * Read a message contained in pkt over the Virtio-Serial
  * from the host endpoint.
  *
  * @param pkt
- *  Pointer to channel_packet or
- *  channel_packet_freq_list struct.
+ *  Pointer to rte_power_channel_packet or
+ *  rte_power_channel_packet_freq_list struct.
  *
  * @param pkt_len
  *  Size of expected data packet.
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 649ebe85c4..9ae438489e 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -13,7 +13,7 @@
 
 #define FD_PATH "/dev/virtio-ports/virtio.serial.port.poweragent"
 
-static struct channel_packet pkt[RTE_MAX_LCORE];
+static struct rte_power_channel_packet pkt[RTE_MAX_LCORE];
 
 int
 power_kvm_vm_check_supported(void)
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index c500c0cda6..c9ab7bae81 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -11,7 +11,10 @@ extern "C" {
 #include <stdint.h>
 #include <stdbool.h>
 
-/* --- Incoming messages --- */
+#define MAX_VFS 10
+#define VM_MAX_NAME_SZ 32
+#define MAX_VCPU_PER_VM         8
+#define HOURS 24
 
 /* Valid Commands */
 #define CPU_POWER               1
@@ -19,6 +22,9 @@ extern "C" {
 #define PKT_POLICY              3
 #define PKT_POLICY_REMOVE       4
 
+#define CORE_TYPE_VIRTUAL 0
+#define CORE_TYPE_PHYSICAL 1
+
 /* CPU Power Command Scaling */
 #define CPU_POWER_SCALE_UP      1
 #define CPU_POWER_SCALE_DOWN    2
@@ -43,41 +49,32 @@ extern "C" {
 #define CPU_POWER_FREQ_LIST     3
 #define CPU_POWER_CAPS_LIST     4
 
-#define HOURS 24
-
-#define MAX_VFS 10
-#define VM_MAX_NAME_SZ 32
-
-#define MAX_VCPU_PER_VM         8
-
-struct t_boost_status {
-	bool tbEnabled;
-};
-
-struct timer_profile {
+struct rte_power_timer_profile {
 	int busy_hours[HOURS];
 	int quiet_hours[HOURS];
 	int hours_to_use_traffic_profile[HOURS];
 };
 
-enum workload {HIGH, MEDIUM, LOW};
-enum policy_to_use {
+enum rte_power_workload_level {HIGH, MEDIUM, LOW};
+
+enum rte_power_policy {
 	TRAFFIC,
 	TIME,
 	WORKLOAD,
 	BRANCH_RATIO
 };
 
-struct traffic {
+struct rte_power_traffic_policy {
 	uint32_t min_packet_thresh;
 	uint32_t avg_max_packet_thresh;
 	uint32_t max_max_packet_thresh;
 };
 
-#define CORE_TYPE_VIRTUAL 0
-#define CORE_TYPE_PHYSICAL 1
+struct rte_power_turbo_status {
+	bool tbEnabled;
+};
 
-struct channel_packet {
+struct rte_power_channel_packet {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
@@ -85,17 +82,17 @@ struct channel_packet {
 
 	uint64_t vfid[MAX_VFS];
 	int nb_mac_to_monitor;
-	struct traffic traffic_policy;
+	struct rte_power_traffic_policy traffic_policy;
 	uint8_t vcpu_to_control[MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
-	struct timer_profile timer_policy;
+	struct rte_power_timer_profile timer_policy;
 	bool core_type;
-	enum workload workload;
-	enum policy_to_use policy_to_use;
-	struct t_boost_status t_boost_status;
+	enum rte_power_workload_level workload;
+	enum rte_power_policy policy_to_use;
+	struct rte_power_turbo_status t_boost_status;
 };
 
-struct channel_packet_freq_list {
+struct rte_power_channel_packet_freq_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
@@ -105,7 +102,7 @@ struct channel_packet_freq_list {
 	uint8_t num_vcpu;
 };
 
-struct channel_packet_caps_list {
+struct rte_power_channel_packet_caps_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
@@ -135,7 +132,7 @@ struct channel_packet_caps_list {
  *  - Negative on error.
  */
 __rte_experimental
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+int rte_power_guest_channel_send_msg(struct rte_power_channel_packet *pkt,
 			unsigned int lcore_id);
 
 /**
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.091423149 +0000
+++ 0200-power-rename-public-structs.patch	2021-02-05 11:18:29.158697813 +0000
@@ -1 +1 @@
-From bd5b6720fe6588ff2d48c70879f355243466f155 Mon Sep 17 00:00:00 2001
+From 9bb069b024c61fb995069bce8643392ca958d73f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd5b6720fe6588ff2d48c70879f355243466f155 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: rename constants' 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
                   ` (198 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: rename public structs' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: export guest channel header file' " luca.boccassi
                   ` (74 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, 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/ad55da76d3f9204e3f03126ce3753732fddfb2e1

Thanks.

Luca Boccassi

---
From ad55da76d3f9204e3f03126ce3753732fddfb2e1 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:59 +0000
Subject: [PATCH] power: rename constants

[ upstream commit 38d232b9b804eebd458d758f2face173220ee2f8 ]

Rename the #defines to have an RTE_POWER_ prefix

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/vm_power_manager/channel_monitor.c   | 116 +++++++++---------
 examples/vm_power_manager/channel_monitor.h   |   6 +-
 examples/vm_power_manager/guest_cli/main.c    |  29 +++--
 .../guest_cli/vm_power_cli_guest.c            |  28 ++---
 examples/vm_power_manager/main.c              |   2 +-
 lib/librte_power/guest_channel.c              |   2 +-
 lib/librte_power/power_kvm_vm.c               |  14 +--
 lib/librte_power/rte_power_guest_channel.h    | 100 +++++++--------
 8 files changed, 156 insertions(+), 141 deletions(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 1b6041b6f8..7bb33e026c 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -177,10 +177,10 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 
 	pkt->nb_mac_to_monitor = 0;
 	pkt->t_boost_status.tbEnabled = false;
-	pkt->workload = LOW;
-	pkt->policy_to_use = TIME;
-	pkt->command = PKT_POLICY;
-	pkt->core_type = CORE_TYPE_PHYSICAL;
+	pkt->workload = RTE_POWER_WL_LOW;
+	pkt->policy_to_use = RTE_POWER_POLICY_TIME;
+	pkt->command = RTE_POWER_PKT_POLICY;
+	pkt->core_type = RTE_POWER_CORE_TYPE_PHYSICAL;
 
 	if (vm_name == NULL) {
 		RTE_LOG(ERR, CHANNEL_MONITOR,
@@ -203,11 +203,11 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char command[32];
 			strlcpy(command, json_string_value(value), 32);
 			if (!strcmp(command, "power")) {
-				pkt->command = CPU_POWER;
+				pkt->command = RTE_POWER_CPU_POWER;
 			} else if (!strcmp(command, "create")) {
-				pkt->command = PKT_POLICY;
+				pkt->command = RTE_POWER_PKT_POLICY;
 			} else if (!strcmp(command, "destroy")) {
-				pkt->command = PKT_POLICY_REMOVE;
+				pkt->command = RTE_POWER_PKT_POLICY_REMOVE;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Invalid command received in JSON\n");
@@ -217,13 +217,17 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char command[32];
 			strlcpy(command, json_string_value(value), 32);
 			if (!strcmp(command, "TIME")) {
-				pkt->policy_to_use = TIME;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_TIME;
 			} else if (!strcmp(command, "TRAFFIC")) {
-				pkt->policy_to_use = TRAFFIC;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_TRAFFIC;
 			} else if (!strcmp(command, "WORKLOAD")) {
-				pkt->policy_to_use = WORKLOAD;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_WORKLOAD;
 			} else if (!strcmp(command, "BRANCH_RATIO")) {
-				pkt->policy_to_use = BRANCH_RATIO;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_BRANCH_RATIO;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Wrong policy_type received in JSON\n");
@@ -233,11 +237,11 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char command[32];
 			strlcpy(command, json_string_value(value), 32);
 			if (!strcmp(command, "HIGH")) {
-				pkt->workload = HIGH;
+				pkt->workload = RTE_POWER_WL_HIGH;
 			} else if (!strcmp(command, "MEDIUM")) {
-				pkt->workload = MEDIUM;
+				pkt->workload = RTE_POWER_WL_MEDIUM;
 			} else if (!strcmp(command, "LOW")) {
-				pkt->workload = LOW;
+				pkt->workload = RTE_POWER_WL_LOW;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Wrong workload received in JSON\n");
@@ -283,17 +287,17 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char unit[32];
 			strlcpy(unit, json_string_value(value), 32);
 			if (!strcmp(unit, "SCALE_UP")) {
-				pkt->unit = CPU_POWER_SCALE_UP;
+				pkt->unit = RTE_POWER_SCALE_UP;
 			} else if (!strcmp(unit, "SCALE_DOWN")) {
-				pkt->unit = CPU_POWER_SCALE_DOWN;
+				pkt->unit = RTE_POWER_SCALE_DOWN;
 			} else if (!strcmp(unit, "SCALE_MAX")) {
-				pkt->unit = CPU_POWER_SCALE_MAX;
+				pkt->unit = RTE_POWER_SCALE_MAX;
 			} else if (!strcmp(unit, "SCALE_MIN")) {
-				pkt->unit = CPU_POWER_SCALE_MIN;
+				pkt->unit = RTE_POWER_SCALE_MIN;
 			} else if (!strcmp(unit, "ENABLE_TURBO")) {
-				pkt->unit = CPU_POWER_ENABLE_TURBO;
+				pkt->unit = RTE_POWER_ENABLE_TURBO;
 			} else if (!strcmp(unit, "DISABLE_TURBO")) {
-				pkt->unit = CPU_POWER_DISABLE_TURBO;
+				pkt->unit = RTE_POWER_DISABLE_TURBO;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Invalid command received in JSON\n");
@@ -312,7 +316,7 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 				vm_name);
 			return -1;
 		}
-		strlcpy(pkt->vm_name, vm_name, VM_MAX_NAME_SZ);
+		strlcpy(pkt->vm_name, vm_name, RTE_POWER_VM_MAX_NAME_SZ);
 		pkt->resource_id = resource_id;
 	}
 	return 0;
@@ -367,7 +371,7 @@ pcpu_monitor(struct policy *pol, struct core_info *ci, int pcpu, int count)
 {
 	int ret = 0;
 
-	if (pol->pkt.policy_to_use == BRANCH_RATIO) {
+	if (pol->pkt.policy_to_use == RTE_POWER_POLICY_BRANCH_RATIO) {
 		ci->cd[pcpu].oob_enabled = 1;
 		ret = add_core_to_monitor(pcpu);
 		if (ret == 0)
@@ -407,7 +411,7 @@ get_pcpu_to_control(struct policy *pol)
 	 * differenciate between them when adding them to the branch monitor.
 	 * Virtual cores need to be converted to physical cores.
 	 */
-	if (pol->pkt.core_type == CORE_TYPE_VIRTUAL) {
+	if (pol->pkt.core_type == RTE_POWER_CORE_TYPE_VIRTUAL) {
 		/*
 		 * If the cores in the policy are virtual, we need to map them
 		 * to physical core. We look up the vm info and use that for
@@ -479,7 +483,8 @@ update_policy(struct rte_power_channel_packet *pkt)
 			policies[i].pkt = *pkt;
 			get_pcpu_to_control(&policies[i]);
 			/* Check Eth dev only for Traffic policy */
-			if (policies[i].pkt.policy_to_use == TRAFFIC) {
+			if (policies[i].pkt.policy_to_use ==
+					RTE_POWER_POLICY_TRAFFIC) {
 				if (get_pfid(&policies[i]) < 0) {
 					updated = 1;
 					break;
@@ -496,7 +501,8 @@ update_policy(struct rte_power_channel_packet *pkt)
 				policies[i].pkt = *pkt;
 				get_pcpu_to_control(&policies[i]);
 				/* Check Eth dev only for Traffic policy */
-				if (policies[i].pkt.policy_to_use == TRAFFIC) {
+				if (policies[i].pkt.policy_to_use ==
+						RTE_POWER_POLICY_TRAFFIC) {
 					if (get_pfid(&policies[i]) < 0) {
 						updated = 1;
 						break;
@@ -615,7 +621,7 @@ apply_time_profile(struct policy *pol)
 	/* Format the date and time, down to a single second. */
 	strftime(time_string, sizeof(time_string), "%Y-%m-%d %H:%M:%S", ptm);
 
-	for (x = 0; x < HOURS; x++) {
+	for (x = 0; x < RTE_POWER_HOURS_PER_DAY; x++) {
 
 		if (ptm->tm_hour == pol->pkt.timer_policy.busy_hours[x]) {
 			for (count = 0; count < pol->pkt.num_vcpu; count++) {
@@ -648,19 +654,19 @@ apply_workload_profile(struct policy *pol)
 
 	int count;
 
-	if (pol->pkt.workload == HIGH) {
+	if (pol->pkt.workload == RTE_POWER_WL_HIGH) {
 		for (count = 0; count < pol->pkt.num_vcpu; count++) {
 			if (pol->core_share[count].status != 1)
 				power_manager_scale_core_max(
 						pol->core_share[count].pcpu);
 		}
-	} else if (pol->pkt.workload == MEDIUM) {
+	} else if (pol->pkt.workload == RTE_POWER_WL_MEDIUM) {
 		for (count = 0; count < pol->pkt.num_vcpu; count++) {
 			if (pol->core_share[count].status != 1)
 				power_manager_scale_core_med(
 						pol->core_share[count].pcpu);
 		}
-	} else if (pol->pkt.workload == LOW) {
+	} else if (pol->pkt.workload == RTE_POWER_WL_LOW) {
 		for (count = 0; count < pol->pkt.num_vcpu; count++) {
 			if (pol->core_share[count].status != 1)
 				power_manager_scale_core_min(
@@ -676,11 +682,11 @@ apply_policy(struct policy *pol)
 	struct rte_power_channel_packet *pkt = &pol->pkt;
 
 	/*Check policy to use*/
-	if (pkt->policy_to_use == TRAFFIC)
+	if (pkt->policy_to_use == RTE_POWER_POLICY_TRAFFIC)
 		apply_traffic_profile(pol);
-	else if (pkt->policy_to_use == TIME)
+	else if (pkt->policy_to_use == RTE_POWER_POLICY_TIME)
 		apply_time_profile(pol);
-	else if (pkt->policy_to_use == WORKLOAD)
+	else if (pkt->policy_to_use == RTE_POWER_POLICY_WORKLOAD)
 		apply_workload_profile(pol);
 }
 
@@ -726,13 +732,13 @@ send_freq(struct rte_power_channel_packet *pkt,
 	if (get_info_vm(pkt->vm_name, &info) != 0)
 		return -1;
 
-	if (!freq_list && vcore_id >= MAX_VCPU_PER_VM)
+	if (!freq_list && vcore_id >= RTE_POWER_MAX_VCPU_PER_VM)
 		return -1;
 
 	if (!info.allow_query)
 		return -1;
 
-	channel_pkt_freq_list.command = CPU_POWER_FREQ_LIST;
+	channel_pkt_freq_list.command = RTE_POWER_FREQ_LIST;
 	channel_pkt_freq_list.num_vcpu = info.num_vcpus;
 
 	if (freq_list) {
@@ -764,13 +770,13 @@ send_capabilities(struct rte_power_channel_packet *pkt,
 	if (get_info_vm(pkt->vm_name, &info) != 0)
 		return -1;
 
-	if (!list_requested && vcore_id >= MAX_VCPU_PER_VM)
+	if (!list_requested && vcore_id >= RTE_POWER_MAX_VCPU_PER_VM)
 		return -1;
 
 	if (!info.allow_query)
 		return -1;
 
-	channel_pkt_caps_list.command = CPU_POWER_CAPS_LIST;
+	channel_pkt_caps_list.command = RTE_POWER_CAPS_LIST;
 	channel_pkt_caps_list.num_vcpu = info.num_vcpus;
 
 	if (list_requested) {
@@ -828,10 +834,10 @@ process_request(struct rte_power_channel_packet *pkt,
 			CHANNEL_MGR_CHANNEL_PROCESSING) == 0)
 		return -1;
 
-	if (pkt->command == CPU_POWER) {
+	if (pkt->command == RTE_POWER_CPU_POWER) {
 		unsigned int core_num;
 
-		if (pkt->core_type == CORE_TYPE_VIRTUAL)
+		if (pkt->core_type == RTE_POWER_CORE_TYPE_VIRTUAL)
 			core_num = get_pcpu(chan_info, pkt->resource_id);
 		else
 			core_num = pkt->resource_id;
@@ -843,22 +849,22 @@ process_request(struct rte_power_channel_packet *pkt,
 		bool valid_unit = true;
 
 		switch (pkt->unit) {
-		case(CPU_POWER_SCALE_MIN):
+		case(RTE_POWER_SCALE_MIN):
 			scale_res = power_manager_scale_core_min(core_num);
 			break;
-		case(CPU_POWER_SCALE_MAX):
+		case(RTE_POWER_SCALE_MAX):
 			scale_res = power_manager_scale_core_max(core_num);
 			break;
-		case(CPU_POWER_SCALE_DOWN):
+		case(RTE_POWER_SCALE_DOWN):
 			scale_res = power_manager_scale_core_down(core_num);
 			break;
-		case(CPU_POWER_SCALE_UP):
+		case(RTE_POWER_SCALE_UP):
 			scale_res = power_manager_scale_core_up(core_num);
 			break;
-		case(CPU_POWER_ENABLE_TURBO):
+		case(RTE_POWER_ENABLE_TURBO):
 			scale_res = power_manager_enable_turbo_core(core_num);
 			break;
-		case(CPU_POWER_DISABLE_TURBO):
+		case(RTE_POWER_DISABLE_TURBO):
 			scale_res = power_manager_disable_turbo_core(core_num);
 			break;
 		default:
@@ -870,8 +876,8 @@ process_request(struct rte_power_channel_packet *pkt,
 			ret = send_ack_for_received_cmd(pkt,
 					chan_info,
 					scale_res >= 0 ?
-						CPU_POWER_CMD_ACK :
-						CPU_POWER_CMD_NACK);
+						RTE_POWER_CMD_ACK :
+						RTE_POWER_CMD_NACK);
 			if (ret < 0)
 				RTE_LOG(ERR, CHANNEL_MONITOR, "Error during sending ack command.\n");
 		} else
@@ -879,19 +885,19 @@ process_request(struct rte_power_channel_packet *pkt,
 
 	}
 
-	if (pkt->command == PKT_POLICY) {
+	if (pkt->command == RTE_POWER_PKT_POLICY) {
 		RTE_LOG(INFO, CHANNEL_MONITOR, "Processing policy request %s\n",
 				pkt->vm_name);
 		int ret = send_ack_for_received_cmd(pkt,
 				chan_info,
-				CPU_POWER_CMD_ACK);
+				RTE_POWER_CMD_ACK);
 		if (ret < 0)
 			RTE_LOG(ERR, CHANNEL_MONITOR, "Error during sending ack command.\n");
 		update_policy(pkt);
 		policy_is_set = 1;
 	}
 
-	if (pkt->command == PKT_POLICY_REMOVE) {
+	if (pkt->command == RTE_POWER_PKT_POLICY_REMOVE) {
 		ret = remove_policy(pkt);
 		if (ret == 0)
 			RTE_LOG(INFO, CHANNEL_MONITOR,
@@ -901,26 +907,26 @@ process_request(struct rte_power_channel_packet *pkt,
 				 "Policy %s does not exist\n", pkt->vm_name);
 	}
 
-	if (pkt->command == CPU_POWER_QUERY_FREQ_LIST ||
-		pkt->command == CPU_POWER_QUERY_FREQ) {
+	if (pkt->command == RTE_POWER_QUERY_FREQ_LIST ||
+		pkt->command == RTE_POWER_QUERY_FREQ) {
 
 		RTE_LOG(INFO, CHANNEL_MONITOR,
 			"Frequency for %s requested.\n", pkt->vm_name);
 		int ret = send_freq(pkt,
 				chan_info,
-				pkt->command == CPU_POWER_QUERY_FREQ_LIST);
+				pkt->command == RTE_POWER_QUERY_FREQ_LIST);
 		if (ret < 0)
 			RTE_LOG(ERR, CHANNEL_MONITOR, "Error during frequency sending.\n");
 	}
 
-	if (pkt->command == CPU_POWER_QUERY_CAPS_LIST ||
-		pkt->command == CPU_POWER_QUERY_CAPS) {
+	if (pkt->command == RTE_POWER_QUERY_CAPS_LIST ||
+		pkt->command == RTE_POWER_QUERY_CAPS) {
 
 		RTE_LOG(INFO, CHANNEL_MONITOR,
 			"Capabilities for %s requested.\n", pkt->vm_name);
 		int ret = send_capabilities(pkt,
 				chan_info,
-				pkt->command == CPU_POWER_QUERY_CAPS_LIST);
+				pkt->command == RTE_POWER_QUERY_CAPS_LIST);
 		if (ret < 0)
 			RTE_LOG(ERR, CHANNEL_MONITOR, "Error during sending capabilities.\n");
 	}
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 0ca6207ad8..5d3537b911 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -19,10 +19,10 @@ struct core_share {
 
 struct policy {
 	struct rte_power_channel_packet pkt;
-	uint32_t pfid[MAX_VFS];
-	uint32_t port[MAX_VFS];
+	uint32_t pfid[RTE_POWER_MAX_VFS];
+	uint32_t port[RTE_POWER_MAX_VFS];
 	unsigned int enabled;
-	struct core_share core_share[MAX_VCPU_PER_VM];
+	struct core_share core_share[RTE_POWER_MAX_VCPU_PER_VM];
 };
 
 #ifdef __cplusplus
diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index fc7a8c30af..4e17f7fb90 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -50,8 +50,8 @@ parse_args(int argc, char **argv)
 	};
 	struct rte_power_channel_packet *policy;
 	unsigned short int hours[MAX_HOURS];
-	unsigned short int cores[MAX_VCPU_PER_VM];
-	unsigned short int ports[MAX_VCPU_PER_VM];
+	unsigned short int cores[RTE_POWER_MAX_VCPU_PER_VM];
+	unsigned short int ports[RTE_POWER_MAX_VCPU_PER_VM];
 	int i, cnt, idx;
 
 	policy = get_policy();
@@ -69,7 +69,8 @@ parse_args(int argc, char **argv)
 		switch (opt) {
 		/* portmask */
 		case 'n':
-			strlcpy(policy->vm_name, optarg, VM_MAX_NAME_SZ);
+			strlcpy(policy->vm_name, optarg,
+					RTE_POWER_VM_MAX_NAME_SZ);
 			printf("Setting VM Name to [%s]\n", policy->vm_name);
 			break;
 		case 'b':
@@ -97,14 +98,15 @@ parse_args(int argc, char **argv)
 			}
 			break;
 		case 'l':
-			cnt = parse_set(optarg, cores, MAX_VCPU_PER_VM);
+			cnt = parse_set(optarg, cores,
+					RTE_POWER_MAX_VCPU_PER_VM);
 			if (cnt < 0) {
 				printf("Invalid value passed to vcpu-list - [%s]\n",
 						optarg);
 				break;
 			}
 			idx = 0;
-			for (i = 0; i < MAX_VCPU_PER_VM; i++) {
+			for (i = 0; i < RTE_POWER_MAX_VCPU_PER_VM; i++) {
 				if (cores[i]) {
 					printf("***Using core %d\n", i);
 					policy->vcpu_to_control[idx++] = i;
@@ -114,14 +116,15 @@ parse_args(int argc, char **argv)
 			printf("Total cores: %d\n", idx);
 			break;
 		case 'p':
-			cnt = parse_set(optarg, ports, MAX_VCPU_PER_VM);
+			cnt = parse_set(optarg, ports,
+					RTE_POWER_MAX_VCPU_PER_VM);
 			if (cnt < 0) {
 				printf("Invalid value passed to port-list - [%s]\n",
 						optarg);
 				break;
 			}
 			idx = 0;
-			for (i = 0; i < MAX_VCPU_PER_VM; i++) {
+			for (i = 0; i < RTE_POWER_MAX_VCPU_PER_VM; i++) {
 				if (ports[i]) {
 					printf("***Using port %d\n", i);
 					if (set_policy_mac(i, idx++) != 0) {
@@ -135,13 +138,17 @@ parse_args(int argc, char **argv)
 			break;
 		case 'o':
 			if (!strcmp(optarg, "TRAFFIC"))
-				policy->policy_to_use = TRAFFIC;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_TRAFFIC;
 			else if (!strcmp(optarg, "TIME"))
-				policy->policy_to_use = TIME;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_TIME;
 			else if (!strcmp(optarg, "WORKLOAD"))
-				policy->policy_to_use = WORKLOAD;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_WORKLOAD;
 			else if (!strcmp(optarg, "BRANCH_RATIO"))
-				policy->policy_to_use = BRANCH_RATIO;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_BRANCH_RATIO;
 			else {
 				printf("Invalid policy specified: %s\n",
 						optarg);
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 125dfeb10a..ec6409abd7 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -103,10 +103,10 @@ set_policy_defaults(struct rte_power_channel_packet *pkt)
 	pkt->timer_policy.hours_to_use_traffic_profile[0] = 8;
 	pkt->timer_policy.hours_to_use_traffic_profile[1] = 10;
 
-	pkt->core_type = CORE_TYPE_VIRTUAL;
-	pkt->workload = LOW;
-	pkt->policy_to_use = TIME;
-	pkt->command = PKT_POLICY;
+	pkt->core_type = RTE_POWER_CORE_TYPE_VIRTUAL;
+	pkt->workload = RTE_POWER_WL_LOW;
+	pkt->policy_to_use = RTE_POWER_POLICY_TIME;
+	pkt->command = RTE_POWER_PKT_POLICY;
 	strlcpy(pkt->vm_name, "ubuntu2", sizeof(pkt->vm_name));
 
 	return 0;
@@ -169,7 +169,7 @@ receive_freq_list(struct rte_power_channel_packet_freq_list *pkt_freq_list,
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
 		return -1;
 	}
-	if (pkt_freq_list->command != CPU_POWER_FREQ_LIST) {
+	if (pkt_freq_list->command != RTE_POWER_FREQ_LIST) {
 		RTE_LOG(ERR, GUEST_CLI, "Unexpected message received.\n");
 		return -1;
 	}
@@ -203,18 +203,18 @@ cmd_query_freq_list_parsed(void *parsed_result,
 			return;
 		}
 
-		pkt.command = CPU_POWER_QUERY_FREQ_LIST;
+		pkt.command = RTE_POWER_QUERY_FREQ_LIST;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		query_list = true;
 	} else {
 		errno = 0;
 		lcore_id = (unsigned int)strtol(res->cpu_num, &ep, 10);
-		if (errno != 0 || lcore_id >= MAX_VCPU_PER_VM ||
+		if (errno != 0 || lcore_id >= RTE_POWER_MAX_VCPU_PER_VM ||
 			ep == res->cpu_num) {
 			cmdline_printf(cl, "Invalid parameter provided.\n");
 			return;
 		}
-		pkt.command = CPU_POWER_QUERY_FREQ;
+		pkt.command = RTE_POWER_QUERY_FREQ;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		pkt.resource_id = lcore_id;
 	}
@@ -279,7 +279,7 @@ receive_capabilities(struct rte_power_channel_packet_caps_list *pkt_caps_list,
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
 		return -1;
 	}
-	if (pkt_caps_list->command != CPU_POWER_CAPS_LIST) {
+	if (pkt_caps_list->command != RTE_POWER_CAPS_LIST) {
 		RTE_LOG(ERR, GUEST_CLI, "Unexpected message received.\n");
 		return -1;
 	}
@@ -313,18 +313,18 @@ cmd_query_caps_list_parsed(void *parsed_result,
 			return;
 		}
 
-		pkt.command = CPU_POWER_QUERY_CAPS_LIST;
+		pkt.command = RTE_POWER_QUERY_CAPS_LIST;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		query_list = true;
 	} else {
 		errno = 0;
 		lcore_id = (unsigned int)strtol(res->cpu_num, &ep, 10);
-		if (errno != 0 || lcore_id >= MAX_VCPU_PER_VM ||
+		if (errno != 0 || lcore_id >= RTE_POWER_MAX_VCPU_PER_VM ||
 			ep == res->cpu_num) {
 			cmdline_printf(cl, "Invalid parameter provided.\n");
 			return;
 		}
-		pkt.command = CPU_POWER_QUERY_CAPS;
+		pkt.command = RTE_POWER_QUERY_CAPS;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		pkt.resource_id = lcore_id;
 	}
@@ -388,10 +388,10 @@ check_response_cmd(unsigned int lcore_id, int *result)
 		return -1;
 
 	switch (pkt.command) {
-	case(CPU_POWER_CMD_ACK):
+	case(RTE_POWER_CMD_ACK):
 		*result = 1;
 		break;
-	case(CPU_POWER_CMD_NACK):
+	case(RTE_POWER_CMD_NACK):
 		*result = 0;
 		break;
 	default:
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 75d5b5364f..799d7b9bc3 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -394,7 +394,7 @@ main(int argc, char **argv)
 					"Cannot init port %"PRIu8 "\n",
 					portid);
 
-			for (w = 0; w < MAX_VFS; w++) {
+			for (w = 0; w < RTE_POWER_MAX_VFS; w++) {
 				eth.addr_bytes[5] = w + 0xf0;
 
 				ret = -ENOTSUP;
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 9eb2f63306..039cb18729 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -100,7 +100,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 	/* Send a test packet, this command is ignored by the host, but a successful
 	 * send indicates that the host endpoint is monitoring.
 	 */
-	pkt.command = CPU_POWER_CONNECT;
+	pkt.command = RTE_POWER_CPU_POWER_CONNECT;
 	global_fds[lcore_id] = fd;
 	ret = guest_channel_send_msg(&pkt, lcore_id);
 	if (ret != 0) {
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 9ae438489e..27f9937aab 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -29,7 +29,7 @@ power_kvm_vm_init(unsigned int lcore_id)
 				lcore_id, RTE_MAX_LCORE-1);
 		return -1;
 	}
-	pkt[lcore_id].command = CPU_POWER;
+	pkt[lcore_id].command = RTE_POWER_CPU_POWER;
 	pkt[lcore_id].resource_id = lcore_id;
 	return guest_channel_host_connect(FD_PATH, lcore_id);
 }
@@ -90,25 +90,25 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction)
 int
 power_kvm_vm_freq_up(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_UP);
+	return send_msg(lcore_id, RTE_POWER_SCALE_UP);
 }
 
 int
 power_kvm_vm_freq_down(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_DOWN);
+	return send_msg(lcore_id, RTE_POWER_SCALE_DOWN);
 }
 
 int
 power_kvm_vm_freq_max(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_MAX);
+	return send_msg(lcore_id, RTE_POWER_SCALE_MAX);
 }
 
 int
 power_kvm_vm_freq_min(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_MIN);
+	return send_msg(lcore_id, RTE_POWER_SCALE_MIN);
 }
 
 int
@@ -121,13 +121,13 @@ power_kvm_vm_turbo_status(__rte_unused unsigned int lcore_id)
 int
 power_kvm_vm_enable_turbo(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_ENABLE_TURBO);
+	return send_msg(lcore_id, RTE_POWER_ENABLE_TURBO);
 }
 
 int
 power_kvm_vm_disable_turbo(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_DISABLE_TURBO);
+	return send_msg(lcore_id, RTE_POWER_DISABLE_TURBO);
 }
 
 struct rte_power_core_capabilities;
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index c9ab7bae81..b9273a025c 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -11,58 +11,41 @@ extern "C" {
 #include <stdint.h>
 #include <stdbool.h>
 
-#define MAX_VFS 10
-#define VM_MAX_NAME_SZ 32
-#define MAX_VCPU_PER_VM         8
-#define HOURS 24
+#define RTE_POWER_MAX_VFS 10
+#define RTE_POWER_VM_MAX_NAME_SZ 32
+#define RTE_POWER_MAX_VCPU_PER_VM 8
+#define RTE_POWER_HOURS_PER_DAY 24
 
 /* Valid Commands */
-#define CPU_POWER               1
-#define CPU_POWER_CONNECT       2
-#define PKT_POLICY              3
-#define PKT_POLICY_REMOVE       4
+#define RTE_POWER_CPU_POWER               1
+#define RTE_POWER_CPU_POWER_CONNECT       2
+#define RTE_POWER_PKT_POLICY              3
+#define RTE_POWER_PKT_POLICY_REMOVE       4
 
-#define CORE_TYPE_VIRTUAL 0
-#define CORE_TYPE_PHYSICAL 1
+#define RTE_POWER_CORE_TYPE_VIRTUAL 0
+#define RTE_POWER_CORE_TYPE_PHYSICAL 1
 
 /* CPU Power Command Scaling */
-#define CPU_POWER_SCALE_UP      1
-#define CPU_POWER_SCALE_DOWN    2
-#define CPU_POWER_SCALE_MAX     3
-#define CPU_POWER_SCALE_MIN     4
-#define CPU_POWER_ENABLE_TURBO  5
-#define CPU_POWER_DISABLE_TURBO 6
+#define RTE_POWER_SCALE_UP      1
+#define RTE_POWER_SCALE_DOWN    2
+#define RTE_POWER_SCALE_MAX     3
+#define RTE_POWER_SCALE_MIN     4
+#define RTE_POWER_ENABLE_TURBO  5
+#define RTE_POWER_DISABLE_TURBO 6
 
 /* CPU Power Queries */
-#define CPU_POWER_QUERY_FREQ_LIST  7
-#define CPU_POWER_QUERY_FREQ       8
-#define CPU_POWER_QUERY_CAPS_LIST  9
-#define CPU_POWER_QUERY_CAPS       10
-
-/* --- Outgoing messages --- */
+#define RTE_POWER_QUERY_FREQ_LIST  7
+#define RTE_POWER_QUERY_FREQ       8
+#define RTE_POWER_QUERY_CAPS_LIST  9
+#define RTE_POWER_QUERY_CAPS       10
 
 /* Generic Power Command Response */
-#define CPU_POWER_CMD_ACK       1
-#define CPU_POWER_CMD_NACK      2
+#define RTE_POWER_CMD_ACK       1
+#define RTE_POWER_CMD_NACK      2
 
 /* CPU Power Query Responses */
-#define CPU_POWER_FREQ_LIST     3
-#define CPU_POWER_CAPS_LIST     4
-
-struct rte_power_timer_profile {
-	int busy_hours[HOURS];
-	int quiet_hours[HOURS];
-	int hours_to_use_traffic_profile[HOURS];
-};
-
-enum rte_power_workload_level {HIGH, MEDIUM, LOW};
-
-enum rte_power_policy {
-	TRAFFIC,
-	TIME,
-	WORKLOAD,
-	BRANCH_RATIO
-};
+#define RTE_POWER_FREQ_LIST     3
+#define RTE_POWER_CAPS_LIST     4
 
 struct rte_power_traffic_policy {
 	uint32_t min_packet_thresh;
@@ -70,6 +53,25 @@ struct rte_power_traffic_policy {
 	uint32_t max_max_packet_thresh;
 };
 
+struct rte_power_timer_profile {
+	int busy_hours[RTE_POWER_HOURS_PER_DAY];
+	int quiet_hours[RTE_POWER_HOURS_PER_DAY];
+	int hours_to_use_traffic_profile[RTE_POWER_HOURS_PER_DAY];
+};
+
+enum rte_power_workload_level {
+	RTE_POWER_WL_HIGH,
+	RTE_POWER_WL_MEDIUM,
+	RTE_POWER_WL_LOW
+};
+
+enum rte_power_policy {
+	RTE_POWER_POLICY_TRAFFIC,
+	RTE_POWER_POLICY_TIME,
+	RTE_POWER_POLICY_WORKLOAD,
+	RTE_POWER_POLICY_BRANCH_RATIO
+};
+
 struct rte_power_turbo_status {
 	bool tbEnabled;
 };
@@ -78,12 +80,12 @@ struct rte_power_channel_packet {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
-	char vm_name[VM_MAX_NAME_SZ];
+	char vm_name[RTE_POWER_VM_MAX_NAME_SZ];
 
-	uint64_t vfid[MAX_VFS];
+	uint64_t vfid[RTE_POWER_MAX_VFS];
 	int nb_mac_to_monitor;
 	struct rte_power_traffic_policy traffic_policy;
-	uint8_t vcpu_to_control[MAX_VCPU_PER_VM];
+	uint8_t vcpu_to_control[RTE_POWER_MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
 	struct rte_power_timer_profile timer_policy;
 	bool core_type;
@@ -96,9 +98,9 @@ struct rte_power_channel_packet_freq_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
-	char vm_name[VM_MAX_NAME_SZ];
+	char vm_name[RTE_POWER_VM_MAX_NAME_SZ];
 
-	uint32_t freq_list[MAX_VCPU_PER_VM];
+	uint32_t freq_list[RTE_POWER_MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
 };
 
@@ -106,10 +108,10 @@ struct rte_power_channel_packet_caps_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
-	char vm_name[VM_MAX_NAME_SZ];
+	char vm_name[RTE_POWER_VM_MAX_NAME_SZ];
 
-	uint64_t turbo[MAX_VCPU_PER_VM];
-	uint64_t priority[MAX_VCPU_PER_VM];
+	uint64_t turbo[RTE_POWER_MAX_VCPU_PER_VM];
+	uint64_t priority[RTE_POWER_MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
 };
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.138654033 +0000
+++ 0201-power-rename-constants.patch	2021-02-05 11:18:29.158697813 +0000
@@ -1 +1 @@
-From 38d232b9b804eebd458d758f2face173220ee2f8 Mon Sep 17 00:00:00 2001
+From ad55da76d3f9204e3f03126ce3753732fddfb2e1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 38d232b9b804eebd458d758f2face173220ee2f8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: export guest channel header file' 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
                   ` (199 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: rename constants' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: clean up includes' " luca.boccassi
                   ` (73 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, 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/d28bfe95876868c225f6fe2088ff8bc6e6819a3d

Thanks.

Luca Boccassi

---
From d28bfe95876868c225f6fe2088ff8bc6e6819a3d Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:22:00 +0000
Subject: [PATCH] power: export guest channel header file

[ upstream commit d74b159e8c87dae9b5b8724345d155ceb58b63b2 ]

Adjust meson.build so that 'ninja install' copies the new header
file into the installation directory.

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_power/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_power/meson.build b/lib/librte_power/meson.build
index 4b4cf1b90b..5415695281 100644
--- a/lib/librte_power/meson.build
+++ b/lib/librte_power/meson.build
@@ -10,5 +10,6 @@ sources = files('rte_power.c', 'power_acpi_cpufreq.c',
 		'rte_power_empty_poll.c',
 		'power_pstate_cpufreq.c',
 		'power_common.c')
-headers = files('rte_power.h','rte_power_empty_poll.h')
+headers = files('rte_power.h','rte_power_empty_poll.h',
+	'rte_power_guest_channel.h')
 deps += ['timer']
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.184176984 +0000
+++ 0202-power-export-guest-channel-header-file.patch	2021-02-05 11:18:29.158697813 +0000
@@ -1 +1 @@
-From d74b159e8c87dae9b5b8724345d155ceb58b63b2 Mon Sep 17 00:00:00 2001
+From d28bfe95876868c225f6fe2088ff8bc6e6819a3d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d74b159e8c87dae9b5b8724345d155ceb58b63b2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: clean up includes' 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
                   ` (200 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: export guest channel header file' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/ring: reduce duration of performance tests' " luca.boccassi
                   ` (72 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, 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/0832b5210bb19d7644e8795d842e0972bf6ea965

Thanks.

Luca Boccassi

---
From 0832b5210bb19d7644e8795d842e0972bf6ea965 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:22:01 +0000
Subject: [PATCH] power: clean up includes

[ upstream commit 825fddf651d49b991a5a08eb02bab90695ec85c7 ]

re-organise the including of the new public header file and
remove un-needed includes

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/vm_power_manager/channel_manager.c              | 1 -
 examples/vm_power_manager/channel_monitor.c              | 1 -
 examples/vm_power_manager/channel_monitor.h              | 3 ++-
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 1 -
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.h | 2 --
 examples/vm_power_manager/vm_power_cli.c                 | 1 -
 lib/librte_power/guest_channel.c                         | 2 +-
 lib/librte_power/guest_channel.h                         | 2 --
 lib/librte_power/power_kvm_vm.c                          | 2 +-
 lib/librte_power/rte_power.h                             | 1 +
 lib/librte_power/rte_power_guest_channel.h               | 3 ---
 11 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index c7d5bf5a87..0a28cb643b 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -27,7 +27,6 @@
 #include <libvirt/libvirt.h>
 
 #include "channel_manager.h"
-#include "rte_power_guest_channel.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
 
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 7bb33e026c..99f81544d7 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -35,7 +35,6 @@
 
 #include <libvirt/libvirt.h>
 #include "channel_monitor.h"
-#include "rte_power_guest_channel.h"
 #include "channel_manager.h"
 #include "power_manager.h"
 #include "oob_monitor.h"
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 5d3537b911..2b38c554b5 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -5,8 +5,9 @@
 #ifndef CHANNEL_MONITOR_H_
 #define CHANNEL_MONITOR_H_
 
+#include <rte_power.h>
+
 #include "channel_manager.h"
-#include "rte_power_guest_channel.h"
 
 struct core_share {
 	unsigned int pcpu;
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index ec6409abd7..0bf5774ffc 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -19,7 +19,6 @@
 #include <rte_ethdev.h>
 
 #include <rte_power.h>
-#include <guest_channel.h>
 
 #include "vm_power_cli_guest.h"
 
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index 5d285ca9de..b578ec0723 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -9,8 +9,6 @@
 extern "C" {
 #endif
 
-#include "rte_power_guest_channel.h"
-
 struct rte_power_channel_packet *get_policy(void);
 
 int set_policy_mac(int port, int idx);
diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c
index f7e1b596ec..1a55e553b9 100644
--- a/examples/vm_power_manager/vm_power_cli.c
+++ b/examples/vm_power_manager/vm_power_cli.c
@@ -21,7 +21,6 @@
 #include "channel_manager.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
-#include "rte_power_guest_channel.h"
 
 struct cmd_quit_result {
 	cmdline_fixed_string_t quit;
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 039cb18729..2f7507a03c 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -15,9 +15,9 @@
 
 
 #include <rte_log.h>
+#include <rte_power.h>
 
 #include "guest_channel.h"
-#include "rte_power_guest_channel.h"
 
 #define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
 
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index a1db4b0580..43d532a5aa 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -8,8 +8,6 @@
 extern "C" {
 #endif
 
-#include <rte_power_guest_channel.h>
-
 /**
  * Check if any Virtio-Serial VM end-points exist in path.
  *
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 27f9937aab..ab7d4b8cee 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -6,8 +6,8 @@
 
 #include <rte_log.h>
 
-#include "guest_channel.h"
 #include "rte_power_guest_channel.h"
+#include "guest_channel.h"
 #include "power_kvm_vm.h"
 #include "power_common.h"
 
diff --git a/lib/librte_power/rte_power.h b/lib/librte_power/rte_power.h
index bbbde4dfb4..c8086bf6ba 100644
--- a/lib/librte_power/rte_power.h
+++ b/lib/librte_power/rte_power.h
@@ -14,6 +14,7 @@
 #include <rte_byteorder.h>
 #include <rte_log.h>
 #include <rte_string_fns.h>
+#include <rte_power_guest_channel.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index b9273a025c..adc9738174 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -8,9 +8,6 @@
 extern "C" {
 #endif
 
-#include <stdint.h>
-#include <stdbool.h>
-
 #define RTE_POWER_MAX_VFS 10
 #define RTE_POWER_VM_MAX_NAME_SZ 32
 #define RTE_POWER_MAX_VCPU_PER_VM 8
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.225398113 +0000
+++ 0203-power-clean-up-includes.patch	2021-02-05 11:18:29.162697890 +0000
@@ -1 +1 @@
-From 825fddf651d49b991a5a08eb02bab90695ec85c7 Mon Sep 17 00:00:00 2001
+From 0832b5210bb19d7644e8795d842e0972bf6ea965 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 825fddf651d49b991a5a08eb02bab90695ec85c7 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 58a243b230..458e371672 100644
+index c7d5bf5a87..0a28cb643b 100644

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

* [dpdk-stable] patch 'test/ring: reduce duration of performance tests' 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
                   ` (201 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: clean up includes' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'lib: fix doxygen for parameters of function pointers' " luca.boccassi
                   ` (71 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Feifei Wang
  Cc: Honnappa Nagarahalli, Ruifeng Wang, 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/5b7e8b9dc1f42592745d59b5bb15c9bfcd62b0de

Thanks.

Luca Boccassi

---
From 5b7e8b9dc1f42592745d59b5bb15c9bfcd62b0de Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 29 Jan 2021 13:59:03 +0800
Subject: [PATCH] test/ring: reduce duration of performance tests

[ upstream commit d310d64271459624c2c06995827e7e9b419f39cb ]

When testing ring performance in the case that multiple lcores are mapped
to the same physical core, e.g. --lcores '(0-3)@10', it takes a very long
time to wait for the "enqueue_dequeue_bulk_helper" to finish.
This is because too much iteration numbers and extremely low efficiency
for enqueue and dequeue with this kind of core mapping. Following are the
test results to show the above phenomenon:

x86-Intel(R) Xeon(R) Gold 6240:
$sudo ./app/test/dpdk-test --lcores '(0-1)@25'
Testing using two hyperthreads(bulk (size: 8):)
iter_shift:         3     5     7     9     11     13    *15     17     19     21      23
run time:           7s    7s    7s    8s    9s     16s    47s    170s   660s   >0.5h   >1h
legacy APIs: SP/SC: 37    11    6     40525 40525  40209  40367  40407  40541  NoData  NoData
legacy APIs: MP/MC: 56    14    11    50657 40526  40526  40526  40625  40585  NoData  NoData

aarch64-n1sdp:
$sudo ./app/test/dpdk-test --lcore '(0-1)@1'
Testing using two hyperthreads(bulk (size: 8):)
iter_shift:         3     5     7     9     11     13    *15     17     19     21      23
run time:           8s    8s    8s    9s    9s     14s    34s    111s   418s   25min   >1h
legacy APIs: SP/SC: 0.4   0.2   0.1   488   488    488    488    488    489    489     NoData
legacy APIs: MP/MC: 0.4   0.3   0.2   488   488    488    488    490    489    489     NoData

As the number of iterations increases, so does the time which is required
to run the program. Currently (iter_shift = 23), it will take more than
1 hour to wait for the test to finish. To fix this, the "iter_shift" should
decrease and ensure enough iterations to keep the test data stable.
In order to achieve this, we also test with "-l" EAL argument:

x86-Intel(R) Xeon(R) Gold 6240:
$sudo ./app/test/dpdk-test -l 25-26
Testing using two NUMA nodes(bulk (size: 8):)
iter_shift:         3     5     7     9     11     13    *15     17     19     21      23
run time:           6s    6s    6s    6s    6s     6s     6s     7s     8s     11s     27s
legacy APIs: SP/SC: 47    20    13    22    54     83     91     73     81     75      95
legacy APIs: MP/MC: 44    18    18    240   245    270    250    249    252    250     253

aarch64-n1sdp:
$sudo ./app/test/dpdk-test -l 1-2
Testing using two physical cores(bulk (size: 8):)
iter_shift:         3     5     7     9     11     13    *15     17     19     21      23
run time:           8s    8s    8s    8s    8s     8s     8s     9s     9s     11s     23s
legacy APIs: SP/SC: 0.7   0.4   1.2   1.8   2.0    2.0    2.0    2.0    2.0    2.0     2.0
legacy APIs: MP/MC: 0.3   0.4   1.3   1.9   2.9    2.9    2.9    2.9    2.9    2.9     2.9

According to above test data, when "iter_shift" is set as "15", the test
run time is reduced to less than 1 minute and the test result can keep
stable in x86 and aarch64 servers.

Fixes: 1fa5d0099efc ("test/ring: add custom element size performance tests")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 app/test/test_ring_perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
index e63e25a867..fd82e20412 100644
--- a/app/test/test_ring_perf.c
+++ b/app/test/test_ring_perf.c
@@ -178,7 +178,7 @@ enqueue_dequeue_bulk_helper(const unsigned int flag, const int esize,
 	struct thread_params *p)
 {
 	int ret;
-	const unsigned int iter_shift = 23;
+	const unsigned int iter_shift = 15;
 	const unsigned int iterations = 1 << iter_shift;
 	struct rte_ring *r = p->r;
 	unsigned int bsize = p->size;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.267059334 +0000
+++ 0204-test-ring-reduce-duration-of-performance-tests.patch	2021-02-05 11:18:29.162697890 +0000
@@ -1 +1 @@
-From d310d64271459624c2c06995827e7e9b419f39cb Mon Sep 17 00:00:00 2001
+From 5b7e8b9dc1f42592745d59b5bb15c9bfcd62b0de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d310d64271459624c2c06995827e7e9b419f39cb ]
+
@@ -56 +57,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'lib: fix doxygen for parameters of function pointers' 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
                   ` (202 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/ring: reduce duration of performance tests' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/pipeline: fix CLI parsing crash' " luca.boccassi
                   ` (70 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Thomas Monjalon; +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/dda02da0c2fe6e8b26e169c4d264baf9e0880bed

Thanks.

Luca Boccassi

---
From dda02da0c2fe6e8b26e169c4d264baf9e0880bed Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 21 Jan 2021 22:52:37 +0100
Subject: [PATCH] lib: fix doxygen for parameters of function pointers

[ upstream commit 45eb6a1dfededc2a648364a496d480edb8023650 ]

Some parameters of typedef'ed function pointers were not properly listed
in the doxygen comments.
The error is seen with doxygen 1.9 which added this specific check:
	https://github.com/doxygen/doxygen/commit/d34236ba4037

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_compressdev/rte_compressdev_pmd.h |  2 ++
 lib/librte_cryptodev/rte_cryptodev_pmd.h     | 12 ++++++------
 lib/librte_eal/include/rte_keepalive.h       |  2 +-
 lib/librte_eventdev/rte_eventdev_pmd.h       | 12 +++++++++++-
 lib/librte_port/rte_port.h                   |  2 +-
 lib/librte_port/rte_swx_port.h               |  4 ++--
 lib/librte_rawdev/rte_rawdev_pmd.h           | 18 ++++++++++++------
 lib/librte_security/rte_security_driver.h    |  7 ++++---
 lib/librte_table/rte_swx_table.h             |  6 ------
 lib/librte_table/rte_table.h                 |  4 ++--
 10 files changed, 41 insertions(+), 28 deletions(-)

diff --git a/lib/librte_compressdev/rte_compressdev_pmd.h b/lib/librte_compressdev/rte_compressdev_pmd.h
index d5898a5b71..16b6bc6b35 100644
--- a/lib/librte_compressdev/rte_compressdev_pmd.h
+++ b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -138,6 +138,8 @@ typedef void (*compressdev_stats_reset_t)(struct rte_compressdev *dev);
  *
  * @param dev
  *   Compress device
+ * @param dev_info
+ *   Compress device information to populate
  */
 typedef void (*compressdev_info_get_t)(struct rte_compressdev *dev,
 				struct rte_compressdev_info *dev_info);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 9a8a7e632b..1274436870 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -121,7 +121,7 @@ extern struct rte_cryptodev *rte_cryptodevs;
  *	Function used to configure device.
  *
  * @param	dev	Crypto device pointer
- *		config	Crypto device configurations
+ * @param	config	Crypto device configurations
  *
  * @return	Returns 0 on success
  */
@@ -176,7 +176,8 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
 /**
  * Function used to get specific information of a device.
  *
- * @param	dev	Crypto device pointer
+ * @param	dev		Crypto device pointer
+ * @param	dev_info	Pointer to infos structure to populate
  */
 typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
 				struct rte_cryptodev_info *dev_info);
@@ -213,7 +214,7 @@ typedef int (*cryptodev_queue_pair_release_t)(struct rte_cryptodev *dev,
  *
  * @param	dev		Crypto device pointer
  * @param	nb_objs		number of sessions objects in mempool
- * @param	obj_cache	l-core object cache size, see *rte_ring_create*
+ * @param	obj_cache_size	l-core object cache size, see *rte_ring_create*
  * @param	socket_id	Socket Id to allocate  mempool on.
  *
  * @return
@@ -253,7 +254,7 @@ typedef unsigned int (*cryptodev_asym_get_session_private_size_t)(
  *
  * @param	dev		Crypto device pointer
  * @param	xform		Single or chain of crypto xforms
- * @param	priv_sess	Pointer to cryptodev's private session structure
+ * @param	session		Pointer to cryptodev's private session structure
  * @param	mp		Mempool where the private session is allocated
  *
  * @return
@@ -271,7 +272,7 @@ typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
  *
  * @param	dev		Crypto device pointer
  * @param	xform		Single or chain of crypto xforms
- * @param	priv_sess	Pointer to cryptodev's private session structure
+ * @param	session		Pointer to cryptodev's private session structure
  * @param	mp		Mempool where the private session is allocated
  *
  * @return
@@ -333,7 +334,6 @@ typedef int (*cryptodev_sym_get_raw_dp_ctx_size_t)(struct rte_cryptodev *dev);
  *
  * @param	dev		Crypto device pointer.
  * @param	qp_id		Crypto device queue pair index.
- * @param	service_type	Type of the service requested.
  * @param	ctx		The raw data-path context data.
  * @param	sess_type	session type.
  * @param	session_ctx	Session context data. If NULL the driver
diff --git a/lib/librte_eal/include/rte_keepalive.h b/lib/librte_eal/include/rte_keepalive.h
index 4bda7ca56f..bd25508da8 100644
--- a/lib/librte_eal/include/rte_keepalive.h
+++ b/lib/librte_eal/include/rte_keepalive.h
@@ -52,7 +52,7 @@ typedef void (*rte_keepalive_failure_callback_t)(
  *  @param data Data pointer passed to rte_keepalive_register_relay_callback()
  *  @param id_core ID of the core for which state is being reported
  *  @param core_state The current state of the core
- *  @param Timestamp of when core was last seen alive
+ *  @param last_seen Timestamp of when core was last seen alive
  */
 typedef void (*rte_keepalive_relay_callback_t)(
 	void *data,
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 27be376ed1..9e83993efa 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -297,7 +297,7 @@ typedef void (*eventdev_port_release_t)(void *port);
  *   Event device pointer
  * @param port
  *   Event port pointer
- * @param link
+ * @param queues
  *   Points to an array of *nb_links* event queues to be linked
  *   to the event port.
  * @param priorities
@@ -383,6 +383,10 @@ typedef void (*eventdev_dump_t)(struct rte_eventdev *dev, FILE *f);
  *
  * @param dev
  *   Event device pointer
+ * @param mode
+ *   Level (device, port or queue)
+ * @param queue_port_id
+ *   Queue or port number depending on mode
  * @param ids
  *   The stat ids to retrieve
  * @param values
@@ -410,8 +414,14 @@ typedef int (*eventdev_xstats_reset_t)(struct rte_eventdev *dev,
  *
  * @param dev
  *   Event device pointer
+ * @param mode
+ *   Level (device, port or queue)
+ * @param queue_port_id
+ *   Queue or port number depending on mode
  * @param xstats_names
  *   Array of name values to be filled in
+ * @param ids
+ *   The stat ids to retrieve
  * @param size
  *   Number of values in the xstats_names array
  * @return
diff --git a/lib/librte_port/rte_port.h b/lib/librte_port/rte_port.h
index 7f156ef47d..6b6a2cdd17 100644
--- a/lib/librte_port/rte_port.h
+++ b/lib/librte_port/rte_port.h
@@ -186,7 +186,7 @@ typedef int (*rte_port_out_op_tx)(
  */
 typedef int (*rte_port_out_op_tx_bulk)(
 	void *port,
-	struct rte_mbuf **pkt,
+	struct rte_mbuf **pkts,
 	uint64_t pkts_mask);
 
 /**
diff --git a/lib/librte_port/rte_swx_port.h b/lib/librte_port/rte_swx_port.h
index 4beb59991f..ecf109d2ca 100644
--- a/lib/librte_port/rte_swx_port.h
+++ b/lib/librte_port/rte_swx_port.h
@@ -50,7 +50,7 @@ typedef void *
 /**
  * Input port free
  *
- * @param[in] args
+ * @param[in] port
  *   Input port handle.
  */
 typedef void
@@ -129,7 +129,7 @@ typedef void *
 /**
  * Output port free
  *
- * @param[in] args
+ * @param[in] port
  *   Output port handle.
  */
 typedef void
diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h
index 34dd7181b4..b1bed13ee2 100644
--- a/lib/librte_rawdev/rte_rawdev_pmd.h
+++ b/lib/librte_rawdev/rte_rawdev_pmd.h
@@ -155,6 +155,8 @@ typedef int (*rawdev_info_get_t)(struct rte_rawdev *dev,
  *   Raw device pointer
  * @param config
  *   Void object containing device specific configuration
+ * @param config_size
+ *   Size of the memory allocated for the configuration
  *
  * @return
  *   Returns 0 on success
@@ -214,6 +216,8 @@ typedef int (*rawdev_reset_t)(struct rte_rawdev *dev);
  *   Raw device queue index
  * @param[out] queue_conf
  *   Raw device queue configuration structure
+ * @param queue_conf_size
+ *   Size of the memory allocated for the configuration
  *
  * @return
  *   Returns 0 on success, negative errno on failure
@@ -232,6 +236,8 @@ typedef int (*rawdev_queue_conf_get_t)(struct rte_rawdev *dev,
  *   Rawqueue index
  * @param queue_conf
  *   Rawqueue configuration structure
+ * @param queue_conf_size
+ *   Size of the memory allocated for the configuration
  *
  * @return
  *   Returns 0 on success.
@@ -263,7 +269,7 @@ typedef int (*rawdev_queue_release_t)(struct rte_rawdev *dev,
  * This function helps in getting queue count supported, independently. It
  * can help in cases where iterator needs to be implemented.
  *
- * @param
+ * @param dev
  *   Raw device pointer
  * @return
  *   Number of queues; 0 is assumed to be a valid response.
@@ -279,7 +285,7 @@ typedef uint16_t (*rawdev_queue_count_t)(struct rte_rawdev *dev);
  *
  * @param dev
  *   Raw device pointer
- * @param bufs
+ * @param buffers
  *   array of buffers
  * @param count
  *   number of buffers passed
@@ -303,7 +309,7 @@ typedef int (*rawdev_enqueue_bufs_t)(struct rte_rawdev *dev,
  *
  * @param dev
  *   Raw device pointer
- * @param bufs
+ * @param buffers
  *   array of buffers
  * @param count
  *   Max buffers expected to be dequeued
@@ -444,7 +450,7 @@ typedef uint64_t (*rawdev_xstats_get_by_name_t)(const struct rte_rawdev *dev,
  *
  * @param dev
  *   Raw device pointer
- * @param status
+ * @param status_info
  *   void block containing device specific status information
  * @return
  *   0 for success,
@@ -472,8 +478,8 @@ typedef int (*rawdev_firmware_version_get_t)(struct rte_rawdev *dev,
  *
  * @param dev
  *   Raw device pointer
- * @param firmware_file
- *   file pointer to firmware area
+ * @param firmware_buf
+ *   Pointer to firmware image
  * @return
  *   >0, ~0: for successful load
  *   <0: for failure
diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h
index c5abb07990..938373205c 100644
--- a/lib/librte_security/rte_security_driver.h
+++ b/lib/librte_security/rte_security_driver.h
@@ -41,7 +41,7 @@ typedef int (*security_session_create_t)(void *device,
 /**
  * Free driver private session data.
  *
- * @param	dev		Crypto/eth device pointer
+ * @param	device		Crypto/eth device pointer
  * @param	sess		Security session structure
  */
 typedef int (*security_session_destroy_t)(void *device,
@@ -95,16 +95,17 @@ int rte_security_dynfield_register(void);
 /**
  * Update the mbuf with provided metadata.
  *
+ * @param	device		Crypto/eth device pointer
  * @param	sess		Security session structure
  * @param	mb		Packet buffer
- * @param	mt		Metadata
+ * @param	params		Metadata
  *
  * @return
  *  - Returns 0 if metadata updated successfully.
  *  - Returns -ve value for errors.
  */
 typedef int (*security_set_pkt_metadata_t)(void *device,
-		struct rte_security_session *sess, struct rte_mbuf *m,
+		struct rte_security_session *sess, struct rte_mbuf *mb,
 		void *params);
 
 /**
diff --git a/lib/librte_table/rte_swx_table.h b/lib/librte_table/rte_swx_table.h
index dc434b72ef..5a3137ec53 100644
--- a/lib/librte_table/rte_swx_table.h
+++ b/lib/librte_table/rte_swx_table.h
@@ -127,12 +127,6 @@ typedef uint64_t
  * progress and it is passed as a parameter to the lookup operation. This allows
  * for multiple concurrent lookup operations into the same table.
  *
- * @param[in] params
- *   Table creation parameters.
- * @param[in] entries
- *   Entries to be added to the table at creation time.
- * @param[in] args
- *   Any additional table create arguments. It may be NULL.
  * @return
  *   Table memory footprint in bytes, on success, or zero, on error.
  */
diff --git a/lib/librte_table/rte_table.h b/lib/librte_table/rte_table.h
index cccded1a1c..096ab8a7c8 100644
--- a/lib/librte_table/rte_table.h
+++ b/lib/librte_table/rte_table.h
@@ -129,7 +129,7 @@ typedef int (*rte_table_op_entry_delete)(
  *
  * @param table
  *   Handle to lookup table instance
- * @param key
+ * @param keys
  *   Array containing lookup keys
  * @param entries
  *   Array containing data to be associated with each key. Every item in the
@@ -166,7 +166,7 @@ typedef int (*rte_table_op_entry_add_bulk)(
  *
  * @param table
  *   Handle to lookup table instance
- * @param key
+ * @param keys
  *   Array containing lookup keys
  * @param n_keys
  *   Number of keys to delete
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.305458722 +0000
+++ 0205-lib-fix-doxygen-for-parameters-of-function-pointers.patch	2021-02-05 11:18:29.166697965 +0000
@@ -1 +1 @@
-From 45eb6a1dfededc2a648364a496d480edb8023650 Mon Sep 17 00:00:00 2001
+From dda02da0c2fe6e8b26e169c4d264baf9e0880bed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 45eb6a1dfededc2a648364a496d480edb8023650 ]
+
@@ -10,2 +11,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/pipeline: fix CLI parsing crash' 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
                   ` (203 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'lib: fix doxygen for parameters of function pointers' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' " luca.boccassi
                   ` (69 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Cristian Dumitrescu; +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/70f2333c51d6042541fa233ff2693cf7472c5693

Thanks.

Luca Boccassi

---
From 70f2333c51d6042541fa233ff2693cf7472c5693 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Thu, 28 Jan 2021 19:12:39 +0000
Subject: [PATCH] examples/pipeline: fix CLI parsing crash

[ upstream commit 821848f5192c6b6be954fa9f04c0e6a470cff2b6 ]

Cannot dereference pointer for token[1] unless valid.

Fixes: 5074e1d551 ("examples/pipeline: add configuration commands")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/pipeline/cli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c
index d0150cfcf6..e97e120606 100644
--- a/examples/pipeline/cli.c
+++ b/examples/pipeline/cli.c
@@ -1294,7 +1294,7 @@ cli_process(char *in, char *out, size_t out_size, void *obj)
 	}
 
 	if (strcmp(tokens[0], "link") == 0) {
-		if (strcmp(tokens[1], "show") == 0) {
+		if ((n_tokens >= 2) && (strcmp(tokens[1], "show") == 0)) {
 			cmd_link_show(tokens, n_tokens, out, out_size, obj);
 			return;
 		}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.343283840 +0000
+++ 0206-examples-pipeline-fix-CLI-parsing-crash.patch	2021-02-05 11:18:29.166697965 +0000
@@ -1 +1 @@
-From 821848f5192c6b6be954fa9f04c0e6a470cff2b6 Mon Sep 17 00:00:00 2001
+From 70f2333c51d6042541fa233ff2693cf7472c5693 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 821848f5192c6b6be954fa9f04c0e6a470cff2b6 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' 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
                   ` (204 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/pipeline: fix CLI parsing crash' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst Tx' " luca.boccassi
                   ` (68 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, 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/12703004dd846f323da7f7e375e02dc16f5aa00a

Thanks.

Luca Boccassi

---
From 12703004dd846f323da7f7e375e02dc16f5aa00a Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 22 Jan 2021 13:19:15 +0800
Subject: [PATCH] app/eventdev: adjust event count order for pipeline test

[ upstream commit e0c0573783455288dbe2fd70c24acd1cd66d6cb6 ]

For the fwd mode (internal_port = false) in pipeline test,
processed-pkts increment should after enqueue. However, in
multi_stage_fwd and multi_stage_burst_fwd, "w->processed_pkts" is
increased before enqueue.

To fix this, move "w->processed_pkts" increment after enqueue, and then
the main core can load the correct number of processed packets.

Fixes: 314bcf58ca8f ("app/eventdev: add pipeline queue worker functions")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test-eventdev/test_pipeline_queue.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c
index 7bebac34fc..01f33e3b44 100644
--- a/app/test-eventdev/test_pipeline_queue.c
+++ b/app/test-eventdev/test_pipeline_queue.c
@@ -180,13 +180,13 @@ pipeline_queue_worker_multi_stage_fwd(void *arg)
 			ev.queue_id = tx_queue[ev.mbuf->port];
 			rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0);
 			pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);
+			pipeline_event_enqueue(dev, port, &ev);
 			w->processed_pkts++;
 		} else {
 			ev.queue_id++;
 			pipeline_fwd_event(&ev, sched_type_list[cq_id]);
+			pipeline_event_enqueue(dev, port, &ev);
 		}
-
-		pipeline_event_enqueue(dev, port, &ev);
 	}
 
 	return 0;
@@ -237,6 +237,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
 	const uint8_t *tx_queue = t->tx_evqueue_id;
 
 	while (t->done == false) {
+		uint16_t processed_pkts = 0;
 		uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,
 				BURST_SIZE, 0);
 
@@ -254,7 +255,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
 				rte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0);
 				pipeline_fwd_event(&ev[i],
 						RTE_SCHED_TYPE_ATOMIC);
-				w->processed_pkts++;
+				processed_pkts++;
 			} else {
 				ev[i].queue_id++;
 				pipeline_fwd_event(&ev[i],
@@ -263,6 +264,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
 		}
 
 		pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
+		w->processed_pkts += processed_pkts;
 	}
 
 	return 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.385746487 +0000
+++ 0207-app-eventdev-adjust-event-count-order-for-pipeline-t.patch	2021-02-05 11:18:29.166697965 +0000
@@ -1 +1 @@
-From e0c0573783455288dbe2fd70c24acd1cd66d6cb6 Mon Sep 17 00:00:00 2001
+From 12703004dd846f323da7f7e375e02dc16f5aa00a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e0c0573783455288dbe2fd70c24acd1cd66d6cb6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst 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
                   ` (205 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' " luca.boccassi
                   ` (67 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, 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/4f4f0b0747f74ce01e485d918cc265fa57c838a9

Thanks.

Luca Boccassi

---
From 4f4f0b0747f74ce01e485d918cc265fa57c838a9 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 22 Jan 2021 13:19:16 +0800
Subject: [PATCH] app/eventdev: remove redundant enqueue in burst Tx

[ upstream commit 21b1ca4843a09d822cf992872445beb73163f1fb ]

For eventdev pipeline test, in burst_tx cases, there is no needed to
set ev.op as RTE_EVENT_OP_RELEASE and call pipeline_event_enqueue_burst
to release events. This is because for tx mode(internal_port=true),
the capability "implicit_release" of dev is enabled, and the app can
release events by "rte_event_dequeue_burst" rather than enqueue.

Fixes: 314bcf58ca8f ("app/eventdev: add pipeline queue worker functions")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test-eventdev/test_pipeline_queue.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c
index 01f33e3b44..9a9febb199 100644
--- a/app/test-eventdev/test_pipeline_queue.c
+++ b/app/test-eventdev/test_pipeline_queue.c
@@ -83,16 +83,15 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg)
 			rte_prefetch0(ev[i + 1].mbuf);
 			if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {
 				pipeline_event_tx(dev, port, &ev[i]);
-				ev[i].op = RTE_EVENT_OP_RELEASE;
 				w->processed_pkts++;
 			} else {
 				ev[i].queue_id++;
 				pipeline_fwd_event(&ev[i],
 						RTE_SCHED_TYPE_ATOMIC);
+				pipeline_event_enqueue_burst(dev, port, ev,
+						nb_rx);
 			}
 		}
-
-		pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
 	}
 
 	return 0;
@@ -213,7 +212,6 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
 
 			if (ev[i].queue_id == tx_queue[ev[i].mbuf->port]) {
 				pipeline_event_tx(dev, port, &ev[i]);
-				ev[i].op = RTE_EVENT_OP_RELEASE;
 				w->processed_pkts++;
 				continue;
 			}
@@ -222,9 +220,8 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
 			pipeline_fwd_event(&ev[i], cq_id != last_queue ?
 					sched_type_list[cq_id] :
 					RTE_SCHED_TYPE_ATOMIC);
+			pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
 		}
-
-		pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
 	}
 
 	return 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.426310173 +0000
+++ 0208-app-eventdev-remove-redundant-enqueue-in-burst-Tx.patch	2021-02-05 11:18:29.166697965 +0000
@@ -1 +1 @@
-From 21b1ca4843a09d822cf992872445beb73163f1fb Mon Sep 17 00:00:00 2001
+From 4f4f0b0747f74ce01e485d918cc265fa57c838a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21b1ca4843a09d822cf992872445beb73163f1fb ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' 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
                   ` (206 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst Tx' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: add info output for main core' " luca.boccassi
                   ` (66 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng 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/d80220608085cdc142652b70b9fb82529c603138

Thanks.

Luca Boccassi

---
From d80220608085cdc142652b70b9fb82529c603138 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 18:30:59 +0800
Subject: [PATCH] examples/eventdev: check CPU core enabling

[ upstream commit 3d15913432f12a2abcaa00122502eb944feeeb29 ]

In the case that the cores are isolated, if "-l" or "-c" parameter is not
added, the cores will not be enabled and can not launch worker function
correctly. In the meanwhile, no error information is reported.

For example:
totally CPUs:16
isolated CPUs:1-8
command: sudo gdb -args ./dpdk-eventdev_pipeline --vdev event_sw0 \
        -- -r1 -t1 -e4 -w F00 -s4 -n0 -c32 -W1000 -D

cores information:
rte_config->lcore_role = {ROLE_RTE, ROLE_OFF, ROLE_OFF, ROLE_OFF,
                          ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_OFF,
                          ROLE_OFF, ROLE_RTE, ROLE_RTE, ROLE_RTE,
                          ROLE_RTE, ROLE_RTE, ROLE_RTE, ROLE_RTE}

output information:
...
[main()] lcore 9 executing worker, using eventdev port 0
[main()] lcore 10 executing worker, using eventdev port 1
[main()] lcore 11 executing worker, using eventdev port 2

This is because "RTE_LCORE_FOREACH_WORKER" chooses the enabled core. In
the case that the cores are isolated, "the lcore_role" flag of isolated
cores are set as "ROLE_OFF" by default(not enabled). So if we choose
these isolated cores as workers, "RTE_LCORE_FOREACH_WORKER" will ignore
these cores and not launch worker functions on them.

To fix this, add "-l" parameters to doc and add lcore enabled check.

Fixes: 1094ca96689c ("doc: add SW eventdev pipeline to sample app guide")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 doc/guides/sample_app_ug/eventdev_pipeline.rst | 5 +++--
 examples/eventdev_pipeline/main.c              | 9 ++++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/doc/guides/sample_app_ug/eventdev_pipeline.rst b/doc/guides/sample_app_ug/eventdev_pipeline.rst
index 4508c3dcc8..19ff53803e 100644
--- a/doc/guides/sample_app_ug/eventdev_pipeline.rst
+++ b/doc/guides/sample_app_ug/eventdev_pipeline.rst
@@ -34,6 +34,7 @@ options.
 An example eventdev pipeline running with the software eventdev PMD using
 these settings is shown below:
 
+ * ``-l 0,2,8-15``: lcore to use
  * ``-r1``: core mask 0x1 for RX
  * ``-t1``: core mask 0x1 for TX
  * ``-e4``: core mask 0x4 for the software scheduler
@@ -46,8 +47,8 @@ these settings is shown below:
 
 .. code-block:: console
 
-    ./<build_dir>/examples/dpdk-eventdev_pipeline --vdev event_sw0 -- -r1 -t1 \
-    -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
+    ./<build_dir>/examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \
+    -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
 
 The application has some sanity checking built-in, so if there is a function
 (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 823f8b51c2..ae50591b88 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -239,8 +239,15 @@ parse_app_args(int argc, char **argv)
 
 		if (fdata->worker_core[i])
 			cdata.num_workers++;
-		if (core_in_use(i))
+		if (core_in_use(i)) {
+			if (!rte_lcore_is_enabled(i)) {
+				printf("lcore %d is not enabled in lcore list\n",
+					i);
+				rte_exit(EXIT_FAILURE,
+					"check lcore params failed\n");
+			}
 			cdata.active_cores++;
+		}
 	}
 }
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.462968102 +0000
+++ 0209-examples-eventdev-check-CPU-core-enabling.patch	2021-02-05 11:18:29.166697965 +0000
@@ -1 +1 @@
-From 3d15913432f12a2abcaa00122502eb944feeeb29 Mon Sep 17 00:00:00 2001
+From d80220608085cdc142652b70b9fb82529c603138 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d15913432f12a2abcaa00122502eb944feeeb29 ]
+
@@ -37 +38,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/eventdev: add info output for main core' 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
                   ` (207 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' " luca.boccassi
                   ` (65 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng 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/8b0f6895e29d9c9c35f53ee623fbe86771e406b7

Thanks.

Luca Boccassi

---
From 8b0f6895e29d9c9c35f53ee623fbe86771e406b7 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 18:31:00 +0800
Subject: [PATCH] examples/eventdev: add info output for main core

[ upstream commit 198b5448433ed329becaf47003faf038132fbb7f ]

When the main core is set as tx/rx/sched/worker core, it also needs to
print some information to show this. Thus, add info output for the main
core, and add a "dump" function to print core information for the sake
of code simplicity and easy maintenance.

In the meanwhile, fix the count error. For the variable "worker_idx", it
should be incremented when the core is set as worker core. However, when
the main core is set as rx/tx/sched core, the worker_idx is also
incremented. Though this error may not have a substantial impact due to
that the main core is the last launched core, but it should be corrected
from the perspective of code correctness.

Fixes: 1094ca96689c ("doc: add SW eventdev pipeline to sample app guide")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 examples/eventdev_pipeline/main.c | 55 +++++++++++++++++++------------
 1 file changed, 34 insertions(+), 21 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index ae50591b88..9982d5bfb0 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -22,6 +22,32 @@ struct config_data cdata = {
 	.worker_cq_depth = 16
 };
 
+static void
+dump_core_info(unsigned int lcore_id, struct worker_data *data,
+		unsigned int worker_idx)
+{
+	if (fdata->rx_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing NIC Rx\n",
+			__func__, lcore_id);
+
+	if (fdata->tx_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing NIC Tx\n",
+			__func__, lcore_id);
+
+	if (fdata->sched_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing scheduler\n",
+			__func__, lcore_id);
+
+	if (fdata->worker_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing worker, using eventdev port %u\n",
+			__func__, lcore_id,
+			data[worker_idx].port_id);
+}
+
 static bool
 core_in_use(unsigned int lcore_id) {
 	return (fdata->rx_core[lcore_id] || fdata->sched_core[lcore_id] ||
@@ -413,25 +439,7 @@ main(int argc, char **argv)
 			!fdata->sched_core[lcore_id])
 			continue;
 
-		if (fdata->rx_core[lcore_id])
-			printf(
-				"[%s()] lcore %d executing NIC Rx\n",
-				__func__, lcore_id);
-
-		if (fdata->tx_core[lcore_id])
-			printf(
-				"[%s()] lcore %d executing NIC Tx\n",
-				__func__, lcore_id);
-
-		if (fdata->sched_core[lcore_id])
-			printf("[%s()] lcore %d executing scheduler\n",
-					__func__, lcore_id);
-
-		if (fdata->worker_core[lcore_id])
-			printf(
-				"[%s()] lcore %d executing worker, using eventdev port %u\n",
-				__func__, lcore_id,
-				worker_data[worker_idx].port_id);
+		dump_core_info(lcore_id, worker_data, worker_idx);
 
 		err = rte_eal_remote_launch(fdata->cap.worker,
 				&worker_data[worker_idx], lcore_id);
@@ -446,8 +454,13 @@ main(int argc, char **argv)
 
 	lcore_id = rte_lcore_id();
 
-	if (core_in_use(lcore_id))
-		fdata->cap.worker(&worker_data[worker_idx++]);
+	if (core_in_use(lcore_id)) {
+		dump_core_info(lcore_id, worker_data, worker_idx);
+		fdata->cap.worker(&worker_data[worker_idx]);
+
+		if (fdata->worker_core[lcore_id])
+			worker_idx++;
+	}
 
 	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:38.498251727 +0000
+++ 0210-examples-eventdev-add-info-output-for-main-core.patch	2021-02-05 11:18:29.166697965 +0000
@@ -1 +1 @@
-From 198b5448433ed329becaf47003faf038132fbb7f Mon Sep 17 00:00:00 2001
+From 8b0f6895e29d9c9c35f53ee623fbe86771e406b7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 198b5448433ed329becaf47003faf038132fbb7f ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' 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
                   ` (208 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: add info output for main core' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' " luca.boccassi
                   ` (64 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Feifei Wang
  Cc: Ruifeng Wang, Honnappa Nagarahalli, Harry van Haaren,
	Pavan Nikhilesh, 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/bc0bca0bd70fc9ca376ff91055c90bf6d3e5811b

Thanks.

Luca Boccassi

---
From bc0bca0bd70fc9ca376ff91055c90bf6d3e5811b Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 18:31:01 +0800
Subject: [PATCH] examples/eventdev: move ethdev stop to the end

[ upstream commit f3527e0b97ae4adf2e1871e6f67b17968b4a9486 ]

Move eth stop code from "signal_handler" function to the end of "main"
function. There are two reasons for this:

First, this improves code maintenance and makes code look simple and
clear. Based on this change, after receiving the interrupt signal,
"fdata->done" is set as 1. Then the main thread will wait all worker
lcores to jump out of the loop. Finally, the main thread will stop and
then close eth dev port.

Second, for older version, the main thread first stops eth dev port and
then waits the end of worker lcore. This may cause errors because it may
stop the eth dev port which worker lcores are using. This moving change
can fix this by waiting all worker threads to exit and then stop the
eth dev port.

In the meanwhile, remove wmb in signal_handler.

This is because when the main lcore receive the stop signal, it stores 1
into fdata->done. And then the worker lcores load "fdata->done" and jump
out of the loop to stop running. Nothing should be stored after updating
fdata->done, so the wmb is unnecessary.

Fixes: 085edac2ca38 ("examples/eventdev_pipeline: support Tx adapter")

Suggested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/eventdev_pipeline/main.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 9982d5bfb0..3dbef6ed45 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -313,7 +313,6 @@ static void
 signal_handler(int signum)
 {
 	static uint8_t once;
-	uint16_t portid;
 
 	if (fdata->done)
 		rte_exit(1, "Exiting on signal %d\n", signum);
@@ -324,17 +323,6 @@ signal_handler(int signum)
 			rte_event_dev_dump(0, stdout);
 		once = 1;
 		fdata->done = 1;
-		rte_smp_wmb();
-
-		RTE_ETH_FOREACH_DEV(portid) {
-			rte_event_eth_rx_adapter_stop(portid);
-			rte_event_eth_tx_adapter_stop(portid);
-			if (rte_eth_dev_stop(portid) < 0)
-				printf("Failed to stop port %u", portid);
-		}
-
-		rte_eal_mp_wait_lcore();
-
 	}
 	if (signum == SIGTSTP)
 		rte_event_dev_dump(0, stdout);
@@ -485,6 +473,10 @@ main(int argc, char **argv)
 	}
 
 	RTE_ETH_FOREACH_DEV(portid) {
+		rte_event_eth_rx_adapter_stop(portid);
+		rte_event_eth_tx_adapter_stop(portid);
+		if (rte_eth_dev_stop(portid) < 0)
+			printf("Failed to stop port %u", portid);
 		rte_eth_dev_close(portid);
 	}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.538992401 +0000
+++ 0211-examples-eventdev-move-ethdev-stop-to-the-end.patch	2021-02-05 11:18:29.166697965 +0000
@@ -1 +1 @@
-From f3527e0b97ae4adf2e1871e6f67b17968b4a9486 Mon Sep 17 00:00:00 2001
+From bc0bca0bd70fc9ca376ff91055c90bf6d3e5811b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3527e0b97ae4adf2e1871e6f67b17968b4a9486 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' 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
                   ` (209 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' " luca.boccassi
                   ` (63 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Pavan Nikhilesh, 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/75c9f3fea781fcf1c436e1efc19952827fb18462

Thanks.

Luca Boccassi

---
From 75c9f3fea781fcf1c436e1efc19952827fb18462 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 15:08:26 +0800
Subject: [PATCH] app/eventdev: fix SMP barrier in performance test

[ upstream commit c7c033d173f2d4f14834c0fb942b84725ac940e8 ]

This patch fixes RTE SMP barrier bugs for the perf test of eventdev.

For the "perf_process_last_stage" function, wmb after storing
processed_pkts should be moved before it. This is because the worker
lcore should ensure it has really finished data processing, e.g. event
stored into buffers, before the shared variables "w->processed_pkts"are
stored.

For the "perf_process_last_stage_latency", on the one hand, the wmb
should be moved before storing into "w->processed_pkts". The reason is
the same as above. But on the other hand, for "w->latency", wmb is
unnecessary due to data dependency.

Fixes: 2369f73329f8 ("app/testeventdev: add perf queue worker functions")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/test_perf_common.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h
index ff9705df88..e7233e5a5b 100644
--- a/app/test-eventdev/test_perf_common.h
+++ b/app/test-eventdev/test_perf_common.h
@@ -97,8 +97,13 @@ perf_process_last_stage(struct rte_mempool *const pool,
 		void *bufs[], int const buf_sz, uint8_t count)
 {
 	bufs[count++] = ev->event_ptr;
-	w->processed_pkts++;
+
+	/* wmb here ensures event_prt is stored before
+	 * updating the number of processed packets
+	 * for worker lcores
+	 */
 	rte_smp_wmb();
+	w->processed_pkts++;
 
 	if (unlikely(count == buf_sz)) {
 		count = 0;
@@ -116,6 +121,12 @@ perf_process_last_stage_latency(struct rte_mempool *const pool,
 	struct perf_elt *const m = ev->event_ptr;
 
 	bufs[count++] = ev->event_ptr;
+
+	/* wmb here ensures event_prt is stored before
+	 * updating the number of processed packets
+	 * for worker lcores
+	 */
+	rte_smp_wmb();
 	w->processed_pkts++;
 
 	if (unlikely(count == buf_sz)) {
@@ -127,7 +138,6 @@ perf_process_last_stage_latency(struct rte_mempool *const pool,
 	}
 
 	w->latency += latency;
-	rte_smp_wmb();
 	return count;
 }
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.575772884 +0000
+++ 0212-app-eventdev-fix-SMP-barrier-in-performance-test.patch	2021-02-05 11:18:29.170698042 +0000
@@ -1 +1 @@
-From c7c033d173f2d4f14834c0fb942b84725ac940e8 Mon Sep 17 00:00:00 2001
+From 75c9f3fea781fcf1c436e1efc19952827fb18462 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7c033d173f2d4f14834c0fb942b84725ac940e8 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' 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
                   ` (210 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' " luca.boccassi
                   ` (62 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Abhinandan Gujjar, 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/e12e46e5fe12ad5bce10b35e417a205074431bf5

Thanks.

Luca Boccassi

---
From e12e46e5fe12ad5bce10b35e417a205074431bf5 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Mon, 18 Jan 2021 21:49:40 +0530
Subject: [PATCH] test/event_crypto: set cipher operation in transform

[ upstream commit 61ecfb0240bcf7bd8e9a26c67a554e21cf3e0bc3 ]

The symmetric session configure callback function in OCTEON TX2 crypto
PMD returns error if the cipher operation is not set to either encrypt
or decrypt. This patch sets the cipher operation for the null cipher
to encrypt.

Fixes: 74449375237f ("test/event_crypto_adapter: fix configuration")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index a0169aa6cf..335211cd8c 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -183,6 +183,7 @@ test_op_forward_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,7 @@ test_op_new_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.612936674 +0000
+++ 0213-test-event_crypto-set-cipher-operation-in-transform.patch	2021-02-05 11:18:29.170698042 +0000
@@ -1 +1 @@
-From 61ecfb0240bcf7bd8e9a26c67a554e21cf3e0bc3 Mon Sep 17 00:00:00 2001
+From e12e46e5fe12ad5bce10b35e417a205074431bf5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 61ecfb0240bcf7bd8e9a26c67a554e21cf3e0bc3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' 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
                   ` (211 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' " luca.boccassi
                   ` (61 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Ciara Power; +Cc: Declan Doherty, Adam Dybkowski, 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/c0bf6fbd0459d9c9a9e7e9e4263d8bcf9bc114c1

Thanks.

Luca Boccassi

---
From c0bf6fbd0459d9c9a9e7e9e4263d8bcf9bc114c1 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 20 Jan 2021 17:29:28 +0000
Subject: [PATCH] app/crypto-perf: fix latency CSV output

[ upstream commit 2f04e8248ac0cc88d86d913dab664cba60b27037 ]

The csv output for the latency performance test had an extra header,
"Packet Size", which is a duplicate of "Buffer Size", and had no
corresponding value in the output. This is now removed.

Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test-crypto-perf/cperf_test_latency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 0e4d0e1538..c2590a4dcf 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -310,7 +310,7 @@ cperf_latency_test_runner(void *arg)
 		if (ctx->options->csv) {
 			if (rte_atomic16_test_and_set(&display_once))
 				printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, "
-						"Packet Size, cycles, time (us)");
+						"cycles, time (us)");
 
 			for (i = 0; i < ctx->options->total_ops; i++) {
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.653625324 +0000
+++ 0214-app-crypto-perf-fix-latency-CSV-output.patch	2021-02-05 11:18:29.170698042 +0000
@@ -1 +1 @@
-From 2f04e8248ac0cc88d86d913dab664cba60b27037 Mon Sep 17 00:00:00 2001
+From c0bf6fbd0459d9c9a9e7e9e4263d8bcf9bc114c1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2f04e8248ac0cc88d86d913dab664cba60b27037 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' 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
                   ` (212 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'crypto/qat: fix digest in buffer' " luca.boccassi
                   ` (60 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Ciara Power; +Cc: Declan Doherty, Adam Dybkowski, 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/a756bf42a9043a08985a1644afbdd2179a84d986

Thanks.

Luca Boccassi

---
From a756bf42a9043a08985a1644afbdd2179a84d986 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 20 Jan 2021 17:29:29 +0000
Subject: [PATCH] app/crypto-perf: fix CSV output format

[ upstream commit c6ddab873dbf066c40cd268a0216a913b1802b85 ]

The csv output for each ptest type used ";" instead of ",".
This has now been fixed to use the comma format that is used in the csv
headers.

Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
Fixes: da40ebd6d383 ("app/crypto-perf: display results in test runner")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test-crypto-perf/cperf_test_latency.c        | 2 +-
 app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +-
 app/test-crypto-perf/cperf_test_throughput.c     | 4 ++--
 app/test-crypto-perf/cperf_test_verify.c         | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index c2590a4dcf..159fe8492b 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -314,7 +314,7 @@ cperf_latency_test_runner(void *arg)
 
 			for (i = 0; i < ctx->options->total_ops; i++) {
 
-				printf("\n%u;%u;%u;%"PRIu64";%"PRIu64";%.3f",
+				printf("\n%u,%u,%u,%"PRIu64",%"PRIu64",%.3f",
 					ctx->lcore_id, ctx->options->test_buffer_size,
 					test_burst_size, i + 1,
 					ctx->res[i].tsc_end - ctx->res[i].tsc_start,
diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
index 4e67d3aebd..844659aeca 100644
--- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
+++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
@@ -16,7 +16,7 @@
 #define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"
 #define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"
 #define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
-#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n"
+#define CSV_LINE_FMT "%10u,%10u,%u,%u,%u,%u,%u,%.3f,%.3f,%.3f\n"
 
 struct cperf_pmd_cyclecount_ctx {
 	uint8_t dev_id;
diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c
index f30f7d5c2c..f6eb8cf259 100644
--- a/app/test-crypto-perf/cperf_test_throughput.c
+++ b/app/test-crypto-perf/cperf_test_throughput.c
@@ -299,8 +299,8 @@ cperf_throughput_test_runner(void *test_ctx)
 					"Failed Deq,Ops(Millions),Throughput(Gbps),"
 					"Cycles/Buf\n\n");
 
-			printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
-					"%.3f;%.3f;%.3f\n",
+			printf("%u,%u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64","
+					"%.3f,%.3f,%.3f\n",
 					ctx->lcore_id,
 					ctx->options->test_buffer_size,
 					test_burst_size,
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 833bc9a552..2939aeaa93 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -406,7 +406,7 @@ cperf_verify_test_runner(void *test_ctx)
 				"Burst Size,Enqueued,Dequeued,Failed Enq,"
 				"Failed Deq,Failed Ops\n");
 
-		printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
+		printf("%10u,%10u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64","
 				"%"PRIu64"\n",
 				ctx->lcore_id,
 				ctx->options->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:38.691378325 +0000
+++ 0215-app-crypto-perf-fix-CSV-output-format.patch	2021-02-05 11:18:29.170698042 +0000
@@ -1 +1 @@
-From c6ddab873dbf066c40cd268a0216a913b1802b85 Mon Sep 17 00:00:00 2001
+From a756bf42a9043a08985a1644afbdd2179a84d986 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c6ddab873dbf066c40cd268a0216a913b1802b85 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'crypto/qat: fix digest in buffer' 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
                   ` (213 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/ipsec: fix result code for not supported' " luca.boccassi
                   ` (59 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Fan Zhang; +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/2b0467f2a39588ed78a27a05ba2f2ba136936f80

Thanks.

Luca Boccassi

---
From 2b0467f2a39588ed78a27a05ba2f2ba136936f80 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Wed, 20 Jan 2021 17:33:51 +0000
Subject: [PATCH] crypto/qat: fix digest in buffer

[ upstream commit 7a13a3939dc82819e47bb89384dcad469ed7a61c ]

This patch fixes the missed digest in buffer support to
QAT symmetric raw API. Originally digest in buffer is
supported only for wireless algorithms

Fixes: 728c76b0e50f ("crypto/qat: support raw datapath API")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/qat/qat_sym_hw_dp.c | 97 +++++++++++++++---------------
 1 file changed, 48 insertions(+), 49 deletions(-)

diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c
index dfbbad59b6..01afb883e3 100644
--- a/drivers/crypto/qat/qat_sym_hw_dp.c
+++ b/drivers/crypto/qat/qat_sym_hw_dp.c
@@ -558,55 +558,6 @@ enqueue_one_chain_job(struct qat_sym_session *ctx,
 	case ICP_QAT_HW_AUTH_ALGO_KASUMI_F9:
 	case ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3:
 		auth_param->u1.aad_adr = auth_iv->iova;
-
-		if (unlikely(n_data_vecs > 1)) {
-			int auth_end_get = 0, i = n_data_vecs - 1;
-			struct rte_crypto_vec *cvec = &data[0];
-			uint32_t len;
-
-			len = data_len - ofs.ofs.auth.tail;
-
-			while (i >= 0 && len > 0) {
-				if (cvec->len >= len) {
-					auth_iova_end = cvec->iova +
-						(cvec->len - len);
-					len = 0;
-					auth_end_get = 1;
-					break;
-				}
-				len -= cvec->len;
-				i--;
-				cvec++;
-			}
-
-			if (unlikely(auth_end_get == 0))
-				return -1;
-		} else
-			auth_iova_end = data[0].iova + auth_param->auth_off +
-				auth_param->auth_len;
-
-		/* Then check if digest-encrypted conditions are met */
-		if ((auth_param->auth_off + auth_param->auth_len <
-			cipher_param->cipher_offset +
-			cipher_param->cipher_length) &&
-			(digest->iova == auth_iova_end)) {
-			/* Handle partial digest encryption */
-			if (cipher_param->cipher_offset +
-					cipher_param->cipher_length <
-					auth_param->auth_off +
-					auth_param->auth_len +
-					ctx->digest_length)
-				req->comn_mid.dst_length =
-					req->comn_mid.src_length =
-					auth_param->auth_off +
-					auth_param->auth_len +
-					ctx->digest_length;
-			struct icp_qat_fw_comn_req_hdr *header =
-				&req->comn_hdr;
-			ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET(
-				header->serv_specif_flags,
-				ICP_QAT_FW_LA_DIGEST_IN_BUFFER);
-		}
 		break;
 	case ICP_QAT_HW_AUTH_ALGO_GALOIS_128:
 	case ICP_QAT_HW_AUTH_ALGO_GALOIS_64:
@@ -615,6 +566,54 @@ enqueue_one_chain_job(struct qat_sym_session *ctx,
 		break;
 	}
 
+	if (unlikely(n_data_vecs > 1)) {
+		int auth_end_get = 0, i = n_data_vecs - 1;
+		struct rte_crypto_vec *cvec = &data[0];
+		uint32_t len;
+
+		len = data_len - ofs.ofs.auth.tail;
+
+		while (i >= 0 && len > 0) {
+			if (cvec->len >= len) {
+				auth_iova_end = cvec->iova + len;
+				len = 0;
+				auth_end_get = 1;
+				break;
+			}
+			len -= cvec->len;
+			i--;
+			cvec++;
+		}
+
+		if (unlikely(auth_end_get == 0))
+			return -1;
+	} else
+		auth_iova_end = data[0].iova + auth_param->auth_off +
+			auth_param->auth_len;
+
+	/* Then check if digest-encrypted conditions are met */
+	if ((auth_param->auth_off + auth_param->auth_len <
+		cipher_param->cipher_offset +
+		cipher_param->cipher_length) &&
+		(digest->iova == auth_iova_end)) {
+		/* Handle partial digest encryption */
+		if (cipher_param->cipher_offset +
+				cipher_param->cipher_length <
+				auth_param->auth_off +
+				auth_param->auth_len +
+				ctx->digest_length)
+			req->comn_mid.dst_length =
+				req->comn_mid.src_length =
+				auth_param->auth_off +
+				auth_param->auth_len +
+				ctx->digest_length;
+		struct icp_qat_fw_comn_req_hdr *header =
+			&req->comn_hdr;
+		ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET(
+			header->serv_specif_flags,
+			ICP_QAT_FW_LA_DIGEST_IN_BUFFER);
+	}
+
 	return 0;
 }
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.732019688 +0000
+++ 0216-crypto-qat-fix-digest-in-buffer.patch	2021-02-05 11:18:29.170698042 +0000
@@ -1 +1 @@
-From 7a13a3939dc82819e47bb89384dcad469ed7a61c Mon Sep 17 00:00:00 2001
+From 2b0467f2a39588ed78a27a05ba2f2ba136936f80 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a13a3939dc82819e47bb89384dcad469ed7a61c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/ipsec: fix result code for not supported' 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
                   ` (214 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'crypto/qat: fix digest in buffer' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' " luca.boccassi
                   ` (58 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, 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/4b22a80a0286c74425d3211a4301714b930a62f6

Thanks.

Luca Boccassi

---
From 4b22a80a0286c74425d3211a4301714b930a62f6 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Mon, 25 Jan 2021 16:15:33 +0800
Subject: [PATCH] test/ipsec: fix result code for not supported

[ upstream commit 8dda080a0938e527c95ace0f3203a239edec48f5 ]

During SA creation, if the required algorithm is not supported,
drivers can return ENOTSUP. But in most of the IPsec test cases,
if the SA creation does not success, it just returns
TEST_FAILED.

This patch fixes this issue by returning the actual return values
from the driver to the application, so that it can make decisions
whether the test case is passed, failed or unsupported.

Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_ipsec.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 9ad07a1790..d18220a885 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -744,7 +744,7 @@ create_sa(enum rte_security_session_action_type action_type,
 	ut->ss[j].type = action_type;
 	rc = create_session(ut, &ts->qp_conf, ts->valid_dev, j);
 	if (rc != 0)
-		return TEST_FAILED;
+		return rc;
 
 	rc = rte_ipsec_sa_init(ut->ss[j].sa, &ut->sa_prm, sz);
 	rc = (rc > 0 && (uint32_t)rc <= sz) ? 0 : -EINVAL;
@@ -1247,7 +1247,7 @@ test_ipsec_crypto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1349,7 +1349,7 @@ test_ipsec_crypto_outb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate input mbuf data */
@@ -1458,7 +1458,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -1536,7 +1536,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -1644,7 +1644,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1722,7 +1722,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1798,7 +1798,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1911,7 +1911,7 @@ test_ipsec_replay_inb_inside_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -2004,7 +2004,7 @@ test_ipsec_replay_inb_outside_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -2104,7 +2104,7 @@ test_ipsec_replay_inb_repeat_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -2205,7 +2205,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -2338,7 +2338,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* create second rte_ipsec_sa */
@@ -2348,7 +2348,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i);
 		destroy_sa(0);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -2424,7 +2424,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* create second rte_ipsec_sa */
@@ -2434,7 +2434,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i);
 		destroy_sa(0);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.771083063 +0000
+++ 0217-test-ipsec-fix-result-code-for-not-supported.patch	2021-02-05 11:18:29.174698119 +0000
@@ -1 +1 @@
-From 8dda080a0938e527c95ace0f3203a239edec48f5 Mon Sep 17 00:00:00 2001
+From 4b22a80a0286c74425d3211a4301714b930a62f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8dda080a0938e527c95ace0f3203a239edec48f5 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation 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
                   ` (215 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'test/ipsec: fix result code for not supported' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'eal: fix MCS lock header include' " luca.boccassi
                   ` (57 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, 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/fc49e71f7960433a4cacff40a2e62623a25471e2

Thanks.

Luca Boccassi

---
From fc49e71f7960433a4cacff40a2e62623a25471e2 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Mon, 25 Jan 2021 16:15:34 +0800
Subject: [PATCH] crypto/dpaa2_sec: fix memory allocation check

[ upstream commit 9a494a3b90aad48f5f3f4ced14104f3347723c1b ]

When key length is 0, zmalloc will return NULL pointer
and in that case it should not return NOMEM.
So in this patch, adding a check on key length.

Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 6ff0d833e9..5d91bf910e 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1842,7 +1842,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev,
 	session->ctxt_type = DPAA2_SEC_CIPHER;
 	session->cipher_key.data = rte_zmalloc(NULL, xform->cipher.key.length,
 			RTE_CACHE_LINE_SIZE);
-	if (session->cipher_key.data == NULL) {
+	if (session->cipher_key.data == NULL && xform->cipher.key.length > 0) {
 		DPAA2_SEC_ERR("No Memory for cipher key");
 		rte_free(priv);
 		return -ENOMEM;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.809477822 +0000
+++ 0218-crypto-dpaa2_sec-fix-memory-allocation-check.patch	2021-02-05 11:18:29.174698119 +0000
@@ -1 +1 @@
-From 9a494a3b90aad48f5f3f4ced14104f3347723c1b Mon Sep 17 00:00:00 2001
+From fc49e71f7960433a4cacff40a2e62623a25471e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a494a3b90aad48f5f3f4ced14104f3347723c1b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index cab79db3dc..05b194ccff 100644
+index 6ff0d833e9..5d91bf910e 100644

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

* [dpdk-stable] patch 'eal: fix MCS lock header include' 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
                   ` (216 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'eal: fix internal ABI tag with clang' " luca.boccassi
                   ` (56 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +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/364e00637a558aa443d61893e0c4481ad085de57

Thanks.

Luca Boccassi

---
From 364e00637a558aa443d61893e0c4481ad085de57 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 29 Jan 2021 16:48:15 +0000
Subject: [PATCH] eal: fix MCS lock header include

[ upstream commit 3c2cca6a0da17c83716522084357731ab053172e ]

Include 'rte_branch_prediction.h' to get the likely/unlikely macro
definitions.

Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_eal/include/generic/rte_mcslock.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h
index d370bef17a..9f323bd2a2 100644
--- a/lib/librte_eal/include/generic/rte_mcslock.h
+++ b/lib/librte_eal/include/generic/rte_mcslock.h
@@ -22,6 +22,7 @@
 #include <rte_lcore.h>
 #include <rte_common.h>
 #include <rte_pause.h>
+#include <rte_branch_prediction.h>
 
 /**
  * The rte_mcslock_t type.
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.852430564 +0000
+++ 0219-eal-fix-MCS-lock-header-include.patch	2021-02-05 11:18:29.174698119 +0000
@@ -1 +1 @@
-From 3c2cca6a0da17c83716522084357731ab053172e Mon Sep 17 00:00:00 2001
+From 364e00637a558aa443d61893e0c4481ad085de57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c2cca6a0da17c83716522084357731ab053172e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal: fix internal ABI tag 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
                   ` (217 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'eal: fix MCS lock header include' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: fix missing header includes' " luca.boccassi
                   ` (55 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +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/527f81e20ee738ac62e3268accb7841ba94db184

Thanks.

Luca Boccassi

---
From 527f81e20ee738ac62e3268accb7841ba94db184 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 29 Jan 2021 16:48:16 +0000
Subject: [PATCH] eal: fix internal ABI tag with clang

[ upstream commit 4ab63cd60ceb343db43da8ed060e45e165393dae ]

Clang does not have an "error" attribute for functions, so for marking
internal functions we need to check for the error attribute, and provide
a fallback if it is not present. For clang, we can use "diagnose_if"
attribute, similarly checking for its presence before use.

Fixes: fba5af82adc8 ("eal: add internal ABI tag definition")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/include/rte_compat.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h
index 4cd8f68d68..2718612cce 100644
--- a/lib/librte_eal/include/rte_compat.h
+++ b/lib/librte_eal/include/rte_compat.h
@@ -19,12 +19,23 @@ __attribute__((section(".text.experimental")))
 
 #endif
 
-#ifndef ALLOW_INTERNAL_API
+#ifndef __has_attribute
+/* if no has_attribute assume no support for attribute too */
+#define __has_attribute(x) 0
+#endif
+
+#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */
 
 #define __rte_internal \
 __attribute__((error("Symbol is not public ABI"), \
 section(".text.internal")))
 
+#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */
+
+#define __rte_internal \
+__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \
+section(".text.internal")))
+
 #else
 
 #define __rte_internal \
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.890084853 +0000
+++ 0220-eal-fix-internal-ABI-tag-with-clang.patch	2021-02-05 11:18:29.174698119 +0000
@@ -1 +1 @@
-From 4ab63cd60ceb343db43da8ed060e45e165393dae Mon Sep 17 00:00:00 2001
+From 527f81e20ee738ac62e3268accb7841ba94db184 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ab63cd60ceb343db43da8ed060e45e165393dae ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: fix missing header includes' 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
                   ` (218 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'eal: fix internal ABI tag with clang' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'rib: fix missing header include' " luca.boccassi
                   ` (54 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +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/f9ec53be96677030789a39b96d06f5ed2ef04bec

Thanks.

Luca Boccassi

---
From f9ec53be96677030789a39b96d06f5ed2ef04bec Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 29 Jan 2021 16:48:17 +0000
Subject: [PATCH] power: fix missing header includes

[ upstream commit deb6ea1d2d3906c570e50b1da6160121a475878e ]

The rte_power_guest_channel.h file did not include its dependent
headers, so add them.

Fixes: 5f443cc0f905 ("power: create guest channel public header file")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_power/rte_power_guest_channel.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index adc9738174..ed4fbfdcd3 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -4,6 +4,12 @@
 #ifndef RTE_POWER_GUEST_CHANNEL_H
 #define RTE_POWER_GUEST_CHANNEL_H
 
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.927162591 +0000
+++ 0221-power-fix-missing-header-includes.patch	2021-02-05 11:18:29.178698194 +0000
@@ -1 +1 @@
-From deb6ea1d2d3906c570e50b1da6160121a475878e Mon Sep 17 00:00:00 2001
+From f9ec53be96677030789a39b96d06f5ed2ef04bec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit deb6ea1d2d3906c570e50b1da6160121a475878e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'rib: fix missing header include' 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
                   ` (219 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'power: fix missing header includes' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/testpmd: fix packets dump overlapping' " luca.boccassi
                   ` (53 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: 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/f733bc6b001ffc763c0fbc38451a3190b90d048e

Thanks.

Luca Boccassi

---
From f733bc6b001ffc763c0fbc38451a3190b90d048e Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 29 Jan 2021 16:48:18 +0000
Subject: [PATCH] rib: fix missing header include

[ upstream commit 5d1a53130ab7570d96cf7edd0b48413d3bba1bfc ]

The rte_rib6 header was using RTE_MIN macro from rte_common.h but not
including the header file.

Fixes: f7e861e21c46 ("rib: support IPv6")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib6.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
index b5e10569b9..dbd52928a2 100644
--- a/lib/librte_rib/rte_rib6.h
+++ b/lib/librte_rib/rte_rib6.h
@@ -20,6 +20,7 @@
 
 #include <rte_memcpy.h>
 #include <rte_compat.h>
+#include <rte_common.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:38.959741463 +0000
+++ 0222-rib-fix-missing-header-include.patch	2021-02-05 11:18:29.178698194 +0000
@@ -1 +1 @@
-From 5d1a53130ab7570d96cf7edd0b48413d3bba1bfc Mon Sep 17 00:00:00 2001
+From f733bc6b001ffc763c0fbc38451a3190b90d048e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d1a53130ab7570d96cf7edd0b48413d3bba1bfc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/testpmd: fix packets dump overlapping' 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
                   ` (220 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'rib: fix missing header include' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/e1000: fix flow control mode setting' " luca.boccassi
                   ` (52 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Viacheslav Ovsiienko, 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/016bb40b6cf6211ea64bef22065b9454a95c681d

Thanks.

Luca Boccassi

---
From 016bb40b6cf6211ea64bef22065b9454a95c681d Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Wed, 20 Jan 2021 08:50:17 +0200
Subject: [PATCH] app/testpmd: fix packets dump overlapping

[ upstream commit 2ce964954b44aa87926052a7b018605e2a19eacd ]

When testpmd enabled the verbosity for the received packets, if two
packets were received at the same time, for example, sampling packet and
normal packet, the dump output of these packets may be overlapping due
to multiple core handling the multiple queues simultaneously.

The patch uses one string buffer that collects all the packet dump
output into this buffer and then printouts it at last, that guarantees
to printout separately the dump output per packet.

Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate function")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/util.c | 175 +++++++++++++++++++++++++++++---------------
 1 file changed, 115 insertions(+), 60 deletions(-)

diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index 649bf8f53a..a9e431a8b2 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -15,12 +15,23 @@
 
 #include "testpmd.h"
 
+#define MAX_STRING_LEN 8192
+
+#define MKDUMPSTR(buf, buf_size, cur_len, ...) \
+do { \
+	if (cur_len >= buf_size) \
+		break; \
+	cur_len += snprintf(buf + cur_len, buf_size - cur_len, __VA_ARGS__); \
+} while (0)
+
 static inline void
-print_ether_addr(const char *what, const struct rte_ether_addr *eth_addr)
+print_ether_addr(const char *what, const struct rte_ether_addr *eth_addr,
+		 char print_buf[], size_t buf_size, size_t *cur_len)
 {
 	char buf[RTE_ETHER_ADDR_FMT_SIZE];
+
 	rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
-	printf("%s%s", what, buf);
+	MKDUMPSTR(print_buf, buf_size, *cur_len, "%s%s", what, buf);
 }
 
 static inline bool
@@ -74,13 +85,15 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 	uint32_t vx_vni;
 	const char *reason;
 	int dynf_index;
+	char print_buf[MAX_STRING_LEN];
+	size_t buf_size = MAX_STRING_LEN;
+	size_t cur_len = 0;
 
 	if (!nb_pkts)
 		return;
-	printf("port %u/queue %u: %s %u packets\n",
-		port_id, queue,
-	       is_rx ? "received" : "sent",
-	       (unsigned int) nb_pkts);
+	MKDUMPSTR(print_buf, buf_size, cur_len,
+		  "port %u/queue %u: %s %u packets\n", port_id, queue,
+		  is_rx ? "received" : "sent", (unsigned int) nb_pkts);
 	for (i = 0; i < nb_pkts; i++) {
 		int ret;
 		struct rte_flow_error error;
@@ -93,95 +106,128 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 		is_encapsulation = RTE_ETH_IS_TUNNEL_PKT(packet_type);
 		ret = rte_flow_get_restore_info(port_id, mb, &info, &error);
 		if (!ret) {
-			printf("restore info:");
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  "restore info:");
 			if (info.flags & RTE_FLOW_RESTORE_INFO_TUNNEL) {
 				struct port_flow_tunnel *port_tunnel;
 
 				port_tunnel = port_flow_locate_tunnel
 					      (port_id, &info.tunnel);
-				printf(" - tunnel");
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - tunnel");
 				if (port_tunnel)
-					printf(" #%u", port_tunnel->id);
+					MKDUMPSTR(print_buf, buf_size, cur_len,
+						  " #%u", port_tunnel->id);
 				else
-					printf(" %s", "-none-");
-				printf(" type %s",
-					port_flow_tunnel_type(&info.tunnel));
+					MKDUMPSTR(print_buf, buf_size, cur_len,
+						  " %s", "-none-");
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " type %s", port_flow_tunnel_type
+					  (&info.tunnel));
 			} else {
-				printf(" - no tunnel info");
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - no tunnel info");
 			}
 			if (info.flags & RTE_FLOW_RESTORE_INFO_ENCAPSULATED)
-				printf(" - outer header present");
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - outer header present");
 			else
-				printf(" - no outer header");
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - no outer header");
 			if (info.flags & RTE_FLOW_RESTORE_INFO_GROUP_ID)
-				printf(" - miss group %u", info.group_id);
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - miss group %u", info.group_id);
 			else
-				printf(" - no miss group");
-			printf("\n");
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - no miss group");
+			MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
 		}
-		print_ether_addr("  src=", &eth_hdr->s_addr);
-		print_ether_addr(" - dst=", &eth_hdr->d_addr);
-		printf(" - type=0x%04x - length=%u - nb_segs=%d",
-		       eth_type, (unsigned int) mb->pkt_len,
-		       (int)mb->nb_segs);
+		print_ether_addr("  src=", &eth_hdr->s_addr,
+				 print_buf, buf_size, &cur_len);
+		print_ether_addr(" - dst=", &eth_hdr->d_addr,
+				 print_buf, buf_size, &cur_len);
+		MKDUMPSTR(print_buf, buf_size, cur_len,
+			  " - type=0x%04x - length=%u - nb_segs=%d",
+			  eth_type, (unsigned int) mb->pkt_len,
+			  (int)mb->nb_segs);
 		ol_flags = mb->ol_flags;
 		if (ol_flags & PKT_RX_RSS_HASH) {
-			printf(" - RSS hash=0x%x", (unsigned int) mb->hash.rss);
-			printf(" - RSS queue=0x%x", (unsigned int) queue);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - RSS hash=0x%x",
+				  (unsigned int) mb->hash.rss);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - RSS queue=0x%x", (unsigned int) queue);
 		}
 		if (ol_flags & PKT_RX_FDIR) {
-			printf(" - FDIR matched ");
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - FDIR matched ");
 			if (ol_flags & PKT_RX_FDIR_ID)
-				printf("ID=0x%x",
-				       mb->hash.fdir.hi);
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  "ID=0x%x", mb->hash.fdir.hi);
 			else if (ol_flags & PKT_RX_FDIR_FLX)
-				printf("flex bytes=0x%08x %08x",
-				       mb->hash.fdir.hi, mb->hash.fdir.lo);
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  "flex bytes=0x%08x %08x",
+					  mb->hash.fdir.hi, mb->hash.fdir.lo);
 			else
-				printf("hash=0x%x ID=0x%x ",
-				       mb->hash.fdir.hash, mb->hash.fdir.id);
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  "hash=0x%x ID=0x%x ",
+					  mb->hash.fdir.hash, mb->hash.fdir.id);
 		}
 		if (is_timestamp_enabled(mb))
-			printf(" - timestamp %"PRIu64" ", get_timestamp(mb));
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - timestamp %"PRIu64" ", get_timestamp(mb));
 		if (ol_flags & PKT_RX_QINQ)
-			printf(" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x",
-			       mb->vlan_tci, mb->vlan_tci_outer);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x",
+				  mb->vlan_tci, mb->vlan_tci_outer);
 		else if (ol_flags & PKT_RX_VLAN)
-			printf(" - VLAN tci=0x%x", mb->vlan_tci);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - VLAN tci=0x%x", mb->vlan_tci);
 		if (!is_rx && (ol_flags & PKT_TX_DYNF_METADATA))
-			printf(" - Tx metadata: 0x%x",
-			       *RTE_FLOW_DYNF_METADATA(mb));
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - Tx metadata: 0x%x",
+				  *RTE_FLOW_DYNF_METADATA(mb));
 		if (is_rx && (ol_flags & PKT_RX_DYNF_METADATA))
-			printf(" - Rx metadata: 0x%x",
-			       *RTE_FLOW_DYNF_METADATA(mb));
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - Rx metadata: 0x%x",
+				  *RTE_FLOW_DYNF_METADATA(mb));
 		for (dynf_index = 0; dynf_index < 64; dynf_index++) {
 			if (dynf_names[dynf_index][0] != '\0')
-				printf(" - dynf %s: %d",
-				       dynf_names[dynf_index],
-				       !!(ol_flags & (1UL << dynf_index)));
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - dynf %s: %d",
+					  dynf_names[dynf_index],
+					  !!(ol_flags & (1UL << dynf_index)));
 		}
 		if (mb->packet_type) {
 			rte_get_ptype_name(mb->packet_type, buf, sizeof(buf));
-			printf(" - hw ptype: %s", buf);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - hw ptype: %s", buf);
 		}
 		sw_packet_type = rte_net_get_ptype(mb, &hdr_lens,
 					RTE_PTYPE_ALL_MASK);
 		rte_get_ptype_name(sw_packet_type, buf, sizeof(buf));
-		printf(" - sw ptype: %s", buf);
+		MKDUMPSTR(print_buf, buf_size, cur_len, " - sw ptype: %s", buf);
 		if (sw_packet_type & RTE_PTYPE_L2_MASK)
-			printf(" - l2_len=%d", hdr_lens.l2_len);
+			MKDUMPSTR(print_buf, buf_size, cur_len, " - l2_len=%d",
+				  hdr_lens.l2_len);
 		if (sw_packet_type & RTE_PTYPE_L3_MASK)
-			printf(" - l3_len=%d", hdr_lens.l3_len);
+			MKDUMPSTR(print_buf, buf_size, cur_len, " - l3_len=%d",
+				  hdr_lens.l3_len);
 		if (sw_packet_type & RTE_PTYPE_L4_MASK)
-			printf(" - l4_len=%d", hdr_lens.l4_len);
+			MKDUMPSTR(print_buf, buf_size, cur_len, " - l4_len=%d",
+				  hdr_lens.l4_len);
 		if (sw_packet_type & RTE_PTYPE_TUNNEL_MASK)
-			printf(" - tunnel_len=%d", hdr_lens.tunnel_len);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - tunnel_len=%d", hdr_lens.tunnel_len);
 		if (sw_packet_type & RTE_PTYPE_INNER_L2_MASK)
-			printf(" - inner_l2_len=%d", hdr_lens.inner_l2_len);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - inner_l2_len=%d", hdr_lens.inner_l2_len);
 		if (sw_packet_type & RTE_PTYPE_INNER_L3_MASK)
-			printf(" - inner_l3_len=%d", hdr_lens.inner_l3_len);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - inner_l3_len=%d", hdr_lens.inner_l3_len);
 		if (sw_packet_type & RTE_PTYPE_INNER_L4_MASK)
-			printf(" - inner_l4_len=%d", hdr_lens.inner_l4_len);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  " - inner_l4_len=%d", hdr_lens.inner_l4_len);
 		if (is_encapsulation) {
 			struct rte_ipv4_hdr *ipv4_hdr;
 			struct rte_ipv6_hdr *ipv6_hdr;
@@ -218,18 +264,27 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 				l2_len + l3_len + l4_len);
 				udp_port = RTE_BE_TO_CPU_16(udp_hdr->dst_port);
 				vx_vni = rte_be_to_cpu_32(vxlan_hdr->vx_vni);
-				printf(" - VXLAN packet: packet type =%d, "
-				       "Destination UDP port =%d, VNI = %d",
-				       packet_type, udp_port, vx_vni >> 8);
+				MKDUMPSTR(print_buf, buf_size, cur_len,
+					  " - VXLAN packet: packet type =%d, "
+					  "Destination UDP port =%d, VNI = %d",
+					  packet_type, udp_port, vx_vni >> 8);
 			}
 		}
-		printf(" - %s queue=0x%x", is_rx ? "Receive" : "Send",
-			(unsigned int) queue);
-		printf("\n");
+		MKDUMPSTR(print_buf, buf_size, cur_len,
+			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
+			  (unsigned int) queue);
+		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
 		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
-		printf("  ol_flags: %s\n", buf);
+		MKDUMPSTR(print_buf, buf_size, cur_len,
+			  "  ol_flags: %s\n", buf);
 		if (rte_mbuf_check(mb, 1, &reason) < 0)
-			printf("INVALID mbuf: %s\n", reason);
+			MKDUMPSTR(print_buf, buf_size, cur_len,
+				  "INVALID mbuf: %s\n", reason);
+		if (cur_len >= buf_size)
+			printf("%s ...\n", print_buf);
+		else
+			printf("%s", print_buf);
+		cur_len = 0;
 	}
 }
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.002228974 +0000
+++ 0223-app-testpmd-fix-packets-dump-overlapping.patch	2021-02-05 11:18:29.178698194 +0000
@@ -1 +1 @@
-From 2ce964954b44aa87926052a7b018605e2a19eacd Mon Sep 17 00:00:00 2001
+From 016bb40b6cf6211ea64bef22065b9454a95c681d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ce964954b44aa87926052a7b018605e2a19eacd ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/e1000: fix flow control mode setting' 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
                   ` (221 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/testpmd: fix packets dump overlapping' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow split combined with counter' " luca.boccassi
                   ` (51 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Wenjun Wu; +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/da9ff873df04fd6a6f9cd61741fff7d36e5b4734

Thanks.

Luca Boccassi

---
From da9ff873df04fd6a6f9cd61741fff7d36e5b4734 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Wed, 20 Jan 2021 14:53:37 +0800
Subject: [PATCH] net/e1000: fix flow control mode setting

[ upstream commit 9f3c2398ae8a31eac1d5e00696a7922b2531597b ]

E1000_CTRL register should be updated according to fc_conf->mode's
value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index dfe87508c2..5bcc67d75f 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3064,6 +3064,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	uint32_t rx_buf_size;
 	uint32_t max_high_water;
 	uint32_t rctl;
+	uint32_t ctrl;
 
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	if (fc_conf->autoneg != hw->mac.autoneg)
@@ -3101,6 +3102,39 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 			rctl &= ~E1000_RCTL_PMCF;
 
 		E1000_WRITE_REG(hw, E1000_RCTL, rctl);
+
+		/*
+		 * check if we want to change flow control mode - driver doesn't have native
+		 * capability to do that, so we'll write the registers ourselves
+		 */
+		ctrl = E1000_READ_REG(hw, E1000_CTRL);
+
+		/*
+		 * set or clear E1000_CTRL_RFCE and E1000_CTRL_TFCE bits depending
+		 * on configuration
+		 */
+		switch (fc_conf->mode) {
+		case RTE_FC_NONE:
+			ctrl &= ~E1000_CTRL_RFCE & ~E1000_CTRL_TFCE;
+			break;
+		case RTE_FC_RX_PAUSE:
+			ctrl |= E1000_CTRL_RFCE;
+			ctrl &= ~E1000_CTRL_TFCE;
+			break;
+		case RTE_FC_TX_PAUSE:
+			ctrl |= E1000_CTRL_TFCE;
+			ctrl &= ~E1000_CTRL_RFCE;
+			break;
+		case RTE_FC_FULL:
+			ctrl |= E1000_CTRL_RFCE | E1000_CTRL_TFCE;
+			break;
+		default:
+			PMD_INIT_LOG(ERR, "invalid flow control mode");
+			return -EINVAL;
+		}
+
+		E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
+
 		E1000_WRITE_FLUSH(hw);
 
 		return 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.039575538 +0000
+++ 0224-net-e1000-fix-flow-control-mode-setting.patch	2021-02-05 11:18:29.182698271 +0000
@@ -1 +1 @@
-From 9f3c2398ae8a31eac1d5e00696a7922b2531597b Mon Sep 17 00:00:00 2001
+From da9ff873df04fd6a6f9cd61741fff7d36e5b4734 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f3c2398ae8a31eac1d5e00696a7922b2531597b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ec355cbf35..5323504e98 100644
+index dfe87508c2..5bcc67d75f 100644

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

* [dpdk-stable] patch 'net/mlx5: fix flow split combined with counter' 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
                   ` (222 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/e1000: fix flow control mode setting' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow split combined with age action' " luca.boccassi
                   ` (50 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/79fa0ec96a14c2ecb223c22dc53a6a8a722aed9a

Thanks.

Luca Boccassi

---
From 79fa0ec96a14c2ecb223c22dc53a6a8a722aed9a Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Sun, 17 Jan 2021 11:40:46 +0200
Subject: [PATCH] net/mlx5: fix flow split combined with counter

[ upstream commit 63f4d5693ed8459f8867a23d0b87cf9c60983767 ]

Currently, for a flow containing a count action, if flow is split to
sub-flows, a new counter will be created for each sub-flow.
However only the counter created for the last sub-flow will be queried
on flow query and cleared on flow removal.

This behavior is wrong, causing a leak of resources.
Need to create just one counter per flow, and use it for all sub-flows.

This patch adds the required check to make sure a counter is
created just once per flow, and used by all sub-flows.

Fixes: fa2d01c87d2b ("net/mlx5: support flow aging")

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 407e76e7b1..ab9aaab4ec 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10235,17 +10235,22 @@ flow_dv_translate(struct rte_eth_dev *dev,
 					handle->dvh.modify_hdr->action;
 			}
 			if (action_flags & MLX5_FLOW_ACTION_COUNT) {
-				flow->counter =
-					flow_dv_translate_create_counter(dev,
-						dev_flow, count, age);
-
-				if (!flow->counter)
-					return rte_flow_error_set
+				/*
+				 * Create one count action, to be used
+				 * by all sub-flows.
+				 */
+				if (!flow->counter) {
+					flow->counter =
+						flow_dv_translate_create_counter
+							(dev, dev_flow, count,
+							 age);
+					if (!flow->counter)
+						return rte_flow_error_set
 						(error, rte_errno,
-						RTE_FLOW_ERROR_TYPE_ACTION,
-						NULL,
-						"cannot create counter"
-						" object.");
+						 RTE_FLOW_ERROR_TYPE_ACTION,
+						 NULL, "cannot create counter"
+						 " object.");
+				}
 				dev_flow->dv.actions[actions_n] =
 					  (flow_dv_counter_get_by_idx(dev,
 					  flow->counter, NULL))->action;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.083446225 +0000
+++ 0225-net-mlx5-fix-flow-split-combined-with-counter.patch	2021-02-05 11:18:29.190698423 +0000
@@ -1 +1 @@
-From 63f4d5693ed8459f8867a23d0b87cf9c60983767 Mon Sep 17 00:00:00 2001
+From 79fa0ec96a14c2ecb223c22dc53a6a8a722aed9a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 63f4d5693ed8459f8867a23d0b87cf9c60983767 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 5e34cbeea9..012d5893ba 100644
+index 407e76e7b1..ab9aaab4ec 100644
@@ -30 +31 @@
-@@ -10681,17 +10681,22 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10235,17 +10235,22 @@ flow_dv_translate(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix flow split combined with age action' 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
                   ` (223 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow split combined with counter' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: fix device detach' " luca.boccassi
                   ` (49 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/d4336647554aa4cd22583d40219afdd9d8be10e2

Thanks.

Luca Boccassi

---
From d4336647554aa4cd22583d40219afdd9d8be10e2 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Sun, 17 Jan 2021 11:40:45 +0200
Subject: [PATCH] net/mlx5: fix flow split combined with age action

[ upstream commit 14ccfd2ed1686fa6bb42117b0461be278816eca6 ]

Currently, for a flow containing an age action, if flow is split to
sub-flows, a new age action will be created for each sub-flow.
However only the action created for the last sub-flow will be queried
on flow query and cleared on flow removal.

This behavior is wrong, causing a leak of resources.
Need to create just one action per flow, and use it for all sub-flows.

This patch adds the required check to make sure an age action is
created just once per flow, and used by all sub-flows.

Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ab9aaab4ec..ae836c6a52 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9897,14 +9897,22 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			break;
 		case RTE_FLOW_ACTION_TYPE_AGE:
 			if (priv->sh->flow_hit_aso_en && attr->group) {
-				flow->age = flow_dv_translate_create_aso_age
-						(dev, action->conf, error);
-				if (!flow->age)
-					return rte_flow_error_set
+				/*
+				 * Create one shared age action, to be used
+				 * by all sub-flows.
+				 */
+				if (!flow->age) {
+					flow->age =
+						flow_dv_translate_create_aso_age
+							(dev, action->conf,
+							 error);
+					if (!flow->age)
+						return rte_flow_error_set
 						(error, rte_errno,
 						 RTE_FLOW_ERROR_TYPE_ACTION,
 						 NULL,
 						 "can't create ASO age action");
+				}
 				dev_flow->dv.actions[actions_n++] =
 					  (flow_aso_age_get_by_idx
 						(dev, flow->age))->dr_action;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.137016022 +0000
+++ 0226-net-mlx5-fix-flow-split-combined-with-age-action.patch	2021-02-05 11:18:29.198698575 +0000
@@ -1 +1 @@
-From 14ccfd2ed1686fa6bb42117b0461be278816eca6 Mon Sep 17 00:00:00 2001
+From d4336647554aa4cd22583d40219afdd9d8be10e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 14ccfd2ed1686fa6bb42117b0461be278816eca6 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 012d5893ba..f32d6c12df 100644
+index ab9aaab4ec..ae836c6a52 100644
@@ -30 +31 @@
-@@ -10344,14 +10344,22 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -9897,14 +9897,22 @@ flow_dv_translate(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx4: fix device detach' 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
                   ` (224 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow split combined with age action' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: fix handling of probing failure' " luca.boccassi
                   ` (48 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Michael Baum; +Cc: David Marchand, 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/8fd290074d7cb8e48715d7a3b797f0ac55a70d62

Thanks.

Luca Boccassi

---
From 8fd290074d7cb8e48715d7a3b797f0ac55a70d62 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 20 Jan 2021 08:14:50 +0000
Subject: [PATCH] net/mlx4: fix device detach

[ upstream commit 8e1630e0f1985beb7e48429e3a7614f4732b0e68 ]

When mlx4 device is probed, 2 different ethdev ports may be created for
the 2 physical ports of the device.

Wrongly, when the device is removed, the created ports are not released.

Close and release the ethdev ports in remove process.

Bugzilla ID: 488
Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/mlx4/mlx4.c | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index d5d8c96351..7460afa859 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -375,8 +375,10 @@ mlx4_dev_close(struct rte_eth_dev *dev)
 	struct mlx4_priv *priv = dev->data->dev_private;
 	unsigned int i;
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		rte_eth_dev_release_port(dev);
 		return 0;
+	}
 	DEBUG("%p: closing device \"%s\"",
 	      (void *)dev,
 	      ((priv->ctx != NULL) ? priv->ctx->device->name : ""));
@@ -1123,6 +1125,36 @@ error:
 	return -err;
 }
 
+/**
+ * DPDK callback to remove a PCI device.
+ *
+ * This function removes all Ethernet devices belong to a given PCI device.
+ *
+ * @param[in] pci_dev
+ *   Pointer to the PCI device.
+ *
+ * @return
+ *   0 on success, the function cannot fail.
+ */
+static int
+mlx4_pci_remove(struct rte_pci_device *pci_dev)
+{
+	uint16_t port_id;
+	int ret = 0;
+
+	RTE_ETH_FOREACH_DEV_OF(port_id, &pci_dev->device) {
+		/*
+		 * mlx4_dev_close() is not registered to secondary process,
+		 * call the close function explicitly for secondary process.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+			ret |= mlx4_dev_close(&rte_eth_devices[port_id]);
+		else
+			ret |= rte_eth_dev_close(port_id);
+	}
+	return ret == 0 ? 0 : -EIO;
+}
+
 static const struct rte_pci_id mlx4_pci_id_map[] = {
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX,
@@ -1147,6 +1179,7 @@ static struct rte_pci_driver mlx4_driver = {
 	},
 	.id_table = mlx4_pci_id_map,
 	.probe = mlx4_pci_probe,
+	.remove = mlx4_pci_remove,
 	.drv_flags = RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV,
 };
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.188736444 +0000
+++ 0227-net-mlx4-fix-device-detach.patch	2021-02-05 11:18:29.202698652 +0000
@@ -1 +1 @@
-From 8e1630e0f1985beb7e48429e3a7614f4732b0e68 Mon Sep 17 00:00:00 2001
+From 8fd290074d7cb8e48715d7a3b797f0ac55a70d62 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e1630e0f1985beb7e48429e3a7614f4732b0e68 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 27af426363..f520d32456 100644
+index d5d8c96351..7460afa859 100644

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

* [dpdk-stable] patch 'net/mlx4: fix handling of probing 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
                   ` (225 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: fix device detach' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix FW version log' " luca.boccassi
                   ` (47 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, 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/7d169ad52938deea81d75ae6b7f566276a19a2a1
each

Thanks.

Luca Boccassi

---
From 7d169ad52938deea81d75ae6b7f566276a19a2a1 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 20 Jan 2021 08:14:51 +0000
Subject: [PATCH] net/mlx4: fix handling of probing failure

[ upstream commit bcf58b64dafe1a298ee5de2ae018876d2e5c1362 ]

In mlx4 PCI probing, there are some validations for the Ethernet device
configuration.
From each PCI device the function creates one or two Ethernet devices.

When one of validations fails during the creation of the second device,
the first device is not freed what caused a memory leak.

Free it.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/mlx4/mlx4.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 7460afa859..495b4fc8bd 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -766,6 +766,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 	struct ibv_context *attr_ctx = NULL;
 	struct ibv_device_attr device_attr;
 	struct ibv_device_attr_ex device_attr_ex;
+	struct rte_eth_dev *prev_dev = NULL;
 	struct mlx4_conf conf = {
 		.ports.present = 0,
 		.mr_ext_memseg_en = 1,
@@ -880,7 +881,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				ERROR("can not attach rte ethdev");
 				rte_errno = ENOMEM;
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			priv = eth_dev->data->dev_private;
 			if (!priv->verbs_alloc_ctx.enabled) {
@@ -889,24 +890,24 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				      " from Verbs");
 				rte_errno = ENOTSUP;
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			eth_dev->device = &pci_dev->device;
 			eth_dev->dev_ops = &mlx4_dev_sec_ops;
 			err = mlx4_proc_priv_init(eth_dev);
 			if (err)
-				goto error;
+				goto err_secondary;
 			/* Receive command fd from primary process. */
 			err = mlx4_mp_req_verbs_cmd_fd(eth_dev);
 			if (err < 0) {
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			/* Remap UAR for Tx queues. */
 			err = mlx4_tx_uar_init_secondary(eth_dev, err);
 			if (err) {
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			/*
 			 * Ethdev pointer is still required as input since
@@ -918,7 +919,14 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 			claim_zero(mlx4_glue->close_device(ctx));
 			rte_eth_copy_pci_info(eth_dev, pci_dev);
 			rte_eth_dev_probing_finish(eth_dev);
+			prev_dev = eth_dev;
 			continue;
+err_secondary:
+			claim_zero(mlx4_glue->close_device(ctx));
+			rte_eth_dev_release_port(eth_dev);
+			if (prev_dev)
+				rte_eth_dev_release_port(prev_dev);
+			break;
 		}
 		/* Check port status. */
 		err = mlx4_glue->query_port(ctx, port, &port_attr);
@@ -1093,6 +1101,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				 priv, mem_event_cb);
 		rte_rwlock_write_unlock(&mlx4_shared_data->mem_event_rwlock);
 		rte_eth_dev_probing_finish(eth_dev);
+		prev_dev = eth_dev;
 		continue;
 port_error:
 		rte_free(priv);
@@ -1107,14 +1116,10 @@ port_error:
 			eth_dev->data->mac_addrs = NULL;
 			rte_eth_dev_release_port(eth_dev);
 		}
+		if (prev_dev)
+			mlx4_dev_close(prev_dev);
 		break;
 	}
-	/*
-	 * XXX if something went wrong in the loop above, there is a resource
-	 * leak (ctx, pd, priv, dpdk ethdev) but we can do nothing about it as
-	 * long as the dpdk does not provide a way to deallocate a ethdev and a
-	 * way to enumerate the registered ethdevs to free the previous ones.
-	 */
 error:
 	if (attr_ctx)
 		claim_zero(mlx4_glue->close_device(attr_ctx));
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.233932536 +0000
+++ 0228-net-mlx4-fix-handling-of-probing-failure.patch	2021-02-05 11:18:29.202698652 +0000
@@ -1 +1 @@
-From bcf58b64dafe1a298ee5de2ae018876d2e5c1362 Mon Sep 17 00:00:00 2001
+From 7d169ad52938deea81d75ae6b7f566276a19a2a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bcf58b64dafe1a298ee5de2ae018876d2e5c1362 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f520d32456..284dcb9dd0 100644
+index 7460afa859..495b4fc8bd 100644

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

* [dpdk-stable] patch 'net/bnxt: fix FW version log' 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
                   ` (226 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: fix handling of probing failure' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix packet type index calculation' " luca.boccassi
                   ` (46 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/e6f382e229a6c095382a2c20e43858cb7ddfd86d

Thanks.

Luca Boccassi

---
From e6f382e229a6c095382a2c20e43858cb7ddfd86d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 18 Jan 2021 09:42:11 +0530
Subject: [PATCH] net/bnxt: fix FW version log

[ upstream commit 51a7d362721e2fe60425d4c045306ac85f87cd2c ]

Driver is not logging the complete FW version along with HSI version.
Fix it to indicate complete FW version string.

Fixes: 9a891c1764ea ("net/bnxt: update HWRM to version 1.9.2")

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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 75d97d6721..344895843b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1096,10 +1096,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 	else
 		HWRM_CHECK_RESULT();
 
-	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d\n",
+	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
 		resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
 		resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
-		resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b);
+		resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b,
+		resp->hwrm_fw_rsvd_8b);
 	bp->fw_ver = (resp->hwrm_fw_maj_8b << 24) |
 		     (resp->hwrm_fw_min_8b << 16) |
 		     (resp->hwrm_fw_bld_8b << 8) |
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.272545295 +0000
+++ 0229-net-bnxt-fix-FW-version-log.patch	2021-02-05 11:18:29.206698727 +0000
@@ -1 +1 @@
-From 51a7d362721e2fe60425d4c045306ac85f87cd2c Mon Sep 17 00:00:00 2001
+From e6f382e229a6c095382a2c20e43858cb7ddfd86d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 51a7d362721e2fe60425d4c045306ac85f87cd2c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6d54b16568..4d8ca9e478 100644
+index 75d97d6721..344895843b 100644
@@ -23 +24 @@
-@@ -1102,10 +1102,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1096,10 +1096,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)

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

* [dpdk-stable] patch 'net/bnxt: fix packet type index calculation' 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
                   ` (227 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix FW version log' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: refactor init/uninit' " luca.boccassi
                   ` (45 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/436effd54ef1083c8b20d49e15fc12b90442f18e

Thanks.

Luca Boccassi

---
From 436effd54ef1083c8b20d49e15fc12b90442f18e Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Mon, 18 Jan 2021 16:57:09 -0500
Subject: [PATCH] net/bnxt: fix packet type index calculation

[ upstream commit 5b4279b50f7feca8b43a4f3360a7c42eeee8f17a ]

Fix mask to include all four bits of hardware packet type
field.

Fixes: 97b1db288dd0 ("net/bnxt: use table based packet type translation")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@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 46e3fed127..6d6041f267 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -344,7 +344,7 @@ bnxt_init_ptype_table(void)
 
 		ip6 = i & (RX_PKT_CMPL_FLAGS2_IP_TYPE >> 7);
 		tun = i & (RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC >> 2);
-		type = (i & 0x38) << 9;
+		type = (i & 0x78) << 9;
 
 		if (!tun && !ip6)
 			l3 = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.317102437 +0000
+++ 0230-net-bnxt-fix-packet-type-index-calculation.patch	2021-02-05 11:18:29.206698727 +0000
@@ -1 +1 @@
-From 5b4279b50f7feca8b43a4f3360a7c42eeee8f17a Mon Sep 17 00:00:00 2001
+From 436effd54ef1083c8b20d49e15fc12b90442f18e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b4279b50f7feca8b43a4f3360a7c42eeee8f17a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a195bf1187..969cae19fc 100644
+index 46e3fed127..6d6041f267 100644
@@ -22 +23 @@
-@@ -402,7 +402,7 @@ bnxt_init_ptype_table(void)
+@@ -344,7 +344,7 @@ bnxt_init_ptype_table(void)

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

* [dpdk-stable] patch 'net/bnxt: refactor init/uninit' 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
                   ` (228 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix packet type index calculation' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ice: drain out DCF AdminQ command queue' " luca.boccassi
                   ` (44 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/b3d3810bbb71f3891bfa83177d9f2ccfb01a8882

Thanks.

Luca Boccassi

---
From b3d3810bbb71f3891bfa83177d9f2ccfb01a8882 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 13 Jan 2021 18:19:14 -0800
Subject: [PATCH] net/bnxt: refactor init/uninit

[ upstream commit 3127f99274b679124658afdbfc49210730c50617 ]

Move all the individual driver fields allocation routines to one
routine - bnxt_drv_init(). This houses all such routines where
memory needs to be allocated once during the driver's lifetime
and does not need to be torn down during error recovery.

Rename some function names in accordance with their functionality.
bnxt_init_board() is doing nothing more than mapping the PCI bars,
so rename it as such.

Given that there is a bnxt_shutdown_nic that is called in dev_stop_op,
rename it's counterpart - bnxt_init_chip() that is called in
dev_start_op, to bnxt_start_nic. Also helps avoid confusion with some of
the other bnxt_init_xxx routines.
Rename bnxt_init_fw() to bnxt_get_config() as that is what that routine
is doing mostly functionality wise.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 150 +++++++++++++++++++--------------
 1 file changed, 88 insertions(+), 62 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9a6eb19bf2..a4a31f224f 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -689,7 +689,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
 	return rc;
 }
 
-static int bnxt_init_chip(struct bnxt *bp)
+static int bnxt_start_nic(struct bnxt *bp)
 {
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(bp->eth_dev);
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
@@ -1395,7 +1395,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 
 	bnxt_enable_int(bp);
 
-	rc = bnxt_init_chip(bp);
+	rc = bnxt_start_nic(bp);
 	if (rc)
 		goto error;
 
@@ -1441,26 +1441,9 @@ bnxt_uninit_locks(struct bnxt *bp)
 	}
 }
 
-static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
+static void bnxt_drv_uninit(struct bnxt *bp)
 {
-	struct bnxt *bp = eth_dev->data->dev_private;
-	int ret = 0;
-
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return 0;
-
-	/* cancel the recovery handler before remove dev */
-	rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp);
-	rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp);
-	bnxt_cancel_fc_thread(bp);
-
-	if (eth_dev->data->dev_started)
-		ret = bnxt_dev_stop_op(eth_dev);
-
 	bnxt_free_switch_domain(bp);
-
-	bnxt_uninit_resources(bp, false);
-
 	bnxt_free_leds_info(bp);
 	bnxt_free_cos_queues(bp);
 	bnxt_free_link_info(bp);
@@ -1477,6 +1460,27 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
 
 	rte_free(bp->grp_info);
 	bp->grp_info = NULL;
+}
+
+static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
+{
+	struct bnxt *bp = eth_dev->data->dev_private;
+	int ret = 0;
+
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
+	/* cancel the recovery handler before remove dev */
+	rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp);
+	rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp);
+	bnxt_cancel_fc_thread(bp);
+
+	if (eth_dev->data->dev_started)
+		ret = bnxt_dev_stop_op(eth_dev);
+
+	bnxt_uninit_resources(bp, false);
+
+	bnxt_drv_uninit(bp);
 
 	return ret;
 }
@@ -4045,7 +4049,7 @@ bool bnxt_stratus_device(struct bnxt *bp)
 	}
 }
 
-static int bnxt_init_board(struct rte_eth_dev *eth_dev)
+static int bnxt_map_pci_bars(struct rte_eth_dev *eth_dev)
 {
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	struct bnxt *bp = eth_dev->data->dev_private;
@@ -4670,7 +4674,11 @@ static int bnxt_map_hcomm_fw_status_reg(struct bnxt *bp)
 	return 0;
 }
 
-static int bnxt_init_fw(struct bnxt *bp)
+/* This function gets the FW version along with the
+ * capabilities(MAX and current) of the function, vnic,
+ * error recovery, phy and other chip related info
+ */
+static int bnxt_get_config(struct bnxt *bp)
 {
 	uint16_t mtu;
 	int rc = 0;
@@ -4755,7 +4763,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
 {
 	int rc = 0;
 
-	rc = bnxt_init_fw(bp);
+	rc = bnxt_get_config(bp);
 	if (rc)
 		return rc;
 
@@ -5202,38 +5210,14 @@ static int bnxt_alloc_switch_domain(struct bnxt *bp)
 	return rc;
 }
 
-static int
-bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+/* Allocate and initialize various fields in bnxt struct that
+ * need to be allocated/destroyed only once in the lifetime of the driver
+ */
+static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
 {
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
-	static int version_printed;
-	struct bnxt *bp;
-	int rc;
-
-	if (version_printed++ == 0)
-		PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
-
-	eth_dev->dev_ops = &bnxt_dev_ops;
-	eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
-	eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
-	eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
-	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
-	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
-
-	/*
-	 * For secondary processes, we don't initialise any further
-	 * as primary has already done this work.
-	 */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return 0;
-
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
-	bp = eth_dev->data->dev_private;
-
-	/* Parse dev arguments passed on when starting the DPDK application. */
-	bnxt_parse_dev_args(bp, pci_dev->device.devargs);
+	struct bnxt *bp = eth_dev->data->dev_private;
+	int rc = 0;
 
 	bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
 
@@ -5265,7 +5249,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 		}
 	}
 
-	rc = bnxt_init_board(eth_dev);
+	rc = bnxt_map_pci_bars(eth_dev);
 	if (rc) {
 		PMD_DRV_LOG(ERR,
 			    "Failed to initialize board rc: %x\n", rc);
@@ -5274,31 +5258,75 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 
 	rc = bnxt_alloc_pf_info(bp);
 	if (rc)
-		goto error_free;
+		return rc;
 
 	rc = bnxt_alloc_link_info(bp);
 	if (rc)
-		goto error_free;
+		return rc;
 
 	rc = bnxt_alloc_parent_info(bp);
 	if (rc)
-		goto error_free;
+		return rc;
 
 	rc = bnxt_alloc_hwrm_resources(bp);
 	if (rc) {
 		PMD_DRV_LOG(ERR,
 			    "Failed to allocate hwrm resource rc: %x\n", rc);
-		goto error_free;
+		return rc;
 	}
 	rc = bnxt_alloc_leds_info(bp);
 	if (rc)
-		goto error_free;
+		return rc;
 
 	rc = bnxt_alloc_cos_queues(bp);
 	if (rc)
-		goto error_free;
+		return rc;
 
 	rc = bnxt_init_locks(bp);
+	if (rc)
+		return rc;
+
+	rc = bnxt_alloc_switch_domain(bp);
+	if (rc)
+		return rc;
+
+	return rc;
+}
+
+static int
+bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+{
+	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
+	static int version_printed;
+	struct bnxt *bp;
+	int rc;
+
+	if (version_printed++ == 0)
+		PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
+
+	eth_dev->dev_ops = &bnxt_dev_ops;
+	eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
+	eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
+	eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
+	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
+	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
+
+	/*
+	 * For secondary processes, we don't initialise any further
+	 * as primary has already done this work.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
+	rte_eth_copy_pci_info(eth_dev, pci_dev);
+	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
+	bp = eth_dev->data->dev_private;
+
+	/* Parse dev arguments passed on when starting the DPDK application. */
+	bnxt_parse_dev_args(bp, pci_dev->device.devargs);
+
+	rc = bnxt_drv_init(eth_dev);
 	if (rc)
 		goto error_free;
 
@@ -5310,8 +5338,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 	if (rc)
 		goto error_free;
 
-	bnxt_alloc_switch_domain(bp);
-
 	PMD_DRV_LOG(INFO,
 		    DRV_MODULE_NAME "found at mem %" PRIX64 ", node addr %pM\n",
 		    pci_dev->mem_resource[0].phys_addr,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.358556506 +0000
+++ 0231-net-bnxt-refactor-init-uninit.patch	2021-02-05 11:18:29.210698804 +0000
@@ -1 +1 @@
-From 3127f99274b679124658afdbfc49210730c50617 Mon Sep 17 00:00:00 2001
+From b3d3810bbb71f3891bfa83177d9f2ccfb01a8882 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3127f99274b679124658afdbfc49210730c50617 ]
+
@@ -22,2 +23,0 @@
-Cc: stable@dpdk.org
-
@@ -27,2 +27,2 @@
- drivers/net/bnxt/bnxt_ethdev.c | 166 +++++++++++++++++++--------------
- 1 file changed, 96 insertions(+), 70 deletions(-)
+ drivers/net/bnxt/bnxt_ethdev.c | 150 +++++++++++++++++++--------------
+ 1 file changed, 88 insertions(+), 62 deletions(-)
@@ -31 +31 @@
-index e8a7a8ecd4..3ac3818305 100644
+index 9a6eb19bf2..a4a31f224f 100644
@@ -34 +34 @@
-@@ -679,7 +679,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
+@@ -689,7 +689,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
@@ -43 +43 @@
-@@ -1417,7 +1417,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -1395,7 +1395,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
@@ -52 +52 @@
-@@ -1464,34 +1464,9 @@ bnxt_uninit_locks(struct bnxt *bp)
+@@ -1441,26 +1441,9 @@ bnxt_uninit_locks(struct bnxt *bp)
@@ -65,8 +64,0 @@
--	pthread_mutex_lock(&bp->err_recovery_lock);
--	if (bp->flags & BNXT_FLAG_FW_RESET) {
--		PMD_DRV_LOG(ERR,
--			    "Adapter recovering from error...Please retry\n");
--		return -EAGAIN;
--	}
--	pthread_mutex_unlock(&bp->err_recovery_lock);
--
@@ -79 +71 @@
--		ret = bnxt_dev_stop(eth_dev);
+-		ret = bnxt_dev_stop_op(eth_dev);
@@ -88 +80 @@
-@@ -1508,6 +1483,35 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
+@@ -1477,6 +1460,27 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
@@ -102,8 +93,0 @@
-+	pthread_mutex_lock(&bp->err_recovery_lock);
-+	if (bp->flags & BNXT_FLAG_FW_RESET) {
-+		PMD_DRV_LOG(ERR,
-+			    "Adapter recovering from error...Please retry\n");
-+		return -EAGAIN;
-+	}
-+	pthread_mutex_unlock(&bp->err_recovery_lock);
-+
@@ -116 +100 @@
-+		ret = bnxt_dev_stop(eth_dev);
++		ret = bnxt_dev_stop_op(eth_dev);
@@ -124 +108 @@
-@@ -4086,7 +4090,7 @@ bool bnxt_stratus_device(struct bnxt *bp)
+@@ -4045,7 +4049,7 @@ bool bnxt_stratus_device(struct bnxt *bp)
@@ -133 +117 @@
-@@ -4723,7 +4727,11 @@ static int bnxt_map_hcomm_fw_status_reg(struct bnxt *bp)
+@@ -4670,7 +4674,11 @@ static int bnxt_map_hcomm_fw_status_reg(struct bnxt *bp)
@@ -146 +130 @@
-@@ -4819,7 +4827,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -4755,7 +4763,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
@@ -155 +139 @@
-@@ -5266,38 +5274,14 @@ static int bnxt_alloc_switch_domain(struct bnxt *bp)
+@@ -5202,38 +5210,14 @@ static int bnxt_alloc_switch_domain(struct bnxt *bp)
@@ -200 +184 @@
-@@ -5329,7 +5313,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+@@ -5265,7 +5249,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
@@ -209 +193 @@
-@@ -5338,31 +5322,75 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+@@ -5274,31 +5258,75 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
@@ -291 +275 @@
-@@ -5374,8 +5402,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+@@ -5310,8 +5338,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)

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

* [dpdk-stable] patch 'net/ice: drain out DCF AdminQ command queue' 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
                   ` (229 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: refactor init/uninit' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/testpmd: fix key for RSS flow rule' " luca.boccassi
                   ` (43 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Haiyue Wang; +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/9feafdeb167204d4599c8cf5eff436eb08a6765b

Thanks.

Luca Boccassi

---
From 9feafdeb167204d4599c8cf5eff436eb08a6765b Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Fri, 22 Jan 2021 01:31:37 +0800
Subject: [PATCH] net/ice: drain out DCF AdminQ command queue

[ upstream commit 5d4ca9b0a23585b1fb8d71d7af34fba26369cbea ]

The virtchnl message is handled one by one by checking opcode to match
the response for the request.

The DCF AdminQ command with buffer needs two virtchnl commands, one is
to handle the AdminQ descriptor, the other is to the handle AdminQ
buffer. If both of them are sent to PF successfully, it needs to wait
two responses from PF, even if the AdminQ descriptor command gets the
failure response. Since PF will handle them one by one, and send back
the response for each.

If not wait for the buffer message response until timeout to drain out
the virtchnl command queue, it will cause the next AdminQ command with
buffer to get the stall buffer response from previous.

Fixes: daa714d55c72 ("net/ice: handle AdminQ command by DCF")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 44dbd3bb84..294ddcd2e1 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -504,9 +504,7 @@ ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,
 	}
 
 	do {
-		if ((!desc_cmd.pending && !buff_cmd.pending) ||
-		    (!desc_cmd.pending && desc_cmd.v_ret != IAVF_SUCCESS) ||
-		    (!buff_cmd.pending && buff_cmd.v_ret != IAVF_SUCCESS))
+		if (!desc_cmd.pending && !buff_cmd.pending)
 			break;
 
 		rte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.404363273 +0000
+++ 0232-net-ice-drain-out-DCF-AdminQ-command-queue.patch	2021-02-05 11:18:29.210698804 +0000
@@ -1 +1 @@
-From 5d4ca9b0a23585b1fb8d71d7af34fba26369cbea Mon Sep 17 00:00:00 2001
+From 9feafdeb167204d4599c8cf5eff436eb08a6765b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d4ca9b0a23585b1fb8d71d7af34fba26369cbea ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index dbe42fa3df..d72a6f357e 100644
+index 44dbd3bb84..294ddcd2e1 100644
@@ -33 +34 @@
-@@ -505,9 +505,7 @@ ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,
+@@ -504,9 +504,7 @@ ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,

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

* [dpdk-stable] patch 'app/testpmd: fix key for RSS flow 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
                   ` (230 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ice: drain out DCF AdminQ command queue' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' " luca.boccassi
                   ` (42 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jun W Zhou, 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/ff62c0e737d56475dc648ef33c8fc5202cba51d0

Thanks.

Luca Boccassi

---
From ff62c0e737d56475dc648ef33c8fc5202cba51d0 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 21 Jan 2021 17:41:54 +0800
Subject: [PATCH] app/testpmd: fix key for RSS flow rule

[ upstream commit b57927702a58685e46d87960aba25a7b1fa0279e ]

Since the patch '1848b117' has initialized the variable 'key' in
'struct rte_flow_action_rss' with 'NULL', the PMD cannot get the
RSS key now. Details as bellow:

testpmd> flow create 0 ingress pattern eth / ipv4 / end actions
         rss types ipv4-other end key
         1234567890123456789012345678901234567890FFFFFFFFFFFF123
         4567890123456789012345678901234567890FFFFFFFFFFFF
         queues end / end
Flow rule #1 created
testpmd> show port 0 rss-hash key
RSS functions:
         all ipv4-other ip
RSS key:
         4439796BB54C5023B675EA5B124F9F30B8A2C03DDFDC4D02A08C9B3
         34AF64A4C05C6FA343958D8557D99583AE138C92E81150366

This patch sets offset and size of the 'key' variable as the first
parameter of the token 'key'. Later, the address of the RSS key will
be copied to 'key' variable.

Fixes: 1848b117cca1 ("app/testpmd: fix RSS key for flow API RSS rule")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline_flow.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 585cab98b4..de80924e7c 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3403,7 +3403,10 @@ static const struct token token_list[] = {
 		.name = "key",
 		.help = "RSS hash key",
 		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
-		.args = ARGS(ARGS_ENTRY_ARB(0, 0),
+		.args = ARGS(ARGS_ENTRY_ARB
+			     (offsetof(struct action_rss_data, conf) +
+			      offsetof(struct rte_flow_action_rss, key),
+			      sizeof(((struct rte_flow_action_rss *)0)->key)),
 			     ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.444322238 +0000
+++ 0233-app-testpmd-fix-key-for-RSS-flow-rule.patch	2021-02-05 11:18:29.218698956 +0000
@@ -1 +1 @@
-From b57927702a58685e46d87960aba25a7b1fa0279e Mon Sep 17 00:00:00 2001
+From ff62c0e737d56475dc648ef33c8fc5202cba51d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b57927702a58685e46d87960aba25a7b1fa0279e ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 0618611ab1..067e120743 100644
+index 585cab98b4..de80924e7c 100644
@@ -41 +42 @@
-@@ -3541,7 +3541,10 @@ static const struct token token_list[] = {
+@@ -3403,7 +3403,10 @@ static const struct token token_list[] = {

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

* [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' 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
                   ` (231 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'app/testpmd: fix key for RSS flow rule' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/octeontx2: fix PF flow action for Tx' " luca.boccassi
                   ` (41 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Lance Richardson; +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/1dd7ec97d80475ce5e3ce8dcb5e12e28711d7a3d

Thanks.

Luca Boccassi

---
From 1dd7ec97d80475ce5e3ce8dcb5e12e28711d7a3d Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 22 Jan 2021 16:49:00 -0500
Subject: [PATCH] net/bnxt: fix null termination of Rx mbuf chain

[ upstream commit c711cc2a982d8849ab7ba2582b41c5a4ba5510ee ]

The last mbuf in a multi-segment packet needs to be
NULL-terminated.

Fixes: 0958d8b6435d ("net/bnxt: support LRO")

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

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 6d6041f267..57cfc9444c 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -267,6 +267,7 @@ static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,
 		 */
 		rte_bitmap_set(rxr->ag_bitmap, ag_cons);
 	}
+	last->next = NULL;
 	bnxt_prod_ag_mbuf(rxq);
 	return 0;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.494830014 +0000
+++ 0234-net-bnxt-fix-null-termination-of-Rx-mbuf-chain.patch	2021-02-05 11:18:29.218698956 +0000
@@ -1 +1 @@
-From c711cc2a982d8849ab7ba2582b41c5a4ba5510ee Mon Sep 17 00:00:00 2001
+From 1dd7ec97d80475ce5e3ce8dcb5e12e28711d7a3d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c711cc2a982d8849ab7ba2582b41c5a4ba5510ee ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 969cae19fc..c34a8905e7 100644
+index 6d6041f267..57cfc9444c 100644
@@ -23 +24 @@
-@@ -325,6 +325,7 @@ static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,
+@@ -267,6 +267,7 @@ static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,

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

* [dpdk-stable] patch 'net/octeontx2: fix PF flow action for 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
                   ` (232 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix mark action in active tunnel offload' " luca.boccassi
                   ` (40 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Liron Himi; +Cc: Kiran Kumar K, 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/56aaa9bff17f21ac51eac7402a9426be5982eaac

Thanks.

Luca Boccassi

---
From 56aaa9bff17f21ac51eac7402a9426be5982eaac Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Mon, 18 Jan 2021 12:50:31 +0200
Subject: [PATCH] net/octeontx2: fix PF flow action for Tx

[ upstream commit 701f94a60afbc7c3e28766cc88afa1b5397fdfba ]

pf-func is 16bit but the current reserved location
used in tx action is 8bits. Moved it to bits 63-48.

Fixes: 32e6aaa97c40 ("net/octeontx2: support flow parse actions")

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/net/octeontx2/otx2_flow_parse.c | 5 ++++-
 drivers/net/octeontx2/otx2_flow_utils.c | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 476195d634..e9b940f6c0 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -1090,7 +1090,10 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 
 set_pf_func:
 	/* Ideally AF must ensure that correct pf_func is set */
-	flow->npc_action |= (uint64_t)pf_func << 4;
+	if (attr->egress)
+		flow->npc_action |= (uint64_t)pf_func << 48;
+	else
+		flow->npc_action |= (uint64_t)pf_func << 4;
 
 	return 0;
 
diff --git a/drivers/net/octeontx2/otx2_flow_utils.c b/drivers/net/octeontx2/otx2_flow_utils.c
index 9a0a5f9fb4..7ed86ba742 100644
--- a/drivers/net/octeontx2/otx2_flow_utils.c
+++ b/drivers/net/octeontx2/otx2_flow_utils.c
@@ -944,7 +944,7 @@ otx2_flow_mcam_alloc_and_write(struct rte_flow *flow, struct otx2_mbox *mbox,
 		req->entry_data.kw[0] |= flow_info->channel;
 		req->entry_data.kw_mask[0] |=  (BIT_ULL(12) - 1);
 	} else {
-		uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
+		uint16_t pf_func = (flow->npc_action >> 48) & 0xffff;
 
 		pf_func = htons(pf_func);
 		req->entry_data.kw[0] |= ((uint64_t)pf_func << 32);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.532833850 +0000
+++ 0235-net-octeontx2-fix-PF-flow-action-for-Tx.patch	2021-02-05 11:18:29.218698956 +0000
@@ -1 +1 @@
-From 701f94a60afbc7c3e28766cc88afa1b5397fdfba Mon Sep 17 00:00:00 2001
+From 56aaa9bff17f21ac51eac7402a9426be5982eaac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 701f94a60afbc7c3e28766cc88afa1b5397fdfba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix mark action in active tunnel 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
                   ` (233 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/octeontx2: fix PF flow action for Tx' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix drop action in tunnel offload mode' " luca.boccassi
                   ` (39 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/973e9a91283b2b55e2a09d8a585d7d97d275a085

Thanks.

Luca Boccassi

---
From 973e9a91283b2b55e2a09d8a585d7d97d275a085 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Wed, 20 Jan 2021 21:17:09 +0200
Subject: [PATCH] net/mlx5: fix mark action in active tunnel offload

[ upstream commit 31cb857d092395026ee9274cca47ed3e0eb908fd ]

Tunnel offload mode allows application to restore partially offloaded
tunneled packets to its original state.
MLX5 PMD stores internal data required to restore partially offloaded
packet in packet mark section. Therefore MLX5 PMD will not allow
applications to use mark action if tunnel offload mode was activated.
The restriction is applied both to regular and tunnel offload rules.

The patch rejects application rules with mark action while tunnel
offload is active.

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 ae836c6a52..afd80afa38 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2375,6 +2375,11 @@ flow_dv_validate_action_mark(struct rte_eth_dev *dev,
 	const struct rte_flow_action_mark *mark = action->conf;
 	int ret;
 
+	if (is_tunnel_offload_active(dev))
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "no mark action "
+					  "if tunnel offload active");
 	/* Fall back if no extended metadata register support. */
 	if (config->dv_xmeta_en == MLX5_XMETA_MODE_LEGACY)
 		return mlx5_flow_validate_action_mark(action, action_flags,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.575938615 +0000
+++ 0236-net-mlx5-fix-mark-action-in-active-tunnel-offload.patch	2021-02-05 11:18:29.230699185 +0000
@@ -1 +1 @@
-From 31cb857d092395026ee9274cca47ed3e0eb908fd Mon Sep 17 00:00:00 2001
+From 973e9a91283b2b55e2a09d8a585d7d97d275a085 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31cb857d092395026ee9274cca47ed3e0eb908fd ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f32d6c12df..faafc92bc8 100644
+index ae836c6a52..afd80afa38 100644
@@ -29 +30 @@
-@@ -2445,6 +2445,11 @@ flow_dv_validate_action_mark(struct rte_eth_dev *dev,
+@@ -2375,6 +2375,11 @@ flow_dv_validate_action_mark(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix drop action in tunnel offload mode' 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
                   ` (234 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix mark action in active tunnel offload' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow tag decompression' " luca.boccassi
                   ` (38 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/86c8dc0a650e7b155eaa4c7835c5e701c0c0c57c

Thanks.

Luca Boccassi

---
From 86c8dc0a650e7b155eaa4c7835c5e701c0c0c57c Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Wed, 20 Jan 2021 21:17:10 +0200
Subject: [PATCH] net/mlx5: fix drop action in tunnel offload mode

[ upstream commit 49be011d3c87fd1b5d5d791744e9d969dff26bc1 ]

Tunnel offload mode allows application to restore partially offloaded
tunneled packets to its original state.
The mode was designed to optimize packet recovery. It must not
block flow actions that are allowed by MLX5 PMD.

The patch allows tunnel offload match rules to use drop flow action.

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index afd80afa38..0841279f14 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6110,8 +6110,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	 * Validate the drop action mutual exclusion with other actions.
 	 * Drop action is mutually-exclusive with any other action, except for
 	 * Count action.
+	 * Drop action compatibility with tunnel offload was already validated.
 	 */
-	if ((action_flags & MLX5_FLOW_ACTION_DROP) &&
+	if (action_flags & (MLX5_FLOW_ACTION_TUNNEL_MATCH |
+			    MLX5_FLOW_ACTION_TUNNEL_MATCH));
+	else if ((action_flags & MLX5_FLOW_ACTION_DROP) &&
 	    (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_COUNT)))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.623323295 +0000
+++ 0237-net-mlx5-fix-drop-action-in-tunnel-offload-mode.patch	2021-02-05 11:18:29.238699337 +0000
@@ -1 +1 @@
-From 49be011d3c87fd1b5d5d791744e9d969dff26bc1 Mon Sep 17 00:00:00 2001
+From 86c8dc0a650e7b155eaa4c7835c5e701c0c0c57c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 49be011d3c87fd1b5d5d791744e9d969dff26bc1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index faafc92bc8..9ffd6ec1a8 100644
+index afd80afa38..0841279f14 100644
@@ -26 +27 @@
-@@ -6228,8 +6228,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6110,8 +6110,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 flow tag decompression' 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
                   ` (235 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix drop action in tunnel offload mode' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' " luca.boccassi
                   ` (37 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/094f59d02aa07cd555084025f0cebc113443f645

Thanks.

Luca Boccassi

---
From 094f59d02aa07cd555084025f0cebc113443f645 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Thu, 14 Jan 2021 21:32:19 +0000
Subject: [PATCH] net/mlx5: fix flow tag decompression

[ upstream commit bd0940a5c4df6a79595adac39959ab8b578ec3a9 ]

Packets can get a wrong Flow Tag on x86 architecture with the Flow Tag
compression format (rxq_cqe_comp_en=2) enabled inside the SSE Rx burst.
The shuffle mask that extracts a Flow Tag from the pair of compressed
CQEs is reversed. This leads to the wrong Flow Tag assignment.
Correct the shuffle mask to get proper bytes for a Flow Tag from
miniCQEs.

Fixes: 54c2d46b160f ("net/mlx5: support flow tag and packet header miniCQEs")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index d4df9816aa..0b3f240e10 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -197,8 +197,8 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 				const __m128i flow_mark_adj =
 					_mm_set_epi32(-1, -1, -1, -1);
 				const __m128i flow_mark_shuf =
-					_mm_set_epi8(-1,  1,  0,  4,
-						     -1,  9,  8, 12,
+					_mm_set_epi8(-1,  9,  8, 12,
+						     -1,  1,  0,  4,
 						     -1, -1, -1, -1,
 						     -1, -1, -1, -1);
 				const __m128i ft_mask =
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.678341077 +0000
+++ 0238-net-mlx5-fix-flow-tag-decompression.patch	2021-02-05 11:18:29.238699337 +0000
@@ -1 +1 @@
-From bd0940a5c4df6a79595adac39959ab8b578ec3a9 Mon Sep 17 00:00:00 2001
+From 094f59d02aa07cd555084025f0cebc113443f645 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd0940a5c4df6a79595adac39959ab8b578ec3a9 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' 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
                   ` (236 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow tag decompression' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'doc: update flow mark action in mlx5 guide' " luca.boccassi
                   ` (36 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Shiri Kuzin; +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/045b01fde474efc3ccc8bd6818ac4889fa60dc53

Thanks.

Luca Boccassi

---
From 045b01fde474efc3ccc8bd6818ac4889fa60dc53 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@nvidia.com>
Date: Tue, 19 Jan 2021 19:07:00 +0200
Subject: [PATCH] net/mlx5: refuse empty VLAN in flow pattern

[ upstream commit b6aaaa22aeb66cda787d0e0280742da3d735def3 ]

In verbs, an empty VLAN is equivalent to a packet without VLAN layer,
hence, the VLAN item should not be empty and this case is rejected.

However, the case for ether type of VLAN without following VLAN item
was not validated, allowing the creation of a flow with empty
VLAN item.

To fix this issue a validation was added requiring ether type of VLAN
will be followed with VLAN item.

Fixes: 0b1edd21cd78 ("net/mlx5: refuse empty VLAN flow specification")

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_verbs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 59291fbd09..bd060e9d44 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1247,6 +1247,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 	uint64_t last_item = 0;
 	uint8_t next_protocol = 0xff;
 	uint16_t ether_type = 0;
+	bool is_empty_vlan = false;
 
 	if (items == NULL)
 		return -1;
@@ -1274,6 +1275,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 				ether_type &=
 					((const struct rte_flow_item_eth *)
 					 items->mask)->type;
+				if (ether_type == RTE_BE16(RTE_ETHER_TYPE_VLAN))
+					is_empty_vlan = true;
 				ether_type = rte_be_to_cpu_16(ether_type);
 			} else {
 				ether_type = 0;
@@ -1299,6 +1302,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 			} else {
 				ether_type = 0;
 			}
+			is_empty_vlan = false;
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV4:
 			ret = mlx5_flow_validate_item_ipv4
@@ -1410,6 +1414,10 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 		}
 		item_flags |= last_item;
 	}
+	if (is_empty_vlan)
+		return rte_flow_error_set(error, ENOTSUP,
+						 RTE_FLOW_ERROR_TYPE_ITEM, NULL,
+		    "VLAN matching without vid specification is not supported");
 	for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
 		switch (actions->type) {
 		case RTE_FLOW_ACTION_TYPE_VOID:
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.718462322 +0000
+++ 0239-net-mlx5-refuse-empty-VLAN-in-flow-pattern.patch	2021-02-05 11:18:29.238699337 +0000
@@ -1 +1 @@
-From b6aaaa22aeb66cda787d0e0280742da3d735def3 Mon Sep 17 00:00:00 2001
+From 045b01fde474efc3ccc8bd6818ac4889fa60dc53 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6aaaa22aeb66cda787d0e0280742da3d735def3 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 205b05783c..b442b9b91c 100644
+index 59291fbd09..bd060e9d44 100644
@@ -29 +30 @@
-@@ -1256,6 +1256,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1247,6 +1247,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
@@ -37 +38 @@
-@@ -1283,6 +1284,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1274,6 +1275,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
@@ -46 +47 @@
-@@ -1308,6 +1311,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1299,6 +1302,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
@@ -54 +55 @@
-@@ -1419,6 +1423,10 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1410,6 +1414,10 @@ flow_verbs_validate(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'doc: update flow mark action in mlx5 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
                   ` (237 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix multi-process port ID' " luca.boccassi
                   ` (35 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +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/af2b80f83d23919f8529ab8c749dbada588253a3

Thanks.

Luca Boccassi

---
From af2b80f83d23919f8529ab8c749dbada588253a3 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 11 Dec 2020 12:05:40 +0000
Subject: [PATCH] doc: update flow mark action in mlx5 guide

[ upstream commit 3ceeed9f7855368cc755f440a938f199c9654253 ]

There some limitations added for the MARK action value range.

Fixes: 2d241515ebaf ("net/mlx5: add devarg for extensive metadata support")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 6950cc1188..b7e285b8f5 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -807,7 +807,7 @@ Driver options
   +------+-----------+-----------+-------------+-------------+
   | 1    | 24 bits   | vary 0-32 | 32 bits     | yes         |
   +------+-----------+-----------+-------------+-------------+
-  | 2    | vary 0-32 | 32 bits   | 32 bits     | yes         |
+  | 2    | vary 0-24 | 32 bits   | 32 bits     | yes         |
   +------+-----------+-----------+-------------+-------------+
 
   If there is no E-Switch configuration the ``dv_xmeta_en`` parameter is
@@ -819,6 +819,15 @@ Driver options
   of the extensive metadata features. The legacy Verbs supports FLAG and
   MARK metadata actions over NIC Rx steering domain only.
 
+  The setting MARK or META value to zero means there is no item provided and
+  receiving datapath will not report in mbufs these items are present.
+
+  For the MARK action the last 16 values in the full range are reserved for
+  internal PMD purposes (to emulate FLAG action). The valid range for the
+  MARK action values is 0-0xFFEF for the 16-bit mode and 0-xFFFFEF
+  for the 24-bit mode, the flows with the MARK action value outside
+  the specified range will be rejected.
+
 - ``dv_flow_en`` parameter [int]
 
   A nonzero value enables the DV flow steering assuming it is supported
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.759157328 +0000
+++ 0240-doc-update-flow-mark-action-in-mlx5-guide.patch	2021-02-05 11:18:29.242699412 +0000
@@ -1 +1 @@
-From 3ceeed9f7855368cc755f440a938f199c9654253 Mon Sep 17 00:00:00 2001
+From af2b80f83d23919f8529ab8c749dbada588253a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ceeed9f7855368cc755f440a938f199c9654253 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 17659521a9..13fd1d8a61 100644
+index 6950cc1188..b7e285b8f5 100644
@@ -20 +21 @@
-@@ -840,7 +840,7 @@ Driver options
+@@ -807,7 +807,7 @@ Driver options
@@ -29 +30 @@
-@@ -852,6 +852,15 @@ Driver options
+@@ -819,6 +819,15 @@ Driver options

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

* [dpdk-stable] patch 'net/mlx5: fix multi-process port ID' 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
                   ` (238 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'doc: update flow mark action in mlx5 guide' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " luca.boccassi
                   ` (34 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Suanming Mou; +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/b2d4868e791b586e19507cfc9eea23de0f7fe037

Thanks.

Luca Boccassi

---
From b2d4868e791b586e19507cfc9eea23de0f7fe037 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Sun, 24 Jan 2021 19:02:03 +0800
Subject: [PATCH] net/mlx5: fix multi-process port ID

[ upstream commit 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 ]

The device port_id is used for inter-process communication and must
be the same both for primary and secondary process

This IPC port_id was configured with the invalid temporary value in
port spawn routine. This temporary value was used by the function
rte_eth_dev_get_port_by_name() to check whether the port exists.

This commit corrects the mp port_id with rte_eth_dev port_id.

Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 01bbc14ea5..a055a8dd1c 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -924,8 +924,6 @@ err_secondary:
 	priv->dev_port = spawn->phys_port;
 	priv->pci_dev = spawn->pci_dev;
 	priv->mtu = RTE_ETHER_MTU;
-	priv->mp_id.port_id = port_id;
-	strlcpy(priv->mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN);
 	/* Some internal functions rely on Netlink sockets, open them now. */
 	priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA);
 	priv->nl_socket_route =	mlx5_nl_init(NETLINK_ROUTE);
@@ -1341,6 +1339,8 @@ err_secondary:
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
 		eth_dev->data->representor_id = priv->representor_id;
 	}
+	priv->mp_id.port_id = eth_dev->data->port_id;
+	strlcpy(priv->mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN);
 	/*
 	 * Store associated network device interface index. This index
 	 * is permanent throughout the lifetime of device. So, we may store
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.799001446 +0000
+++ 0241-net-mlx5-fix-multi-process-port-ID.patch	2021-02-05 11:18:29.242699412 +0000
@@ -1 +1 @@
-From 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 Mon Sep 17 00:00:00 2001
+From b2d4868e791b586e19507cfc9eea23de0f7fe037 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7efa7c6cd2..a8cc5f3116 100644
+index 01bbc14ea5..a055a8dd1c 100644
@@ -28 +29 @@
-@@ -930,8 +930,6 @@ err_secondary:
+@@ -924,8 +924,6 @@ err_secondary:
@@ -37 +38 @@
-@@ -1347,6 +1345,8 @@ err_secondary:
+@@ -1341,6 +1339,8 @@ err_secondary:

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

* [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' 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
                   ` (239 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix multi-process port ID' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' " luca.boccassi
                   ` (33 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Suanming Mou; +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/293737e4ec90c500576deb6abc807e353733d129

Thanks.

Luca Boccassi

---
From 293737e4ec90c500576deb6abc807e353733d129 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Sun, 24 Jan 2021 19:02:04 +0800
Subject: [PATCH] net/mlx5: fix crash on secondary process port close

[ upstream commit 84a22cbcc467a02772dd24156773940331994c84 ]

When secondary process starts, in rte_eth_dev_attach_secondary()
function, the secondary process port device data in struct rte_eth_dev
will be initialized to be shared with primary process port.

When failsafe sub-port hot-plug happens, both primary and secondary
process will release the sub-port, and primary process will clear the
sub-port device data in fs_dev_remove() deactivate stage first before
request secondary process to release the sub-port. In this case, the
secondary process will not be able to get the priv memory pointer from
the shared device data memory anymore, since the device data memory
has been cleared.

Since what secondary process needs in port detach is the UAR table size
to unmap the UAR addresses. It used Tx queue number as size of UAR table
in priv. In fact the uar_table_sz in struct mlx5_proc_priv means the
size of UAR register table - the number of UAR records. However, the
code set this field incorrectly to the size of mlx5_proc_priv structure.

This commit fixes UAR table size to match with relevant Tx queue number,
uses the UAR table size directly to avoid the secondary process to
access the priv pointer in the shared device data memory when unmapping
the UAR address.

Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.c     |  6 +++---
 drivers/net/mlx5/mlx5_txq.c | 21 +++++++++++++--------
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 53ccd1656d..a211fbc6b1 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1247,13 +1247,13 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
 	 */
 	ppriv_size =
 		sizeof(struct mlx5_proc_priv) + priv->txqs_n * sizeof(void *);
-	ppriv = mlx5_malloc(MLX5_MEM_RTE, ppriv_size, RTE_CACHE_LINE_SIZE,
-			    dev->device->numa_node);
+	ppriv = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO, ppriv_size,
+			    RTE_CACHE_LINE_SIZE, dev->device->numa_node);
 	if (!ppriv) {
 		rte_errno = ENOMEM;
 		return -rte_errno;
 	}
-	ppriv->uar_table_sz = ppriv_size;
+	ppriv->uar_table_sz = priv->txqs_n;
 	dev->process_private = ppriv;
 	return 0;
 }
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index b81bb4a12d..c53af10d58 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -634,18 +634,23 @@ txq_uar_uninit_secondary(struct mlx5_txq_ctrl *txq_ctrl)
 void
 mlx5_tx_uar_uninit_secondary(struct rte_eth_dev *dev)
 {
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_txq_data *txq;
-	struct mlx5_txq_ctrl *txq_ctrl;
+	struct mlx5_proc_priv *ppriv = (struct mlx5_proc_priv *)
+					dev->process_private;
+	const size_t page_size = rte_mem_page_size();
+	void *addr;
 	unsigned int i;
 
+	if (page_size == (size_t)-1) {
+		DRV_LOG(ERR, "Failed to get mem page size");
+		return;
+	}
 	MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
-	for (i = 0; i != priv->txqs_n; ++i) {
-		if (!(*priv->txqs)[i])
+	for (i = 0; i != ppriv->uar_table_sz; ++i) {
+		if (!ppriv->uar_table[i])
 			continue;
-		txq = (*priv->txqs)[i];
-		txq_ctrl = container_of(txq, struct mlx5_txq_ctrl, txq);
-		txq_uar_uninit_secondary(txq_ctrl);
+		addr = ppriv->uar_table[i];
+		rte_mem_unmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
+
 	}
 }
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.841468115 +0000
+++ 0242-net-mlx5-fix-crash-on-secondary-process-port-close.patch	2021-02-05 11:18:29.246699489 +0000
@@ -1 +1 @@
-From 84a22cbcc467a02772dd24156773940331994c84 Mon Sep 17 00:00:00 2001
+From 293737e4ec90c500576deb6abc807e353733d129 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84a22cbcc467a02772dd24156773940331994c84 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 50a6d2b19f..93629e5b05 100644
+index 53ccd1656d..a211fbc6b1 100644
@@ -43 +44 @@
-@@ -1251,13 +1251,13 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
+@@ -1247,13 +1247,13 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
@@ -61 +62 @@
-index 5142e50858..15624428aa 100644
+index b81bb4a12d..c53af10d58 100644

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

* [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' 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
                   ` (240 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: " luca.boccassi
                   ` (32 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Suanming Mou; +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/432de5aec260e36d04e920dd98cdb80b0b78150a

Thanks.

Luca Boccassi

---
From 432de5aec260e36d04e920dd98cdb80b0b78150a Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Sun, 24 Jan 2021 19:02:05 +0800
Subject: [PATCH] net/mlx5: fix port attach in secondary process

[ upstream commit 2b36c30b8cd87585502dec0d2b89e76193f13fc3 ]

Currently, the secondary process port UAR register mapping used by Tx
queue is done during port initializing.

Unluckily, in port hot-plug case, the secondary process was requested
to initialize the port when primary process did not complete the
device configuration and the port Tx queue number is not configured
yet. Hence, the secondary process gets the zero Tx queue number during
probing, causing the UAR registers not be mapped in the correct
fashion.

This commit checks the configured number of Tx queues in secondary
process when the port start is requested. In case the Tx queue
number mismatch found the UAR mapping is reinitialized accordingly.

Fixes: 2aac5b5d119f ("net/mlx5: sync stop/start with secondary process")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_mp_os.c | 19 +++++++++++++++++++
 drivers/net/mlx5/mlx5.c             |  2 +-
 drivers/net/mlx5/mlx5.h             |  6 +++++-
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c
index 08ade75799..95372e2084 100644
--- a/drivers/net/mlx5/linux/mlx5_mp_os.c
+++ b/drivers/net/mlx5/linux/mlx5_mp_os.c
@@ -115,6 +115,7 @@ struct rte_mp_msg mp_res;
 	const struct mlx5_mp_param *param =
 		(const struct mlx5_mp_param *)mp_msg->param;
 	struct rte_eth_dev *dev;
+	struct mlx5_proc_priv *ppriv;
 	struct mlx5_priv *priv;
 	int ret;
 
@@ -132,6 +133,20 @@ struct rte_mp_msg mp_res;
 		rte_mb();
 		dev->rx_pkt_burst = mlx5_select_rx_function(dev);
 		dev->tx_pkt_burst = mlx5_select_tx_function(dev);
+		ppriv = (struct mlx5_proc_priv *)dev->process_private;
+		/* If Tx queue number changes, re-initialize UAR. */
+		if (ppriv->uar_table_sz != priv->txqs_n) {
+			mlx5_tx_uar_uninit_secondary(dev);
+			mlx5_proc_priv_uninit(dev);
+			ret = mlx5_proc_priv_init(dev);
+			if (ret)
+				return -rte_errno;
+			ret = mlx5_tx_uar_init_secondary(dev, mp_msg->fds[0]);
+			if (ret) {
+				mlx5_proc_priv_uninit(dev);
+				return -rte_errno;
+			}
+		}
 		mp_init_msg(&priv->mp_id, &mp_res, param->type);
 		res->result = 0;
 		ret = rte_mp_reply(&mp_res, peer);
@@ -183,6 +198,10 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx5_mp_req_type type)
 		return;
 	}
 	mp_init_msg(&priv->mp_id, &mp_req, type);
+	if (type == MLX5_MP_REQ_START_RXTX) {
+		mp_req.num_fds = 1;
+		mp_req.fds[0] = ((struct ibv_context *)priv->sh->ctx)->cmd_fd;
+	}
 	ret = rte_mp_request_sync(&mp_req, &mp_rep, &ts);
 	if (ret) {
 		if (rte_errno != ENOTSUP)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index a211fbc6b1..bdb446d2d2 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1264,7 +1264,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
  * @param dev
  *   Pointer to Ethernet device structure.
  */
-static void
+void
 mlx5_proc_priv_uninit(struct rte_eth_dev *dev)
 {
 	if (!dev->process_private)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 4902960052..9bf1bf3146 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -749,7 +749,10 @@ struct mlx5_dev_ctx_shared {
 	struct mlx5_dev_shared_port port[]; /* per device port data array. */
 };
 
-/* Per-process private structure. */
+/*
+ * Per-process private structure.
+ * Caution, secondary process may rebuild the struct during port start.
+ */
 struct mlx5_proc_priv {
 	size_t uar_table_sz;
 	/* Size of UAR register table. */
@@ -1004,6 +1007,7 @@ struct rte_hairpin_peer_info {
 
 int mlx5_getenv_int(const char *);
 int mlx5_proc_priv_init(struct rte_eth_dev *dev);
+void mlx5_proc_priv_uninit(struct rte_eth_dev *dev);
 int mlx5_udp_tunnel_port_add(struct rte_eth_dev *dev,
 			      struct rte_eth_udp_tunnel *udp_tunnel);
 uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.884783992 +0000
+++ 0243-net-mlx5-fix-port-attach-in-secondary-process.patch	2021-02-05 11:18:29.250699565 +0000
@@ -1 +1 @@
-From 2b36c30b8cd87585502dec0d2b89e76193f13fc3 Mon Sep 17 00:00:00 2001
+From 432de5aec260e36d04e920dd98cdb80b0b78150a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b36c30b8cd87585502dec0d2b89e76193f13fc3 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 60fdee22a1..8011ca87d7 100644
+index 08ade75799..95372e2084 100644
@@ -76 +77 @@
-index 93629e5b05..aae2ef9af7 100644
+index a211fbc6b1..bdb446d2d2 100644
@@ -79 +80 @@
-@@ -1268,7 +1268,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
+@@ -1264,7 +1264,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
@@ -89 +90 @@
-index 4bbf628885..5196a9ea76 100644
+index 4902960052..9bf1bf3146 100644
@@ -92 +93 @@
-@@ -743,7 +743,10 @@ struct mlx5_dev_ctx_shared {
+@@ -749,7 +749,10 @@ struct mlx5_dev_ctx_shared {
@@ -104 +105 @@
-@@ -998,6 +1001,7 @@ struct rte_hairpin_peer_info {
+@@ -1004,6 +1007,7 @@ struct rte_hairpin_peer_info {

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

* [dpdk-stable] patch 'net/mlx4: fix port attach in secondary process' 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
                   ` (241 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/iavf: fix symmetric flow rule creation' " luca.boccassi
                   ` (31 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Suanming Mou; +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/bc0c3f60819b589e136cd5ce7078553d7d839144

Thanks.

Luca Boccassi

---
From bc0c3f60819b589e136cd5ce7078553d7d839144 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Sun, 24 Jan 2021 19:02:06 +0800
Subject: [PATCH] net/mlx4: fix port attach in secondary process

[ upstream commit ed879add1ba7529d69c69a35d3260114f871750a ]

Currently, the secondary process port UAR register mapping used by Tx
queue is done during port initializing.

Unluckily, in port hot-plug case, the secondary process will be
requested to initialize the port when primary process probe the port.
At that time, the port Tx queue number is still not configured, the
secondary process get Tx queue number as 0. This causes the UAR register
not be mapped as secondary process get Tx queue number 0.

This commit adds the check of Tx queue number in secondary process when
port starts is requested. Once the Tx queue number is not matching, do
UAR mapping with the latest Tx queue number.

Fixes: 0203d33a1059 ("net/mlx4: support secondary process")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4.c      | 10 +++++-----
 drivers/net/mlx4/mlx4.h      |  4 ++++
 drivers/net/mlx4/mlx4_mp.c   | 24 ++++++++++++++++++++++++
 drivers/net/mlx4/mlx4_rxtx.h |  1 +
 drivers/net/mlx4/mlx4_txq.c  | 28 ++++++++++++++++++++++++++++
 5 files changed, 62 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 495b4fc8bd..919a9347f9 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -195,7 +195,7 @@ mlx4_free_verbs_buf(void *ptr, void *data __rte_unused)
  * @return
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
-static int
+int
 mlx4_proc_priv_init(struct rte_eth_dev *dev)
 {
 	struct mlx4_proc_priv *ppriv;
@@ -207,13 +207,13 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
 	 */
 	ppriv_size = sizeof(struct mlx4_proc_priv) +
 		     dev->data->nb_tx_queues * sizeof(void *);
-	ppriv = rte_malloc_socket("mlx4_proc_priv", ppriv_size,
-				  RTE_CACHE_LINE_SIZE, dev->device->numa_node);
+	ppriv = rte_zmalloc_socket("mlx4_proc_priv", ppriv_size,
+				   RTE_CACHE_LINE_SIZE, dev->device->numa_node);
 	if (!ppriv) {
 		rte_errno = ENOMEM;
 		return -rte_errno;
 	}
-	ppriv->uar_table_sz = ppriv_size;
+	ppriv->uar_table_sz = dev->data->nb_tx_queues;
 	dev->process_private = ppriv;
 	return 0;
 }
@@ -224,7 +224,7 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
  * @param dev
  *   Pointer to Ethernet device structure.
  */
-static void
+void
 mlx4_proc_priv_uninit(struct rte_eth_dev *dev)
 {
 	if (!dev->process_private)
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index c6cb29493e..87710d3996 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -197,6 +197,10 @@ struct mlx4_priv {
 #define PORT_ID(priv) ((priv)->dev_data->port_id)
 #define ETH_DEV(priv) (&rte_eth_devices[PORT_ID(priv)])
 
+int mlx4_proc_priv_init(struct rte_eth_dev *dev);
+void mlx4_proc_priv_uninit(struct rte_eth_dev *dev);
+
+
 /* mlx4_ethdev.c */
 
 int mlx4_get_ifname(const struct mlx4_priv *priv, char (*ifname)[IF_NAMESIZE]);
diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c
index eca0c20a8a..3622d61075 100644
--- a/drivers/net/mlx4/mlx4_mp.c
+++ b/drivers/net/mlx4/mlx4_mp.c
@@ -111,6 +111,9 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 	const struct mlx4_mp_param *param =
 		(const struct mlx4_mp_param *)mp_msg->param;
 	struct rte_eth_dev *dev;
+#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
+	struct mlx4_proc_priv *ppriv;
+#endif
 	int ret;
 
 	MLX4_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
@@ -126,6 +129,21 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 		rte_mb();
 		dev->tx_pkt_burst = mlx4_tx_burst;
 		dev->rx_pkt_burst = mlx4_rx_burst;
+#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
+		ppriv = (struct mlx4_proc_priv *)dev->process_private;
+		if (ppriv->uar_table_sz != dev->data->nb_tx_queues) {
+			mlx4_tx_uar_uninit_secondary(dev);
+			mlx4_proc_priv_uninit(dev);
+			ret = mlx4_proc_priv_init(dev);
+			if (ret)
+				return -rte_errno;
+			ret = mlx4_tx_uar_init_secondary(dev, mp_msg->fds[0]);
+			if (ret) {
+				mlx4_proc_priv_uninit(dev);
+				return -rte_errno;
+			}
+		}
+#endif
 		mp_init_msg(dev, &mp_res, param->type);
 		res->result = 0;
 		ret = rte_mp_reply(&mp_res, peer);
@@ -163,6 +181,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
 	struct rte_mp_reply mp_rep;
 	struct mlx4_mp_param *res __rte_unused;
 	struct timespec ts = {.tv_sec = MLX4_MP_REQ_TIMEOUT_SEC, .tv_nsec = 0};
+	struct mlx4_priv *priv;
 	int ret;
 	int i;
 
@@ -175,6 +194,11 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
 		return;
 	}
 	mp_init_msg(dev, &mp_req, type);
+	if (type == MLX4_MP_REQ_START_RXTX) {
+		priv = dev->data->dev_private;
+		mp_req.num_fds = 1;
+		mp_req.fds[0] = priv->ctx->cmd_fd;
+	}
 	ret = rte_mp_request_sync(&mp_req, &mp_rep, &ts);
 	if (ret) {
 		if (rte_errno != ENOTSUP)
diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h
index 9de6c59411..136ca56ca4 100644
--- a/drivers/net/mlx4/mlx4_rxtx.h
+++ b/drivers/net/mlx4/mlx4_rxtx.h
@@ -157,6 +157,7 @@ uint16_t mlx4_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts,
 /* mlx4_txq.c */
 
 int mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd);
+void mlx4_tx_uar_uninit_secondary(struct rte_eth_dev *dev);
 uint64_t mlx4_get_tx_port_offloads(struct mlx4_priv *priv);
 int mlx4_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
 			uint16_t desc, unsigned int socket,
diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index 37b84413fb..60560d9545 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -157,6 +157,27 @@ error:
 	} while (i--);
 	return -rte_errno;
 }
+
+void
+mlx4_tx_uar_uninit_secondary(struct rte_eth_dev *dev)
+{
+	struct mlx4_proc_priv *ppriv =
+			(struct mlx4_proc_priv *)dev->process_private;
+	const size_t page_size = sysconf(_SC_PAGESIZE);
+	void *addr;
+	size_t i;
+
+	if (page_size == (size_t)-1) {
+		ERROR("Failed to get mem page size");
+		return;
+	}
+	for (i = 0; i < ppriv->uar_table_sz; i++) {
+		addr = ppriv->uar_table[i];
+		if (addr)
+			munmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
+	}
+}
+
 #else
 int
 mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev __rte_unused,
@@ -167,6 +188,13 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev __rte_unused,
 	rte_errno = ENOTSUP;
 	return -rte_errno;
 }
+
+void
+mlx4_tx_uar_uninit_secondary(struct rte_eth_dev *dev __rte_unused)
+{
+	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
+	ERROR("UAR remap is not supported");
+}
 #endif
 
 /**
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.931402942 +0000
+++ 0244-net-mlx4-fix-port-attach-in-secondary-process.patch	2021-02-05 11:18:29.250699565 +0000
@@ -1 +1 @@
-From ed879add1ba7529d69c69a35d3260114f871750a Mon Sep 17 00:00:00 2001
+From bc0c3f60819b589e136cd5ce7078553d7d839144 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed879add1ba7529d69c69a35d3260114f871750a ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 284dcb9dd0..041c1934f5 100644
+index 495b4fc8bd..919a9347f9 100644
@@ -72 +73 @@
-index 63df8fcf2b..e07b1d2386 100644
+index c6cb29493e..87710d3996 100644
@@ -87 +88 @@
-index e05da89c0e..ddf7bdb9ef 100644
+index eca0c20a8a..3622d61075 100644
@@ -143 +144 @@
-index 7c72ce6d17..c838afc242 100644
+index 9de6c59411..136ca56ca4 100644
@@ -155 +156 @@
-index 8262071505..31ab308050 100644
+index 37b84413fb..60560d9545 100644

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

* [dpdk-stable] patch 'net/iavf: fix symmetric flow rule creation' 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
                   ` (242 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' " luca.boccassi
                   ` (30 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Xuan Ding; +Cc: Beilei Xing, 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/5edd02ac74a4103c429da1daccf7309fda11481e

Thanks.

Luca Boccassi

---
From 5edd02ac74a4103c429da1daccf7309fda11481e Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Fri, 22 Jan 2021 03:19:22 +0000
Subject: [PATCH] net/iavf: fix symmetric flow rule creation

[ upstream commit 3e7ff9d5d80386b9f588f401c91b044ea08a68c5 ]

Only allow to create symmetric rule for L3/L4.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 27cafdf2b4..72b0117230 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -869,6 +869,13 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
 		if (rss_type & (ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY |
 		    ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY))
 			return true;
+
+		if (!(rss_type &
+		   (ETH_RSS_IPV4 | ETH_RSS_IPV6 |
+		    ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV6_UDP |
+		    ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_NONFRAG_IPV6_TCP |
+		    ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_NONFRAG_IPV6_SCTP)))
+			return true;
 	}
 
 	/* check invalid combination */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.973617016 +0000
+++ 0245-net-iavf-fix-symmetric-flow-rule-creation.patch	2021-02-05 11:18:29.254699641 +0000
@@ -1 +1 @@
-From 3e7ff9d5d80386b9f588f401c91b044ea08a68c5 Mon Sep 17 00:00:00 2001
+From 5edd02ac74a4103c429da1daccf7309fda11481e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e7ff9d5d80386b9f588f401c91b044ea08a68c5 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f437fc3170..d8d22f8009 100644
+index 27cafdf2b4..72b0117230 100644
@@ -21 +22 @@
-@@ -927,6 +927,13 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
+@@ -869,6 +869,13 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,

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

* [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' 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
                   ` (243 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/iavf: fix symmetric flow rule creation' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' " luca.boccassi
                   ` (29 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Dapeng Yu; +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/3c7c83869ddb3d9d2d8df8de194dad339ed7eeaf

Thanks.

Luca Boccassi

---
From 3c7c83869ddb3d9d2d8df8de194dad339ed7eeaf Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Tue, 26 Jan 2021 11:03:08 +0800
Subject: [PATCH] net/ixgbe: disable NFS filtering

[ upstream commit 68643843e79d2df54e8a6c148a29fd314a5e7897 ]

Disable NFS header filtering whether NFS packets coalescing are
required or not, in order to make RSS can work on NFS packets.

The code without the patch does follow datasheet, but not consistent
with the ixgbe kernel driver. It causes NFS packets to be filtered
and make them flow into queue 0, before RSS can work on them.

Fixes: b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
Fixes: 8eecb3295aed ("ixgbe: add LRO support")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 7bb8460359..f1fc307ffd 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -4898,15 +4898,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads & DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS |
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS;
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.014628787 +0000
+++ 0246-net-ixgbe-disable-NFS-filtering.patch	2021-02-05 11:18:29.258699718 +0000
@@ -1 +1 @@
-From 68643843e79d2df54e8a6c148a29fd314a5e7897 Mon Sep 17 00:00:00 2001
+From 3c7c83869ddb3d9d2d8df8de194dad339ed7eeaf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68643843e79d2df54e8a6c148a29fd314a5e7897 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 36e6ca9010..72d27f35ca 100644
+index 7bb8460359..f1fc307ffd 100644
@@ -27 +28 @@
-@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
+@@ -4898,15 +4898,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' 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
                   ` (244 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'ethdev: fix close failure handling' " luca.boccassi
                   ` (28 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Viacheslav Galaktionov; +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/10b11c2704f960de87b13e85cea75c0db0e630ed

Thanks.

Luca Boccassi

---
From 10b11c2704f960de87b13e85cea75c0db0e630ed Mon Sep 17 00:00:00 2001
From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Date: Wed, 20 Jan 2021 15:44:18 +0300
Subject: [PATCH] net/sfc: fix generic byte statistics to exclude FCS bytes

[ upstream commit 8a6930361bcfb0374cb84e95d75ab7c01231c96e ]

Generic byte statistics should not include Ethernet FCS bytes.

Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_ethdev.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index f2f5336435..a002e2c037 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -640,10 +640,19 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			mac_stats[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES];
 		stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
 		stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
+
+		/* CRC is included in these stats, but shouldn't be */
+		stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN;
+		stats->obytes -= stats->opackets * RTE_ETHER_CRC_LEN;
 	} else {
 		stats->opackets = mac_stats[EFX_MAC_TX_PKTS];
 		stats->ibytes = mac_stats[EFX_MAC_RX_OCTETS];
 		stats->obytes = mac_stats[EFX_MAC_TX_OCTETS];
+
+		/* CRC is included in these stats, but shouldn't be */
+		stats->ibytes -= mac_stats[EFX_MAC_RX_PKTS] * RTE_ETHER_CRC_LEN;
+		stats->obytes -= mac_stats[EFX_MAC_TX_PKTS] * RTE_ETHER_CRC_LEN;
+
 		/*
 		 * Take into account stats which are whenever supported
 		 * on EF10. If some stat is not supported by current
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.058729597 +0000
+++ 0247-net-sfc-fix-generic-byte-statistics-to-exclude-FCS-b.patch	2021-02-05 11:18:29.258699718 +0000
@@ -1 +1 @@
-From 8a6930361bcfb0374cb84e95d75ab7c01231c96e Mon Sep 17 00:00:00 2001
+From 10b11c2704f960de87b13e85cea75c0db0e630ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a6930361bcfb0374cb84e95d75ab7c01231c96e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index d6f6a84eab..479b4f4df6 100644
+index f2f5336435..a002e2c037 100644

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

* [dpdk-stable] patch 'ethdev: fix close failure 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
                   ` (245 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/virtio: fix getting old status on reconnect' " luca.boccassi
                   ` (27 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Anatoly Burakov, 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/732bdcc188b44d1d0f3b110728b5610ce05fb2e9

Thanks.

Luca Boccassi

---
From 732bdcc188b44d1d0f3b110728b5610ce05fb2e9 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 22 Jan 2021 18:58:04 +0100
Subject: [PATCH] ethdev: fix close failure handling

[ upstream commit a6f34f91008ec200e492459bc79b62c04a88e918 ]

If a failure happens when closing a port,
it was unnecessarily failing again in the function eth_err(),
because of a check against HW removal cause.
Indeed there is a big chance the port is released at this point.
Given the port is in the middle (or at the end) of a close process,
checking the error cause by accessing the port is a non-sense.
The error check is replaced by a simple return in the close function.

Bugzilla ID: 624
Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")

Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 8c584e4c83..ecd46ac01f 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1820,7 +1820,7 @@ rte_eth_dev_close(uint16_t port_id)
 	rte_ethdev_trace_close(port_id);
 	*lasterr = rte_eth_dev_release_port(dev);
 
-	return eth_err(port_id, firsterr);
+	return firsterr;
 }
 
 int
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.106234248 +0000
+++ 0248-ethdev-fix-close-failure-handling.patch	2021-02-05 11:18:29.262699793 +0000
@@ -1 +1 @@
-From a6f34f91008ec200e492459bc79b62c04a88e918 Mon Sep 17 00:00:00 2001
+From 732bdcc188b44d1d0f3b110728b5610ce05fb2e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a6f34f91008ec200e492459bc79b62c04a88e918 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index f40df65e34..6f514c388b 100644
+index 8c584e4c83..ecd46ac01f 100644

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

* [dpdk-stable] patch 'net/virtio: fix getting old status on reconnect' 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
                   ` (246 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'ethdev: fix close failure handling' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'vdpa/mlx5: fix configuration mutex cleanup' " luca.boccassi
                   ` (26 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 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/ae38535b10e71956a4185bcde0234a600aa516e7

Thanks.

Luca Boccassi

---
From ae38535b10e71956a4185bcde0234a600aa516e7 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 26 Jan 2021 11:15:58 +0100
Subject: [PATCH] net/virtio: fix getting old status on reconnect

[ upstream commit 721dbeb329fe3a26ec95e93f1877ec3f7184eaae ]

This patch fixes getting reset status from the restarted
vhost-user backend in case of reconnection, instead of the
status at the time of the disconnection.

This issue was not spotted earlier because Vhost-user
protocol status feature was disabled in server mode.

Fixes: 47235f16505f ("net/virtio-user: set status on socket reconnect")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 40345193e6..78998427cc 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -77,7 +77,7 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)
 		return -1;
 
 	dev->vhostfd = connectfd;
-	old_status = vtpci_get_status(hw);
+	old_status = dev->status;
 
 	vtpci_reset(hw);
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.157191168 +0000
+++ 0249-net-virtio-fix-getting-old-status-on-reconnect.patch	2021-02-05 11:18:29.262699793 +0000
@@ -1 +1 @@
-From 721dbeb329fe3a26ec95e93f1877ec3f7184eaae Mon Sep 17 00:00:00 2001
+From ae38535b10e71956a4185bcde0234a600aa516e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 721dbeb329fe3a26ec95e93f1877ec3f7184eaae ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 308275b70e..2b8fdd0c10 100644
+index 40345193e6..78998427cc 100644

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

* [dpdk-stable] patch 'vdpa/mlx5: fix configuration mutex cleanup' 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
                   ` (247 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/virtio: fix getting old status on reconnect' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: allow separate L3 and L4 checksum offload' " luca.boccassi
                   ` (25 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Xueming Li, 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/9bf462abbe3a3e688c8d97bc836d21f6ad4b7f70

Thanks.

Luca Boccassi

---
From 9bf462abbe3a3e688c8d97bc836d21f6ad4b7f70 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Wed, 6 Jan 2021 06:43:29 +0000
Subject: [PATCH] vdpa/mlx5: fix configuration mutex cleanup

[ upstream commit f00e5a15af5a0c5df1a7390364b6454d34586335 ]

When the vDPA device is closed, the driver polling thread is canceled.
The polling thread locks the configuration mutex while it polls the CQs.

When the cancellation happens, it may terminate the thread inside the
critical section what remains the configuration mutex locked.

After device close, the driver may be configured again, in this case,
for example, when the first queue state is updated, the driver tries to
lock the mutex again and deadlock appears.

Initialize the mutex after the polling thread cancellation.

Fixes: 99abbd62c272 ("vdpa/mlx5: fix queue update synchronization")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index b64f364eb7..0b2f1ab68e 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -295,6 +295,8 @@ mlx5_vdpa_dev_close(int vid)
 	}
 	priv->configured = 0;
 	priv->vid = 0;
+	/* The mutex may stay locked after event thread cancel - initiate it. */
+	pthread_mutex_init(&priv->vq_config_lock, NULL);
 	DRV_LOG(INFO, "vDPA device %d was closed.", vid);
 	return ret;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.197745984 +0000
+++ 0250-vdpa-mlx5-fix-configuration-mutex-cleanup.patch	2021-02-05 11:18:29.262699793 +0000
@@ -1 +1 @@
-From f00e5a15af5a0c5df1a7390364b6454d34586335 Mon Sep 17 00:00:00 2001
+From 9bf462abbe3a3e688c8d97bc836d21f6ad4b7f70 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f00e5a15af5a0c5df1a7390364b6454d34586335 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 0f22a863a3..4c2d886bd7 100644
+index b64f364eb7..0b2f1ab68e 100644

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

* [dpdk-stable] patch 'net/ionic: allow separate L3 and L4 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
                   ` (248 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'vdpa/mlx5: fix configuration mutex cleanup' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: fix up function attribute tags' " luca.boccassi
                   ` (24 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Andrew Boyer; +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/66ac5aec1f976dc5041b50b0b7a06cbd024ec5a9

Thanks.

Luca Boccassi

---
From 66ac5aec1f976dc5041b50b0b7a06cbd024ec5a9 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <aboyer@pensando.io>
Date: Mon, 18 Jan 2021 12:35:05 -0800
Subject: [PATCH] net/ionic: allow separate L3 and L4 checksum offload

[ upstream commit f603eebc43840fc70a3abdbb5089c2564ce61ec8 ]

DTS, at least, expects to be able to specify L4 checksum offload
without L3 csum offload. Split up the flag checks.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_rxtx.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 26893795a1..0b7c273939 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -448,17 +448,21 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,
 	uint8_t flags = 0;
 
 	if ((ol_flags & PKT_TX_IP_CKSUM) &&
-			(offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)) {
+	    (offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)) {
 		opcode = IONIC_TXQ_DESC_OPCODE_CSUM_HW;
 		flags |= IONIC_TXQ_DESC_FLAG_CSUM_L3;
-		if (((ol_flags & PKT_TX_TCP_CKSUM) &&
-				(offloads & DEV_TX_OFFLOAD_TCP_CKSUM)) ||
-				((ol_flags & PKT_TX_UDP_CKSUM) &&
-				(offloads & DEV_TX_OFFLOAD_UDP_CKSUM)))
-			flags |= IONIC_TXQ_DESC_FLAG_CSUM_L4;
-	} else {
+	}
+
+	if (((ol_flags & PKT_TX_TCP_CKSUM) &&
+	     (offloads & DEV_TX_OFFLOAD_TCP_CKSUM)) ||
+	    ((ol_flags & PKT_TX_UDP_CKSUM) &&
+	     (offloads & DEV_TX_OFFLOAD_UDP_CKSUM))) {
+		opcode = IONIC_TXQ_DESC_OPCODE_CSUM_HW;
+		flags |= IONIC_TXQ_DESC_FLAG_CSUM_L4;
+	}
+
+	if (opcode == IONIC_TXQ_DESC_OPCODE_CSUM_NONE)
 		stats->no_csum++;
-	}
 
 	has_vlan = (ol_flags & PKT_TX_VLAN_PKT);
 	encap = ((ol_flags & PKT_TX_OUTER_IP_CKSUM) ||
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.236312157 +0000
+++ 0251-net-ionic-allow-separate-L3-and-L4-checksum-offload.patch	2021-02-05 11:18:29.266699870 +0000
@@ -1 +1 @@
-From f603eebc43840fc70a3abdbb5089c2564ce61ec8 Mon Sep 17 00:00:00 2001
+From 66ac5aec1f976dc5041b50b0b7a06cbd024ec5a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f603eebc43840fc70a3abdbb5089c2564ce61ec8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 61ad396469..73e728436b 100644
+index 26893795a1..0b7c273939 100644
@@ -21 +22 @@
-@@ -460,17 +460,21 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,
+@@ -448,17 +448,21 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,

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

* [dpdk-stable] patch 'net/ionic: fix up function attribute tags' 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
                   ` (249 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: allow separate L3 and L4 checksum offload' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: fix address handling in Tx' " luca.boccassi
                   ` (23 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Andrew Boyer; +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/f6b2e530dda185946d2df37972e5a22228b6650c

Thanks.

Luca Boccassi

---
From f6b2e530dda185946d2df37972e5a22228b6650c Mon Sep 17 00:00:00 2001
From: Andrew Boyer <aboyer@pensando.io>
Date: Mon, 18 Jan 2021 12:35:07 -0800
Subject: [PATCH] net/ionic: fix up function attribute tags

[ upstream commit 0de3e209af12b2f3c5f656203c58703b8ebc14e3 ]

One function marked cold is in the hot path.
Make sure to always inline hot path functions.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_rxtx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 0b7c273939..7804b30ff9 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -67,7 +67,7 @@ ionic_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
 	qinfo->conf.tx_deferred_start = txq->deferred_start;
 }
 
-static inline void __rte_cold
+static __rte_always_inline void
 ionic_tx_flush(struct ionic_cq *cq)
 {
 	struct ionic_queue *q = cq->bound_q;
@@ -429,7 +429,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
 	return 0;
 }
 
-static int
+static __rte_always_inline int
 ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,
 		uint64_t offloads, bool not_xmit_more)
 {
@@ -713,7 +713,7 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 	return 0;
 }
 
-static void
+static __rte_always_inline void
 ionic_rx_clean(struct ionic_queue *q,
 		uint32_t q_desc_index, uint32_t cq_desc_index,
 		void *cb_arg, void *service_cb_arg)
@@ -874,7 +874,7 @@ ionic_rx_recycle(struct ionic_queue *q, uint32_t q_desc_index,
 	ionic_q_post(q, true, ionic_rx_clean, mbuf);
 }
 
-static int __rte_cold
+static __rte_always_inline int
 ionic_rx_fill(struct ionic_qcq *rxq, uint32_t len)
 {
 	struct ionic_queue *q = &rxq->q;
@@ -982,7 +982,7 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
 	return 0;
 }
 
-static inline void __rte_cold
+static __rte_always_inline void
 ionic_rxq_service(struct ionic_cq *cq, uint32_t work_to_do,
 		void *service_cb_arg)
 {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.274747957 +0000
+++ 0252-net-ionic-fix-up-function-attribute-tags.patch	2021-02-05 11:18:29.266699870 +0000
@@ -1 +1 @@
-From 0de3e209af12b2f3c5f656203c58703b8ebc14e3 Mon Sep 17 00:00:00 2001
+From f6b2e530dda185946d2df37972e5a22228b6650c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0de3e209af12b2f3c5f656203c58703b8ebc14e3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2a47a282ad..23e7d8aef7 100644
+index 0b7c273939..7804b30ff9 100644
@@ -22 +23 @@
- 	qinfo->conf.tx_deferred_start = txq->flags & IONIC_QCQ_F_DEFERRED;
+ 	qinfo->conf.tx_deferred_start = txq->deferred_start;
@@ -30 +31 @@
-@@ -448,7 +448,7 @@ ionic_tx_tso(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -429,7 +429,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
@@ -36,2 +37,2 @@
- ionic_tx(struct ionic_qcq *txq, struct rte_mbuf *txm,
- 		bool not_xmit_more)
+ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,
+ 		uint64_t offloads, bool not_xmit_more)
@@ -39 +40 @@
-@@ -736,7 +736,7 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
+@@ -713,7 +713,7 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
@@ -48 +49 @@
-@@ -897,7 +897,7 @@ ionic_rx_recycle(struct ionic_queue *q, uint32_t q_desc_index,
+@@ -874,7 +874,7 @@ ionic_rx_recycle(struct ionic_queue *q, uint32_t q_desc_index,
@@ -57 +58 @@
-@@ -1013,7 +1013,7 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
+@@ -982,7 +982,7 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)

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

* [dpdk-stable] patch 'net/ionic: fix address handling in 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
                   ` (250 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: fix up function attribute tags' " luca.boccassi
@ 2021-02-05 11:18 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: fix stack corruption' " luca.boccassi
                   ` (22 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:18 UTC (permalink / raw)
  To: Andrew Boyer; +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/3cac3c84be76c19744b58650ec76cfb025a870c2

Thanks.

Luca Boccassi

---
From 3cac3c84be76c19744b58650ec76cfb025a870c2 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <aboyer@pensando.io>
Date: Mon, 18 Jan 2021 12:35:08 -0800
Subject: [PATCH] net/ionic: fix address handling in Tx

[ upstream commit 7c3a867ba2e51766e632b409822a4aac051d93bd ]

Don't assume standard headroom.
Use helper variables to improve readability.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_rxtx.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 7804b30ff9..9466099352 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -315,7 +315,8 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
 	struct ionic_txq_desc *desc;
 	struct ionic_txq_sg_elem *elem;
 	struct rte_mbuf *txm_seg;
-	uint64_t desc_addr = 0;
+	rte_iova_t data_iova;
+	uint64_t desc_addr = 0, next_addr;
 	uint16_t desc_len = 0;
 	uint8_t desc_nsge;
 	uint32_t hdrlen;
@@ -352,6 +353,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
 
 	seglen = hdrlen + mss;
 	left = txm->data_len;
+	data_iova = rte_mbuf_data_iova(txm);
 
 	desc = ionic_tx_tso_next(q, &elem);
 	start = true;
@@ -361,7 +363,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
 	while (left > 0) {
 		len = RTE_MIN(seglen, left);
 		frag_left = seglen - len;
-		desc_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(txm));
+		desc_addr = rte_cpu_to_le_64(data_iova + offset);
 		desc_len = len;
 		desc_nsge = 0;
 		left -= len;
@@ -385,24 +387,23 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
 	txm_seg = txm->next;
 	while (txm_seg != NULL) {
 		offset = 0;
+		data_iova = rte_mbuf_data_iova(txm_seg);
 		left = txm_seg->data_len;
 		stats->frags++;
 
 		while (left > 0) {
-			rte_iova_t data_iova;
-			data_iova = rte_mbuf_data_iova(txm_seg);
-			elem->addr = rte_cpu_to_le_64(data_iova) + offset;
+			next_addr = rte_cpu_to_le_64(data_iova + offset);
 			if (frag_left > 0) {
 				len = RTE_MIN(frag_left, left);
 				frag_left -= len;
+				elem->addr = next_addr;
 				elem->len = len;
 				elem++;
 				desc_nsge++;
 			} else {
 				len = RTE_MIN(mss, left);
 				frag_left = mss - len;
-				data_iova = rte_mbuf_data_iova(txm_seg);
-				desc_addr = rte_cpu_to_le_64(data_iova);
+				desc_addr = next_addr;
 				desc_len = len;
 				desc_nsge = 0;
 			}
@@ -410,6 +411,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
 			offset += len;
 			if (txm_seg->next != NULL && frag_left > 0)
 				continue;
+
 			done = (txm_seg->next == NULL && left == 0);
 			ionic_tx_tso_post(q, desc, txm_seg,
 				desc_addr, desc_nsge, desc_len,
@@ -443,7 +445,7 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,
 	bool encap;
 	bool has_vlan;
 	uint64_t ol_flags = txm->ol_flags;
-	uint64_t addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(txm));
+	uint64_t addr;
 	uint8_t opcode = IONIC_TXQ_DESC_OPCODE_CSUM_NONE;
 	uint8_t flags = 0;
 
@@ -473,6 +475,8 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,
 	flags |= has_vlan ? IONIC_TXQ_DESC_FLAG_VLAN : 0;
 	flags |= encap ? IONIC_TXQ_DESC_FLAG_ENCAP : 0;
 
+	addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm));
+
 	desc->cmd = encode_txq_desc_cmd(opcode, flags, txm->nb_segs - 1, addr);
 	desc->len = txm->data_len;
 	desc->vlan_tci = txm->vlan_tci;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.319980750 +0000
+++ 0253-net-ionic-fix-address-handling-in-Tx.patch	2021-02-05 11:18:29.266699870 +0000
@@ -1 +1 @@
-From 7c3a867ba2e51766e632b409822a4aac051d93bd Mon Sep 17 00:00:00 2001
+From 3cac3c84be76c19744b58650ec76cfb025a870c2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c3a867ba2e51766e632b409822a4aac051d93bd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 23e7d8aef7..2a706b812c 100644
+index 7804b30ff9..9466099352 100644
@@ -20 +21 @@
-@@ -334,7 +334,8 @@ ionic_tx_tso(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -315,7 +315,8 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
@@ -30 +31 @@
-@@ -371,6 +372,7 @@ ionic_tx_tso(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -352,6 +353,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
@@ -38 +39 @@
-@@ -380,7 +382,7 @@ ionic_tx_tso(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -361,7 +363,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
@@ -47 +48 @@
-@@ -404,24 +406,23 @@ ionic_tx_tso(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -385,24 +387,23 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
@@ -76 +77 @@
-@@ -429,6 +430,7 @@ ionic_tx_tso(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -410,6 +411,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm,
@@ -84 +85 @@
-@@ -463,7 +465,7 @@ ionic_tx(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -443,7 +445,7 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,
@@ -93 +94 @@
-@@ -493,6 +495,8 @@ ionic_tx(struct ionic_qcq *txq, struct rte_mbuf *txm,
+@@ -473,6 +475,8 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm,

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

* [dpdk-stable] patch 'net/mvpp2: fix stack corruption' 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
                   ` (251 preceding siblings ...)
  2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: fix address handling in Tx' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' " luca.boccassi
                   ` (21 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Yuri Chipchev; +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/9057ace8361570b013991427674ee7e6f47e66d4

Thanks.

Luca Boccassi

---
From 9057ace8361570b013991427674ee7e6f47e66d4 Mon Sep 17 00:00:00 2001
From: Yuri Chipchev <yuric@marvell.com>
Date: Wed, 27 Jan 2021 18:09:15 +0200
Subject: [PATCH] net/mvpp2: fix stack corruption

[ upstream commit 8ce3c5db531eaf339ed60fb0ef97eab05c77846b ]

Fixes stack corruption in mrvl_fill_bpool function
in case num > MRVL_PP2_RXD_MAX

Fixes: c3637258d894 ("net/mrvl: fix Rx descriptors number")

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index f25cf9e46d..93fb30cdb8 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1614,8 +1614,8 @@ mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 static int
 mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
 {
-	struct buff_release_entry entries[MRVL_PP2_RXD_MAX];
-	struct rte_mbuf *mbufs[MRVL_PP2_RXD_MAX];
+	struct buff_release_entry entries[num];
+	struct rte_mbuf *mbufs[num];
 	int i, ret;
 	unsigned int core_id;
 	struct pp2_hif *hif;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.360216153 +0000
+++ 0254-net-mvpp2-fix-stack-corruption.patch	2021-02-05 11:18:29.270699946 +0000
@@ -1 +1 @@
-From 8ce3c5db531eaf339ed60fb0ef97eab05c77846b Mon Sep 17 00:00:00 2001
+From 9057ace8361570b013991427674ee7e6f47e66d4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8ce3c5db531eaf339ed60fb0ef97eab05c77846b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 1d67f2abf1..2f5b2f256b 100644
+index f25cf9e46d..93fb30cdb8 100644

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

* [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' 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
                   ` (252 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: fix stack corruption' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove VLAN flush' " luca.boccassi
                   ` (20 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Liron Himi; +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/1ddc1ca0def33078081f34f0e08a219504ec7702

Thanks.

Luca Boccassi

---
From 1ddc1ca0def33078081f34f0e08a219504ec7702 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:16 +0200
Subject: [PATCH] net/mvpp2: remove debug log on fast-path

[ upstream commit fa876f3ae29885321c752468c22ad1c06a7a498c ]

In case of non-ip frame the current code reached the 'default'
case which result with function call to log a msg.
Those kind of calls should not be performed on fast-path.

The performance for this kind of frames increased by 50%

Fixes: acab7d58c81b ("net/mvpp2: convert to dynamic logging")

Signed-off-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 93fb30cdb8..bfe496ff74 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -2171,7 +2171,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
 		*l4_offset = *l3_offset + MRVL_ARP_LENGTH;
 		break;
 	default:
-		MRVL_LOG(DEBUG, "Failed to recognise l3 packet type");
 		break;
 	}
 
@@ -2183,7 +2182,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
 		packet_type |= RTE_PTYPE_L4_UDP;
 		break;
 	default:
-		MRVL_LOG(DEBUG, "Failed to recognise l4 packet type");
 		break;
 	}
 
@@ -2253,10 +2251,9 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 	ret = pp2_ppio_recv(q->priv->ppio, q->priv->rxq_map[q->queue_id].tc,
 			    q->priv->rxq_map[q->queue_id].inq, descs, &nb_pkts);
-	if (unlikely(ret < 0)) {
-		MRVL_LOG(ERR, "Failed to receive packets");
+	if (unlikely(ret < 0))
 		return 0;
-	}
+
 	mrvl_port_bpool_size[bpool->pp2_id][bpool->id][core_id] -= nb_pkts;
 
 	for (i = 0; i < nb_pkts; i++) {
@@ -2319,21 +2316,13 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 		if (unlikely(num <= q->priv->bpool_min_size ||
 			     (!rx_done && num < q->priv->bpool_init_size))) {
-			ret = mrvl_fill_bpool(q, MRVL_BURST_SIZE);
-			if (ret)
-				MRVL_LOG(ERR, "Failed to fill bpool");
+			mrvl_fill_bpool(q, MRVL_BURST_SIZE);
 		} else if (unlikely(num > q->priv->bpool_max_size)) {
 			int i;
 			int pkt_to_remove = num - q->priv->bpool_init_size;
 			struct rte_mbuf *mbuf;
 			struct pp2_buff_inf buff;
 
-			MRVL_LOG(DEBUG,
-				"port-%d:%d: bpool %d oversize - remove %d buffers (pool size: %d -> %d)",
-				bpool->pp2_id, q->priv->ppio->port_id,
-				bpool->id, pkt_to_remove, num,
-				q->priv->bpool_init_size);
-
 			for (i = 0; i < pkt_to_remove; i++) {
 				ret = pp2_bpool_get_buff(hif, bpool, &buff);
 				if (ret)
@@ -2526,12 +2515,8 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				       sq, q->queue_id, 0);
 
 	sq_free_size = MRVL_PP2_TX_SHADOWQ_SIZE - sq->size - 1;
-	if (unlikely(nb_pkts > sq_free_size)) {
-		MRVL_LOG(DEBUG,
-			"No room in shadow queue for %d packets! %d packets will be sent.",
-			nb_pkts, sq_free_size);
+	if (unlikely(nb_pkts > sq_free_size))
 		nb_pkts = sq_free_size;
-	}
 
 	for (i = 0; i < nb_pkts; i++) {
 		struct rte_mbuf *mbuf = tx_pkts[i];
@@ -2648,10 +2633,6 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,
 		 */
 		if (unlikely(total_descs > sq_free_size)) {
 			total_descs -= nb_segs;
-			RTE_LOG(DEBUG, PMD,
-				"No room in shadow queue for %d packets! "
-				"%d packets will be sent.\n",
-				nb_pkts, i);
 			break;
 		}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.407211870 +0000
+++ 0255-net-mvpp2-remove-debug-log-on-fast-path.patch	2021-02-05 11:18:29.270699946 +0000
@@ -1 +1 @@
-From fa876f3ae29885321c752468c22ad1c06a7a498c Mon Sep 17 00:00:00 2001
+From 1ddc1ca0def33078081f34f0e08a219504ec7702 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa876f3ae29885321c752468c22ad1c06a7a498c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2f5b2f256b..a564752a57 100644
+index 93fb30cdb8..bfe496ff74 100644

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

* [dpdk-stable] patch 'net/mvpp2: remove VLAN 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
                   ` (253 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU validation' " luca.boccassi
                   ` (19 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Liron Himi; +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/581176b3fde1c0eed502ec3a0e3a244e46461457

Thanks.

Luca Boccassi

---
From 581176b3fde1c0eed502ec3a0e3a244e46461457 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:17 +0200
Subject: [PATCH] net/mvpp2: remove VLAN flush

[ upstream commit 8fb1d5eba05899fb2a4c46156546898fffe15917 ]

VLAN-flush in MUSDK is not supported yet.
Until it does, the code should be removed as currently
an redundant error message is displayed.

Fixes: a8f3d6783a3c ("net/mrvl: support VLAN filtering")

Signed-off-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 12 ------------
 drivers/net/mvpp2/mrvl_ethdev.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index bfe496ff74..0c338c0c00 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -671,18 +671,6 @@ mrvl_dev_start(struct rte_eth_dev *dev)
 		priv->uc_mc_flushed = 1;
 	}
 
-	if (!priv->vlan_flushed) {
-		ret = pp2_ppio_flush_vlan(priv->ppio);
-		if (ret) {
-			MRVL_LOG(ERR, "Failed to flush vlan list");
-			/*
-			 * TODO
-			 * once pp2_ppio_flush_vlan() is supported jump to out
-			 * goto out;
-			 */
-		}
-		priv->vlan_flushed = 1;
-	}
 	ret = mrvl_mtu_set(dev, dev->data->mtu);
 	if (ret)
 		MRVL_LOG(ERR, "Failed to set MTU to %d", dev->data->mtu);
diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h
index db6632f5b6..eee5182ce8 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.h
+++ b/drivers/net/mvpp2/mrvl_ethdev.h
@@ -186,7 +186,6 @@ struct mrvl_priv {
 	uint8_t bpool_bit;
 	uint8_t rss_hf_tcp;
 	uint8_t uc_mc_flushed;
-	uint8_t vlan_flushed;
 	uint8_t isolated;
 	uint8_t multiseg;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.450313142 +0000
+++ 0256-net-mvpp2-remove-VLAN-flush.patch	2021-02-05 11:18:29.274700022 +0000
@@ -1 +1 @@
-From 8fb1d5eba05899fb2a4c46156546898fffe15917 Mon Sep 17 00:00:00 2001
+From 581176b3fde1c0eed502ec3a0e3a244e46461457 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8fb1d5eba05899fb2a4c46156546898fffe15917 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a564752a57..e95c6e5992 100644
+index bfe496ff74..0c338c0c00 100644

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

* [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU 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
                   ` (254 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove VLAN flush' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: fix frame size checking' " luca.boccassi
                   ` (18 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Liron Himi; +Cc: Yuri Chipchev, 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/217cacc32ee61d0900947149d2cc37c2024e9811

Thanks.

Luca Boccassi

---
From 217cacc32ee61d0900947149d2cc37c2024e9811 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:18 +0200
Subject: [PATCH] net/mvpp2: remove CRC length from MRU validation

[ upstream commit 31536a6892ef9dfe98be26b65d9235d82ea9f9f1 ]

CRC is being removed by HW before packet get
write to the buffer, so CRC len should not be
included in MRU validation

Fixes: 79ec62028b9a ("net/mvpp2: update MTU and MRU related calculations")

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 0c338c0c00..eafe4f7ac9 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -441,8 +441,8 @@ mrvl_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	 * when this feature has not been enabled/supported so far
 	 * (TODO check scattered_rx flag here once scattered RX is supported).
 	 */
-	if (mru + MRVL_PKT_OFFS > mbuf_data_size) {
-		mru = mbuf_data_size - MRVL_PKT_OFFS;
+	if (mru - RTE_ETHER_CRC_LEN + MRVL_PKT_OFFS > mbuf_data_size) {
+		mru = mbuf_data_size + RTE_ETHER_CRC_LEN - MRVL_PKT_OFFS;
 		mtu = MRVL_PP2_MRU_TO_MTU(mru);
 		MRVL_LOG(WARNING, "MTU too big, max MTU possible limitted "
 			"by current mbuf size: %u. Set MTU to %u, MRU to %u",
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.494472669 +0000
+++ 0257-net-mvpp2-remove-CRC-length-from-MRU-validation.patch	2021-02-05 11:18:29.274700022 +0000
@@ -1 +1 @@
-From 31536a6892ef9dfe98be26b65d9235d82ea9f9f1 Mon Sep 17 00:00:00 2001
+From 217cacc32ee61d0900947149d2cc37c2024e9811 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31536a6892ef9dfe98be26b65d9235d82ea9f9f1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e95c6e5992..476227b9a1 100644
+index 0c338c0c00..eafe4f7ac9 100644

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

* [dpdk-stable] patch 'net/mvpp2: fix frame size checking' 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
                   ` (255 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU validation' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mlx5: fix count actions query in sample flow' " luca.boccassi
                   ` (17 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Liron Himi; +Cc: Yuri Chipchev, 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/7b20a6d2e519159c80281608b800270381895900

Thanks.

Luca Boccassi

---
From 7b20a6d2e519159c80281608b800270381895900 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:19 +0200
Subject: [PATCH] net/mvpp2: fix frame size checking

[ upstream commit 1c9a958a8bfb7cb4e2082b97d01849d4ba91c13b ]

Need to add CRC len to the frame-size to compare against
max_rx_pkt_len which includes it.

Fixes: 79ec62028b9a ("net/mvpp2: update MTU and MRU related calculations")

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index eafe4f7ac9..6cd5acd337 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1699,7 +1699,8 @@ mrvl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		return -EFAULT;
 	}
 
-	frame_size = buf_size - RTE_PKTMBUF_HEADROOM - MRVL_PKT_EFFEC_OFFS;
+	frame_size = buf_size - RTE_PKTMBUF_HEADROOM -
+		     MRVL_PKT_EFFEC_OFFS + RTE_ETHER_CRC_LEN;
 	if (frame_size < max_rx_pkt_len) {
 		MRVL_LOG(WARNING,
 			"Mbuf size must be increased to %u bytes to hold up "
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.538823579 +0000
+++ 0258-net-mvpp2-fix-frame-size-checking.patch	2021-02-05 11:18:29.278700098 +0000
@@ -1 +1 @@
-From 1c9a958a8bfb7cb4e2082b97d01849d4ba91c13b Mon Sep 17 00:00:00 2001
+From 7b20a6d2e519159c80281608b800270381895900 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c9a958a8bfb7cb4e2082b97d01849d4ba91c13b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 476227b9a1..db81135f1b 100644
+index eafe4f7ac9..6cd5acd337 100644

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

* [dpdk-stable] patch 'net/mlx5: fix count actions query in sample 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
                   ` (256 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: fix frame size checking' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mlx5: fix wire vport hint' " luca.boccassi
                   ` (16 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Jiawei Wang; +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/bcf89725d0c2ddd210783fb3aaf85f9f6c30d59f

Thanks.

Luca Boccassi

---
From bcf89725d0c2ddd210783fb3aaf85f9f6c30d59f Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Tue, 26 Jan 2021 17:37:56 +0200
Subject: [PATCH] net/mlx5: fix count actions query in sample flow

[ upstream commit 84382dfadf2e5de23db750c6bf61bde725b1dc8d ]

If the count action was presented in sample actions list, MLX5 PMD
created the counter resource and saved the index of counter in the
sample resource only, the counter index of flow was not updated.

This patch removes the counter index in the sampler resource and
saves it into the flow, and adds the checking to make sure only one
count be created once per flow, it's used for all sample sub flows.

Fixes: 0756228b2704 ("net/mlx5: update translate function for sample action")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    |  1 -
 drivers/net/mlx5/mlx5_flow_dv.c | 62 ++++++++++++++++++++-------------
 2 files changed, 38 insertions(+), 25 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index a249c292e3..e0211fb2dd 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -552,7 +552,6 @@ struct mlx5_flow_sub_actions_list {
 struct mlx5_flow_sub_actions_idx {
 	uint32_t rix_hrxq; /**< Hash Rx queue object index. */
 	uint32_t rix_tag; /**< Index to the tag action. */
-	uint32_t cnt;
 	uint32_t rix_port_id_action; /**< Index to port ID action resource. */
 	uint32_t rix_encap_decap; /**< Index to encap/decap resource. */
 };
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0841279f14..4dca11ad5b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2542,6 +2542,8 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
  *
  * @param[in] dev
  *   Pointer to rte_eth_dev structure.
+ * @param[in] action_flags
+ *   Holds the actions detected until now.
  * @param[out] error
  *   Pointer to error structure.
  *
@@ -2550,10 +2552,15 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
  */
 static int
 flow_dv_validate_action_count(struct rte_eth_dev *dev,
+			      uint64_t action_flags,
 			      struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 
+	if (action_flags & MLX5_FLOW_ACTION_COUNT)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "duplicate count actions set");
 	if (!priv->config.devx)
 		goto notsup_err;
 #ifdef HAVE_IBV_FLOW_DEVX_COUNTERS
@@ -4342,7 +4349,7 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
 /**
  * Validate the sample action.
  *
- * @param[in] action_flags
+ * @param[in, out] action_flags
  *   Holds the actions detected until now.
  * @param[in] action
  *   Pointer to the sample action.
@@ -4359,7 +4366,7 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-flow_dv_validate_action_sample(uint64_t action_flags,
+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,
@@ -4389,17 +4396,17 @@ flow_dv_validate_action_sample(uint64_t action_flags,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
 					  "sample action not supported");
-	if (action_flags & MLX5_FLOW_ACTION_SAMPLE)
+	if (*action_flags & MLX5_FLOW_ACTION_SAMPLE)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "Multiple sample actions not "
 					  "supported");
-	if (action_flags & MLX5_FLOW_ACTION_METER)
+	if (*action_flags & MLX5_FLOW_ACTION_METER)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "wrong action order, meter should "
 					  "be after sample action");
-	if (action_flags & MLX5_FLOW_ACTION_JUMP)
+	if (*action_flags & MLX5_FLOW_ACTION_JUMP)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "wrong action order, jump should "
@@ -4437,10 +4444,18 @@ flow_dv_validate_action_sample(uint64_t action_flags,
 			++actions_n;
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
-			ret = flow_dv_validate_action_count(dev, error);
+			if (*action_flags & MLX5_FLOW_ACTION_COUNT)
+				return rte_flow_error_set(error, EINVAL,
+						RTE_FLOW_ERROR_TYPE_ACTION,
+						action,
+						"duplicate count action set");
+			ret = flow_dv_validate_action_count(dev,
+							    sub_action_flags,
+							    error);
 			if (ret < 0)
 				return ret;
 			sub_action_flags |= MLX5_FLOW_ACTION_COUNT;
+			*action_flags |= MLX5_FLOW_ACTION_COUNT;
 			++actions_n;
 			break;
 		case RTE_FLOW_ACTION_TYPE_PORT_ID:
@@ -5731,7 +5746,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			++actions_n;
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
-			ret = flow_dv_validate_action_count(dev, error);
+			ret = flow_dv_validate_action_count(dev, action_flags,
+							    error);
 			if (ret < 0)
 				return ret;
 			action_flags |= MLX5_FLOW_ACTION_COUNT;
@@ -6031,7 +6047,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			rw_act_num += MLX5_ACT_NUM_SET_DSCP;
 			break;
 		case RTE_FLOW_ACTION_TYPE_SAMPLE:
-			ret = flow_dv_validate_action_sample(action_flags,
+			ret = flow_dv_validate_action_sample(&action_flags,
 							     actions, dev,
 							     attr, item_flags,
 							     error);
@@ -8685,10 +8701,6 @@ flow_dv_sample_sub_actions_release(struct rte_eth_dev *dev,
 		flow_dv_tag_release(dev, act_res->rix_tag);
 		act_res->rix_tag = 0;
 	}
-	if (act_res->cnt) {
-		flow_dv_counter_free(dev, act_res->cnt);
-		act_res->cnt = 0;
-	}
 }
 
 int
@@ -9067,6 +9079,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
 	struct mlx5_flow_sub_actions_list *sample_act;
 	struct mlx5_flow_sub_actions_idx *sample_idx;
 	struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
+	struct rte_flow *flow = dev_flow->flow;
 	struct mlx5_flow_rss_desc *rss_desc;
 	uint64_t action_flags = 0;
 
@@ -9138,21 +9151,22 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
 		}
 		case RTE_FLOW_ACTION_TYPE_COUNT:
 		{
-			uint32_t counter;
-
-			counter = flow_dv_translate_create_counter(dev,
-					dev_flow, sub_actions->conf, 0);
-			if (!counter)
-				return rte_flow_error_set
+			if (!flow->counter) {
+				flow->counter =
+					flow_dv_translate_create_counter(dev,
+						dev_flow, sub_actions->conf,
+						0);
+				if (!flow->counter)
+					return rte_flow_error_set
 						(error, rte_errno,
-						 RTE_FLOW_ERROR_TYPE_ACTION,
-						 NULL,
-						 "cannot create counter"
-						 " object.");
-			sample_idx->cnt = counter;
+						RTE_FLOW_ERROR_TYPE_ACTION,
+						NULL,
+						"cannot create counter"
+						" object.");
+			}
 			sample_act->dr_cnt_action =
 				  (flow_dv_counter_get_by_idx(dev,
-				  counter, NULL))->action;
+				  flow->counter, NULL))->action;
 			sample_actions[sample_act->actions_num++] =
 						sample_act->dr_cnt_action;
 			action_flags |= MLX5_FLOW_ACTION_COUNT;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.581240715 +0000
+++ 0259-net-mlx5-fix-count-actions-query-in-sample-flow.patch	2021-02-05 11:18:29.286700251 +0000
@@ -1 +1 @@
-From 84382dfadf2e5de23db750c6bf61bde725b1dc8d Mon Sep 17 00:00:00 2001
+From bcf89725d0c2ddd210783fb3aaf85f9f6c30d59f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84382dfadf2e5de23db750c6bf61bde725b1dc8d ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index e9e33972ef..0b949f4a3a 100644
+index a249c292e3..e0211fb2dd 100644
@@ -28 +29 @@
-@@ -578,7 +578,6 @@ struct mlx5_flow_sub_actions_list {
+@@ -552,7 +552,6 @@ struct mlx5_flow_sub_actions_list {
@@ -35 +36 @@
- 	uint32_t rix_jump; /**< Index to the jump action resource. */
+ };
@@ -37 +38 @@
-index 78cae46080..8ece56ba5a 100644
+index 0841279f14..4dca11ad5b 100644
@@ -40 +41 @@
-@@ -2612,6 +2612,8 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
+@@ -2542,6 +2542,8 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
@@ -49 +50 @@
-@@ -2620,10 +2622,15 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
+@@ -2550,10 +2552,15 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
@@ -65 +66 @@
-@@ -4395,7 +4402,7 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
+@@ -4342,7 +4349,7 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
@@ -74 +75 @@
-@@ -4416,7 +4423,7 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
+@@ -4359,7 +4366,7 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
@@ -83 +84 @@
-@@ -4447,17 +4454,17 @@ flow_dv_validate_action_sample(uint64_t action_flags,
+@@ -4389,17 +4396,17 @@ flow_dv_validate_action_sample(uint64_t action_flags,
@@ -104 +105 @@
-@@ -4517,10 +4524,18 @@ flow_dv_validate_action_sample(uint64_t action_flags,
+@@ -4437,10 +4444,18 @@ flow_dv_validate_action_sample(uint64_t action_flags,
@@ -124 +125 @@
-@@ -5848,7 +5863,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5731,7 +5746,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -134 +135 @@
-@@ -6148,7 +6164,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6031,7 +6047,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -142,2 +143,2 @@
- 							     rss, &sample_rss,
-@@ -9064,10 +9080,6 @@ flow_dv_sample_sub_actions_release(struct rte_eth_dev *dev,
+ 							     error);
+@@ -8685,10 +8701,6 @@ flow_dv_sample_sub_actions_release(struct rte_eth_dev *dev,
@@ -151,4 +152,4 @@
- 	if (act_res->rix_jump) {
- 		flow_dv_jump_tbl_resource_release(dev, act_res->rix_jump);
- 		act_res->rix_jump = 0;
-@@ -9460,6 +9472,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
+ }
+ 
+ int
+@@ -9067,6 +9079,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
@@ -162 +163 @@
-@@ -9570,21 +9583,22 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
+@@ -9138,21 +9151,22 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix wire vport hint' 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
                   ` (257 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mlx5: fix count actions query in sample flow' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process exit' " luca.boccassi
                   ` (15 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +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/99e743b72dc0eeb1e1c1d3dfcb4a3a328867ddaa

Thanks.

Luca Boccassi

---
From 99e743b72dc0eeb1e1c1d3dfcb4a3a328867ddaa Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 27 Jan 2021 15:53:05 +0200
Subject: [PATCH] net/mlx5: fix wire vport hint

[ upstream commit 53900e1ae6bbc985934a7647bc1afef83bccea84 ]

In order to optimize number of hops in the steering tables there
was the hint field of source vport in the matcher. If this hint
was provided for the wire port the actual vport match, used by
kernel, was not set in the matcher metadata register field.
This could led to not creating the rule in hardware and E-Switch
malfunction if kernel used non-zero metadata value for the wire
vport.

This patch always sets the match for the vport metadata register
value besides the hint.

Fixes: aaf34de5d801 ("net/mlx5: add wire vport hint")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 4dca11ad5b..32065efa41 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7704,11 +7704,15 @@ flow_dv_translate_item_port_id(struct rte_eth_dev *dev, void *matcher,
 		    priv->pf_bond < 0 && attr->transfer)
 			flow_dv_translate_item_source_vport
 				(matcher, key, priv->vport_id, mask);
-		else
-			flow_dv_translate_item_meta_vport
-				(matcher, key,
-				 priv->vport_meta_tag,
-				 priv->vport_meta_mask);
+		/*
+		 * We should always set the vport metadata register,
+		 * otherwise the SW steering library can drop
+		 * the rule if wire vport metadata value is not zero,
+		 * it depends on kernel configuration.
+		 */
+		flow_dv_translate_item_meta_vport(matcher, key,
+						  priv->vport_meta_tag,
+						  priv->vport_meta_mask);
 	} else {
 		flow_dv_translate_item_source_vport(matcher, key,
 						    priv->vport_id, mask);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.636783558 +0000
+++ 0260-net-mlx5-fix-wire-vport-hint.patch	2021-02-05 11:18:29.294700403 +0000
@@ -1 +1 @@
-From 53900e1ae6bbc985934a7647bc1afef83bccea84 Mon Sep 17 00:00:00 2001
+From 99e743b72dc0eeb1e1c1d3dfcb4a3a328867ddaa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 53900e1ae6bbc985934a7647bc1afef83bccea84 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 95a066f78e..8c11ac306f 100644
+index 4dca11ad5b..32065efa41 100644
@@ -29 +30 @@
-@@ -8662,11 +8662,15 @@ flow_dv_translate_item_port_id(struct rte_eth_dev *dev, void *matcher,
+@@ -7704,11 +7704,15 @@ flow_dv_translate_item_port_id(struct rte_eth_dev *dev, void *matcher,

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

* [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process 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
                   ` (258 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/mlx5: fix wire vport hint' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: fix interrupt resources in Rx interrupt mode' " luca.boccassi
                   ` (14 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Lijun Ou; +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/89796f0f761f83447edd0c26f1b93f79a7059b16

Thanks.

Luca Boccassi

---
From 89796f0f761f83447edd0c26f1b93f79a7059b16 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 22 Jan 2021 18:18:46 +0800
Subject: [PATCH] net/hns3: fix memory leak on secondary process exit

[ upstream commit 4101114586e42e3dfb0dee2e5b054dee3074e63f ]

The secondary process is applied a memory for the process_private
during initialization. Therefore, the memory needs to be released
when exiting.

Fixes: c203571b3602 ("net/hns3: register and add log interface")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  7 +++++--
 drivers/net/hns3/hns3_ethdev_vf.c | 12 +++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 03d6df716d..ac1c1c0c64 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6226,8 +6226,11 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -EPERM;
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		rte_free(eth_dev->process_private);
+		eth_dev->process_private = NULL;
+		return 0;
+	}
 
 	if (hw->adapter_state < HNS3_NIC_CLOSING)
 		hns3_dev_close(eth_dev);
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 32e35dc463..291166c461 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1977,8 +1977,11 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
 	struct hns3_hw *hw = &hns->hw;
 	int ret = 0;
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		rte_free(eth_dev->process_private);
+		eth_dev->process_private = NULL;
 		return 0;
+	}
 
 	if (hw->adapter_state == HNS3_NIC_STARTED)
 		ret = hns3vf_dev_stop(eth_dev);
@@ -2848,8 +2851,11 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -EPERM;
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		rte_free(eth_dev->process_private);
+		eth_dev->process_private = NULL;
+		return 0;
+	}
 
 	if (hw->adapter_state < HNS3_NIC_CLOSING)
 		hns3vf_dev_close(eth_dev);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.679668434 +0000
+++ 0261-net-hns3-fix-memory-leak-on-secondary-process-exit.patch	2021-02-05 11:18:29.302700555 +0000
@@ -1 +1 @@
-From 4101114586e42e3dfb0dee2e5b054dee3074e63f Mon Sep 17 00:00:00 2001
+From 89796f0f761f83447edd0c26f1b93f79a7059b16 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4101114586e42e3dfb0dee2e5b054dee3074e63f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c5dccec5ae..b89bc48714 100644
+index 03d6df716d..ac1c1c0c64 100644
@@ -23 +24 @@
-@@ -6263,8 +6263,11 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -6226,8 +6226,11 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -38 +39 @@
-index 063f2f5c2f..5bf8c2e8fd 100644
+index 32e35dc463..291166c461 100644
@@ -41 +42 @@
-@@ -1971,8 +1971,11 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+@@ -1977,8 +1977,11 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
@@ -54 +55 @@
-@@ -2839,8 +2842,11 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -2848,8 +2851,11 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/hns3: fix interrupt resources in Rx interrupt mode' 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
                   ` (259 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process exit' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: adjust some comments' " luca.boccassi
                   ` (13 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Chengchang Tang; +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/0df74e307cf5befb840bc9377e7f67842efed8f2

Thanks.

Luca Boccassi

---
From 0df74e307cf5befb840bc9377e7f67842efed8f2 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 22 Jan 2021 18:18:47 +0800
Subject: [PATCH] net/hns3: fix interrupt resources in Rx interrupt mode

[ upstream commit 2b6b09817dcfd81ff6017da49a68fab22c1cb9c2 ]

For Kunpeng930, the NIC engine support 1280 tqps being taken over by
a PF. In this case, a maximum of 1281 interrupt resources are also
supported in this PF. To support the maximum number of queues, several
patches are made. But the interrupt related modification are missing.
So, in RX interrupt mode, a large number of queues will be aggregated
into one interrupt due to insufficient interrupts. It will lead to
waste of interrupt resources and reduces usability.

To utilize all these interrupt resources, related IMP command has been
extended. And, the I/O address of the extended interrupt resources are
different from the existing ones. So, a function used for calculating
the address offset has been added.

Fixes: 76d794566d43 ("net/hns3: maximize queue number")
Fixes: 27911a6e62e5 ("net/hns3: add Rx interrupts compatibility")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h    |  8 ++++++--
 drivers/net/hns3/hns3_ethdev.c | 17 +++++++++--------
 drivers/net/hns3/hns3_regs.c   |  2 +-
 drivers/net/hns3/hns3_regs.h   | 22 ++++++++++++++--------
 drivers/net/hns3/hns3_rxtx.c   | 28 +++++++++++++++++++++++-----
 drivers/net/hns3/hns3_rxtx.h   |  1 +
 6 files changed, 54 insertions(+), 24 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index e40293b309..a15e7b9d1d 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -775,12 +775,16 @@ enum hns3_int_gl_idx {
 #define HNS3_TQP_ID_M		GENMASK(12, 2)
 #define HNS3_INT_GL_IDX_S	13
 #define HNS3_INT_GL_IDX_M	GENMASK(14, 13)
+#define HNS3_TQP_INT_ID_L_S	0
+#define HNS3_TQP_INT_ID_L_M	GENMASK(7, 0)
+#define HNS3_TQP_INT_ID_H_S	8
+#define HNS3_TQP_INT_ID_H_M	GENMASK(15, 8)
 struct hns3_ctrl_vector_chain_cmd {
-	uint8_t int_vector_id;
+	uint8_t int_vector_id;    /* the low order of the interrupt id */
 	uint8_t int_cause_num;
 	uint16_t tqp_type_and_id[HNS3_VECTOR_ELEMENTS_PER_CMD];
 	uint8_t vfid;
-	uint8_t rsv;
+	uint8_t int_vector_id_h;  /* the high order of the interrupt id */
 };
 
 struct hns3_config_max_frm_size_cmd {
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ac1c1c0c64..efc1a29459 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2203,7 +2203,7 @@ hns3_check_dcb_cfg(struct rte_eth_dev *dev)
 }
 
 static int
-hns3_bind_ring_with_vector(struct hns3_hw *hw, uint8_t vector_id, bool mmap,
+hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,
 			   enum hns3_ring_type queue_type, uint16_t queue_id)
 {
 	struct hns3_cmd_desc desc;
@@ -2212,13 +2212,15 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint8_t vector_id, bool mmap,
 	enum hns3_cmd_status status;
 	enum hns3_opcode_type op;
 	uint16_t tqp_type_and_id = 0;
-	const char *op_str;
 	uint16_t type;
 	uint16_t gl;
 
-	op = mmap ? HNS3_OPC_ADD_RING_TO_VECTOR : HNS3_OPC_DEL_RING_TO_VECTOR;
+	op = en ? HNS3_OPC_ADD_RING_TO_VECTOR : HNS3_OPC_DEL_RING_TO_VECTOR;
 	hns3_cmd_setup_basic_desc(&desc, op, false);
-	req->int_vector_id = vector_id;
+	req->int_vector_id = hns3_get_field(vector_id, HNS3_TQP_INT_ID_L_M,
+					      HNS3_TQP_INT_ID_L_S);
+	req->int_vector_id_h = hns3_get_field(vector_id, HNS3_TQP_INT_ID_H_M,
+					      HNS3_TQP_INT_ID_H_S);
 
 	if (queue_type == HNS3_RING_TYPE_RX)
 		gl = HNS3_RING_GL_RX;
@@ -2234,11 +2236,10 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint8_t vector_id, bool mmap,
 		       gl);
 	req->tqp_type_and_id[0] = rte_cpu_to_le_16(tqp_type_and_id);
 	req->int_cause_num = 1;
-	op_str = mmap ? "Map" : "Unmap";
 	status = hns3_cmd_send(hw, &desc, 1);
 	if (status) {
 		hns3_err(hw, "%s TQP %u fail, vector_id is %u, status is %d.",
-			 op_str, queue_id, req->int_vector_id, status);
+			 en ? "Map" : "Unmap", queue_id, vector_id, status);
 		return status;
 	}
 
@@ -4761,8 +4762,8 @@ hns3_map_rx_interrupt(struct rte_eth_dev *dev)
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint8_t base = RTE_INTR_VEC_ZERO_OFFSET;
-	uint8_t vec = RTE_INTR_VEC_ZERO_OFFSET;
+	uint16_t base = RTE_INTR_VEC_ZERO_OFFSET;
+	uint16_t vec = RTE_INTR_VEC_ZERO_OFFSET;
 	uint32_t intr_vector;
 	uint16_t q_id;
 	int ret;
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index f2cb465eed..8afe132585 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -301,7 +301,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
 
 	reg_num = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
 	for (j = 0; j < hw->intr_tqps_num; j++) {
-		reg_offset = HNS3_TQP_INTR_REG_SIZE * j;
+		reg_offset = hns3_get_tqp_intr_reg_offset(j);
 		for (i = 0; i < reg_num; i++)
 			*data++ = hns3_read_dev(hw, tqp_intr_reg_addrs[i] +
 						reg_offset);
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
index 81a0af59e4..39fc5d1b18 100644
--- a/drivers/net/hns3/hns3_regs.h
+++ b/drivers/net/hns3/hns3_regs.h
@@ -95,15 +95,21 @@
 #define HNS3_MIN_EXTEND_QUEUE_ID		1024
 
 /* bar registers for tqp interrupt */
-#define HNS3_TQP_INTR_CTRL_REG			0x20000
-#define HNS3_TQP_INTR_GL0_REG			0x20100
-#define HNS3_TQP_INTR_GL1_REG			0x20200
-#define HNS3_TQP_INTR_GL2_REG			0x20300
-#define HNS3_TQP_INTR_RL_REG			0x20900
-#define HNS3_TQP_INTR_TX_QL_REG			0x20e00
-#define HNS3_TQP_INTR_RX_QL_REG			0x20f00
+#define HNS3_TQP_INTR_REG_BASE			0x20000
+#define HNS3_TQP_INTR_EXT_REG_BASE		0x30000
+#define HNS3_TQP_INTR_CTRL_REG			0
+#define HNS3_TQP_INTR_GL0_REG			0x100
+#define HNS3_TQP_INTR_GL1_REG			0x200
+#define HNS3_TQP_INTR_GL2_REG			0x300
+#define HNS3_TQP_INTR_RL_REG			0x900
+#define HNS3_TQP_INTR_TX_QL_REG			0xe00
+#define HNS3_TQP_INTR_RX_QL_REG			0xf00
+#define HNS3_TQP_INTR_RL_EN_B			6
+
+#define HNS3_MIN_EXT_TQP_INTR_ID		64
+#define HNS3_TQP_INTR_LOW_ORDER_OFFSET		0x4
+#define HNS3_TQP_INTR_HIGH_ORDER_OFFSET		0x1000
 
-#define HNS3_TQP_INTR_REG_SIZE			4
 #define HNS3_TQP_INTR_GL_MAX			0x1FE0
 #define HNS3_TQP_INTR_GL_DEFAULT		20
 #define HNS3_TQP_INTR_GL_UNIT_1US		BIT(31)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 5ac36b314d..896567c791 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -834,6 +834,24 @@ queue_reset_fail:
 	return ret;
 }
 
+uint32_t
+hns3_get_tqp_intr_reg_offset(uint16_t tqp_intr_id)
+{
+	uint32_t reg_offset;
+
+	/* Need an extend offset to config queues > 64 */
+	if (tqp_intr_id < HNS3_MIN_EXT_TQP_INTR_ID)
+		reg_offset = HNS3_TQP_INTR_REG_BASE +
+			     tqp_intr_id * HNS3_TQP_INTR_LOW_ORDER_OFFSET;
+	else
+		reg_offset = HNS3_TQP_INTR_EXT_REG_BASE +
+			     tqp_intr_id / HNS3_MIN_EXT_TQP_INTR_ID *
+			     HNS3_TQP_INTR_HIGH_ORDER_OFFSET +
+			     tqp_intr_id % HNS3_MIN_EXT_TQP_INTR_ID *
+			     HNS3_TQP_INTR_LOW_ORDER_OFFSET;
+
+	return reg_offset;
+}
 
 void
 hns3_set_queue_intr_gl(struct hns3_hw *hw, uint16_t queue_id,
@@ -847,7 +865,7 @@ hns3_set_queue_intr_gl(struct hns3_hw *hw, uint16_t queue_id,
 	if (gl_idx >= RTE_DIM(offset) || gl_value > HNS3_TQP_INTR_GL_MAX)
 		return;
 
-	addr = offset[gl_idx] + queue_id * HNS3_TQP_INTR_REG_SIZE;
+	addr = offset[gl_idx] + hns3_get_tqp_intr_reg_offset(queue_id);
 	if (hw->intr.gl_unit == HNS3_INTR_COALESCE_GL_UINT_1US)
 		value = gl_value | HNS3_TQP_INTR_GL_UNIT_1US;
 	else
@@ -864,7 +882,7 @@ hns3_set_queue_intr_rl(struct hns3_hw *hw, uint16_t queue_id, uint16_t rl_value)
 	if (rl_value > HNS3_TQP_INTR_RL_MAX)
 		return;
 
-	addr = HNS3_TQP_INTR_RL_REG + queue_id * HNS3_TQP_INTR_REG_SIZE;
+	addr = HNS3_TQP_INTR_RL_REG + hns3_get_tqp_intr_reg_offset(queue_id);
 	value = HNS3_RL_USEC_TO_REG(rl_value);
 	if (value > 0)
 		value |= HNS3_TQP_INTR_RL_ENABLE_MASK;
@@ -885,10 +903,10 @@ hns3_set_queue_intr_ql(struct hns3_hw *hw, uint16_t queue_id, uint16_t ql_value)
 	if (hw->intr.int_ql_max == HNS3_INTR_QL_NONE)
 		return;
 
-	addr = HNS3_TQP_INTR_TX_QL_REG + queue_id * HNS3_TQP_INTR_REG_SIZE;
+	addr = HNS3_TQP_INTR_TX_QL_REG + hns3_get_tqp_intr_reg_offset(queue_id);
 	hns3_write_dev(hw, addr, ql_value);
 
-	addr = HNS3_TQP_INTR_RX_QL_REG + queue_id * HNS3_TQP_INTR_REG_SIZE;
+	addr = HNS3_TQP_INTR_RX_QL_REG + hns3_get_tqp_intr_reg_offset(queue_id);
 	hns3_write_dev(hw, addr, ql_value);
 }
 
@@ -897,7 +915,7 @@ hns3_queue_intr_enable(struct hns3_hw *hw, uint16_t queue_id, bool en)
 {
 	uint32_t addr, value;
 
-	addr = HNS3_TQP_INTR_CTRL_REG + queue_id * HNS3_TQP_INTR_REG_SIZE;
+	addr = HNS3_TQP_INTR_CTRL_REG + hns3_get_tqp_intr_reg_offset(queue_id);
 	value = en ? 1 : 0;
 
 	hns3_write_dev(hw, addr, value);
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 6538848fee..5650a97c3a 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -653,6 +653,7 @@ int hns3_tx_burst_mode_get(struct rte_eth_dev *dev,
 const uint32_t *hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev);
 void hns3_init_rx_ptype_tble(struct rte_eth_dev *dev);
 void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev);
+uint32_t hns3_get_tqp_intr_reg_offset(uint16_t tqp_intr_id);
 void hns3_set_queue_intr_gl(struct hns3_hw *hw, uint16_t queue_id,
 			    uint8_t gl_idx, uint16_t gl_value);
 void hns3_set_queue_intr_rl(struct hns3_hw *hw, uint16_t queue_id,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.728574139 +0000
+++ 0262-net-hns3-fix-interrupt-resources-in-Rx-interrupt-mod.patch	2021-02-05 11:18:29.310700707 +0000
@@ -1 +1 @@
-From 2b6b09817dcfd81ff6017da49a68fab22c1cb9c2 Mon Sep 17 00:00:00 2001
+From 0df74e307cf5befb840bc9377e7f67842efed8f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b6b09817dcfd81ff6017da49a68fab22c1cb9c2 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 6152f6ead1..dc97a1a852 100644
+index e40293b309..a15e7b9d1d 100644
@@ -37 +38 @@
-@@ -776,12 +776,16 @@ enum hns3_int_gl_idx {
+@@ -775,12 +775,16 @@ enum hns3_int_gl_idx {
@@ -57 +58 @@
-index b89bc48714..58d4f27530 100644
+index ac1c1c0c64..efc1a29459 100644
@@ -60 +61 @@
-@@ -2232,7 +2232,7 @@ hns3_check_dcb_cfg(struct rte_eth_dev *dev)
+@@ -2203,7 +2203,7 @@ hns3_check_dcb_cfg(struct rte_eth_dev *dev)
@@ -69 +70 @@
-@@ -2241,13 +2241,15 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint8_t vector_id, bool mmap,
+@@ -2212,13 +2212,15 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint8_t vector_id, bool mmap,
@@ -88 +89 @@
-@@ -2263,11 +2265,10 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint8_t vector_id, bool mmap,
+@@ -2234,11 +2236,10 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint8_t vector_id, bool mmap,
@@ -101 +102 @@
-@@ -4797,8 +4798,8 @@ hns3_map_rx_interrupt(struct rte_eth_dev *dev)
+@@ -4761,8 +4762,8 @@ hns3_map_rx_interrupt(struct rte_eth_dev *dev)
@@ -113 +114 @@
-index 01550458b7..84f3157632 100644
+index f2cb465eed..8afe132585 100644
@@ -160 +161 @@
-index b958315b12..222cf8a4bf 100644
+index 5ac36b314d..896567c791 100644
@@ -229 +230 @@
-index 331b507fc8..8f5ae5cf11 100644
+index 6538848fee..5650a97c3a 100644
@@ -232 +233 @@
-@@ -680,6 +680,7 @@ int hns3_tx_burst_mode_get(struct rte_eth_dev *dev,
+@@ -653,6 +653,7 @@ int hns3_tx_burst_mode_get(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/hns3: adjust some comments' 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
                   ` (260 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: fix interrupt resources in Rx interrupt mode' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: adjust format specifier for enum' " luca.boccassi
                   ` (12 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Lijun Ou; +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/b6d4d8a21fc5456a5eaa71cd5de5805f43d62c97

Thanks.

Luca Boccassi

---
From b6d4d8a21fc5456a5eaa71cd5de5805f43d62c97 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 22 Jan 2021 18:18:49 +0800
Subject: [PATCH] net/hns3: adjust some comments

[ upstream commit f77b3c3a7b4a968dd42935420df0c00eefb506da ]

Fix some error comments and remove some meaningless comments.

Fixes: f8e7fcbfd0b8 ("net/hns3: support flow action of queue region")
Fixes: fcba820d9b9e ("net/hns3: support flow director")
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Fixes: ec674cb742e5 ("net/hns3: fix flushing RSS rule")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index f303df4ad8..e936098611 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -91,9 +91,9 @@ net_addr_to_host(uint32_t *dst, const rte_be32_t *src, size_t len)
 /*
  * This function is used to find rss general action.
  * 1. As we know RSS is used to spread packets among several queues, the flow
- *    API provide the struct rte_flow_action_rss, user could config it's field
+ *    API provide the struct rte_flow_action_rss, user could config its field
  *    sush as: func/level/types/key/queue to control RSS function.
- * 2. The flow API also support queue region configuration for hns3. It was
+ * 2. The flow API also supports queue region configuration for hns3. It was
  *    implemented by FDIR + RSS in hns3 hardware, user can create one FDIR rule
  *    which action is RSS queues region.
  * 3. When action is RSS, we use the following rule to distinguish:
@@ -128,11 +128,11 @@ hns3_find_rss_general_action(const struct rte_flow_item pattern[],
 	rss = act->conf;
 	if (have_eth && rss->conf.queue_num) {
 		/*
-		 * Patter have ETH and action's queue_num > 0, indicate this is
+		 * Pattern have ETH and action's queue_num > 0, indicate this is
 		 * queue region configuration.
 		 * Because queue region is implemented by FDIR + RSS in hns3
-		 * hardware, it need enter FDIR process, so here return NULL to
-		 * avoid enter RSS process.
+		 * hardware, it needs to enter FDIR process, so here return NULL
+		 * to avoid enter RSS process.
 		 */
 		return NULL;
 	}
@@ -405,7 +405,6 @@ hns3_handle_actions(struct rte_eth_dev *dev,
 	return 0;
 }
 
-/* Parse to get the attr and action info of flow director rule. */
 static int
 hns3_check_attr(const struct rte_flow_attr *attr, struct rte_flow_error *error)
 {
@@ -800,7 +799,7 @@ hns3_parse_sctp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 }
 
 /*
- * Check items before tunnel, save inner configs to outer configs,and clear
+ * Check items before tunnel, save inner configs to outer configs, and clear
  * inner configs.
  * The key consists of two parts: meta_data and tuple keys.
  * Meta data uses 15 bits, including vlan_num(2bit), des_port(12bit) and tunnel
@@ -1490,10 +1489,8 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 	if (ret)
 		return ret;
 
-	/* Update algorithm of hw */
 	hw->rss_info.conf.func = rss_config->func;
 
-	/* Set flow type supported */
 	tuple = &hw->rss_info.rss_tuple_sets;
 	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_config->types);
 	if (ret)
@@ -1578,7 +1575,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 		if (rss_flow_conf.queue_num) {
 			/*
 			 * Due the content of queue pointer have been reset to
-			 * 0, the rss_info->conf.queue should be set NULL
+			 * 0, the rss_info->conf.queue should be set to NULL
 			 */
 			rss_info->conf.queue = NULL;
 			rss_info->conf.queue_num = 0;
@@ -1744,7 +1741,7 @@ hns3_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 /*
  * Create or destroy a flow rule.
  * Theorically one rule can match more than one filters.
- * We will let it use the filter which it hitt first.
+ * We will let it use the filter which it hit first.
  * So, the sequence matters.
  */
 static struct rte_flow *
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.772865947 +0000
+++ 0263-net-hns3-adjust-some-comments.patch	2021-02-05 11:18:29.314700784 +0000
@@ -1 +1 @@
-From f77b3c3a7b4a968dd42935420df0c00eefb506da Mon Sep 17 00:00:00 2001
+From b6d4d8a21fc5456a5eaa71cd5de5805f43d62c97 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f77b3c3a7b4a968dd42935420df0c00eefb506da ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8a5179d6e0..f2bff1eb1a 100644
+index f303df4ad8..e936098611 100644
@@ -58 +59 @@
-@@ -782,7 +781,7 @@ hns3_parse_sctp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -800,7 +799,7 @@ hns3_parse_sctp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
@@ -67 +68 @@
-@@ -1473,10 +1472,8 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+@@ -1490,10 +1489,8 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
@@ -78 +79 @@
-@@ -1561,7 +1558,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1578,7 +1575,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
@@ -87 +88 @@
-@@ -1727,7 +1724,7 @@ hns3_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1744,7 +1741,7 @@ hns3_flow_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/hns3: adjust format specifier for enum' 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
                   ` (261 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: adjust some comments' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' " luca.boccassi
                   ` (11 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Lijun Ou; +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/8c2efc75265ac79eb15d07d3e3d00f418141ce49

Thanks.

Luca Boccassi

---
From 8c2efc75265ac79eb15d07d3e3d00f418141ce49 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 22 Jan 2021 18:18:51 +0800
Subject: [PATCH] net/hns3: adjust format specifier for enum

[ upstream commit 692a1d2735b99d91bf9de009c3f7c510bd735a85 ]

Here uses %d as printing output for enumeration member.

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

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index e936098611..89c22dc294 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1463,7 +1463,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
 		*hash_algo = HNS3_RSS_HASH_ALGO_SYMMETRIC_TOEP;
 		break;
 	default:
-		hns3_err(hw, "Invalid RSS algorithm configuration(%u)",
+		hns3_err(hw, "Invalid RSS algorithm configuration(%d)",
 			 algo_func);
 		return -EINVAL;
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.811121850 +0000
+++ 0264-net-hns3-adjust-format-specifier-for-enum.patch	2021-02-05 11:18:29.314700784 +0000
@@ -1 +1 @@
-From 692a1d2735b99d91bf9de009c3f7c510bd735a85 Mon Sep 17 00:00:00 2001
+From 8c2efc75265ac79eb15d07d3e3d00f418141ce49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 692a1d2735b99d91bf9de009c3f7c510bd735a85 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index e9d0a0bc90..3e387ac0bf 100644
+index e936098611..89c22dc294 100644
@@ -20 +21 @@
-@@ -1447,7 +1447,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
+@@ -1463,7 +1463,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,

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

* [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' 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
                   ` (262 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: adjust format specifier for enum' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' " luca.boccassi
                   ` (10 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Steve Yang
  Cc: Ferruh Yigit, Lance Richardson, Wisam Jaddo, Xiaoyun Li, Bo Chen,
	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/2e10839faa086cff8df6a6befe13e2d170625f17

Thanks.

Luca Boccassi

---
From 2e10839faa086cff8df6a6befe13e2d170625f17 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Thu, 28 Jan 2021 12:07:08 +0000
Subject: [PATCH] app/testpmd: fix setting maximum packet length

[ upstream commit 0c4abd368880349cf9df2770b1d18890b08441ae ]

"port config all max-pkt-len" command fails because it doesn't set the
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag properly.

Commit in the fixes line moved the 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload
flag update from 'cmd_config_max_pkt_len_parsed()' to 'init_config()'.
'init_config()' function is only called during testpmd startup, but the
flag status needs to be calculated whenever 'max_rx_pkt_len' changes.

The issue can be reproduced as [1], where the 'max-pkt-len' reduced and
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag should be cleared but it
didn't.

Adding the 'update_jumbo_frame_offload()' helper function to update
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag and 'max_rx_pkt_len'. This
function is called both by 'init_config()' and
'cmd_config_max_pkt_len_parsed()'.

Default 'max-pkt-len' value set to zero, 'update_jumbo_frame_offload()'
updates it to "RTE_ETHER_MTU + PMD specific Ethernet overhead" when it
is zero.
If '--max-pkt-len=N' argument provided, it will be used instead.
And with each "port config all max-pkt-len" command, the
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag, 'max-pkt-len' and MTU is
updated.

[1]
--------------------------------------------------------------------------
dpdk-testpmd -c 0xf -n 4 -- -i --max-pkt-len=9000 --tx-offloads=0x8000
	--rxq=4 --txq=4 --disable-rss
testpmd>  set verbose 3
testpmd>  port stop all
testpmd>  port config all max-pkt-len 1518
testpmd>  port start all

// Got fail error info without this patch
Configuring Port 0 (socket 1)
Ethdev port_id=0 rx_queue_id=0, new added offloads 0x800 must be
within per-queue offload capabilities 0x0 in rte_eth_rx_queue_setup()
Fail to configure port 0 rx queues //<-- Fail error info;
--------------------------------------------------------------------------

Bugzilla ID: 625
Fixes: 761c4d66900f ("app/testpmd: fix max Rx packet length for VLAN packets")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Tested-by: Bo Chen <box.c.chen@intel.com>
---
 app/test-pmd/cmdline.c |  13 ++++++
 app/test-pmd/testpmd.c | 102 +++++++++++++++++++++++++++++++++--------
 app/test-pmd/testpmd.h |   1 +
 3 files changed, 97 insertions(+), 19 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 65042fcff5..94240c840b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1877,7 +1877,9 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 				__rte_unused void *data)
 {
 	struct cmd_config_max_pkt_len_result *res = parsed_result;
+	uint32_t max_rx_pkt_len_backup = 0;
 	portid_t pid;
+	int ret;
 
 	if (!all_ports_stopped()) {
 		printf("Please stop all ports first\n");
@@ -1896,7 +1898,18 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 			if (res->value == port->dev_conf.rxmode.max_rx_pkt_len)
 				return;
 
+			ret = eth_dev_info_get_print_err(pid, &port->dev_info);
+			if (ret != 0) {
+				printf("rte_eth_dev_info_get() failed for port %u\n",
+					pid);
+				return;
+			}
+
+			max_rx_pkt_len_backup = port->dev_conf.rxmode.max_rx_pkt_len;
+
 			port->dev_conf.rxmode.max_rx_pkt_len = res->value;
+			if (update_jumbo_frame_offload(pid) != 0)
+				port->dev_conf.rxmode.max_rx_pkt_len = max_rx_pkt_len_backup;
 		} else {
 			printf("Unknown parameter\n");
 			return;
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index c256e719ae..555852ae5e 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -443,8 +443,11 @@ lcoreid_t latencystats_lcore_id = -1;
  * Ethernet device configuration.
  */
 struct rte_eth_rxmode rx_mode = {
-	.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-		/**< Default maximum frame length. */
+	/* Default maximum frame length.
+	 * Zero is converted to "RTE_ETHER_MTU + PMD Ethernet overhead"
+	 * in init_config().
+	 */
+	.max_rx_pkt_len = 0,
 };
 
 struct rte_eth_txmode tx_mode = {
@@ -1410,7 +1413,6 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
-	uint16_t eth_overhead;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1447,22 +1449,10 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
-		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
-		if (port->dev_info.max_mtu != UINT16_MAX &&
-		    port->dev_info.max_rx_pktlen > port->dev_info.max_mtu)
-			eth_overhead = port->dev_info.max_rx_pktlen -
-				port->dev_info.max_mtu;
-		else
-			eth_overhead =
-				RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
-
-		if (port->dev_conf.rxmode.max_rx_pkt_len <=
-			(uint32_t)(RTE_ETHER_MTU + eth_overhead))
-			port->dev_conf.rxmode.max_rx_pkt_len =
-					RTE_ETHER_MTU + eth_overhead;
-		else
-			port->dev_conf.rxmode.offloads |=
-					DEV_RX_OFFLOAD_JUMBO_FRAME;
+		ret = update_jumbo_frame_offload(pid);
+		if (ret != 0)
+			printf("Updating jumbo frame offload failed for port %u\n",
+				pid);
 
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
@@ -3358,6 +3348,80 @@ rxtx_port_config(struct rte_port *port)
 	}
 }
 
+/*
+ * Helper function to arrange max_rx_pktlen value and JUMBO_FRAME offload,
+ * MTU is also aligned if JUMBO_FRAME offload is not set.
+ *
+ * port->dev_info should be set before calling this function.
+ *
+ * return 0 on success, negative on error
+ */
+int
+update_jumbo_frame_offload(portid_t portid)
+{
+	struct rte_port *port = &ports[portid];
+	uint32_t eth_overhead;
+	uint64_t rx_offloads;
+	int ret;
+	bool on;
+
+	/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
+	if (port->dev_info.max_mtu != UINT16_MAX &&
+	    port->dev_info.max_rx_pktlen > port->dev_info.max_mtu)
+		eth_overhead = port->dev_info.max_rx_pktlen -
+				port->dev_info.max_mtu;
+	else
+		eth_overhead = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+	rx_offloads = port->dev_conf.rxmode.offloads;
+
+	/* Default config value is 0 to use PMD specific overhead */
+	if (port->dev_conf.rxmode.max_rx_pkt_len == 0)
+		port->dev_conf.rxmode.max_rx_pkt_len = RTE_ETHER_MTU + eth_overhead;
+
+	if (port->dev_conf.rxmode.max_rx_pkt_len <= RTE_ETHER_MTU + eth_overhead) {
+		rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
+		on = false;
+	} else {
+		if ((port->dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) == 0) {
+			printf("Frame size (%u) is not supported by port %u\n",
+				port->dev_conf.rxmode.max_rx_pkt_len,
+				portid);
+			return -1;
+		}
+		rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+		on = true;
+	}
+
+	if (rx_offloads != port->dev_conf.rxmode.offloads) {
+		uint16_t qid;
+
+		port->dev_conf.rxmode.offloads = rx_offloads;
+
+		/* Apply JUMBO_FRAME offload configuration to Rx queue(s) */
+		for (qid = 0; qid < port->dev_info.nb_rx_queues; qid++) {
+			if (on)
+				port->rx_conf[qid].offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+			else
+				port->rx_conf[qid].offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
+		}
+	}
+
+	/* If JUMBO_FRAME is set MTU conversion done by ethdev layer,
+	 * if unset do it here
+	 */
+	if ((rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) == 0) {
+		ret = rte_eth_dev_set_mtu(portid,
+				port->dev_conf.rxmode.max_rx_pkt_len - eth_overhead);
+		if (ret)
+			printf("Failed to set MTU to %u for port %u\n",
+				port->dev_conf.rxmode.max_rx_pkt_len - eth_overhead,
+				portid);
+	}
+
+	return 0;
+}
+
 void
 init_port_config(void)
 {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 5f23162107..2f8f5a92e4 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -1005,6 +1005,7 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue,
 			 __rte_unused void *user_param);
 void add_tx_dynf_callback(portid_t portid);
 void remove_tx_dynf_callback(portid_t portid);
+int update_jumbo_frame_offload(portid_t portid);
 
 /*
  * Work-around of a compilation error with ICC on invocations of the
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.857931744 +0000
+++ 0265-app-testpmd-fix-setting-maximum-packet-length.patch	2021-02-05 11:18:29.330701088 +0000
@@ -1 +1 @@
-From 0c4abd368880349cf9df2770b1d18890b08441ae Mon Sep 17 00:00:00 2001
+From 2e10839faa086cff8df6a6befe13e2d170625f17 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c4abd368880349cf9df2770b1d18890b08441ae ]
+
@@ -49 +50,0 @@
-Cc: stable@dpdk.org
@@ -64 +65 @@
-index c6ace2dd25..b338f5fe63 100644
+index 65042fcff5..94240c840b 100644

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

* [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' 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
                   ` (263 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' " luca.boccassi
                   ` (9 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Xiaoyun Li, 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/2f31a5ca4d6c620549ab48a2d2f361c3e92ed3fb

Thanks.

Luca Boccassi

---
From 2f31a5ca4d6c620549ab48a2d2f361c3e92ed3fb Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Mon, 25 Jan 2021 11:29:53 +0800
Subject: [PATCH] app/testpmd: avoid exit without terminal restore

[ upstream commit b3e3d602a5ff6b91dd6006328b95e78ccd513f20 ]

In interactive mode, if testpmd exit by calling rte_exit without
restore terminal attributes, terminal will not echo keyboard input.

register a function with atexit() in prompt(), when exit() in
rte_exit() is called, the registered function restores terminal
attributes.

Fixes: 5a8fb55c48ab ("app/testpmd: support unidirectional configuration")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/cmdline.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 94240c840b..5436cfbd7d 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17114,6 +17114,7 @@ cmdline_read_from_file(const char *filename)
 void
 prompt(void)
 {
+	int ret;
 	/* initialize non-constant commands */
 	cmd_set_fwd_mode_init();
 	cmd_set_fwd_retry_mode_init();
@@ -17121,15 +17122,23 @@ prompt(void)
 	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
 	if (testpmd_cl == NULL)
 		return;
+
+	ret = atexit(prompt_exit);
+	if (ret != 0)
+		printf("Cannot set exit function for cmdline\n");
+
 	cmdline_interact(testpmd_cl);
-	cmdline_stdin_exit(testpmd_cl);
+	if (ret != 0)
+		cmdline_stdin_exit(testpmd_cl);
 }
 
 void
 prompt_exit(void)
 {
-	if (testpmd_cl != NULL)
+	if (testpmd_cl != NULL) {
 		cmdline_quit(testpmd_cl);
+		cmdline_stdin_exit(testpmd_cl);
+	}
 }
 
 static void
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.912871889 +0000
+++ 0266-app-testpmd-avoid-exit-without-terminal-restore.patch	2021-02-05 11:18:29.346701392 +0000
@@ -1 +1 @@
-From b3e3d602a5ff6b91dd6006328b95e78ccd513f20 Mon Sep 17 00:00:00 2001
+From 2f31a5ca4d6c620549ab48a2d2f361c3e92ed3fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3e3d602a5ff6b91dd6006328b95e78ccd513f20 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b338f5fe63..789f35f099 100644
+index 94240c840b..5436cfbd7d 100644
@@ -26 +27 @@
-@@ -17131,6 +17131,7 @@ cmdline_read_from_file(const char *filename)
+@@ -17114,6 +17114,7 @@ cmdline_read_from_file(const char *filename)
@@ -34 +35 @@
-@@ -17138,15 +17139,23 @@ prompt(void)
+@@ -17121,15 +17122,23 @@ prompt(void)

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

* [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' 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
                   ` (264 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' " luca.boccassi
                   ` (8 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Heinrich Kuhn; +Cc: Simon Horman, Louis Peens, 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/deedace7635457819b2c51369282f307d971ab4f

Thanks.

Luca Boccassi

---
From deedace7635457819b2c51369282f307d971ab4f Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Date: Mon, 25 Jan 2021 17:25:44 +0200
Subject: [PATCH] net/nfp: read chip model from PluDevice register

[ upstream commit c0a8b0247533ccae77af853600e58565ad94b0aa ]

For newer smartNIC NVRAM versions the chip model should be read from the
PluDevice register as it provides the authoritative chip model/revision.
This method of reading the chip model is backwards compatible with
legacy NVRAM versions too.

Since the model number is purely used for reporting purposes, follow the
hardware team convention of subtracting 0x10 from the PluDevice register
to obtain the chip model/revision number.

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Louis Peens <louis.peens@netronome.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp.h     |  2 +-
 drivers/net/nfp/nfpcore/nfp_cppcore.c | 49 ++++++++++++---------------
 2 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h
index 1427954c17..08d656da14 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp.h
+++ b/drivers/net/nfp/nfpcore/nfp_cpp.h
@@ -170,7 +170,7 @@ void *nfp_cpp_priv(struct nfp_cpp *cpp);
  */
 void *nfp_cpp_area_priv(struct nfp_cpp_area *cpp_area);
 
-uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp);
+uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model);
 
 /*
  * NFP CPP core interface for CPP clients.
diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c
index dec4a8b6d1..6d629430d4 100644
--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c
+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c
@@ -22,8 +22,9 @@
 
 #define NFP_PL_DEVICE_ID                        0x00000004
 #define NFP_PL_DEVICE_ID_MASK                   0xff
-
-#define NFP6000_ARM_GCSR_SOFTMODEL0             0x00400144
+#define NFP_PL_DEVICE_PART_MASK                 0xffff0000
+#define NFP_PL_DEVICE_MODEL_MASK               (NFP_PL_DEVICE_PART_MASK | \
+						NFP_PL_DEVICE_ID_MASK)
 
 void
 nfp_cpp_priv_set(struct nfp_cpp *cpp, void *priv)
@@ -46,13 +47,18 @@ nfp_cpp_model_set(struct nfp_cpp *cpp, uint32_t model)
 uint32_t
 nfp_cpp_model(struct nfp_cpp *cpp)
 {
+	int err;
+	uint32_t model;
+
 	if (!cpp)
 		return NFP_CPP_MODEL_INVALID;
 
-	if (cpp->model == 0)
-		cpp->model = __nfp_cpp_model_autodetect(cpp);
+	err = __nfp_cpp_model_autodetect(cpp, &model);
 
-	return cpp->model;
+	if (err < 0)
+		return err;
+
+	return model;
 }
 
 void
@@ -389,9 +395,6 @@ nfp_xpb_to_cpp(struct nfp_cpp *cpp, uint32_t *xpb_addr)
 	uint32_t xpb;
 	int island;
 
-	if (!NFP_CPP_MODEL_IS_6000(cpp->model))
-		return 0;
-
 	xpb = NFP_CPP_ID(14, NFP_CPP_ACTION_RW, 0);
 
 	/*
@@ -796,29 +799,21 @@ nfp_cpp_area_fill(struct nfp_cpp_area *area, unsigned long offset,
  * as those are model-specific
  */
 uint32_t
-__nfp_cpp_model_autodetect(struct nfp_cpp *cpp)
+__nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
 {
-	uint32_t arm_id = NFP_CPP_ID(NFP_CPP_TARGET_ARM, 0, 0);
-	uint32_t model = 0;
+	uint32_t reg;
+	int err;
 
-	if (nfp_cpp_readl(cpp, arm_id, NFP6000_ARM_GCSR_SOFTMODEL0, &model))
-		return 0;
+	err = nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) + NFP_PL_DEVICE_ID,
+			    &reg);
+	if (err < 0)
+		return err;
 
-	if (NFP_CPP_MODEL_IS_6000(model)) {
-		uint32_t tmp;
+	*model = reg & NFP_PL_DEVICE_MODEL_MASK;
+	if (*model & NFP_PL_DEVICE_ID_MASK)
+		*model -= 0x10;
 
-		nfp_cpp_model_set(cpp, model);
-
-		/* The PL's PluDeviceID revision code is authoratative */
-		model &= ~0xff;
-		if (nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) +
-				   NFP_PL_DEVICE_ID, &tmp))
-			return 0;
-
-		model |= (NFP_PL_DEVICE_ID_MASK & tmp) - 0x10;
-	}
-
-	return model;
+	return 0;
 }
 
 /*
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:40.974539078 +0000
+++ 0267-net-nfp-read-chip-model-from-PluDevice-register.patch	2021-02-05 11:18:29.346701392 +0000
@@ -1 +1 @@
-From c0a8b0247533ccae77af853600e58565ad94b0aa Mon Sep 17 00:00:00 2001
+From deedace7635457819b2c51369282f307d971ab4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0a8b0247533ccae77af853600e58565ad94b0aa ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 78f7b8ca2f..720d3989e6 100644
+index 1427954c17..08d656da14 100644
@@ -40 +41 @@
-index 848c452eab..f91049383e 100644
+index dec4a8b6d1..6d629430d4 100644

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

* [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' 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
                   ` (265 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: fix Tx doorbell statistics' " luca.boccassi
                   ` (7 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Ido Segev; +Cc: Michal Krawczyk, Igor Chauskin, 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/0a6b9a2e34ae99a1df902542b05d4f3263bf0806

Thanks.

Luca Boccassi

---
From 0a6b9a2e34ae99a1df902542b05d4f3263bf0806 Mon Sep 17 00:00:00 2001
From: Ido Segev <idose@amazon.com>
Date: Tue, 26 Jan 2021 19:32:22 +0100
Subject: [PATCH] net/ena: flush Rx buffers memory pool cache

[ upstream commit 4387e81c94f4702ec2eb2037df2bfa19927309d7 ]

As the refill called as part of ena_start(), we end up the refill
progress with stuck buffers at the caller core cache.

Calling to flush the cache results with invalidate this cache and free
those stuck buffers.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Ido Segev <idose@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 20ff3653c6..516e244295 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1246,6 +1246,10 @@ static int ena_queue_start(struct ena_ring *ring)
 		PMD_INIT_LOG(ERR, "Failed to populate rx ring !");
 		return ENA_COM_FAULT;
 	}
+	/* Flush per-core RX buffers pools cache as they can be used on other
+	 * cores as well.
+	 */
+	rte_mempool_cache_flush(NULL, ring->mb_pool);
 
 	return 0;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:41.012434710 +0000
+++ 0268-net-ena-flush-Rx-buffers-memory-pool-cache.patch	2021-02-05 11:18:29.350701469 +0000
@@ -1 +1 @@
-From 4387e81c94f4702ec2eb2037df2bfa19927309d7 Mon Sep 17 00:00:00 2001
+From 0a6b9a2e34ae99a1df902542b05d4f3263bf0806 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4387e81c94f4702ec2eb2037df2bfa19927309d7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c796af4aa7..dde6e9ce8b 100644
+index 20ff3653c6..516e244295 100644

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

* [dpdk-stable] patch 'net/ena: fix Tx doorbell 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
                   ` (266 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: validate Rx req ID upon acquiring descriptor' " luca.boccassi
                   ` (6 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Amit Bernstein; +Cc: Michal Krawczyk, Igor Chauskin, 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/e48f9900d0055a9a2bf9c5b4a438c53d973d7704

Thanks.

Luca Boccassi

---
From e48f9900d0055a9a2bf9c5b4a438c53d973d7704 Mon Sep 17 00:00:00 2001
From: Amit Bernstein <amitbern@amazon.com>
Date: Tue, 26 Jan 2021 19:32:23 +0100
Subject: [PATCH] net/ena: fix Tx doorbell statistics

[ upstream commit 1f949ad90bb558d0b10756bff7bfa909ff9ff7b3 ]

Increment Tx doorbell statistics on tx_pkt_burst
after writing to doorbell and in case max burst size achieved

Fixes: c7519ea5eb8d ("net/ena: call additional doorbells if needed")

Signed-off-by: Amit Bernstein <amitbern@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 516e244295..111e830bfa 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2519,6 +2519,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
 			"llq tx max burst size of queue %d achieved, writing doorbell to send burst\n",
 			tx_ring->id);
 		ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq);
+		tx_ring->tx_stats.doorbells++;
 	}
 
 	/* prepare the packet's descriptors to dma engine */
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:41.053447219 +0000
+++ 0269-net-ena-fix-Tx-doorbell-statistics.patch	2021-02-05 11:18:29.350701469 +0000
@@ -1 +1 @@
-From 1f949ad90bb558d0b10756bff7bfa909ff9ff7b3 Mon Sep 17 00:00:00 2001
+From e48f9900d0055a9a2bf9c5b4a438c53d973d7704 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f949ad90bb558d0b10756bff7bfa909ff9ff7b3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index dde6e9ce8b..623b6dd2a0 100644
+index 516e244295..111e830bfa 100644

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

* [dpdk-stable] patch 'net/ena: validate Rx req ID upon acquiring descriptor' 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
                   ` (267 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: fix Tx doorbell statistics' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: fix Tx SQ free space assessment' " luca.boccassi
                   ` (5 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Ido Segev, Igor Chauskin, 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/97e85ace6bb679f54e034aef92099ac21501467f

Thanks.

Luca Boccassi

---
From 97e85ace6bb679f54e034aef92099ac21501467f Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 26 Jan 2021 19:32:24 +0100
Subject: [PATCH] net/ena: validate Rx req ID upon acquiring descriptor

[ upstream commit 05cffdcfa0f1940e0b2c5495aa7194c474cfe197 ]

Instead of verifying the Rx descriptor each time it's being used in the
driver code, now the verification happens on the HAL side.

This simplifies code a lot as instead of doing 2 validations, only
single one is needed. The driver have to check the rc value returned
by the ena_com upon reading the Rx descriptor and trigger the reset
if needed. It was previously the responsibility of the
validate_rx_req_id() function.

As part of the change, the version of the driver was bumped to v2.2.1.

Fixes: 2061fe41f212 ("net/ena: linearize Tx mbuf")

Signed-off-by: Ido Segev <idose@amazon.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
---
 drivers/net/ena/base/ena_eth_com.c   |  3 +++
 drivers/net/ena/base/ena_plat_dpdk.h |  1 +
 drivers/net/ena/ena_ethdev.c         | 38 ++++++++--------------------
 3 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/drivers/net/ena/base/ena_eth_com.c b/drivers/net/ena/base/ena_eth_com.c
index a35d92fbd3..5583a310a1 100644
--- a/drivers/net/ena/base/ena_eth_com.c
+++ b/drivers/net/ena/base/ena_eth_com.c
@@ -531,6 +531,7 @@ int ena_com_rx_pkt(struct ena_com_io_cq *io_cq,
 {
 	struct ena_com_rx_buf_info *ena_buf = &ena_rx_ctx->ena_bufs[0];
 	struct ena_eth_io_rx_cdesc_base *cdesc = NULL;
+	u16 q_depth = io_cq->q_depth;
 	u16 cdesc_idx = 0;
 	u16 nb_hw_desc;
 	u16 i = 0;
@@ -559,6 +560,8 @@ int ena_com_rx_pkt(struct ena_com_io_cq *io_cq,
 	do {
 		ena_buf[i].len = cdesc->length;
 		ena_buf[i].req_id = cdesc->req_id;
+		if (unlikely(ena_buf[i].req_id >= q_depth))
+			return ENA_COM_EIO;
 
 		if (++i >= nb_hw_desc)
 			break;
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 48c77f0c19..a1d749f83f 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -51,6 +51,7 @@ typedef uint64_t dma_addr_t;
 #define ENA_COM_FAULT	-EFAULT
 #define ENA_COM_TRY_AGAIN	-EAGAIN
 #define ENA_COM_UNSUPPORTED    -EOPNOTSUPP
+#define ENA_COM_EIO    -EIO
 
 #define ____cacheline_aligned __rte_cache_aligned
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 111e830bfa..9ee9de6eb9 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -28,7 +28,7 @@
 
 #define DRV_MODULE_VER_MAJOR	2
 #define DRV_MODULE_VER_MINOR	2
-#define DRV_MODULE_VER_SUBMINOR	0
+#define DRV_MODULE_VER_SUBMINOR	1
 
 #define ENA_IO_TXQ_IDX(q)	(2 * (q))
 #define ENA_IO_RXQ_IDX(q)	(2 * (q) + 1)
@@ -380,20 +380,6 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
 	}
 }
 
-static inline int validate_rx_req_id(struct ena_ring *rx_ring, uint16_t req_id)
-{
-	if (likely(req_id < rx_ring->ring_size))
-		return 0;
-
-	PMD_DRV_LOG(ERR, "Invalid rx req_id: %hu\n", req_id);
-
-	rx_ring->adapter->reset_reason = ENA_REGS_RESET_INV_RX_REQ_ID;
-	rx_ring->adapter->trigger_reset = true;
-	++rx_ring->rx_stats.bad_req_id;
-
-	return -EFAULT;
-}
-
 static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
 {
 	struct ena_tx_buffer *tx_info = NULL;
@@ -1486,10 +1472,6 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
 			rte_prefetch0(mbufs[i + 4]);
 
 		req_id = rxq->empty_rx_reqs[next_to_use];
-		rc = validate_rx_req_id(rxq, req_id);
-		if (unlikely(rc))
-			break;
-
 		rx_info = &rxq->rx_buffer_info[req_id];
 
 		rc = ena_add_single_rx_desc(rxq->ena_com_io_sq, mbuf, req_id);
@@ -2114,8 +2096,6 @@ static struct rte_mbuf *ena_rx_mbuf(struct ena_ring *rx_ring,
 
 	len = ena_bufs[buf].len;
 	req_id = ena_bufs[buf].req_id;
-	if (unlikely(validate_rx_req_id(rx_ring, req_id)))
-		return NULL;
 
 	rx_info = &rx_ring->rx_buffer_info[req_id];
 
@@ -2139,10 +2119,6 @@ static struct rte_mbuf *ena_rx_mbuf(struct ena_ring *rx_ring,
 		++buf;
 		len = ena_bufs[buf].len;
 		req_id = ena_bufs[buf].req_id;
-		if (unlikely(validate_rx_req_id(rx_ring, req_id))) {
-			rte_mbuf_raw_free(mbuf_head);
-			return NULL;
-		}
 
 		rx_info = &rx_ring->rx_buffer_info[req_id];
 		RTE_ASSERT(rx_info->mbuf != NULL);
@@ -2230,10 +2206,16 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 				    &ena_rx_ctx);
 		if (unlikely(rc)) {
 			PMD_DRV_LOG(ERR, "ena_com_rx_pkt error %d\n", rc);
-			rx_ring->adapter->reset_reason =
-				ENA_REGS_RESET_TOO_MANY_RX_DESCS;
+			if (rc == ENA_COM_NO_SPACE) {
+				++rx_ring->rx_stats.bad_desc_num;
+				rx_ring->adapter->reset_reason =
+					ENA_REGS_RESET_TOO_MANY_RX_DESCS;
+			} else {
+				++rx_ring->rx_stats.bad_req_id;
+				rx_ring->adapter->reset_reason =
+					ENA_REGS_RESET_INV_RX_REQ_ID;
+			}
 			rx_ring->adapter->trigger_reset = true;
-			++rx_ring->rx_stats.bad_desc_num;
 			return 0;
 		}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:41.095524635 +0000
+++ 0270-net-ena-validate-Rx-req-ID-upon-acquiring-descriptor.patch	2021-02-05 11:18:29.354701545 +0000
@@ -1 +1 @@
-From 05cffdcfa0f1940e0b2c5495aa7194c474cfe197 Mon Sep 17 00:00:00 2001
+From 97e85ace6bb679f54e034aef92099ac21501467f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 05cffdcfa0f1940e0b2c5495aa7194c474cfe197 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -63 +64 @@
-index 623b6dd2a0..1728ceb9a8 100644
+index 111e830bfa..9ee9de6eb9 100644

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

* [dpdk-stable] patch 'net/ena: fix Tx SQ free space assessment' 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
                   ` (268 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: validate Rx req ID upon acquiring descriptor' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: prevent double doorbell' " luca.boccassi
                   ` (4 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Igor Chauskin; +Cc: Michal Krawczyk, 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/bde94e82f559ad767ed000945ba1dc04779ce973

Thanks.

Luca Boccassi

---
From bde94e82f559ad767ed000945ba1dc04779ce973 Mon Sep 17 00:00:00 2001
From: Igor Chauskin <igorch@amazon.com>
Date: Tue, 26 Jan 2021 19:32:25 +0100
Subject: [PATCH] net/ena: fix Tx SQ free space assessment

[ upstream commit 8a90f3d8d09b5fa2e7a6a7b83b8e4868acebbe01 ]

Before starting transmission of Tx burst, the driver checked the
available space in the sq and limited the number of packets for
transmission accordingly.
The calculation was incorrect for fragmented packets and potentially had
significantly limited the length of Tx bursts.

This patch removes the assessment and pushes packets to the sq as long
as the burst is not exhausted and space is available in the sq.

Correct evaluation of the required space isn't possible before the burst
because it depends on the number of segments of each packet.
This patch adds per-packet space evaluation for each packet before
attempting to process it. In case there is not enough queue space, the
burst will just stop without error.

Fixes: 2061fe41f212 ("net/ena: linearize Tx mbuf")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 9ee9de6eb9..4083568d5d 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2359,8 +2359,8 @@ static void ena_update_hints(struct ena_adapter *adapter,
 	}
 }
 
-static int ena_check_and_linearize_mbuf(struct ena_ring *tx_ring,
-					struct rte_mbuf *mbuf)
+static int ena_check_space_and_linearize_mbuf(struct ena_ring *tx_ring,
+					      struct rte_mbuf *mbuf)
 {
 	struct ena_com_dev *ena_dev;
 	int num_segments, header_len, rc;
@@ -2370,13 +2370,21 @@ static int ena_check_and_linearize_mbuf(struct ena_ring *tx_ring,
 	header_len = mbuf->data_len;
 
 	if (likely(num_segments < tx_ring->sgl_size))
-		return 0;
+		goto checkspace;
 
 	if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV &&
 	    (num_segments == tx_ring->sgl_size) &&
 	    (header_len < tx_ring->tx_max_header_size))
-		return 0;
+		goto checkspace;
 
+	/* Checking for space for 2 additional metadata descriptors due to
+	 * possible header split and metadata descriptor. Linearization will
+	 * be needed so we reduce the segments number from num_segments to 1
+	 */
+	if (!ena_com_sq_have_enough_space(tx_ring->ena_com_io_sq, 3)) {
+		PMD_DRV_LOG(DEBUG, "Not enough space in the tx queue\n");
+		return ENA_COM_NO_MEM;
+	}
 	++tx_ring->tx_stats.linearize;
 	rc = rte_pktmbuf_linearize(mbuf);
 	if (unlikely(rc)) {
@@ -2386,7 +2394,19 @@ static int ena_check_and_linearize_mbuf(struct ena_ring *tx_ring,
 		return rc;
 	}
 
-	return rc;
+	return 0;
+
+checkspace:
+	/* Checking for space for 2 additional metadata descriptors due to
+	 * possible header split and metadata descriptor
+	 */
+	if (!ena_com_sq_have_enough_space(tx_ring->ena_com_io_sq,
+					  num_segments + 2)) {
+		PMD_DRV_LOG(DEBUG, "Not enough space in the tx queue\n");
+		return ENA_COM_NO_MEM;
+	}
+
+	return 0;
 }
 
 static void ena_tx_map_mbuf(struct ena_ring *tx_ring,
@@ -2473,7 +2493,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
 	int nb_hw_desc;
 	int rc;
 
-	rc = ena_check_and_linearize_mbuf(tx_ring, mbuf);
+	rc = ena_check_space_and_linearize_mbuf(tx_ring, mbuf);
 	if (unlikely(rc))
 		return rc;
 
@@ -2580,9 +2600,6 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		return 0;
 	}
 
-	nb_pkts = RTE_MIN(ena_com_free_q_entries(tx_ring->ena_com_io_sq),
-		nb_pkts);
-
 	for (sent_idx = 0; sent_idx < nb_pkts; sent_idx++) {
 		if (ena_xmit_mbuf(tx_ring, tx_pkts[sent_idx]))
 			break;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:41.141838816 +0000
+++ 0271-net-ena-fix-Tx-SQ-free-space-assessment.patch	2021-02-05 11:18:29.358701621 +0000
@@ -1 +1 @@
-From 8a90f3d8d09b5fa2e7a6a7b83b8e4868acebbe01 Mon Sep 17 00:00:00 2001
+From bde94e82f559ad767ed000945ba1dc04779ce973 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a90f3d8d09b5fa2e7a6a7b83b8e4868acebbe01 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 1728ceb9a8..8a937d7f27 100644
+index 9ee9de6eb9..4083568d5d 100644

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

* [dpdk-stable] patch 'net/ena: prevent double doorbell' 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
                   ` (269 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: fix Tx SQ free space assessment' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' " luca.boccassi
                   ` (3 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Igor Chauskin; +Cc: Michal Krawczyk, 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/0eedd3ea60fd71e7235eafb2bd676966c054ea10

Thanks.

Luca Boccassi

---
From 0eedd3ea60fd71e7235eafb2bd676966c054ea10 Mon Sep 17 00:00:00 2001
From: Igor Chauskin <igorch@amazon.com>
Date: Tue, 26 Jan 2021 19:32:26 +0100
Subject: [PATCH] net/ena: prevent double doorbell

[ upstream commit 1d973d8f4c149523a15c1c0813f204bb89d4e588 ]

Add per-tx-ring flag for packets that were pushed to HW but await
doorbell. That is to prevent a situation when a doorbell is sent due to
reaching Tx burst threshold and next send fails (e.g., due to queue
full). In such case we shouldn't send another doorbell because there are
no actual packets waiting for transmission.

Fixes: c7519ea5eb8d ("net/ena: call additional doorbells if needed")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 7 +++++--
 drivers/net/ena/ena_ethdev.h | 4 ++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 4083568d5d..8baec80040 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1282,6 +1282,7 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
 	txq->ring_size = nb_desc;
 	txq->size_mask = nb_desc - 1;
 	txq->numa_socket_id = socket_id;
+	txq->pkts_without_db = false;
 
 	txq->tx_buffer_info = rte_zmalloc("txq->tx_buffer_info",
 					  sizeof(struct ena_tx_buffer) *
@@ -2522,6 +2523,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
 			tx_ring->id);
 		ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq);
 		tx_ring->tx_stats.doorbells++;
+		tx_ring->pkts_without_db = false;
 	}
 
 	/* prepare the packet's descriptors to dma engine */
@@ -2603,7 +2605,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	for (sent_idx = 0; sent_idx < nb_pkts; sent_idx++) {
 		if (ena_xmit_mbuf(tx_ring, tx_pkts[sent_idx]))
 			break;
-
+		tx_ring->pkts_without_db = true;
 		rte_prefetch0(tx_pkts[ENA_IDX_ADD_MASKED(sent_idx, 4,
 			tx_ring->size_mask)]);
 	}
@@ -2612,10 +2614,11 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		ena_com_free_q_entries(tx_ring->ena_com_io_sq);
 
 	/* If there are ready packets to be xmitted... */
-	if (sent_idx > 0) {
+	if (likely(tx_ring->pkts_without_db)) {
 		/* ...let HW do its best :-) */
 		ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq);
 		tx_ring->tx_stats.doorbells++;
+		tx_ring->pkts_without_db = false;
 	}
 
 	ena_tx_cleanup(tx_ring);
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index 7bb74a1d06..ae235897ee 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -100,6 +100,10 @@ struct ena_ring {
 
 	enum ena_ring_type type;
 	enum ena_admin_placement_policy_type tx_mem_queue_type;
+
+	/* Indicate there are Tx packets pushed to the device and wait for db */
+	bool pkts_without_db;
+
 	/* Holds the empty requests for TX/RX OOO completions */
 	union {
 		uint16_t *empty_tx_reqs;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:41.185024559 +0000
+++ 0272-net-ena-prevent-double-doorbell.patch	2021-02-05 11:18:29.358701621 +0000
@@ -1 +1 @@
-From 1d973d8f4c149523a15c1c0813f204bb89d4e588 Mon Sep 17 00:00:00 2001
+From 0eedd3ea60fd71e7235eafb2bd676966c054ea10 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d973d8f4c149523a15c1c0813f204bb89d4e588 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 8a937d7f27..7acbf5e305 100644
+index 4083568d5d..8baec80040 100644

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

* [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' 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
                   ` (270 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: prevent double doorbell' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: fix queue reconfig request on Rx split update' " luca.boccassi
                   ` (2 subsequent siblings)
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Beilei Xing, 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/8ead7e57f6dbf8eabc6f84d817c02af064ffc5d7

Thanks.

Luca Boccassi

---
From 8ead7e57f6dbf8eabc6f84d817c02af064ffc5d7 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Thu, 28 Jan 2021 23:00:21 +0800
Subject: [PATCH] net/iavf: fix vector mapping with queue

[ upstream commit b08728b4a001822d71e0a88487c3814c60a502c9 ]

Fix the vector mapping with queue by changing the recircle when
exceeds RX_VEC_START + nb_msix;

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 2a8b47c127..ed69ba483e 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -572,15 +572,15 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 			/* If Rx interrupt is reuquired, and we can use
 			 * multi interrupts, then the vec is from 1
 			 */
-			vf->nb_msix = RTE_MIN(vf->vf_res->max_vectors,
-					      intr_handle->nb_efd);
+			vf->nb_msix = RTE_MIN(intr_handle->nb_efd,
+				 (uint16_t)(vf->vf_res->max_vectors - 1));
 			vf->msix_base = IAVF_RX_VEC_START;
 			vec = IAVF_RX_VEC_START;
 			for (i = 0; i < dev->data->nb_rx_queues; i++) {
 				qv_map[i].queue_id = i;
 				qv_map[i].vector_id = vec;
 				intr_handle->intr_vec[i] = vec++;
-				if (vec >= vf->nb_msix)
+				if (vec >= vf->nb_msix + IAVF_RX_VEC_START)
 					vec = IAVF_RX_VEC_START;
 			}
 			vf->qv_map = qv_map;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:41.225721555 +0000
+++ 0273-net-iavf-fix-vector-mapping-with-queue.patch	2021-02-05 11:18:29.362701697 +0000
@@ -1 +1 @@
-From b08728b4a001822d71e0a88487c3814c60a502c9 Mon Sep 17 00:00:00 2001
+From 8ead7e57f6dbf8eabc6f84d817c02af064ffc5d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b08728b4a001822d71e0a88487c3814c60a502c9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5309427082..b20657221a 100644
+index 2a8b47c127..ed69ba483e 100644
@@ -22 +23 @@
-@@ -610,15 +610,15 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -572,15 +572,15 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'app/testpmd: fix queue reconfig request on Rx split update' 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
                   ` (271 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' " luca.boccassi
@ 2021-02-05 11:19 ` luca.boccassi
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
  2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
  274 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-05 11:19 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +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/61593e139ef88379decb94fb18a9fd4c4ebaae0a

Thanks.

Luca Boccassi

---
From 61593e139ef88379decb94fb18a9fd4c4ebaae0a Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Thu, 21 Jan 2021 12:46:33 +0000
Subject: [PATCH] app/testpmd: fix queue reconfig request on Rx split update

[ upstream commit 293ca0aaafaaed4b0ff96f5fec30fbd54f8e9cb3 ]

There is the "set rxpkts" command in the testpmd interactive mode,
it configures the segment sizes to split the packet on receiving.
The mentioned segment sizes are provided on the Rx queue setup
as part of queue configuration. Hence, to take the rxpkts command
into effect the Rx queues must be explicitly reconfigured.

The explained above is related to the "set rxoffs" as well.

The patch sets the queue reconfiguration request flag for
all devices once Rx split settings are updated, to take
the changes into effect the port(s) should be restarted.

Fixes: 0f2096d7ab36 ("app/testpmd: add rxpkts commands and parameters")
Fixes: 91c78e090eed ("app/testpmd: add rxoffs commands and parameters")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5436cfbd7d..2b9dd3e1f4 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3789,6 +3789,7 @@ cmd_set_rxoffs_parsed(void *parsed_result,
 				  MAX_SEGS_BUFFER_SPLIT, seg_offsets, 0);
 	if (nb_segs > 0)
 		set_rx_pkt_offsets(seg_offsets, nb_segs);
+	cmd_reconfig_device_queue(RTE_PORT_ALL, 0, 1);
 }
 
 cmdline_parse_token_string_t cmd_set_rxoffs_keyword =
@@ -3835,6 +3836,7 @@ cmd_set_rxpkts_parsed(void *parsed_result,
 				  MAX_SEGS_BUFFER_SPLIT, seg_lengths, 0);
 	if (nb_segs > 0)
 		set_rx_pkt_segments(seg_lengths, nb_segs);
+	cmd_reconfig_device_queue(RTE_PORT_ALL, 0, 1);
 }
 
 cmdline_parse_token_string_t cmd_set_rxpkts_keyword =
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:41.259420898 +0000
+++ 0274-app-testpmd-fix-queue-reconfig-request-on-Rx-split-u.patch	2021-02-05 11:18:29.378702002 +0000
@@ -1 +1 @@
-From 293ca0aaafaaed4b0ff96f5fec30fbd54f8e9cb3 Mon Sep 17 00:00:00 2001
+From 61593e139ef88379decb94fb18a9fd4c4ebaae0a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 293ca0aaafaaed4b0ff96f5fec30fbd54f8e9cb3 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 789f35f099..59722d268b 100644
+index 5436cfbd7d..2b9dd3e1f4 100644
@@ -32 +33 @@
-@@ -3791,6 +3791,7 @@ cmd_set_rxoffs_parsed(void *parsed_result,
+@@ -3789,6 +3789,7 @@ cmd_set_rxoffs_parsed(void *parsed_result,
@@ -40 +41 @@
-@@ -3837,6 +3838,7 @@ cmd_set_rxpkts_parsed(void *parsed_result,
+@@ -3835,6 +3836,7 @@ cmd_set_rxpkts_parsed(void *parsed_result,

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

* [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' 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
                   ` (272 preceding siblings ...)
  2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: fix queue reconfig request on Rx split update' " luca.boccassi
@ 2021-02-09 10:34 ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix shared RSS translation and cleanup' " luca.boccassi
                     ` (29 more replies)
  2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
  274 siblings, 30 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:34 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/11/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/42f7f70176ac78335f522fcdd7b15e613bfbddd9

Thanks.

Luca Boccassi

---
From 42f7f70176ac78335f522fcdd7b15e613bfbddd9 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 29 Jan 2021 13:07:09 -0500
Subject: [PATCH] net/bnxt: fix Rx completion ring size calculation

[ upstream commit 8e18a019c1fc942321e5fe4529edfc793a4f0d2a ]

The size of the receive completion ring should be recalculated
when MTU is increased to a size that requires scattered receive
or when LRO is enabled. Move logic for this calculation from
the ring configuration path to the device start path.
   - Made size calculation dependent only on scattered_rx
     status.
   - Moved calculation of scattered_rx up in the initialization
     sequence.
   - Made LRO offload status part of scattered_rx calculation.

When the completion ring size is too small, completion overflows
can occur causing the ring to be disabled in hardware.

Fixes: 04067844a3e9 ("net/bnxt: reduce CQ queue size without aggregation ring")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 12 ++++++++----
 drivers/net/bnxt/bnxt_ring.c   | 22 ++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxr.c    | 15 +--------------
 3 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index a4a31f224f..3aa346d45c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1147,6 +1147,9 @@ static int bnxt_scattered_rx(struct rte_eth_dev *eth_dev)
 	if (eth_dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER)
 		return 1;
 
+	if (eth_dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_TCP_LRO)
+		return 1;
+
 	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
 		struct bnxt_rx_queue *rxq = eth_dev->data->rx_queues[i];
 
@@ -1395,11 +1398,12 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 
 	bnxt_enable_int(bp);
 
-	rc = bnxt_start_nic(bp);
-	if (rc)
-		goto error;
-
 	eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
+
+	rc = bnxt_start_nic(bp);
+	if (rc)
+		goto error;
+
 	eth_dev->data->dev_started = 1;
 
 	bnxt_link_update_op(eth_dev, 1);
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index aeb6cb6150..94cf7d3de2 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -568,6 +568,17 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 	struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
 	int rc;
 
+	/*
+	 * Storage for the cp ring is allocated based on worst-case
+	 * usage, the actual size to be used by hw is computed here.
+	 */
+	cp_ring->ring_size = rxr->rx_ring_struct->ring_size * 2;
+
+	if (bp->eth_dev->data->scattered_rx)
+		cp_ring->ring_size *= AGG_RING_SIZE_FACTOR;
+
+	cp_ring->ring_mask = cp_ring->ring_size - 1;
+
 	rc = bnxt_alloc_cmpl_ring(bp, queue_index, cpr);
 	if (rc)
 		goto err_out;
@@ -679,6 +690,17 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
 		struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
 		struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
 
+		/*
+		 * Storage for the cp ring is allocated based on worst-case
+		 * usage, the actual size to be used by hw is computed here.
+		 */
+		cp_ring->ring_size = rxr->rx_ring_struct->ring_size * 2;
+
+		if (bp->eth_dev->data->scattered_rx)
+			cp_ring->ring_size *= AGG_RING_SIZE_FACTOR;
+
+		cp_ring->ring_mask = cp_ring->ring_size - 1;
+
 		if (bnxt_alloc_cmpl_ring(bp, i, cpr))
 			goto err_out;
 
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index ddb1021251..b28b7fb561 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1040,12 +1040,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
 
 int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
 {
-	struct rte_eth_dev *eth_dev = rxq->bp->eth_dev;
-	struct rte_eth_rxmode *rxmode;
 	struct bnxt_cp_ring_info *cpr;
 	struct bnxt_rx_ring_info *rxr;
 	struct bnxt_ring *ring;
-	bool use_agg_ring;
 
 	rxq->rx_buf_size = BNXT_MAX_PKT_LEN + sizeof(struct rte_mbuf);
 
@@ -1088,19 +1085,9 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
 		return -ENOMEM;
 	cpr->cp_ring_struct = ring;
 
-	rxmode = &eth_dev->data->dev_conf.rxmode;
-	use_agg_ring = (rxmode->offloads & DEV_RX_OFFLOAD_SCATTER) ||
-		       (rxmode->offloads & DEV_RX_OFFLOAD_TCP_LRO) ||
-		       (rxmode->max_rx_pkt_len >
-			 (uint32_t)(rte_pktmbuf_data_room_size(rxq->mb_pool) -
-				    RTE_PKTMBUF_HEADROOM));
-
 	/* Allocate two completion slots per entry in desc ring. */
 	ring->ring_size = rxr->rx_ring_struct->ring_size * 2;
-
-	/* Allocate additional slots if aggregation ring is in use. */
-	if (use_agg_ring)
-		ring->ring_size *= AGG_RING_SIZE_FACTOR;
+	ring->ring_size *= AGG_RING_SIZE_FACTOR;
 
 	ring->ring_size = rte_align32pow2(ring->ring_size);
 	ring->ring_mask = ring->ring_size - 1;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:57.978611773 +0000
+++ 0001-net-bnxt-fix-Rx-completion-ring-size-calculation.patch	2021-02-09 10:34:57.818582221 +0000
@@ -1 +1 @@
-From 8e18a019c1fc942321e5fe4529edfc793a4f0d2a Mon Sep 17 00:00:00 2001
+From 42f7f70176ac78335f522fcdd7b15e613bfbddd9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e18a019c1fc942321e5fe4529edfc793a4f0d2a ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 4b76cd5591..22c880c5c3 100644
+index a4a31f224f..3aa346d45c 100644
@@ -34 +35 @@
-@@ -1143,6 +1143,9 @@ static int bnxt_scattered_rx(struct rte_eth_dev *eth_dev)
+@@ -1147,6 +1147,9 @@ static int bnxt_scattered_rx(struct rte_eth_dev *eth_dev)
@@ -44 +45 @@
-@@ -1418,11 +1421,12 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -1395,11 +1398,12 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
@@ -62 +63 @@
-index 4e513244a6..ba23c1fa03 100644
+index aeb6cb6150..94cf7d3de2 100644
@@ -65 +66 @@
-@@ -583,6 +583,17 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -568,6 +568,17 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
@@ -83 +84 @@
-@@ -693,6 +704,17 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
+@@ -679,6 +690,17 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
@@ -102 +103 @@
-index 8c2781c968..4674f7cea2 100644
+index ddb1021251..b28b7fb561 100644
@@ -105 +106 @@
-@@ -1116,12 +1116,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
+@@ -1040,12 +1040,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
@@ -118 +119 @@
-@@ -1164,19 +1161,9 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
+@@ -1088,19 +1085,9 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)

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

* [dpdk-stable] patch 'net/mlx5: fix shared RSS translation and cleanup' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' " luca.boccassi
                     ` (28 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/1fe06255a79e669f4cfcdb3633cc81aac56e2c2d

Thanks.

Luca Boccassi

---
From 1fe06255a79e669f4cfcdb3633cc81aac56e2c2d Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Mon, 1 Feb 2021 11:28:57 +0200
Subject: [PATCH] net/mlx5: fix shared RSS translation and cleanup

[ upstream commit c83456cdd7953e0659d13dcf0affc39bf76ef460 ]

This patch includes several updates of the shared RSS action:

(1)
The shared RSS action, introduced recently, uses existing definitions
of the regular RSS action.
The new defined value MLX5_RSS_HASH_IPV4_TCP uses existing definition
IBV_RX_HASH_SRC_PORT_TCP twice, instead of using
IBV_RX_HASH_SRC_PORT_TCP and IBV_RX_HASH_DST_PORT_TCP.
            ---                          ---
The same is true for IPv4-UDP, IPv6-TCP, IPv6-UDP.
As result, a shared RSS action with L4 type is specified as src-only.
Flow rule using such shared action, while specifying L4 item in flow
pattern, will fail to create.
This patch updates the new definitions, to use the existing values
correctly.

(2)
On shared RSS action destroy, in function __flow_dv_action_rss_release,
the indirection table shared_rss->ind_tbl was released before
shared_rss->refcnt was checked.
This order is incorrect, since the indirection table should be
released only when the shared RSS action is destroyed.
This patch puts release function calls in correct order.

(3)
Variables declared of type "struct mlx5_shared_action_rss" are named
"shared_rss", "action", and "shared_action".
To improve code readability, this patch renames all to "shared_rss".

Fixes: d7cfcddded61 ("net/mlx5: translate shared action for RSS action")
Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    |  4 +-
 drivers/net/mlx5/mlx5_flow.h    |  8 ++--
 drivers/net/mlx5/mlx5_flow_dv.c | 80 ++++++++++++++++-----------------
 3 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index ba9a90210f..cda3ca557c 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7177,12 +7177,12 @@ mlx5_shared_action_flush(struct rte_eth_dev *dev)
 {
 	struct rte_flow_error error;
 	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_shared_action_rss *action;
+	struct mlx5_shared_action_rss *shared_rss;
 	int ret = 0;
 	uint32_t idx;
 
 	ILIST_FOREACH(priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS],
-		      priv->rss_shared_actions, idx, action, next) {
+		      priv->rss_shared_actions, idx, shared_rss, next) {
 		ret |= mlx5_shared_action_destroy(dev,
 		       (struct rte_flow_shared_action *)(uintptr_t)idx, &error);
 	}
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index e0211fb2dd..91f48923c0 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1048,17 +1048,17 @@ struct rte_flow {
 #define MLX5_RSS_HASH_IPV4 (IBV_RX_HASH_SRC_IPV4 | IBV_RX_HASH_DST_IPV4)
 #define MLX5_RSS_HASH_IPV4_TCP \
 	(MLX5_RSS_HASH_IPV4 | \
-	 IBV_RX_HASH_SRC_PORT_TCP | IBV_RX_HASH_SRC_PORT_TCP)
+	 IBV_RX_HASH_SRC_PORT_TCP | IBV_RX_HASH_DST_PORT_TCP)
 #define MLX5_RSS_HASH_IPV4_UDP \
 	(MLX5_RSS_HASH_IPV4 | \
-	 IBV_RX_HASH_SRC_PORT_UDP | IBV_RX_HASH_SRC_PORT_UDP)
+	 IBV_RX_HASH_SRC_PORT_UDP | IBV_RX_HASH_DST_PORT_UDP)
 #define MLX5_RSS_HASH_IPV6 (IBV_RX_HASH_SRC_IPV6 | IBV_RX_HASH_DST_IPV6)
 #define MLX5_RSS_HASH_IPV6_TCP \
 	(MLX5_RSS_HASH_IPV6 | \
-	 IBV_RX_HASH_SRC_PORT_TCP | IBV_RX_HASH_SRC_PORT_TCP)
+	 IBV_RX_HASH_SRC_PORT_TCP | IBV_RX_HASH_DST_PORT_TCP)
 #define MLX5_RSS_HASH_IPV6_UDP \
 	(MLX5_RSS_HASH_IPV6 | \
-	 IBV_RX_HASH_SRC_PORT_UDP | IBV_RX_HASH_SRC_PORT_UDP)
+	 IBV_RX_HASH_SRC_PORT_UDP | IBV_RX_HASH_DST_PORT_UDP)
 #define MLX5_RSS_HASH_NONE 0ULL
 
 /* array of valid combinations of RX Hash fields for RSS */
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 32065efa41..7a1de50efa 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11371,10 +11371,10 @@ __flow_dv_hrxqs_release(struct rte_eth_dev *dev,
  */
 static int
 __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
-				 struct mlx5_shared_action_rss *action)
+				 struct mlx5_shared_action_rss *shared_rss)
 {
-	return __flow_dv_hrxqs_release(dev, &action->hrxq) +
-		__flow_dv_hrxqs_release(dev, &action->hrxq_tunnel);
+	return __flow_dv_hrxqs_release(dev, &shared_rss->hrxq) +
+		__flow_dv_hrxqs_release(dev, &shared_rss->hrxq_tunnel);
 }
 
 /**
@@ -11398,25 +11398,25 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
 static int
 __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
 			   uint32_t action_idx,
-			   struct mlx5_shared_action_rss *action,
+			   struct mlx5_shared_action_rss *shared_rss,
 			   struct rte_flow_error *error)
 {
 	struct mlx5_flow_rss_desc rss_desc = { 0 };
 	size_t i;
 	int err;
 
-	if (mlx5_ind_table_obj_setup(dev, action->ind_tbl)) {
+	if (mlx5_ind_table_obj_setup(dev, shared_rss->ind_tbl)) {
 		return rte_flow_error_set(error, rte_errno,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
 					  "cannot setup indirection table");
 	}
-	memcpy(rss_desc.key, action->origin.key, MLX5_RSS_HASH_KEY_LEN);
+	memcpy(rss_desc.key, shared_rss->origin.key, MLX5_RSS_HASH_KEY_LEN);
 	rss_desc.key_len = MLX5_RSS_HASH_KEY_LEN;
-	rss_desc.const_q = action->origin.queue;
-	rss_desc.queue_num = action->origin.queue_num;
+	rss_desc.const_q = shared_rss->origin.queue;
+	rss_desc.queue_num = shared_rss->origin.queue_num;
 	/* Set non-zero value to indicate a shared RSS. */
 	rss_desc.shared_rss = action_idx;
-	rss_desc.ind_tbl = action->ind_tbl;
+	rss_desc.ind_tbl = shared_rss->ind_tbl;
 	for (i = 0; i < MLX5_RSS_HASH_FIELDS_LEN; i++) {
 		uint32_t hrxq_idx;
 		uint64_t hash_fields = mlx5_rss_hash_fields[i];
@@ -11434,16 +11434,16 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
 				goto error_hrxq_new;
 			}
 			err = __flow_dv_action_rss_hrxq_set
-				(action, hash_fields, tunnel, hrxq_idx);
+				(shared_rss, hash_fields, tunnel, hrxq_idx);
 			MLX5_ASSERT(!err);
 		}
 	}
 	return 0;
 error_hrxq_new:
 	err = rte_errno;
-	__flow_dv_action_rss_hrxqs_release(dev, action);
-	if (!mlx5_ind_table_obj_release(dev, action->ind_tbl, true))
-		action->ind_tbl = NULL;
+	__flow_dv_action_rss_hrxqs_release(dev, shared_rss);
+	if (!mlx5_ind_table_obj_release(dev, shared_rss->ind_tbl, true))
+		shared_rss->ind_tbl = NULL;
 	rte_errno = err;
 	return -rte_errno;
 }
@@ -11472,7 +11472,7 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
 			    struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_shared_action_rss *shared_action = NULL;
+	struct mlx5_shared_action_rss *shared_rss = NULL;
 	void *queue = NULL;
 	struct rte_flow_action_rss *origin;
 	const uint8_t *rss_key;
@@ -11482,9 +11482,9 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
 	RTE_SET_USED(conf);
 	queue = mlx5_malloc(0, RTE_ALIGN_CEIL(queue_size, sizeof(void *)),
 			    0, SOCKET_ID_ANY);
-	shared_action = mlx5_ipool_zmalloc
+	shared_rss = mlx5_ipool_zmalloc
 			 (priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS], &idx);
-	if (!shared_action || !queue) {
+	if (!shared_rss || !queue) {
 		rte_flow_error_set(error, ENOMEM,
 				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
 				   "cannot allocate resource memory");
@@ -11496,43 +11496,43 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
 				   "rss action number out of range");
 		goto error_rss_init;
 	}
-	shared_action->ind_tbl = mlx5_malloc(MLX5_MEM_ZERO,
-					     sizeof(*shared_action->ind_tbl),
-					     0, SOCKET_ID_ANY);
-	if (!shared_action->ind_tbl) {
+	shared_rss->ind_tbl = mlx5_malloc(MLX5_MEM_ZERO,
+					  sizeof(*shared_rss->ind_tbl),
+					  0, SOCKET_ID_ANY);
+	if (!shared_rss->ind_tbl) {
 		rte_flow_error_set(error, ENOMEM,
 				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
 				   "cannot allocate resource memory");
 		goto error_rss_init;
 	}
 	memcpy(queue, rss->queue, queue_size);
-	shared_action->ind_tbl->queues = queue;
-	shared_action->ind_tbl->queues_n = rss->queue_num;
-	origin = &shared_action->origin;
+	shared_rss->ind_tbl->queues = queue;
+	shared_rss->ind_tbl->queues_n = rss->queue_num;
+	origin = &shared_rss->origin;
 	origin->func = rss->func;
 	origin->level = rss->level;
 	/* RSS type 0 indicates default RSS type (ETH_RSS_IP). */
 	origin->types = !rss->types ? ETH_RSS_IP : rss->types;
 	/* NULL RSS key indicates default RSS key. */
 	rss_key = !rss->key ? rss_hash_default_key : rss->key;
-	memcpy(shared_action->key, rss_key, MLX5_RSS_HASH_KEY_LEN);
-	origin->key = &shared_action->key[0];
+	memcpy(shared_rss->key, rss_key, MLX5_RSS_HASH_KEY_LEN);
+	origin->key = &shared_rss->key[0];
 	origin->key_len = MLX5_RSS_HASH_KEY_LEN;
 	origin->queue = queue;
 	origin->queue_num = rss->queue_num;
-	if (__flow_dv_action_rss_setup(dev, idx, shared_action, error))
+	if (__flow_dv_action_rss_setup(dev, idx, shared_rss, error))
 		goto error_rss_init;
-	rte_spinlock_init(&shared_action->action_rss_sl);
-	__atomic_add_fetch(&shared_action->refcnt, 1, __ATOMIC_RELAXED);
+	rte_spinlock_init(&shared_rss->action_rss_sl);
+	__atomic_add_fetch(&shared_rss->refcnt, 1, __ATOMIC_RELAXED);
 	rte_spinlock_lock(&priv->shared_act_sl);
 	ILIST_INSERT(priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS],
-		     &priv->rss_shared_actions, idx, shared_action, next);
+		     &priv->rss_shared_actions, idx, shared_rss, next);
 	rte_spinlock_unlock(&priv->shared_act_sl);
 	return idx;
 error_rss_init:
-	if (shared_action) {
-		if (shared_action->ind_tbl)
-			mlx5_free(shared_action->ind_tbl);
+	if (shared_rss) {
+		if (shared_rss->ind_tbl)
+			mlx5_free(shared_rss->ind_tbl);
 		mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS],
 				idx);
 	}
@@ -11577,14 +11577,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  NULL,
 					  "shared rss hrxq has references");
-	queue = shared_rss->ind_tbl->queues;
-	remaining = mlx5_ind_table_obj_release(dev, shared_rss->ind_tbl, true);
-	if (remaining)
-		return rte_flow_error_set(error, EBUSY,
-					  RTE_FLOW_ERROR_TYPE_ACTION,
-					  NULL,
-					  "shared rss indirection table has"
-					  " references");
 	if (!__atomic_compare_exchange_n(&shared_rss->refcnt, &old_refcnt,
 					 0, 0, __ATOMIC_ACQUIRE,
 					 __ATOMIC_RELAXED))
@@ -11592,6 +11584,14 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  NULL,
 					  "shared rss has references");
+	queue = shared_rss->ind_tbl->queues;
+	remaining = mlx5_ind_table_obj_release(dev, shared_rss->ind_tbl, true);
+	if (remaining)
+		return rte_flow_error_set(error, EBUSY,
+					  RTE_FLOW_ERROR_TYPE_ACTION,
+					  NULL,
+					  "shared rss indirection table has"
+					  " references");
 	mlx5_free(queue);
 	rte_spinlock_lock(&priv->shared_act_sl);
 	ILIST_REMOVE(priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS],
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.009720643 +0000
+++ 0002-net-mlx5-fix-shared-RSS-translation-and-cleanup.patch	2021-02-09 10:34:57.846582764 +0000
@@ -1 +1 @@
-From c83456cdd7953e0659d13dcf0affc39bf76ef460 Mon Sep 17 00:00:00 2001
+From 1fe06255a79e669f4cfcdb3633cc81aac56e2c2d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c83456cdd7953e0659d13dcf0affc39bf76ef460 ]
+
@@ -37 +38,0 @@
-Cc: stable@dpdk.org
@@ -48 +49 @@
-index 0197a07209..632f46dfde 100644
+index ba9a90210f..cda3ca557c 100644
@@ -51 +52 @@
-@@ -7452,12 +7452,12 @@ mlx5_shared_action_flush(struct rte_eth_dev *dev)
+@@ -7177,12 +7177,12 @@ mlx5_shared_action_flush(struct rte_eth_dev *dev)
@@ -67 +68 @@
-index a3a3c7f54f..8324e188e1 100644
+index e0211fb2dd..91f48923c0 100644
@@ -70 +71 @@
-@@ -1095,17 +1095,17 @@ struct rte_flow {
+@@ -1048,17 +1048,17 @@ struct rte_flow {
@@ -93 +94 @@
-index 8c11ac306f..e0874e3f5f 100644
+index 32065efa41..7a1de50efa 100644
@@ -96 +97 @@
-@@ -12552,10 +12552,10 @@ __flow_dv_hrxqs_release(struct rte_eth_dev *dev,
+@@ -11371,10 +11371,10 @@ __flow_dv_hrxqs_release(struct rte_eth_dev *dev,
@@ -110 +111 @@
-@@ -12579,25 +12579,25 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
+@@ -11398,25 +11398,25 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
@@ -142 +143 @@
-@@ -12615,16 +12615,16 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
+@@ -11434,16 +11434,16 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
@@ -163 +164 @@
-@@ -12653,7 +12653,7 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
+@@ -11472,7 +11472,7 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
@@ -172 +173 @@
-@@ -12663,9 +12663,9 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
+@@ -11482,9 +11482,9 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
@@ -184 +185 @@
-@@ -12677,43 +12677,43 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
+@@ -11496,43 +11496,43 @@ __flow_dv_action_rss_create(struct rte_eth_dev *dev,
@@ -244 +245 @@
-@@ -12758,14 +12758,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11577,14 +11577,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
@@ -259 +260 @@
-@@ -12773,6 +12765,14 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11592,6 +11584,14 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,

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

* [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix shared RSS translation and cleanup' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/enic: fix filter type used for flow API' " luca.boccassi
                     ` (27 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: Xiaoyun Li, 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/11/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/c926d563faecbcea7c8679aa4a402f5906074d90

Thanks.

Luca Boccassi

---
From c926d563faecbcea7c8679aa4a402f5906074d90 Mon Sep 17 00:00:00 2001
From: Bernard Iremonger <bernard.iremonger@intel.com>
Date: Tue, 19 Jan 2021 13:00:52 +0000
Subject: [PATCH] doc: fix QinQ flow rules in testpmd guide

[ upstream commit 836cdce48822f31316849adc00086e17131908d7 ]

In the Testpmd Flow rules management section, correct
the TPID values in the Sample QinQ flow rules sub section.
Also replace the keyword qinq_strip with extend in the
vlan set command.

Fixes: bef3bfe7d5f4 ("doc: revise sample testpmd flow commands")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 9be450066e..6a00245fc8 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -4426,14 +4426,14 @@ Sample QinQ flow rules
 Before creating QinQ rule(s) the following commands should be issued to enable QinQ::
 
    testpmd> port stop 0
-   testpmd> vlan set qinq_strip on 0
+   testpmd> vlan set extend on 0
 
 The above command sets the inner and outer TPID's to 0x8100.
 
 To change the TPID's the following commands should be used::
 
-   testpmd> vlan set outer tpid 0xa100 0
-   testpmd> vlan set inner tpid 0x9100 0
+   testpmd> vlan set outer tpid 0x88A8 0
+   testpmd> vlan set inner tpid 0x8100 0
    testpmd> port start 0
 
 Validate and create a QinQ rule on port 0 to steer traffic to a VF queue in a VM.
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.063373698 +0000
+++ 0003-doc-fix-QinQ-flow-rules-in-testpmd-guide.patch	2021-02-09 10:34:57.850582841 +0000
@@ -1 +1 @@
-From 836cdce48822f31316849adc00086e17131908d7 Mon Sep 17 00:00:00 2001
+From c926d563faecbcea7c8679aa4a402f5906074d90 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 836cdce48822f31316849adc00086e17131908d7 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3ccc9fc300..a45910b81e 100644
+index 9be450066e..6a00245fc8 100644
@@ -24 +25 @@
-@@ -4434,14 +4434,14 @@ Sample QinQ flow rules
+@@ -4426,14 +4426,14 @@ Sample QinQ flow rules

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

* [dpdk-stable] patch 'net/enic: fix filter type used for flow API' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix shared RSS translation and cleanup' " luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: add FEC to NIC features' " luca.boccassi
                     ` (26 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, 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/11/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/6c8be34e6acee1caf4658ad6e5123f3d2a385b00

Thanks.

Luca Boccassi

---
From 6c8be34e6acee1caf4658ad6e5123f3d2a385b00 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Mon, 1 Feb 2021 16:24:23 -0800
Subject: [PATCH] net/enic: fix filter type used for flow API

[ upstream commit d700f0d0d7074c76a94c0278315acb86f9ea30ba ]

The filter type (struct filter_v2.type) should always be set to
FILTER_DPDK_1, when advanced filtering is enabled in firmware.
Otherwise, for some old firmware versions, the driver sets
it to FILTER_USNIC_IP, and attempts to install filters fail. This
behavior matches that of the now-removed flow director implementation
(enic_clsf.c).

Fixes: 26faa126d87e ("net/enic: flow API for NICs with advanced filters disabled")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index cebca7d55a..453c11a3b3 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1595,6 +1595,8 @@ enic_flow_parse(struct rte_eth_dev *dev,
 		return -rte_errno;
 	}
 	enic_filter->type = enic->flow_filter_mode;
+	if (enic->adv_filters)
+		enic_filter->type = FILTER_DPDK_1;
 	ret = enic_copy_filter(pattern, enic_filter_cap, enic,
 				       enic_filter, error);
 	return ret;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.101345440 +0000
+++ 0004-net-enic-fix-filter-type-used-for-flow-API.patch	2021-02-09 10:34:57.854582918 +0000
@@ -1 +1 @@
-From d700f0d0d7074c76a94c0278315acb86f9ea30ba Mon Sep 17 00:00:00 2001
+From 6c8be34e6acee1caf4658ad6e5123f3d2a385b00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d700f0d0d7074c76a94c0278315acb86f9ea30ba ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 97ee7509ce..7eb06f889e 100644
+index cebca7d55a..453c11a3b3 100644
@@ -26 +27 @@
-@@ -1598,6 +1598,8 @@ enic_flow_parse(struct rte_eth_dev *dev,
+@@ -1595,6 +1595,8 @@ enic_flow_parse(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'doc: add FEC to NIC features' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (2 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/enic: fix filter type used for flow API' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix product link in hns3 guide' " luca.boccassi
                     ` (25 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Lijun Ou, 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/11/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/a1f1d47fb71a3230bc6c3ad8261a41d37c11c45f

Thanks.

Luca Boccassi

---
From a1f1d47fb71a3230bc6c3ad8261a41d37c11c45f Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Fri, 29 Jan 2021 17:22:03 +0800
Subject: [PATCH] doc: add FEC to NIC features

[ upstream commit fa5dbd825af232e99e82a6de8ea55540c8a07191 ]

Document FEC in NIC features, add information about FEC and add
implementation related support.

Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Fixes: 62aafe035896 ("net/cxgbe: support configuring link FEC")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/nics/features.rst         | 15 +++++++++++++++
 doc/guides/nics/features/cxgbe.ini   |  1 +
 doc/guides/nics/features/default.ini |  1 +
 doc/guides/nics/features/hns3.ini    |  1 +
 4 files changed, 18 insertions(+)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 43f74e02ab..616040042c 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -518,6 +518,21 @@ Supports QinQ (queue in queue) offload.
   ``tx_offload_capa,tx_queue_offload_capa:DEV_TX_OFFLOAD_QINQ_INSERT``.
 
 
+.. _nic_features_fec:
+
+FEC
+---
+
+Supports Forward error correction. Forward error correction (FEC) is a bit error correction mode.
+It adds error correction information to data packets at the transmit end, and uses the error correction
+information to correct the bit errors generated during data packet transmission at the receive end. This
+improves signal quality but also brings a delay to signals. This function can be enabled or disabled as required.
+
+* **[implements] eth_dev_ops**: ``fec_get_capability``, ``fec_get``, ``fec_set``.
+* **[provides]   rte_eth_fec_capa**: ``speed:ETH_SPEED_NUM_*``, ``capa:RTE_ETH_FEC_MODE_TO_CAPA()``.
+* **[related]    API**: ``rte_eth_fec_get_capability()``, ``rte_eth_fec_get()``, ``rte_eth_fec_set()``.
+
+
 .. _nic_features_l3_checksum_offload:
 
 L3 checksum offload
diff --git a/doc/guides/nics/features/cxgbe.ini b/doc/guides/nics/features/cxgbe.ini
index c03b53bd85..799d0b64e0 100644
--- a/doc/guides/nics/features/cxgbe.ini
+++ b/doc/guides/nics/features/cxgbe.ini
@@ -20,6 +20,7 @@ Flow control         = Y
 Flow API             = Y
 CRC offload          = Y
 VLAN offload         = Y
+FEC                  = Y
 L3 checksum offload  = Y
 L4 checksum offload  = Y
 Packet type parsing  = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 4d0ad324ea..032ae4b6c8 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -46,6 +46,7 @@ Inline protocol      =
 CRC offload          =
 VLAN offload         =
 QinQ offload         =
+FEC                  =
 L3 checksum offload  =
 L4 checksum offload  =
 Timestamp offload    =
diff --git a/doc/guides/nics/features/hns3.ini b/doc/guides/nics/features/hns3.ini
index f0747e3f07..a1dc7eb9eb 100644
--- a/doc/guides/nics/features/hns3.ini
+++ b/doc/guides/nics/features/hns3.ini
@@ -28,6 +28,7 @@ Flow control         = Y
 Flow API             = Y
 CRC offload          = Y
 VLAN offload         = Y
+FEC                  = Y
 L3 checksum offload  = Y
 L4 checksum offload  = Y
 Inner L3 checksum    = Y
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.134754580 +0000
+++ 0005-doc-add-FEC-to-NIC-features.patch	2021-02-09 10:34:57.854582918 +0000
@@ -1 +1 @@
-From fa5dbd825af232e99e82a6de8ea55540c8a07191 Mon Sep 17 00:00:00 2001
+From a1f1d47fb71a3230bc6c3ad8261a41d37c11c45f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa5dbd825af232e99e82a6de8ea55540c8a07191 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 59beb47316..e9bb55376e 100644
+index 43f74e02ab..616040042c 100644
@@ -51 +52 @@
-index f91321504f..276879ec1a 100644
+index c03b53bd85..799d0b64e0 100644
@@ -63 +64 @@
-index 8d89278479..8046bd121e 100644
+index 4d0ad324ea..032ae4b6c8 100644
@@ -75 +76 @@
-index a46739678f..ef432aff2a 100644
+index f0747e3f07..a1dc7eb9eb 100644

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

* [dpdk-stable] patch 'doc: fix product link in hns3 guide' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (3 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: add FEC to NIC features' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' " luca.boccassi
                     ` (24 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Lijun Ou; +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/11/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/097d6d65c7d05eb4aa39ff52606ebb2a002a7229

Thanks.

Luca Boccassi

---
From 097d6d65c7d05eb4aa39ff52606ebb2a002a7229 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 29 Jan 2021 17:22:05 +0800
Subject: [PATCH] doc: fix product link in hns3 guide

[ upstream commit a951fbbe91d6edd30ef01320b960162c33a2b46e ]

Here fixes the Kunpeng introduction address link with hns3.rst

Fixes: 565829db8b8f ("net/hns3: add build and doc infrastructure")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 doc/guides/nics/hns3.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 8db8867c15..84bd7a3c92 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -41,7 +41,7 @@ Features of the HNS3 PMD are:
 Prerequisites
 -------------
 - Get the information about Kunpeng920 chip using
-  `<http://www.hisilicon.com/en/Products/ProductList/Kunpeng>`_.
+  `<https://www.hisilicon.com/en/products/Kunpeng>`_.
 
 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.169159261 +0000
+++ 0006-doc-fix-product-link-in-hns3-guide.patch	2021-02-09 10:34:57.854582918 +0000
@@ -1 +1 @@
-From a951fbbe91d6edd30ef01320b960162c33a2b46e Mon Sep 17 00:00:00 2001
+From 097d6d65c7d05eb4aa39ff52606ebb2a002a7229 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a951fbbe91d6edd30ef01320b960162c33a2b46e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (4 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix product link in hns3 guide' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: check FW miniCQE format capabilities' " luca.boccassi
                     ` (23 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/3eb9b664d9d976d5875e13d68e79f50376eb88b0

Thanks.

Luca Boccassi

---
From 3eb9b664d9d976d5875e13d68e79f50376eb88b0 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Tue, 2 Feb 2021 18:23:45 +0300
Subject: [PATCH] net/sfc: fix TSO and checksum offloads for EF10

[ upstream commit be56d20ff17fdba2568a56e35abf1706cb48bb85 ]

This is workaround for 8000-series EF10 hardware TSO bug.
Innermost IP length and outer UDP datagram length must be
greater than or equal to the corresponding values derived
from the MSS; otherwise, the checksum offloads will break.

Fixes: c1ce2ba218f8 ("net/sfc: support tunnel TSO on EF10 native Tx datapath")
Fixes: 6bc985e41155 ("net/sfc: support TSO in EF10 Tx datapath")
Fixes: fec33d5bb3eb ("net/sfc: support firmware-assisted TSO")

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/net/sfc/sfc_ef10_tx.c | 19 +++++++++++++++++++
 drivers/net/sfc/sfc_tso.c     |  7 +++++++
 drivers/net/sfc/sfc_tso.h     | 30 ++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+)

diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c
index 87fa40f3eb..33d2d637c2 100644
--- a/drivers/net/sfc/sfc_ef10_tx.c
+++ b/drivers/net/sfc/sfc_ef10_tx.c
@@ -481,6 +481,25 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
 			needed_desc--;
 	}
 
+	/*
+	 * 8000-series EF10 hardware requires that innermost IP length
+	 * be greater than or equal to the value which each segment is
+	 * supposed to have; otherwise, TCP checksum will be incorrect.
+	 *
+	 * The same concern applies to outer UDP datagram length field.
+	 */
+	switch (m_seg->ol_flags & PKT_TX_TUNNEL_MASK) {
+	case PKT_TX_TUNNEL_VXLAN:
+		/* FALLTHROUGH */
+	case PKT_TX_TUNNEL_GENEVE:
+		sfc_tso_outer_udp_fix_len(first_m_seg, hdr_addr);
+		break;
+	default:
+		break;
+	}
+
+	sfc_tso_innermost_ip_fix_len(first_m_seg, hdr_addr, iph_off);
+
 	/*
 	 * Tx prepare has debug-only checks that offload flags are correctly
 	 * filled in in TSO mbuf. Use zero IPID if there is no IPv4 flag.
diff --git a/drivers/net/sfc/sfc_tso.c b/drivers/net/sfc/sfc_tso.c
index d6f1119890..b090ef14db 100644
--- a/drivers/net/sfc/sfc_tso.c
+++ b/drivers/net/sfc/sfc_tso.c
@@ -140,6 +140,13 @@ sfc_efx_tso_do(struct sfc_efx_txq *txq, unsigned int idx,
 		tsoh = rte_pktmbuf_mtod(m, uint8_t *);
 	}
 
+	/*
+	 * 8000-series EF10 hardware requires that innermost IP length
+	 * be greater than or equal to the value which each segment is
+	 * supposed to have; otherwise, TCP checksum will be incorrect.
+	 */
+	sfc_tso_innermost_ip_fix_len(m, tsoh, nh_off);
+
 	/*
 	 * Handle IP header. Tx prepare has debug-only checks that offload flags
 	 * are correctly filled in in TSO mbuf. Use zero IPID if there is no
diff --git a/drivers/net/sfc/sfc_tso.h b/drivers/net/sfc/sfc_tso.h
index 8597c2868a..361aa22192 100644
--- a/drivers/net/sfc/sfc_tso.h
+++ b/drivers/net/sfc/sfc_tso.h
@@ -38,6 +38,36 @@ sfc_tso_ip4_get_ipid(const uint8_t *pkt_hdrp, size_t ip_hdr_off)
 	return rte_be_to_cpu_16(ipid);
 }
 
+static inline void
+sfc_tso_outer_udp_fix_len(const struct rte_mbuf *m, uint8_t *tsoh)
+{
+	rte_be16_t len = rte_cpu_to_be_16(m->l2_len + m->l3_len + m->l4_len +
+					  m->tso_segsz);
+
+	rte_memcpy(tsoh + m->outer_l2_len + m->outer_l3_len +
+		   offsetof(struct rte_udp_hdr, dgram_len),
+		   &len, sizeof(len));
+}
+
+static inline void
+sfc_tso_innermost_ip_fix_len(const struct rte_mbuf *m, uint8_t *tsoh,
+			     size_t iph_ofst)
+{
+	size_t ip_payload_len = m->l4_len + m->tso_segsz;
+	size_t field_ofst;
+	rte_be16_t len;
+
+	if (m->ol_flags & PKT_TX_IPV4) {
+		field_ofst = offsetof(struct rte_ipv4_hdr, total_length);
+		len = rte_cpu_to_be_16(m->l3_len + ip_payload_len);
+	} else {
+		field_ofst = offsetof(struct rte_ipv6_hdr, payload_len);
+		len = rte_cpu_to_be_16(ip_payload_len);
+	}
+
+	rte_memcpy(tsoh + iph_ofst + field_ofst, &len, sizeof(len));
+}
+
 unsigned int sfc_tso_prepare_header(uint8_t *tsoh, size_t header_len,
 				    struct rte_mbuf **in_seg, size_t *in_off);
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.202437380 +0000
+++ 0007-net-sfc-fix-TSO-and-checksum-offloads-for-EF10.patch	2021-02-09 10:34:57.858582996 +0000
@@ -1 +1 @@
-From be56d20ff17fdba2568a56e35abf1706cb48bb85 Mon Sep 17 00:00:00 2001
+From 3eb9b664d9d976d5875e13d68e79f50376eb88b0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be56d20ff17fdba2568a56e35abf1706cb48bb85 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: check FW miniCQE format capabilities' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (5 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:42     ` Luca Boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix miniCQE configuration for Verbs' " luca.boccassi
                     ` (22 subsequent siblings)
  29 siblings, 1 reply; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/de75752e7e707382086c7d0e88b4946b6e9ca7bf

Thanks.

Luca Boccassi

---
From de75752e7e707382086c7d0e88b4946b6e9ca7bf Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Tue, 2 Feb 2021 02:07:37 +0000
Subject: [PATCH] net/mlx5: check FW miniCQE format capabilities

[ upstream commit 3d3f4e6d1aaaec77016a8b406371f1b491ae9044 ]

miniCQE formats for Flow Tag and L3/L4 Header compression are only
supported by Mellanox FW starting version 16.29.392. There is no
point to allow user to enable these formats if FW cannot provide them.
Check FW capabilities and deny user requests if the selected miniCQE
format is not supported by an underlying NIC.

Fixes: 54c2d46b160f ("net/mlx5: support flow tag and packet header miniCQEs")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c |  5 +++++
 drivers/common/mlx5/mlx5_devx_cmds.h |  3 +++
 drivers/common/mlx5/mlx5_prm.h       |  5 ++++-
 drivers/net/mlx5/linux/mlx5_os.c     | 32 ++++++++++++++++++----------
 4 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index a0277b7cc0..eafee65f22 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -720,6 +720,11 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->flow_hit_aso = !!(MLX5_GET64(cmd_hca_cap, hcattr,
 					   general_obj_types) &
 				MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_HIT_ASO);
+	attr->cqe_compression = MLX5_GET(cmd_hca_cap, hcattr, cqe_compression);
+	attr->mini_cqe_resp_flow_tag = MLX5_GET(cmd_hca_cap, hcattr,
+						mini_cqe_resp_flow_tag);
+	attr->mini_cqe_resp_l3_l4_tag = MLX5_GET(cmd_hca_cap, hcattr,
+						 mini_cqe_resp_l3_l4_tag);
 	if (attr->qos.sup) {
 		MLX5_SET(query_hca_cap_in, in, op_mod,
 			 MLX5_GET_HCA_CAP_OP_MOD_QOS_CAP |
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index bddeabf0ea..78202eba9d 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -115,6 +115,9 @@ struct mlx5_hca_attr {
 	uint32_t regex:1;
 	uint32_t regexp_num_of_engines;
 	uint32_t log_max_ft_sampler_num:8;
+	uint32_t cqe_compression:1;
+	uint32_t mini_cqe_resp_flow_tag:1;
+	uint32_t mini_cqe_resp_l3_l4_tag:1;
 	struct mlx5_hca_qos_attr qos;
 	struct mlx5_hca_vdpa_attr vdpa;
 };
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 6f5e5dc5f6..00b425ac85 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -1364,7 +1364,10 @@ struct mlx5_ifc_cmd_hca_cap_bits {
 	u8 num_of_uars_per_page[0x20];
 	u8 flex_parser_protocols[0x20];
 	u8 reserved_at_560[0x20];
-	u8 reserved_at_580[0x3c];
+	u8 reserved_at_580[0x39];
+	u8 mini_cqe_resp_l3_l4_tag[0x1];
+	u8 mini_cqe_resp_flow_tag[0x1];
+	u8 enhanced_cqe_compression[0x1];
 	u8 mini_cqe_resp_stride_index[0x1];
 	u8 cqe_128_always[0x1];
 	u8 cqe_compression_128[0x1];
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index a055a8dd1c..91001473b0 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -670,7 +670,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	int err = 0;
 	unsigned int hw_padding = 0;
 	unsigned int mps;
-	unsigned int cqe_comp;
 	unsigned int tunnel_en = 0;
 	unsigned int mpls_en = 0;
 	unsigned int swp = 0;
@@ -862,12 +861,8 @@ err_secondary:
 			mprq_caps.max_single_wqe_log_num_of_strides;
 	}
 #endif
-	if (RTE_CACHE_LINE_SIZE == 128 &&
-	    !(dv_attr.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP))
-		cqe_comp = 0;
-	else
-		cqe_comp = 1;
-	config->cqe_comp = cqe_comp;
+	/* Rx CQE compression is enabled by default. */
+	config->cqe_comp = 1;
 #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
 	if (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {
 		tunnel_en = ((dv_attr.tunnel_offloads_caps &
@@ -1098,10 +1093,6 @@ err_secondary:
 		config->mps == MLX5_MPW_ENHANCED ? "enhanced " :
 		config->mps == MLX5_MPW ? "legacy " : "",
 		config->mps != MLX5_MPW_DISABLED ? "enabled" : "disabled");
-	if (config->cqe_comp && !cqe_comp) {
-		DRV_LOG(WARNING, "Rx CQE compression isn't supported");
-		config->cqe_comp = 0;
-	}
 	if (config->devx) {
 		err = mlx5_devx_cmd_query_hca_attr(sh->ctx, &config->hca_attr);
 		if (err) {
@@ -1200,6 +1191,25 @@ err_secondary:
 		}
 #endif
 	}
+	if (config->cqe_comp && RTE_CACHE_LINE_SIZE == 128 &&
+	    !(dv_attr.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP)) {
+		DRV_LOG(WARNING, "Rx CQE 128B compression is not supported");
+		config->cqe_comp = 0;
+	}
+	if (config->cqe_comp_fmt == MLX5_CQE_RESP_FORMAT_FTAG_STRIDX &&
+	    (!config->devx || !config->hca_attr.mini_cqe_resp_flow_tag)) {
+		DRV_LOG(WARNING, "Flow Tag CQE compression"
+				 " format isn't supported.");
+		config->cqe_comp = 0;
+	}
+	if (config->cqe_comp_fmt == MLX5_CQE_RESP_FORMAT_L34H_STRIDX &&
+	    (!config->devx || !config->hca_attr.mini_cqe_resp_l3_l4_tag)) {
+		DRV_LOG(WARNING, "L3/L4 Header CQE compression"
+				 " format isn't supported.");
+		config->cqe_comp = 0;
+	}
+	DRV_LOG(DEBUG, "Rx CQE compression is %ssupported",
+			config->cqe_comp ? "" : "not ");
 	if (config->tx_pp) {
 		DRV_LOG(DEBUG, "Timestamp counter frequency %u kHz",
 			config->hca_attr.dev_freq_khz);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.237342958 +0000
+++ 0008-net-mlx5-check-FW-miniCQE-format-capabilities.patch	2021-02-09 10:34:57.866583151 +0000
@@ -1 +1 @@
-From 3d3f4e6d1aaaec77016a8b406371f1b491ae9044 Mon Sep 17 00:00:00 2001
+From de75752e7e707382086c7d0e88b4946b6e9ca7bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d3f4e6d1aaaec77016a8b406371f1b491ae9044 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index b075af9f6d..cc70c794e7 100644
+index a0277b7cc0..eafee65f22 100644
@@ -28,4 +29,4 @@
-@@ -744,6 +744,11 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
- 					      log_compress_mmo_size);
- 	attr->log_max_mmo_decompress = MLX5_GET(cmd_hca_cap, hcattr,
- 						log_decompress_mmo_size);
+@@ -720,6 +720,11 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+ 	attr->flow_hit_aso = !!(MLX5_GET64(cmd_hca_cap, hcattr,
+ 					   general_obj_types) &
+ 				MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_HIT_ASO);
@@ -41 +42 @@
-index 3e2a0a24f9..9dcd917c39 100644
+index bddeabf0ea..78202eba9d 100644
@@ -44 +45,2 @@
-@@ -126,6 +126,9 @@ struct mlx5_hca_attr {
+@@ -115,6 +115,9 @@ struct mlx5_hca_attr {
+ 	uint32_t regex:1;
@@ -47 +48,0 @@
- 	uint32_t geneve_tlv_opt;
@@ -53 +54 @@
- 	int log_max_qp_sz;
+ };
@@ -55 +56 @@
-index 751dda2537..de721aa177 100644
+index 6f5e5dc5f6..00b425ac85 100644
@@ -58,6 +59,6 @@
-@@ -1444,7 +1444,10 @@ struct mlx5_ifc_cmd_hca_cap_bits {
- 	u8 max_geneve_tlv_options[0x8];
- 	u8 reserved_at_568[0x3];
- 	u8 max_geneve_tlv_option_data_len[0x5];
--	u8 reserved_at_570[0x4c];
-+	u8 reserved_at_570[0x49];
+@@ -1364,7 +1364,10 @@ struct mlx5_ifc_cmd_hca_cap_bits {
+ 	u8 num_of_uars_per_page[0x20];
+ 	u8 flex_parser_protocols[0x20];
+ 	u8 reserved_at_560[0x20];
+-	u8 reserved_at_580[0x3c];
++	u8 reserved_at_580[0x39];
@@ -71 +72 @@
-index 9b95b9fe31..2dc079779d 100644
+index a055a8dd1c..91001473b0 100644
@@ -74 +75 @@
-@@ -676,7 +676,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -670,7 +670,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
@@ -82 +83 @@
-@@ -868,12 +867,8 @@ err_secondary:
+@@ -862,12 +861,8 @@ err_secondary:
@@ -97 +98 @@
-@@ -1104,10 +1099,6 @@ err_secondary:
+@@ -1098,10 +1093,6 @@ err_secondary:
@@ -108 +109 @@
-@@ -1206,6 +1197,25 @@ err_secondary:
+@@ -1200,6 +1191,25 @@ err_secondary:

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

* [dpdk-stable] patch 'net/mlx5: fix miniCQE configuration for Verbs' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (6 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: check FW miniCQE format capabilities' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'vhost: fix vid allocation race' " luca.boccassi
                     ` (21 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/b9d6b8b4038948e84e67bfff16dd906dc5d89922

Thanks.

Luca Boccassi

---
From b9d6b8b4038948e84e67bfff16dd906dc5d89922 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Mon, 1 Feb 2021 17:16:30 +0000
Subject: [PATCH] net/mlx5: fix miniCQE configuration for Verbs

[ upstream commit fdc44cdc7866ecc601460941780aa53d57010dbc ]

Verbs cannot be used to configure newly introduced miniCQE formats for
Flow Tag and L3/L4 Header compression. Support for these formats has
been added to the DevX configuration only. And the RX queue descriptor
has been updated with the CQE compression format information only as
well. But the datapath relies on this info no matter which method is
used for Rx queues configuration. Set proper CQE compression format
information in the Verbs configuration to fix the miniCQE parsing logic.

Fixes: 54c2d46b160f ("net/mlx5: support flow tag and packet header miniCQEs")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 doc/guides/nics/mlx5.rst            |  6 +++++-
 drivers/net/mlx5/linux/mlx5_verbs.c | 17 +++++++++++++----
 drivers/net/mlx5/mlx5_rxtx.h        |  2 +-
 3 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index b7e285b8f5..d1fb20c52e 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -433,13 +433,17 @@ Driver options
   A nonzero value enables the compression of CQE on RX side. This feature
   allows to save PCI bandwidth and improve performance. Enabled by default.
   Different compression formats are supported in order to achieve the best
-  performance for different traffic patterns. Hash RSS format is the default.
+  performance for different traffic patterns. Default format depends on
+  Multi-Packet Rx queue configuration: Hash RSS format is used in case
+  MPRQ is disabled, Checksum format is used in case MPRQ is enabled.
 
   Specifying 2 as a ``rxq_cqe_comp_en`` value selects Flow Tag format for
   better compression rate in case of RTE Flow Mark traffic.
   Specifying 3 as a ``rxq_cqe_comp_en`` value selects Checksum format.
   Specifying 4 as a ``rxq_cqe_comp_en`` value selects L3/L4 Header format for
   better compression rate in case of mixed TCP/UDP and IPv4/IPv6 traffic.
+  CQE compression format selection requires DevX to be enabled. If there is
+  no DevX enabled/supported the value is reset to 1 by default.
 
   Supported on:
 
diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index abd167ef14..6b98a4c166 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -213,13 +213,22 @@ mlx5_rxq_ibv_cq_create(struct rte_eth_dev *dev, uint16_t idx)
 	if (priv->config.cqe_comp && !rxq_data->hw_timestamp) {
 		cq_attr.mlx5.comp_mask |=
 				MLX5DV_CQ_INIT_ATTR_MASK_COMPRESSED_CQE;
+		rxq_data->byte_mask = UINT32_MAX;
 #ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT
-		cq_attr.mlx5.cqe_comp_res_format =
-				mlx5_rxq_mprq_enabled(rxq_data) ?
-				MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX :
-				MLX5DV_CQE_RES_FORMAT_HASH;
+		if (mlx5_rxq_mprq_enabled(rxq_data)) {
+			cq_attr.mlx5.cqe_comp_res_format =
+					MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX;
+			rxq_data->mcqe_format =
+					MLX5_CQE_RESP_FORMAT_CSUM_STRIDX;
+		} else {
+			cq_attr.mlx5.cqe_comp_res_format =
+					MLX5DV_CQE_RES_FORMAT_HASH;
+			rxq_data->mcqe_format =
+					MLX5_CQE_RESP_FORMAT_HASH;
+		}
 #else
 		cq_attr.mlx5.cqe_comp_res_format = MLX5DV_CQE_RES_FORMAT_HASH;
+		rxq_data->mcqe_format = MLX5_CQE_RESP_FORMAT_HASH;
 #endif
 		/*
 		 * For vectorized Rx, it must not be doubled in order to
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7989a50403..c57ccc32ed 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -126,7 +126,7 @@ struct mlx5_rxq_data {
 	unsigned int strd_scatter_en:1; /* Scattered packets from a stride. */
 	unsigned int lro:1; /* Enable LRO. */
 	unsigned int dynf_meta:1; /* Dynamic metadata is configured. */
-	unsigned int mcqe_format:3; /* Dynamic metadata is configured. */
+	unsigned int mcqe_format:3; /* CQE compression format. */
 	volatile uint32_t *rq_db;
 	volatile uint32_t *cq_db;
 	uint16_t port_id;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.282485606 +0000
+++ 0009-net-mlx5-fix-miniCQE-configuration-for-Verbs.patch	2021-02-09 10:34:57.870583228 +0000
@@ -1 +1 @@
-From fdc44cdc7866ecc601460941780aa53d57010dbc Mon Sep 17 00:00:00 2001
+From b9d6b8b4038948e84e67bfff16dd906dc5d89922 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fdc44cdc7866ecc601460941780aa53d57010dbc ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index dbd7ae1bb9..173e6ae5b3 100644
+index b7e285b8f5..d1fb20c52e 100644
@@ -29 +30 @@
-@@ -485,13 +485,17 @@ Driver options
+@@ -433,13 +433,17 @@ Driver options
@@ -49 +50 @@
-index 43ff85f9c4..ade241b806 100644
+index abd167ef14..6b98a4c166 100644
@@ -80 +81 @@
-index 6432030e90..0fd98af9d1 100644
+index 7989a50403..c57ccc32ed 100644

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

* [dpdk-stable] patch 'vhost: fix vid allocation race' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (7 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix miniCQE configuration for Verbs' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/octeontx: fix max Rx packet length' " luca.boccassi
                     ` (20 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Fei Chen; +Cc: Peng He, Zhihong Wang, 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/11/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/9f014a02d2276f4fa38d112172d0d8635a06fab4

Thanks.

Luca Boccassi

---
From 9f014a02d2276f4fa38d112172d0d8635a06fab4 Mon Sep 17 00:00:00 2001
From: Fei Chen <chenwei.0515@bytedance.com>
Date: Mon, 1 Feb 2021 16:48:44 +0800
Subject: [PATCH] vhost: fix vid allocation race

[ upstream commit 9944bddf80d692ade5ef6f7326541b13881cbbb9 ]

vhost_new_device might be called in different threads at
the same time.

thread 1(config thread)
            rte_vhost_driver_start
               ->vhost_user_start_client
                   ->vhost_user_add_connection
                     -> vhost_new_device

thread 2(vhost-events)
	vhost_user_read_cb
           ->vhost_user_msg_handler (return value < 0)
             -> vhost_user_start_client
                 -> vhost_new_device

So there could be a case that a same vid has been allocated
twice, or some vid might be lost in DPDK lib however still
held by the upper applications.

Another place where race would happen is at the func
*vhost_destroy_device*, but after a detailed investigation,
the race does not exist as long as no two devices have the
same vid: Calling vhost_destroy_devices in different
threads with different vids is actually safe.

Fixes: a277c7159876 ("vhost: refactor code structure")

Reported-by: Peng He <hepeng.0320@bytedance.com>
Signed-off-by: Fei Chen <chenwei.0515@bytedance.com>
Reviewed-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index b83cf639eb..4de588d752 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -26,6 +26,7 @@
 #include "vhost_user.h"
 
 struct virtio_net *vhost_devices[MAX_VHOST_DEVICE];
+pthread_mutex_t vhost_dev_lock = PTHREAD_MUTEX_INITIALIZER;
 
 /* Called with iotlb_lock read-locked */
 uint64_t
@@ -645,6 +646,7 @@ vhost_new_device(void)
 	struct virtio_net *dev;
 	int i;
 
+	pthread_mutex_lock(&vhost_dev_lock);
 	for (i = 0; i < MAX_VHOST_DEVICE; i++) {
 		if (vhost_devices[i] == NULL)
 			break;
@@ -653,6 +655,7 @@ vhost_new_device(void)
 	if (i == MAX_VHOST_DEVICE) {
 		VHOST_LOG_CONFIG(ERR,
 			"Failed to find a free slot for new device.\n");
+		pthread_mutex_unlock(&vhost_dev_lock);
 		return -1;
 	}
 
@@ -660,10 +663,13 @@ vhost_new_device(void)
 	if (dev == NULL) {
 		VHOST_LOG_CONFIG(ERR,
 			"Failed to allocate memory for new dev.\n");
+		pthread_mutex_unlock(&vhost_dev_lock);
 		return -1;
 	}
 
 	vhost_devices[i] = dev;
+	pthread_mutex_unlock(&vhost_dev_lock);
+
 	dev->vid = i;
 	dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET;
 	dev->slave_req_fd = -1;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.320549798 +0000
+++ 0010-vhost-fix-vid-allocation-race.patch	2021-02-09 10:34:57.870583228 +0000
@@ -1 +1 @@
-From 9944bddf80d692ade5ef6f7326541b13881cbbb9 Mon Sep 17 00:00:00 2001
+From 9f014a02d2276f4fa38d112172d0d8635a06fab4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9944bddf80d692ade5ef6f7326541b13881cbbb9 ]
+
@@ -32 +33,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index efb136edd1..52ab93d1ec 100644
+index b83cf639eb..4de588d752 100644

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

* [dpdk-stable] patch 'net/octeontx: fix max Rx packet length' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (8 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'vhost: fix vid allocation race' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix supported feature table in mlx5 guide' " luca.boccassi
                     ` (19 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Sunil Kumar Kori; +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/11/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/8dfaf32c0ce40c7e77df2f3153d2dacc6e0c6cc0

Thanks.

Luca Boccassi

---
From 8dfaf32c0ce40c7e77df2f3153d2dacc6e0c6cc0 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Tue, 26 Jan 2021 14:22:43 +0530
Subject: [PATCH] net/octeontx: fix max Rx packet length

[ upstream commit 82a752e3ebf37f615b82860a06fedd5e24d7b5bb ]

Maximum Rx packet length is getting updated twice which
corrupts actual value.

Fixes: 3151e6a687a3 ("net/octeontx: support MTU")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 81779885d5..5836dbe09e 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -867,7 +867,6 @@ octeontx_dev_info(struct rte_eth_dev *dev,
 
 	dev_info->max_mac_addrs =
 				octeontx_bgx_port_mac_entries_get(nic->port_id);
-	dev_info->max_rx_pktlen = PKI_MAX_PKTLEN;
 	dev_info->max_rx_queues = 1;
 	dev_info->max_tx_queues = PKO_MAX_NUM_DQ;
 	dev_info->min_rx_bufsize = 0;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.358631708 +0000
+++ 0011-net-octeontx-fix-max-Rx-packet-length.patch	2021-02-09 10:34:57.870583228 +0000
@@ -1 +1 @@
-From 82a752e3ebf37f615b82860a06fedd5e24d7b5bb Mon Sep 17 00:00:00 2001
+From 8dfaf32c0ce40c7e77df2f3153d2dacc6e0c6cc0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 82a752e3ebf37f615b82860a06fedd5e24d7b5bb ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'doc: fix supported feature table in mlx5 guide' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (9 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/octeontx: fix max Rx packet length' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix counter and age flow action validation' " luca.boccassi
                     ` (18 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/75a734bd996ad630182d7830b0972b0f983c7839

Thanks.

Luca Boccassi

---
From 75a734bd996ad630182d7830b0972b0f983c7839 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 2 Feb 2021 16:27:32 +0200
Subject: [PATCH] doc: fix supported feature table in mlx5 guide

[ upstream commit 5f5b0ac90424754575d50d40f3d8a1c80dfe6786 ]

This sets the correct minimal requirements for these features:

- Buffer Split offload is supported/verified on ConnectX-5
- Tx scheduling requires ConnectX-6DX and depends on firmware version

Fixes: cb7b0c24c835 ("doc: update hardware offloads support in mlx5 guide")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Asaf Penso <asafp@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index d1fb20c52e..715c5b5be7 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -1385,7 +1385,8 @@ Supported hardware offloads
    Rx timestamp   17.11  4.14    16     4.2-1 12.21.1000 ConnectX-4
    TSO            17.11  4.14    16     4.2-1 12.21.1000 ConnectX-4
    LRO            19.08  N/A     N/A    4.6-4 16.25.6406 ConnectX-5
-   Buffer Split   20.11  N/A     N/A    5.1-2 22.28.2006 ConnectX-6 Dx
+   Tx scheduling  20.08  N/A     N/A    5.1-2 22.28.2006 ConnectX-6 Dx
+   Buffer Split   20.11  N/A     N/A    5.1-2 16.28.2006 ConnectX-5
    ============== ===== ===== ========= ===== ========== =============
 
 .. table:: Minimal SW/HW versions for rte_flow offloads
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.397140665 +0000
+++ 0012-doc-fix-supported-feature-table-in-mlx5-guide.patch	2021-02-09 10:34:57.874583306 +0000
@@ -1 +1 @@
-From 5f5b0ac90424754575d50d40f3d8a1c80dfe6786 Mon Sep 17 00:00:00 2001
+From 75a734bd996ad630182d7830b0972b0f983c7839 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f5b0ac90424754575d50d40f3d8a1c80dfe6786 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 173e6ae5b3..51d81a0206 100644
+index d1fb20c52e..715c5b5be7 100644
@@ -24 +25 @@
-@@ -1478,7 +1478,8 @@ Supported hardware offloads
+@@ -1385,7 +1385,8 @@ Supported hardware offloads

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

* [dpdk-stable] patch 'net/mlx5: fix counter and age flow action validation' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (10 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix supported feature table in mlx5 guide' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'common/mlx5: fix storing synced MAC to internal table' " luca.boccassi
                     ` (17 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Jiawei Wang; +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/11/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/21fd2b8e2d44805d95843d07b954e9a378cf3c6e

Thanks.

Luca Boccassi

---
From 21fd2b8e2d44805d95843d07b954e9a378cf3c6e Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Tue, 2 Feb 2021 18:42:49 +0200
Subject: [PATCH] net/mlx5: fix counter and age flow action validation

[ upstream commit 5fe95d736471452cdf9f26d8b01fd0b8d6de90e0 ]

Currently old age action was implemented by flow counter and only one
counter index was maintained in each flow. While there was old age
action and share count action in one flow, and the same share count
action in the another flow, the counter was updated if second flow
was hit, so it may cause the first flow didn't aged out since the
counter was updated by second flow.

This patch updates the validation function for count and old age action:
  - Old age and shared count action combination is not supported.
  - Old age and count(not shared) action could work in the same sub
    flow.

Fixes: e7138997e07d ("net/mlx5: make shared counters thread safe")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 55 ++++++++++++++++++++++++++-------
 1 file changed, 44 insertions(+), 11 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7a1de50efa..481a3a7498 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2542,6 +2542,8 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
  *
  * @param[in] dev
  *   Pointer to rte_eth_dev structure.
+ * @param[in] action
+ *   Pointer to the action structure.
  * @param[in] action_flags
  *   Holds the actions detected until now.
  * @param[out] error
@@ -2552,17 +2554,25 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
  */
 static int
 flow_dv_validate_action_count(struct rte_eth_dev *dev,
+			      const struct rte_flow_action *action,
 			      uint64_t action_flags,
 			      struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	const struct rte_flow_action_count *count;
 
+	if (!priv->config.devx)
+		goto notsup_err;
 	if (action_flags & MLX5_FLOW_ACTION_COUNT)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "duplicate count actions set");
-	if (!priv->config.devx)
-		goto notsup_err;
+	count = (const struct rte_flow_action_count *)action->conf;
+	if (count && count->shared && (action_flags & MLX5_FLOW_ACTION_AGE) &&
+	    !priv->sh->flow_hit_aso_en)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "old age and shared count combination is not supported");
 #ifdef HAVE_IBV_FLOW_DEVX_COUNTERS
 	return 0;
 #endif
@@ -4359,6 +4369,8 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
  *   Attributes of flow that includes this action.
  * @param[in] item_flags
  *   Holds the items detected.
+ * @param[out] count
+ *   Pointer to the COUNT action in sample action list.
  * @param[out] error
  *   Pointer to error structure.
  *
@@ -4371,6 +4383,7 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
 			       struct rte_eth_dev *dev,
 			       const struct rte_flow_attr *attr,
 			       const uint64_t item_flags,
+			       const struct rte_flow_action_count **count,
 			       struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
@@ -4444,16 +4457,13 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
 			++actions_n;
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
-			if (*action_flags & MLX5_FLOW_ACTION_COUNT)
-				return rte_flow_error_set(error, EINVAL,
-						RTE_FLOW_ERROR_TYPE_ACTION,
-						action,
-						"duplicate count action set");
-			ret = flow_dv_validate_action_count(dev,
-							    sub_action_flags,
-							    error);
+			ret = flow_dv_validate_action_count
+				(dev, act,
+				 *action_flags | sub_action_flags,
+				 error);
 			if (ret < 0)
 				return ret;
+			*count = act->conf;
 			sub_action_flags |= MLX5_FLOW_ACTION_COUNT;
 			*action_flags |= MLX5_FLOW_ACTION_COUNT;
 			++actions_n;
@@ -5263,6 +5273,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	const struct rte_flow_action_raw_decap *decap;
 	const struct rte_flow_action_raw_encap *encap;
 	const struct rte_flow_action_rss *rss;
+	const struct rte_flow_action_count *count = NULL;
+	const struct rte_flow_action_count *sample_count = NULL;
 	const struct rte_flow_item_tcp nic_tcp_mask = {
 		.hdr = {
 			.tcp_flags = 0xFF,
@@ -5746,10 +5758,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			++actions_n;
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
-			ret = flow_dv_validate_action_count(dev, action_flags,
+			ret = flow_dv_validate_action_count(dev, actions,
+							    action_flags,
 							    error);
 			if (ret < 0)
 				return ret;
+			count = actions->conf;
 			action_flags |= MLX5_FLOW_ACTION_COUNT;
 			++actions_n;
 			break;
@@ -6015,6 +6029,24 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 							  error);
 			if (ret < 0)
 				return ret;
+			/*
+			 * Validate the regular AGE action (using counter)
+			 * mutual exclusion with share counter actions.
+			 */
+			if (!priv->sh->flow_hit_aso_en) {
+				if (count && count->shared)
+					return rte_flow_error_set
+						(error, EINVAL,
+						RTE_FLOW_ERROR_TYPE_ACTION,
+						NULL,
+						"old age and shared count combination is not supported");
+				if (sample_count)
+					return rte_flow_error_set
+						(error, EINVAL,
+						RTE_FLOW_ERROR_TYPE_ACTION,
+						NULL,
+						"old age action and count must be in the same sub flow");
+			}
 			action_flags |= MLX5_FLOW_ACTION_AGE;
 			++actions_n;
 			break;
@@ -6050,6 +6082,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			ret = flow_dv_validate_action_sample(&action_flags,
 							     actions, dev,
 							     attr, item_flags,
+							     &sample_count,
 							     error);
 			if (ret < 0)
 				return ret;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.437638764 +0000
+++ 0013-net-mlx5-fix-counter-and-age-flow-action-validation.patch	2021-02-09 10:34:57.886583539 +0000
@@ -1 +1 @@
-From 5fe95d736471452cdf9f26d8b01fd0b8d6de90e0 Mon Sep 17 00:00:00 2001
+From 21fd2b8e2d44805d95843d07b954e9a378cf3c6e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5fe95d736471452cdf9f26d8b01fd0b8d6de90e0 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index e0874e3f5f..4410c518f7 100644
+index 7a1de50efa..481a3a7498 100644
@@ -31 +32 @@
-@@ -3118,6 +3118,8 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
+@@ -2542,6 +2542,8 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
@@ -40 +41 @@
-@@ -3128,17 +3130,25 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
+@@ -2552,17 +2554,25 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
@@ -68,4 +69,4 @@
-@@ -5081,6 +5091,8 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
-  *   Pointer to the RSS action.
-  * @param[out] sample_rss
-  *   Pointer to the RSS action in sample action list.
+@@ -4359,6 +4369,8 @@ flow_dv_modify_create_cb(struct mlx5_hlist *list, uint64_t key __rte_unused,
+  *   Attributes of flow that includes this action.
+  * @param[in] item_flags
+  *   Holds the items detected.
@@ -77,4 +78,4 @@
-@@ -5095,6 +5107,7 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
- 			       uint64_t item_flags,
- 			       const struct rte_flow_action_rss *rss,
- 			       const struct rte_flow_action_rss **sample_rss,
+@@ -4371,6 +4383,7 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
+ 			       struct rte_eth_dev *dev,
+ 			       const struct rte_flow_attr *attr,
+ 			       const uint64_t item_flags,
@@ -85 +86 @@
-@@ -5189,16 +5202,13 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
+@@ -4444,16 +4457,13 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
@@ -107 +108,2 @@
-@@ -6017,6 +6027,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5263,6 +5273,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+ 	const struct rte_flow_action_raw_decap *decap;
@@ -109,2 +111 @@
- 	const struct rte_flow_action_rss *rss = NULL;
- 	const struct rte_flow_action_rss *sample_rss = NULL;
+ 	const struct rte_flow_action_rss *rss;
@@ -116 +117 @@
-@@ -6528,10 +6540,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5746,10 +5758,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -130 +131 @@
-@@ -6797,6 +6811,24 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6015,6 +6029,24 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -155 +156,2 @@
-@@ -6833,6 +6865,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6050,6 +6082,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+ 			ret = flow_dv_validate_action_sample(&action_flags,
@@ -158 +159,0 @@
- 							     rss, &sample_rss,

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

* [dpdk-stable] patch 'common/mlx5: fix storing synced MAC to internal table' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (11 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix counter and age flow action validation' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix link status change from firmware' " luca.boccassi
                     ` (16 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Souvik Dey; +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/11/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/c278f2836b54fcb218694754922f79194c920546

Thanks.

Luca Boccassi

---
From c278f2836b54fcb218694754922f79194c920546 Mon Sep 17 00:00:00 2001
From: Souvik Dey <sodey@rbbn.com>
Date: Tue, 2 Feb 2021 12:48:40 -0500
Subject: [PATCH] common/mlx5: fix storing synced MAC to internal table

[ upstream commit 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 ]

As the internal MAC table is divided into Unicast and Multicast address
sections, we should check the type of synced MAC address before storing
it to the internal table. Currently the check is not done, and the
synced MAC of 33:33:00:00:00:01 gets stored in the unicast section
(mostly index 1) causing all subsequent mlx5_set_mc_addr_list()
to fail with error -EADDRINUSE, as the mac_list contains the MAC
33:33:00:00:00:01. This denies adding of any new multicast address to
the internal list and also fails to add the MAC address to the device
in case of SR-IOV VF.

Fixes: f22442cb5d42 ("net/mlx5: reduce Netlink commands dependencies")
Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")

Signed-off-by: Souvik Dey <sodey@rbbn.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_nl.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index 40d8620300..ef7a521379 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -758,11 +758,21 @@ mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx,
 				break;
 		if (j != n)
 			continue;
-		/* Find the first entry available. */
-		for (j = 0; j != n; ++j) {
-			if (rte_is_zero_ether_addr(&mac_addrs[j])) {
-				mac_addrs[j] = macs[i];
-				break;
+		if (rte_is_multicast_ether_addr(&macs[i])) {
+			/* Find the first entry available. */
+			for (j = MLX5_MAX_UC_MAC_ADDRESSES; j != n; ++j) {
+				if (rte_is_zero_ether_addr(&mac_addrs[j])) {
+					mac_addrs[j] = macs[i];
+					break;
+				}
+			}
+		} else {
+			/* Find the first entry available. */
+			for (j = 0; j != MLX5_MAX_UC_MAC_ADDRESSES; ++j) {
+				if (rte_is_zero_ether_addr(&mac_addrs[j])) {
+					mac_addrs[j] = macs[i];
+					break;
+				}
 			}
 		}
 	}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.483867458 +0000
+++ 0014-common-mlx5-fix-storing-synced-MAC-to-internal-table.patch	2021-02-09 10:34:57.886583539 +0000
@@ -1 +1 @@
-From 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 Mon Sep 17 00:00:00 2001
+From c278f2836b54fcb218694754922f79194c920546 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 493f0bb51c1144eedcff2bba199cab1b64ff9fd0 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix link status change from firmware' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (12 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'common/mlx5: fix storing synced MAC to internal table' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix RSS indirection table size' " luca.boccassi
                     ` (15 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Huisong Li; +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/11/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/1c40552b23c5e0376002f8b1b4e371185ab41311

Thanks.

Luca Boccassi

---
From 1c40552b23c5e0376002f8b1b4e371185ab41311 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 3 Feb 2021 20:23:48 +0800
Subject: [PATCH] net/hns3: fix link status change from firmware

[ upstream commit bac6a06441216aceff3588291c79e3a558a1c5a5 ]

When the hardware link status changes, the firmware proactively
reports the link status change message, and then driver update
link status. This feature is lack of a switch to control in PF
driver. Otherwise, this feature does not take effect when the
kernel PF driver that supports the feature is not loaded.

Fixes: 109e4dd1bd7a ("net/hns3: get link state change through mailbox")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h    | 10 ++++++++++
 drivers/net/hns3/hns3_ethdev.c | 31 +++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index a15e7b9d1d..761735da87 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -205,6 +205,9 @@ enum hns3_opcode_type {
 	/* Clear hardware state command */
 	HNS3_OPC_CLEAR_HW_STATE         = 0x700B,
 
+	/* Firmware stats command */
+	HNS3_OPC_FIRMWARE_COMPAT_CFG    = 0x701A,
+
 	/* SFP command */
 	HNS3_OPC_SFP_GET_SPEED          = 0x7104,
 
@@ -632,6 +635,13 @@ enum hns3_promisc_type {
 	HNS3_BROADCAST	= 3,
 };
 
+#define HNS3_LINK_EVENT_REPORT_EN_B	0
+#define HNS3_NCSI_ERROR_REPORT_EN_B	1
+struct hns3_firmware_compat_cmd {
+	uint32_t compat;
+	uint8_t rsv[20];
+};
+
 #define HNS3_MAC_TX_EN_B		6
 #define HNS3_MAC_RX_EN_B		7
 #define HNS3_MAC_PAD_TX_B		11
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index efc1a29459..0eb49a10aa 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3893,6 +3893,26 @@ hns3_buffer_alloc(struct hns3_hw *hw)
 	return ret;
 }
 
+static int
+hns3_firmware_compat_config(struct hns3_hw *hw, bool is_init)
+{
+	struct hns3_firmware_compat_cmd *req;
+	struct hns3_cmd_desc desc;
+	uint32_t compat = 0;
+
+	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_FIRMWARE_COMPAT_CFG, false);
+	req = (struct hns3_firmware_compat_cmd *)desc.data;
+
+	if (is_init) {
+		hns3_set_bit(compat, HNS3_LINK_EVENT_REPORT_EN_B, 1);
+		hns3_set_bit(compat, HNS3_NCSI_ERROR_REPORT_EN_B, 0);
+	}
+
+	req->compat = rte_cpu_to_le_32(compat);
+
+	return hns3_cmd_send(hw, &desc, 1);
+}
+
 static int
 hns3_mac_init(struct hns3_hw *hw)
 {
@@ -4542,6 +4562,15 @@ hns3_init_hardware(struct hns3_adapter *hns)
 		goto err_mac_init;
 	}
 
+	/*
+	 * Requiring firmware to enable some features, driver can
+	 * still work without it.
+	 */
+	ret = hns3_firmware_compat_config(hw, true);
+	if (ret)
+		PMD_INIT_LOG(WARNING, "firmware compatible features not "
+			     "supported, ret = %d.", ret);
+
 	return 0;
 
 err_mac_init:
@@ -4676,6 +4705,7 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
 err_enable_intr:
 	hns3_fdir_filter_uninit(hns);
 err_fdir:
+	(void)hns3_firmware_compat_config(hw, false);
 	hns3_uninit_umv_space(hw);
 err_init_hw:
 	hns3_tqp_stats_uninit(hw);
@@ -4709,6 +4739,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
 	(void)hns3_config_gro(hw, false);
 	hns3_promisc_uninit(hw);
 	hns3_fdir_filter_uninit(hns);
+	(void)hns3_firmware_compat_config(hw, false);
 	hns3_uninit_umv_space(hw);
 	hns3_tqp_stats_uninit(hw);
 	hns3_pf_disable_irq0(hw);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.524078607 +0000
+++ 0015-net-hns3-fix-link-status-change-from-firmware.patch	2021-02-09 10:34:57.894583694 +0000
@@ -1 +1 @@
-From bac6a06441216aceff3588291c79e3a558a1c5a5 Mon Sep 17 00:00:00 2001
+From 1c40552b23c5e0376002f8b1b4e371185ab41311 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bac6a06441216aceff3588291c79e3a558a1c5a5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index dc97a1a852..ad5e188315 100644
+index a15e7b9d1d..761735da87 100644
@@ -26 +27 @@
-@@ -206,6 +206,9 @@ enum hns3_opcode_type {
+@@ -205,6 +205,9 @@ enum hns3_opcode_type {
@@ -36 +37 @@
-@@ -633,6 +636,13 @@ enum hns3_promisc_type {
+@@ -632,6 +635,13 @@ enum hns3_promisc_type {
@@ -51 +52 @@
-index 8c57b630f3..f93870d24b 100644
+index efc1a29459..0eb49a10aa 100644
@@ -54 +55 @@
-@@ -3918,6 +3918,26 @@ hns3_buffer_alloc(struct hns3_hw *hw)
+@@ -3893,6 +3893,26 @@ hns3_buffer_alloc(struct hns3_hw *hw)
@@ -81 +82 @@
-@@ -4610,6 +4630,15 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -4542,6 +4562,15 @@ hns3_init_hardware(struct hns3_adapter *hns)
@@ -97 +98 @@
-@@ -4746,6 +4775,7 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
+@@ -4676,6 +4705,7 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
@@ -105 +106 @@
-@@ -4780,6 +4810,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
+@@ -4709,6 +4739,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/hns3: fix RSS indirection table size' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (13 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix link status change from firmware' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' " luca.boccassi
                     ` (14 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Lijun Ou; +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/11/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/aabbdedad2c26235f9d2a9ca443adcf90e5f769c

Thanks.

Luca Boccassi

---
From aabbdedad2c26235f9d2a9ca443adcf90e5f769c Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Wed, 3 Feb 2021 20:23:49 +0800
Subject: [PATCH] net/hns3: fix RSS indirection table size

[ upstream commit 0fce2c46dc16294dd193dd5bb84506e4570566b1 ]

The driver should not use the fixed value as the validity check of
RSS indirection table size with HW supported. As a result, it will
cause misjudgment when the RSS RETA size with HW supported have
changed.

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

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c       | 11 +++++++++++
 drivers/net/hns3/hns3_cmd.h       |  7 ++++++-
 drivers/net/hns3/hns3_dcb.c       |  2 +-
 drivers/net/hns3/hns3_ethdev.c    | 18 ++++++++++++++++--
 drivers/net/hns3/hns3_ethdev_vf.c | 18 ++++++++++++++++--
 drivers/net/hns3/hns3_flow.c      |  6 +++---
 drivers/net/hns3/hns3_rss.c       | 28 ++++++++++++++--------------
 drivers/net/hns3/hns3_rss.h       |  5 ++---
 8 files changed, 69 insertions(+), 26 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index f58f4f7adc..cd14b1b69d 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -432,6 +432,16 @@ static void hns3_parse_capability(struct hns3_hw *hw,
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_STASH_B, 1);
 }
 
+static uint32_t
+hns3_build_api_caps(void)
+{
+	uint32_t api_caps = 0;
+
+	hns3_set_bit(api_caps, HNS3_API_CAP_FLEX_RSS_TBL_B, 1);
+
+	return rte_cpu_to_le_32(api_caps);
+}
+
 static enum hns3_cmd_status
 hns3_cmd_query_firmware_version_and_capability(struct hns3_hw *hw)
 {
@@ -441,6 +451,7 @@ hns3_cmd_query_firmware_version_and_capability(struct hns3_hw *hw)
 
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_QUERY_FW_VER, 1);
 	resp = (struct hns3_query_version_cmd *)desc.data;
+	resp->api_caps = hns3_build_api_caps();
 
 	/* Initialize the cmd function */
 	ret = hns3_cmd_send(hw, &desc, 1);
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 761735da87..f7ab1f4ca3 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -294,11 +294,16 @@ enum HNS3_CAPS_BITS {
 	HNS3_CAPS_HW_PAD_B,
 	HNS3_CAPS_STASH_B,
 };
+
+enum HNS3_API_CAP_BITS {
+	HNS3_API_CAP_FLEX_RSS_TBL_B,
+};
+
 #define HNS3_QUERY_CAP_LENGTH		3
 struct hns3_query_version_cmd {
 	uint32_t firmware;
 	uint32_t hardware;
-	uint32_t rsv;
+	uint32_t api_caps;
 	uint32_t caps[HNS3_QUERY_CAP_LENGTH]; /* capabilities of device */
 };
 
diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index fb501795f0..ab77acd948 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -634,7 +634,7 @@ hns3_set_rss_size(struct hns3_hw *hw, uint16_t nb_rx_q)
 	 * stage of the reset process.
 	 */
 	if (rte_atomic16_read(&hw->reset.resetting) == 0) {
-		for (i = 0; i < HNS3_RSS_IND_TBL_SIZE; i++)
+		for (i = 0; i < hw->rss_ind_tbl_size; i++)
 			rss_cfg->rss_indirection_tbl[i] =
 							i % hw->alloc_rss_size;
 	}
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 0eb49a10aa..fc41af626b 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2568,7 +2568,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 
 	info->vmdq_queue_num = 0;
 
-	info->reta_size = HNS3_RSS_IND_TBL_SIZE;
+	info->reta_size = hw->rss_ind_tbl_size;
 	info->hash_key_size = HNS3_RSS_KEY_SIZE;
 	info->flow_type_rss_offloads = HNS3_ETH_RSS_SUPPORT;
 
@@ -2958,6 +2958,20 @@ hns3_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
 	hw->intr.int_ql_max = rte_le_to_cpu_16(req0->intr_ql_max);
 }
 
+static int
+hns3_check_dev_specifications(struct hns3_hw *hw)
+{
+	if (hw->rss_ind_tbl_size == 0 ||
+	    hw->rss_ind_tbl_size > HNS3_RSS_IND_TBL_SIZE_MAX) {
+		hns3_err(hw, "the size of hash lookup table configured (%u)"
+			      " exceeds the maximum(%u)", hw->rss_ind_tbl_size,
+			      HNS3_RSS_IND_TBL_SIZE_MAX);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
 static int
 hns3_query_dev_specifications(struct hns3_hw *hw)
 {
@@ -2978,7 +2992,7 @@ hns3_query_dev_specifications(struct hns3_hw *hw)
 
 	hns3_parse_dev_specifications(hw, desc);
 
-	return 0;
+	return hns3_check_dev_specifications(hw);
 }
 
 static int
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 291166c461..34603a4a30 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1022,7 +1022,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 
 	info->vmdq_queue_num = 0;
 
-	info->reta_size = HNS3_RSS_IND_TBL_SIZE;
+	info->reta_size = hw->rss_ind_tbl_size;
 	info->hash_key_size = HNS3_RSS_KEY_SIZE;
 	info->flow_type_rss_offloads = HNS3_ETH_RSS_SUPPORT;
 	info->default_rxportconf.ring_size = HNS3_DEFAULT_RING_DESC;
@@ -1154,6 +1154,20 @@ hns3vf_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
 	hw->intr.int_ql_max = rte_le_to_cpu_16(req0->intr_ql_max);
 }
 
+static int
+hns3vf_check_dev_specifications(struct hns3_hw *hw)
+{
+	if (hw->rss_ind_tbl_size == 0 ||
+	    hw->rss_ind_tbl_size > HNS3_RSS_IND_TBL_SIZE_MAX) {
+		hns3_warn(hw, "the size of hash lookup table configured (%u)"
+			      " exceeds the maximum(%u)", hw->rss_ind_tbl_size,
+			      HNS3_RSS_IND_TBL_SIZE_MAX);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
 static int
 hns3vf_query_dev_specifications(struct hns3_hw *hw)
 {
@@ -1174,7 +1188,7 @@ hns3vf_query_dev_specifications(struct hns3_hw *hw)
 
 	hns3vf_parse_dev_specifications(hw, desc);
 
-	return 0;
+	return hns3vf_check_dev_specifications(hw);
 }
 
 static int
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 89c22dc294..5f5e2b0128 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1505,14 +1505,14 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	uint16_t indir_tbl[HNS3_RSS_IND_TBL_SIZE];
+	uint16_t indir_tbl[HNS3_RSS_IND_TBL_SIZE_MAX];
 	uint16_t j;
 	uint32_t i;
 
 	/* Fill in redirection table */
 	memcpy(indir_tbl, hw->rss_info.rss_indirection_tbl,
 	       sizeof(hw->rss_info.rss_indirection_tbl));
-	for (i = 0, j = 0; i < HNS3_RSS_IND_TBL_SIZE; i++, j++) {
+	for (i = 0, j = 0; i < hw->rss_ind_tbl_size; i++, j++) {
 		j %= num;
 		if (conf->queue[j] >= hw->alloc_rss_size) {
 			hns3_err(hw, "queue id(%u) set to redirection table "
@@ -1523,7 +1523,7 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
 		indir_tbl[i] = conf->queue[j];
 	}
 
-	return hns3_set_rss_indir_table(hw, indir_tbl, HNS3_RSS_IND_TBL_SIZE);
+	return hns3_set_rss_indir_table(hw, indir_tbl, hw->rss_ind_tbl_size);
 }
 
 static int
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index e2f04687b2..7bd7745859 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -312,7 +312,7 @@ hns3_set_rss_indir_table(struct hns3_hw *hw, uint16_t *indir, uint16_t size)
 
 	/* Update redirection table of hw */
 	memcpy(hw->rss_info.rss_indirection_tbl, indir,
-	       sizeof(hw->rss_info.rss_indirection_tbl));
+	       sizeof(uint16_t) * size);
 
 	return 0;
 }
@@ -324,13 +324,13 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw)
 	int ret;
 
 	lut = rte_zmalloc("hns3_rss_lut",
-			  HNS3_RSS_IND_TBL_SIZE * sizeof(uint16_t), 0);
+			  hw->rss_ind_tbl_size * sizeof(uint16_t), 0);
 	if (lut == NULL) {
 		hns3_err(hw, "No hns3_rss_lut memory can be allocated");
 		return -ENOMEM;
 	}
 
-	ret = hns3_set_rss_indir_table(hw, lut, HNS3_RSS_IND_TBL_SIZE);
+	ret = hns3_set_rss_indir_table(hw, lut, hw->rss_ind_tbl_size);
 	if (ret)
 		hns3_err(hw, "RSS uninit indir table failed: %d", ret);
 	rte_free(lut);
@@ -428,7 +428,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	} else if (rss_hf && rss_cfg->conf.types == 0) {
 		/* Enable RSS, restore indirection table by hw's config */
 		ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
-					       HNS3_RSS_IND_TBL_SIZE);
+					       hw->rss_ind_tbl_size);
 		if (ret)
 			goto conf_err;
 	}
@@ -505,15 +505,15 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_rss_conf *rss_cfg = &hw->rss_info;
-	uint16_t i, indir_size = HNS3_RSS_IND_TBL_SIZE; /* Table size is 512 */
-	uint16_t indirection_tbl[HNS3_RSS_IND_TBL_SIZE];
+	uint16_t indirection_tbl[HNS3_RSS_IND_TBL_SIZE_MAX];
 	uint16_t idx, shift;
+	uint16_t i;
 	int ret;
 
-	if (reta_size != indir_size || reta_size > ETH_RSS_RETA_SIZE_512) {
+	if (reta_size != hw->rss_ind_tbl_size) {
 		hns3_err(hw, "The size of hash lookup table configured (%u)"
 			 "doesn't match the number hardware can supported"
-			 "(%u)", reta_size, indir_size);
+			 "(%u)", reta_size, hw->rss_ind_tbl_size);
 		return -EINVAL;
 	}
 	rte_spinlock_lock(&hw->lock);
@@ -536,7 +536,7 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
 	}
 
 	ret = hns3_set_rss_indir_table(hw, indirection_tbl,
-				       HNS3_RSS_IND_TBL_SIZE);
+				       hw->rss_ind_tbl_size);
 
 	rte_spinlock_unlock(&hw->lock);
 	return ret;
@@ -561,13 +561,13 @@ hns3_dev_rss_reta_query(struct rte_eth_dev *dev,
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_rss_conf *rss_cfg = &hw->rss_info;
-	uint16_t i, indir_size = HNS3_RSS_IND_TBL_SIZE; /* Table size is 512 */
 	uint16_t idx, shift;
+	uint16_t i;
 
-	if (reta_size != indir_size || reta_size > ETH_RSS_RETA_SIZE_512) {
+	if (reta_size != hw->rss_ind_tbl_size) {
 		hns3_err(hw, "The size of hash lookup table configured (%u)"
 			 " doesn't match the number hardware can supported"
-			 "(%u)", reta_size, indir_size);
+			 "(%u)", reta_size, hw->rss_ind_tbl_size);
 		return -EINVAL;
 	}
 	rte_spinlock_lock(&hw->lock);
@@ -667,7 +667,7 @@ hns3_set_default_rss_args(struct hns3_hw *hw)
 	memcpy(rss_cfg->key, hns3_hash_key, HNS3_RSS_KEY_SIZE);
 
 	/* Initialize RSS indirection table */
-	for (i = 0; i < HNS3_RSS_IND_TBL_SIZE; i++)
+	for (i = 0; i < hw->rss_ind_tbl_size; i++)
 		rss_cfg->rss_indirection_tbl[i] = i % queue_num;
 }
 
@@ -716,7 +716,7 @@ hns3_config_rss(struct hns3_adapter *hns)
 	 */
 	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG)) {
 		ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
-					       HNS3_RSS_IND_TBL_SIZE);
+					       hw->rss_ind_tbl_size);
 		if (ret)
 			goto rss_tuple_uninit;
 	}
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 6d1d25f227..798c5c62df 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -24,9 +24,8 @@
 	ETH_RSS_L4_DST_ONLY)
 
 #define HNS3_RSS_IND_TBL_SIZE	512 /* The size of hash lookup table */
+#define HNS3_RSS_IND_TBL_SIZE_MAX 2048
 #define HNS3_RSS_KEY_SIZE	40
-#define HNS3_RSS_CFG_TBL_NUM \
-	(HNS3_RSS_IND_TBL_SIZE / HNS3_RSS_CFG_TBL_SIZE)
 #define HNS3_RSS_SET_BITMAP_MSK	0xffff
 
 #define HNS3_RSS_HASH_ALGO_TOEPLITZ	0
@@ -45,7 +44,7 @@ struct hns3_rss_conf {
 	uint8_t hash_algo; /* hash function type definited by hardware */
 	uint8_t key[HNS3_RSS_KEY_SIZE];  /* Hash key */
 	struct hns3_rss_tuple_cfg rss_tuple_sets;
-	uint16_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE]; /* Shadow table */
+	uint16_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE_MAX];
 	uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */
 	bool valid; /* check if RSS rule is valid */
 	/*
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.570261545 +0000
+++ 0016-net-hns3-fix-RSS-indirection-table-size.patch	2021-02-09 10:34:57.906583926 +0000
@@ -1 +1 @@
-From 0fce2c46dc16294dd193dd5bb84506e4570566b1 Mon Sep 17 00:00:00 2001
+From aabbdedad2c26235f9d2a9ca443adcf90e5f769c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0fce2c46dc16294dd193dd5bb84506e4570566b1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 9ed8161372..b75002202a 100644
+index f58f4f7adc..cd14b1b69d 100644
@@ -30 +31 @@
-@@ -430,6 +430,16 @@ static void hns3_parse_capability(struct hns3_hw *hw,
+@@ -432,6 +432,16 @@ static void hns3_parse_capability(struct hns3_hw *hw,
@@ -47 +48 @@
-@@ -439,6 +449,7 @@ hns3_cmd_query_firmware_version_and_capability(struct hns3_hw *hw)
+@@ -441,6 +451,7 @@ hns3_cmd_query_firmware_version_and_capability(struct hns3_hw *hw)
@@ -56 +57 @@
-index ad5e188315..5640fe4ead 100644
+index 761735da87..f7ab1f4ca3 100644
@@ -59 +60 @@
-@@ -295,11 +295,16 @@ enum HNS3_CAPS_BITS {
+@@ -294,11 +294,16 @@ enum HNS3_CAPS_BITS {
@@ -78 +79 @@
-index 5aa374ceaa..7fc6ac92d8 100644
+index fb501795f0..ab77acd948 100644
@@ -81 +82 @@
-@@ -644,7 +644,7 @@ hns3_set_rss_size(struct hns3_hw *hw, uint16_t nb_rx_q)
+@@ -634,7 +634,7 @@ hns3_set_rss_size(struct hns3_hw *hw, uint16_t nb_rx_q)
@@ -84 +85 @@
- 	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
+ 	if (rte_atomic16_read(&hw->reset.resetting) == 0) {
@@ -91 +92 @@
-index f93870d24b..c0ab3fc960 100644
+index 0eb49a10aa..fc41af626b 100644
@@ -94 +95 @@
-@@ -2593,7 +2593,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -2568,7 +2568,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
@@ -103 +104 @@
-@@ -2983,6 +2983,20 @@ hns3_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
+@@ -2958,6 +2958,20 @@ hns3_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
@@ -124 +125 @@
-@@ -3003,7 +3017,7 @@ hns3_query_dev_specifications(struct hns3_hw *hw)
+@@ -2978,7 +2992,7 @@ hns3_query_dev_specifications(struct hns3_hw *hw)
@@ -134 +135 @@
-index faf7e01c01..2446574474 100644
+index 291166c461..34603a4a30 100644
@@ -137 +138 @@
-@@ -1016,7 +1016,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -1022,7 +1022,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
@@ -146 +147 @@
-@@ -1148,6 +1148,20 @@ hns3vf_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
+@@ -1154,6 +1154,20 @@ hns3vf_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc)
@@ -167 +168 @@
-@@ -1168,7 +1182,7 @@ hns3vf_query_dev_specifications(struct hns3_hw *hw)
+@@ -1174,7 +1188,7 @@ hns3vf_query_dev_specifications(struct hns3_hw *hw)
@@ -177 +178 @@
-index 3e387ac0bf..a6011245c5 100644
+index 89c22dc294..5f5e2b0128 100644
@@ -180 +181 @@
-@@ -1489,14 +1489,14 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
+@@ -1505,14 +1505,14 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
@@ -197 +198 @@
-@@ -1507,7 +1507,7 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
+@@ -1523,7 +1523,7 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
@@ -207 +208 @@
-index 7d1a29782a..858e31a234 100644
+index e2f04687b2..7bd7745859 100644
@@ -290 +291 @@
-@@ -662,7 +662,7 @@ hns3_rss_set_default_args(struct hns3_hw *hw)
+@@ -667,7 +667,7 @@ hns3_set_default_rss_args(struct hns3_hw *hw)
@@ -299 +300 @@
-@@ -711,7 +711,7 @@ hns3_config_rss(struct hns3_adapter *hns)
+@@ -716,7 +716,7 @@ hns3_config_rss(struct hns3_adapter *hns)
@@ -309 +310 @@
-index 05d5c2642b..94668ed6d5 100644
+index 6d1d25f227..798c5c62df 100644

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

* [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (14 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix RSS indirection table size' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' " luca.boccassi
                     ` (13 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Chengwen Feng; +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/11/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/5e0908d617a4393ee8210b46ee8346388802a723

Thanks.

Luca Boccassi

---
From 5e0908d617a4393ee8210b46ee8346388802a723 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 3 Feb 2021 20:23:51 +0800
Subject: [PATCH] net/hns3: remove MPLS from supported flow items

[ upstream commit e9550856f8c65b6e15f8f59810560bc6d240a1f8 ]

The Kunpeng920 and Kunpeng930 don't support parse MPLS packet, so
remove the type from supported flow items.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 5f5e2b0128..d1bf9832a9 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -44,8 +44,7 @@ static enum rte_flow_item_type first_items[] = {
 	RTE_FLOW_ITEM_TYPE_NVGRE,
 	RTE_FLOW_ITEM_TYPE_VXLAN,
 	RTE_FLOW_ITEM_TYPE_GENEVE,
-	RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
-	RTE_FLOW_ITEM_TYPE_MPLS
+	RTE_FLOW_ITEM_TYPE_VXLAN_GPE
 };
 
 static enum rte_flow_item_type L2_next_items[] = {
@@ -65,8 +64,7 @@ static enum rte_flow_item_type L3_next_items[] = {
 static enum rte_flow_item_type L4_next_items[] = {
 	RTE_FLOW_ITEM_TYPE_VXLAN,
 	RTE_FLOW_ITEM_TYPE_GENEVE,
-	RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
-	RTE_FLOW_ITEM_TYPE_MPLS
+	RTE_FLOW_ITEM_TYPE_VXLAN_GPE
 };
 
 static enum rte_flow_item_type tunnel_next_items[] = {
@@ -1145,8 +1143,7 @@ is_tunnel_packet(enum rte_flow_item_type type)
 	if (type == RTE_FLOW_ITEM_TYPE_VXLAN_GPE ||
 	    type == RTE_FLOW_ITEM_TYPE_VXLAN ||
 	    type == RTE_FLOW_ITEM_TYPE_NVGRE ||
-	    type == RTE_FLOW_ITEM_TYPE_GENEVE ||
-	    type == RTE_FLOW_ITEM_TYPE_MPLS)
+	    type == RTE_FLOW_ITEM_TYPE_GENEVE)
 		return true;
 	return false;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.615202798 +0000
+++ 0017-net-hns3-remove-MPLS-from-supported-flow-items.patch	2021-02-09 10:34:57.910584004 +0000
@@ -1 +1 @@
-From e9550856f8c65b6e15f8f59810560bc6d240a1f8 Mon Sep 17 00:00:00 2001
+From 5e0908d617a4393ee8210b46ee8346388802a723 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9550856f8c65b6e15f8f59810560bc6d240a1f8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a6011245c5..c484114b32 100644
+index 5f5e2b0128..d1bf9832a9 100644
@@ -42 +43 @@
-@@ -1118,8 +1116,7 @@ is_tunnel_packet(enum rte_flow_item_type type)
+@@ -1145,8 +1143,7 @@ is_tunnel_packet(enum rte_flow_item_type type)

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

* [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (15 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' " luca.boccassi
                     ` (12 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Chengwen Feng; +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/11/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/ffb6a48b68564c01ba98333d4fabf4107e937019

Thanks.

Luca Boccassi

---
From ffb6a48b68564c01ba98333d4fabf4107e937019 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 3 Feb 2021 20:23:54 +0800
Subject: [PATCH] net/hns3: fix flow director rule residue on malloc failure

[ upstream commit 2b9a66e1b606d3813d72dd81c626949e09706e27 ]

After FD rule config success, driver will malloc fdir_rule to hold the
rule info, if malloc fail the FD rule in hardware was not cleanup.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index d1bf9832a9..8e4519a425 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1822,17 +1822,18 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 
 		flow->counter_id = fdir_rule.act_cnt.id;
 	}
+
+	fdir_rule_ptr = rte_zmalloc("hns3 fdir rule",
+				    sizeof(struct hns3_fdir_rule_ele),
+				    0);
+	if (fdir_rule_ptr == NULL) {
+		hns3_err(hw, "failed to allocate fdir_rule memory.");
+		ret = -ENOMEM;
+		goto err_fdir;
+	}
+
 	ret = hns3_fdir_filter_program(hns, &fdir_rule, false);
 	if (!ret) {
-		fdir_rule_ptr = rte_zmalloc("hns3 fdir rule",
-					    sizeof(struct hns3_fdir_rule_ele),
-					    0);
-		if (fdir_rule_ptr == NULL) {
-			hns3_err(hw, "Failed to allocate fdir_rule memory");
-			ret = -ENOMEM;
-			goto err_fdir;
-		}
-
 		memcpy(&fdir_rule_ptr->fdir_conf, &fdir_rule,
 			sizeof(struct hns3_fdir_rule));
 		TAILQ_INSERT_TAIL(&process_list->fdir_list,
@@ -1843,10 +1844,10 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		return flow;
 	}
 
+	rte_free(fdir_rule_ptr);
 err_fdir:
 	if (fdir_rule.flags & HNS3_RULE_FLAG_COUNTER)
 		hns3_counter_release(dev, fdir_rule.act_cnt.id);
-
 err:
 	rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 			   "Failed to create flow");
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.654756438 +0000
+++ 0018-net-hns3-fix-flow-director-rule-residue-on-malloc-fa.patch	2021-02-09 10:34:57.910584004 +0000
@@ -1 +1 @@
-From 2b9a66e1b606d3813d72dd81c626949e09706e27 Mon Sep 17 00:00:00 2001
+From ffb6a48b68564c01ba98333d4fabf4107e937019 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b9a66e1b606d3813d72dd81c626949e09706e27 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c484114b32..a016857aa5 100644
+index d1bf9832a9..8e4519a425 100644
@@ -22 +23 @@
-@@ -1806,17 +1806,18 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1822,17 +1822,18 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -50 +51 @@
-@@ -1827,10 +1828,10 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1843,10 +1844,10 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,

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

* [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (16 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' " luca.boccassi
                     ` (11 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Chengchang Tang; +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/11/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/11049ebbd3719e155ce880ad5fbb29c481396677

Thanks.

Luca Boccassi

---
From 11049ebbd3719e155ce880ad5fbb29c481396677 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 3 Feb 2021 20:23:55 +0800
Subject: [PATCH] net/hns3: fix firmware exceptions by concurrent commands

[ upstream commit 5ef63df1286861530d23da828415411a4c0a48a5 ]

There are two scenarios that command queue uninit performed
concurrently with the firmware command: asynchronous command
and timeout command.

For asynchronous command, if a large number of functions send
commands, these commands may need to be queued to wait for
firmware processing. If a function is uninited suddenly, CMDQ
clearing and firmware processing may be performed concurrently.

For timeout command, if the command failed due to busy scheduling
of firmware, this command will be processed in the next scheduling.
And this may lead to concurrency.

The preceding concurrency may lead to a firmware exceptions.

This patch add a waiting time to ensure the firmware complete the
processing of left over command when PMD uninit.

Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 14 +++++++++++++-
 drivers/net/hns3/hns3_cmd.h |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index cd14b1b69d..76d16a5a92 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -583,9 +583,21 @@ hns3_cmd_destroy_queue(struct hns3_hw *hw)
 void
 hns3_cmd_uninit(struct hns3_hw *hw)
 {
+	rte_atomic16_set(&hw->reset.disable_cmd, 1);
+
+	/*
+	 * A delay is added to ensure that the register cleanup operations
+	 * will not be performed concurrently with the firmware command and
+	 * ensure that all the reserved commands are executed.
+	 * Concurrency may occur in two scenarios: asynchronous command and
+	 * timeout command. If the command fails to be executed due to busy
+	 * scheduling, the command will be processed in the next scheduling
+	 * of the firmware.
+	 */
+	rte_delay_ms(HNS3_CMDQ_CLEAR_WAIT_TIME);
+
 	rte_spinlock_lock(&hw->cmq.csq.lock);
 	rte_spinlock_lock(&hw->cmq.crq.lock);
-	rte_atomic16_set(&hw->reset.disable_cmd, 1);
 	hns3_cmd_clear_regs(hw);
 	rte_spinlock_unlock(&hw->cmq.crq.lock);
 	rte_spinlock_unlock(&hw->cmq.csq.lock);
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index f7ab1f4ca3..20c373590f 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #define HNS3_CMDQ_TX_TIMEOUT		30000
+#define HNS3_CMDQ_CLEAR_WAIT_TIME	200
 #define HNS3_CMDQ_RX_INVLD_B		0
 #define HNS3_CMDQ_RX_OUTVLD_B		1
 #define HNS3_CMD_DESC_ALIGNMENT		4096
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.690591920 +0000
+++ 0019-net-hns3-fix-firmware-exceptions-by-concurrent-comma.patch	2021-02-09 10:34:57.910584004 +0000
@@ -1 +1 @@
-From 5ef63df1286861530d23da828415411a4c0a48a5 Mon Sep 17 00:00:00 2001
+From 11049ebbd3719e155ce880ad5fbb29c481396677 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ef63df1286861530d23da828415411a4c0a48a5 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 3d6ffc090f..32cd56b478 100644
+index cd14b1b69d..76d16a5a92 100644
@@ -38 +39 @@
-@@ -582,9 +582,21 @@ hns3_cmd_destroy_queue(struct hns3_hw *hw)
+@@ -583,9 +583,21 @@ hns3_cmd_destroy_queue(struct hns3_hw *hw)
@@ -42 +43 @@
-+	__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
++	rte_atomic16_set(&hw->reset.disable_cmd, 1);
@@ -57 +58 @@
--	__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+-	rte_atomic16_set(&hw->reset.disable_cmd, 1);
@@ -62 +63 @@
-index 5640fe4ead..5010278e22 100644
+index f7ab1f4ca3..20c373590f 100644

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

* [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (17 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' " luca.boccassi
                     ` (10 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Chengchang Tang; +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/11/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/224a29f58811d1a81540275ed334e86dbe4cd518

Thanks.

Luca Boccassi

---
From 224a29f58811d1a81540275ed334e86dbe4cd518 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 3 Feb 2021 20:23:56 +0800
Subject: [PATCH] net/hns3: fix VF reset on mailbox failure

[ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ]

Currently, during the VF reset, the VF will send a MBX to inform
PF to reset it and the disable command bit will be set whether
the MBX is successful. Generally, multiple reset attempts are made
after a failure. However, because the command is disabled, all
subsequent reset will all fail.

This patch disable the command only after the MBX message is
successfully.

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

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 34603a4a30..22ee2f4000 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2376,15 +2376,17 @@ static int
 hns3vf_prepare_reset(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
-	int ret = 0;
+	int ret;
 
 	if (hw->reset.level == HNS3_VF_FUNC_RESET) {
 		ret = hns3_send_mbx_msg(hw, HNS3_MBX_RESET, 0, NULL,
 					0, true, NULL, 0);
+		if (ret)
+			return ret;
 	}
 	rte_atomic16_set(&hw->reset.disable_cmd, 1);
 
-	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-09 10:34:58.728868872 +0000
+++ 0020-net-hns3-fix-VF-reset-on-mailbox-failure.patch	2021-02-09 10:34:57.914584081 +0000
@@ -1 +1 @@
-From ff81c6b7d053d19fa5d766de449e9a1a462661f5 Mon Sep 17 00:00:00 2001
+From 224a29f58811d1a81540275ed334e86dbe4cd518 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 4f9da4a56c..a607bd3a91 100644
+index 34603a4a30..22ee2f4000 100644
@@ -28 +29 @@
-@@ -2404,15 +2404,17 @@ static int
+@@ -2376,15 +2376,17 @@ static int
@@ -41 +42 @@
- 	__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+ 	rte_atomic16_set(&hw->reset.disable_cmd, 1);

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

* [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (18 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'app/testpmd: support shared age action query' " luca.boccassi
                     ` (9 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Huisong Li; +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/11/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/62ac98640b29e7f519c6a97fc694e012a5dcc22d

Thanks.

Luca Boccassi

---
From 62ac98640b29e7f519c6a97fc694e012a5dcc22d Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 3 Feb 2021 20:23:57 +0800
Subject: [PATCH] net/hns3: validate requested maximum Rx frame length

[ upstream commit b8a67b10ee616e4635d3f6f8c8c25d0fdb987b6c ]

When jumbo frame is enabled, the MTU size needs to be modified
based on 'max_rx_pkt_len'. Driver needs to check the validity
of 'max_rx_pkt_len'. And it should be in the range of
HNS3_DEFAULT_FRAME_LEN and HNS3_MAX_FRAME_LEN. Otherwise, it may
cause that the MTU size is inconsistent with jumbo frame offload.

Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 19 +++++++++++++------
 drivers/net/hns3/hns3_ethdev_vf.c | 19 +++++++++++++------
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index fc41af626b..8f0e5a3c81 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2313,6 +2313,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	uint16_t nb_rx_q = dev->data->nb_rx_queues;
 	uint16_t nb_tx_q = dev->data->nb_tx_queues;
 	struct rte_eth_rss_conf rss_conf;
+	uint32_t max_rx_pkt_len;
 	uint16_t mtu;
 	bool gro_en;
 	int ret;
@@ -2371,12 +2372,18 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	 * according to the maximum RX packet length.
 	 */
 	if (conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		/*
-		 * Security of max_rx_pkt_len is guaranteed in dpdk frame.
-		 * Maximum value of max_rx_pkt_len is HNS3_MAX_FRAME_LEN, so it
-		 * can safely assign to "uint16_t" type variable.
-		 */
-		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(conf->rxmode.max_rx_pkt_len);
+		max_rx_pkt_len = conf->rxmode.max_rx_pkt_len;
+		if (max_rx_pkt_len > HNS3_MAX_FRAME_LEN ||
+		    max_rx_pkt_len <= HNS3_DEFAULT_FRAME_LEN) {
+			hns3_err(hw, "maximum Rx packet length must be greater "
+				 "than %u and less than %u when jumbo frame enabled.",
+				 (uint16_t)HNS3_DEFAULT_FRAME_LEN,
+				 (uint16_t)HNS3_MAX_FRAME_LEN);
+			ret = -EINVAL;
+			goto cfg_err;
+		}
+
+		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(max_rx_pkt_len);
 		ret = hns3_dev_mtu_set(dev, mtu);
 		if (ret)
 			goto cfg_err;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 22ee2f4000..9c84740d7b 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -779,6 +779,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	uint16_t nb_rx_q = dev->data->nb_rx_queues;
 	uint16_t nb_tx_q = dev->data->nb_tx_queues;
 	struct rte_eth_rss_conf rss_conf;
+	uint32_t max_rx_pkt_len;
 	uint16_t mtu;
 	bool gro_en;
 	int ret;
@@ -831,12 +832,18 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	 * according to the maximum RX packet length.
 	 */
 	if (conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		/*
-		 * Security of max_rx_pkt_len is guaranteed in dpdk frame.
-		 * Maximum value of max_rx_pkt_len is HNS3_MAX_FRAME_LEN, so it
-		 * can safely assign to "uint16_t" type variable.
-		 */
-		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(conf->rxmode.max_rx_pkt_len);
+		max_rx_pkt_len = conf->rxmode.max_rx_pkt_len;
+		if (max_rx_pkt_len > HNS3_MAX_FRAME_LEN ||
+		    max_rx_pkt_len <= HNS3_DEFAULT_FRAME_LEN) {
+			hns3_err(hw, "maximum Rx packet length must be greater "
+				 "than %u and less than %u when jumbo frame enabled.",
+				 (uint16_t)HNS3_DEFAULT_FRAME_LEN,
+				 (uint16_t)HNS3_MAX_FRAME_LEN);
+			ret = -EINVAL;
+			goto cfg_err;
+		}
+
+		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(max_rx_pkt_len);
 		ret = hns3vf_dev_mtu_set(dev, mtu);
 		if (ret)
 			goto cfg_err;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.767300678 +0000
+++ 0021-net-hns3-validate-requested-maximum-Rx-frame-length.patch	2021-02-09 10:34:57.922584236 +0000
@@ -1 +1 @@
-From b8a67b10ee616e4635d3f6f8c8c25d0fdb987b6c Mon Sep 17 00:00:00 2001
+From 62ac98640b29e7f519c6a97fc694e012a5dcc22d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8a67b10ee616e4635d3f6f8c8c25d0fdb987b6c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a7ae8f81d8..dbd48deb3a 100644
+index fc41af626b..8f0e5a3c81 100644
@@ -26 +27 @@
-@@ -2343,6 +2343,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2313,6 +2313,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -34 +35 @@
-@@ -2396,12 +2397,18 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2371,12 +2372,18 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -60 +61 @@
-index a607bd3a91..3f9f328170 100644
+index 22ee2f4000..9c84740d7b 100644
@@ -63 +64 @@
-@@ -778,6 +778,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -779,6 +779,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
@@ -71 +72 @@
-@@ -825,12 +826,18 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -831,12 +832,18 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'app/testpmd: support shared age action query' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (19 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' " luca.boccassi
                     ` (8 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/df1ba25f9579a02d1de29b70adbb77d946a37de8

Thanks.

Luca Boccassi

---
From df1ba25f9579a02d1de29b70adbb77d946a37de8 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Thu, 4 Feb 2021 12:04:15 +0200
Subject: [PATCH] app/testpmd: support shared age action query

[ upstream commit dec7c4bd905486c318dc3a7e626de5aeb6e6167e ]

Shared age action query was implemented as part of flow query,
but was not implemented as part of shared action query.

This patch adds the required implementation.

Fixes: 2f622174bf86 ("app/testpmd: support query of age action")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-pmd/config.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 0e2b9f7d3c..dab8afe5dd 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1879,6 +1879,7 @@ port_shared_action_query(portid_t port_id, uint32_t id)
 		return -EINVAL;
 	switch (psa->type) {
 	case RTE_FLOW_ACTION_TYPE_RSS:
+	case RTE_FLOW_ACTION_TYPE_AGE:
 		data = &default_data;
 		break;
 	default:
@@ -1895,6 +1896,20 @@ port_shared_action_query(portid_t port_id, uint32_t id)
 			       *((uint32_t *)data));
 		data = NULL;
 		break;
+	case RTE_FLOW_ACTION_TYPE_AGE:
+		if (!ret) {
+			struct rte_flow_query_age *resp = data;
+
+			printf("AGE:\n"
+			       " aged: %u\n"
+			       " sec_since_last_hit_valid: %u\n"
+			       " sec_since_last_hit: %" PRIu32 "\n",
+			       resp->aged,
+			       resp->sec_since_last_hit_valid,
+			       resp->sec_since_last_hit);
+		}
+		data = NULL;
+		break;
 	default:
 		printf("Shared action %u (type: %d) on port %u doesn't support"
 		       " query\n", id, psa->type, port_id);
@@ -1902,6 +1917,7 @@ port_shared_action_query(portid_t port_id, uint32_t id)
 	}
 	return ret;
 }
+
 static struct port_flow_tunnel *
 port_flow_tunnel_offload_cmd_prep(portid_t port_id,
 				  const struct rte_flow_item *pattern,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.811950914 +0000
+++ 0022-app-testpmd-support-shared-age-action-query.patch	2021-02-09 10:34:57.926584313 +0000
@@ -1 +1 @@
-From dec7c4bd905486c318dc3a7e626de5aeb6e6167e Mon Sep 17 00:00:00 2001
+From df1ba25f9579a02d1de29b70adbb77d946a37de8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dec7c4bd905486c318dc3a7e626de5aeb6e6167e ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (20 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'app/testpmd: support shared age action query' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' " luca.boccassi
                     ` (7 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Cian Ferriter, 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/11/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/63e152d10758a6eae614f9d39ade06f24fcdf0d1

Thanks.

Luca Boccassi

---
From 63e152d10758a6eae614f9d39ade06f24fcdf0d1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 3 Feb 2021 17:30:25 +0000
Subject: [PATCH] net/pcap: fix byte stats for drop Tx

[ upstream commit cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 ]

Drop Tx path in pcap is Tx that just drops the packets, which is used
for the case only Rx from a pcap file is requested/matters.

The byte stats was calculated using first mbuf segment, which gives
wrong values for multi segmented mbufs, updated to use packet length
instead.

Bugzilla ID: 597
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")

Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cian Ferriter <cian.ferriter@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index a32b1f3f37..d44e1d39ae 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -386,7 +386,7 @@ eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		return 0;
 
 	for (i = 0; i < nb_pkts; i++) {
-		tx_bytes += bufs[i]->data_len;
+		tx_bytes += bufs[i]->pkt_len;
 		rte_pktmbuf_free(bufs[i]);
 	}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.854556574 +0000
+++ 0023-net-pcap-fix-byte-stats-for-drop-Tx.patch	2021-02-09 10:34:57.926584313 +0000
@@ -1 +1 @@
-From cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 Mon Sep 17 00:00:00 2001
+From 63e152d10758a6eae614f9d39ade06f24fcdf0d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index ff02ade70d..c7751b7ba7 100644
+index a32b1f3f37..d44e1d39ae 100644

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

* [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (21 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix shared RSS capability check' " luca.boccassi
                     ` (6 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Cian Ferriter, 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/11/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/396b447e24df0ea62a81f8251e3e1805a86a0e32

Thanks.

Luca Boccassi

---
From 396b447e24df0ea62a81f8251e3e1805a86a0e32 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 4 Feb 2021 16:51:03 +0000
Subject: [PATCH] net/pcap: fix infinite Rx with large files

[ upstream commit f62490e64d60cb564240721d55f8b51d2bd719a9 ]

Packet forwarding is not working when infinite Rx feature is used with
large .pcap files that has high number of packets.

The problem is number of allocated mbufs are less than the infinite Rx
ring size, and all mbufs consumed to fill the ring, so there is no mbuf
left for forwarding.

Current logic can not detect that infinite Rx ring is not filled
completely and no more mbufs left, and setup continues which leads
silent fail on packet forwarding.

There isn't much can be done when there is not enough mbuf for the given
.pcap file, so additional checks added to detect the case and fail
explicitly with an error log.

Bugzilla ID: 595
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")

Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cian Ferriter <cian.ferriter@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 40 ++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 15 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index d44e1d39ae..40f4fa9021 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -735,6 +735,17 @@ eth_stats_reset(struct rte_eth_dev *dev)
 	return 0;
 }
 
+static inline void
+infinite_rx_ring_free(struct rte_ring *pkts)
+{
+	struct rte_mbuf *bufs;
+
+	while (!rte_ring_dequeue(pkts, (void **)&bufs))
+		rte_pktmbuf_free(bufs);
+
+	rte_ring_free(pkts);
+}
+
 static int
 eth_dev_close(struct rte_eth_dev *dev)
 {
@@ -753,7 +764,6 @@ eth_dev_close(struct rte_eth_dev *dev)
 	if (internals->infinite_rx) {
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			struct pcap_rx_queue *pcap_q = &internals->rx_queue[i];
-			struct rte_mbuf *pcap_buf;
 
 			/*
 			 * 'pcap_q->pkts' can be NULL if 'eth_dev_close()'
@@ -762,11 +772,7 @@ eth_dev_close(struct rte_eth_dev *dev)
 			if (pcap_q->pkts == NULL)
 				continue;
 
-			while (!rte_ring_dequeue(pcap_q->pkts,
-					(void **)&pcap_buf))
-				rte_pktmbuf_free(pcap_buf);
-
-			rte_ring_free(pcap_q->pkts);
+			infinite_rx_ring_free(pcap_q->pkts);
 		}
 	}
 
@@ -835,21 +841,25 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
 		while (eth_pcap_rx(pcap_q, bufs, 1)) {
 			/* Check for multiseg mbufs. */
 			if (bufs[0]->nb_segs != 1) {
-				rte_pktmbuf_free(*bufs);
-
-				while (!rte_ring_dequeue(pcap_q->pkts,
-						(void **)bufs))
-					rte_pktmbuf_free(*bufs);
-
-				rte_ring_free(pcap_q->pkts);
-				PMD_LOG(ERR, "Multiseg mbufs are not supported in infinite_rx "
-						"mode.");
+				infinite_rx_ring_free(pcap_q->pkts);
+				PMD_LOG(ERR,
+					"Multiseg mbufs are not supported in infinite_rx mode.");
 				return -EINVAL;
 			}
 
 			rte_ring_enqueue_bulk(pcap_q->pkts,
 					(void * const *)bufs, 1, NULL);
 		}
+
+		if (rte_ring_count(pcap_q->pkts) < pcap_pkt_count) {
+			infinite_rx_ring_free(pcap_q->pkts);
+			PMD_LOG(ERR,
+				"Not enough mbufs to accommodate packets in pcap file. "
+				"At least %" PRIu64 " mbufs per queue is required.",
+				pcap_pkt_count);
+			return -EINVAL;
+		}
+
 		/*
 		 * Reset the stats for this queue since eth_pcap_rx calls above
 		 * didn't result in the application receiving packets.
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.891772691 +0000
+++ 0024-net-pcap-fix-infinite-Rx-with-large-files.patch	2021-02-09 10:34:57.926584313 +0000
@@ -1 +1 @@
-From f62490e64d60cb564240721d55f8b51d2bd719a9 Mon Sep 17 00:00:00 2001
+From 396b447e24df0ea62a81f8251e3e1805a86a0e32 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f62490e64d60cb564240721d55f8b51d2bd719a9 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index c7751b7ba7..90f5d75ea8 100644
+index d44e1d39ae..40f4fa9021 100644

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

* [dpdk-stable] patch 'net/mlx5: fix shared RSS capability check' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (22 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: validate hash Rx queue pointer' " luca.boccassi
                     ` (5 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/39c65c5cb1567c287e46492ff4f978f401d63c54

Thanks.

Luca Boccassi

---
From 39c65c5cb1567c287e46492ff4f978f401d63c54 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Wed, 3 Feb 2021 12:08:42 +0200
Subject: [PATCH] net/mlx5: fix shared RSS capability check

[ upstream commit ae8fdc8067c77496bc07680d42f8aa7f6be34a5b ]

Existing code to create shared RSS action doesn't fully check
driver capabilities.
Using older driver, if DevX capabilities are insufficient,
the IBV operations are used.
In this case the ind_table_modify operation is not supported, and
shared RSS action can't be modified after creation.

This patch adds check of driver capability, and fails the validation
for shared RSS action in case it is insufficient.

Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 481a3a7498..3fdc3ffe16 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11772,6 +11772,10 @@ __flow_dv_action_rss_update(struct rte_eth_dev *dev, uint32_t idx,
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "invalid shared action to update");
+	if (priv->obj_ops.ind_table_modify == NULL)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "cannot modify indirection table");
 	queue = mlx5_malloc(MLX5_MEM_ZERO,
 			    RTE_ALIGN_CEIL(queue_size, sizeof(void *)),
 			    0, SOCKET_ID_ANY);
@@ -12654,6 +12658,20 @@ flow_dv_action_validate(struct rte_eth_dev *dev,
 	RTE_SET_USED(conf);
 	switch (action->type) {
 	case RTE_FLOW_ACTION_TYPE_RSS:
+		/*
+		 * priv->obj_ops is set according to driver capabilities.
+		 * When DevX capabilities are
+		 * sufficient, it is set to devx_obj_ops.
+		 * Otherwise, it is set to ibv_obj_ops.
+		 * ibv_obj_ops doesn't support ind_table_modify operation.
+		 * In this case the shared RSS action can't be used.
+		 */
+		if (priv->obj_ops.ind_table_modify == NULL)
+			return rte_flow_error_set
+					(err, ENOTSUP,
+					 RTE_FLOW_ERROR_TYPE_ACTION,
+					 NULL,
+					 "shared RSS action not supported");
 		return mlx5_validate_action_rss(dev, action, err);
 	case RTE_FLOW_ACTION_TYPE_AGE:
 		if (!priv->sh->aso_age_mng)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.928002018 +0000
+++ 0025-net-mlx5-fix-shared-RSS-capability-check.patch	2021-02-09 10:34:57.938584546 +0000
@@ -1 +1 @@
-From ae8fdc8067c77496bc07680d42f8aa7f6be34a5b Mon Sep 17 00:00:00 2001
+From 39c65c5cb1567c287e46492ff4f978f401d63c54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ae8fdc8067c77496bc07680d42f8aa7f6be34a5b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index d162cf0999..76696b7b62 100644
+index 481a3a7498..3fdc3ffe16 100644
@@ -29 +30 @@
-@@ -13000,6 +13000,10 @@ __flow_dv_action_rss_update(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11772,6 +11772,10 @@ __flow_dv_action_rss_update(struct rte_eth_dev *dev, uint32_t idx,
@@ -40 +41 @@
-@@ -13882,6 +13886,20 @@ flow_dv_action_validate(struct rte_eth_dev *dev,
+@@ -12654,6 +12658,20 @@ flow_dv_action_validate(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: validate hash Rx queue pointer' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (23 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix shared RSS capability check' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/enic: fix filter log message' " luca.boccassi
                     ` (4 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 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/11/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/b7a6f0c9edf0f660bff5951095452c67a21e9de8

Thanks.

Luca Boccassi

---
From b7a6f0c9edf0f660bff5951095452c67a21e9de8 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Wed, 3 Feb 2021 12:09:09 +0200
Subject: [PATCH] net/mlx5: validate hash Rx queue pointer

[ upstream commit 207b4d06c33896ac723139b3af62bf710ce082f9 ]

Implementation of mlx5_hrxq_get() tries to get pointer to a hrxq
object, by reusing an existing hrxq, or creating a new one.
There is no check of the obtained pointer, so using it might result
in error.

This patch adds check of the pointer before using it, and return 0
if the pointer is NULL to indicate error.

Fixes: e1592b6c4dea ("net/mlx5: make Rx queue thread safe")

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

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index e4cbe6430b..1a5cf99d51 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -2424,7 +2424,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,
 			return 0;
 		hrxq = container_of(entry, typeof(*hrxq), entry);
 	}
-	return hrxq->idx;
+	if (hrxq)
+		return hrxq->idx;
+	return 0;
 }
 
 /**
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.970099667 +0000
+++ 0026-net-mlx5-validate-hash-Rx-queue-pointer.patch	2021-02-09 10:34:57.942584623 +0000
@@ -1 +1 @@
-From 207b4d06c33896ac723139b3af62bf710ce082f9 Mon Sep 17 00:00:00 2001
+From b7a6f0c9edf0f660bff5951095452c67a21e9de8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 207b4d06c33896ac723139b3af62bf710ce082f9 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 92e3a792e1..8f9ee97f7a 100644
+index e4cbe6430b..1a5cf99d51 100644
@@ -27 +28 @@
-@@ -2353,7 +2353,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,
+@@ -2424,7 +2424,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/enic: fix filter log message' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (24 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: validate hash Rx queue pointer' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'event/dlb: fix accessing uninitialized variables' " luca.boccassi
                     ` (3 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: Hanoch Haim, John Daley, 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/11/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/253c91a3342cd5608e05d28d5ffc2ff03b4728f9

Thanks.

Luca Boccassi

---
From 253c91a3342cd5608e05d28d5ffc2ff03b4728f9 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Thu, 4 Feb 2021 17:35:03 -0800
Subject: [PATCH] net/enic: fix filter log message

[ upstream commit 89ce72c6ffb4337273bb292dc419511f1d619879 ]

A debug message for filter API is using a wrong flag. Use the correct
one.

Fixes: 936a9b9975e7 ("net/enic: flow API debug")

Reported-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 453c11a3b3..92b1c9eda6 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1389,7 +1389,7 @@ enic_dump_filter(const struct filter_v2 *filt)
 
 		if (gp->mask_flags & FILTER_GENERIC_1_IPV6)
 			sprintf(ip6, "%s ",
-				(gp->val_flags & FILTER_GENERIC_1_IPV4)
+				(gp->val_flags & FILTER_GENERIC_1_IPV6)
 				 ? "ip6(y)" : "ip6(n)");
 		else
 			sprintf(ip6, "%s ", "ip6(x)");
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:59.003046719 +0000
+++ 0027-net-enic-fix-filter-log-message.patch	2021-02-09 10:34:57.942584623 +0000
@@ -1 +1 @@
-From 89ce72c6ffb4337273bb292dc419511f1d619879 Mon Sep 17 00:00:00 2001
+From 253c91a3342cd5608e05d28d5ffc2ff03b4728f9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89ce72c6ffb4337273bb292dc419511f1d619879 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7eb06f889e..cdfdc904a6 100644
+index 453c11a3b3..92b1c9eda6 100644
@@ -23 +24 @@
-@@ -1392,7 +1392,7 @@ enic_dump_filter(const struct filter_v2 *filt)
+@@ -1389,7 +1389,7 @@ enic_dump_filter(const struct filter_v2 *filt)

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

* [dpdk-stable] patch 'event/dlb: fix accessing uninitialized variables' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (25 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/enic: fix filter log message' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'eventdev: fix a return value comment' " luca.boccassi
                     ` (2 subsequent siblings)
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Timothy McDaniel; +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/11/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/29d0b18b5ee25ed93d54f589df40b3bcc6fa916e

Thanks.

Luca Boccassi

---
From 29d0b18b5ee25ed93d54f589df40b3bcc6fa916e Mon Sep 17 00:00:00 2001
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Date: Wed, 3 Feb 2021 12:12:21 -0600
Subject: [PATCH] event/dlb: fix accessing uninitialized variables

[ upstream commit d9e832951812238c8b7fd4c6a366ba53101704a4 ]

This patch updates the PMD to initialize response fields
prior to calling into the PF layer.

Coverity issue: 366200, 366202, 366205
Fixes: eb14a3421afd ("event/dlb: add eventdev start")
Fixes: f0073621940c ("event/dlb: add eventdev stop and close")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb/dlb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index 0c95c4793d..e2d5d43da7 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -1847,7 +1847,7 @@ dlb_hw_create_dir_queue(struct dlb_eventdev *dlb, int32_t qm_port_id)
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_create_dir_queue_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int32_t ret;
 
 	cfg.response = (uintptr_t)&response;
@@ -3569,7 +3569,7 @@ dlb_get_ldb_queue_depth(struct dlb_eventdev *dlb,
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_get_ldb_queue_depth_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.queue_id = queue->qm_queue.id;
@@ -3591,7 +3591,7 @@ dlb_get_dir_queue_depth(struct dlb_eventdev *dlb,
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_get_dir_queue_depth_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.queue_id = queue->qm_queue.id;
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:59.036176135 +0000
+++ 0028-event-dlb-fix-accessing-uninitialized-variables.patch	2021-02-09 10:34:57.946584700 +0000
@@ -1 +1 @@
-From d9e832951812238c8b7fd4c6a366ba53101704a4 Mon Sep 17 00:00:00 2001
+From 29d0b18b5ee25ed93d54f589df40b3bcc6fa916e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9e832951812238c8b7fd4c6a366ba53101704a4 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 64e6df7373..8b26d1d2d2 100644
+index 0c95c4793d..e2d5d43da7 100644
@@ -32 +33 @@
-@@ -3573,7 +3573,7 @@ dlb_get_ldb_queue_depth(struct dlb_eventdev *dlb,
+@@ -3569,7 +3569,7 @@ dlb_get_ldb_queue_depth(struct dlb_eventdev *dlb,
@@ -41 +42 @@
-@@ -3595,7 +3595,7 @@ dlb_get_dir_queue_depth(struct dlb_eventdev *dlb,
+@@ -3591,7 +3591,7 @@ dlb_get_dir_queue_depth(struct dlb_eventdev *dlb,

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

* [dpdk-stable] patch 'eventdev: fix a return value comment' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (26 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'event/dlb: fix accessing uninitialized variables' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'mempool: fix panic on dump or audit' " luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'mbuf: remove unneeded atomic generic header include' " luca.boccassi
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Fredrik A Lindgren, 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/11/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/cc08a9264eebf5bffd76afc3c2e0d2109d2df7a3

Thanks.

Luca Boccassi

---
From cc08a9264eebf5bffd76afc3c2e0d2109d2df7a3 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Mon, 1 Feb 2021 13:19:46 +0000
Subject: [PATCH] eventdev: fix a return value comment

[ upstream commit b07b80fe1cbd7bdaffa75d4d34417aca536c1aba ]

The PMD info get API has a void return type. Remove the
@return 0 Success doxygen comment as it doesn't make sense here.

Fixes: 5223a1f3b8de ("eventdev: define southbound driver interface")

Reported-by: Fredrik A Lindgren <fredrik.a.lindgren@tietoevry.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eventdev/rte_eventdev_pmd.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 9e83993efa..7eb9a77393 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -158,9 +158,6 @@ rte_event_pmd_is_valid_dev(uint8_t dev_id)
  *   Event device pointer
  * @param dev_info
  *   Event device information structure
- *
- * @return
- *   Returns 0 on success
  */
 typedef void (*eventdev_info_get_t)(struct rte_eventdev *dev,
 		struct rte_event_dev_info *dev_info);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:59.075691784 +0000
+++ 0029-eventdev-fix-a-return-value-comment.patch	2021-02-09 10:34:57.946584700 +0000
@@ -1 +1 @@
-From b07b80fe1cbd7bdaffa75d4d34417aca536c1aba Mon Sep 17 00:00:00 2001
+From cc08a9264eebf5bffd76afc3c2e0d2109d2df7a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b07b80fe1cbd7bdaffa75d4d34417aca536c1aba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/librte_eventdev/eventdev_pmd.h | 3 ---
+ lib/librte_eventdev/rte_eventdev_pmd.h | 3 ---
@@ -18 +19 @@
-diff --git a/lib/librte_eventdev/eventdev_pmd.h b/lib/librte_eventdev/eventdev_pmd.h
+diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -20,2 +21,2 @@
---- a/lib/librte_eventdev/eventdev_pmd.h
-+++ b/lib/librte_eventdev/eventdev_pmd.h
+--- a/lib/librte_eventdev/rte_eventdev_pmd.h
++++ b/lib/librte_eventdev/rte_eventdev_pmd.h

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

* [dpdk-stable] patch 'mempool: fix panic on dump or audit' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (27 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'eventdev: fix a return value comment' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  2021-02-09 10:35   ` [dpdk-stable] patch 'mbuf: remove unneeded atomic generic header include' " luca.boccassi
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: Olivier Matz; +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/11/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/e00dcbea06d811e39d719c6e193208f3eca245e9

Thanks.

Luca Boccassi

---
From e00dcbea06d811e39d719c6e193208f3eca245e9 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 3 Feb 2021 10:01:01 +0100
Subject: [PATCH] mempool: fix panic on dump or audit

[ upstream commit daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 ]

When doing a mempool dump or an audit, the application can panic because
the length of the cache is greater than the flush threshold, which is
seen as a fatal error. But this can temporarily happen when the mempool
is in use.

Fix the panic condition to abort only when the cache length is greater
than the array.

Fixes: ea5dd2744b90 ("mempool: cache optimisations")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_mempool/rte_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index b9f3fbd614..afb1239c8d 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -1167,7 +1167,7 @@ mempool_audit_cache(const struct rte_mempool *mp)
 	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
 		const struct rte_mempool_cache *cache;
 		cache = &mp->local_cache[lcore_id];
-		if (cache->len > cache->flushthresh) {
+		if (cache->len > RTE_DIM(cache->objs)) {
 			RTE_LOG(CRIT, MEMPOOL, "badness on cache[%u]\n",
 				lcore_id);
 			rte_panic("MEMPOOL: invalid cache len\n");
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:59.107686782 +0000
+++ 0030-mempool-fix-panic-on-dump-or-audit.patch	2021-02-09 10:34:57.946584700 +0000
@@ -1 +1 @@
-From daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 Mon Sep 17 00:00:00 2001
+From e00dcbea06d811e39d719c6e193208f3eca245e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'mbuf: remove unneeded atomic generic header include' has been queued to stable release 20.11.1
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
                     ` (28 preceding siblings ...)
  2021-02-09 10:35   ` [dpdk-stable] patch 'mempool: fix panic on dump or audit' " luca.boccassi
@ 2021-02-09 10:35   ` luca.boccassi
  29 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-09 10:35 UTC (permalink / raw)
  To: David Marchand
  Cc: Ruifeng Wang, Andrew Rybchenko, 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/11/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/5fad3a6f3c1592ecd4e58254e8012ed9a79f04db

Thanks.

Luca Boccassi

---
From 5fad3a6f3c1592ecd4e58254e8012ed9a79f04db Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 4 Feb 2021 11:05:19 +0100
Subject: [PATCH] mbuf: remove unneeded atomic generic header include

[ upstream commit c48d8c316424ddf7ae1ddd2fa1fa940cf45eb8c3 ]

There is no need for the direct inclusion of the generic/ header [1]
now that we don't use the rte_atomic API anymore.

It was the last case of direct inclusion of the generic/ headers,
so the flag -Wno-unused-function can be dropped.

1: https://git.dpdk.org/dpdk/commit/?id=3eb860b08eb7

Fixes: e41d27a68df6 ("mbuf: remove atomic reference counters")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_mbuf/rte_mbuf_core.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index a85cabdd18..9d1609336a 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -20,7 +20,6 @@
 
 #include <rte_compat.h>
 #include <rte_byteorder.h>
-#include <generic/rte_atomic.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:59.141488159 +0000
+++ 0031-mbuf-remove-unneeded-atomic-generic-header-include.patch	2021-02-09 10:34:57.950584779 +0000
@@ -1 +1 @@
-From c48d8c316424ddf7ae1ddd2fa1fa940cf45eb8c3 Mon Sep 17 00:00:00 2001
+From 5fad3a6f3c1592ecd4e58254e8012ed9a79f04db Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c48d8c316424ddf7ae1ddd2fa1fa940cf45eb8c3 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -22 +22,0 @@
- buildtools/chkincs/meson.build  | 1 -
@@ -24 +24 @@
- 2 files changed, 2 deletions(-)
+ 1 file changed, 1 deletion(-)
@@ -26,12 +25,0 @@
-diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build
-index f345e87551..f28cfd3cd4 100644
---- a/buildtools/chkincs/meson.build
-+++ b/buildtools/chkincs/meson.build
-@@ -17,7 +17,6 @@ gen_c_files = generator(gen_c_file_for_header,
- 	arguments: ['@INPUT@', '@OUTPUT@'])
- 
- cflags = machine_args
--cflags += '-Wno-unused-function' # needed if we include generic headers
- cflags += '-DALLOW_EXPERIMENTAL_API'
- 
- sources = files('main.c')

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

* Re: [dpdk-stable] patch 'net/mlx5: check FW miniCQE format capabilities' has been queued to stable release 20.11.1
  2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: check FW miniCQE format capabilities' " luca.boccassi
@ 2021-02-09 10:42     ` Luca Boccassi
  0 siblings, 0 replies; 312+ messages in thread
From: Luca Boccassi @ 2021-02-09 10:42 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

On Tue, 2021-02-09 at 10:35 +0000, luca.boccassi@gmail.com wrote:
> 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/11/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/de75752e7e707382086c7d0e88b4946b6e9ca7bf
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From de75752e7e707382086c7d0e88b4946b6e9ca7bf Mon Sep 17 00:00:00 2001
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Date: Tue, 2 Feb 2021 02:07:37 +0000
> Subject: [PATCH] net/mlx5: check FW miniCQE format capabilities
> 
> [ upstream commit 3d3f4e6d1aaaec77016a8b406371f1b491ae9044 ]
> 
> miniCQE formats for Flow Tag and L3/L4 Header compression are only
> supported by Mellanox FW starting version 16.29.392. There is no
> point to allow user to enable these formats if FW cannot provide them.
> Check FW capabilities and deny user requests if the selected miniCQE
> format is not supported by an underlying NIC.
> 
> Fixes: 54c2d46b160f ("net/mlx5: support flow tag and packet header miniCQEs")
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
>  drivers/common/mlx5/mlx5_devx_cmds.c |  5 +++++
>  drivers/common/mlx5/mlx5_devx_cmds.h |  3 +++
>  drivers/common/mlx5/mlx5_prm.h       |  5 ++++-
>  drivers/net/mlx5/linux/mlx5_os.c     | 32 ++++++++++++++++++----------
>  4 files changed, 33 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
> index a0277b7cc0..eafee65f22 100644
> --- a/drivers/common/mlx5/mlx5_devx_cmds.c
> +++ b/drivers/common/mlx5/mlx5_devx_cmds.c
> @@ -720,6 +720,11 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
>  	attr->flow_hit_aso = !!(MLX5_GET64(cmd_hca_cap, hcattr,
>  					   general_obj_types) &
>  				MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_HIT_ASO);
> +	attr->cqe_compression = MLX5_GET(cmd_hca_cap, hcattr, cqe_compression);
> +	attr->mini_cqe_resp_flow_tag = MLX5_GET(cmd_hca_cap, hcattr,
> +						mini_cqe_resp_flow_tag);
> +	attr->mini_cqe_resp_l3_l4_tag = MLX5_GET(cmd_hca_cap, hcattr,
> +						 mini_cqe_resp_l3_l4_tag);
>  	if (attr->qos.sup) {
>  		MLX5_SET(query_hca_cap_in, in, op_mod,
>  			 MLX5_GET_HCA_CAP_OP_MOD_QOS_CAP |
> diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
> index bddeabf0ea..78202eba9d 100644
> --- a/drivers/common/mlx5/mlx5_devx_cmds.h
> +++ b/drivers/common/mlx5/mlx5_devx_cmds.h
> @@ -115,6 +115,9 @@ struct mlx5_hca_attr {
>  	uint32_t regex:1;
>  	uint32_t regexp_num_of_engines;
>  	uint32_t log_max_ft_sampler_num:8;
> +	uint32_t cqe_compression:1;
> +	uint32_t mini_cqe_resp_flow_tag:1;
> +	uint32_t mini_cqe_resp_l3_l4_tag:1;
>  	struct mlx5_hca_qos_attr qos;
>  	struct mlx5_hca_vdpa_attr vdpa;
>  };
> diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
> index 6f5e5dc5f6..00b425ac85 100644
> --- a/drivers/common/mlx5/mlx5_prm.h
> +++ b/drivers/common/mlx5/mlx5_prm.h
> @@ -1364,7 +1364,10 @@ struct mlx5_ifc_cmd_hca_cap_bits {
>  	u8 num_of_uars_per_page[0x20];
>  	u8 flex_parser_protocols[0x20];
>  	u8 reserved_at_560[0x20];
> -	u8 reserved_at_580[0x3c];
> +	u8 reserved_at_580[0x39];
> +	u8 mini_cqe_resp_l3_l4_tag[0x1];
> +	u8 mini_cqe_resp_flow_tag[0x1];
> +	u8 enhanced_cqe_compression[0x1];
>  	u8 mini_cqe_resp_stride_index[0x1];
>  	u8 cqe_128_always[0x1];
>  	u8 cqe_compression_128[0x1];

Please triple-check this one, as I counted manually to adjust the
padding.

-- 
Kind regards,
Luca Boccassi

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

* [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' 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
                   ` (273 preceding siblings ...)
  2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
@ 2021-02-12 23:40 ` luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " luca.boccassi
                     ` (4 more replies)
  274 siblings, 5 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-12 23:40 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Sunil Pai G, 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/14/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/dfc264c256874bfe56fb79403a24e0f1fe4c0383

Thanks.

Luca Boccassi

---
From dfc264c256874bfe56fb79403a24e0f1fe4c0383 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 8 Feb 2021 16:33:19 +0000
Subject: [PATCH] eal: fix automatic loading of drivers as shared libs

[ upstream commit 9ff791eff609138a69edd89bf4abde71511eef6d ]

When checking the loading of EAL shared lib to see if we have a shared
DPDK build, we only want to include part of the ABI version in the check
rather than the whole thing. For example, with ABI version 21.1 for DPDK
release 21.02, the linker links the binary against librte_eal.so.21,
without the ".1".

To avoid any further brittleness in this area, we can check for multiple
versions when doing the check, since just about any version of EAL implies
a shared build. Therefore we check for presence of librte_eal.so with full
ABI_VERSION extension, and then repeatedly remove the end part of the
filename after the last dot, checking each time. For example (debug log
output for static build):

  EAL: Checking presence of .so 'librte_eal.so.21.1'
  EAL: Checking presence of .so 'librte_eal.so.21'
  EAL: Checking presence of .so 'librte_eal.so'
  EAL: Detected static linkage of DPDK

Fixes: 7781950f4d38 ("eal: fix shared lib mode detection")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 35 +++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 424e8bcf87..622c7bc429 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -494,6 +494,39 @@ out:
 	return retval;
 }
 
+static int
+is_shared_build(void)
+{
+#define EAL_SO "librte_eal.so"
+	char soname[32];
+	size_t len, minlen = strlen(EAL_SO);
+
+	len = strlcpy(soname, EAL_SO"."ABI_VERSION, sizeof(soname));
+	if (len > sizeof(soname)) {
+		RTE_LOG(ERR, EAL, "Shared lib name too long in shared build check\n");
+		len = sizeof(soname) - 1;
+	}
+
+	while (len >= minlen) {
+		/* check if we have this .so loaded, if so - shared build */
+		RTE_LOG(DEBUG, EAL, "Checking presence of .so '%s'\n", soname);
+		if (dlopen(soname, RTLD_LAZY | RTLD_NOLOAD) != NULL) {
+			RTE_LOG(INFO, EAL, "Detected shared linkage of DPDK\n");
+			return 1;
+		}
+
+		/* remove any version numbers off the end to retry */
+		while (len-- > 0)
+			if (soname[len] == '.') {
+				soname[len] = '\0';
+				break;
+			}
+	}
+
+	RTE_LOG(INFO, EAL, "Detected static linkage of DPDK\n");
+	return 0;
+}
+
 int
 eal_plugins_init(void)
 {
@@ -505,7 +538,7 @@ eal_plugins_init(void)
 	 * (Using dlopen with NOLOAD flag on EAL, will return NULL if the EAL
 	 * shared library is not already loaded i.e. it's statically linked.)
 	 */
-	if (dlopen("librte_eal.so."ABI_VERSION, RTLD_LAZY | RTLD_NOLOAD) != NULL &&
+	if (is_shared_build() &&
 			*default_solib_dir != '\0' &&
 			stat(default_solib_dir, &sb) == 0 &&
 			S_ISDIR(sb.st_mode))
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-12 23:40:09.908777582 +0000
+++ 0001-eal-fix-automatic-loading-of-drivers-as-shared-libs.patch	2021-02-12 23:40:09.855090191 +0000
@@ -1 +1 @@
-From 9ff791eff609138a69edd89bf4abde71511eef6d Mon Sep 17 00:00:00 2001
+From dfc264c256874bfe56fb79403a24e0f1fe4c0383 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ff791eff609138a69edd89bf4abde71511eef6d ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' has been queued to stable release 20.11.1
  2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
@ 2021-02-12 23:40   ` luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' " luca.boccassi
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-12 23:40 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Paolo Valerio, 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/14/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/6d465a7fc46e22375bb21138bb41035a15bbfad7

Thanks.

Luca Boccassi

---
From 6d465a7fc46e22375bb21138bb41035a15bbfad7 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Thu, 4 Feb 2021 22:39:48 +0800
Subject: [PATCH] net/ixgbe: fix UDP zero checksum on x86

[ upstream commit 9a40edb599d76f7f9d116bb2f91b23c082b5f154 ]

There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware.  This was
leading to misleading PKT_RX_L4_CKSUM_BAD flag.

This patch changes the bad UDP checksum to PKT_RX_L4_CKSUM_UNKNOWN,
so the software application will then have to recompute the checksum
itself if needed.

Bugzilla ID: 629
Fixes: af75078fece3 ("first public release")

Reported-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Paolo Valerio <pvalerio@redhat.com>
---
 doc/guides/nics/ixgbe.rst              | 10 ++++++++
 drivers/net/ixgbe/ixgbe_rxtx.c         | 30 ++++++++++++++++++++----
 drivers/net/ixgbe/ixgbe_rxtx.h         |  2 ++
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 32 +++++++++++++++++++++++---
 4 files changed, 67 insertions(+), 7 deletions(-)

diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index c801dbae81..4f4d3b1c2c 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -252,6 +252,16 @@ Before binding ``vfio`` with legacy mode in X550 NICs, use ``modprobe vfio ``
 ``nointxmask=1`` to load ``vfio`` module if the intx is not shared with other
 devices.
 
+UDP with zero checksum is reported as error
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Intel 82599 10 Gigabit Ethernet Controller Specification Update (Revision 2.87)
+Errata: 44 Integrity Error Reported for IPv4/UDP Packets With Zero Checksum
+
+To support UDP zero checksum, the zero and bad UDP checksum packet is marked as
+PKT_RX_L4_CKSUM_UNKNOWN, so the application needs to recompute the checksum to
+validate it.
+
 Inline crypto processing support
 --------------------------------
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index f1fc307ffd..3b893b0df0 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1441,7 +1441,8 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
 }
 
 static inline uint64_t
-rx_desc_error_to_pkt_flags(uint32_t rx_status)
+rx_desc_error_to_pkt_flags(uint32_t rx_status, uint16_t pkt_info,
+			   uint8_t rx_udp_csum_zero_err)
 {
 	uint64_t pkt_flags;
 
@@ -1458,6 +1459,15 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
 	pkt_flags = error_to_pkt_flags_map[(rx_status >>
 		IXGBE_RXDADV_ERR_CKSUM_BIT) & IXGBE_RXDADV_ERR_CKSUM_MSK];
 
+	/* Mask out the bad UDP checksum error if the hardware has UDP zero
+	 * checksum error issue, so that the software application will then
+	 * have to recompute the checksum itself if needed.
+	 */
+	if ((rx_status & IXGBE_RXDADV_ERR_TCPE) &&
+	    (pkt_info & IXGBE_RXDADV_PKTTYPE_UDP) &&
+	    rx_udp_csum_zero_err)
+		pkt_flags &= ~PKT_RX_L4_CKSUM_BAD;
+
 	if ((rx_status & IXGBE_RXD_STAT_OUTERIPCS) &&
 	    (rx_status & IXGBE_RXDADV_ERR_OUTERIPER)) {
 		pkt_flags |= PKT_RX_EIP_CKSUM_BAD;
@@ -1544,7 +1554,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq)
 			/* convert descriptor fields to rte mbuf flags */
 			pkt_flags = rx_desc_status_to_pkt_flags(s[j],
 				vlan_flags);
-			pkt_flags |= rx_desc_error_to_pkt_flags(s[j]);
+			pkt_flags |= rx_desc_error_to_pkt_flags(s[j],
+					(uint16_t)pkt_info[j],
+					rxq->rx_udp_csum_zero_err);
 			pkt_flags |= ixgbe_rxd_pkt_info_to_pkt_flags
 					((uint16_t)pkt_info[j]);
 			mb->ol_flags = pkt_flags;
@@ -1877,7 +1889,9 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
 
 		pkt_flags = rx_desc_status_to_pkt_flags(staterr, vlan_flags);
-		pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr);
+		pkt_flags = pkt_flags |
+			rx_desc_error_to_pkt_flags(staterr, (uint16_t)pkt_info,
+						   rxq->rx_udp_csum_zero_err);
 		pkt_flags = pkt_flags |
 			ixgbe_rxd_pkt_info_to_pkt_flags((uint16_t)pkt_info);
 		rxm->ol_flags = pkt_flags;
@@ -1970,7 +1984,8 @@ ixgbe_fill_cluster_head_buf(
 	head->vlan_tci = rte_le_to_cpu_16(desc->wb.upper.vlan);
 	pkt_info = rte_le_to_cpu_32(desc->wb.lower.lo_dword.data);
 	pkt_flags = rx_desc_status_to_pkt_flags(staterr, rxq->vlan_flags);
-	pkt_flags |= rx_desc_error_to_pkt_flags(staterr);
+	pkt_flags |= rx_desc_error_to_pkt_flags(staterr, (uint16_t)pkt_info,
+						rxq->rx_udp_csum_zero_err);
 	pkt_flags |= ixgbe_rxd_pkt_info_to_pkt_flags((uint16_t)pkt_info);
 	head->ol_flags = pkt_flags;
 	head->packet_type =
@@ -3091,6 +3106,13 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	else
 		rxq->pkt_type_mask = IXGBE_PACKET_TYPE_MASK_82599;
 
+	/*
+	 * 82599 errata, UDP frames with a 0 checksum can be marked as checksum
+	 * errors.
+	 */
+	if (hw->mac.type == ixgbe_mac_82599EB)
+		rxq->rx_udp_csum_zero_err = 1;
+
 	/*
 	 * Allocate RX ring hardware descriptors. A memzone large enough to
 	 * handle the maximum ring size is allocated in order to allow for
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 6d2f7c9da3..bcadaf79ce 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -129,6 +129,8 @@ struct ixgbe_rx_queue {
 	uint8_t             crc_len;  /**< 0 if CRC stripped, 4 otherwise. */
 	uint8_t             drop_en;  /**< If not 0, set SRRCTL.Drop_En. */
 	uint8_t             rx_deferred_start; /**< not in global dev start. */
+	/** UDP frames with a 0 checksum can be marked as checksum errors. */
+	uint8_t             rx_udp_csum_zero_err;
 	/** flags to set in mbuf when a vlan is detected. */
 	uint64_t            vlan_flags;
 	uint64_t	    offloads; /**< Rx offloads with DEV_RX_OFFLOAD_* */
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index 90c076825a..52add17b5d 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -132,9 +132,9 @@ desc_to_olflags_v_ipsec(__m128i descs[4], struct rte_mbuf **rx_pkts)
 
 static inline void
 desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
-	struct rte_mbuf **rx_pkts)
+		  uint16_t udp_p_flag, struct rte_mbuf **rx_pkts)
 {
-	__m128i ptype0, ptype1, vtag0, vtag1, csum;
+	__m128i ptype0, ptype1, vtag0, vtag1, csum, udp_csum_skip;
 	__m128i rearm0, rearm1, rearm2, rearm3;
 
 	/* mask everything except rss type */
@@ -161,6 +161,7 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
 		(IXGBE_RXDADV_ERR_TCPE | IXGBE_RXDADV_ERR_IPE) >> 16,
 		IXGBE_RXD_STAT_VP, IXGBE_RXD_STAT_VP,
 		IXGBE_RXD_STAT_VP, IXGBE_RXD_STAT_VP);
+
 	/* map vlan present (0x8), IPE (0x2), L4E (0x1) to ol_flags */
 	const __m128i vlan_csum_map_lo = _mm_set_epi8(
 		0, 0, 0, 0,
@@ -182,12 +183,23 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
 		0, PKT_RX_L4_CKSUM_GOOD >> sizeof(uint8_t), 0,
 		PKT_RX_L4_CKSUM_GOOD >> sizeof(uint8_t));
 
+	/* mask everything except UDP header present if specified */
+	const __m128i udp_hdr_p_msk = _mm_set_epi16
+		(0, 0, 0, 0,
+		 udp_p_flag, udp_p_flag, udp_p_flag, udp_p_flag);
+
+	const __m128i udp_csum_bad_shuf = _mm_set_epi8
+		(0, 0, 0, 0, 0, 0, 0, 0,
+		 0, 0, 0, 0, 0, 0, ~(uint8_t)PKT_RX_L4_CKSUM_BAD, 0xFF);
+
 	ptype0 = _mm_unpacklo_epi16(descs[0], descs[1]);
 	ptype1 = _mm_unpacklo_epi16(descs[2], descs[3]);
 	vtag0 = _mm_unpackhi_epi16(descs[0], descs[1]);
 	vtag1 = _mm_unpackhi_epi16(descs[2], descs[3]);
 
 	ptype0 = _mm_unpacklo_epi32(ptype0, ptype1);
+	/* save the UDP header present information */
+	udp_csum_skip = _mm_and_si128(ptype0, udp_hdr_p_msk);
 	ptype0 = _mm_and_si128(ptype0, rsstype_msk);
 	ptype0 = _mm_shuffle_epi8(rss_flags, ptype0);
 
@@ -215,6 +227,15 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
 
 	vtag1 = _mm_or_si128(ptype0, vtag1);
 
+	/* convert the UDP header present 0x200 to 0x1 for aligning with each
+	 * PKT_RX_L4_CKSUM_BAD value in low byte of 16 bits word ol_flag in
+	 * vtag1 (4x16). Then mask out the bad checksum value by shuffle and
+	 * bit-mask.
+	 */
+	udp_csum_skip = _mm_srli_epi16(udp_csum_skip, 9);
+	udp_csum_skip = _mm_shuffle_epi8(udp_csum_bad_shuf, udp_csum_skip);
+	vtag1 = _mm_and_si128(vtag1, udp_csum_skip);
+
 	/*
 	 * At this point, we have the 4 sets of flags in the low 64-bits
 	 * of vtag1 (4x16).
@@ -341,6 +362,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	__m128i dd_check, eop_check;
 	__m128i mbuf_init;
 	uint8_t vlan_flags;
+	uint16_t udp_p_flag = 0; /* Rx Descriptor UDP header present */
 
 	/* nb_pkts has to be floor-aligned to RTE_IXGBE_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_IXGBE_DESCS_PER_LOOP);
@@ -365,6 +387,9 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 				rte_cpu_to_le_32(IXGBE_RXDADV_STAT_DD)))
 		return 0;
 
+	if (rxq->rx_udp_csum_zero_err)
+		udp_p_flag = IXGBE_RXDADV_PKTTYPE_UDP;
+
 	/* 4 packets DD mask */
 	dd_check = _mm_set_epi64x(0x0000000100000001LL, 0x0000000100000001LL);
 
@@ -477,7 +502,8 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		sterr_tmp1 = _mm_unpackhi_epi32(descs[1], descs[0]);
 
 		/* set ol_flags with vlan packet type */
-		desc_to_olflags_v(descs, mbuf_init, vlan_flags, &rx_pkts[pos]);
+		desc_to_olflags_v(descs, mbuf_init, vlan_flags, udp_p_flag,
+				  &rx_pkts[pos]);
 
 #ifdef RTE_LIB_SECURITY
 		if (unlikely(use_ipsec))
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-12 23:40:09.940486750 +0000
+++ 0002-net-ixgbe-fix-UDP-zero-checksum-on-x86.patch	2021-02-12 23:40:09.871090501 +0000
@@ -1 +1 @@
-From 9a40edb599d76f7f9d116bb2f91b23c082b5f154 Mon Sep 17 00:00:00 2001
+From 6d465a7fc46e22375bb21138bb41035a15bbfad7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a40edb599d76f7f9d116bb2f91b23c082b5f154 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 696cbd93ba..4c644c0e68 100644
+index c801dbae81..4f4d3b1c2c 100644
@@ -33,3 +34,3 @@
-@@ -257,6 +257,16 @@ RSS isn't supported when QinQ is enabled
- 
- Due to FW limitation, IXGBE doesn't support RSS when QinQ is enabled currently.
+@@ -252,6 +252,16 @@ Before binding ``vfio`` with legacy mode in X550 NICs, use ``modprobe vfio ``
+ ``nointxmask=1`` to load ``vfio`` module if the intx is not shared with other
+ devices.
@@ -51 +52 @@
-index 72d27f35ca..950b7894e0 100644
+index f1fc307ffd..3b893b0df0 100644
@@ -54 +55 @@
-@@ -1466,7 +1466,8 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
+@@ -1441,7 +1441,8 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
@@ -64 +65 @@
-@@ -1483,6 +1484,15 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
+@@ -1458,6 +1459,15 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
@@ -80 +81 @@
-@@ -1569,7 +1579,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq)
+@@ -1544,7 +1554,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq)
@@ -91 +92 @@
-@@ -1902,7 +1914,9 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1877,7 +1889,9 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -102 +103 @@
-@@ -1995,7 +2009,8 @@ ixgbe_fill_cluster_head_buf(
+@@ -1970,7 +1984,8 @@ ixgbe_fill_cluster_head_buf(
@@ -112 +113 @@
-@@ -3116,6 +3131,13 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -3091,6 +3106,13 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -127 +128 @@
-index 8a25e98df6..476ef62cfd 100644
+index 6d2f7c9da3..bcadaf79ce 100644
@@ -140 +141 @@
-index 9bbffe6119..7610fd93db 100644
+index 90c076825a..52add17b5d 100644

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

* [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' has been queued to stable release 20.11.1
  2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " luca.boccassi
@ 2021-02-12 23:40   ` luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' " luca.boccassi
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-12 23:40 UTC (permalink / raw)
  To: Marvin Liu; +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/14/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/d4585027ca394f1848bab0d4333a7a68f0c684e9

Thanks.

Luca Boccassi

---
From d4585027ca394f1848bab0d4333a7a68f0c684e9 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Fri, 5 Feb 2021 15:47:58 +0800
Subject: [PATCH] vhost: fix packed ring dequeue offloading

[ upstream commit 894028ace2c5af2506897898f407cbdf24cef0c5 ]

When vhost is doing dequeue offloading, it parses ethernet and L3/L4
headers of the packet. Then vhost will set corresponding value in mbuf
attributes. It means offloading action should be after packet data copy.

Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 6c5128665e..55bfc161b5 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -2232,7 +2232,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
 {
 	bool wrap = vq->avail_wrap_counter;
 	struct vring_packed_desc *descs = vq->desc_packed;
-	struct virtio_net_hdr *hdr;
 	uint64_t lens[PACKED_BATCH_SIZE];
 	uint64_t buf_lens[PACKED_BATCH_SIZE];
 	uint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf);
@@ -2289,13 +2288,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
 		ids[i] = descs[avail_idx + i].id;
 	}
 
-	if (virtio_net_with_host_offload(dev)) {
-		vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
-			hdr = (struct virtio_net_hdr *)(desc_addrs[i]);
-			vhost_dequeue_offload(hdr, pkts[i]);
-		}
-	}
-
 	return 0;
 
 free_buf:
@@ -2313,6 +2305,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
 {
 	uint16_t avail_idx = vq->last_avail_idx;
 	uint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf);
+	struct virtio_net_hdr *hdr;
 	uintptr_t desc_addrs[PACKED_BATCH_SIZE];
 	uint16_t ids[PACKED_BATCH_SIZE];
 	uint16_t i;
@@ -2329,6 +2322,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
 			   (void *)(uintptr_t)(desc_addrs[i] + buf_offset),
 			   pkts[i]->pkt_len);
 
+	if (virtio_net_with_host_offload(dev)) {
+		vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
+			hdr = (struct virtio_net_hdr *)(desc_addrs[i]);
+			vhost_dequeue_offload(hdr, pkts[i]);
+		}
+	}
+
 	if (virtio_net_is_inorder(dev))
 		vhost_shadow_dequeue_batch_packed_inorder(vq,
 			ids[PACKED_BATCH_SIZE - 1]);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-12 23:40:09.982602168 +0000
+++ 0003-vhost-fix-packed-ring-dequeue-offloading.patch	2021-02-12 23:40:09.875090578 +0000
@@ -1 +1 @@
-From 894028ace2c5af2506897898f407cbdf24cef0c5 Mon Sep 17 00:00:00 2001
+From d4585027ca394f1848bab0d4333a7a68f0c684e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 894028ace2c5af2506897898f407cbdf24cef0c5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6580983c82..583bf379c6 100644
+index 6c5128665e..55bfc161b5 100644
@@ -23 +24 @@
-@@ -2263,7 +2263,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
+@@ -2232,7 +2232,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
@@ -31 +32 @@
-@@ -2320,13 +2319,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
+@@ -2289,13 +2288,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
@@ -45 +46 @@
-@@ -2344,6 +2336,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
+@@ -2313,6 +2305,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
@@ -53 +54 @@
-@@ -2360,6 +2353,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
+@@ -2329,6 +2322,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,

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

* [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' has been queued to stable release 20.11.1
  2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' " luca.boccassi
@ 2021-02-12 23:40   ` luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'app/testpmd: fix help of metering commands' " luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' " luca.boccassi
  4 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-12 23:40 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +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/14/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/f3bf966edc393ada2b7c1eb621e9452598d5240f

Thanks.

Luca Boccassi

---
From f3bf966edc393ada2b7c1eb621e9452598d5240f Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 5 Feb 2021 14:15:04 +0200
Subject: [PATCH] doc: fix mark action zero value in mlx5 guide

[ upstream commit b8ee0a16cb844027495968941a101f37964073cc ]

The zero value in flow MARK action is reported in Rx datapath
as tagged with zero FDIR ID. Once packet is marked in flow engine
it will be always reported as tagged. For metadata only the zero
value means there is "no metadata" in the packet and the metadata
flag is not set for the case.

Fixes: 3ceeed9f7855 ("doc: update flow mark action in mlx5 guide")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 715c5b5be7..24d5a69227 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -823,8 +823,10 @@ Driver options
   of the extensive metadata features. The legacy Verbs supports FLAG and
   MARK metadata actions over NIC Rx steering domain only.
 
-  The setting MARK or META value to zero means there is no item provided and
-  receiving datapath will not report in mbufs these items are present.
+  Setting META value to zero in flow action means there is no item provided
+  and receiving datapath will not report in mbufs the metadata are present.
+  Setting MARK value to zero in flow action means the zero FDIR ID value
+  will be reported on packet receiving.
 
   For the MARK action the last 16 values in the full range are reserved for
   internal PMD purposes (to emulate FLAG action). The valid range for the
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-12 23:40:10.017503101 +0000
+++ 0004-doc-fix-mark-action-zero-value-in-mlx5-guide.patch	2021-02-12 23:40:09.879090655 +0000
@@ -1 +1 @@
-From b8ee0a16cb844027495968941a101f37964073cc Mon Sep 17 00:00:00 2001
+From f3bf966edc393ada2b7c1eb621e9452598d5240f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8ee0a16cb844027495968941a101f37964073cc ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 51d81a0206..ff5c8c15d9 100644
+index 715c5b5be7..24d5a69227 100644
@@ -24 +25 @@
-@@ -875,8 +875,10 @@ Driver options
+@@ -823,8 +823,10 @@ Driver options

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

* [dpdk-stable] patch 'app/testpmd: fix help of metering commands' has been queued to stable release 20.11.1
  2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
                     ` (2 preceding siblings ...)
  2021-02-12 23:40   ` [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' " luca.boccassi
@ 2021-02-12 23:40   ` luca.boccassi
  2021-02-12 23:40   ` [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' " luca.boccassi
  4 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-12 23:40 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jasvinder Singh, Xiaoyun Li, 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/14/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/ef01e05a7ce8e394d6ec7021d0eace2a37db9163

Thanks.

Luca Boccassi

---
From ef01e05a7ce8e394d6ec7021d0eace2a37db9163 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 9 Feb 2021 14:15:06 +0000
Subject: [PATCH] app/testpmd: fix help of metering commands

[ upstream commit 618f0f4ac689f9255eecbef9202e77e35a9a7ceb ]

Helps strings syntax is "command : description", the 'command' part was
missing, updated command help strings.

Fixes: 281eeb8afc55 ("app/testpmd: add commands for metering and policing")
Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/cmdline_mtr.c | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index 399ee56e07..3982787d20 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -312,7 +312,7 @@ static void cmd_show_port_meter_cap_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_show_port_meter_cap = {
 	.f = cmd_show_port_meter_cap_parsed,
 	.data = NULL,
-	.help_str = "Show port meter cap",
+	.help_str = "show port meter cap <port_id>",
 	.tokens = {
 		(void *)&cmd_show_port_meter_cap_show,
 		(void *)&cmd_show_port_meter_cap_port,
@@ -408,7 +408,7 @@ static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm = {
 	.f = cmd_add_port_meter_profile_srtcm_parsed,
 	.data = NULL,
-	.help_str = "Add port meter profile srtcm (rfc2697)",
+	.help_str = "add port meter profile srtcm_rfc2697 <port_id> <profile_id> <cir> <cbs> <ebs>",
 	.tokens = {
 		(void *)&cmd_add_port_meter_profile_srtcm_add,
 		(void *)&cmd_add_port_meter_profile_srtcm_port,
@@ -515,7 +515,7 @@ static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm = {
 	.f = cmd_add_port_meter_profile_trtcm_parsed,
 	.data = NULL,
-	.help_str = "Add port meter profile trtcm (rfc2698)",
+	.help_str = "add port meter profile trtcm_rfc2698 <port_id> <profile_id> <cir> <pir> <cbs> <pbs>",
 	.tokens = {
 		(void *)&cmd_add_port_meter_profile_trtcm_add,
 		(void *)&cmd_add_port_meter_profile_trtcm_port,
@@ -627,7 +627,7 @@ static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(
 cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115 = {
 	.f = cmd_add_port_meter_profile_trtcm_rfc4115_parsed,
 	.data = NULL,
-	.help_str = "Add port meter profile trtcm (rfc4115)",
+	.help_str = "add port meter profile trtcm_rfc4115 <port_id> <profile_id> <cir> <eir> <cbs> <ebs>",
 	.tokens = {
 		(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_add,
 		(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_port,
@@ -702,7 +702,7 @@ static void cmd_del_port_meter_profile_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_del_port_meter_profile = {
 	.f = cmd_del_port_meter_profile_parsed,
 	.data = NULL,
-	.help_str = "Delete port meter profile",
+	.help_str = "del port meter profile <port_id> <profile_id>",
 	.tokens = {
 		(void *)&cmd_del_port_meter_profile_del,
 		(void *)&cmd_del_port_meter_profile_port,
@@ -827,7 +827,10 @@ static void cmd_create_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_create_port_meter = {
 	.f = cmd_create_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Create port meter",
+	.help_str = "create port meter <port_id> <mtr_id> <profile_id> <meter_enable>(yes|no) "
+		"<g_action>(R|Y|G|D) <y_action>(R|Y|G|D) <r_action>(R|Y|G|D) "
+		"<stats_mask> <shared> <use_pre_meter_color> "
+		"[<dscp_tbl_entry0> <dscp_tbl_entry1> ...<dscp_tbl_entry63>]",
 	.tokens = {
 		(void *)&cmd_create_port_meter_create,
 		(void *)&cmd_create_port_meter_port,
@@ -896,7 +899,7 @@ static void cmd_enable_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_enable_port_meter = {
 	.f = cmd_enable_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Enable port meter",
+	.help_str = "enable port meter <port_id> <mtr_id>",
 	.tokens = {
 		(void *)&cmd_enable_port_meter_enable,
 		(void *)&cmd_enable_port_meter_port,
@@ -957,7 +960,7 @@ static void cmd_disable_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_disable_port_meter = {
 	.f = cmd_disable_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Disable port meter",
+	.help_str = "disable port meter <port_id> <mtr_id>",
 	.tokens = {
 		(void *)&cmd_disable_port_meter_disable,
 		(void *)&cmd_disable_port_meter_port,
@@ -1018,7 +1021,7 @@ static void cmd_del_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_del_port_meter = {
 	.f = cmd_del_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Delete port meter",
+	.help_str = "del port meter <port_id> <mtr_id>",
 	.tokens = {
 		(void *)&cmd_del_port_meter_del,
 		(void *)&cmd_del_port_meter_port,
@@ -1092,7 +1095,7 @@ static void cmd_set_port_meter_profile_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_set_port_meter_profile = {
 	.f = cmd_set_port_meter_profile_parsed,
 	.data = NULL,
-	.help_str = "Set port meter profile",
+	.help_str = "set port meter profile <port_id> <mtr_id> <profile_id>",
 	.tokens = {
 		(void *)&cmd_set_port_meter_profile_set,
 		(void *)&cmd_set_port_meter_profile_port,
@@ -1166,7 +1169,8 @@ free_table:
 cmdline_parse_inst_t cmd_set_port_meter_dscp_table = {
 	.f = cmd_set_port_meter_dscp_table_parsed,
 	.data = NULL,
-	.help_str = "Update port meter dscp table",
+	.help_str = "set port meter dscp table <port_id> <mtr_id> "
+		"[<dscp_tbl_entry0> <dscp_tbl_entry1> ... <dscp_tbl_entry63>]",
 	.tokens = {
 		(void *)&cmd_set_port_meter_dscp_table_set,
 		(void *)&cmd_set_port_meter_dscp_table_port,
@@ -1276,7 +1280,8 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_set_port_meter_policer_action = {
 	.f = cmd_set_port_meter_policer_action_parsed,
 	.data = NULL,
-	.help_str = "Set port meter policer action",
+	.help_str = "set port meter policer action <port_id> <mtr_id> "
+		"<action_mask> <action0> [<action1> <action2>]",
 	.tokens = {
 		(void *)&cmd_set_port_meter_policer_action_set,
 		(void *)&cmd_set_port_meter_policer_action_port,
@@ -1355,7 +1360,7 @@ static void cmd_set_port_meter_stats_mask_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_set_port_meter_stats_mask = {
 	.f = cmd_set_port_meter_stats_mask_parsed,
 	.data = NULL,
-	.help_str = "Set port meter stats mask",
+	.help_str = "set port meter stats mask <port_id> <mtr_id> <stats_mask>",
 	.tokens = {
 		(void *)&cmd_set_port_meter_stats_mask_set,
 		(void *)&cmd_set_port_meter_stats_mask_port,
@@ -1459,7 +1464,7 @@ static void cmd_show_port_meter_stats_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_show_port_meter_stats = {
 	.f = cmd_show_port_meter_stats_parsed,
 	.data = NULL,
-	.help_str = "Show port meter stats",
+	.help_str = "show port meter stats <port_id> <mtr_id> <clear>(yes|no)",
 	.tokens = {
 		(void *)&cmd_show_port_meter_stats_show,
 		(void *)&cmd_show_port_meter_stats_port,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-12 23:40:10.053599217 +0000
+++ 0005-app-testpmd-fix-help-of-metering-commands.patch	2021-02-12 23:40:09.879090655 +0000
@@ -1 +1 @@
-From 618f0f4ac689f9255eecbef9202e77e35a9a7ceb Mon Sep 17 00:00:00 2001
+From ef01e05a7ce8e394d6ec7021d0eace2a37db9163 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 618f0f4ac689f9255eecbef9202e77e35a9a7ceb ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' has been queued to stable release 20.11.1
  2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
                     ` (3 preceding siblings ...)
  2021-02-12 23:40   ` [dpdk-stable] patch 'app/testpmd: fix help of metering commands' " luca.boccassi
@ 2021-02-12 23:40   ` luca.boccassi
  4 siblings, 0 replies; 312+ messages in thread
From: luca.boccassi @ 2021-02-12 23:40 UTC (permalink / raw)
  To: Yongxin Liu; +Cc: Anatoly Burakov, 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/14/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/80fd7ccdb4f7586f6dc865b531a490e82e88a041

Thanks.

Luca Boccassi

---
From 80fd7ccdb4f7586f6dc865b531a490e82e88a041 Mon Sep 17 00:00:00 2001
From: Yongxin Liu <yongxin.liu@windriver.com>
Date: Mon, 23 Nov 2020 11:05:33 +0800
Subject: [PATCH] usertools: fix binding built-in kernel driver

[ upstream commit 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb ]

A driver can be loaded as a dynamic module or a built-in module.
In commit 681a67288655 ("usertools: check if module is loaded
before binding"), the script only checks modules in /sys/module/.

However, for built-in kernel driver, it only shows up in /sys/module/,
if it has a version or at least one parameter. So add check for
modules in /lib/modules/$(uname -r)/modules.builtin.

Fixes: 681a67288655 ("usertools: check if module is loaded before binding")

Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 usertools/dpdk-devbind.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index c2ede3d4df..98bd1b7e4d 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -7,6 +7,7 @@ import sys
 import os
 import subprocess
 import argparse
+import platform
 
 from glob import glob
 from os.path import exists, basename
@@ -107,7 +108,17 @@ def module_is_loaded(module):
 
     loaded_modules = sysfs_mods
 
-    return module in sysfs_mods
+    # add built-in modules as loaded
+    release = platform.uname().release
+    filename = os.path.join("/lib/modules/", release, "modules.builtin")
+    if os.path.exists(filename):
+        try:
+            with open(filename) as f:
+                loaded_modules += [os.path.splitext(os.path.basename(mod))[0] for mod in f]
+        except IOError:
+            print("Warning: cannot read list of built-in kernel modules")
+
+    return module in loaded_modules
 
 
 def check_modules():
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-12 23:40:10.087911818 +0000
+++ 0006-usertools-fix-binding-built-in-kernel-driver.patch	2021-02-12 23:40:09.879090655 +0000
@@ -1 +1 @@
-From 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb Mon Sep 17 00:00:00 2001
+From 80fd7ccdb4f7586f6dc865b531a490e82e88a041 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

end of thread, other threads:[~2021-02-12 23:41 UTC | newest]

Thread overview: 312+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dpdk-stable] patch 'eal/windows: fix vfprintf warning with clang' " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'license: add licenses for exception cases' " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'rib: fix insertion in some " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: fix hardware ID limit on Windows' " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'bus/pci: ignore missing NUMA node " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'build: fix plugin load on static build' " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'app/flow-perf: simplify objects initialization' " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'regex/octeontx2: fix PCI table overflow' " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' " luca.boccassi
2021-02-05 11:14 ` [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'app/procinfo: remove useless memset' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'app/procinfo: remove useless assignment' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/af_xdp: remove useless assignment' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: remove redundant return' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'app/crypto-perf: remove always true condition' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/avp: " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'app/testpmd: fix queue stats mapping configuration' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: remove warnings about inline specifiers' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: fix signed/unsigned mismatch warnings' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'common/sfc_efx/base: support alternative MAE match fields' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ionic: do minor logging fixups' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix Verbs memory allocation callback' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix shared age action validation' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/hns3: fix FEC state query' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix global register recovery' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix format specifier for unsigned int' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix max rings computation' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix freeing mbuf' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix PF resource query' " luca.boccassi
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 ` [dpdk-stable] patch 'common/sfc_efx/base: check " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix memory leak in large VF' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: fix outer checksum flags' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix Direct Verbs flow descriptor allocation' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix mbuf freeing in vectorized MPRQ' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/mlx5: fix buffer split offload advertising' " luca.boccassi
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 ` [dpdk-stable] patch 'net/i40e: fix stats counters' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'doc: fix some statements for ice vector PMD' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/iavf: fix queue pairs configuration' " luca.boccassi
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 ` [dpdk-stable] patch 'net/i40e: fix flex payload rule conflict' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: limit Rx representor packets per poll' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix doorbell write ordering' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: fix outer UDP checksum Rx offload capability' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: make offload flags mapping per-ring' " luca.boccassi
2021-02-05 11:15 ` [dpdk-stable] patch 'net/bnxt: set correct checksum status in mbuf' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'app/testpmd: release flows left before port stop' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix tunnel rules validation on VF representor' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix constant array size' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix freeing packet pacing' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix flow action destroy wrapper' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix flow operation wrapper per OS' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: unify operations for all " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix device name size on Windows' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix comparison sign in flow engine' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS and mark actions combination' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN decap on non-VXLAN flow' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on Tx " luca.boccassi
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 ` [dpdk-stable] patch 'net/virtio-user: fix protocol features advertising' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice/base: fix memory handling' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'doc: fix RSS flow description in i40e guide' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'doc: add vtune profiling config to prog guide' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'build: fix linker flags on Windows' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix build with SVE' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/octeontx: " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'common/octeontx2: " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/cxgbe: accept VLAN flow items without ethertype' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio: add missing backend features negotiation' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/virtio: fix memory init with vDPA backend' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/iavf: fix conflicting RSS combination rules' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: add null input checks' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/bnxt: fix lock init and destroy' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/bnxt: fix error handling in device start' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix hairpin flow split decision' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'common/mlx5: fix completion queue entry size configuration' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: remove CQE padding device argument' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/mlx5: fix leak on ASO SQ creation failure' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'ip_frag: remove padding length of fragment' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'doc: fix figure numbering in graph guide' " luca.boccassi
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 ` [dpdk-stable] patch 'service: propagate init error in EAL' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'eal/windows: fix C++ compatibility' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'test/rwlock: fix spelling and missing whitespace' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'test: fix terminal settings on exit' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'fbarray: fix overlap check' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix memory rule alignment' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix support for group id' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'regex/mlx5: fix number of supported queues' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'crypto/qat: fix access to uninitialized variable' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix interception with flow director' " luca.boccassi
2021-02-05 11:16 ` [dpdk-stable] patch 'net/hns3: fix xstats with id and names' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix error code in xstats' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix Rx/Tx errors stats' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix crash with multi-process' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/qede: fix promiscuous enable' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix start index for showing FEC array' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MPORT related byte order handling' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec validation helper' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec class comparison API' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: enhance field ID check in field set " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: fix max Rx packet length check' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for MTU set' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/dpaa2: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/i40e: fix jumbo frame flag condition' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/ice: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for MTU set' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/octeontx: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for MTU set' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/sfc: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/thunderx: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/ixgbe: fix jumbo frame flag condition' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/cxgbe: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/axgbe: fix jumbo frame flag condition for MTU set' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/enetc: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hinic: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/nfp: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/liquidio: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hinic: restore vectorised code' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: avoid blocking telemetry for link status' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/ionic: fix link speed and autonegotiation' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix VF query link status in dev init' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/hns3: fix dump register out of range' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'common/sfc_efx/base: apply mask to value on match field set' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/mlx5: fix unnecessary checking for RSS action' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net/ixgbe: fix configuration of max frame size' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'eal: fix reciprocal header include' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'telemetry: fix missing " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'ethdev: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'net: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'mbuf: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'bitrate: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'rib: fix missing header includes' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'vhost: " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'ipsec: fix missing header include' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'fib: fix missing header includes' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'table: fix missing header include' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'pipeline: fix missing header includes' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'metrics: fix variable declaration in header' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'node: fix missing header include' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'app: fix build with extra include paths' " luca.boccassi
2021-02-05 11:17 ` [dpdk-stable] patch 'examples/pipeline: fix VXLAN script permission' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'build: force pkg-config for dependency detection' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/procinfo: fix security context info' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'power: create guest channel public header file' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'power: make channel message functions public' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'power: rename public structs' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'power: rename constants' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'power: export guest channel header file' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'power: clean up includes' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'test/ring: reduce duration of performance tests' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'lib: fix doxygen for parameters of function pointers' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'examples/pipeline: fix CLI parsing crash' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst Tx' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: add info output for main core' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'crypto/qat: fix digest in buffer' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'test/ipsec: fix result code for not supported' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'eal: fix MCS lock header include' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'eal: fix internal ABI tag with clang' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'power: fix missing header includes' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'rib: fix missing header include' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/testpmd: fix packets dump overlapping' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/e1000: fix flow control mode setting' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow split combined with counter' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow split combined with age action' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: fix device detach' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: fix handling of probing failure' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix FW version log' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix packet type index calculation' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: refactor init/uninit' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/ice: drain out DCF AdminQ command queue' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'app/testpmd: fix key for RSS flow rule' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/octeontx2: fix PF flow action for Tx' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix mark action in active tunnel offload' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix drop action in tunnel offload mode' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix flow tag decompression' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'doc: update flow mark action in mlx5 guide' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix multi-process port ID' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/mlx4: " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/iavf: fix symmetric flow rule creation' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'ethdev: fix close failure handling' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/virtio: fix getting old status on reconnect' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'vdpa/mlx5: fix configuration mutex cleanup' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: allow separate L3 and L4 checksum offload' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: fix up function attribute tags' " luca.boccassi
2021-02-05 11:18 ` [dpdk-stable] patch 'net/ionic: fix address handling in Tx' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: fix stack corruption' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove VLAN flush' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU validation' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/mvpp2: fix frame size checking' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/mlx5: fix count actions query in sample flow' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/mlx5: fix wire vport hint' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process exit' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: fix interrupt resources in Rx interrupt mode' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: adjust some comments' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/hns3: adjust format specifier for enum' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: fix Tx doorbell statistics' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: validate Rx req ID upon acquiring descriptor' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: fix Tx SQ free space assessment' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/ena: prevent double doorbell' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' " luca.boccassi
2021-02-05 11:19 ` [dpdk-stable] patch 'app/testpmd: fix queue reconfig request on Rx split update' " luca.boccassi
2021-02-09 10:34 ` [dpdk-stable] patch 'net/bnxt: fix Rx completion ring size calculation' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix shared RSS translation and cleanup' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/enic: fix filter type used for flow API' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'doc: add FEC to NIC features' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix product link in hns3 guide' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: check FW miniCQE format capabilities' " luca.boccassi
2021-02-09 10:42     ` Luca Boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix miniCQE configuration for Verbs' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'vhost: fix vid allocation race' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/octeontx: fix max Rx packet length' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'doc: fix supported feature table in mlx5 guide' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix counter and age flow action validation' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'common/mlx5: fix storing synced MAC to internal table' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix link status change from firmware' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix RSS indirection table size' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'app/testpmd: support shared age action query' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: fix shared RSS capability check' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/mlx5: validate hash Rx queue pointer' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'net/enic: fix filter log message' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'event/dlb: fix accessing uninitialized variables' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'eventdev: fix a return value comment' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'mempool: fix panic on dump or audit' " luca.boccassi
2021-02-09 10:35   ` [dpdk-stable] patch 'mbuf: remove unneeded atomic generic header include' " luca.boccassi
2021-02-12 23:40 ` [dpdk-stable] patch 'eal: fix automatic loading of drivers as shared libs' " luca.boccassi
2021-02-12 23:40   ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " luca.boccassi
2021-02-12 23:40   ` [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' " luca.boccassi
2021-02-12 23:40   ` [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' " luca.boccassi
2021-02-12 23:40   ` [dpdk-stable] patch 'app/testpmd: fix help of metering commands' " luca.boccassi
2021-02-12 23:40   ` [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' " luca.boccassi

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