patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3
@ 2022-10-25 15:05 Kevin Traynor
  2022-10-25 15:05 ` patch 'net: accept unaligned data in checksum routines' " Kevin Traynor
                   ` (97 more replies)
  0 siblings, 98 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:05 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 155a98e8645ecc0c01a9f29ea92c204d583e747e Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Wed, 10 Aug 2022 20:40:58 +0300
Subject: [PATCH] build: enable developer mode for all working trees

[ upstream commit 7ccd05e7b7fa1444c5abfd72f4b5cde627721e7d ]

Developer mode was detected if `.git` was a directory.
Linked git working trees created by `git worktree add`
contain `.git` file instead of `.git` directory.
Developer mode was not detected for such directories.
Detect developer mode by the presence of `.git` path.

Fixes: bc4617433845 ("build: enable a developer mode setting")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 21dc51f00d..dff7cff4aa 100644
--- a/meson.build
+++ b/meson.build
@@ -17,5 +17,5 @@ if get_option('developer_mode').auto()
     if meson.version().version_compare('>=0.53') # fs module available
         fs = import('fs')
-        developer_mode = fs.is_dir('.git')
+        developer_mode = fs.exists('.git')
     endif
 else
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.621106988 +0100
+++ 0001-build-enable-developer-mode-for-all-working-trees.patch	2022-10-25 14:18:58.346797858 +0100
@@ -1 +1 @@
-From 7ccd05e7b7fa1444c5abfd72f4b5cde627721e7d Mon Sep 17 00:00:00 2001
+From 155a98e8645ecc0c01a9f29ea92c204d583e747e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7ccd05e7b7fa1444c5abfd72f4b5cde627721e7d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a32f14024b..7d6643da3a 100644
+index 21dc51f00d..dff7cff4aa 100644
@@ -26 +27 @@
-@@ -21,5 +21,5 @@ if get_option('developer_mode').auto()
+@@ -17,5 +17,5 @@ if get_option('developer_mode').auto()


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

* patch 'net: accept unaligned data in checksum routines' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
@ 2022-10-25 15:05 ` Kevin Traynor
  2022-10-25 15:05 ` patch 'eal: fix side effect in some pointer arithmetic macros' " Kevin Traynor
                   ` (96 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:05 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From ac8fea22795ed3fd09ddb70f090636ee1a034d3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Mon, 11 Jul 2022 14:11:32 +0200
Subject: [PATCH] net: accept unaligned data in checksum routines
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 1c9a7fba5c90e0422b517404499ed106f647bcff ]

__rte_raw_cksum() (used by rte_raw_cksum() among others) accessed its
data through an uint16_t pointer, which allowed the compiler to assume
the data was 16-bit aligned. This in turn would, with certain
architectures and compiler flag combinations, result in code with SIMD
load or store instructions with restrictions on data alignment.

This patch keeps the old algorithm, but data is read using memcpy()
instead of direct pointer access, forcing the compiler to always
generate code that handles unaligned input. The __may_alias__ GCC
attribute is no longer needed.

The data on which the Internet checksum functions operates are almost
always 16-bit aligned, but there are exceptions. In particular, the
PDCP protocol header may (literally) have an odd size.

Performance impact seems to range from none to a very slight
regression.

Bugzilla ID: 1035
Fixes: 6006818cfb26 ("net: new checksum functions")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/net/rte_ip.h | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index c575250852..615e5b125e 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -155,16 +155,19 @@ static inline uint32_t
 __rte_raw_cksum(const void *buf, size_t len, uint32_t sum)
 {
-	/* extend strict-aliasing rules */
-	typedef uint16_t __attribute__((__may_alias__)) u16_p;
-	const u16_p *u16_buf = (const u16_p *)buf;
-	const u16_p *end = u16_buf + len / sizeof(*u16_buf);
+	const void *end;
 
-	for (; u16_buf != end; ++u16_buf)
-		sum += *u16_buf;
+	for (end = RTE_PTR_ADD(buf, RTE_ALIGN_FLOOR(len, sizeof(uint16_t)));
+	     buf != end; buf = RTE_PTR_ADD(buf, sizeof(uint16_t))) {
+		uint16_t v;
+
+		memcpy(&v, buf, sizeof(uint16_t));
+		sum += v;
+	}
 
 	/* if length is odd, keeping it byte order independent */
 	if (unlikely(len % 2)) {
 		uint16_t left = 0;
-		*(unsigned char *)&left = *(const unsigned char *)end;
+
+		memcpy(&left, end, 1);
 		sum += left;
 	}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.640593252 +0100
+++ 0002-net-accept-unaligned-data-in-checksum-routines.patch	2022-10-25 14:18:58.348797865 +0100
@@ -1 +1 @@
-From 1c9a7fba5c90e0422b517404499ed106f647bcff Mon Sep 17 00:00:00 2001
+From ac8fea22795ed3fd09ddb70f090636ee1a034d3d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 1c9a7fba5c90e0422b517404499ed106f647bcff ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index b502481670..ecd250e9be 100644
+index c575250852..615e5b125e 100644
@@ -41 +42 @@
-@@ -161,16 +161,19 @@ static inline uint32_t
+@@ -155,16 +155,19 @@ static inline uint32_t


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

* patch 'eal: fix side effect in some pointer arithmetic macros' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
  2022-10-25 15:05 ` patch 'net: accept unaligned data in checksum routines' " Kevin Traynor
@ 2022-10-25 15:05 ` Kevin Traynor
  2022-10-25 15:05 ` patch 'app/testpmd: restore ixgbe bypass commands' " Kevin Traynor
                   ` (95 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:05 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: Morten Brørup, Bruce Richardson, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 48240d704e634336b5de4e9a0bcad40fb7089bdc Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Sat, 27 Aug 2022 14:32:19 +0300
Subject: [PATCH] eal: fix side effect in some pointer arithmetic macros
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 1a7374c95678183aef6f40b64074752831a33d26 ]

RTE_PTR_SUB(ptr, x) and RTE_PTR_ALIGN_FLOOR() worked incorrectly
if "ptr" was an expression:

    uint32_t arr[3];

    RTE_PTR_SUB(arr + 1, sizeof(arr[0]));
    // expected: (uint32_t *)((uintptr_t)(arr + 1) - 4) == arr
    // actual:   (uint32_t *)((uintptr_t) arr + 1  - 4) != arr

    RTE_PTR_ALIGN_FLOOR(arr + 2, sizeof(arr[0]));
    // expected: RTE_ALIGN_FLOOR((uintptr_t)(arr + 2), 4) == &arr[2]
    // actual:   RTE_ALIGN_FLOOR((uintptr_t) arr + 2,  4) == &arr[0]

Fix the macros and extend the relevant unit test.
Convert uses of a custom test failure macro to RTE_TEST_ASSERT*().

Fixes: af75078fece3 ("first public release")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test/test_common.c       | 56 +++++++++++++++++++++++++-----------
 lib/eal/include/rte_common.h |  4 +--
 2 files changed, 41 insertions(+), 19 deletions(-)

diff --git a/app/test/test_common.c b/app/test/test_common.c
index ef177cecb1..f89e1eb7ee 100644
--- a/app/test/test_common.c
+++ b/app/test/test_common.c
@@ -26,29 +26,51 @@ test_macros(int __rte_unused unused_parm)
 #define BIGGER 0x2000U
 #define PTR_DIFF BIGGER - SMALLER
-#define FAIL_MACRO(x)\
-	{printf(#x "() test failed!\n");\
-	return -1;}
 
 	uintptr_t unused = 0;
 	unsigned int smaller = SMALLER, bigger  = BIGGER;
+	uint32_t arr[3];
 
 	RTE_SET_USED(unused);
 
 	RTE_SWAP(smaller, bigger);
-	if (smaller != BIGGER && bigger != SMALLER)
-		FAIL_MACRO(RTE_SWAP);
-	if ((uintptr_t)RTE_PTR_ADD(SMALLER, PTR_DIFF) != BIGGER)
-		FAIL_MACRO(RTE_PTR_ADD);
-	if ((uintptr_t)RTE_PTR_SUB(BIGGER, PTR_DIFF) != SMALLER)
-		FAIL_MACRO(RTE_PTR_SUB);
-	if (RTE_PTR_DIFF(BIGGER, SMALLER) != PTR_DIFF)
-		FAIL_MACRO(RTE_PTR_DIFF);
-	if (RTE_MAX(SMALLER, BIGGER) != BIGGER)
-		FAIL_MACRO(RTE_MAX);
-	if (RTE_MIN(SMALLER, BIGGER) != SMALLER)
-		FAIL_MACRO(RTE_MIN);
+	RTE_TEST_ASSERT(smaller == BIGGER && bigger == SMALLER,
+		"RTE_SWAP");
+	RTE_TEST_ASSERT_EQUAL((uintptr_t)RTE_PTR_ADD(SMALLER, PTR_DIFF), BIGGER,
+		"RTE_PTR_ADD");
+	RTE_TEST_ASSERT_EQUAL((uintptr_t)RTE_PTR_SUB(BIGGER, PTR_DIFF), SMALLER,
+		"RTE_PTR_SUB");
+	RTE_TEST_ASSERT_EQUAL(RTE_PTR_DIFF(BIGGER, SMALLER), PTR_DIFF,
+		"RTE_PTR_DIFF");
+	RTE_TEST_ASSERT_EQUAL(RTE_MAX(SMALLER, BIGGER), BIGGER,
+		"RTE_MAX");
+	RTE_TEST_ASSERT_EQUAL(RTE_MIN(SMALLER, BIGGER), SMALLER,
+		"RTE_MIN");
 
-	if (strncmp(RTE_STR(test), "test", sizeof("test")))
-		FAIL_MACRO(RTE_STR);
+	RTE_TEST_ASSERT_EQUAL(RTE_PTR_ADD(arr + 1, sizeof(arr[0])), &arr[2],
+		"RTE_PTR_ADD(expr, x)");
+	RTE_TEST_ASSERT_EQUAL(RTE_PTR_SUB(arr + 1, sizeof(arr[0])), &arr[0],
+		"RTE_PTR_SUB(expr, x)");
+	RTE_TEST_ASSERT_EQUAL(RTE_PTR_ALIGN_FLOOR(arr + 2, 4), &arr[2],
+		"RTE_PTR_ALIGN_FLOOR(expr, x)");
+	RTE_TEST_ASSERT_EQUAL(RTE_PTR_ALIGN_CEIL(arr + 2, 4), &arr[2],
+		"RTE_PTR_ALIGN_CEIL(expr, x)");
+	RTE_TEST_ASSERT_EQUAL(RTE_PTR_ALIGN(arr + 2, 4), &arr[2],
+		"RTE_PTR_ALIGN(expr, x)");
+
+	RTE_TEST_ASSERT_EQUAL(
+		RTE_PTR_ALIGN_FLOOR(RTE_PTR_ADD(&arr[1], 1), 4), &arr[1],
+		"RTE_PTR_ALIGN_FLOOR(x < y/2, y)");
+	RTE_TEST_ASSERT_EQUAL(
+		RTE_PTR_ALIGN_FLOOR(RTE_PTR_ADD(&arr[1], 3), 4), &arr[1],
+		"RTE_PTR_ALIGN_FLOOR(x > y/2, y)");
+	RTE_TEST_ASSERT_EQUAL(
+		RTE_PTR_ALIGN_CEIL(RTE_PTR_ADD(&arr[1], 3), 4), &arr[2],
+		"RTE_PTR_ALIGN_CEIL(x < y/2, y)");
+	RTE_TEST_ASSERT_EQUAL(
+		RTE_PTR_ALIGN_CEIL(RTE_PTR_ADD(&arr[1], 1), 4), &arr[2],
+		"RTE_PTR_ALIGN_CEIL(x > y/2, y)");
+
+	RTE_TEST_ASSERT(strncmp(RTE_STR(test), "test", sizeof("test")) == 0,
+		"RTE_STR");
 
 	return 0;
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index 6f004f6cb3..5122ea8925 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -271,5 +271,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
  * subtract a byte-value offset from a pointer
  */
-#define RTE_PTR_SUB(ptr, x) ((void*)((uintptr_t)ptr - (x)))
+#define RTE_PTR_SUB(ptr, x) ((void *)((uintptr_t)(ptr) - (x)))
 
 /**
@@ -296,5 +296,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
  */
 #define RTE_PTR_ALIGN_FLOOR(ptr, align) \
-	((typeof(ptr))RTE_ALIGN_FLOOR((uintptr_t)ptr, align))
+	((typeof(ptr))RTE_ALIGN_FLOOR((uintptr_t)(ptr), align))
 
 /**
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.661639051 +0100
+++ 0003-eal-fix-side-effect-in-some-pointer-arithmetic-macro.patch	2022-10-25 14:18:58.350797873 +0100
@@ -1 +1 @@
-From 1a7374c95678183aef6f40b64074752831a33d26 Mon Sep 17 00:00:00 2001
+From 48240d704e634336b5de4e9a0bcad40fb7089bdc Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 1a7374c95678183aef6f40b64074752831a33d26 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -111 +112 @@
-index a96cc2a138..d517e9f75f 100644
+index 6f004f6cb3..5122ea8925 100644
@@ -114 +115 @@
-@@ -296,5 +296,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+@@ -271,5 +271,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
@@ -121 +122 @@
-@@ -321,5 +321,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+@@ -296,5 +296,5 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)


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

* patch 'app/testpmd: restore ixgbe bypass commands' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
  2022-10-25 15:05 ` patch 'net: accept unaligned data in checksum routines' " Kevin Traynor
  2022-10-25 15:05 ` patch 'eal: fix side effect in some pointer arithmetic macros' " Kevin Traynor
@ 2022-10-25 15:05 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/bonding: fix array overflow in Rx burst' " Kevin Traynor
                   ` (94 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:05 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 40e0b6e8277722b5979f0c6ff47f7458e5f56527 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 21 Jul 2022 10:05:45 +0200
Subject: [PATCH] app/testpmd: restore ixgbe bypass commands

[ upstream commit 8d1bd1c04d4122b76e7c9c76ad865ca1c8c3bd8b ]

Since the switch to meson, ixgbe bypass commands were ineffective as the
RTE_LIBRTE_IXGBE_BYPASS build flag was not set, even though the
net/ixgbe driver had this feature compiled in.

Fixes: 16ade738fd0d ("app/testpmd: build with meson")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 43130c8856..99bf383971 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -69,4 +69,5 @@ if dpdk_conf.has('RTE_NET_I40E')
 endif
 if dpdk_conf.has('RTE_NET_IXGBE')
+    cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
     deps += 'net_ixgbe'
 endif
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.682775104 +0100
+++ 0004-app-testpmd-restore-ixgbe-bypass-commands.patch	2022-10-25 14:18:58.350797873 +0100
@@ -1 +1 @@
-From 8d1bd1c04d4122b76e7c9c76ad865ca1c8c3bd8b Mon Sep 17 00:00:00 2001
+From 40e0b6e8277722b5979f0c6ff47f7458e5f56527 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8d1bd1c04d4122b76e7c9c76ad865ca1c8c3bd8b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8488efc138..cbe9bf2e93 100644
+index 43130c8856..99bf383971 100644
@@ -23 +24 @@
-@@ -66,4 +66,5 @@ if dpdk_conf.has('RTE_NET_I40E')
+@@ -69,4 +69,5 @@ if dpdk_conf.has('RTE_NET_I40E')


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

* patch 'net/bonding: fix array overflow in Rx burst' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (2 preceding siblings ...)
  2022-10-25 15:05 ` patch 'app/testpmd: restore ixgbe bypass commands' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/bonding: fix double slave link status query' " Kevin Traynor
                   ` (93 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Lei Ji, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 371746d80f4d19f5938d71ab69735103c06ae28b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 18 Jul 2022 21:08:44 +0800
Subject: [PATCH] net/bonding: fix array overflow in Rx burst

[ upstream commit 007c5450dfa094f7e07ebee3610bcb3494ef842c ]

In bond_ethdev_rx_burst() function, we check the validity of the
'active_slave' as this code:
if (++active_slave == slave_count)
	active_slave = 0;
However, the value of 'active_slave' maybe equal to 'slave_count',
when a slave is down. This is wrong and it can cause buffer overflow.
This patch fixes the issue by using '>=' instead of '=='.

Fixes: e1110e977648 ("net/bonding: fix Rx slave fairness")

Signed-off-by: Lei Ji <jilei8@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 9b3acde46c..6f739cf247 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -83,5 +83,5 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		num_rx_total += num_rx_slave;
 		nb_pkts -= num_rx_slave;
-		if (++active_slave == slave_count)
+		if (++active_slave >= slave_count)
 			active_slave = 0;
 	}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.703320719 +0100
+++ 0005-net-bonding-fix-array-overflow-in-Rx-burst.patch	2022-10-25 14:18:58.355797891 +0100
@@ -1 +1 @@
-From 007c5450dfa094f7e07ebee3610bcb3494ef842c Mon Sep 17 00:00:00 2001
+From 371746d80f4d19f5938d71ab69735103c06ae28b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 007c5450dfa094f7e07ebee3610bcb3494ef842c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index cd80a0af46..02c96f697d 100644
+index 9b3acde46c..6f739cf247 100644


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

* patch 'net/bonding: fix double slave link status query' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (3 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/bonding: fix array overflow in Rx burst' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/failsafe: fix interrupt handle leak' " Kevin Traynor
                   ` (92 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From e9c74a0c19defb06b5ecc7890d2022a0bfba9cdf Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 13 Jul 2022 19:11:13 +0800
Subject: [PATCH] net/bonding: fix double slave link status query

[ upstream commit ac95744076a72c0a150a988cc9042a5422e5041f ]

When link status polling mode is used, the slave link status is
queried twice, which may be inconsistent. To fix this, we can keep
the latest queried link state.

Fixes: a45b288ef21a ("bond: support link status polling")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 6f739cf247..ac60614d25 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2420,7 +2420,4 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)
 			if (slave_ethdev->data->dev_link.link_status !=
 					internals->slaves[i].last_link_status) {
-				internals->slaves[i].last_link_status =
-						slave_ethdev->data->dev_link.link_status;
-
 				bond_ethdev_lsc_event_callback(internals->slaves[i].port_id,
 						RTE_ETH_EVENT_INTR_LSC,
@@ -2921,5 +2918,5 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 	uint8_t lsc_flag = 0;
 	int valid_slave = 0;
-	uint16_t active_pos;
+	uint16_t active_pos, slave_idx;
 	uint16_t i;
 
@@ -2942,4 +2939,5 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		if (internals->slaves[i].port_id == port_id) {
 			valid_slave = 1;
+			slave_idx = i;
 			break;
 		}
@@ -3030,4 +3028,5 @@ link_update:
 	 */
 	bond_ethdev_link_update(bonded_eth_dev, 0);
+	internals->slaves[slave_idx].last_link_status = link.link_status;
 
 	if (lsc_flag) {
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.725001207 +0100
+++ 0006-net-bonding-fix-double-slave-link-status-query.patch	2022-10-25 14:18:58.358797901 +0100
@@ -1 +1 @@
-From ac95744076a72c0a150a988cc9042a5422e5041f Mon Sep 17 00:00:00 2001
+From e9c74a0c19defb06b5ecc7890d2022a0bfba9cdf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac95744076a72c0a150a988cc9042a5422e5041f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 02c96f697d..fd2d95a751 100644
+index 6f739cf247..ac60614d25 100644
@@ -23 +24 @@
-@@ -2419,7 +2419,4 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)
+@@ -2420,7 +2420,4 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)
@@ -31 +32 @@
-@@ -2920,5 +2917,5 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
+@@ -2921,5 +2918,5 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
@@ -38 +39 @@
-@@ -2941,4 +2938,5 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
+@@ -2942,4 +2939,5 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
@@ -44 +45 @@
-@@ -3029,4 +3027,5 @@ link_update:
+@@ -3030,4 +3028,5 @@ link_update:


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

* patch 'net/failsafe: fix interrupt handle leak' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (4 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/bonding: fix double slave link status query' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/nfp: compose firmware file name with new hwinfo' " Kevin Traynor
                   ` (91 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From f88bb5a08adb2000da8ee18a456a19ce25cb62ad Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 24 Mar 2022 16:09:41 +0100
Subject: [PATCH] net/failsafe: fix interrupt handle leak

[ upstream commit f809040b413728bc6ccaa23f0fcc57c5ce0f7930 ]

A intr_handle is being allocated as a hack to get a (proxy) eventfd from
the Linux interrupt implementation.
But this handle is never freed.

Remove this convoluted hack and create an eventfd in Linux case.

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

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 drivers/net/failsafe/failsafe_ops.c | 32 ++++++++++-------------------
 1 file changed, 11 insertions(+), 21 deletions(-)

diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 55e21d635c..2c23d0e70a 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -7,4 +7,7 @@
 #include <stdint.h>
 #include <unistd.h>
+#ifdef RTE_EXEC_ENV_LINUX
+#include <sys/eventfd.h>
+#endif
 
 #include <rte_debug.h>
@@ -388,11 +391,4 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,
 		struct rte_mempool *mb_pool)
 {
-	/*
-	 * FIXME: Add a proper interface in rte_eal_interrupts for
-	 * allocating eventfd as an interrupt vector.
-	 * For the time being, fake as if we are using MSIX interrupts,
-	 * this will cause rte_intr_efd_enable to allocate an eventfd for us.
-	 */
-	struct rte_intr_handle *intr_handle;
 	struct sub_device *sdev;
 	struct rxq *rxq;
@@ -400,14 +396,4 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,
 	int ret;
 
-	intr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
-	if (intr_handle == NULL)
-		return -ENOMEM;
-
-	if (rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_VFIO_MSIX))
-		return -rte_errno;
-
-	if (rte_intr_efds_index_set(intr_handle, 0, -1))
-		return -rte_errno;
-
 	fs_lock(dev, 0);
 	if (rx_conf->rx_deferred_start) {
@@ -443,10 +429,14 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->priv = PRIV(dev);
 	rxq->sdev = PRIV(dev)->subs;
-	ret = rte_intr_efd_enable(intr_handle, 1);
-	if (ret < 0) {
+#ifdef RTE_EXEC_ENV_LINUX
+	rxq->event_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
+	if (rxq->event_fd < 0) {
+		ERROR("Failed to create an eventfd: %s", strerror(errno));
 		fs_unlock(dev, 0);
-		return ret;
+		return -errno;
 	}
-	rxq->event_fd = rte_intr_efds_index_get(intr_handle, 0);
+#else
+	rxq->event_fd = -1;
+#endif
 	dev->data->rx_queues[rx_queue_id] = rxq;
 	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.746730784 +0100
+++ 0007-net-failsafe-fix-interrupt-handle-leak.patch	2022-10-25 14:18:58.359797905 +0100
@@ -1 +1 @@
-From f809040b413728bc6ccaa23f0fcc57c5ce0f7930 Mon Sep 17 00:00:00 2001
+From f88bb5a08adb2000da8ee18a456a19ce25cb62ad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f809040b413728bc6ccaa23f0fcc57c5ce0f7930 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/nfp: compose firmware file name with new hwinfo' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (5 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/failsafe: fix interrupt handle leak' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/axgbe: fix scattered Rx' " Kevin Traynor
                   ` (90 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Peng Zhang; +Cc: Chaoyong He, Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 45ae1b821d35cb4727a11e691a4f486fa2d7b048 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Tue, 2 Aug 2022 15:55:03 +0800
Subject: [PATCH] net/nfp: compose firmware file name with new hwinfo
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 06be30d4763cad78caa156da446f759eac89cd72 ]

During initialization of the NFP driver, a file name for loading
application firmware is composed using the NIC's AMDA information and
port type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".

In practice there may be many variants for each NIC type, and many of
the variants relate to assembly components which do not concern the
driver and application firmware implementation. Yet the current scheme
leads to a different application firmware file name for each variant,
because they have different AMDA information.

To reduce proliferation of content-duplicated application firmware
images or symlinks, the NIC's management firmware will only expose
differences between variants that need different application firmware
via a newly introduced hwinfo, "nffw.partno".

Use of the existing hwinfo, "assembly.partno", is maintained in order to
support for NICs with management firmware that does not expose
"nffw.partno".

Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 1a9f7581a7..67a77f0567 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -666,5 +666,7 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
 	int err = 0;
 
-	nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "assembly.partno");
+	nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "nffw.partno");
+	if (nfp_fw_model == NULL)
+		nfp_fw_model = nfp_hwinfo_lookup(hwinfo, "assembly.partno");
 
 	if (nfp_fw_model) {
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.767401387 +0100
+++ 0008-net-nfp-compose-firmware-file-name-with-new-hwinfo.patch	2022-10-25 14:18:58.360797908 +0100
@@ -1 +1 @@
-From 06be30d4763cad78caa156da446f759eac89cd72 Mon Sep 17 00:00:00 2001
+From 45ae1b821d35cb4727a11e691a4f486fa2d7b048 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 06be30d4763cad78caa156da446f759eac89cd72 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 47359501bc..dffecc3369 100644
+index 1a9f7581a7..67a77f0567 100644
@@ -42 +43 @@
-@@ -681,5 +681,7 @@ nfp_fw_setup(struct rte_pci_device *dev,
+@@ -666,5 +666,7 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,


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

* patch 'net/axgbe: fix scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (6 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/nfp: compose firmware file name with new hwinfo' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/axgbe: fix mbuf lengths in " Kevin Traynor
                   ` (89 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 77c3e4194b0850a178247dd4a2562e2fcabac0d0 Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Fri, 2 Sep 2022 04:47:51 -0400
Subject: [PATCH] net/axgbe: fix scattered Rx

[ upstream commit 0fda97d73775ce7955bfa54216c030188357ae89 ]

Error check needs to be done only for last segment of Jumbo packet.
Freed first_seg and reset eop to 0 in error case

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 35 +++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 6bd41d3002..d7a4641133 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -345,6 +345,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
 	struct rte_mbuf *first_seg = NULL;
 	struct rte_mbuf *mbuf, *tmbuf;
-	unsigned int err, etlt;
-	uint32_t error_status;
+	unsigned int err = 0, etlt;
+	uint32_t error_status = 0;
 	uint16_t idx, pidx, data_len = 0, pkt_len = 0;
 	uint64_t offloads;
@@ -383,17 +383,4 @@ next_desc:
 
 		mbuf = rxq->sw_ring[idx];
-		/* Check for any errors and free mbuf*/
-		err = AXGMAC_GET_BITS_LE(desc->write.desc3,
-					 RX_NORMAL_DESC3, ES);
-		error_status = 0;
-		if (unlikely(err)) {
-			error_status = desc->write.desc3 & AXGBE_ERR_STATUS;
-			if ((error_status != AXGBE_L3_CSUM_ERR)
-					&& (error_status != AXGBE_L4_CSUM_ERR)) {
-				rxq->errors++;
-				rte_pktmbuf_free(mbuf);
-				goto err_set;
-			}
-		}
 		rte_prefetch1(rte_pktmbuf_mtod(mbuf, void *));
 
@@ -408,4 +395,22 @@ next_desc:
 					RX_NORMAL_DESC3, PL);
 			data_len = pkt_len - rxq->crc_len;
+			/* Check for any errors and free mbuf*/
+			err = AXGMAC_GET_BITS_LE(desc->write.desc3,
+					RX_NORMAL_DESC3, ES);
+			error_status = 0;
+			if (unlikely(err)) {
+				error_status = desc->write.desc3 &
+					AXGBE_ERR_STATUS;
+				if (error_status != AXGBE_L3_CSUM_ERR &&
+						error_status != AXGBE_L4_CSUM_ERR) {
+					rxq->errors++;
+					rte_pktmbuf_free(mbuf);
+					rte_pktmbuf_free(first_seg);
+					first_seg = NULL;
+					eop = 0;
+					goto err_set;
+				}
+			}
+
 		}
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.787976668 +0100
+++ 0009-net-axgbe-fix-scattered-Rx.patch	2022-10-25 14:18:58.361797912 +0100
@@ -1 +1 @@
-From 0fda97d73775ce7955bfa54216c030188357ae89 Mon Sep 17 00:00:00 2001
+From 77c3e4194b0850a178247dd4a2562e2fcabac0d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0fda97d73775ce7955bfa54216c030188357ae89 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f38bb64fab..89ed6fd74a 100644
+index 6bd41d3002..d7a4641133 100644
@@ -22 +23 @@
-@@ -344,6 +344,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
+@@ -345,6 +345,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
@@ -31 +32 @@
-@@ -382,17 +382,4 @@ next_desc:
+@@ -383,17 +383,4 @@ next_desc:
@@ -49 +50 @@
-@@ -407,4 +394,22 @@ next_desc:
+@@ -408,4 +395,22 @@ next_desc:


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

* patch 'net/axgbe: fix mbuf lengths in scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (7 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/axgbe: fix scattered Rx' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/axgbe: fix length of each segment " Kevin Traynor
                   ` (88 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From fca744c60f26c0a6b35d45306e99fb3b388b6d3d Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Fri, 2 Sep 2022 04:47:52 -0400
Subject: [PATCH] net/axgbe: fix mbuf lengths in scattered Rx

[ upstream commit e73845354abce20ed9677c6519bcbe5a450fecef ]

Updated pkt_len and data_len in the last segment of the packet.

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index d7a4641133..cb973bb052 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -393,6 +393,6 @@ next_desc:
 			eop = 1;
 			pkt_len = AXGMAC_GET_BITS_LE(desc->write.desc3,
-					RX_NORMAL_DESC3, PL);
-			data_len = pkt_len - rxq->crc_len;
+					RX_NORMAL_DESC3, PL) - rxq->crc_len;
+			data_len = pkt_len % rxq->buf_size;
 			/* Check for any errors and free mbuf*/
 			err = AXGMAC_GET_BITS_LE(desc->write.desc3,
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.808188707 +0100
+++ 0010-net-axgbe-fix-mbuf-lengths-in-scattered-Rx.patch	2022-10-25 14:18:58.361797912 +0100
@@ -1 +1 @@
-From e73845354abce20ed9677c6519bcbe5a450fecef Mon Sep 17 00:00:00 2001
+From fca744c60f26c0a6b35d45306e99fb3b388b6d3d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e73845354abce20ed9677c6519bcbe5a450fecef ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 89ed6fd74a..2c2554e900 100644
+index d7a4641133..cb973bb052 100644
@@ -21 +22 @@
-@@ -392,6 +392,6 @@ next_desc:
+@@ -393,6 +393,6 @@ next_desc:


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

* patch 'net/axgbe: fix length of each segment in scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (8 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/axgbe: fix mbuf lengths in " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/axgbe: fix checksum and RSS " Kevin Traynor
                   ` (87 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From edf988aa48d6c544765a7ea69dd04b42c744a542 Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Fri, 2 Sep 2022 04:47:53 -0400
Subject: [PATCH] net/axgbe: fix length of each segment in scattered Rx

[ upstream commit d901cc0596317a861b90a2c26b6560bde92bd2df ]

Updating mbuf data_len, Pkt_len for each segment before chaining them

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index cb973bb052..098f8be68c 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -414,4 +414,8 @@ next_desc:
 
 		}
+		/* Mbuf populate */
+		mbuf->data_off = RTE_PKTMBUF_HEADROOM;
+		mbuf->data_len = data_len;
+		mbuf->pkt_len = data_len;
 
 		if (first_seg != NULL) {
@@ -445,7 +449,4 @@ next_desc:
 			}
 		}
-		/* Mbuf populate */
-		mbuf->data_off = RTE_PKTMBUF_HEADROOM;
-		mbuf->data_len = data_len;
 
 err_set:
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.828955877 +0100
+++ 0011-net-axgbe-fix-length-of-each-segment-in-scattered-Rx.patch	2022-10-25 14:18:58.362797916 +0100
@@ -1 +1 @@
-From d901cc0596317a861b90a2c26b6560bde92bd2df Mon Sep 17 00:00:00 2001
+From edf988aa48d6c544765a7ea69dd04b42c744a542 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d901cc0596317a861b90a2c26b6560bde92bd2df ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2c2554e900..7c07fd90ef 100644
+index cb973bb052..098f8be68c 100644
@@ -21 +22 @@
-@@ -413,4 +413,8 @@ next_desc:
+@@ -414,4 +414,8 @@ next_desc:
@@ -30 +31 @@
-@@ -444,7 +448,4 @@ next_desc:
+@@ -445,7 +449,4 @@ next_desc:


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

* patch 'net/axgbe: fix checksum and RSS in scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (9 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/axgbe: fix length of each segment " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/axgbe: optimise " Kevin Traynor
                   ` (86 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 7c52801e6cfab0cfc5ec08be7faaedb13c0e5515 Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Fri, 2 Sep 2022 04:47:54 -0400
Subject: [PATCH] net/axgbe: fix checksum and RSS in scattered Rx

[ upstream commit 970d2e22ca48581dcb8ee467a3521e9a22fbf8f4 ]

Updated the RSS hash and CSUM checks with first_seg instead of mbufs.

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 41 +++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 098f8be68c..9d6ea38f45 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -429,5 +429,6 @@ next_desc:
 		/* Get the RSS hash */
 		if (AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, RSV))
-			mbuf->hash.rss = rte_le_to_cpu_32(desc->write.desc1);
+			first_seg->hash.rss =
+				rte_le_to_cpu_32(desc->write.desc1);
 		etlt = AXGMAC_GET_BITS_LE(desc->write.desc3,
 				RX_NORMAL_DESC3, ETLT);
@@ -435,16 +436,18 @@ next_desc:
 		if (!err || !etlt) {
 			if (etlt == RX_CVLAN_TAG_PRESENT) {
-				mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN;
-				mbuf->vlan_tci =
+				first_seg->ol_flags |= RTE_MBUF_F_RX_VLAN;
+				first_seg->vlan_tci =
 					AXGMAC_GET_BITS_LE(desc->write.desc0,
 							RX_NORMAL_DESC0, OVT);
 				if (offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
-					mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED;
+					first_seg->ol_flags |=
+						RTE_MBUF_F_RX_VLAN_STRIPPED;
 				else
-					mbuf->ol_flags &= ~RTE_MBUF_F_RX_VLAN_STRIPPED;
+					first_seg->ol_flags &=
+						~RTE_MBUF_F_RX_VLAN_STRIPPED;
 			} else {
-				mbuf->ol_flags &=
+				first_seg->ol_flags &=
 					~(RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED);
-				mbuf->vlan_tci = 0;
+				first_seg->vlan_tci = 0;
 			}
 		}
@@ -470,16 +473,22 @@ err_set:
 		first_seg->port = rxq->port_id;
 		if (rxq->pdata->rx_csum_enable) {
-			mbuf->ol_flags = 0;
-			mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
-			mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
+			first_seg->ol_flags = 0;
+			first_seg->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+			first_seg->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 			if (unlikely(error_status == AXGBE_L3_CSUM_ERR)) {
-				mbuf->ol_flags &= ~RTE_MBUF_F_RX_IP_CKSUM_GOOD;
-				mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-				mbuf->ol_flags &= ~RTE_MBUF_F_RX_L4_CKSUM_GOOD;
-				mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
+				first_seg->ol_flags &=
+					~RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+				first_seg->ol_flags |=
+					RTE_MBUF_F_RX_IP_CKSUM_BAD;
+				first_seg->ol_flags &=
+					~RTE_MBUF_F_RX_L4_CKSUM_GOOD;
+				first_seg->ol_flags |=
+					RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
 			} else if (unlikely(error_status
 						== AXGBE_L4_CSUM_ERR)) {
-				mbuf->ol_flags &= ~RTE_MBUF_F_RX_L4_CKSUM_GOOD;
-				mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+				first_seg->ol_flags &=
+					~RTE_MBUF_F_RX_L4_CKSUM_GOOD;
+				first_seg->ol_flags |=
+					RTE_MBUF_F_RX_L4_CKSUM_BAD;
 			}
 		}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.849284717 +0100
+++ 0012-net-axgbe-fix-checksum-and-RSS-in-scattered-Rx.patch	2022-10-25 14:18:58.362797916 +0100
@@ -1 +1 @@
-From 970d2e22ca48581dcb8ee467a3521e9a22fbf8f4 Mon Sep 17 00:00:00 2001
+From 7c52801e6cfab0cfc5ec08be7faaedb13c0e5515 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 970d2e22ca48581dcb8ee467a3521e9a22fbf8f4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 7c07fd90ef..2bad638f79 100644
+index 098f8be68c..9d6ea38f45 100644
@@ -21 +22 @@
-@@ -428,5 +428,6 @@ next_desc:
+@@ -429,5 +429,6 @@ next_desc:
@@ -29 +30 @@
-@@ -434,16 +435,18 @@ next_desc:
+@@ -435,16 +436,18 @@ next_desc:
@@ -54 +55 @@
-@@ -469,16 +472,22 @@ err_set:
+@@ -470,16 +473,22 @@ err_set:


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

* patch 'net/axgbe: optimise scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (10 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/axgbe: fix checksum and RSS " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/axgbe: remove freeing buffer in " Kevin Traynor
                   ` (85 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From c57a09f16a5cf3c47127fa43bdbb695970094f63 Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Tue, 6 Sep 2022 07:59:15 -0400
Subject: [PATCH] net/axgbe: optimise scattered Rx

[ upstream commit 2770163844038ed4fe862c438a7e65443be0c817 ]

Updated the logic to remove the extra increments of the variables.

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 9d6ea38f45..7a95a1c437 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -342,5 +342,4 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
 	volatile union axgbe_rx_desc *desc;
 
-	uint64_t old_dirty = rxq->dirty;
 	struct rte_mbuf *first_seg = NULL;
 	struct rte_mbuf *mbuf, *tmbuf;
@@ -354,6 +353,5 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
 		bool eop = 0;
 next_desc:
-		if (unlikely(idx == rxq->nb_desc))
-			idx = 0;
+		idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur);
 
 		desc = &rxq->desc[idx];
@@ -448,5 +446,6 @@ next_desc:
 			} else {
 				first_seg->ol_flags &=
-					~(RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED);
+					~(RTE_MBUF_F_RX_VLAN |
+							RTE_MBUF_F_RX_VLAN_STRIPPED);
 				first_seg->vlan_tci = 0;
 			}
@@ -455,10 +454,9 @@ next_desc:
 err_set:
 		rxq->cur++;
-		rxq->sw_ring[idx++] = tmbuf;
+		rxq->sw_ring[idx] = tmbuf;
 		desc->read.baddr =
 			rte_cpu_to_le_64(rte_mbuf_data_iova_default(tmbuf));
 		memset((void *)(&desc->read.desc2), 0, 8);
 		AXGMAC_SET_BITS_LE(desc->read.desc3, RX_NORMAL_DESC3, OWN, 1);
-		rxq->dirty++;
 
 		if (!eop) {
@@ -503,10 +501,11 @@ err_set:
 	rxq->pkts += nb_rx;
 
-	if (rxq->dirty != old_dirty) {
+	if (rxq->dirty != rxq->cur) {
 		rte_wmb();
-		idx = AXGBE_GET_DESC_IDX(rxq, rxq->dirty - 1);
+		idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur - 1);
 		AXGMAC_DMA_IOWRITE(rxq, DMA_CH_RDTR_LO,
 				   low32_value(rxq->ring_phys_addr +
 				   (idx * sizeof(union axgbe_rx_desc))));
+		rxq->dirty = rxq->cur;
 	}
 	return nb_rx;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.869446248 +0100
+++ 0013-net-axgbe-optimise-scattered-Rx.patch	2022-10-25 14:18:58.363797919 +0100
@@ -1 +1 @@
-From 2770163844038ed4fe862c438a7e65443be0c817 Mon Sep 17 00:00:00 2001
+From c57a09f16a5cf3c47127fa43bdbb695970094f63 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2770163844038ed4fe862c438a7e65443be0c817 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2bad638f79..8b43e8160b 100644
+index 9d6ea38f45..7a95a1c437 100644
@@ -21 +22 @@
-@@ -341,5 +341,4 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
+@@ -342,5 +342,4 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
@@ -27 +28 @@
-@@ -353,6 +352,5 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
+@@ -354,6 +353,5 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
@@ -35 +36 @@
-@@ -447,5 +445,6 @@ next_desc:
+@@ -448,5 +446,6 @@ next_desc:
@@ -43 +44 @@
-@@ -454,10 +453,9 @@ next_desc:
+@@ -455,10 +454,9 @@ next_desc:
@@ -55 +56 @@
-@@ -502,10 +500,11 @@ err_set:
+@@ -503,10 +501,11 @@ err_set:


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

* patch 'net/axgbe: remove freeing buffer in scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (11 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/axgbe: optimise " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/nfp: improve HW info header log readability' " Kevin Traynor
                   ` (84 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 88eb5f06dd1c4833126fcc91565b2bfb4b5c7d27 Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Thu, 8 Sep 2022 08:42:15 -0400
Subject: [PATCH] net/axgbe: remove freeing buffer in scattered Rx

[ upstream commit e867021dadd7976758b4892cb64b19078a1855e0 ]

Removed freeing of mbuf in scattered Rx as it should not be freed in rx.

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 7a95a1c437..7bac482e92 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -460,12 +460,9 @@ err_set:
 		AXGMAC_SET_BITS_LE(desc->read.desc3, RX_NORMAL_DESC3, OWN, 1);
 
-		if (!eop) {
-			rte_pktmbuf_free(mbuf);
+		if (!eop)
 			goto next_desc;
-		}
 
 		first_seg->pkt_len = pkt_len;
 		rxq->bytes += pkt_len;
-		mbuf->next = NULL;
 
 		first_seg->port = rxq->port_id;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.890199468 +0100
+++ 0014-net-axgbe-remove-freeing-buffer-in-scattered-Rx.patch	2022-10-25 14:18:58.363797919 +0100
@@ -1 +1 @@
-From e867021dadd7976758b4892cb64b19078a1855e0 Mon Sep 17 00:00:00 2001
+From 88eb5f06dd1c4833126fcc91565b2bfb4b5c7d27 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e867021dadd7976758b4892cb64b19078a1855e0 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 8b43e8160b..d4224992ee 100644
+index 7a95a1c437..7bac482e92 100644
@@ -21 +22 @@
-@@ -459,12 +459,9 @@ err_set:
+@@ -460,12 +460,9 @@ err_set:


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

* patch 'net/nfp: improve HW info header log readability' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (12 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/axgbe: remove freeing buffer in " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/txgbe: fix IPv6 flow rule' " Kevin Traynor
                   ` (83 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: James Hershaw; +Cc: Chaoyong He, Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From f1810ceebb938aca23939d1419b336fb13d2ed7b Mon Sep 17 00:00:00 2001
From: James Hershaw <james.hershaw@corigine.com>
Date: Fri, 26 Aug 2022 13:39:03 +0800
Subject: [PATCH] net/nfp: improve HW info header log readability
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c18806818fb530d60003ea7da0b866fcdfe81e45 ]

Prepend `0x` to the NFP HWINFO header value that is printed to improve
the readability of the printed statement.

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: James Hershaw <james.hershaw@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfpcore/nfp_hwinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_hwinfo.c b/drivers/net/nfp/nfpcore/nfp_hwinfo.c
index c0516bf8e8..9f848bde79 100644
--- a/drivers/net/nfp/nfpcore/nfp_hwinfo.c
+++ b/drivers/net/nfp/nfpcore/nfp_hwinfo.c
@@ -109,5 +109,5 @@ nfp_hwinfo_try_fetch(struct nfp_cpp *cpp, size_t *cpp_size)
 
 	header = (void *)db;
-	printf("NFP HWINFO header: %08x\n", *(uint32_t *)header);
+	printf("NFP HWINFO header: %#08x\n", *(uint32_t *)header);
 	if (nfp_hwinfo_is_updating(header))
 		goto exit_free;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.910444171 +0100
+++ 0015-net-nfp-improve-HW-info-header-log-readability.patch	2022-10-25 14:18:58.364797923 +0100
@@ -1 +1 @@
-From c18806818fb530d60003ea7da0b866fcdfe81e45 Mon Sep 17 00:00:00 2001
+From f1810ceebb938aca23939d1419b336fb13d2ed7b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c18806818fb530d60003ea7da0b866fcdfe81e45 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/txgbe: fix IPv6 flow rule' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (13 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/nfp: improve HW info header log readability' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/txgbe: remove semaphore between SW/FW' " Kevin Traynor
                   ` (82 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From d47522ba5cfa5340cb556edc4f4e99d13e08d8a1 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 2 Sep 2022 11:00:03 +0800
Subject: [PATCH] net/txgbe: fix IPv6 flow rule

[ upstream commit 7147c01a49a0020b62608ab6605cae421a773685 ]

Convert the correct packet type and flow type, to fix IPv6 rule in FDIR.

Fixes: b973ee26747a ("net/txgbe: parse flow director filter")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_flow.c | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_flow.c b/drivers/net/txgbe/txgbe_flow.c
index 6d7fd18428..ac9e8605c1 100644
--- a/drivers/net/txgbe/txgbe_flow.c
+++ b/drivers/net/txgbe/txgbe_flow.c
@@ -1584,7 +1584,5 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
 	 */
 	memset(rule, 0, sizeof(struct txgbe_fdir_rule));
-	memset(&rule->mask, 0xFF, sizeof(struct txgbe_hw_fdir_mask));
-	rule->mask.vlan_tci_mask = 0;
-	rule->mask.flex_bytes_mask = 0;
+	memset(&rule->mask, 0, sizeof(struct txgbe_hw_fdir_mask));
 
 	/**
@@ -1868,5 +1866,8 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
 		 */
 		rule->input.flow_type |= TXGBE_ATR_L4TYPE_TCP;
-		ptype = txgbe_ptype_table[TXGBE_PT_IPV4_TCP];
+		if (rule->input.flow_type & TXGBE_ATR_FLOW_TYPE_IPV6)
+			ptype = txgbe_ptype_table[TXGBE_PT_IPV6_TCP];
+		else
+			ptype = txgbe_ptype_table[TXGBE_PT_IPV4_TCP];
 		/*Not supported last point for range*/
 		if (item->last) {
@@ -1932,5 +1933,8 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
 		 */
 		rule->input.flow_type |= TXGBE_ATR_L4TYPE_UDP;
-		ptype = txgbe_ptype_table[TXGBE_PT_IPV4_UDP];
+		if (rule->input.flow_type & TXGBE_ATR_FLOW_TYPE_IPV6)
+			ptype = txgbe_ptype_table[TXGBE_PT_IPV6_UDP];
+		else
+			ptype = txgbe_ptype_table[TXGBE_PT_IPV4_UDP];
 		/*Not supported last point for range*/
 		if (item->last) {
@@ -1991,5 +1995,8 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
 		 */
 		rule->input.flow_type |= TXGBE_ATR_L4TYPE_SCTP;
-		ptype = txgbe_ptype_table[TXGBE_PT_IPV4_SCTP];
+		if (rule->input.flow_type & TXGBE_ATR_FLOW_TYPE_IPV6)
+			ptype = txgbe_ptype_table[TXGBE_PT_IPV6_SCTP];
+		else
+			ptype = txgbe_ptype_table[TXGBE_PT_IPV4_SCTP];
 		/*Not supported last point for range*/
 		if (item->last) {
@@ -2142,4 +2149,14 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
 	rule->input.pkt_type = cpu_to_be16(txgbe_encode_ptype(ptype));
 
+	if (rule->input.flow_type & TXGBE_ATR_FLOW_TYPE_IPV6) {
+		if (rule->input.flow_type & TXGBE_ATR_L4TYPE_MASK)
+			rule->input.pkt_type &= 0xFFFF;
+		else
+			rule->input.pkt_type &= 0xF8FF;
+
+		rule->input.flow_type &= TXGBE_ATR_L3TYPE_MASK |
+					TXGBE_ATR_L4TYPE_MASK;
+	}
+
 	return txgbe_parse_fdir_act_attr(attr, actions, rule, error);
 }
@@ -2828,6 +2845,8 @@ txgbe_flow_create(struct rte_eth_dev *dev,
 					&fdir_rule.mask,
 					sizeof(struct txgbe_hw_fdir_mask));
-				if (ret)
+				if (ret) {
+					PMD_DRV_LOG(ERR, "only support one global mask");
 					goto out;
+				}
 
 				if (fdir_info->flex_bytes_offset !=
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.930641201 +0100
+++ 0016-net-txgbe-fix-IPv6-flow-rule.patch	2022-10-25 14:18:58.366797930 +0100
@@ -1 +1 @@
-From 7147c01a49a0020b62608ab6605cae421a773685 Mon Sep 17 00:00:00 2001
+From d47522ba5cfa5340cb556edc4f4e99d13e08d8a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7147c01a49a0020b62608ab6605cae421a773685 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 9288af05b2..7b18dca7e8 100644
+index 6d7fd18428..ac9e8605c1 100644
@@ -74 +75 @@
-@@ -2835,6 +2852,8 @@ txgbe_flow_create(struct rte_eth_dev *dev,
+@@ -2828,6 +2845,8 @@ txgbe_flow_create(struct rte_eth_dev *dev,


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

* patch 'net/txgbe: remove semaphore between SW/FW' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (14 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/txgbe: fix IPv6 flow rule' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/txgbe: rename some extended statistics' " Kevin Traynor
                   ` (81 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 982225e1bba5ad3d4225ac48c8e31316b768852a Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 2 Sep 2022 11:00:05 +0800
Subject: [PATCH] net/txgbe: remove semaphore between SW/FW

[ upstream commit 61b7a046e260897329a648b1c0e72032b5fbe685 ]

Since firmware does not use the semaphore between software and firmware.
Remove useless unilateral semaphore setting.

Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_eeprom.c | 32 ---------------------------
 1 file changed, 32 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_eeprom.c b/drivers/net/txgbe/base/txgbe_eeprom.c
index 4ed6bd6728..aeeae06dfc 100644
--- a/drivers/net/txgbe/base/txgbe_eeprom.c
+++ b/drivers/net/txgbe/base/txgbe_eeprom.c
@@ -112,35 +112,4 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
 	}
 
-	/* Now get the semaphore between SW/FW through the SWESMBI bit */
-	if (status == 0) {
-		for (i = 0; i < timeout; i++) {
-			/* Set the SW EEPROM semaphore bit to request access */
-			wr32m(hw, TXGBE_MNGSWSYNC,
-				TXGBE_MNGSWSYNC_REQ, TXGBE_MNGSWSYNC_REQ);
-
-			/*
-			 * If we set the bit successfully then we got the
-			 * semaphore.
-			 */
-			swsm = rd32(hw, TXGBE_MNGSWSYNC);
-			if (swsm & TXGBE_MNGSWSYNC_REQ)
-				break;
-
-			usec_delay(50);
-		}
-
-		/*
-		 * Release semaphores and return error if SW EEPROM semaphore
-		 * was not granted because we don't have access to the EEPROM
-		 */
-		if (i >= timeout) {
-			DEBUGOUT("SWESMBI Software EEPROM semaphore not granted.");
-			txgbe_release_eeprom_semaphore(hw);
-			status = TXGBE_ERR_EEPROM;
-		}
-	} else {
-		DEBUGOUT("Software semaphore SMBI between device drivers not granted.");
-	}
-
 	return status;
 }
@@ -154,5 +123,4 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
 void txgbe_release_eeprom_semaphore(struct txgbe_hw *hw)
 {
-	wr32m(hw, TXGBE_MNGSWSYNC, TXGBE_MNGSWSYNC_REQ, 0);
 	wr32m(hw, TXGBE_SWSEM, TXGBE_SWSEM_PF, 0);
 	txgbe_flush(hw);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.951770912 +0100
+++ 0017-net-txgbe-remove-semaphore-between-SW-FW.patch	2022-10-25 14:18:58.366797930 +0100
@@ -1 +1 @@
-From 61b7a046e260897329a648b1c0e72032b5fbe685 Mon Sep 17 00:00:00 2001
+From 982225e1bba5ad3d4225ac48c8e31316b768852a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 61b7a046e260897329a648b1c0e72032b5fbe685 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/txgbe: rename some extended statistics' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (15 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/txgbe: remove semaphore between SW/FW' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ngbe: " Kevin Traynor
                   ` (80 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 8bdb992cea5c5625fa017610a0be4546cb0d3378 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 2 Sep 2022 11:00:06 +0800
Subject: [PATCH] net/txgbe: rename some extended statistics

[ upstream commit d7494d6d530dc425b077d60b0035f99ee1741673 ]

Rename rx_oversize_errors to rx_oversize_cnt since it depends on giant
packet size limit instead of MTU, by hardware design.
Rename rx_drop_packets to rx_rdb_drop to indicate the drop location.
And add rx_dma_drop to extended statistics.

Fixes: 91fe49c87d76 ("net/txgbe: support device xstats")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_type.h |  4 ++--
 drivers/net/txgbe/txgbe_ethdev.c    | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index d95467f9f8..7010372119 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -356,7 +356,7 @@ struct txgbe_hw_stats {
 	u64 rx_management_dropped;
 	u64 rx_dma_drop;
-	u64 rx_drop_packets;
 
 	/* Basic Error */
+	u64 rx_rdb_drop;
 	u64 rx_crc_errors;
 	u64 rx_illegal_byte_errors;
@@ -366,5 +366,5 @@ struct txgbe_hw_stats {
 	u64 rx_undersize_errors;
 	u64 rx_fragment_errors;
-	u64 rx_oversize_errors;
+	u64 rx_oversize_cnt;
 	u64 rx_jabber_errors;
 	u64 rx_l3_l4_xsum_error;
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 49948e62bc..c229736d85 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -184,6 +184,8 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {
 	HW_XSTAT(tx_management_packets),
 	HW_XSTAT(rx_management_dropped),
+	HW_XSTAT(rx_dma_drop),
 
 	/* Basic Error */
+	HW_XSTAT(rx_rdb_drop),
 	HW_XSTAT(rx_crc_errors),
 	HW_XSTAT(rx_illegal_byte_errors),
@@ -193,5 +195,5 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {
 	HW_XSTAT(rx_undersize_errors),
 	HW_XSTAT(rx_fragment_errors),
-	HW_XSTAT(rx_oversize_errors),
+	HW_XSTAT(rx_oversize_cnt),
 	HW_XSTAT(rx_jabber_errors),
 	HW_XSTAT(rx_l3_l4_xsum_error),
@@ -2148,5 +2150,5 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
 	hw_stats->tx_bytes += rd64(hw, TXGBE_DMATXOCTL);
 	hw_stats->rx_dma_drop += rd32(hw, TXGBE_DMARXDROP);
-	hw_stats->rx_drop_packets += rd32(hw, TXGBE_PBRXDROP);
+	hw_stats->rx_rdb_drop += rd32(hw, TXGBE_PBRXDROP);
 
 	/* MAC Stats */
@@ -2180,5 +2182,5 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
 
 	hw_stats->rx_undersize_errors += rd64(hw, TXGBE_MACRXERRLENL);
-	hw_stats->rx_oversize_errors += rd32(hw, TXGBE_MACRXOVERSIZE);
+	hw_stats->rx_oversize_cnt += rd32(hw, TXGBE_MACRXOVERSIZE);
 	hw_stats->rx_jabber_errors += rd32(hw, TXGBE_MACRXJABBER);
 
@@ -2302,6 +2304,5 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			  hw_stats->rx_length_errors +
 			  hw_stats->rx_undersize_errors +
-			  hw_stats->rx_oversize_errors +
-			  hw_stats->rx_drop_packets +
+			  hw_stats->rx_rdb_drop +
 			  hw_stats->rx_illegal_byte_errors +
 			  hw_stats->rx_error_bytes +
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.972217415 +0100
+++ 0018-net-txgbe-rename-some-extended-statistics.patch	2022-10-25 14:18:58.371797948 +0100
@@ -1 +1 @@
-From d7494d6d530dc425b077d60b0035f99ee1741673 Mon Sep 17 00:00:00 2001
+From 8bdb992cea5c5625fa017610a0be4546cb0d3378 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7494d6d530dc425b077d60b0035f99ee1741673 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 343279127f..c3486b472f 100644
+index d95467f9f8..7010372119 100644
@@ -24 +25 @@
-@@ -357,7 +357,7 @@ struct txgbe_hw_stats {
+@@ -356,7 +356,7 @@ struct txgbe_hw_stats {
@@ -33 +34 @@
-@@ -367,5 +367,5 @@ struct txgbe_hw_stats {
+@@ -366,5 +366,5 @@ struct txgbe_hw_stats {
@@ -41 +42 @@
-index 0624568bdf..44224724da 100644
+index 49948e62bc..c229736d85 100644
@@ -60 +61 @@
-@@ -2158,5 +2160,5 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
+@@ -2148,5 +2150,5 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
@@ -67 +68 @@
-@@ -2190,5 +2192,5 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
+@@ -2180,5 +2182,5 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
@@ -74 +75 @@
-@@ -2312,6 +2314,5 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -2302,6 +2304,5 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)


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

* patch 'net/ngbe: rename some extended statistics' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (16 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/txgbe: rename some extended statistics' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ngbe: remove semaphore between SW/FW' " Kevin Traynor
                   ` (79 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 9f6bab86f3af235c1511ec192958060858a35fc6 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 2 Sep 2022 11:00:07 +0800
Subject: [PATCH] net/ngbe: rename some extended statistics

[ upstream commit fee9350f1d23ab9deeaf287be41212c9f0d85d5e ]

Rename rx_oversize_errors to rx_oversize_cnt since it depends on giant
packet size limit instead of MTU, by hardware design.
Rename rx_drop_packets and tx_drop_packets to rx_dma_drop and tx_dma_drop
to indicate the drop location.
And add tx_dma_drop to extended statistics.

Fixes: 8b433d04adc9 ("net/ngbe: support device xstats")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_type.h |  5 ++---
 drivers/net/ngbe/ngbe_ethdev.c    | 10 +++++-----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ngbe/base/ngbe_type.h b/drivers/net/ngbe/base/ngbe_type.h
index 4c995e7397..043da3cd25 100644
--- a/drivers/net/ngbe/base/ngbe_type.h
+++ b/drivers/net/ngbe/base/ngbe_type.h
@@ -137,7 +137,6 @@ struct ngbe_hw_stats {
 	u64 mng_host2bmc_packets;
 	/* Basix RxTx */
-	u64 rx_drop_packets;
-	u64 tx_drop_packets;
 	u64 rx_dma_drop;
+	u64 tx_dma_drop;
 	u64 tx_secdrp_packets;
 	u64 rx_packets;
@@ -165,5 +164,5 @@ struct ngbe_hw_stats {
 	u64 rx_undersize_errors;
 	u64 rx_fragment_errors;
-	u64 rx_oversize_errors;
+	u64 rx_oversize_cnt;
 	u64 rx_jabber_errors;
 	u64 rx_l3_l4_xsum_error;
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index b930326379..92eb36f5d4 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -166,4 +166,5 @@ static const struct rte_ngbe_xstats_name_off rte_ngbe_stats_strings[] = {
 	HW_XSTAT(rx_management_dropped),
 	HW_XSTAT(rx_dma_drop),
+	HW_XSTAT(tx_dma_drop),
 	HW_XSTAT(tx_secdrp_packets),
 
@@ -176,5 +177,5 @@ static const struct rte_ngbe_xstats_name_off rte_ngbe_stats_strings[] = {
 	HW_XSTAT(rx_undersize_errors),
 	HW_XSTAT(rx_fragment_errors),
-	HW_XSTAT(rx_oversize_errors),
+	HW_XSTAT(rx_oversize_cnt),
 	HW_XSTAT(rx_jabber_errors),
 	HW_XSTAT(rx_l3_l4_xsum_error),
@@ -1351,7 +1352,6 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
 
 	/* DMA Stats */
-	hw_stats->rx_drop_packets += rd32(hw, NGBE_DMARXDROP);
-	hw_stats->tx_drop_packets += rd32(hw, NGBE_DMATXDROP);
 	hw_stats->rx_dma_drop += rd32(hw, NGBE_DMARXDROP);
+	hw_stats->tx_dma_drop += rd32(hw, NGBE_DMATXDROP);
 	hw_stats->tx_secdrp_packets += rd32(hw, NGBE_DMATXSECDROP);
 	hw_stats->rx_packets += rd32(hw, NGBE_DMARXPKT);
@@ -1390,5 +1390,5 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
 
 	hw_stats->rx_undersize_errors += rd64(hw, NGBE_MACRXERRLENL);
-	hw_stats->rx_oversize_errors += rd32(hw, NGBE_MACRXOVERSIZE);
+	hw_stats->rx_oversize_cnt += rd32(hw, NGBE_MACRXOVERSIZE);
 	hw_stats->rx_jabber_errors += rd32(hw, NGBE_MACRXJABBER);
 
@@ -1489,5 +1489,5 @@ ngbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			  hw_stats->rx_length_errors +
 			  hw_stats->rx_undersize_errors +
-			  hw_stats->rx_oversize_errors +
+			  hw_stats->rdb_drp_cnt +
 			  hw_stats->rx_illegal_byte_errors +
 			  hw_stats->rx_error_bytes +
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:58.995243853 +0100
+++ 0019-net-ngbe-rename-some-extended-statistics.patch	2022-10-25 14:18:58.374797959 +0100
@@ -1 +1 @@
-From fee9350f1d23ab9deeaf287be41212c9f0d85d5e Mon Sep 17 00:00:00 2001
+From 9f6bab86f3af235c1511ec192958060858a35fc6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fee9350f1d23ab9deeaf287be41212c9f0d85d5e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 4a6c273f1e..73111f7950 100644
+index 4c995e7397..043da3cd25 100644
@@ -25 +26 @@
-@@ -143,7 +143,6 @@ struct ngbe_hw_stats {
+@@ -137,7 +137,6 @@ struct ngbe_hw_stats {
@@ -34 +35 @@
-@@ -171,5 +170,5 @@ struct ngbe_hw_stats {
+@@ -165,5 +164,5 @@ struct ngbe_hw_stats {
@@ -42 +43 @@
-index 86c28099c4..df32bf64ff 100644
+index b930326379..92eb36f5d4 100644
@@ -58 +59 @@
-@@ -1375,7 +1376,6 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
+@@ -1351,7 +1352,6 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
@@ -67 +68 @@
-@@ -1414,5 +1414,5 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
+@@ -1390,5 +1390,5 @@ ngbe_read_stats_registers(struct ngbe_hw *hw,
@@ -74 +75 @@
-@@ -1513,5 +1513,5 @@ ngbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1489,5 +1489,5 @@ ngbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)


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

* patch 'net/ngbe: remove semaphore between SW/FW' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (17 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ngbe: " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ngbe: fix maximum frame size' " Kevin Traynor
                   ` (78 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 60df2778b9877bd09ce934eb416181b510e2266f Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 2 Sep 2022 11:00:08 +0800
Subject: [PATCH] net/ngbe: remove semaphore between SW/FW

[ upstream commit c18385220f776855a1b2eb798d44068d8fa2bd6d ]

Since firmware does not use the semaphore between software and firmware.
Remove useless unilateral semaphore setting.

Fixes: f501a195bded ("net/ngbe: initialize and validate EEPROM")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_eeprom.c | 32 -----------------------------
 1 file changed, 32 deletions(-)

diff --git a/drivers/net/ngbe/base/ngbe_eeprom.c b/drivers/net/ngbe/base/ngbe_eeprom.c
index 6375ee9b29..104501fa7a 100644
--- a/drivers/net/ngbe/base/ngbe_eeprom.c
+++ b/drivers/net/ngbe/base/ngbe_eeprom.c
@@ -106,35 +106,4 @@ s32 ngbe_get_eeprom_semaphore(struct ngbe_hw *hw)
 	}
 
-	/* Now get the semaphore between SW/FW through the SWESMBI bit */
-	if (status == 0) {
-		for (i = 0; i < timeout; i++) {
-			/* Set the SW EEPROM semaphore bit to request access */
-			wr32m(hw, NGBE_MNGSWSYNC,
-				NGBE_MNGSWSYNC_REQ, NGBE_MNGSWSYNC_REQ);
-
-			/*
-			 * If we set the bit successfully then we got the
-			 * semaphore.
-			 */
-			swsm = rd32(hw, NGBE_MNGSWSYNC);
-			if (swsm & NGBE_MNGSWSYNC_REQ)
-				break;
-
-			usec_delay(50);
-		}
-
-		/*
-		 * Release semaphores and return error if SW EEPROM semaphore
-		 * was not granted because we don't have access to the EEPROM
-		 */
-		if (i >= timeout) {
-			DEBUGOUT("SWESMBI Software EEPROM semaphore not granted.");
-			ngbe_release_eeprom_semaphore(hw);
-			status = NGBE_ERR_EEPROM;
-		}
-	} else {
-		DEBUGOUT("Software semaphore SMBI between device drivers not granted.");
-	}
-
 	return status;
 }
@@ -148,5 +117,4 @@ s32 ngbe_get_eeprom_semaphore(struct ngbe_hw *hw)
 void ngbe_release_eeprom_semaphore(struct ngbe_hw *hw)
 {
-	wr32m(hw, NGBE_MNGSWSYNC, NGBE_MNGSWSYNC_REQ, 0);
 	wr32m(hw, NGBE_SWSEM, NGBE_SWSEM_PF, 0);
 	ngbe_flush(hw);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.017151746 +0100
+++ 0020-net-ngbe-remove-semaphore-between-SW-FW.patch	2022-10-25 14:18:58.375797962 +0100
@@ -1 +1 @@
-From c18385220f776855a1b2eb798d44068d8fa2bd6d Mon Sep 17 00:00:00 2001
+From 60df2778b9877bd09ce934eb416181b510e2266f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c18385220f776855a1b2eb798d44068d8fa2bd6d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/ngbe: fix maximum frame size' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (18 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ngbe: remove semaphore between SW/FW' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'common/cnxk: fix log level during MCAM allocation' " Kevin Traynor
                   ` (77 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 82fa3908c0bd55dbe0cd948faf7987b087a5daa7 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 2 Sep 2022 11:00:09 +0800
Subject: [PATCH] net/ngbe: fix maximum frame size

[ upstream commit d5774f0c82bec587c1183435a9d8e8c2456b5f15 ]

Remain the same max frame size after the device restarts.

Fixes: 07baabb6a51a ("net/ngbe: support MTU set")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_regs.h |  2 +-
 drivers/net/ngbe/base/ngbe_type.h |  2 +-
 drivers/net/ngbe/ngbe_ethdev.c    | 10 +++-------
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ngbe/base/ngbe_regs.h b/drivers/net/ngbe/base/ngbe_regs.h
index 640e385990..c0e79a2ba7 100644
--- a/drivers/net/ngbe/base/ngbe_regs.h
+++ b/drivers/net/ngbe/base/ngbe_regs.h
@@ -526,5 +526,5 @@ enum ngbe_5tuple_protocol {
 #define NGBE_FRMSZ		       0x015020
 #define   NGBE_FRMSZ_MAX_MASK	       MS(0, 0xFFFF)
-#define   NGBE_FRMSZ_MAX(v)	       LS(v, 0, 0xFFFF)
+#define   NGBE_FRMSZ_MAX(v)	       LS((v) + 4, 0, 0xFFFF)
 #define NGBE_VLANCTL		       0x015088
 #define   NGBE_VLANCTL_TPID_MASK       MS(0, 0xFFFF)
diff --git a/drivers/net/ngbe/base/ngbe_type.h b/drivers/net/ngbe/base/ngbe_type.h
index 043da3cd25..015f484e8f 100644
--- a/drivers/net/ngbe/base/ngbe_type.h
+++ b/drivers/net/ngbe/base/ngbe_type.h
@@ -10,5 +10,5 @@
 
 #define NGBE_FRAME_SIZE_MAX       (9728) /* Maximum frame size, +FCS */
-#define NGBE_FRAME_SIZE_DFT       (1522) /* Default frame size, +FCS */
+#define NGBE_FRAME_SIZE_DFT       (1518) /* Default frame size, +FCS */
 #define NGBE_NUM_POOL             (32)
 #define NGBE_PBRXSIZE_MAX         0x00080000 /* 512KB Packet Buffer */
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 92eb36f5d4..07b3d15455 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -2458,5 +2458,5 @@ ngbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 {
 	struct ngbe_hw *hw = ngbe_dev_hw(dev);
-	uint32_t frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + 4;
+	uint32_t frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
 	struct rte_eth_dev_data *dev_data = dev->data;
 
@@ -2471,10 +2471,6 @@ ngbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	}
 
-	if (hw->mode)
-		wr32m(hw, NGBE_FRMSZ, NGBE_FRMSZ_MAX_MASK,
-			NGBE_FRAME_SIZE_MAX);
-	else
-		wr32m(hw, NGBE_FRMSZ, NGBE_FRMSZ_MAX_MASK,
-			NGBE_FRMSZ_MAX(frame_size));
+	wr32m(hw, NGBE_FRMSZ, NGBE_FRMSZ_MAX_MASK,
+		NGBE_FRMSZ_MAX(frame_size));
 
 	return 0;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.037281573 +0100
+++ 0021-net-ngbe-fix-maximum-frame-size.patch	2022-10-25 14:18:58.377797969 +0100
@@ -1 +1 @@
-From d5774f0c82bec587c1183435a9d8e8c2456b5f15 Mon Sep 17 00:00:00 2001
+From 82fa3908c0bd55dbe0cd948faf7987b087a5daa7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5774f0c82bec587c1183435a9d8e8c2456b5f15 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 73111f7950..aa5c41146c 100644
+index 043da3cd25..015f484e8f 100644
@@ -41 +42 @@
-index df32bf64ff..1090ba9a11 100644
+index 92eb36f5d4..07b3d15455 100644
@@ -44 +45 @@
-@@ -2474,5 +2474,5 @@ ngbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2458,5 +2458,5 @@ ngbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -51 +52 @@
-@@ -2487,10 +2487,6 @@ ngbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2471,10 +2471,6 @@ ngbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)


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

* patch 'common/cnxk: fix log level during MCAM allocation' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (19 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ngbe: fix maximum frame size' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/mvneta: fix build with GCC 12' " Kevin Traynor
                   ` (76 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From a2439f58c00c58f51434053fe15efc1795735ace Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Tue, 5 Jul 2022 11:43:56 +0530
Subject: [PATCH] common/cnxk: fix log level during MCAM allocation

[ upstream commit 0c585f88582f088fa74be3408ff4c8e0150da388 ]

Changed log level from info to debug for a log message
printed during MCAM allocation.

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

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npc_utils.c b/drivers/common/cnxk/roc_npc_utils.c
index e36a312576..f971bcfd75 100644
--- a/drivers/common/cnxk/roc_npc_utils.c
+++ b/drivers/common/cnxk/roc_npc_utils.c
@@ -639,5 +639,5 @@ retry:
 	rc = npc_allocate_mcam_entry(mbox, prio, rsp_local, ref_entry);
 	if (rc && !retry_done) {
-		plt_info(
+		plt_npc_dbg(
 			"npc: Failed to allocate lower priority entry. Retrying for higher priority");
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.059899310 +0100
+++ 0022-common-cnxk-fix-log-level-during-MCAM-allocation.patch	2022-10-25 14:18:58.378797973 +0100
@@ -1 +1 @@
-From 0c585f88582f088fa74be3408ff4c8e0150da388 Mon Sep 17 00:00:00 2001
+From a2439f58c00c58f51434053fe15efc1795735ace Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c585f88582f088fa74be3408ff4c8e0150da388 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index cbc6200fec..8bdabc116d 100644
+index e36a312576..f971bcfd75 100644
@@ -22 +23 @@
-@@ -636,5 +636,5 @@ retry:
+@@ -639,5 +639,5 @@ retry:


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

* patch 'net/mvneta: fix build with GCC 12' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (20 preceding siblings ...)
  2022-10-25 15:06 ` patch 'common/cnxk: fix log level during MCAM allocation' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'common/cnxk: fix missing flow counter reset' " Kevin Traynor
                   ` (75 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Amit Prakash Shukla; +Cc: Liron Himi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 6d030554f1a6a0f2d82bb3371ebb1c5458a49491 Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@marvell.com>
Date: Thu, 1 Sep 2022 14:01:18 +0530
Subject: [PATCH] net/mvneta: fix build with GCC 12

[ upstream commit d7b080f1e72d833d668a66199fe99ccda6c81a36 ]

./drivers/net/mvneta/mvneta_rxtx.c:89:42:
	error: 'mbufs' may be used uninitialized [-Werror=maybe-uninitialized]
   89 |         MVNETA_SET_COOKIE_HIGH_ADDR(mbufs[0]);
      |                                          ^
../drivers/net/mvneta/mvneta_rxtx.c:77:26: note: 'mbufs' declared here
   77 |      struct rte_mbuf *mbufs[MRVL_NETA_BUF_RELEASE_BURST_SIZE_MAX];
      |                       ^~~~~

Fixes: ce7ea764597e ("net/mvneta: support Rx/Tx")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvneta/mvneta_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mvneta/mvneta_rxtx.c b/drivers/net/mvneta/mvneta_rxtx.c
index 6e4a7896b4..952e982275 100644
--- a/drivers/net/mvneta/mvneta_rxtx.c
+++ b/drivers/net/mvneta/mvneta_rxtx.c
@@ -80,4 +80,8 @@ mvneta_buffs_refill(struct mvneta_priv *priv, struct mvneta_rxq *rxq, u16 *num)
 	uint16_t nb_desc = *num;
 
+	/* To prevent GCC-12 warning. */
+	if (unlikely(nb_desc == 0))
+		return -1;
+
 	ret = rte_pktmbuf_alloc_bulk(rxq->mp, mbufs, nb_desc);
 	if (ret) {
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.081045507 +0100
+++ 0023-net-mvneta-fix-build-with-GCC-12.patch	2022-10-25 14:18:58.378797973 +0100
@@ -1 +1 @@
-From d7b080f1e72d833d668a66199fe99ccda6c81a36 Mon Sep 17 00:00:00 2001
+From 6d030554f1a6a0f2d82bb3371ebb1c5458a49491 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7b080f1e72d833d668a66199fe99ccda6c81a36 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


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

* patch 'common/cnxk: fix missing flow counter reset' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (21 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/mvneta: fix build with GCC 12' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'common/cnxk: fix printing disabled MKEX registers' " Kevin Traynor
                   ` (74 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 97083f144ce0df4a66c56c5c6b38113e3303972e Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Tue, 13 Sep 2022 10:40:19 +0530
Subject: [PATCH] common/cnxk: fix missing flow counter reset

[ upstream commit b494807269c077ee82fc210e00da0e4e1121c5b8 ]

Added code to clear counters upon flow deletion.

Fixes: f9af9080746 ("common/cnxk: add mcam utility API")

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

diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c
index a16ba3f7be..eb0a982589 100644
--- a/drivers/common/cnxk/roc_npc_mcam.c
+++ b/drivers/common/cnxk/roc_npc_mcam.c
@@ -712,6 +712,8 @@ npc_flow_free_all_resources(struct npc *npc)
 		while ((flow = TAILQ_FIRST(&npc->flow_list[idx])) != NULL) {
 			npc_rss_group_free(npc, flow);
-			if (flow->ctr_id != NPC_COUNTER_NONE)
+			if (flow->ctr_id != NPC_COUNTER_NONE) {
+				rc |= npc_mcam_clear_counter(npc, flow->ctr_id);
 				rc |= npc_mcam_free_counter(npc, flow->ctr_id);
+			}
 
 			npc_delete_prio_list_entry(npc, flow);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.102948230 +0100
+++ 0024-common-cnxk-fix-missing-flow-counter-reset.patch	2022-10-25 14:18:58.379797976 +0100
@@ -1 +1 @@
-From b494807269c077ee82fc210e00da0e4e1121c5b8 Mon Sep 17 00:00:00 2001
+From 97083f144ce0df4a66c56c5c6b38113e3303972e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b494807269c077ee82fc210e00da0e4e1121c5b8 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 245eeb0107..b067dc4b91 100644
+index a16ba3f7be..eb0a982589 100644
@@ -21 +22 @@
-@@ -867,6 +867,8 @@ npc_flow_free_all_resources(struct npc *npc)
+@@ -712,6 +712,8 @@ npc_flow_free_all_resources(struct npc *npc)


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

* patch 'common/cnxk: fix printing disabled MKEX registers' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (22 preceding siblings ...)
  2022-10-25 15:06 ` patch 'common/cnxk: fix missing flow counter reset' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'malloc: fix storage size for some allocations' " Kevin Traynor
                   ` (73 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 8b3ce30416264eccc8a23f05a486164239a8c972 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Mon, 29 Aug 2022 11:54:40 +0530
Subject: [PATCH] common/cnxk: fix printing disabled MKEX registers

[ upstream commit af45c18e909e14127c67421bc3cf7e7acfa8cc89 ]

This patch skips printing disabled MKEX registers when
dumping hardware flow MCAM entry data.

Fixes: 9869c39918 ("common/cnxk: support flow entry dump")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc_mcam_dump.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc_mcam_dump.c b/drivers/common/cnxk/roc_npc_mcam_dump.c
index 278056591e..51305b4c2c 100644
--- a/drivers/common/cnxk/roc_npc_mcam_dump.c
+++ b/drivers/common/cnxk/roc_npc_mcam_dump.c
@@ -309,6 +309,8 @@ npc_flow_print_item(FILE *file, struct npc *npc, struct npc_xtract_info *xinfo,
 			lflags_info = npc->prx_fxcfg[intf][ld][i].xtract;
 
-			npc_flow_print_xtractinfo(file, lflags_info, flow, lid,
-						  lt);
+			if (!lflags_info->enable)
+				continue;
+
+			npc_flow_print_xtractinfo(file, lflags_info, flow, lid, lt);
 		}
 	}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.123416256 +0100
+++ 0025-common-cnxk-fix-printing-disabled-MKEX-registers.patch	2022-10-25 14:18:58.379797976 +0100
@@ -1 +1 @@
-From af45c18e909e14127c67421bc3cf7e7acfa8cc89 Mon Sep 17 00:00:00 2001
+From 8b3ce30416264eccc8a23f05a486164239a8c972 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af45c18e909e14127c67421bc3cf7e7acfa8cc89 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- drivers/common/cnxk/roc_npc_mcam_dump.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ drivers/common/cnxk/roc_npc_mcam_dump.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
@@ -19 +20 @@
-index 2aaf3ccd0b..16997bd38a 100644
+index 278056591e..51305b4c2c 100644
@@ -22 +23 @@
-@@ -311,6 +311,8 @@ npc_flow_print_item(FILE *file, struct npc *npc, struct npc_xtract_info *xinfo,
+@@ -309,6 +309,8 @@ npc_flow_print_item(FILE *file, struct npc *npc, struct npc_xtract_info *xinfo,
@@ -32,7 +32,0 @@
- 	}
-@@ -621,5 +623,5 @@ roc_npc_flow_mcam_dump(FILE *file, struct roc_npc *roc_npc,
- 	rc = mbox_process_msg(npc->mbox, (void *)&mcam_read_rsp);
- 	if (rc) {
--		plt_err("Failed to fetch MCAM entry");
-+		plt_err("Failed to fetch MCAM entry:%d", flow->mcam_id);
- 		return;


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

* patch 'malloc: fix storage size for some allocations' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (23 preceding siblings ...)
  2022-10-25 15:06 ` patch 'common/cnxk: fix printing disabled MKEX registers' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'event/dsw: fix flow migration' " Kevin Traynor
                   ` (72 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Fidaullah Noonari; +Cc: Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 5f22fcf619e79e772eae919af0d7eb2b325e4d28 Mon Sep 17 00:00:00 2001
From: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Date: Thu, 28 Jul 2022 14:41:03 +0500
Subject: [PATCH] malloc: fix storage size for some allocations

[ upstream commit f92b9ebed03dbd140a5a7b921cb898e661a59068 ]

The amount of memory to allocate from the system for heap expansion
was calculated in a way that may yield one page more than needed.
This could hit the allocation limit from the system or EAL.
The allocation would fail despite enough memory being available.

In response to mail:
https://inbox.dpdk.org/dev/CAEYuUWCnRZNwxiOHEeTHw0Gy9aFJRLZtvAG9g=smuUvUEMcFXg@mail.gmail.com/

A reproducer has been provided by Dmitry, see:
https://inbox.dpdk.org/dev/20220922015212.03bfde66@sovereign/

Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")

Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/common/malloc_heap.c | 2 +-
 lib/eal/common/malloc_mp.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
index 55063ccf81..25370d1148 100644
--- a/lib/eal/common/malloc_heap.c
+++ b/lib/eal/common/malloc_heap.c
@@ -402,5 +402,5 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
 	bool callback_triggered = false;
 
-	alloc_sz = RTE_ALIGN_CEIL(align + elt_size +
+	alloc_sz = RTE_ALIGN_CEIL(RTE_ALIGN_CEIL(elt_size, align) +
 			MALLOC_ELEM_OVERHEAD, pg_sz);
 	n_segs = alloc_sz / pg_sz;
diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
index 774bd1132f..8e236ddd7b 100644
--- a/lib/eal/common/malloc_mp.c
+++ b/lib/eal/common/malloc_mp.c
@@ -251,5 +251,5 @@ handle_alloc_request(const struct malloc_mp_req *m,
 	}
 
-	alloc_sz = RTE_ALIGN_CEIL(ar->align + ar->elt_size +
+	alloc_sz = RTE_ALIGN_CEIL(RTE_ALIGN_CEIL(ar->elt_size, ar->align) +
 			MALLOC_ELEM_OVERHEAD, ar->page_sz);
 	n_segs = alloc_sz / ar->page_sz;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.144190251 +0100
+++ 0026-malloc-fix-storage-size-for-some-allocations.patch	2022-10-25 14:18:58.380797980 +0100
@@ -1 +1 @@
-From f92b9ebed03dbd140a5a7b921cb898e661a59068 Mon Sep 17 00:00:00 2001
+From 5f22fcf619e79e772eae919af0d7eb2b325e4d28 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f92b9ebed03dbd140a5a7b921cb898e661a59068 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 27a52266ad..d7c410b786 100644
+index 55063ccf81..25370d1148 100644
@@ -31 +32 @@
-@@ -403,5 +403,5 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
+@@ -402,5 +402,5 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
@@ -39 +40 @@
-index 0c2624c62d..7270c2ec90 100644
+index 774bd1132f..8e236ddd7b 100644


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

* patch 'event/dsw: fix flow migration' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (24 preceding siblings ...)
  2022-10-25 15:06 ` patch 'malloc: fix storage size for some allocations' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'event/sw: fix device name in dump' " Kevin Traynor
                   ` (71 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 6dc1d114cd00c1eb22781df48d9fb4d6690948f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Thu, 7 Jul 2022 13:43:25 +0200
Subject: [PATCH] event/dsw: fix flow migration
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 70cb0278a4c52a857fb56cda2183e2ee3fa2633a ]

Fix bug in flow migration, which under certain conditions causes
reordering and violation of atomicity guarantees.

The issue occurs when the processing of a flow (on an atomic queue)
has resulted in events enqueued to a flow currently being migrated,
and the former (producer) flow is also selected for migration. The
events are buffered ("paused") on the originating port, and released
(forwarded) when the migration has completed. However, at the time of
"unpausing" the latter (consumer) flow, processing of the producer
flow on the port to which it was migrated may have already produced
events, for the same paused flow. This constitutes a race condition,
and depending on which port wins, reordering may have been introduced.

This patch forbids migration when a port has paused events, since
those events may have been the result of processing a to-be-migrated
flow.

This patch also disallows processing events pertaining to a flow under
migration, for the same reason. A new buffer is introduced, which
holds such not-yet-processed events dequeued from the port's input
ring. Such events are forwarded to the target port as a part of the
migration process.

The 'forwarding' migration state is eliminated, and instead background
processing is only performed if there are no unreleased events on the
port.

The bug is primarily triggered in situations where multiple flows are
migrated as one transaction, but may occur even if only a single flow
is migrated (e.g., with older DSW versions, which does not support
multi-flow migration).

Fixes: f6257b22e767 ("event/dsw: add load balancing")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_evdev.h |   8 +-
 drivers/event/dsw/dsw_event.c | 315 ++++++++++++++++++++++++----------
 2 files changed, 232 insertions(+), 91 deletions(-)

diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h
index c907c00c78..df7dcc5577 100644
--- a/drivers/event/dsw/dsw_evdev.h
+++ b/drivers/event/dsw/dsw_evdev.h
@@ -129,5 +129,4 @@ enum dsw_migration_state {
 	DSW_MIGRATION_STATE_IDLE,
 	DSW_MIGRATION_STATE_PAUSING,
-	DSW_MIGRATION_STATE_FORWARDING,
 	DSW_MIGRATION_STATE_UNPAUSING
 };
@@ -193,4 +192,11 @@ struct dsw_port {
 	struct rte_event paused_events[DSW_MAX_EVENTS];
 
+	uint16_t emigrating_events_len;
+	/* Buffer for not-yet-processed events pertaining to a flow
+	 * emigrating from this port. These events will be forwarded
+	 * to the target port.
+	 */
+	struct rte_event emigrating_events[DSW_MAX_EVENTS];
+
 	uint16_t seen_events_len;
 	uint16_t seen_events_idx;
diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index e209cd5b00..c5fb0c8882 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -238,4 +238,13 @@ dsw_port_is_flow_paused(struct dsw_port *port, uint8_t queue_id,
 }
 
+static __rte_always_inline bool
+dsw_port_is_flow_migrating(struct dsw_port *port, uint8_t queue_id,
+			   uint16_t flow_hash)
+{
+	return dsw_is_queue_flow_in_ary(port->emigration_target_qfs,
+					port->emigration_targets_len,
+					queue_id, flow_hash);
+}
+
 static void
 dsw_port_add_paused_flows(struct dsw_port *port, struct dsw_queue_flow *qfs,
@@ -272,7 +281,17 @@ dsw_port_remove_paused_flow(struct dsw_port *port,
 					port->paused_flows[last_idx];
 			port->paused_flows_len--;
-			break;
+
+			DSW_LOG_DP_PORT(DEBUG, port->id,
+					"Unpausing queue_id %d flow_hash %d.\n",
+					target_qf->queue_id,
+					target_qf->flow_hash);
+
+			return;
 		}
 	}
+
+	DSW_LOG_DP_PORT(ERR, port->id,
+			"Failed to unpause queue_id %d flow_hash %d.\n",
+			target_qf->queue_id, target_qf->flow_hash);
 }
 
@@ -285,5 +304,4 @@ dsw_port_remove_paused_flows(struct dsw_port *port,
 	for (i = 0; i < qfs_len; i++)
 		dsw_port_remove_paused_flow(port, &qfs[i]);
-
 }
 
@@ -440,12 +458,13 @@ dsw_is_serving_port(struct dsw_evdev *dsw, uint8_t port_id, uint8_t queue_id)
 static bool
 dsw_select_emigration_target(struct dsw_evdev *dsw,
-			    struct dsw_queue_flow_burst *bursts,
-			    uint16_t num_bursts, uint8_t source_port_id,
-			    int16_t *port_loads, uint16_t num_ports,
-			    uint8_t *target_port_ids,
-			    struct dsw_queue_flow *target_qfs,
-			    uint8_t *targets_len)
+			     struct dsw_port *source_port,
+			     struct dsw_queue_flow_burst *bursts,
+			     uint16_t num_bursts,
+			     int16_t *port_loads, uint16_t num_ports,
+			     uint8_t *target_port_ids,
+			     struct dsw_queue_flow *target_qfs,
+			     uint8_t *targets_len)
 {
-	int16_t source_port_load = port_loads[source_port_id];
+	int16_t source_port_load = port_loads[source_port->id];
 	struct dsw_queue_flow *candidate_qf = NULL;
 	uint8_t candidate_port_id = 0;
@@ -472,5 +491,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
 			int16_t weight;
 
-			if (port_id == source_port_id)
+			if (port_id == source_port->id)
 				continue;
 
@@ -494,5 +513,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
 		return false;
 
-	DSW_LOG_DP_PORT(DEBUG, source_port_id, "Selected queue_id %d "
+	DSW_LOG_DP_PORT(DEBUG, source_port->id, "Selected queue_id %d "
 			"flow_hash %d (with flow load %d) for migration "
 			"to port %d.\n", candidate_qf->queue_id,
@@ -502,5 +521,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
 
 	port_loads[candidate_port_id] += candidate_flow_load;
-	port_loads[source_port_id] -= candidate_flow_load;
+	port_loads[source_port->id] -= candidate_flow_load;
 
 	target_port_ids[*targets_len] = candidate_port_id;
@@ -528,6 +547,6 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw,
 		bool found;
 
-		found = dsw_select_emigration_target(dsw, bursts, num_bursts,
-						     source_port->id,
+		found = dsw_select_emigration_target(dsw, source_port,
+						     bursts, num_bursts,
 						     port_loads, dsw->num_ports,
 						     target_port_ids,
@@ -609,4 +628,5 @@ dsw_port_buffer_paused(struct dsw_port *port,
 }
 
+
 static void
 dsw_port_buffer_non_paused(struct dsw_evdev *dsw, struct dsw_port *source_port,
@@ -680,11 +700,9 @@ dsw_port_buffer_event(struct dsw_evdev *dsw, struct dsw_port *source_port,
 
 static void
-dsw_port_flush_paused_events(struct dsw_evdev *dsw,
-			     struct dsw_port *source_port,
-			     const struct dsw_queue_flow *qf)
+dsw_port_flush_no_longer_paused_events(struct dsw_evdev *dsw,
+				       struct dsw_port *source_port)
 {
 	uint16_t paused_events_len = source_port->paused_events_len;
 	struct rte_event paused_events[paused_events_len];
-	uint8_t dest_port_id;
 	uint16_t i;
 
@@ -692,7 +710,4 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
 		return;
 
-	if (dsw_port_is_flow_paused(source_port, qf->queue_id, qf->flow_hash))
-		return;
-
 	rte_memcpy(paused_events, source_port->paused_events,
 		   paused_events_len * sizeof(struct rte_event));
@@ -700,6 +715,4 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
 	source_port->paused_events_len = 0;
 
-	dest_port_id = dsw_schedule(dsw, qf->queue_id, qf->flow_hash);
-
 	for (i = 0; i < paused_events_len; i++) {
 		struct rte_event *event = &paused_events[i];
@@ -708,10 +721,16 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
 		flow_hash = dsw_flow_id_hash(event->flow_id);
 
-		if (event->queue_id == qf->queue_id &&
-		    flow_hash == qf->flow_hash)
+		if (dsw_port_is_flow_paused(source_port, event->queue_id,
+					    flow_hash))
+			dsw_port_buffer_paused(source_port, event);
+		else {
+			uint8_t dest_port_id;
+
+			dest_port_id = dsw_schedule(dsw, event->queue_id,
+						    flow_hash);
+
 			dsw_port_buffer_non_paused(dsw, source_port,
 						   dest_port_id, event);
-		else
-			dsw_port_buffer_paused(source_port, event);
+		}
 	}
 }
@@ -756,9 +775,4 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port,
 				"queue_id %d flow_hash %d.\n", queue_id,
 				flow_hash);
-
-		if (queue_schedule_type == RTE_SCHED_TYPE_ATOMIC) {
-			dsw_port_remove_paused_flow(port, qf);
-			dsw_port_flush_paused_events(dsw, port, qf);
-		}
 	}
 
@@ -827,9 +841,30 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
 		return;
 
-	if (seen_events_len < DSW_MAX_EVENTS_RECORDED)
-		return;
-
 	DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering emigration.\n");
 
+	if (seen_events_len < DSW_MAX_EVENTS_RECORDED) {
+		DSW_LOG_DP_PORT(DEBUG, source_port->id, "Not enough events "
+				"are recorded to allow for a migration.\n");
+		return;
+	}
+
+	/* A flow migration cannot be initiated if there are paused
+	 * events, since some/all of those events may be have been
+	 * produced as a result of processing the flow(s) selected for
+	 * migration. Moving such a flow would potentially introduced
+	 * reordering, since processing the migrated flow on the
+	 * receiving flow may commence before the to-be-enqueued-to
+
+	 * flows are unpaused, leading to paused events on the second
+	 * port as well, destined for the same paused flow(s). When
+	 * those flows are unpaused, the resulting events are
+	 * delivered the owning port in an undefined order.
+	 */
+	if (source_port->paused_events_len > 0) {
+		DSW_LOG_DP_PORT(DEBUG, source_port->id, "There are "
+				"events in the paus buffer.\n");
+		return;
+	}
+
 	/* Randomize interval to avoid having all threads considering
 	 * emigration at the same in point in time, which might lead
@@ -928,7 +963,6 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
 
 static void
-dsw_port_flush_paused_events(struct dsw_evdev *dsw,
-			     struct dsw_port *source_port,
-			     const struct dsw_queue_flow *qf);
+dsw_port_flush_no_longer_paused_events(struct dsw_evdev *dsw,
+				       struct dsw_port *source_port);
 
 static void
@@ -955,18 +989,69 @@ dsw_port_handle_unpause_flows(struct dsw_evdev *dsw, struct dsw_port *port,
 		if (dsw_schedule(dsw, qf->queue_id, qf->flow_hash) == port->id)
 			port->immigrations++;
+	}
+
+	dsw_port_flush_no_longer_paused_events(dsw, port);
+}
+
+static void
+dsw_port_buffer_in_buffer(struct dsw_port *port,
+			  const struct rte_event *event)
+
+{
+	RTE_ASSERT(port->in_buffer_start == 0);
+
+	port->in_buffer[port->in_buffer_len] = *event;
+	port->in_buffer_len++;
+}
 
-		dsw_port_flush_paused_events(dsw, port, qf);
+static void
+dsw_port_forward_emigrated_event(struct dsw_evdev *dsw,
+				 struct dsw_port *source_port,
+				 struct rte_event *event)
+{
+	uint16_t i;
+
+	for (i = 0; i < source_port->emigration_targets_len; i++) {
+		struct dsw_queue_flow *qf =
+			&source_port->emigration_target_qfs[i];
+		uint8_t dest_port_id =
+			source_port->emigration_target_port_ids[i];
+		struct dsw_port *dest_port = &dsw->ports[dest_port_id];
+
+		if (event->queue_id == qf->queue_id &&
+		    dsw_flow_id_hash(event->flow_id) == qf->flow_hash) {
+			/* No need to care about bursting forwarded
+			 * events (to the destination port's in_ring),
+			 * since migration doesn't happen very often,
+			 * and also the majority of the dequeued
+			 * events will likely *not* be forwarded.
+			 */
+			while (rte_event_ring_enqueue_burst(dest_port->in_ring,
+							    event, 1,
+							    NULL) != 1)
+				rte_pause();
+			return;
+		}
 	}
+
+	/* Event did not belong to the emigrated flows */
+	dsw_port_buffer_in_buffer(source_port, event);
+}
+
+static void
+dsw_port_stash_migrating_event(struct dsw_port *port,
+			       const struct rte_event *event)
+{
+	port->emigrating_events[port->emigrating_events_len] = *event;
+	port->emigrating_events_len++;
 }
 
-#define FORWARD_BURST_SIZE (32)
+#define DRAIN_DEQUEUE_BURST_SIZE (32)
 
 static void
-dsw_port_forward_emigrated_flow(struct dsw_port *source_port,
-				struct rte_event_ring *dest_ring,
-				uint8_t queue_id,
-				uint16_t flow_hash)
+dsw_port_drain_in_ring(struct dsw_port *source_port)
 {
-	uint16_t events_left;
+	uint16_t num_events;
+	uint16_t dequeued;
 
 	/* Control ring message should been seen before the ring count
@@ -975,40 +1060,50 @@ dsw_port_forward_emigrated_flow(struct dsw_port *source_port,
 	rte_smp_rmb();
 
-	events_left = rte_event_ring_count(source_port->in_ring);
+	num_events = rte_event_ring_count(source_port->in_ring);
 
-	while (events_left > 0) {
-		uint16_t in_burst_size =
-			RTE_MIN(FORWARD_BURST_SIZE, events_left);
-		struct rte_event in_burst[in_burst_size];
-		uint16_t in_len;
+	for (dequeued = 0; dequeued < num_events; ) {
+		uint16_t burst_size = RTE_MIN(DRAIN_DEQUEUE_BURST_SIZE,
+					      num_events - dequeued);
+		struct rte_event events[burst_size];
+		uint16_t len;
 		uint16_t i;
 
-		in_len = rte_event_ring_dequeue_burst(source_port->in_ring,
-						      in_burst,
-						      in_burst_size, NULL);
-		/* No need to care about bursting forwarded events (to
-		 * the destination port's in_ring), since migration
-		 * doesn't happen very often, and also the majority of
-		 * the dequeued events will likely *not* be forwarded.
-		 */
-		for (i = 0; i < in_len; i++) {
-			struct rte_event *e = &in_burst[i];
-			if (e->queue_id == queue_id &&
-			    dsw_flow_id_hash(e->flow_id) == flow_hash) {
-				while (rte_event_ring_enqueue_burst(dest_ring,
-								    e, 1,
-								    NULL) != 1)
-					rte_pause();
-			} else {
-				uint16_t last_idx = source_port->in_buffer_len;
-				source_port->in_buffer[last_idx] = *e;
-				source_port->in_buffer_len++;
-			}
+		len = rte_event_ring_dequeue_burst(source_port->in_ring,
+						   events, burst_size,
+						   NULL);
+
+		for (i = 0; i < len; i++) {
+			struct rte_event *event = &events[i];
+			uint16_t flow_hash;
+
+			flow_hash = dsw_flow_id_hash(event->flow_id);
+
+			if (unlikely(dsw_port_is_flow_migrating(source_port,
+								event->queue_id,
+								flow_hash)))
+				dsw_port_stash_migrating_event(source_port,
+							       event);
+			else
+				dsw_port_buffer_in_buffer(source_port, event);
 		}
 
-		events_left -= in_len;
+		dequeued += len;
 	}
 }
 
+static void
+dsw_port_forward_emigrated_flows(struct dsw_evdev *dsw,
+				 struct dsw_port *source_port)
+{
+	uint16_t i;
+
+	for (i = 0; i < source_port->emigrating_events_len; i++) {
+		struct rte_event *event = &source_port->emigrating_events[i];
+
+		dsw_port_forward_emigrated_event(dsw, source_port, event);
+	}
+	source_port->emigrating_events_len = 0;
+}
+
 static void
 dsw_port_move_emigrating_flows(struct dsw_evdev *dsw,
@@ -1019,6 +1114,4 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw,
 	dsw_port_flush_out_buffers(dsw, source_port);
 
-	rte_smp_wmb();
-
 	for (i = 0; i < source_port->emigration_targets_len; i++) {
 		struct dsw_queue_flow *qf =
@@ -1026,13 +1119,20 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw,
 		uint8_t dest_port_id =
 			source_port->emigration_target_port_ids[i];
-		struct dsw_port *dest_port = &dsw->ports[dest_port_id];
 
 		dsw->queues[qf->queue_id].flow_to_port_map[qf->flow_hash] =
-			dest_port_id;
-
-		dsw_port_forward_emigrated_flow(source_port, dest_port->in_ring,
-						qf->queue_id, qf->flow_hash);
+		    dest_port_id;
 	}
 
+	rte_smp_wmb();
+
+	dsw_port_drain_in_ring(source_port);
+	dsw_port_forward_emigrated_flows(dsw, source_port);
+
+	dsw_port_remove_paused_flows(source_port,
+				     source_port->emigration_target_qfs,
+				     source_port->emigration_targets_len);
+
+	dsw_port_flush_no_longer_paused_events(dsw, source_port);
+
 	/* Flow table update and migration destination port's enqueues
 	 * must be seen before the control message.
@@ -1055,7 +1155,5 @@ dsw_port_handle_confirm(struct dsw_evdev *dsw, struct dsw_port *port)
 		switch (port->migration_state) {
 		case DSW_MIGRATION_STATE_PAUSING:
-			DSW_LOG_DP_PORT(DEBUG, port->id, "Going into forwarding "
-					"migration state.\n");
-			port->migration_state = DSW_MIGRATION_STATE_FORWARDING;
+			dsw_port_move_emigrating_flows(dsw, port);
 			break;
 		case DSW_MIGRATION_STATE_UNPAUSING:
@@ -1097,7 +1195,4 @@ static void
 dsw_port_note_op(struct dsw_port *port, uint16_t num_events)
 {
-	/* To pull the control ring reasonably often on busy ports,
-	 * each dequeued/enqueued event is considered an 'op' too.
-	 */
 	port->ops_since_bg_task += (num_events+1);
 }
@@ -1106,7 +1201,10 @@ static void
 dsw_port_bg_process(struct dsw_evdev *dsw, struct dsw_port *port)
 {
-	if (unlikely(port->migration_state == DSW_MIGRATION_STATE_FORWARDING &&
-		     port->pending_releases == 0))
-		dsw_port_move_emigrating_flows(dsw, port);
+	/* For simplicity (in the migration logic), avoid all
+	 * background processing in case event processing is in
+	 * progress.
+	 */
+	if (port->pending_releases > 0)
+		return;
 
 	/* Polling the control ring is relatively inexpensive, and
@@ -1168,5 +1266,5 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
 
 	DSW_LOG_DP_PORT(DEBUG, source_port->id, "Attempting to enqueue %d "
-			"events to port %d.\n", events_len, source_port->id);
+			"events.\n", events_len);
 
 	dsw_port_bg_process(dsw, source_port);
@@ -1352,4 +1450,36 @@ dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events,
 }
 
+static void
+dsw_port_stash_migrating_events(struct dsw_port *port,
+				struct rte_event *events, uint16_t *num)
+{
+	uint16_t i;
+
+	/* The assumption here - performance-wise - is that events
+	 * belonging to migrating flows are relatively rare.
+	 */
+	for (i = 0; i < (*num); ) {
+		struct rte_event *event = &events[i];
+		uint16_t flow_hash;
+
+		flow_hash = dsw_flow_id_hash(event->flow_id);
+
+		if (unlikely(dsw_port_is_flow_migrating(port, event->queue_id,
+							flow_hash))) {
+			uint16_t left;
+
+			dsw_port_stash_migrating_event(port, event);
+
+			(*num)--;
+			left = *num - i;
+
+			if (left > 0)
+				memmove(event, event + 1,
+					left * sizeof(struct rte_event));
+		} else
+			i++;
+	}
+}
+
 uint16_t
 dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num,
@@ -1369,4 +1499,9 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num,
 	dequeued = dsw_port_dequeue_burst(source_port, events, num);
 
+	if (unlikely(source_port->migration_state ==
+		     DSW_MIGRATION_STATE_PAUSING))
+		dsw_port_stash_migrating_events(source_port, events,
+						&dequeued);
+
 	source_port->pending_releases = dequeued;
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.165388086 +0100
+++ 0027-event-dsw-fix-flow-migration.patch	2022-10-25 14:18:58.382797987 +0100
@@ -1 +1 @@
-From 70cb0278a4c52a857fb56cda2183e2ee3fa2633a Mon Sep 17 00:00:00 2001
+From 6dc1d114cd00c1eb22781df48d9fb4d6690948f0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 70cb0278a4c52a857fb56cda2183e2ee3fa2633a ]
+
@@ -42 +43,0 @@
-Cc: stable@dpdk.org
@@ -73 +74 @@
-index 340561b4e6..9932caf2ee 100644
+index e209cd5b00..c5fb0c8882 100644
@@ -76 +77 @@
-@@ -239,4 +239,13 @@ dsw_port_is_flow_paused(struct dsw_port *port, uint8_t queue_id,
+@@ -238,4 +238,13 @@ dsw_port_is_flow_paused(struct dsw_port *port, uint8_t queue_id,
@@ -90 +91 @@
-@@ -273,7 +282,17 @@ dsw_port_remove_paused_flow(struct dsw_port *port,
+@@ -272,7 +281,17 @@ dsw_port_remove_paused_flow(struct dsw_port *port,
@@ -109 +110 @@
-@@ -286,5 +305,4 @@ dsw_port_remove_paused_flows(struct dsw_port *port,
+@@ -285,5 +304,4 @@ dsw_port_remove_paused_flows(struct dsw_port *port,
@@ -115 +116 @@
-@@ -441,12 +459,13 @@ dsw_is_serving_port(struct dsw_evdev *dsw, uint8_t port_id, uint8_t queue_id)
+@@ -440,12 +458,13 @@ dsw_is_serving_port(struct dsw_evdev *dsw, uint8_t port_id, uint8_t queue_id)
@@ -136 +137 @@
-@@ -473,5 +492,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
+@@ -472,5 +491,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
@@ -143 +144 @@
-@@ -495,5 +514,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
+@@ -494,5 +513,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
@@ -150 +151 @@
-@@ -503,5 +522,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
+@@ -502,5 +521,5 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
@@ -157 +158 @@
-@@ -529,6 +548,6 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw,
+@@ -528,6 +547,6 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw,
@@ -166 +167 @@
-@@ -610,4 +629,5 @@ dsw_port_buffer_paused(struct dsw_port *port,
+@@ -609,4 +628,5 @@ dsw_port_buffer_paused(struct dsw_port *port,
@@ -172 +173 @@
-@@ -681,11 +701,9 @@ dsw_port_buffer_event(struct dsw_evdev *dsw, struct dsw_port *source_port,
+@@ -680,11 +700,9 @@ dsw_port_buffer_event(struct dsw_evdev *dsw, struct dsw_port *source_port,
@@ -186 +187 @@
-@@ -693,7 +711,4 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
+@@ -692,7 +710,4 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
@@ -194 +195 @@
-@@ -701,6 +716,4 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
+@@ -700,6 +715,4 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
@@ -201 +202 @@
-@@ -709,10 +722,16 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
+@@ -708,10 +721,16 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,
@@ -222 +223 @@
-@@ -757,9 +776,4 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port,
+@@ -756,9 +775,4 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port,
@@ -232 +233 @@
-@@ -828,9 +842,30 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
+@@ -827,9 +841,30 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
@@ -266 +267 @@
-@@ -929,7 +964,6 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
+@@ -928,7 +963,6 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
@@ -276 +277 @@
-@@ -956,18 +990,69 @@ dsw_port_handle_unpause_flows(struct dsw_evdev *dsw, struct dsw_port *port,
+@@ -955,18 +989,69 @@ dsw_port_handle_unpause_flows(struct dsw_evdev *dsw, struct dsw_port *port,
@@ -353 +354 @@
-@@ -976,40 +1061,50 @@ dsw_port_forward_emigrated_flow(struct dsw_port *source_port,
+@@ -975,40 +1060,50 @@ dsw_port_forward_emigrated_flow(struct dsw_port *source_port,
@@ -432 +433 @@
-@@ -1020,6 +1115,4 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw,
+@@ -1019,6 +1114,4 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw,
@@ -439 +440 @@
-@@ -1027,13 +1120,20 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw,
+@@ -1026,13 +1119,20 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw,
@@ -465 +466 @@
-@@ -1056,7 +1156,5 @@ dsw_port_handle_confirm(struct dsw_evdev *dsw, struct dsw_port *port)
+@@ -1055,7 +1155,5 @@ dsw_port_handle_confirm(struct dsw_evdev *dsw, struct dsw_port *port)
@@ -474 +475 @@
-@@ -1098,7 +1196,4 @@ static void
+@@ -1097,7 +1195,4 @@ static void
@@ -482 +483 @@
-@@ -1107,7 +1202,10 @@ static void
+@@ -1106,7 +1201,10 @@ static void
@@ -496 +497 @@
-@@ -1169,5 +1267,5 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
+@@ -1168,5 +1266,5 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
@@ -503 +504 @@
-@@ -1353,4 +1451,36 @@ dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events,
+@@ -1352,4 +1450,36 @@ dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events,
@@ -540 +541 @@
-@@ -1370,4 +1500,9 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num,
+@@ -1369,4 +1499,9 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num,


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

* patch 'event/sw: fix device name in dump' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (25 preceding siblings ...)
  2022-10-25 15:06 ` patch 'event/dsw: fix flow migration' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'eventdev/eth_tx: add spinlock for adapter start/stop' " Kevin Traynor
                   ` (70 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 0fc2e4cd2177afccb90883620eb86ded47c2354a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 13 Jul 2022 11:24:50 -0700
Subject: [PATCH] event/sw: fix device name in dump

[ upstream commit ec70113a60039411c57f02a814291cefcbc35099 ]

The software eventdev PMD reports todo-fix-name as the
device name.

Fixes: c66baa68e453 ("event/sw: add dump function for easier debugging")

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

diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 6ae613e0f2..fb2ee552aa 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -626,6 +626,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
 	};
 	uint32_t i;
-	fprintf(f, "EventDev %s: ports %d, qids %d\n", "todo-fix-name",
-			sw->port_count, sw->qid_count);
+	fprintf(f, "EventDev %s: ports %d, qids %d\n",
+		dev->data->name, sw->port_count, sw->qid_count);
 
 	fprintf(f, "\trx   %"PRIu64"\n\tdrop %"PRIu64"\n\ttx   %"PRIu64"\n",
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.187056310 +0100
+++ 0028-event-sw-fix-device-name-in-dump.patch	2022-10-25 14:18:58.383797991 +0100
@@ -1 +1 @@
-From ec70113a60039411c57f02a814291cefcbc35099 Mon Sep 17 00:00:00 2001
+From 0fc2e4cd2177afccb90883620eb86ded47c2354a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec70113a60039411c57f02a814291cefcbc35099 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ba4d3a1b39..b1d5efe274 100644
+index 6ae613e0f2..fb2ee552aa 100644
@@ -22 +23 @@
-@@ -624,6 +624,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
+@@ -626,6 +626,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)


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

* patch 'eventdev/eth_tx: add spinlock for adapter start/stop' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (26 preceding siblings ...)
  2022-10-25 15:06 ` patch 'event/sw: fix device name in dump' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'eventdev/eth_tx: fix adapter stop' " Kevin Traynor
                   ` (69 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 24f4f4450f43daa953cbde5d12c56deadbd371e2 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Mon, 25 Jul 2022 23:22:10 -0500
Subject: [PATCH] eventdev/eth_tx: add spinlock for adapter start/stop

[ upstream commit 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 ]

Add spinlock protection for tx adapter stop and start APIs add
null check for tx adapter service pointer in adapter start/stop APIs.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/eventdev/rte_event_eth_tx_adapter.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index b4b37f1cae..6730345e4c 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -45,5 +45,5 @@
 do { \
 	if (!txa_valid_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \
+		RTE_EDEV_LOG_ERR("Invalid eth Tx adapter id = %d", id); \
 		return retval; \
 	} \
@@ -469,8 +469,11 @@ txa_service_ctrl(uint8_t id, int start)
 
 	txa = txa_service_id_to_data(id);
-	if (txa->service_id == TXA_INVALID_SERVICE_ID)
+	if (txa == NULL || txa->service_id == TXA_INVALID_SERVICE_ID)
 		return 0;
 
+	rte_spinlock_lock(&txa->tx_lock);
 	ret = rte_service_runstate_set(txa->service_id, start);
+	rte_spinlock_unlock(&txa->tx_lock);
+
 	if (ret == 0 && !start) {
 		while (rte_service_may_be_active(txa->service_id))
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.207073877 +0100
+++ 0029-eventdev-eth_tx-add-spinlock-for-adapter-start-stop.patch	2022-10-25 14:18:58.383797991 +0100
@@ -1 +1 @@
-From 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 Mon Sep 17 00:00:00 2001
+From 24f4f4450f43daa953cbde5d12c56deadbd371e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index aaef352f5c..aa7713bfa1 100644
+index b4b37f1cae..6730345e4c 100644
@@ -22 +23 @@
-@@ -51,5 +51,5 @@
+@@ -45,5 +45,5 @@
@@ -29 +30 @@
-@@ -503,8 +503,11 @@ txa_service_ctrl(uint8_t id, int start)
+@@ -469,8 +469,11 @@ txa_service_ctrl(uint8_t id, int start)


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

* patch 'eventdev/eth_tx: fix adapter stop' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (27 preceding siblings ...)
  2022-10-25 15:06 ` patch 'eventdev/eth_tx: add spinlock for adapter start/stop' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'test/ipsec: skip if no compatible device' " Kevin Traynor
                   ` (68 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From a003adfe324f71f8f26c3b4c7b586901883c6c6f Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Mon, 25 Jul 2022 23:22:11 -0500
Subject: [PATCH] eventdev/eth_tx: fix adapter stop

[ upstream commit fbb9f7e215c3394681ab1292f421c4e5c4880392 ]

adapter_stop function is stopping the adapter service using
rte_service_runstate_set() API and waiting until
rte_service_may_be_active() API returns stopped state in an
infinite loop.

This results in hang issues if application calls
rte_service_lcore_stop() before adapter stop.

Remove the state check after setting the service state which
avoids running into hang issues. This also makes Tx adapter stop
inline with remaining adapters.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/eventdev/rte_event_eth_tx_adapter.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 6730345e4c..78418744ca 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -476,8 +476,4 @@ txa_service_ctrl(uint8_t id, int start)
 	rte_spinlock_unlock(&txa->tx_lock);
 
-	if (ret == 0 && !start) {
-		while (rte_service_may_be_active(txa->service_id))
-			rte_pause();
-	}
 	return ret;
 }
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.227994213 +0100
+++ 0030-eventdev-eth_tx-fix-adapter-stop.patch	2022-10-25 14:18:58.384797994 +0100
@@ -1 +1 @@
-From fbb9f7e215c3394681ab1292f421c4e5c4880392 Mon Sep 17 00:00:00 2001
+From a003adfe324f71f8f26c3b4c7b586901883c6c6f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fbb9f7e215c3394681ab1292f421c4e5c4880392 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index aa7713bfa1..7e82fe030c 100644
+index 6730345e4c..78418744ca 100644
@@ -31 +32 @@
-@@ -510,8 +510,4 @@ txa_service_ctrl(uint8_t id, int start)
+@@ -476,8 +476,4 @@ txa_service_ctrl(uint8_t id, int start)


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

* patch 'test/ipsec: skip if no compatible device' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (28 preceding siblings ...)
  2022-10-25 15:06 ` patch 'eventdev/eth_tx: fix adapter stop' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' " Kevin Traynor
                   ` (67 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Jeremy Spewock; +Cc: Owen Hilyard, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 6a5ed8de57f7c4532abb61f2f4bb31ee70d141bb Mon Sep 17 00:00:00 2001
From: Jeremy Spewock <jspewock@iol.unh.edu>
Date: Tue, 12 Jul 2022 10:17:01 -0400
Subject: [PATCH] test/ipsec: skip if no compatible device

[ upstream commit 37edccf8f79d7a8d0cbb00907a93ec9b9f476ed3 ]

ipsec_autotest is now skipped if no compatible crypto devices are found.

Fixes issue where if at least one crypto device was found but no
compatible crypto devices for the ipsec_autotest test case are present,
the case would fail with no error message. Now, when this situation is
encountered, the test case will be skipped with an explanation.

Fixes: 59d7353b0df0 ("test/ipsec: fix test suite setup")

Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 app/test/test_ipsec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 3c6dcdc604..6d5431843f 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -310,6 +310,8 @@ testsuite_setup(void)
 	}
 
-	if (ts_params->valid_dev_found == 0)
-		return TEST_FAILED;
+	if (ts_params->valid_dev_found == 0) {
+		RTE_LOG(WARNING, USER1, "No compatible crypto device found.\n");
+		return TEST_SKIPPED;
+	}
 
 	ts_params->mbuf_pool = rte_pktmbuf_pool_create(
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.248242872 +0100
+++ 0031-test-ipsec-skip-if-no-compatible-device.patch	2022-10-25 14:18:58.385797998 +0100
@@ -1 +1 @@
-From 37edccf8f79d7a8d0cbb00907a93ec9b9f476ed3 Mon Sep 17 00:00:00 2001
+From 6a5ed8de57f7c4532abb61f2f4bb31ee70d141bb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 37edccf8f79d7a8d0cbb00907a93ec9b9f476ed3 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 7047e17960..7c03a06785 100644
+index 3c6dcdc604..6d5431843f 100644
@@ -27 +28 @@
-@@ -321,6 +321,8 @@ testsuite_setup(void)
+@@ -310,6 +310,8 @@ testsuite_setup(void)


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

* patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (29 preceding siblings ...)
  2022-10-25 15:06 ` patch 'test/ipsec: skip if no compatible device' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'test/crypto: fix debug messages' " Kevin Traynor
                   ` (66 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 783a1099f2d51b440ca86b2d119b720371451e4a Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 21 Jul 2022 21:01:31 +0530
Subject: [PATCH] examples/ipsec-secgw: use Tx checksum offload conditionally

[ upstream commit 4edcee19fc20be7c28da3e06e3be5e8567162f01 ]

Use Tx checksum offload only when all the ports have it enabled as
the qconf for a particular lcore stores ipv4_offloads for all the
Tx ports and each lcore can Tx to any port.

Fixes: 03128be4cd4d ("examples/ipsec-secgw: allow disabling some Rx/Tx offloads")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a1faff6a59..19ced948ec 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2371,10 +2371,4 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads)
 		qconf->tx_queue_id[portid] = tx_queueid;
 
-		/* Pre-populate pkt offloads based on capabilities */
-		qconf->outbound.ipv4_offloads = RTE_MBUF_F_TX_IPV4;
-		qconf->outbound.ipv6_offloads = RTE_MBUF_F_TX_IPV6;
-		if (local_port_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)
-			qconf->outbound.ipv4_offloads |= RTE_MBUF_F_TX_IP_CKSUM;
-
 		tx_queueid++;
 
@@ -3254,4 +3248,5 @@ main(int32_t argc, char **argv)
 	uint64_t req_tx_offloads[RTE_MAX_ETHPORTS];
 	struct eh_conf *eh_conf = NULL;
+	uint32_t ipv4_cksum_port_mask = 0;
 	size_t sess_sz;
 
@@ -3361,4 +3356,18 @@ main(int32_t argc, char **argv)
 		port_init(portid, req_rx_offloads[portid],
 				req_tx_offloads[portid]);
+		if ((req_tx_offloads[portid] & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM))
+			ipv4_cksum_port_mask = 1U << portid;
+	}
+
+	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
+		if (rte_lcore_is_enabled(lcore_id) == 0)
+			continue;
+
+		/* Pre-populate pkt offloads based on capabilities */
+		lcore_conf[lcore_id].outbound.ipv4_offloads = RTE_MBUF_F_TX_IPV4;
+		lcore_conf[lcore_id].outbound.ipv6_offloads = RTE_MBUF_F_TX_IPV6;
+		/* Update per lcore checksum offload support only if all ports support it */
+		if (ipv4_cksum_port_mask == enabled_port_mask)
+			lcore_conf[lcore_id].outbound.ipv4_offloads |= RTE_MBUF_F_TX_IP_CKSUM;
 	}
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.269242499 +0100
+++ 0032-examples-ipsec-secgw-use-Tx-checksum-offload-conditi.patch	2022-10-25 14:18:58.387798005 +0100
@@ -1 +1 @@
-From 4edcee19fc20be7c28da3e06e3be5e8567162f01 Mon Sep 17 00:00:00 2001
+From 783a1099f2d51b440ca86b2d119b720371451e4a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4edcee19fc20be7c28da3e06e3be5e8567162f01 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 815b9254ae..8a25b83535 100644
+index a1faff6a59..19ced948ec 100644
@@ -23 +24 @@
-@@ -1999,10 +1999,4 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads)
+@@ -2371,10 +2371,4 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads)
@@ -34 +35 @@
-@@ -2926,4 +2920,5 @@ main(int32_t argc, char **argv)
+@@ -3254,4 +3248,5 @@ main(int32_t argc, char **argv)
@@ -40 +41 @@
-@@ -3047,4 +3042,18 @@ main(int32_t argc, char **argv)
+@@ -3361,4 +3356,18 @@ main(int32_t argc, char **argv)


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

* patch 'test/crypto: fix debug messages' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (30 preceding siblings ...)
  2022-10-25 15:06 ` patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'common/qat: fix VF to PF answer' " Kevin Traynor
                   ` (65 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Sunyang Wu; +Cc: Joey Xing, Qingmin Liu, Lei Cai, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 1af7871cdd2483cd8515a7f6a5e69ae033226d33 Mon Sep 17 00:00:00 2001
From: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Date: Tue, 26 Jul 2022 11:38:19 +0800
Subject: [PATCH] test/crypto: fix debug messages

[ upstream commit 1c6b77de0aa97072372fa80891c93063ec132c1a ]

When the queue_ops_rsa_enc_dec function is called, the plaintext will
be printed twice instead of both plaintext and ciphertext. When the
create_aead_operation function is called, the contents of iv and aad
will be printed incorrectly. This patch fixes the issues above.

Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
Fixes: 5ae36995f10f ("test/crypto: move RSA enqueue/dequeue into functions")

Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Reviewed-by: Joey Xing <joey.xing@jaguarmicro.com>
Reviewed-by: Qingmin Liu <qingmin.liu@jaguarmicro.com>
Reviewed-by: Lei Cai <lei.cai@jaguarmicro.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c      | 4 ++--
 app/test/test_cryptodev_asym.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index b11be735d0..da5dc4baa8 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8076,5 +8076,5 @@ create_aead_operation(enum rte_crypto_aead_operation op,
 		/* Copy AAD 18 bytes after the AAD pointer, according to the API */
 		memcpy(sym_op->aead.aad.data + 18, tdata->aad.data, tdata->aad.len);
-		debug_hexdump(stdout, "aad:", sym_op->aead.aad.data,
+		debug_hexdump(stdout, "aad:", sym_op->aead.aad.data + 18,
 			tdata->aad.len);
 
@@ -8085,5 +8085,5 @@ create_aead_operation(enum rte_crypto_aead_operation op,
 		/* Copy IV 1 byte after the IV pointer, according to the API */
 		rte_memcpy(iv_ptr + 1, tdata->iv.data, tdata->iv.len);
-		debug_hexdump(stdout, "iv:", iv_ptr,
+		debug_hexdump(stdout, "iv:", iv_ptr + 1,
 			tdata->iv.len);
 	} else {
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 1131290e88..7210497a84 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -209,6 +209,6 @@ queue_ops_rsa_enc_dec(struct rte_cryptodev_asym_session *sess)
 		goto error_exit;
 	}
-	debug_hexdump(stdout, "encrypted message", asym_op->rsa.message.data,
-		      asym_op->rsa.message.length);
+	debug_hexdump(stdout, "encrypted message", asym_op->rsa.cipher.data,
+		      asym_op->rsa.cipher.length);
 
 	/* Use the resulted output as decryption Input vector*/
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.291172900 +0100
+++ 0033-test-crypto-fix-debug-messages.patch	2022-10-25 14:18:58.396798037 +0100
@@ -1 +1 @@
-From 1c6b77de0aa97072372fa80891c93063ec132c1a Mon Sep 17 00:00:00 2001
+From 1af7871cdd2483cd8515a7f6a5e69ae033226d33 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c6b77de0aa97072372fa80891c93063ec132c1a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 69a0301de0..54ce306b42 100644
+index b11be735d0..da5dc4baa8 100644
@@ -29 +30 @@
-@@ -8288,5 +8288,5 @@ create_aead_operation(enum rte_crypto_aead_operation op,
+@@ -8076,5 +8076,5 @@ create_aead_operation(enum rte_crypto_aead_operation op,
@@ -36 +37 @@
-@@ -8297,5 +8297,5 @@ create_aead_operation(enum rte_crypto_aead_operation op,
+@@ -8085,5 +8085,5 @@ create_aead_operation(enum rte_crypto_aead_operation op,
@@ -44 +45 @@
-index fc1a727472..9da54530e5 100644
+index 1131290e88..7210497a84 100644
@@ -47 +48 @@
-@@ -209,6 +209,6 @@ queue_ops_rsa_enc_dec(void *sess)
+@@ -209,6 +209,6 @@ queue_ops_rsa_enc_dec(struct rte_cryptodev_asym_session *sess)


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

* patch 'common/qat: fix VF to PF answer' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (31 preceding siblings ...)
  2022-10-25 15:06 ` patch 'test/crypto: fix debug messages' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'test/ipsec: fix build with GCC 12' " Kevin Traynor
                   ` (64 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 656b3579683a2476573151dcbd4875fb2aaef828 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 29 Jul 2022 08:47:31 +0100
Subject: [PATCH] common/qat: fix VF to PF answer

[ upstream commit 66c0ad1f3dbbb344c43b93f7b6495c57edb8c4fb ]

This commit fixes answer sent to physical device in
vf2pf communication.

Fixes: b17d16fb47b4 ("common/qat: add PF to VF communication")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/common/qat/qat_pf2vf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/common/qat/qat_pf2vf.c b/drivers/common/qat/qat_pf2vf.c
index 4e9ffc72fc..621f12fce2 100644
--- a/drivers/common/qat/qat_pf2vf.c
+++ b/drivers/common/qat/qat_pf2vf.c
@@ -60,5 +60,5 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
 		 */
 		do {
-			rte_delay_us_sleep(5);
+			rte_delay_us_sleep(ADF_IOV_MSG_ACK_DELAY_US * 2);
 			val = ADF_CSR_RD(pmisc_bar_addr, vf_csr_off);
 		} while ((val & ADF_PFVF_INT) &&
@@ -71,4 +71,6 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
 
 		uint32_t pf_val = ADF_CSR_RD(pmisc_bar_addr, pf_csr_off);
+		msg &= ~ADF_PFVF_INT;
+		ADF_CSR_WR(pmisc_bar_addr, pf_csr_off, msg);
 
 		*(ret + i) = (uint8_t)(pf_val >> (pf2vf_msg.block_hdr > 0 ?
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.321823905 +0100
+++ 0034-common-qat-fix-VF-to-PF-answer.patch	2022-10-25 14:18:58.397798041 +0100
@@ -1 +1 @@
-From 66c0ad1f3dbbb344c43b93f7b6495c57edb8c4fb Mon Sep 17 00:00:00 2001
+From 656b3579683a2476573151dcbd4875fb2aaef828 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66c0ad1f3dbbb344c43b93f7b6495c57edb8c4fb ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'test/ipsec: fix build with GCC 12' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (32 preceding siblings ...)
  2022-10-25 15:06 ` patch 'common/qat: fix VF to PF answer' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'ipsec: " Kevin Traynor
                   ` (63 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Amit Prakash Shukla; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From fdebff6b5aadd85e417a10c234b4159d1d0620f5 Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@marvell.com>
Date: Thu, 4 Aug 2022 19:10:53 +0530
Subject: [PATCH] test/ipsec: fix build with GCC 12

[ upstream commit 250cbb8d5dd2ffcb4c8a871332f9ec8e5a59242f ]

GCC-12 raises following warning:

In function '_mm_loadu_si128',
    inlined from 'rte_mov16' at
	../lib/eal/x86/include/rte_memcpy.h:507:9,
    inlined from 'rte_mov128' at
	../lib/eal/x86/include/rte_memcpy.h:549:2,
    inlined from 'rte_memcpy_generic' at
	../lib/eal/x86/include/rte_memcpy.h:732:4,
    inlined from 'rte_memcpy' at
	../lib/eal/x86/include/rte_memcpy.h:882:10,
    inlined from 'setup_test_string_tunneled' at
	../app/test/test_ipsec.c:617:3:
/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:703:10: error:
    array subscript '__m128i_u[15]' is partly outside array bounds of
    'const uint8_t[255]' {aka 'const unsigned char[255]'}
    [-Werror=array-bounds]
  703 |   return *__P;
      |          ^~~~
../app/test/test_ipsec.c: In function 'setup_test_string_tunneled':
../app/test/test_ipsec.c:491:22: note: at offset 240 into object
     'esp_pad_bytes' of size 255
  491 | static const uint8_t esp_pad_bytes[IPSEC_MAX_PAD_SIZE] = {

This patch restrict the copy to minimum size.

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

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_ipsec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 6d5431843f..584c132f37 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -619,5 +619,6 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string,
 		dst += len;
 		/* copy pad bytes */
-		rte_memcpy(dst, esp_pad_bytes, padlen);
+		rte_memcpy(dst, esp_pad_bytes, RTE_MIN(padlen,
+			sizeof(esp_pad_bytes)));
 		dst += padlen;
 		/* copy ESP tail header */
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.341583778 +0100
+++ 0035-test-ipsec-fix-build-with-GCC-12.patch	2022-10-25 14:18:58.397798041 +0100
@@ -1 +1 @@
-From 250cbb8d5dd2ffcb4c8a871332f9ec8e5a59242f Mon Sep 17 00:00:00 2001
+From fdebff6b5aadd85e417a10c234b4159d1d0620f5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 250cbb8d5dd2ffcb4c8a871332f9ec8e5a59242f ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index 7c03a06785..aa533483fd 100644
+index 6d5431843f..584c132f37 100644
@@ -45 +46 @@
-@@ -630,5 +630,6 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string,
+@@ -619,5 +619,6 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string,


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

* patch 'ipsec: fix build with GCC 12' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (33 preceding siblings ...)
  2022-10-25 15:06 ` patch 'test/ipsec: fix build with GCC 12' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'crypto/qat: " Kevin Traynor
                   ` (62 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Amit Prakash Shukla; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From db9f8c23a4bc89764433efa58bf256f4bb95c10c Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@marvell.com>
Date: Thu, 4 Aug 2022 19:10:54 +0530
Subject: [PATCH] ipsec: fix build with GCC 12

[ upstream commit 2be383423e433b5d42324cb450589b46d057c2ed ]

GCC 12 raises the following warning:

In function '_mm_loadu_si128',
    inlined from 'rte_mov16' at
	../lib/eal/x86/include/rte_memcpy.h:507:9,
    inlined from 'rte_mov128' at
	../lib/eal/x86/include/rte_memcpy.h:549:2,
    inlined from 'rte_memcpy_generic' at
	../lib/eal/x86/include/rte_memcpy.h:732:4,
    inlined from 'rte_memcpy' at
	../lib/eal/x86/include/rte_memcpy.h:882:10,
    inlined from 'outb_tun_pkt_prepare' at
	../lib/ipsec/esp_outb.c:224:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:703:10: error:
	array subscript '__m128i_u[15]' is partly outside array bounds of
	'const uint8_t[255]' {aka 'const unsigned char[255]'}
	[-Werror=array-bounds]
  703 |   return *__P;
      |          ^~~~
In file included from ../lib/ipsec/esp_outb.c:17:
../lib/ipsec/pad.h: In function 'outb_tun_pkt_prepare':
../lib/ipsec/pad.h:10:22: note: at offset 240 into object 'esp_pad_bytes'
	of size 255
   10 | static const uint8_t esp_pad_bytes[IPSEC_MAX_PAD_SIZE] = {
      |                      ^~~~~~~~~~~~~

This patch restrict copy to minimum size.

Bugzilla ID: 1060
Fixes: 6015e6a13398 ("ipsec: move inbound and outbound code")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
---
 lib/ipsec/esp_outb.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c
index 28bd58e3c7..1b0eeed07f 100644
--- a/lib/ipsec/esp_outb.c
+++ b/lib/ipsec/esp_outb.c
@@ -221,6 +221,8 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 	pdlen -= sizeof(*espt);
 
+	RTE_ASSERT(pdlen <= sizeof(esp_pad_bytes));
+
 	/* copy padding data */
-	rte_memcpy(pt, esp_pad_bytes, pdlen);
+	rte_memcpy(pt, esp_pad_bytes, RTE_MIN(pdlen, sizeof(esp_pad_bytes)));
 
 	/* update esp trailer */
@@ -418,6 +420,8 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 	pdlen -= sizeof(*espt);
 
+	RTE_ASSERT(pdlen <= sizeof(esp_pad_bytes));
+
 	/* copy padding data */
-	rte_memcpy(pt, esp_pad_bytes, pdlen);
+	rte_memcpy(pt, esp_pad_bytes, RTE_MIN(pdlen, sizeof(esp_pad_bytes)));
 
 	/* update esp trailer */
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.362388857 +0100
+++ 0036-ipsec-fix-build-with-GCC-12.patch	2022-10-25 14:18:58.398798045 +0100
@@ -1 +1 @@
-From 2be383423e433b5d42324cb450589b46d057c2ed Mon Sep 17 00:00:00 2001
+From db9f8c23a4bc89764433efa58bf256f4bb95c10c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2be383423e433b5d42324cb450589b46d057c2ed ]
+
@@ -36 +37,0 @@
-Cc: stable@dpdk.org
@@ -45 +46 @@
-index 5a5429a12b..9cbd9202f6 100644
+index 28bd58e3c7..1b0eeed07f 100644
@@ -48 +49 @@
-@@ -220,6 +220,8 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
+@@ -221,6 +221,8 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
@@ -58 +59 @@
-@@ -417,6 +419,8 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
+@@ -418,6 +420,8 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,


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

* patch 'crypto/qat: fix build with GCC 12' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (34 preceding siblings ...)
  2022-10-25 15:06 ` patch 'ipsec: " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'cryptodev: fix missing SHA3 algorithm strings' " Kevin Traynor
                   ` (61 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Amit Prakash Shukla; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 29b6bd601428a25e37b282f09e4b4a2244e111d9 Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@marvell.com>
Date: Thu, 4 Aug 2022 19:10:55 +0530
Subject: [PATCH] crypto/qat: fix build with GCC 12

[ upstream commit 04361fe2aca8998ea06fb4823dceb965698e147c ]

GCC 12 raises the following warning:

In function '_mm_storeu_si128',
    inlined from 'rte_mov16' at
	../lib/eal/x86/include/rte_memcpy.h:508:2,
    inlined from 'rte_mov128' at
	../lib/eal/x86/include/rte_memcpy.h:542:2,
    inlined from 'rte_memcpy_generic' at
	../lib/eal/x86/include/rte_memcpy.h:732:4,
    inlined from 'rte_memcpy' at
	../lib/eal/x86/include/rte_memcpy.h:882:10,
    inlined from 'qat_sym_do_precomputes.constprop' at
	../drivers/crypto/qat/qat_sym_session.c:1434:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:739:8: error:
	array subscript 8 is outside array bounds of 'unsigned char[128]'
	[-Werror=array-bounds]
  739 |   *__P = __B;
      |   ~~~~~^~~~~

../drivers/crypto/qat/qat_sym_session.c:
	In function 'qat_sym_do_precomputes.constprop':
../drivers/crypto/qat/qat_sym_session.c:1305:17: note:
	at offset 192 into object 'opad.750' of size 128
 1305 | uint8_t
	  opad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)];
      |           ^~~~

../drivers/crypto/qat/qat_sym_session.c:
	In function 'qat_sym_do_precomputes.constprop':
../drivers/crypto/qat/qat_sym_session.c:1304:17: note:
	at offset 128 into object 'ipad.749' of size 128
 1304 | uint8_t
	  ipad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)];
      |           ^~~~

Added a check to prevent compiler warnings.

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/qat/qat_sym_session.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 80d6fbfa46..3697a038e5 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1436,4 +1436,8 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,
 		return -EFAULT;
 	}
+
+	RTE_VERIFY(auth_keylen <= sizeof(ipad));
+	RTE_VERIFY(auth_keylen <= sizeof(opad));
+
 	rte_memcpy(ipad, auth_key, auth_keylen);
 	rte_memcpy(opad, auth_key, auth_keylen);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.382646326 +0100
+++ 0037-crypto-qat-fix-build-with-GCC-12.patch	2022-10-25 14:18:58.399798048 +0100
@@ -1 +1 @@
-From 04361fe2aca8998ea06fb4823dceb965698e147c Mon Sep 17 00:00:00 2001
+From 29b6bd601428a25e37b282f09e4b4a2244e111d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04361fe2aca8998ea06fb4823dceb965698e147c ]
+
@@ -44 +45,0 @@
-Cc: stable@dpdk.org
@@ -53 +54 @@
-index e09d810354..52b3455cf0 100644
+index 80d6fbfa46..3697a038e5 100644
@@ -56 +57 @@
-@@ -1652,4 +1652,8 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,
+@@ -1436,4 +1436,8 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,


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

* patch 'cryptodev: fix missing SHA3 algorithm strings' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (35 preceding siblings ...)
  2022-10-25 15:06 ` patch 'crypto/qat: " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'eventdev: fix name of Rx conf type in documentation' " Kevin Traynor
                   ` (60 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Volodymyr Fialko; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From afa77bc4df963392898585265bbb40ed670c9d7b Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko@marvell.com>
Date: Thu, 15 Sep 2022 10:26:35 +0200
Subject: [PATCH] cryptodev: fix missing SHA3 algorithm strings

[ upstream commit 6c55e2c3e638af1a2a77407842daf7e7943e03c8 ]

SHA3 family algorithms were missing in the array of algorithm strings.

Fixes: 1df800f89518 ("crypto/ccp: support SHA3 family")

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/rte_cryptodev.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index a40536c5ea..e38d7b067a 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -142,4 +142,13 @@ rte_crypto_auth_algorithm_strings[] = {
 	[RTE_CRYPTO_AUTH_SHA512_HMAC]	= "sha2-512-hmac",
 
+	[RTE_CRYPTO_AUTH_SHA3_224]	= "sha3-224",
+	[RTE_CRYPTO_AUTH_SHA3_224_HMAC] = "sha3-224-hmac",
+	[RTE_CRYPTO_AUTH_SHA3_256]	= "sha3-256",
+	[RTE_CRYPTO_AUTH_SHA3_256_HMAC] = "sha3-256-hmac",
+	[RTE_CRYPTO_AUTH_SHA3_384]	= "sha3-384",
+	[RTE_CRYPTO_AUTH_SHA3_384_HMAC] = "sha3-384-hmac",
+	[RTE_CRYPTO_AUTH_SHA3_512]	= "sha3-512",
+	[RTE_CRYPTO_AUTH_SHA3_512_HMAC]	= "sha3-512-hmac",
+
 	[RTE_CRYPTO_AUTH_KASUMI_F9]	= "kasumi-f9",
 	[RTE_CRYPTO_AUTH_SNOW3G_UIA2]	= "snow3g-uia2",
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.404341767 +0100
+++ 0038-cryptodev-fix-missing-SHA3-algorithm-strings.patch	2022-10-25 14:18:58.400798052 +0100
@@ -1 +1 @@
-From 6c55e2c3e638af1a2a77407842daf7e7943e03c8 Mon Sep 17 00:00:00 2001
+From afa77bc4df963392898585265bbb40ed670c9d7b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c55e2c3e638af1a2a77407842daf7e7943e03c8 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 29c9c55131..5e25e607fa 100644
+index a40536c5ea..e38d7b067a 100644
@@ -21 +22 @@
-@@ -131,4 +131,13 @@ rte_crypto_auth_algorithm_strings[] = {
+@@ -142,4 +142,13 @@ rte_crypto_auth_algorithm_strings[] = {


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

* patch 'eventdev: fix name of Rx conf type in documentation' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (36 preceding siblings ...)
  2022-10-25 15:06 ` patch 'cryptodev: fix missing SHA3 algorithm strings' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/i40e: fix VF representor release' " Kevin Traynor
                   ` (59 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Volodymyr Fialko; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 278054776cfbfc8fa6355989139b820c53e53475 Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko@marvell.com>
Date: Mon, 26 Sep 2022 13:58:11 +0200
Subject: [PATCH] eventdev: fix name of Rx conf type in documentation

[ upstream commit 4f3c773825d262960b2622d509dbcb263dfa82d2 ]

Rename configuration structure type to correspond definition.

Fixes: dcc806c2638 ("eventdev: add eth Rx adapter API")

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/eventdev/rte_event_eth_rx_adapter.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index 9546d792e9..8f8c887b9e 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -457,5 +457,5 @@ int rte_event_eth_rx_adapter_free(uint8_t id);
  *
  * @param conf
- *  Additional configuration structure of type *rte_event_eth_rx_adapter_conf*
+ *  Additional configuration structure of type *rte_event_eth_rx_adapter_queue_conf*
  *
  * @return
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.425824166 +0100
+++ 0039-eventdev-fix-name-of-Rx-conf-type-in-documentation.patch	2022-10-25 14:18:58.401798055 +0100
@@ -1 +1 @@
-From 4f3c773825d262960b2622d509dbcb263dfa82d2 Mon Sep 17 00:00:00 2001
+From 278054776cfbfc8fa6355989139b820c53e53475 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4f3c773825d262960b2622d509dbcb263dfa82d2 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index a3313c8d32..a9fdeb7b45 100644
+index 9546d792e9..8f8c887b9e 100644
@@ -21 +22 @@
-@@ -459,5 +459,5 @@ int rte_event_eth_rx_adapter_free(uint8_t id);
+@@ -457,5 +457,5 @@ int rte_event_eth_rx_adapter_free(uint8_t id);


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

* patch 'net/i40e: fix VF representor release' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (37 preceding siblings ...)
  2022-10-25 15:06 ` patch 'eventdev: fix name of Rx conf type in documentation' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice: fix RSS hash update' " Kevin Traynor
                   ` (58 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Yuying Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 85821d6d952d886ae2567b6045101c74bea383c6 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Thu, 4 Aug 2022 17:50:03 +0800
Subject: [PATCH] net/i40e: fix VF representor release

[ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ]

A segmentation fault occurs when testpmd exit.

This is due to fetching the device name from PF, PF
is freed firstly and then VF representor is called
later.

This commit fixes the bug by fetching the device
name from VF representor instead of PF.

Fixes: e391a7b7f815 ("net/i40e: fix multi-process shared data")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
---
 drivers/net/i40e/i40e_vf_representor.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 7f8e81858e..bcd445bcdd 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -30,6 +30,4 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 {
 	struct i40e_vf_representor *representor = ethdev->data->dev_private;
-	struct rte_eth_dev_data *pf_dev_data =
-		representor->adapter->pf.dev_data;
 
 	/* get dev info for the vdev */
@@ -105,5 +103,5 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 
 	dev_info->switch_info.name =
-		rte_eth_devices[pf_dev_data->port_id].device->name;
+		rte_eth_devices[ethdev->data->port_id].device->name;
 	dev_info->switch_info.domain_id = representor->switch_domain_id;
 	dev_info->switch_info.port_id = representor->vf_id;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.446254551 +0100
+++ 0040-net-i40e-fix-VF-representor-release.patch	2022-10-25 14:18:58.401798055 +0100
@@ -1 +1 @@
-From ba10df53e486ef7918c1236ef4d8da16ae3a32e1 Mon Sep 17 00:00:00 2001
+From 85821d6d952d886ae2567b6045101c74bea383c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index cc0f992453..c00ae832aa 100644
+index 7f8e81858e..bcd445bcdd 100644


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

* patch 'net/ice: fix RSS hash update' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (38 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/i40e: fix VF representor release' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix inner symmetric RSS hash in raw flow' " Kevin Traynor
                   ` (57 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From a991f641f3557743f2a41a9e941027809ae65105 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Thu, 4 Aug 2022 17:32:32 +0800
Subject: [PATCH] net/ice: fix RSS hash update

[ upstream commit 04887b812a9f57e79b5005a2ba26b04fed686173 ]

This patch fixes the issue that the RSS does not update correctly
when the user sets it to none.

Fixes: 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 7df1b4ec19..fb2b1998f2 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4624,8 +4624,6 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
 		return status;
 
-	if (rss_conf->rss_hf == 0) {
+	if (rss_conf->rss_hf == 0)
 		pf->rss_hf = 0;
-		return 0;
-	}
 
 	/* RSS hash configuration */
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.466422940 +0100
+++ 0041-net-ice-fix-RSS-hash-update.patch	2022-10-25 14:18:58.404798066 +0100
@@ -1 +1 @@
-From 04887b812a9f57e79b5005a2ba26b04fed686173 Mon Sep 17 00:00:00 2001
+From a991f641f3557743f2a41a9e941027809ae65105 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04887b812a9f57e79b5005a2ba26b04fed686173 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index e8304a1f2b..62bcc1d095 100644
+index 7df1b4ec19..fb2b1998f2 100644
@@ -22 +23 @@
-@@ -4672,8 +4672,6 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
+@@ -4624,8 +4624,6 @@ ice_rss_hash_update(struct rte_eth_dev *dev,


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

* patch 'net/ice/base: fix inner symmetric RSS hash in raw flow' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (39 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice: fix RSS hash update' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/iavf: fix L3 checksum Tx offload flag' " Kevin Traynor
                   ` (56 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Ting Xu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From a50e008983a9155df947ce183da36177cf737f7b Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Wed, 3 Aug 2022 02:19:43 +0000
Subject: [PATCH] net/ice/base: fix inner symmetric RSS hash in raw flow

[ upstream commit 53e7c7fcf3ae7c0fb4342f52c767f99e61a48ab8 ]

Inner IPv4 and IPv6 symmetric RSS hash is not valid for raw pattern.
This patch fixes the issue by adding the corresponding protocol ID
for inner IPv4/6.

Fixes: 0837da2e27ae ("net/ice/base: support add HW profile for RSS raw flow")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index bcbb9b12c4..0db474bd62 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -4093,4 +4093,6 @@ ice_rss_cfg_raw_symm(struct ice_hw *hw,
 		switch (proto_id) {
 		case ICE_PROT_IPV4_OF_OR_S:
+		case ICE_PROT_IPV4_IL:
+		case ICE_PROT_IPV4_IL_IL:
 			len = ICE_FLOW_FLD_SZ_IPV4_ADDR /
 			      ICE_FLOW_FV_EXTRACT_SZ;
@@ -4108,4 +4110,6 @@ ice_rss_cfg_raw_symm(struct ice_hw *hw,
 			continue;
 		case ICE_PROT_IPV6_OF_OR_S:
+		case ICE_PROT_IPV6_IL:
+		case ICE_PROT_IPV6_IL_IL:
 			len = ICE_FLOW_FLD_SZ_IPV6_ADDR /
 			      ICE_FLOW_FV_EXTRACT_SZ;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.489087060 +0100
+++ 0042-net-ice-base-fix-inner-symmetric-RSS-hash-in-raw-flo.patch	2022-10-25 14:18:58.406798073 +0100
@@ -1 +1 @@
-From 53e7c7fcf3ae7c0fb4342f52c767f99e61a48ab8 Mon Sep 17 00:00:00 2001
+From a50e008983a9155df947ce183da36177cf737f7b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 53e7c7fcf3ae7c0fb4342f52c767f99e61a48ab8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4a73f0c674..d7eecc0d54 100644
+index bcbb9b12c4..0db474bd62 100644
@@ -23 +24 @@
-@@ -4107,4 +4107,6 @@ ice_rss_cfg_raw_symm(struct ice_hw *hw,
+@@ -4093,4 +4093,6 @@ ice_rss_cfg_raw_symm(struct ice_hw *hw,
@@ -30 +31 @@
-@@ -4122,4 +4124,6 @@ ice_rss_cfg_raw_symm(struct ice_hw *hw,
+@@ -4108,4 +4110,6 @@ ice_rss_cfg_raw_symm(struct ice_hw *hw,


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

* patch 'net/iavf: fix L3 checksum Tx offload flag' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (40 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix inner symmetric RSS hash in raw flow' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/iavf: fix VLAN insertion' " Kevin Traynor
                   ` (55 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 301e4cc87b15205000b44b2dc42725e3b2b9b952 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Wed, 10 Aug 2022 17:57:07 +0800
Subject: [PATCH] net/iavf: fix L3 checksum Tx offload flag

[ upstream commit 817577c03afe7590b3212383e4e690e66d266e3f ]

When ol_flag is only RTE_MBUF_F_TX_IPV4, the Tx L3
checksum offload is still configured to IIPT in the
command field of Tx data descriptor.

This patch is to fix the issue to make the Tx L3
checksum offload flags and Tx data descriptor
consistent.

Fixes: 1e728b01120c ("net/iavf: rework Tx path")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 3a0dfca2a7..285aeebff6 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2427,7 +2427,9 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
 
 	/* Enable L3 checksum offloading inner */
-	if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_IPV4)) {
-		command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
-		offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
+	if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+		if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
+			command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
+			offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
+		}
 	} else if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
 		command |= IAVF_TX_DESC_CMD_IIPT_IPV4;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.512958095 +0100
+++ 0043-net-iavf-fix-L3-checksum-Tx-offload-flag.patch	2022-10-25 14:18:58.407798077 +0100
@@ -1 +1 @@
-From 817577c03afe7590b3212383e4e690e66d266e3f Mon Sep 17 00:00:00 2001
+From 301e4cc87b15205000b44b2dc42725e3b2b9b952 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 817577c03afe7590b3212383e4e690e66d266e3f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 109ba756f8..dfd021889e 100644
+index 3a0dfca2a7..285aeebff6 100644
@@ -27 +28 @@
-@@ -2539,7 +2539,9 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
+@@ -2427,7 +2427,9 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,


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

* patch 'net/iavf: fix VLAN insertion' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (41 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/iavf: fix L3 checksum Tx offload flag' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/iavf: fix pattern check for flow director parser' " Kevin Traynor
                   ` (54 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Yiding Zhou; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From fe9ea3690179932d417a0b107767ac1177db498d Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou@intel.com>
Date: Fri, 12 Aug 2022 10:08:21 +0800
Subject: [PATCH] net/iavf: fix VLAN insertion

[ upstream commit 0d58caa7d6d1f68babe434bb4b98ef323170ae3c ]

When the driver tells the VF to insert VLAN tag using the L2TAG2 field,
vector Tx path does not use Tx context descriptor and would cause VLAN tag
inserted into the wrong location.

This commit is to fix issue by using normal Tx path to handle L2TAG2 case.

Fixes: 3aa957338503 ("net/iavf: fix VLAN insert")

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_common.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h
index 1fd37b74c1..9266b8a708 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
@@ -251,4 +251,7 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)
 		return -1;
 
+	if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
+		return -1;
+
 	if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD)
 		return IAVF_VECTOR_OFFLOAD_PATH;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.535239421 +0100
+++ 0044-net-iavf-fix-VLAN-insertion.patch	2022-10-25 14:18:58.408798080 +0100
@@ -1 +1 @@
-From 0d58caa7d6d1f68babe434bb4b98ef323170ae3c Mon Sep 17 00:00:00 2001
+From fe9ea3690179932d417a0b107767ac1177db498d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0d58caa7d6d1f68babe434bb4b98ef323170ae3c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a59cb2ceee..4ab22c6b2b 100644
+index 1fd37b74c1..9266b8a708 100644
@@ -25 +26 @@
-@@ -254,4 +254,7 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)
+@@ -251,4 +251,7 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)


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

* patch 'net/iavf: fix pattern check for flow director parser' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (42 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/iavf: fix VLAN insertion' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/iavf: fix Tx done descriptors cleanup' " Kevin Traynor
                   ` (53 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Steve Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 246026e0b89911ad715a723faef429e4c3e3f9f1 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Wed, 10 Aug 2022 06:47:51 +0000
Subject: [PATCH] net/iavf: fix pattern check for flow director parser

[ upstream commit e5c7498fae094e97a8e8831979a7112fa260bf92 ]

FDIR rules with masks are not supported in current code. Thus add
pattern check for IPv4/UDP/TCP/SCTP addr/port to terminate the FDIR
programming stage.

Fixes: d5eb3e600d9e ("net/iavf: support flow director basic rule")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_fdir.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 6b847894d8..c30853dd94 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -818,4 +818,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 			}
 
+			/* Mask for IPv4 src/dst addrs not supported */
+			if (ipv4_mask->hdr.src_addr &&
+				ipv4_mask->hdr.src_addr != UINT32_MAX)
+				return -rte_errno;
+			if (ipv4_mask->hdr.dst_addr &&
+				ipv4_mask->hdr.dst_addr != UINT32_MAX)
+				return -rte_errno;
+
 			if (ipv4_mask->hdr.type_of_service ==
 			    UINT8_MAX) {
@@ -1008,4 +1016,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 				}
 
+				/* Mask for UDP src/dst ports not supported */
+				if (udp_mask->hdr.src_port &&
+					udp_mask->hdr.src_port != UINT16_MAX)
+					return -rte_errno;
+				if (udp_mask->hdr.dst_port &&
+					udp_mask->hdr.dst_port != UINT16_MAX)
+					return -rte_errno;
+
 				if (udp_mask->hdr.src_port == UINT16_MAX) {
 					input_set |= IAVF_INSET_UDP_SRC_PORT;
@@ -1057,4 +1073,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 				}
 
+				/* Mask for TCP src/dst ports not supported */
+				if (tcp_mask->hdr.src_port &&
+					tcp_mask->hdr.src_port != UINT16_MAX)
+					return -rte_errno;
+				if (tcp_mask->hdr.dst_port &&
+					tcp_mask->hdr.dst_port != UINT16_MAX)
+					return -rte_errno;
+
 				if (tcp_mask->hdr.src_port == UINT16_MAX) {
 					input_set |= IAVF_INSET_TCP_SRC_PORT;
@@ -1100,4 +1124,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 				}
 
+				/* Mask for SCTP src/dst ports not supported */
+				if (sctp_mask->hdr.src_port &&
+					sctp_mask->hdr.src_port != UINT16_MAX)
+					return -rte_errno;
+				if (sctp_mask->hdr.dst_port &&
+					sctp_mask->hdr.dst_port != UINT16_MAX)
+					return -rte_errno;
+
 				if (sctp_mask->hdr.src_port == UINT16_MAX) {
 					input_set |= IAVF_INSET_SCTP_SRC_PORT;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.555486280 +0100
+++ 0045-net-iavf-fix-pattern-check-for-flow-director-parser.patch	2022-10-25 14:18:58.409798084 +0100
@@ -1 +1 @@
-From e5c7498fae094e97a8e8831979a7112fa260bf92 Mon Sep 17 00:00:00 2001
+From 246026e0b89911ad715a723faef429e4c3e3f9f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e5c7498fae094e97a8e8831979a7112fa260bf92 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2e6b3a9097..a397047fdb 100644
+index 6b847894d8..c30853dd94 100644
@@ -23 +24 @@
-@@ -933,4 +933,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
+@@ -818,4 +818,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
@@ -36 +37 @@
-@@ -1123,4 +1131,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
+@@ -1008,4 +1016,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
@@ -49 +50 @@
-@@ -1172,4 +1188,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
+@@ -1057,4 +1073,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
@@ -62 +63 @@
-@@ -1215,4 +1239,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
+@@ -1100,4 +1124,12 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,


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

* patch 'net/iavf: fix Tx done descriptors cleanup' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (43 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/iavf: fix pattern check for flow director parser' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/iavf: update IPsec ESN values when updating session' " Kevin Traynor
                   ` (52 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Aleksandr Miloshenko; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 30fc18b4dc9f055ab2651e9cffd73e0a57d94a69 Mon Sep 17 00:00:00 2001
From: Aleksandr Miloshenko <a.miloshenko@f5.com>
Date: Mon, 29 Aug 2022 18:13:46 -0700
Subject: [PATCH] net/iavf: fix Tx done descriptors cleanup

[ upstream commit 4e868408bf213dc92ac270bc06ac466ed81a8505 ]

iavf_xmit_pkts() sets tx_tail to the next of last transmitted
Tx descriptor. So the cleanup of Tx done descriptors must be started
from tx_tail, not from the next of tx_tail.
Otherwise rte_eth_tx_done_cleanup() doesn't free the first Tx done mbuf
when tx queue is full.

Fixes: 86e44244f95c ("net/iavf: cleanup Tx buffers")

Signed-off-by: Aleksandr Miloshenko <a.miloshenko@f5.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 285aeebff6..afe5981cac 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3061,12 +3061,12 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
 {
 	struct iavf_tx_entry *swr_ring = txq->sw_ring;
-	uint16_t i, tx_last, tx_id;
+	uint16_t tx_last, tx_id;
 	uint16_t nb_tx_free_last;
 	uint16_t nb_tx_to_clean;
-	uint32_t pkt_cnt;
+	uint32_t pkt_cnt = 0;
 
-	/* Start free mbuf from the next of tx_tail */
-	tx_last = txq->tx_tail;
-	tx_id  = swr_ring[tx_last].next_id;
+	/* Start free mbuf from tx_tail */
+	tx_id = txq->tx_tail;
+	tx_last = tx_id;
 
 	if (txq->nb_free == 0 && iavf_xmit_cleanup(txq))
@@ -3081,8 +3081,6 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
 	 * freeable mubfs and packets.
 	 */
-	for (pkt_cnt = 0; pkt_cnt < free_cnt; ) {
-		for (i = 0; i < nb_tx_to_clean &&
-			pkt_cnt < free_cnt &&
-			tx_id != tx_last; i++) {
+	while (pkt_cnt < free_cnt) {
+		do {
 			if (swr_ring[tx_id].mbuf != NULL) {
 				rte_pktmbuf_free_seg(swr_ring[tx_id].mbuf);
@@ -3097,5 +3095,5 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
 
 			tx_id = swr_ring[tx_id].next_id;
-		}
+		} while (--nb_tx_to_clean && pkt_cnt < free_cnt && tx_id != tx_last);
 
 		if (txq->rs_thresh > txq->nb_tx_desc -
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.576325016 +0100
+++ 0046-net-iavf-fix-Tx-done-descriptors-cleanup.patch	2022-10-25 14:18:58.410798088 +0100
@@ -1 +1 @@
-From 4e868408bf213dc92ac270bc06ac466ed81a8505 Mon Sep 17 00:00:00 2001
+From 30fc18b4dc9f055ab2651e9cffd73e0a57d94a69 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e868408bf213dc92ac270bc06ac466ed81a8505 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index dfd021889e..3deabe1d7e 100644
+index 285aeebff6..afe5981cac 100644
@@ -25 +26 @@
-@@ -3187,12 +3187,12 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
+@@ -3061,12 +3061,12 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
@@ -43 +44 @@
-@@ -3207,8 +3207,6 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
+@@ -3081,8 +3081,6 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
@@ -54 +55 @@
-@@ -3223,5 +3221,5 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
+@@ -3097,5 +3095,5 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,


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

* patch 'net/iavf: update IPsec ESN values when updating session' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (44 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/iavf: fix Tx done descriptors cleanup' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'common/iavf: avoid copy in async mode' " Kevin Traynor
                   ` (51 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From fc56f980c87f4369ca3f8b331f6eaaed92ea3a2c Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Mon, 29 Aug 2022 10:50:25 +0100
Subject: [PATCH] net/iavf: update IPsec ESN values when updating session

[ upstream commit eb944b590653015a0b7e5fcc25a2ac91ed00bbd9 ]

When updating an ingress session update the internal values before
making the virtual channel request.

Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ipsec_crypto.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index 75f05ee558..1d465b4419 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -894,9 +894,10 @@ iavf_ipsec_crypto_session_update(void *device,
 		 * in *iavf_ipsec_crypto_pkt_metadata_set* function.
 		 */
+		iavf_sess->esn.hi = conf->ipsec.esn.hi;
+		iavf_sess->esn.low = conf->ipsec.esn.low;
 		if (iavf_sess->direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS)
 			rc = iavf_ipsec_crypto_sa_update_esn(adapter,
 					iavf_sess);
-		else
-			iavf_sess->esn.hi = conf->ipsec.esn.hi;
+
 	}
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.598163873 +0100
+++ 0047-net-iavf-update-IPsec-ESN-values-when-updating-sessi.patch	2022-10-25 14:18:58.411798091 +0100
@@ -1 +1 @@
-From eb944b590653015a0b7e5fcc25a2ac91ed00bbd9 Mon Sep 17 00:00:00 2001
+From fc56f980c87f4369ca3f8b331f6eaaed92ea3a2c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb944b590653015a0b7e5fcc25a2ac91ed00bbd9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'common/iavf: avoid copy in async mode' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (45 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/iavf: update IPsec ESN values when updating session' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix division during E822 PTP init' " Kevin Traynor
                   ` (50 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Steven Zou; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 85de6911de73e6d9ea59c44c44104ebef7d7b4c4 Mon Sep 17 00:00:00 2001
From: Steven Zou <steven.zou@intel.com>
Date: Mon, 5 Sep 2022 09:42:06 +0800
Subject: [PATCH] common/iavf: avoid copy in async mode

[ upstream commit c60fad56266fef1f5f6e08c062806e137713e9da ]

If cmd_details are defined or async flag is set,
don't copy the desc/buff back to temp.

Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")

Signed-off-by: Steven Zou <steven.zou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/common/iavf/iavf_adminq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/common/iavf/iavf_adminq.c
index 9c36e8908e..06644b02a1 100644
--- a/drivers/common/iavf/iavf_adminq.c
+++ b/drivers/common/iavf/iavf_adminq.c
@@ -789,5 +789,6 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
 
 	/* if ready, copy the desc back to temp */
-	if (iavf_asq_done(hw)) {
+	if (iavf_asq_done(hw) &&
+		!details->async && !details->postpone) {
 		iavf_memcpy(desc, desc_on_ring, sizeof(struct iavf_aq_desc),
 			    IAVF_DMA_TO_NONDMA);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.619531319 +0100
+++ 0048-common-iavf-avoid-copy-in-async-mode.patch	2022-10-25 14:18:58.411798091 +0100
@@ -1 +1 @@
-From c60fad56266fef1f5f6e08c062806e137713e9da Mon Sep 17 00:00:00 2001
+From 85de6911de73e6d9ea59c44c44104ebef7d7b4c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c60fad56266fef1f5f6e08c062806e137713e9da ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 8b305c0fe3..56c8a519be 100644
+index 9c36e8908e..06644b02a1 100644


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

* patch 'net/ice/base: fix division during E822 PTP init' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (46 preceding siblings ...)
  2022-10-25 15:06 ` patch 'common/iavf: avoid copy in async mode' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix 100M speed capability' " Kevin Traynor
                   ` (49 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jacob Keller, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 14ed431e0817166809096e4004a29c3cbcf89b0f Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:01 -0400
Subject: [PATCH] net/ice/base: fix division during E822 PTP init

[ upstream commit 4e1d404e03da1b73c69d8aedc77d810af2e5d6fb ]

When initializing the device hardware for PTP, the E822 devices
requirea number of values to be calculated and programmed to
hardware.These values are calculated using unsigned 64-bit
division.

The DIV_64BIT macro currently translates into a specific Linux
functionthat triggers a *signed* division. This produces incorrect
results when operating on a dividend larger than an s64. The
division calculation effectively overflows and results in totally
unexpected behavior.

In this case, the UIX value for 10Gb/40Gb link speeds are calculated
incorrectly. This ultimately cascades into a failure of the Tx
timestamps. Specifically, the reported Tx timestamps become wildly
inaccurate and not representing nominal time.

The root cause of this bug is the assumption that DIV_64BIT can
correctly handle both signed and unsigned division. In fact the
entire reason we need this is because the Linux kernel compilation
target does not provide native 64 bit division ops, and requires
explicit use of kernel functions which explicitly do either signed
or unsigned division.

To correctly solve this, introduce new functions, DIV_U64 and
DIV_S64 which are specifically intended for signed or unsigned
division. To help catch issues, use static inline functions so
that we get strict type checking.

Fixes: 97f4f78bbd9f ("net/ice/base: add functions for device clock control")

Signed-off-by: Jacob Keller <jacob.e.keller@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_ptp_hw.c | 56 +++++++++++++++----------------
 drivers/net/ice/base/ice_sched.c  | 24 ++++++-------
 drivers/net/ice/base/ice_type.h   | 30 +++++++++++++++--
 3 files changed, 68 insertions(+), 42 deletions(-)

diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c
index 7e797c9511..3a47f8cebe 100644
--- a/drivers/net/ice/base/ice_ptp_hw.c
+++ b/drivers/net/ice/base/ice_ptp_hw.c
@@ -1635,5 +1635,5 @@ static enum ice_status ice_phy_cfg_uix_e822(struct ice_hw *hw, u8 port)
 
 	/* Program the 10Gb/40Gb conversion ratio */
-	uix = DIV_64BIT(tu_per_sec * LINE_UI_10G_40G, 390625000);
+	uix = DIV_U64(tu_per_sec * LINE_UI_10G_40G, 390625000);
 
 	status = ice_write_64b_phy_reg_e822(hw, port, P_REG_UIX66_10G_40G_L,
@@ -1646,5 +1646,5 @@ static enum ice_status ice_phy_cfg_uix_e822(struct ice_hw *hw, u8 port)
 
 	/* Program the 25Gb/100Gb conversion ratio */
-	uix = DIV_64BIT(tu_per_sec * LINE_UI_25G_100G, 390625000);
+	uix = DIV_U64(tu_per_sec * LINE_UI_25G_100G, 390625000);
 
 	status = ice_write_64b_phy_reg_e822(hw, port, P_REG_UIX66_25G_100G_L,
@@ -1728,6 +1728,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_PAR_TX_TUS */
 	if (e822_vernier[link_spd].tx_par_clk)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].tx_par_clk);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].tx_par_clk);
 	else
 		phy_tus = 0;
@@ -1740,6 +1740,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_PAR_RX_TUS */
 	if (e822_vernier[link_spd].rx_par_clk)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].rx_par_clk);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].rx_par_clk);
 	else
 		phy_tus = 0;
@@ -1752,6 +1752,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_PCS_TX_TUS */
 	if (e822_vernier[link_spd].tx_pcs_clk)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].tx_pcs_clk);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].tx_pcs_clk);
 	else
 		phy_tus = 0;
@@ -1764,6 +1764,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_PCS_RX_TUS */
 	if (e822_vernier[link_spd].rx_pcs_clk)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].rx_pcs_clk);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].rx_pcs_clk);
 	else
 		phy_tus = 0;
@@ -1776,6 +1776,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_DESK_PAR_TX_TUS */
 	if (e822_vernier[link_spd].tx_desk_rsgb_par)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].tx_desk_rsgb_par);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].tx_desk_rsgb_par);
 	else
 		phy_tus = 0;
@@ -1788,6 +1788,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_DESK_PAR_RX_TUS */
 	if (e822_vernier[link_spd].rx_desk_rsgb_par)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].rx_desk_rsgb_par);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].rx_desk_rsgb_par);
 	else
 		phy_tus = 0;
@@ -1800,6 +1800,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_DESK_PCS_TX_TUS */
 	if (e822_vernier[link_spd].tx_desk_rsgb_pcs)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].tx_desk_rsgb_pcs);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].tx_desk_rsgb_pcs);
 	else
 		phy_tus = 0;
@@ -1812,6 +1812,6 @@ static enum ice_status ice_phy_cfg_parpcs_e822(struct ice_hw *hw, u8 port)
 	/* P_REG_DESK_PCS_RX_TUS */
 	if (e822_vernier[link_spd].rx_desk_rsgb_pcs)
-		phy_tus = DIV_64BIT(tu_per_sec,
-				    e822_vernier[link_spd].rx_desk_rsgb_pcs);
+		phy_tus = DIV_U64(tu_per_sec,
+				  e822_vernier[link_spd].rx_desk_rsgb_pcs);
 	else
 		phy_tus = 0;
@@ -1845,7 +1845,7 @@ ice_calc_fixed_tx_offset_e822(struct ice_hw *hw, enum ice_ptp_link_spd link_spd)
 	 * divisions by 1e4 first then by 1e7.
 	 */
-	fixed_offset = DIV_64BIT(tu_per_sec, 10000);
+	fixed_offset = DIV_U64(tu_per_sec, 10000);
 	fixed_offset *= e822_vernier[link_spd].tx_fixed_delay;
-	fixed_offset = DIV_64BIT(fixed_offset, 10000000);
+	fixed_offset = DIV_U64(fixed_offset, 10000000);
 
 	return fixed_offset;
@@ -2075,7 +2075,7 @@ ice_phy_calc_pmd_adj_e822(struct ice_hw *hw, u8 port,
 	 * speed pmd_adj_divisor value.
 	 */
-	adj = DIV_64BIT(tu_per_sec, 125);
+	adj = DIV_U64(tu_per_sec, 125);
 	adj *= mult;
-	adj = DIV_64BIT(adj, pmd_adj_divisor);
+	adj = DIV_U64(adj, pmd_adj_divisor);
 
 	/* Finally, for 25G-RS and 50G-RS, a further adjustment for the Rx
@@ -2098,7 +2098,7 @@ ice_phy_calc_pmd_adj_e822(struct ice_hw *hw, u8 port,
 			mult = (4 - rx_cycle) * 40;
 
-			cycle_adj = DIV_64BIT(tu_per_sec, 125);
+			cycle_adj = DIV_U64(tu_per_sec, 125);
 			cycle_adj *= mult;
-			cycle_adj = DIV_64BIT(cycle_adj, pmd_adj_divisor);
+			cycle_adj = DIV_U64(cycle_adj, pmd_adj_divisor);
 
 			adj += cycle_adj;
@@ -2120,7 +2120,7 @@ ice_phy_calc_pmd_adj_e822(struct ice_hw *hw, u8 port,
 			mult = rx_cycle * 40;
 
-			cycle_adj = DIV_64BIT(tu_per_sec, 125);
+			cycle_adj = DIV_U64(tu_per_sec, 125);
 			cycle_adj *= mult;
-			cycle_adj = DIV_64BIT(cycle_adj, pmd_adj_divisor);
+			cycle_adj = DIV_U64(cycle_adj, pmd_adj_divisor);
 
 			adj += cycle_adj;
@@ -2158,7 +2158,7 @@ ice_calc_fixed_rx_offset_e822(struct ice_hw *hw, enum ice_ptp_link_spd link_spd)
 	 * divisions by 1e4 first then by 1e7.
 	 */
-	fixed_offset = DIV_64BIT(tu_per_sec, 10000);
+	fixed_offset = DIV_U64(tu_per_sec, 10000);
 	fixed_offset *= e822_vernier[link_spd].rx_fixed_delay;
-	fixed_offset = DIV_64BIT(fixed_offset, 10000000);
+	fixed_offset = DIV_U64(fixed_offset, 10000000);
 
 	return fixed_offset;
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index e697c579be..0841ec8c5b 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -3831,6 +3831,6 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
 
 	/* Get the wakeup integer value */
-	bytes_per_sec = DIV_64BIT(((s64)bw * 1000), BITS_PER_BYTE);
-	wakeup_int = DIV_64BIT(hw->psm_clk_freq, bytes_per_sec);
+	bytes_per_sec = DIV_S64((s64)bw * 1000, BITS_PER_BYTE);
+	wakeup_int = DIV_S64(hw->psm_clk_freq, bytes_per_sec);
 	if (wakeup_int > 63) {
 		wakeup = (u16)((1 << 15) | wakeup_int);
@@ -3840,6 +3840,6 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
 		 */
 		wakeup_b = (s64)ICE_RL_PROF_MULTIPLIER * wakeup_int;
-		wakeup_a = DIV_64BIT((s64)ICE_RL_PROF_MULTIPLIER *
-				     hw->psm_clk_freq, bytes_per_sec);
+		wakeup_a = DIV_S64((s64)ICE_RL_PROF_MULTIPLIER *
+				   hw->psm_clk_freq, bytes_per_sec);
 
 		/* Get Fraction value */
@@ -3847,9 +3847,9 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
 
 		/* Round up the Fractional value via Ceil(Fractional value) */
-		if (wakeup_f > DIV_64BIT(ICE_RL_PROF_MULTIPLIER, 2))
+		if (wakeup_f > DIV_S64(ICE_RL_PROF_MULTIPLIER, 2))
 			wakeup_f += 1;
 
-		wakeup_f_int = (s32)DIV_64BIT(wakeup_f * ICE_RL_PROF_FRACTION,
-					      ICE_RL_PROF_MULTIPLIER);
+		wakeup_f_int = (s32)DIV_S64(wakeup_f * ICE_RL_PROF_FRACTION,
+					    ICE_RL_PROF_MULTIPLIER);
 		wakeup |= (u16)(wakeup_int << 9);
 		wakeup |= (u16)(0x1ff & wakeup_f_int);
@@ -3883,5 +3883,5 @@ ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
 
 	/* Bytes per second from Kbps */
-	bytes_per_sec = DIV_64BIT(((s64)bw * 1000), BITS_PER_BYTE);
+	bytes_per_sec = DIV_S64((s64)bw * 1000, BITS_PER_BYTE);
 
 	/* encode is 6 bits but really useful are 5 bits */
@@ -3889,12 +3889,12 @@ ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
 		u64 pow_result = BIT_ULL(i);
 
-		ts_rate = DIV_64BIT((s64)hw->psm_clk_freq,
-				    pow_result * ICE_RL_PROF_TS_MULTIPLIER);
+		ts_rate = DIV_S64((s64)hw->psm_clk_freq,
+				  pow_result * ICE_RL_PROF_TS_MULTIPLIER);
 		if (ts_rate <= 0)
 			continue;
 
 		/* Multiplier value */
-		mv_tmp = DIV_64BIT(bytes_per_sec * ICE_RL_PROF_MULTIPLIER,
-				   ts_rate);
+		mv_tmp = DIV_S64(bytes_per_sec * ICE_RL_PROF_MULTIPLIER,
+				 ts_rate);
 
 		/* Round to the nearest ICE_RL_PROF_MULTIPLIER */
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index d81984633a..ad0d72ac15 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -88,9 +88,35 @@ static inline bool ice_is_tc_ena(ice_bitmap_t bitmap, u8 tc)
 }
 
-#define DIV_64BIT(n, d) ((n) / (d))
+/**
+ * DIV_S64 - Divide signed 64-bit value with signed 64-bit divisor
+ * @dividend: value to divide
+ * @divisor: value to divide by
+ *
+ * Use DIV_S64 for any 64-bit divide which operates on signed 64-bit dividends.
+ * Do not use this for unsigned 64-bit dividends as it will not produce
+ * correct results if the dividend is larger than S64_MAX.
+ */
+static inline s64 DIV_S64(s64 dividend, s64 divisor)
+{
+	return dividend / divisor;
+}
+
+/**
+ * DIV_U64 - Divide unsigned 64-bit value by unsigned 64-bit divisor
+ * @dividend: value to divide
+ * @divisor: value to divide by
+ *
+ * Use DIV_U64 for any 64-bit divide which operates on unsigned 64-bit
+ * dividends. Do not use this for signed 64-bit dividends as it will not
+ * handle negative values correctly.
+ */
+static inline u64 DIV_U64(u64 dividend, u64 divisor)
+{
+	return dividend / divisor;
+}
 
 static inline u64 round_up_64bit(u64 a, u32 b)
 {
-	return DIV_64BIT(((a) + (b) / 2), (b));
+	return DIV_U64(((a) + (b) / 2), (b));
 }
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.639925645 +0100
+++ 0049-net-ice-base-fix-division-during-E822-PTP-init.patch	2022-10-25 14:18:58.417798113 +0100
@@ -1 +1 @@
-From 4e1d404e03da1b73c69d8aedc77d810af2e5d6fb Mon Sep 17 00:00:00 2001
+From 14ed431e0817166809096e4004a29c3cbcf89b0f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e1d404e03da1b73c69d8aedc77d810af2e5d6fb ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -47 +48 @@
-index 632a3f5bae..76119364e4 100644
+index 7e797c9511..3a47f8cebe 100644
@@ -187 +188 @@
-index 1b060d3567..71b5677f43 100644
+index e697c579be..0841ec8c5b 100644
@@ -190 +191 @@
-@@ -3917,6 +3917,6 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
+@@ -3831,6 +3831,6 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
@@ -199 +200 @@
-@@ -3926,6 +3926,6 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
+@@ -3840,6 +3840,6 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
@@ -208 +209 @@
-@@ -3933,9 +3933,9 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
+@@ -3847,9 +3847,9 @@ static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
@@ -221 +222 @@
-@@ -3969,5 +3969,5 @@ ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
+@@ -3883,5 +3883,5 @@ ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
@@ -228 +229 @@
-@@ -3975,12 +3975,12 @@ ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
+@@ -3889,12 +3889,12 @@ ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
@@ -246 +247 @@
-index d4d0cab089..3da3de38af 100644
+index d81984633a..ad0d72ac15 100644


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

* patch 'net/ice/base: fix 100M speed capability' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (47 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix division during E822 PTP init' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix DSCP PFC TLV creation' " Kevin Traynor
                   ` (48 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Anirudh Venkataramanan, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From fdbf7b4da3884265ba03c1e9c0def37e13eaa46a Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:03 -0400
Subject: [PATCH] net/ice/base: fix 100M speed capability

[ upstream commit 8f81056e5ae7fd81b6b2ce4568423bec5df1bd7a ]

Couple of 10GBase-T devices don't support advertising 100M
speed. For these devices, ice_is_100m_speed_supported should
return false. Meanwhile add device that supports 100M speed.

Fixes: 486d29fda54c ("net/ice/base: add dedicate MAC type for E810")

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@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_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index ae55bebaa2..f2642853a4 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3023,10 +3023,8 @@ bool ice_is_100m_speed_supported(struct ice_hw *hw)
 {
 	switch (hw->device_id) {
-	case ICE_DEV_ID_E822C_10G_BASE_T:
 	case ICE_DEV_ID_E822C_SGMII:
-	case ICE_DEV_ID_E822L_10G_BASE_T:
 	case ICE_DEV_ID_E822L_SGMII:
-	case ICE_DEV_ID_E823L_10G_BASE_T:
 	case ICE_DEV_ID_E823L_1GBE:
+	case ICE_DEV_ID_E823C_SGMII:
 		return true;
 	default:
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.667050649 +0100
+++ 0050-net-ice-base-fix-100M-speed-capability.patch	2022-10-25 14:18:58.420798123 +0100
@@ -1 +1 @@
-From 8f81056e5ae7fd81b6b2ce4568423bec5df1bd7a Mon Sep 17 00:00:00 2001
+From fdbf7b4da3884265ba03c1e9c0def37e13eaa46a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f81056e5ae7fd81b6b2ce4568423bec5df1bd7a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index f9640d9403..e22600c46d 100644
+index ae55bebaa2..f2642853a4 100644
@@ -24 +25 @@
-@@ -3114,10 +3114,8 @@ bool ice_is_100m_speed_supported(struct ice_hw *hw)
+@@ -3023,10 +3023,8 @@ bool ice_is_100m_speed_supported(struct ice_hw *hw)


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

* patch 'net/ice/base: fix DSCP PFC TLV creation' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (48 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix 100M speed capability' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix media type of PHY 10G SFI C2C' " Kevin Traynor
                   ` (47 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Dave Ertman, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 0255526a1bb113101b3b7428adf54df2eb0972f9 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:05 -0400
Subject: [PATCH] net/ice/base: fix DSCP PFC TLV creation

[ upstream commit bc696378a9fd6ed00c8f35556e0b6e5bd171465c ]

When creating the TLV to send to the FW for configuring DSCP
mode PFC, the PFCENABLE field was being masked with a 4 bit
mask (0xF), but this is an 8 bit bitmask for enabled classes
for PFC.  This means that traffic classes 4-7 could not be
enabled for PFC.

Remove the mask completely, as it is not necessary, as we are
assigning 8bits to an 8 bit field.

Fixes: 8ea78b169603 ("net/ice/base: support L3 DSCP QoS")

Signed-off-by: Dave Ertman <david.m.ertman@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_dcb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c
index cb6c5ba182..3d630757f8 100644
--- a/drivers/net/ice/base/ice_dcb.c
+++ b/drivers/net/ice/base/ice_dcb.c
@@ -1377,5 +1377,5 @@ ice_add_dscp_pfc_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg)
 
 	buf[0] = dcbcfg->pfc.pfccap & 0xF;
-	buf[1] = dcbcfg->pfc.pfcena & 0xF;
+	buf[1] = dcbcfg->pfc.pfcena;
 }
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.690681133 +0100
+++ 0051-net-ice-base-fix-DSCP-PFC-TLV-creation.patch	2022-10-25 14:18:58.421798127 +0100
@@ -1 +1 @@
-From bc696378a9fd6ed00c8f35556e0b6e5bd171465c Mon Sep 17 00:00:00 2001
+From 0255526a1bb113101b3b7428adf54df2eb0972f9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc696378a9fd6ed00c8f35556e0b6e5bd171465c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/ice/base: fix media type of PHY 10G SFI C2C' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (49 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix DSCP PFC TLV creation' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix function descriptions for parser' " Kevin Traynor
                   ` (46 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Paul Greenwalt, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From d2c68e7c0948a5a78a82afdec869e120d438db1d Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:15 -0400
Subject: [PATCH] net/ice/base: fix media type of PHY 10G SFI C2C

[ upstream commit ef12579699a3b03bc1c66e05be0d1a73a6ae8ce9 ]

PHY type ICE_PHY_TYPE_LOW_10G_SFI_C2C is incorrectly mapped to media
type Fiber which results in ethtool reporting the wrong Supported
ports.

PHY type ICE_PHY_TYPE_LOW_10G_SFI_C2C should map to media type
Backplane.

Fixes: 453d087ccaff ("net/ice/base: add common functions")

Signed-off-by: Paul Greenwalt <paul.greenwalt@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_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index f2642853a4..fec51e3237 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -476,5 +476,4 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
 		case ICE_PHY_TYPE_LOW_10GBASE_SR:
 		case ICE_PHY_TYPE_LOW_10GBASE_LR:
-		case ICE_PHY_TYPE_LOW_10G_SFI_C2C:
 		case ICE_PHY_TYPE_LOW_25GBASE_SR:
 		case ICE_PHY_TYPE_LOW_25GBASE_LR:
@@ -533,4 +532,5 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
 		case ICE_PHY_TYPE_LOW_5GBASE_KR:
 		case ICE_PHY_TYPE_LOW_10GBASE_KR_CR1:
+		case ICE_PHY_TYPE_LOW_10G_SFI_C2C:
 		case ICE_PHY_TYPE_LOW_25GBASE_KR:
 		case ICE_PHY_TYPE_LOW_25GBASE_KR1:
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.711457985 +0100
+++ 0052-net-ice-base-fix-media-type-of-PHY-10G-SFI-C2C.patch	2022-10-25 14:18:58.422798130 +0100
@@ -1 +1 @@
-From ef12579699a3b03bc1c66e05be0d1a73a6ae8ce9 Mon Sep 17 00:00:00 2001
+From d2c68e7c0948a5a78a82afdec869e120d438db1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ef12579699a3b03bc1c66e05be0d1a73a6ae8ce9 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index cedce2dcf5..57602a31e1 100644
+index f2642853a4..fec51e3237 100644
@@ -27 +28 @@
-@@ -562,5 +562,4 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
+@@ -476,5 +476,4 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
@@ -33 +34 @@
-@@ -619,4 +618,5 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
+@@ -533,4 +532,5 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)


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

* patch 'net/ice/base: fix function descriptions for parser' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (50 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix media type of PHY 10G SFI C2C' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix endian format' " Kevin Traynor
                   ` (45 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Junfeng Guo, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 13824e6da2a94333bfa5cd591643822554b6696b Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:21 -0400
Subject: [PATCH] net/ice/base: fix function descriptions for parser

[ upstream commit 0486c968f63a4ad81fa285ddac894fdd7a04727d ]

Some function descriptions for parser are mismatched, thus fixed
with this patch.

Fixes: 7fe2d98070e0 ("net/ice/base: add parser create and destroy skeleton")
Fixes: 1792942b2df6 ("net/ice/base: init boost TCAM table for parser")
Fixes: f787952d13d2 ("net/ice/base: init flag redirect table for parser")
Fixes: b3e73a812f98 ("net/ice/base: init IMEM table for parser")
Fixes: 2f7a1864cc19 ("net/ice/base: init metainit table for parser")
Fixes: 90bbd7d9545f ("net/ice/base: init marker group table for parser")
Fixes: c55b1ba93f07 ("net/ice/base: init parse graph CAM table for parser")
Fixes: 7b61be517fd5 ("net/ice/base: init protocol group table for parser")
Fixes: 111871087cdf ("net/ice/base: init ptype marker TCAM table for parser")
Fixes: 0cbacf60dce7 ("net/ice/base: init XLT key builder for parser")

Signed-off-by: Junfeng Guo <junfeng.guo@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_bst_tcam.c  |  6 +++---
 drivers/net/ice/base/ice_flg_rd.c    |  4 ++--
 drivers/net/ice/base/ice_imem.c      |  4 ++--
 drivers/net/ice/base/ice_metainit.c  |  4 ++--
 drivers/net/ice/base/ice_mk_grp.c    |  4 ++--
 drivers/net/ice/base/ice_parser.c    |  7 ++++---
 drivers/net/ice/base/ice_pg_cam.c    | 12 ++++++------
 drivers/net/ice/base/ice_proto_grp.c |  4 ++--
 drivers/net/ice/base/ice_ptype_mk.c  |  4 ++--
 drivers/net/ice/base/ice_xlt_kb.c    | 10 +++++-----
 10 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/drivers/net/ice/base/ice_bst_tcam.c b/drivers/net/ice/base/ice_bst_tcam.c
index 306f62db2a..74a2de869e 100644
--- a/drivers/net/ice/base/ice_bst_tcam.c
+++ b/drivers/net/ice/base/ice_bst_tcam.c
@@ -54,5 +54,5 @@ static void _bst_alu_dump(struct ice_hw *hw, struct ice_alu *alu, int index)
 /**
  * ice_bst_tcam_dump - dump a boost tcam info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: boost tcam to dump
  */
@@ -206,5 +206,5 @@ static void _bst_parse_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_bst_tcam_table_get - create a boost tcam table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_bst_tcam_item *ice_bst_tcam_table_get(struct ice_hw *hw)
@@ -229,5 +229,5 @@ static void _parse_lbl_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_bst_lbl_table_get - create a boost label table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_lbl_item *ice_bst_lbl_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_flg_rd.c b/drivers/net/ice/base/ice_flg_rd.c
index 833986cac3..80d3b51ad6 100644
--- a/drivers/net/ice/base/ice_flg_rd.c
+++ b/drivers/net/ice/base/ice_flg_rd.c
@@ -10,5 +10,5 @@
 /**
  * ice_flg_rd_dump - dump a flag redirect item info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: flag redirect item to dump
  */
@@ -41,5 +41,5 @@ static void _flg_rd_parse_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_flg_rd_table_get - create a flag redirect table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_flg_rd_item *ice_flg_rd_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_imem.c b/drivers/net/ice/base/ice_imem.c
index 2136e0393b..9a76d21ce5 100644
--- a/drivers/net/ice/base/ice_imem.c
+++ b/drivers/net/ice/base/ice_imem.c
@@ -70,5 +70,5 @@ static void _imem_alu_dump(struct ice_hw *hw, struct ice_alu *alu, int index)
 /**
  * ice_imem_dump - dump an imem item info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: imem item to dump
  */
@@ -232,5 +232,5 @@ static void _imem_parse_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_imem_table_get - create an imem table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_imem_item *ice_imem_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_metainit.c b/drivers/net/ice/base/ice_metainit.c
index 3f9e5d6833..a899125b37 100644
--- a/drivers/net/ice/base/ice_metainit.c
+++ b/drivers/net/ice/base/ice_metainit.c
@@ -10,5 +10,5 @@
 /**
  * ice_metainit_dump - dump an metainit item info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: metainit item to dump
  */
@@ -131,5 +131,5 @@ static void _metainit_parse_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_metainit_table_get - create a metainit table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_metainit_item *ice_metainit_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_mk_grp.c b/drivers/net/ice/base/ice_mk_grp.c
index 4e9ab5c13a..814001c49e 100644
--- a/drivers/net/ice/base/ice_mk_grp.c
+++ b/drivers/net/ice/base/ice_mk_grp.c
@@ -11,5 +11,5 @@
 /**
  * ice_mk_grp_dump - dump an marker group item info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: marker group item to dump
  */
@@ -43,5 +43,5 @@ static void _mk_grp_parse_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_mk_grp_table_get - create a marker group table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_mk_grp_item *ice_mk_grp_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_parser.c b/drivers/net/ice/base/ice_parser.c
index 9b106baff0..4d490dda7b 100644
--- a/drivers/net/ice/base/ice_parser.c
+++ b/drivers/net/ice/base/ice_parser.c
@@ -107,5 +107,5 @@ void *ice_parser_sect_item_get(u32 sect_type, void *section,
  * @length: number of items in the table to create
  * @item_get: the function will be parsed to ice_pkg_enum_entry
- * @parser_item: the function to parse the item
+ * @parse_item: the function to parse the item
  * @no_offset: ignore header offset, calculate index from 0
  */
@@ -360,4 +360,5 @@ static void _bst_vm_set(struct ice_parser *psr, const char *prefix, bool on)
  * ice_parser_dvm_set - configure double vlan mode for parser
  * @psr: pointer to a parser instance
+ * @on: true to turn on; false to turn off
  */
 void ice_parser_dvm_set(struct ice_parser *psr, bool on)
@@ -479,6 +480,6 @@ static bool _nearest_proto_id(struct ice_parser_result *rslt, u16 offset,
  * @rslt: a instance of a parser result
  * @pkt_buf: packet data buffer
- * @pkt_msk: packet mask buffer
- * @pkt_len: packet length
+ * @msk_buf: packet mask buffer
+ * @buf_len: packet length
  * @blk: FXP pipeline stage
  * @prefix_match: match protocol stack exactly or only prefix
diff --git a/drivers/net/ice/base/ice_pg_cam.c b/drivers/net/ice/base/ice_pg_cam.c
index fe461ad849..73f7c34ffd 100644
--- a/drivers/net/ice/base/ice_pg_cam.c
+++ b/drivers/net/ice/base/ice_pg_cam.c
@@ -51,5 +51,5 @@ static void _pg_cam_action_dump(struct ice_hw *hw,
 /**
  * ice_pg_cam_dump - dump an parse graph cam info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: parse graph cam to dump
  */
@@ -63,5 +63,5 @@ void ice_pg_cam_dump(struct ice_hw *hw, struct ice_pg_cam_item *item)
 /**
  * ice_pg_nm_cam_dump - dump an parse graph no match cam info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: parse graph no match cam to dump
  */
@@ -244,5 +244,5 @@ static void _pg_nm_sp_cam_parse_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_pg_cam_table_get - create a parse graph cam table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_pg_cam_item *ice_pg_cam_table_get(struct ice_hw *hw)
@@ -258,5 +258,5 @@ struct ice_pg_cam_item *ice_pg_cam_table_get(struct ice_hw *hw)
 /**
  * ice_pg_sp_cam_table_get - create a parse graph spill cam table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_pg_cam_item *ice_pg_sp_cam_table_get(struct ice_hw *hw)
@@ -272,5 +272,5 @@ struct ice_pg_cam_item *ice_pg_sp_cam_table_get(struct ice_hw *hw)
 /**
  * ice_pg_nm_cam_table_get - create a parse graph no match cam table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_pg_nm_cam_item *ice_pg_nm_cam_table_get(struct ice_hw *hw)
@@ -286,5 +286,5 @@ struct ice_pg_nm_cam_item *ice_pg_nm_cam_table_get(struct ice_hw *hw)
 /**
  * ice_pg_nm_sp_cam_table_get - create a parse graph no match spill cam table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_pg_nm_cam_item *ice_pg_nm_sp_cam_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_proto_grp.c b/drivers/net/ice/base/ice_proto_grp.c
index 69d5d9a18a..b1d149b66a 100644
--- a/drivers/net/ice/base/ice_proto_grp.c
+++ b/drivers/net/ice/base/ice_proto_grp.c
@@ -19,5 +19,5 @@ static void _proto_off_dump(struct ice_hw *hw, struct ice_proto_off *po,
 /**
  * ice_proto_grp_dump - dump a proto group item info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: proto group item to dump
  */
@@ -96,5 +96,5 @@ static void _proto_grp_parse_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_proto_grp_table_get - create a proto group table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_proto_grp_item *ice_proto_grp_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_ptype_mk.c b/drivers/net/ice/base/ice_ptype_mk.c
index 97c41cb586..9807e688b1 100644
--- a/drivers/net/ice/base/ice_ptype_mk.c
+++ b/drivers/net/ice/base/ice_ptype_mk.c
@@ -10,5 +10,5 @@
 /**
  * ice_ptype_mk_tcam_dump - dump an ptype marker tcam info_
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @item: ptype marker tcam to dump
  */
@@ -42,5 +42,5 @@ static void _parse_ptype_mk_tcam_item(struct ice_hw *hw, u16 idx, void *item,
 /**
  * ice_ptype_mk_tcam_table_get - create a ptype marker tcam table
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_ptype_mk_tcam_item *ice_ptype_mk_tcam_table_get(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_xlt_kb.c b/drivers/net/ice/base/ice_xlt_kb.c
index 4c1ab747cf..5efe209cad 100644
--- a/drivers/net/ice/base/ice_xlt_kb.c
+++ b/drivers/net/ice/base/ice_xlt_kb.c
@@ -26,5 +26,5 @@ static void _xlt_kb_entry_dump(struct ice_hw *hw,
 /**
  * ice_imem_dump - dump a xlt key build info
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  * @kb: key build to dump
  */
@@ -155,5 +155,5 @@ static struct ice_xlt_kb *_xlt_kb_get(struct ice_hw *hw, u32 sect_type)
 /**
  * ice_xlt_kb_get_sw - create switch xlt key build
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_xlt_kb *ice_xlt_kb_get_sw(struct ice_hw *hw)
@@ -164,5 +164,5 @@ struct ice_xlt_kb *ice_xlt_kb_get_sw(struct ice_hw *hw)
 /**
  * ice_xlt_kb_get_acl - create acl xlt key build
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_xlt_kb *ice_xlt_kb_get_acl(struct ice_hw *hw)
@@ -173,5 +173,5 @@ struct ice_xlt_kb *ice_xlt_kb_get_acl(struct ice_hw *hw)
 /**
  * ice_xlt_kb_get_fd - create fdir xlt key build
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_xlt_kb *ice_xlt_kb_get_fd(struct ice_hw *hw)
@@ -182,5 +182,5 @@ struct ice_xlt_kb *ice_xlt_kb_get_fd(struct ice_hw *hw)
 /**
  * ice_xlt_kb_get_fd - create rss xlt key build
- * @ice_hw: pointer to the hardware structure
+ * @hw: pointer to the hardware structure
  */
 struct ice_xlt_kb *ice_xlt_kb_get_rss(struct ice_hw *hw)
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.734971336 +0100
+++ 0053-net-ice-base-fix-function-descriptions-for-parser.patch	2022-10-25 14:18:58.424798138 +0100
@@ -1 +1 @@
-From 0486c968f63a4ad81fa285ddac894fdd7a04727d Mon Sep 17 00:00:00 2001
+From 13824e6da2a94333bfa5cd591643822554b6696b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0486c968f63a4ad81fa285ddac894fdd7a04727d ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -135 +136 @@
-index 6529f5d635..5a461d83be 100644
+index 9b106baff0..4d490dda7b 100644
@@ -207 +208 @@
-index 7ce87de110..5dbe07d258 100644
+index 69d5d9a18a..b1d149b66a 100644
@@ -210 +211 @@
-@@ -18,5 +18,5 @@ static void _proto_off_dump(struct ice_hw *hw, struct ice_proto_off *po,
+@@ -19,5 +19,5 @@ static void _proto_off_dump(struct ice_hw *hw, struct ice_proto_off *po,
@@ -217 +218 @@
-@@ -95,5 +95,5 @@ static void _proto_grp_parse_item(struct ice_hw *hw, u16 idx, void *item,
+@@ -96,5 +96,5 @@ static void _proto_grp_parse_item(struct ice_hw *hw, u16 idx, void *item,


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

* patch 'net/ice/base: fix endian format' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (51 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix function descriptions for parser' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix array overflow in add switch recipe' " Kevin Traynor
                   ` (44 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jacob Keller, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 26b64ce3a27cb58eb0a9acd7db00182996d13056 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:22 -0400
Subject: [PATCH] net/ice/base: fix endian format

[ upstream commit 843a099aa29fe554bf5e5ff2295eac6615d055b5 ]

A few functions failed to properly convert some values into Little
Endian format before sending them to the firmware. This will produce
incorrect results when running on a Big Endian platform.

Fix this by adding the necessary CPU_TO_LE* macros around the input
to firmware.

These issues were detected by sparse.

Fixes: 0f61c2af88c8 ("net/ice/base: add set/get GPIO helper functions")

Signed-off-by: Jacob Keller <jacob.e.keller@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_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index fec51e3237..c6fc32fbc6 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3933,5 +3933,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw,
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_read_topo_dev_nvm);
 
-	desc.datalen = data_size;
+	desc.datalen = CPU_TO_LE16(data_size);
 	ice_memcpy(&cmd->topo_params, topo_params, sizeof(*topo_params),
 		   ICE_NONDMA_TO_NONDMA);
@@ -5587,5 +5587,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value,
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_gpio);
 	cmd = &desc.params.read_write_gpio;
-	cmd->gpio_ctrl_handle = gpio_ctrl_handle;
+	cmd->gpio_ctrl_handle = CPU_TO_LE16(gpio_ctrl_handle);
 	cmd->gpio_num = pin_idx;
 	cmd->gpio_val = value ? 1 : 0;
@@ -5615,5 +5615,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_gpio);
 	cmd = &desc.params.read_write_gpio;
-	cmd->gpio_ctrl_handle = gpio_ctrl_handle;
+	cmd->gpio_ctrl_handle = CPU_TO_LE16(gpio_ctrl_handle);
 	cmd->gpio_num = pin_idx;
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.757221114 +0100
+++ 0054-net-ice-base-fix-endian-format.patch	2022-10-25 14:18:58.427798148 +0100
@@ -1 +1 @@
-From 843a099aa29fe554bf5e5ff2295eac6615d055b5 Mon Sep 17 00:00:00 2001
+From 26b64ce3a27cb58eb0a9acd7db00182996d13056 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 843a099aa29fe554bf5e5ff2295eac6615d055b5 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 57602a31e1..cb06fdf42b 100644
+index fec51e3237..c6fc32fbc6 100644
@@ -29 +30 @@
-@@ -4029,5 +4029,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw,
+@@ -3933,5 +3933,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw,
@@ -36 +37 @@
-@@ -5683,5 +5683,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value,
+@@ -5587,5 +5587,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value,
@@ -43 +44 @@
-@@ -5711,5 +5711,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
+@@ -5615,5 +5615,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,


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

* patch 'net/ice/base: fix array overflow in add switch recipe' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (52 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix endian format' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix bit finding range over ptype bitmap' " Kevin Traynor
                   ` (43 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jesse Brandeburg, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From e075b36c5fe2a0442a144433d981cee49c0542b2 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:25 -0400
Subject: [PATCH] net/ice/base: fix array overflow in add switch recipe

[ upstream commit 289b2846c187aa061c13d6a499d0321f581390a5 ]

The array indexes in this function are used with a zero index in the
fv_idx table, and with a +1 index in the lkup_idx arrays. The code
was using the lookup index for the field vector in only one place in
this function, but the code was never used after this point so just
remove the bad line.

This was caught by the undefined behavior sanitizer.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@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 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index c0df3a1815..17d292c0db 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7322,5 +7322,4 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,
 		LIST_FOR_EACH_ENTRY(entry, &rm->rg_list, ice_recp_grp_entry,
 				    l_entry) {
-			last_chain_entry->fv_idx[i] = entry->chain_idx;
 			buf[recps].content.lkup_indx[i] = entry->chain_idx;
 			buf[recps].content.mask[i++] = CPU_TO_LE16(0xFFFF);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.780874703 +0100
+++ 0055-net-ice-base-fix-array-overflow-in-add-switch-recipe.patch	2022-10-25 14:18:58.433798170 +0100
@@ -1 +1 @@
-From 289b2846c187aa061c13d6a499d0321f581390a5 Mon Sep 17 00:00:00 2001
+From e075b36c5fe2a0442a144433d981cee49c0542b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 289b2846c187aa061c13d6a499d0321f581390a5 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index e59d191c46..b8e733f539 100644
+index c0df3a1815..17d292c0db 100644
@@ -28 +29 @@
-@@ -7316,5 +7316,4 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,
+@@ -7322,5 +7322,4 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,


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

* patch 'net/ice/base: fix bit finding range over ptype bitmap' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (53 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix array overflow in add switch recipe' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix add MAC rule' " Kevin Traynor
                   ` (42 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Junfeng Guo, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From f1ac3e709008a36b806ca04e83d95dbd70134632 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:26 -0400
Subject: [PATCH] net/ice/base: fix bit finding range over ptype bitmap

[ upstream commit ac549a3249172cbef3417cf53e6ff35f0ca1de65 ]

The 2nd argument to function ice_find_first_bit is the bitmap size,
(in bits) not a mask. Thus, use of UINT16_MAX or 0xFFFF will allow a
potential run off the end of the ptype array.
Also, the ptype bitmap (i.e., prof->ptypes) is declared with size
ICE_FLOW_PTYPE_MAX, thus finding the bits within this bitmap should
not exceed this bound.

Fixes: 8ebb93942b2c ("net/ice/base: add function to set HW profile for raw flow")

Signed-off-by: Junfeng Guo <junfeng.guo@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_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 0db474bd62..554e9bc8ef 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -2547,5 +2547,5 @@ ice_flow_set_hw_prof(struct ice_hw *hw, u16 dest_vsi_handle,
 		     enum ice_block blk)
 {
-	int id = ice_find_first_bit(prof->ptypes, UINT16_MAX);
+	int id = ice_find_first_bit(prof->ptypes, ICE_FLOW_PTYPE_MAX);
 	struct ice_flow_prof_params *params;
 	u8 fv_words = hw->blk[blk].es.fvw;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.806264467 +0100
+++ 0056-net-ice-base-fix-bit-finding-range-over-ptype-bitmap.patch	2022-10-25 14:18:58.436798181 +0100
@@ -1 +1 @@
-From ac549a3249172cbef3417cf53e6ff35f0ca1de65 Mon Sep 17 00:00:00 2001
+From f1ac3e709008a36b806ca04e83d95dbd70134632 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac549a3249172cbef3417cf53e6ff35f0ca1de65 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 54181044f1..b196e51276 100644
+index 0db474bd62..554e9bc8ef 100644
@@ -27 +28 @@
-@@ -2562,5 +2562,5 @@ ice_flow_set_hw_prof(struct ice_hw *hw, u16 dest_vsi_handle,
+@@ -2547,5 +2547,5 @@ ice_flow_set_hw_prof(struct ice_hw *hw, u16 dest_vsi_handle,


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

* patch 'net/ice/base: fix add MAC rule' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (54 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix bit finding range over ptype bitmap' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix double VLAN in promiscuous mode' " Kevin Traynor
                   ` (41 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Grzegorz Nitka, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From b1f7933ce6052c9b5538bfce0d017548349fba52 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:32 -0400
Subject: [PATCH] net/ice/base: fix add MAC rule

[ upstream commit 5dbc19cf438efceb7e7162fadbd7f462f1fed0ab ]

Fix ice_add_mac_rule function by not overriding action value
with vsi id. It's possible to add MAC based switch filters
with action other than FWD_TO_VSI.
In current implementation fwd_id member of filter config
structure was always overwritten with hw vsi index, regardless
of action type.
Fix it, by setting hw vsi index only for FWD_TO_VSI action
filter and leave it as it is in case of other actions.

Fixes: 3ee1b0159ee5 ("net/ice/base: support adding MAC rules on specific port")

Signed-off-by: Grzegorz Nitka <grzegorz.nitka@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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 17d292c0db..45421c0889 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4856,5 +4856,6 @@ ice_add_mac_rule(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list,
 			return ICE_ERR_PARAM;
 		hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
-		m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id;
+		if (m_list_itr->fltr_info.fltr_act == ICE_FWD_TO_VSI)
+			m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id;
 		/* update the src in case it is VSI num */
 		if (m_list_itr->fltr_info.src_id != ICE_SRC_ID_VSI)
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.828623890 +0100
+++ 0057-net-ice-base-fix-add-MAC-rule.patch	2022-10-25 14:18:58.443798206 +0100
@@ -1 +1 @@
-From 5dbc19cf438efceb7e7162fadbd7f462f1fed0ab Mon Sep 17 00:00:00 2001
+From b1f7933ce6052c9b5538bfce0d017548349fba52 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5dbc19cf438efceb7e7162fadbd7f462f1fed0ab ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 124b4fad1b..edcfa89bcb 100644
+index 17d292c0db..45421c0889 100644
@@ -29 +30 @@
-@@ -4859,5 +4859,6 @@ ice_add_mac_rule(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list,
+@@ -4856,5 +4856,6 @@ ice_add_mac_rule(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list,


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

* patch 'net/ice/base: fix double VLAN in promiscuous mode' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (55 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix add MAC rule' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: ignore promiscuous already exist' " Kevin Traynor
                   ` (40 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Grzegorz Siwik, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From da3be8cd7e0e66075cf57e472e069ee576dd433b Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:38 -0400
Subject: [PATCH] net/ice/base: fix double VLAN in promiscuous mode

[ upstream commit 40ff47dd4b7aa168de9a82774c88eff825210418 ]

Avoid enabling or disabling vlan 0 when trying to set promiscuous
vlan mode if double vlan mode is enabled. This fix is needed
because the driver tries to add the vlan 0 filter twice (once for
inner and once for outer) when double VLAN mode is enabled. The
filter program is rejected by the firmware when double vlan is
enabled, because the promiscuous filter only needs to be set once.

This issue was missed in the initial implementation of double vlan
mode.

Fixes: 60ff6f5ce2d8 ("net/ice/base: consolidate VF promiscuous mode")

Signed-off-by: Grzegorz Siwik <grzegorz.siwik@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 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 45421c0889..5a001222bc 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -6216,4 +6216,11 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
 	LIST_FOR_EACH_ENTRY(list_itr, &vsi_list_head, ice_fltr_list_entry,
 			    list_entry) {
+		/* Avoid enabling or disabling vlan zero twice when in double
+		 * vlan mode
+		 */
+		if (ice_is_dvm_ena(hw) &&
+		    list_itr->fltr_info.l_data.vlan.tpid == 0)
+			continue;
+
 		vlan_id = list_itr->fltr_info.l_data.vlan.vlan_id;
 		if (rm_vlan_promisc)
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.854541937 +0100
+++ 0058-net-ice-base-fix-double-VLAN-in-promiscuous-mode.patch	2022-10-25 14:18:58.450798231 +0100
@@ -1 +1 @@
-From 40ff47dd4b7aa168de9a82774c88eff825210418 Mon Sep 17 00:00:00 2001
+From da3be8cd7e0e66075cf57e472e069ee576dd433b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40ff47dd4b7aa168de9a82774c88eff825210418 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index a8f83f62ff..6a94e3fde9 100644
+index 45421c0889..5a001222bc 100644
@@ -30 +31 @@
-@@ -6264,4 +6264,11 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
+@@ -6216,4 +6216,11 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,


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

* patch 'net/ice/base: ignore promiscuous already exist' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (56 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix double VLAN in promiscuous mode' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/ice/base: fix input set of GTPoGRE' " Kevin Traynor
                   ` (39 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Grzegorz Siwik, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 65e2ff5b1e0a471b267fdf66f1ff28024df9ba1b Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:44 -0400
Subject: [PATCH] net/ice/base: ignore promiscuous already exist

[ upstream commit 68834871b24d60c89029a43e20be1187673d0529 ]

Ignore ERR_ALREADY_EXISTS error when setting promiscuous mode.
This fix is needed because the driver could set promiscuous mode
when it still has not cleared properly.
Promiscuous mode could be set only once, so setting it second
time will be rejected.

Fixes: 60ff6f5ce2d8 ("net/ice/base: consolidate VF promiscuous mode")

Signed-off-by: Grzegorz Siwik <grzegorz.siwik@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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 5a001222bc..c94d15934b 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -6232,5 +6232,5 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
 						       promisc_mask, vlan_id,
 						       lport, sw);
-		if (status)
+		if (status && status != ICE_ERR_ALREADY_EXISTS)
 			break;
 	}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.880140839 +0100
+++ 0059-net-ice-base-ignore-promiscuous-already-exist.patch	2022-10-25 14:18:58.456798252 +0100
@@ -1 +1 @@
-From 68834871b24d60c89029a43e20be1187673d0529 Mon Sep 17 00:00:00 2001
+From 65e2ff5b1e0a471b267fdf66f1ff28024df9ba1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68834871b24d60c89029a43e20be1187673d0529 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6863696d9d..91a959e10f 100644
+index 5a001222bc..c94d15934b 100644
@@ -26 +27 @@
-@@ -6281,5 +6281,5 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
+@@ -6232,5 +6232,5 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,


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

* patch 'net/ice/base: fix input set of GTPoGRE' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (57 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: ignore promiscuous already exist' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/iavf: fix processing VLAN TCI in SSE path' " Kevin Traynor
                   ` (38 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Kevin Liu, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From bf097fbecff2f284c80e5c8d1060e3f233f7d1a4 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Aug 2022 03:31:54 -0400
Subject: [PATCH] net/ice/base: fix input set of GTPoGRE

[ upstream commit b0472e210fcf5595ac2bf4e916d66fcdf5ce0b85 ]

For GTPoGRE, When setting the prot_id of prot, it should be
set to second inner.

Fixes: 34a0e7c44f2b ("net/ice/base: improve flow director masking")

Signed-off-by: Kevin Liu <kevinx.liu@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_flow.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 554e9bc8ef..da78a368ca 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -1393,5 +1393,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
 	case ICE_FLOW_FIELD_IDX_IPV4_PROT:
 		prot_id = seg == 0 ? ICE_PROT_IPV4_OF_OR_S : ICE_PROT_IPV4_IL;
-
+		if (params->prof->segs[0].hdrs & ICE_FLOW_SEG_HDR_GRE &&
+		    params->prof->segs[1].hdrs & ICE_FLOW_SEG_HDR_GTPU &&
+		    seg == 1)
+			prot_id = ICE_PROT_IPV4_IL_IL;
 		/* TTL and PROT share the same extraction seq. entry.
 		 * Each is considered a sibling to the other in terms of sharing
@@ -1412,5 +1415,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
 	case ICE_FLOW_FIELD_IDX_IPV6_PROT:
 		prot_id = seg == 0 ? ICE_PROT_IPV6_OF_OR_S : ICE_PROT_IPV6_IL;
-
+		if (params->prof->segs[0].hdrs & ICE_FLOW_SEG_HDR_GRE &&
+		    params->prof->segs[1].hdrs & ICE_FLOW_SEG_HDR_GTPU &&
+		    seg == 1)
+			prot_id = ICE_PROT_IPV6_IL_IL;
 		/* TTL and PROT share the same extraction seq. entry.
 		 * Each is considered a sibling to the other in terms of sharing
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.905577982 +0100
+++ 0060-net-ice-base-fix-input-set-of-GTPoGRE.patch	2022-10-25 14:18:58.460798267 +0100
@@ -1 +1 @@
-From b0472e210fcf5595ac2bf4e916d66fcdf5ce0b85 Mon Sep 17 00:00:00 2001
+From bf097fbecff2f284c80e5c8d1060e3f233f7d1a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0472e210fcf5595ac2bf4e916d66fcdf5ce0b85 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 182fac08a9..33e97ec333 100644
+index 554e9bc8ef..da78a368ca 100644
@@ -23 +24 @@
-@@ -1405,5 +1405,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
+@@ -1393,5 +1393,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
@@ -33,3 +34,3 @@
-@@ -1433,5 +1436,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
- 				  ICE_PROT_IPV6_NEXT_PROTO :
- 				  ICE_PROT_IPV6_IL;
+@@ -1412,5 +1415,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
+ 	case ICE_FLOW_FIELD_IDX_IPV6_PROT:
+ 		prot_id = seg == 0 ? ICE_PROT_IPV6_OF_OR_S : ICE_PROT_IPV6_IL;


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

* patch 'net/iavf: fix processing VLAN TCI in SSE path' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (58 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/ice/base: fix input set of GTPoGRE' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/iavf: fix outer checksum flags' " Kevin Traynor
                   ` (37 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 5f0b3890df9cfc9192aa83c8a33f7001a40fd0d9 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Tue, 13 Sep 2022 17:28:41 +0800
Subject: [PATCH] net/iavf: fix processing VLAN TCI in SSE path

[ upstream commit 1aaacea174ebce7fa28b9fa375442f1ae7de4a5e ]

The SSE RX path does not process the vlan tci correctly when it's stored
in L2TAG2, so the vlan tci could not be extracted from descriptor,
then would not be put into mbuf either.

Add processing when vlan tci is stored in L2TAG2.

Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_sse.c | 93 +++++++++++++++++++++++-----
 1 file changed, 78 insertions(+), 15 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 4b23ca8d82..15cef0d518 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -209,7 +209,13 @@ flex_rxd_to_fdir_flags_vec(const __m128i fdir_id0_3)
 }
 
+#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
+static inline void
+flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4], __m128i descs_bh[4],
+		       struct rte_mbuf **rx_pkts)
+#else
 static inline void
 flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4],
 		       struct rte_mbuf **rx_pkts)
+#endif
 {
 	const __m128i mbuf_init = _mm_set_epi64x(0, rxq->mbuf_initializer);
@@ -287,4 +293,37 @@ flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4],
 	flags = _mm_or_si128(flags, rss_vlan);
 
+#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
+	if (rxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) {
+		const __m128i l2tag2_mask =
+			_mm_set1_epi32(1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S);
+
+		const __m128i vlan_tci0_1 =
+			_mm_unpacklo_epi32(descs_bh[0], descs_bh[1]);
+		const __m128i vlan_tci2_3 =
+			_mm_unpacklo_epi32(descs_bh[2], descs_bh[3]);
+		const __m128i vlan_tci0_3 =
+			_mm_unpacklo_epi64(vlan_tci0_1, vlan_tci2_3);
+
+		__m128i vlan_bits = _mm_and_si128(vlan_tci0_3, l2tag2_mask);
+
+		vlan_bits = _mm_srli_epi32(vlan_bits,
+						IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S);
+
+		const __m128i vlan_flags_shuf =
+			_mm_set_epi8(0, 0, 0, 0,
+					0, 0, 0, 0,
+					0, 0, 0, 0,
+					0, 0,
+					RTE_MBUF_F_RX_VLAN |
+					RTE_MBUF_F_RX_VLAN_STRIPPED,
+					0);
+
+		const __m128i vlan_flags = _mm_shuffle_epi8(vlan_flags_shuf, vlan_bits);
+
+		/* merge with vlan_flags */
+		flags = _mm_or_si128(flags, vlan_flags);
+	}
+#endif
+
 	if (rxq->fdir_enabled) {
 		const __m128i fdir_id0_1 =
@@ -749,4 +788,7 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 	     rxdp += IAVF_VPMD_DESCS_PER_LOOP) {
 		__m128i descs[IAVF_VPMD_DESCS_PER_LOOP];
+#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
+		__m128i descs_bh[IAVF_VPMD_DESCS_PER_LOOP];
+#endif
 		__m128i pkt_mb0, pkt_mb1, pkt_mb2, pkt_mb3;
 		__m128i staterr, sterr_tmp1, sterr_tmp2;
@@ -807,6 +849,4 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 		sterr_tmp1 = _mm_unpackhi_epi32(descs[1], descs[0]);
 
-		flex_desc_to_olflags_v(rxq, descs, &rx_pkts[pos]);
-
 		/* D.2 pkt 3,4 set in_port/nb_seg and remove crc */
 		pkt_mb3 = _mm_add_epi16(pkt_mb3, crc_adjust);
@@ -822,22 +862,21 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 		 * will cause performance drop to get into this context.
 		 */
-		if (offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH) {
+		if (offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH ||
+			rxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) {
 			/* load bottom half of every 32B desc */
-			const __m128i raw_desc_bh3 =
-				_mm_load_si128
+			descs_bh[3] = _mm_load_si128
 					((void *)(&rxdp[3].wb.status_error1));
 			rte_compiler_barrier();
-			const __m128i raw_desc_bh2 =
-				_mm_load_si128
+			descs_bh[2] = _mm_load_si128
 					((void *)(&rxdp[2].wb.status_error1));
 			rte_compiler_barrier();
-			const __m128i raw_desc_bh1 =
-				_mm_load_si128
+			descs_bh[1] = _mm_load_si128
 					((void *)(&rxdp[1].wb.status_error1));
 			rte_compiler_barrier();
-			const __m128i raw_desc_bh0 =
-				_mm_load_si128
+			descs_bh[0] = _mm_load_si128
 					((void *)(&rxdp[0].wb.status_error1));
+		}
 
+		if (offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH) {
 			/**
 			 * to shift the 32b RSS hash value to the
@@ -845,11 +884,11 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 			 */
 			__m128i rss_hash3 =
-				_mm_slli_epi64(raw_desc_bh3, 32);
+				_mm_slli_epi64(descs_bh[3], 32);
 			__m128i rss_hash2 =
-				_mm_slli_epi64(raw_desc_bh2, 32);
+				_mm_slli_epi64(descs_bh[2], 32);
 			__m128i rss_hash1 =
-				_mm_slli_epi64(raw_desc_bh1, 32);
+				_mm_slli_epi64(descs_bh[1], 32);
 			__m128i rss_hash0 =
-				_mm_slli_epi64(raw_desc_bh0, 32);
+				_mm_slli_epi64(descs_bh[0], 32);
 
 			__m128i rss_hash_msk =
@@ -870,4 +909,28 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 			pkt_mb0 = _mm_or_si128(pkt_mb0, rss_hash0);
 		} /* if() on RSS hash parsing */
+
+		if (rxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) {
+			/* L2TAG2_2 */
+			__m128i vlan_tci3 = _mm_slli_si128(descs_bh[3], 4);
+			__m128i vlan_tci2 = _mm_slli_si128(descs_bh[2], 4);
+			__m128i vlan_tci1 = _mm_slli_si128(descs_bh[1], 4);
+			__m128i vlan_tci0 = _mm_slli_si128(descs_bh[0], 4);
+
+			const __m128i vlan_tci_msk = _mm_set_epi32(0, 0xFFFF0000, 0, 0);
+
+			vlan_tci3 = _mm_and_si128(vlan_tci3, vlan_tci_msk);
+			vlan_tci2 = _mm_and_si128(vlan_tci2, vlan_tci_msk);
+			vlan_tci1 = _mm_and_si128(vlan_tci1, vlan_tci_msk);
+			vlan_tci0 = _mm_and_si128(vlan_tci0, vlan_tci_msk);
+
+			pkt_mb3 = _mm_or_si128(pkt_mb3, vlan_tci3);
+			pkt_mb2 = _mm_or_si128(pkt_mb2, vlan_tci2);
+			pkt_mb1 = _mm_or_si128(pkt_mb1, vlan_tci1);
+			pkt_mb0 = _mm_or_si128(pkt_mb0, vlan_tci0);
+		}
+
+		flex_desc_to_olflags_v(rxq, descs, descs_bh, &rx_pkts[pos]);
+#else
+		flex_desc_to_olflags_v(rxq, descs, &rx_pkts[pos]);
 #endif
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.927938278 +0100
+++ 0061-net-iavf-fix-processing-VLAN-TCI-in-SSE-path.patch	2022-10-25 14:18:58.461798270 +0100
@@ -1 +1 @@
-From 1aaacea174ebce7fa28b9fa375442f1ae7de4a5e Mon Sep 17 00:00:00 2001
+From 5f0b3890df9cfc9192aa83c8a33f7001a40fd0d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1aaacea174ebce7fa28b9fa375442f1ae7de4a5e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 4a5232c1d2..17eed21f70 100644
+index 4b23ca8d82..15cef0d518 100644


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

* patch 'net/iavf: fix outer checksum flags' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (59 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/iavf: fix processing VLAN TCI in SSE path' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/virtio: fix crash when configured twice' " Kevin Traynor
                   ` (36 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Ke Xu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 5150a5b753f0360778d7b503673991968c1aec21 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Tue, 20 Sep 2022 16:37:10 +0800
Subject: [PATCH] net/iavf: fix outer checksum flags

[ upstream commit 3b8c645afa06fcdab8e6899f3c30b2e6f685e962 ]

When receiving tunneled packets, the testpmd output log shows 'ol_flags'
value always as 'RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN', but expected value
should be 'RX_OUTER_L4_CKSUM_GOOD' or 'RX_OUTER_L4_CKSUM_BAD'.

Adding 'RX_OUTER_L4_CKSUM_GOOD' and '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: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path")
Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes: 5b6e8859081d ("net/iavf: support flexible Rx descriptor in AVX path")
Fixes: 9c9aa0040344 ("net/iavf: add offload path for Rx AVX512 flex descriptor")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Ke Xu <ke1.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c            |   9 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 118 +++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 133 ++++++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_sse.c    |  77 ++++++++++----
 4 files changed, 252 insertions(+), 85 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index afe5981cac..7be759c791 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1266,5 +1266,7 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
 
 	if (likely(!(stat_err0 & IAVF_RX_FLEX_ERR0_BITS))) {
-		flags |= (RTE_MBUF_F_RX_IP_CKSUM_GOOD | RTE_MBUF_F_RX_L4_CKSUM_GOOD);
+		flags |= (RTE_MBUF_F_RX_IP_CKSUM_GOOD |
+			RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+			RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD);
 		return flags;
 	}
@@ -1283,4 +1285,9 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
 		flags |= RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD;
 
+	if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_EUDPE_S)))
+		flags |= RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD;
+	else
+		flags |= RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD;
+
 	return flags;
 }
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index b6ef1aea77..b915573780 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -623,41 +623,86 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,
 	 */
 	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 */
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-			 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-			 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-			 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-			 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			/* second 128-bits */
-			0, 0, 0, 0, 0, 0, 0, 0,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-			 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-			 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-			 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-			 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1);
+	const __m256i l3_l4_flags_shuf =
+		_mm256_set_epi8((RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+		 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		  RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD  |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD  |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_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
+		 */
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD  |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD  |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1);
 	const __m256i cksum_mask =
-		 _mm256_set1_epi32(RTE_MBUF_F_RX_IP_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD |
-				   RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-				   RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD);
+		 _mm256_set1_epi32(RTE_MBUF_F_RX_IP_CKSUM_MASK |
+				   RTE_MBUF_F_RX_L4_CKSUM_MASK |
+				   RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+				   RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK);
 	/**
 	 * data to be shuffled by result of flag mask, shifted down 12.
@@ -837,4 +882,13 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,
 				_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);
 
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index c975a5e7d7..b93e717946 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -970,5 +970,5 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 			 */
 			const __m256i flags_mask =
-				_mm256_set1_epi32((7 << 4) | (1 << 12) | (1 << 13));
+				 _mm256_set1_epi32((0xF << 4) | (1 << 12) | (1 << 13));
 #endif
 #ifdef IAVF_RX_CSUM_OFFLOAD
@@ -977,36 +977,96 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 			 * 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 */
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-					 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-					 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-					 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-					 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-					/* second 128-bits */
-					0, 0, 0, 0, 0, 0, 0, 0,
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-					 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-					 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-					 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-					 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-					(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1);
+			const __m256i l3_l4_flags_shuf =
+				_mm256_set_epi8((RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_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
+				 */
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+				 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+				(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 |
+				 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1);
 			const __m256i cksum_mask =
-				_mm256_set1_epi32(RTE_MBUF_F_RX_IP_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD |
-						  RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-						  RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD);
+				 _mm256_set1_epi32(RTE_MBUF_F_RX_IP_CKSUM_MASK |
+						   RTE_MBUF_F_RX_L4_CKSUM_MASK |
+						   RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+						   RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK);
 #endif
 #if defined(IAVF_RX_VLAN_OFFLOAD) || defined(IAVF_RX_RSS_OFFLOAD)
@@ -1058,4 +1118,13 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 					_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);
 #endif
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 15cef0d518..3f1d5e2ce8 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -229,18 +229,22 @@ flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4],
 	 * 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(RTE_MBUF_F_RX_IP_CKSUM_MASK |
 						 RTE_MBUF_F_RX_L4_CKSUM_MASK |
+						 RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK |
 						 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD,
 						 RTE_MBUF_F_RX_IP_CKSUM_MASK |
 						 RTE_MBUF_F_RX_L4_CKSUM_MASK |
+						 RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK |
 						 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD,
 						 RTE_MBUF_F_RX_IP_CKSUM_MASK |
 						 RTE_MBUF_F_RX_L4_CKSUM_MASK |
+						 RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK |
 						 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD,
 						 RTE_MBUF_F_RX_IP_CKSUM_MASK |
 						 RTE_MBUF_F_RX_L4_CKSUM_MASK |
+						 RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK |
 						 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD);
 
@@ -248,18 +252,44 @@ flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4],
 	 * 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 */
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-			 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
-			 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-			 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-			 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
-			(RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1);
+	const __m128i cksum_flags =
+		_mm_set_epi8((RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 |
+		 RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		  RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_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
+		 */
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_BAD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD |
+		 RTE_MBUF_F_RX_L4_CKSUM_GOOD | RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_BAD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_BAD) >> 1,
+		(RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD >> 20 | RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+		 RTE_MBUF_F_RX_IP_CKSUM_GOOD) >> 1);
+
 
 	const __m128i rss_vlan_flags = _mm_set_epi8(0, 0, 0, 0,
@@ -281,4 +311,11 @@ flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4],
 	/* 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 redundant bits introduced by RSS or
 	 * VLAN fields.
@@ -365,8 +402,8 @@ flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4],
 	 * 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 */
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.948877008 +0100
+++ 0062-net-iavf-fix-outer-checksum-flags.patch	2022-10-25 14:18:58.465798285 +0100
@@ -1 +1 @@
-From 3b8c645afa06fcdab8e6899f3c30b2e6f685e962 Mon Sep 17 00:00:00 2001
+From 5150a5b753f0360778d7b503673991968c1aec21 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b8c645afa06fcdab8e6899f3c30b2e6f685e962 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 3deabe1d7e..e1681024a6 100644
+index afe5981cac..7be759c791 100644
@@ -35 +36 @@
-@@ -1278,5 +1278,7 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
+@@ -1266,5 +1266,7 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
@@ -44 +45 @@
-@@ -1295,4 +1297,9 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
+@@ -1283,4 +1285,9 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
@@ -55 +56 @@
-index d6243b96e2..862f6eb0c0 100644
+index b6ef1aea77..b915573780 100644
@@ -192 +193 @@
-index 3bfec63851..b416a716cf 100644
+index c975a5e7d7..b93e717946 100644
@@ -345 +346 @@
-index 17eed21f70..3f30be01aa 100644
+index 15cef0d518..3f1d5e2ce8 100644


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

* patch 'net/virtio: fix crash when configured twice' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (60 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/iavf: fix outer checksum flags' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:06 ` patch 'net/mlx4: fix Verbs FD leak in secondary process' " Kevin Traynor
                   ` (35 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Alexander Chernavin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 21c7ed77f11c2e7e08a38dd3813a1bf7c7cb7071 Mon Sep 17 00:00:00 2001
From: Alexander Chernavin <achernavin@netgate.com>
Date: Tue, 27 Sep 2022 10:15:04 +0000
Subject: [PATCH] net/virtio: fix crash when configured twice

[ upstream commit 52bd03e969e9b38a7357287aece2488c7f92158f ]

When first attempt to configure a device with RX interrupt enabled fails
for some reason (e.g. because "Multiple intr vector not supported"),
second attempt to configure the device with RX interrupt disabled and
feature set unchanged will succeed but will leave virtio queues not
allocated. Accessing the queues will cause a segfault.

First attempt:
  - virtio_dev_configure()
    - virtio_init_device() is called to reinit the device because
      "dev->data->dev_conf.intr_conf.rxq" is "1"
      - virtio_configure_intr() fails and returns an error
      - virtio_free_queues() frees previously allocated virtio queues
    - virtio_init_device() fails and returns an error
  - virtio_dev_configure() fails and returns an error

Second attempt:
  - virtio_dev_configure()
    - This time virtio_init_device() is not called, virtio queues
      are not allocated

With this fix, reinit the device during configuration if virtio queues
are not allocated.

Fixes: 2b38151f745a ("net/virtio: fix queue memory leak on error")

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d180162abd..38bfe050b5 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2617,4 +2617,11 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 	}
 
+	/* if queues are not allocated, reinit the device */
+	if (hw->vqs == NULL) {
+		ret = virtio_init_device(dev, hw->req_guest_features);
+		if (ret < 0)
+			return ret;
+	}
+
 	if ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) &&
 			!virtio_with_feature(hw, VIRTIO_NET_F_RSS)) {
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.974370371 +0100
+++ 0063-net-virtio-fix-crash-when-configured-twice.patch	2022-10-25 14:18:58.467798292 +0100
@@ -1 +1 @@
-From 52bd03e969e9b38a7357287aece2488c7f92158f Mon Sep 17 00:00:00 2001
+From 21c7ed77f11c2e7e08a38dd3813a1bf7c7cb7071 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52bd03e969e9b38a7357287aece2488c7f92158f ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 7e07270a8b..574f671158 100644
+index d180162abd..38bfe050b5 100644
@@ -42 +43 @@
-@@ -2618,4 +2618,11 @@ virtio_dev_configure(struct rte_eth_dev *dev)
+@@ -2617,4 +2617,11 @@ virtio_dev_configure(struct rte_eth_dev *dev)


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

* patch 'net/mlx4: fix Verbs FD leak in secondary process' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (61 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/virtio: fix crash when configured twice' " Kevin Traynor
@ 2022-10-25 15:06 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/mlx5: " Kevin Traynor
                   ` (34 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:06 UTC (permalink / raw)
  To: Long Li; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 43ebf47ac3d079d39744f9e56fc91458ae8ac30f Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 6 Jul 2022 10:48:52 -0700
Subject: [PATCH] net/mlx4: fix Verbs FD leak in secondary process

[ upstream commit ff9c3548c05b356753a4f53bc945c625263c1ee9 ]

FDs passed from rte_mp_msg are duplicated to the secondary process and
need to be closed.

Fixes: 0203d33a10 ("net/mlx4: support secondary process")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4.c    | 9 ++++++---
 drivers/net/mlx4/mlx4_mp.c | 7 ++++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 3f3c4a7c72..2e0b4a17e2 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -878,4 +878,6 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 			 mlx4_glue->get_device_name(ibv_dev), port);
 		if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+			int fd;
+
 			eth_dev = rte_eth_dev_attach_secondary(name);
 			if (eth_dev == NULL) {
@@ -900,11 +902,12 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				goto err_secondary;
 			/* Receive command fd from primary process. */
-			err = mlx4_mp_req_verbs_cmd_fd(eth_dev);
-			if (err < 0) {
+			fd = mlx4_mp_req_verbs_cmd_fd(eth_dev);
+			if (fd < 0) {
 				err = rte_errno;
 				goto err_secondary;
 			}
 			/* Remap UAR for Tx queues. */
-			err = mlx4_tx_uar_init_secondary(eth_dev, err);
+			err = mlx4_tx_uar_init_secondary(eth_dev, fd);
+			close(fd);
 			if (err) {
 				err = rte_errno;
diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c
index 8fcfb5490e..b0bb48c8f1 100644
--- a/drivers/net/mlx4/mlx4_mp.c
+++ b/drivers/net/mlx4/mlx4_mp.c
@@ -6,4 +6,5 @@
 #include <stdio.h>
 #include <time.h>
+#include <unistd.h>
 
 #include <rte_eal.h>
@@ -135,8 +136,11 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 			mlx4_proc_priv_uninit(dev);
 			ret = mlx4_proc_priv_init(dev);
-			if (ret)
+			if (ret) {
+				close(mp_msg->fds[0]);
 				return -rte_errno;
+			}
 			ret = mlx4_tx_uar_init_secondary(dev, mp_msg->fds[0]);
 			if (ret) {
+				close(mp_msg->fds[0]);
 				mlx4_proc_priv_uninit(dev);
 				return -rte_errno;
@@ -144,4 +148,5 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 		}
 #endif
+		close(mp_msg->fds[0]);
 		rte_mb();
 		mp_init_msg(dev, &mp_res, param->type);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.996117818 +0100
+++ 0064-net-mlx4-fix-Verbs-FD-leak-in-secondary-process.patch	2022-10-25 14:18:58.469798299 +0100
@@ -1 +1 @@
-From ff9c3548c05b356753a4f53bc945c625263c1ee9 Mon Sep 17 00:00:00 2001
+From 43ebf47ac3d079d39744f9e56fc91458ae8ac30f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff9c3548c05b356753a4f53bc945c625263c1ee9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7e7e1824ef..a54016f4a2 100644
+index 3f3c4a7c72..2e0b4a17e2 100644
@@ -47 +48 @@
-index 3282afceda..534cb31151 100644
+index 8fcfb5490e..b0bb48c8f1 100644
@@ -50,2 +51,2 @@
-@@ -7,4 +7,5 @@
- #include <stdlib.h>
+@@ -6,4 +6,5 @@
+ #include <stdio.h>
@@ -56 +57 @@
-@@ -136,8 +137,11 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
+@@ -135,8 +136,11 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
@@ -69 +70 @@
-@@ -145,4 +149,5 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
+@@ -144,4 +148,5 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)


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

* patch 'net/mlx5: fix Verbs FD leak in secondary process' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (62 preceding siblings ...)
  2022-10-25 15:06 ` patch 'net/mlx4: fix Verbs FD leak in secondary process' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/mlx5: fix check for orphan wait descriptor' " Kevin Traynor
                   ` (33 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Long Li; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 879ebb7dcee5d4e8bc19c5e985cd005579ee604a Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 6 Jul 2022 10:48:53 -0700
Subject: [PATCH] net/mlx5: fix Verbs FD leak in secondary process

[ upstream commit bc5d8fdb7008210e2698fa1f91e51d7dfba00f77 ]

FDs passed from rte_mp_msg are duplicated to the secondary process and
need to be closed.

Fixes: 9a8ab29b84 ("net/mlx5: replace IPC socket with EAL API")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_mp_os.c | 6 +++++-
 drivers/net/mlx5/linux/mlx5_os.c    | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c
index c448a3e9eb..0ba2208fe0 100644
--- a/drivers/net/mlx5/linux/mlx5_mp_os.c
+++ b/drivers/net/mlx5/linux/mlx5_mp_os.c
@@ -178,12 +178,16 @@ struct rte_mp_msg mp_res;
 			mlx5_proc_priv_uninit(dev);
 			ret = mlx5_proc_priv_init(dev);
-			if (ret)
+			if (ret) {
+				close(mp_msg->fds[0]);
 				return -rte_errno;
+			}
 			ret = mlx5_tx_uar_init_secondary(dev, mp_msg->fds[0]);
 			if (ret) {
+				close(mp_msg->fds[0]);
 				mlx5_proc_priv_uninit(dev);
 				return -rte_errno;
 			}
 		}
+		close(mp_msg->fds[0]);
 		rte_mb();
 		mp_init_msg(&priv->mp_id, &mp_res, param->type);
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 792dd2cb22..27d6fe644d 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -934,4 +934,5 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		struct mlx5_mp_id mp_id;
+		int fd;
 
 		eth_dev = rte_eth_dev_attach_secondary(name);
@@ -950,9 +951,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		mlx5_mp_id_init(&mp_id, eth_dev->data->port_id);
 		/* Receive command fd from primary process */
-		err = mlx5_mp_req_verbs_cmd_fd(&mp_id);
-		if (err < 0)
+		fd = mlx5_mp_req_verbs_cmd_fd(&mp_id);
+		if (fd < 0)
 			goto err_secondary;
 		/* Remap UAR for Tx queues. */
-		err = mlx5_tx_uar_init_secondary(eth_dev, err);
+		err = mlx5_tx_uar_init_secondary(eth_dev, fd);
+		close(fd);
 		if (err)
 			goto err_secondary;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.017118199 +0100
+++ 0065-net-mlx5-fix-Verbs-FD-leak-in-secondary-process.patch	2022-10-25 14:18:58.471798306 +0100
@@ -1 +1 @@
-From bc5d8fdb7008210e2698fa1f91e51d7dfba00f77 Mon Sep 17 00:00:00 2001
+From 879ebb7dcee5d4e8bc19c5e985cd005579ee604a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc5d8fdb7008210e2698fa1f91e51d7dfba00f77 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e607089e0e..f2e71c9bd4 100644
+index c448a3e9eb..0ba2208fe0 100644
@@ -42 +43 @@
-index 4f0a6f4d55..6e5f01dda0 100644
+index 792dd2cb22..27d6fe644d 100644
@@ -45 +46 @@
-@@ -1081,4 +1081,5 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -934,4 +934,5 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
@@ -51 +52 @@
-@@ -1097,9 +1098,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -950,9 +951,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,


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

* patch 'net/mlx5: fix check for orphan wait descriptor' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (63 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/mlx5: " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/mlx5: fix single not inline packet storing' " Kevin Traynor
                   ` (32 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From b5e5d926b224bdda168d2d9fd2d8cce0e5dbcec0 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Thu, 11 Aug 2022 08:50:58 +0300
Subject: [PATCH] net/mlx5: fix check for orphan wait descriptor

[ upstream commit 37d6fc30c1ad03485ef707140b67623b95498d0d ]

The mlx5 PMD supports send scheduling feature, it allows
to send packets at specified moment of time, to do that
PMD pushes special wait descriptor (WQE) to the hardware
queue and then pushes descriptor for packet data as usual.
If queue is close to be full or there is no enough elts
buffers to store mbufs being sent the data descriptors might
be not pushed and the orphan wait WQE (not followed by the
data) might reside in queue on tx_burst routine exit.

To avoid orphan wait WQEs there was the check for enough
free space in the queue WQE buffer and enough amount of the
free elts in queue mbuf storage. This check was incomplete
and did not cover all the cases for Enhanced Multi-Packet
Write descriptors.

Fixes: 2f827f5ea6e1 ("net/mlx5: support scheduling on send routine template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_tx.h | 78 +++++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 35 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index 6ed00f722e..bd3a060963 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -1623,4 +1623,5 @@ static __rte_always_inline enum mlx5_txcmp_code
 mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq,
 		      struct mlx5_txq_local *restrict loc,
+		      uint16_t elts,
 		      unsigned int olx)
 {
@@ -1637,5 +1638,5 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq,
 		 */
 		if (loc->wqe_free <= MLX5_WQE_SIZE_MAX / MLX5_WQE_SIZE ||
-		    loc->elts_free < NB_SEGS(loc->mbuf))
+		    loc->elts_free < elts)
 			return MLX5_TXCMP_CODE_EXIT;
 		/* Convert the timestamp into completion to wait. */
@@ -1667,4 +1668,7 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq,
  * @param loc
  *   Pointer to burst routine local context.
+ * @param elts
+ *   Number of free elements in elts buffer to be checked, for zero
+ *   value the check is optimized out by compiler.
  * @param olx
  *   Configured Tx offloads mask. It is fully defined at
@@ -1684,9 +1688,10 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
 	unsigned int ds, dlen, inlen, ntcp, vlan = 0;
 
+	MLX5_ASSERT(loc->elts_free >= NB_SEGS(loc->mbuf));
 	if (MLX5_TXOFF_CONFIG(TXPP)) {
 		enum mlx5_txcmp_code wret;
 
 		/* Generate WAIT for scheduling if requested. */
-		wret = mlx5_tx_schedule_send(txq, loc, olx);
+		wret = mlx5_tx_schedule_send(txq, loc, 0, olx);
 		if (wret == MLX5_TXCMP_CODE_EXIT)
 			return MLX5_TXCMP_CODE_EXIT;
@@ -1782,9 +1787,10 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq,
 
 	MLX5_ASSERT(NB_SEGS(loc->mbuf) > 1);
+	MLX5_ASSERT(loc->elts_free >= NB_SEGS(loc->mbuf));
 	if (MLX5_TXOFF_CONFIG(TXPP)) {
 		enum mlx5_txcmp_code wret;
 
 		/* Generate WAIT for scheduling if requested. */
-		wret = mlx5_tx_schedule_send(txq, loc, olx);
+		wret = mlx5_tx_schedule_send(txq, loc, 0, olx);
 		if (wret == MLX5_TXCMP_CODE_EXIT)
 			return MLX5_TXCMP_CODE_EXIT;
@@ -1897,14 +1903,5 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
 	MLX5_ASSERT(MLX5_TXOFF_CONFIG(INLINE));
 	MLX5_ASSERT(NB_SEGS(loc->mbuf) > 1);
-	if (MLX5_TXOFF_CONFIG(TXPP)) {
-		enum mlx5_txcmp_code wret;
-
-		/* Generate WAIT for scheduling if requested. */
-		wret = mlx5_tx_schedule_send(txq, loc, olx);
-		if (wret == MLX5_TXCMP_CODE_EXIT)
-			return MLX5_TXCMP_CODE_EXIT;
-		if (wret == MLX5_TXCMP_CODE_ERROR)
-			return MLX5_TXCMP_CODE_ERROR;
-	}
+	MLX5_ASSERT(loc->elts_free >= NB_SEGS(loc->mbuf));
 	/*
 	 * First calculate data length to be inlined
@@ -2012,4 +2009,14 @@ do_align:
 	 */
 do_build:
+	if (MLX5_TXOFF_CONFIG(TXPP)) {
+		enum mlx5_txcmp_code wret;
+
+		/* Generate WAIT for scheduling if requested. */
+		wret = mlx5_tx_schedule_send(txq, loc, 0, olx);
+		if (wret == MLX5_TXCMP_CODE_EXIT)
+			return MLX5_TXCMP_CODE_EXIT;
+		if (wret == MLX5_TXCMP_CODE_ERROR)
+			return MLX5_TXCMP_CODE_ERROR;
+	}
 	MLX5_ASSERT(inlen <= txq->inlen_send);
 	ds = NB_SEGS(loc->mbuf) + 2 + (inlen -
@@ -2172,5 +2179,5 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *__rte_restrict txq,
 
 			/* Generate WAIT for scheduling if requested. */
-			wret = mlx5_tx_schedule_send(txq, loc, olx);
+			wret = mlx5_tx_schedule_send(txq, loc, 1, olx);
 			if (wret == MLX5_TXCMP_CODE_EXIT)
 				return MLX5_TXCMP_CODE_EXIT;
@@ -2550,14 +2557,4 @@ mlx5_tx_burst_empw_simple(struct mlx5_txq_data *__rte_restrict txq,
 next_empw:
 		MLX5_ASSERT(NB_SEGS(loc->mbuf) == 1);
-		if (MLX5_TXOFF_CONFIG(TXPP)) {
-			enum mlx5_txcmp_code wret;
-
-			/* Generate WAIT for scheduling if requested. */
-			wret = mlx5_tx_schedule_send(txq, loc, olx);
-			if (wret == MLX5_TXCMP_CODE_EXIT)
-				return MLX5_TXCMP_CODE_EXIT;
-			if (wret == MLX5_TXCMP_CODE_ERROR)
-				return MLX5_TXCMP_CODE_ERROR;
-		}
 		part = RTE_MIN(pkts_n, MLX5_TXOFF_CONFIG(MPW) ?
 				       MLX5_MPW_MAX_PACKETS :
@@ -2570,4 +2567,14 @@ next_empw:
 			part = loc->elts_free;
 		}
+		if (MLX5_TXOFF_CONFIG(TXPP)) {
+			enum mlx5_txcmp_code wret;
+
+			/* Generate WAIT for scheduling if requested. */
+			wret = mlx5_tx_schedule_send(txq, loc, 0, olx);
+			if (wret == MLX5_TXCMP_CODE_EXIT)
+				return MLX5_TXCMP_CODE_EXIT;
+			if (wret == MLX5_TXCMP_CODE_ERROR)
+				return MLX5_TXCMP_CODE_ERROR;
+		}
 		/* Check whether we have enough WQEs */
 		if (unlikely(loc->wqe_free < ((2 + part + 3) / 4))) {
@@ -2724,14 +2731,4 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq,
 
 		MLX5_ASSERT(NB_SEGS(loc->mbuf) == 1);
-		if (MLX5_TXOFF_CONFIG(TXPP)) {
-			enum mlx5_txcmp_code wret;
-
-			/* Generate WAIT for scheduling if requested. */
-			wret = mlx5_tx_schedule_send(txq, loc, olx);
-			if (wret == MLX5_TXCMP_CODE_EXIT)
-				return MLX5_TXCMP_CODE_EXIT;
-			if (wret == MLX5_TXCMP_CODE_ERROR)
-				return MLX5_TXCMP_CODE_ERROR;
-		}
 		/*
 		 * Limits the amount of packets in one WQE
@@ -2741,4 +2738,14 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq,
 				       MLX5_MPW_INLINE_MAX_PACKETS :
 				       MLX5_EMPW_MAX_PACKETS);
+		if (MLX5_TXOFF_CONFIG(TXPP)) {
+			enum mlx5_txcmp_code wret;
+
+			/* Generate WAIT for scheduling if requested. */
+			wret = mlx5_tx_schedule_send(txq, loc, nlim, olx);
+			if (wret == MLX5_TXCMP_CODE_EXIT)
+				return MLX5_TXCMP_CODE_EXIT;
+			if (wret == MLX5_TXCMP_CODE_ERROR)
+				return MLX5_TXCMP_CODE_ERROR;
+		}
 		/* Check whether we have minimal amount WQEs */
 		if (unlikely(loc->wqe_free <
@@ -3023,9 +3030,10 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq,
 
 		MLX5_ASSERT(NB_SEGS(loc->mbuf) == 1);
+		MLX5_ASSERT(loc->elts_free);
 		if (MLX5_TXOFF_CONFIG(TXPP)) {
 			enum mlx5_txcmp_code wret;
 
 			/* Generate WAIT for scheduling if requested. */
-			wret = mlx5_tx_schedule_send(txq, loc, olx);
+			wret = mlx5_tx_schedule_send(txq, loc, 0, olx);
 			if (wret == MLX5_TXCMP_CODE_EXIT)
 				return MLX5_TXCMP_CODE_EXIT;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.039429874 +0100
+++ 0066-net-mlx5-fix-check-for-orphan-wait-descriptor.patch	2022-10-25 14:18:58.473798313 +0100
@@ -1 +1 @@
-From 37d6fc30c1ad03485ef707140b67623b95498d0d Mon Sep 17 00:00:00 2001
+From b5e5d926b224bdda168d2d9fd2d8cce0e5dbcec0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 37d6fc30c1ad03485ef707140b67623b95498d0d ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 20776919c2..f081921ffc 100644
+index 6ed00f722e..bd3a060963 100644
@@ -33,9 +34 @@
-@@ -1643,4 +1643,7 @@ dseg_done:
-  * @param loc
-  *   Pointer to burst routine local context.
-+ * @param elts
-+ *   Number of free elements in elts buffer to be checked, for zero
-+ *   value the check is optimized out by compiler.
-  * @param olx
-  *   Configured Tx offloads mask. It is fully defined at
-@@ -1656,4 +1659,5 @@ static __rte_always_inline enum mlx5_txcmp_code
+@@ -1623,4 +1623,5 @@ static __rte_always_inline enum mlx5_txcmp_code
@@ -47 +40 @@
-@@ -1670,5 +1674,5 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq,
+@@ -1637,5 +1638,5 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq,
@@ -54 +47,9 @@
-@@ -1736,9 +1740,10 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
+@@ -1667,4 +1668,7 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq,
+  * @param loc
+  *   Pointer to burst routine local context.
++ * @param elts
++ *   Number of free elements in elts buffer to be checked, for zero
++ *   value the check is optimized out by compiler.
+  * @param olx
+  *   Configured Tx offloads mask. It is fully defined at
+@@ -1684,9 +1688,10 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
@@ -66 +67 @@
-@@ -1834,9 +1839,10 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq,
+@@ -1782,9 +1787,10 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq,
@@ -78 +79 @@
-@@ -1949,14 +1955,5 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
+@@ -1897,14 +1903,5 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
@@ -94 +95 @@
-@@ -2064,4 +2061,14 @@ do_align:
+@@ -2012,4 +2009,14 @@ do_align:
@@ -109 +110 @@
-@@ -2224,5 +2231,5 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *__rte_restrict txq,
+@@ -2172,5 +2179,5 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *__rte_restrict txq,
@@ -116 +117 @@
-@@ -2602,14 +2609,4 @@ mlx5_tx_burst_empw_simple(struct mlx5_txq_data *__rte_restrict txq,
+@@ -2550,14 +2557,4 @@ mlx5_tx_burst_empw_simple(struct mlx5_txq_data *__rte_restrict txq,
@@ -131 +132 @@
-@@ -2622,4 +2619,14 @@ next_empw:
+@@ -2570,4 +2567,14 @@ next_empw:
@@ -146 +147 @@
-@@ -2776,14 +2783,4 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq,
+@@ -2724,14 +2731,4 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq,
@@ -161 +162 @@
-@@ -2793,4 +2790,14 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq,
+@@ -2741,4 +2738,14 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq,
@@ -176 +177 @@
-@@ -3075,9 +3082,10 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq,
+@@ -3023,9 +3030,10 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq,


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

* patch 'net/mlx5: fix single not inline packet storing' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (64 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/mlx5: fix check for orphan wait descriptor' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/mlx5: fix inline length exceeding descriptor limit' " Kevin Traynor
                   ` (31 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 517c25053b125c88135b09040c2e264e2ecb58d9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 17 Aug 2022 10:04:25 +0300
Subject: [PATCH] net/mlx5: fix single not inline packet storing

[ upstream commit 166f185fefcd53d2d41499cadc5e1467e040d0cc ]

The mlx5 PMD can inline packet data into transmitting descriptor (WQE)
and free mbuf immediately as data no longer needed, for non-inline
packets the mbuf pointer should be stored in elts array for coming
freeing on send completion. There was an optimization on storing
pointers in batch and there was missed storing mbuf for single
packet if non-inline was explicitly requested by flag.

Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_tx.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index bd3a060963..7bebe8f9ab 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -3271,5 +3271,7 @@ single_no_inline:
 			 * by calling routine in a batch copy.
 			 */
-			MLX5_ASSERT(!MLX5_TXOFF_CONFIG(INLINE));
+			if (MLX5_TXOFF_CONFIG(INLINE))
+				txq->elts[txq->elts_head++ & txq->elts_m] =
+							loc->mbuf;
 			--loc->elts_free;
 #ifdef MLX5_PMD_SOFT_COUNTERS
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.062205650 +0100
+++ 0067-net-mlx5-fix-single-not-inline-packet-storing.patch	2022-10-25 14:18:58.476798324 +0100
@@ -1 +1 @@
-From 166f185fefcd53d2d41499cadc5e1467e040d0cc Mon Sep 17 00:00:00 2001
+From 517c25053b125c88135b09040c2e264e2ecb58d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 166f185fefcd53d2d41499cadc5e1467e040d0cc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index f081921ffc..8e113e3778 100644
+index bd3a060963..7bebe8f9ab 100644
@@ -25 +26 @@
-@@ -3323,5 +3323,7 @@ single_no_inline:
+@@ -3271,5 +3271,7 @@ single_no_inline:


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

* patch 'net/mlx5: fix inline length exceeding descriptor limit' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (65 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/mlx5: fix single not inline packet storing' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/mlx5: fix Tx check for hardware descriptor length' " Kevin Traynor
                   ` (30 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 6986b5af9cc02c5f1e2e9390ed1c7d44123bd30f Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 17 Aug 2022 17:13:57 +0300
Subject: [PATCH] net/mlx5: fix inline length exceeding descriptor limit

[ upstream commit d15bfd2930f343baf3f9e3a20b6d5f948f783394 ]

The hardware descriptor (WQE) length field is 6 bits wide
and we have the native limitation for the overall descriptor
length. To improve the PCIe bandwidth the packet data can be
inline into descriptor. If PMD was configured to inline large
amount of data it happened there was no enough space remaining
in the descriptor to specify all the packet data segments and
PMD rejected problematic packets.

The patch tries to adjust the inline data length conservatively
and allows to avoid error occurring.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Fixes: e2259f93ef45 ("net/mlx5: fix Tx when inlining is impossible")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
---
 drivers/net/mlx5/mlx5_tx.h | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index 7bebe8f9ab..ba37dc9b66 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -2027,6 +2027,22 @@ do_build:
 		return MLX5_TXCMP_CODE_EXIT;
 	/* Check for maximal WQE size. */
-	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds))
-		return MLX5_TXCMP_CODE_ERROR;
+	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) {
+		/*  Check if we can adjust the inline length. */
+		if (unlikely(txq->inlen_mode)) {
+			ds = NB_SEGS(loc->mbuf) + 2 +
+				(txq->inlen_mode -
+				MLX5_ESEG_MIN_INLINE_SIZE +
+				MLX5_WSEG_SIZE +
+				MLX5_WSEG_SIZE - 1) / MLX5_WSEG_SIZE;
+			if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds))
+				return MLX5_TXCMP_CODE_ERROR;
+		}
+		/* We have lucky opportunity to adjust. */
+		inlen = RTE_MIN(inlen, MLX5_WQE_SIZE_MAX -
+				       MLX5_WSEG_SIZE * 2 -
+				       MLX5_WSEG_SIZE * NB_SEGS(loc->mbuf) -
+				       MLX5_WSEG_SIZE +
+				       MLX5_ESEG_MIN_INLINE_SIZE);
+	}
 #ifdef MLX5_PMD_SOFT_COUNTERS
 	/* Update sent data bytes/packets counters. */
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.085737104 +0100
+++ 0068-net-mlx5-fix-inline-length-exceeding-descriptor-limi.patch	2022-10-25 14:18:58.478798331 +0100
@@ -1 +1 @@
-From d15bfd2930f343baf3f9e3a20b6d5f948f783394 Mon Sep 17 00:00:00 2001
+From 6986b5af9cc02c5f1e2e9390ed1c7d44123bd30f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d15bfd2930f343baf3f9e3a20b6d5f948f783394 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 8e113e3778..59ebe95032 100644
+index 7bebe8f9ab..ba37dc9b66 100644
@@ -31 +32 @@
-@@ -2079,6 +2079,22 @@ do_build:
+@@ -2027,6 +2027,22 @@ do_build:


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

* patch 'net/mlx5: fix Tx check for hardware descriptor length' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (66 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/mlx5: fix inline length exceeding descriptor limit' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/mlx5: fix modify action with tunnel decapsulation' " Kevin Traynor
                   ` (29 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From ccdfdbafa489c31223cdeca4fe160854bf85c0aa Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 17 Aug 2022 17:14:33 +0300
Subject: [PATCH] net/mlx5: fix Tx check for hardware descriptor length

[ upstream commit 130bb7da53ddb9677aa35dcfb2e6f9ddebc014b0 ]

If hardware descriptor (WQE) length exceeds one the HW can handle,
the Tx queue failure occurs. PMD does the length check but there was
a bug - the length limit was expressed in 16B units (WQEBB segments),
while the calculated WQE length and limit were in 64B units (WQEBBs).
Fix the condition to avoid subsequent Tx queue failure.

Fixes: 18a1c20 ("net/mlx5: implement Tx burst template")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_tx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index ba37dc9b66..13d6d434d7 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -1732,5 +1732,5 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
 		return MLX5_TXCMP_CODE_EXIT;
 	/* Check for maximal WQE size. */
-	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ((ds + 3) / 4)))
+	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds))
 		return MLX5_TXCMP_CODE_ERROR;
 #ifdef MLX5_PMD_SOFT_COUNTERS
@@ -1807,5 +1807,5 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq,
 		return MLX5_TXCMP_CODE_EXIT;
 	/* Check for maximal WQE size. */
-	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ((ds + 3) / 4)))
+	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds))
 		return MLX5_TXCMP_CODE_ERROR;
 	/*
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.108186804 +0100
+++ 0069-net-mlx5-fix-Tx-check-for-hardware-descriptor-length.patch	2022-10-25 14:18:58.481798342 +0100
@@ -1 +1 @@
-From 130bb7da53ddb9677aa35dcfb2e6f9ddebc014b0 Mon Sep 17 00:00:00 2001
+From ccdfdbafa489c31223cdeca4fe160854bf85c0aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 130bb7da53ddb9677aa35dcfb2e6f9ddebc014b0 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 59ebe95032..e0fc1872fe 100644
+index ba37dc9b66..13d6d434d7 100644
@@ -25 +26 @@
-@@ -1784,5 +1784,5 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
+@@ -1732,5 +1732,5 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
@@ -32 +33 @@
-@@ -1859,5 +1859,5 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq,
+@@ -1807,5 +1807,5 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq,


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

* patch 'net/mlx5: fix modify action with tunnel decapsulation' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (67 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/mlx5: fix Tx check for hardware descriptor length' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/mlx5: fix meter profile delete after disable' " Kevin Traynor
                   ` (28 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 9412d614c2759a971c72056a94451f7ce55ffcf6 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Thu, 1 Sep 2022 05:11:56 +0300
Subject: [PATCH] net/mlx5: fix modify action with tunnel decapsulation

[ upstream commit 9f71a297da6b9d4be18e624107b8e0017e890154 ]

The driver splits the flow with sample action into two sub-flows,
sub prefix flow and sub suffix flow.

In the case of tunnel flow including a decap action, the driver should
translate the inner as outer for actions coming after the decap action.
In the case of flow splitting, the packet layers, used to detect the
attributes, are inherited from the prefix flow to the suffix flow but
the driver wrongly didn't handle the decap adjustment and the inner
layers didn't shift to the outer.

This patch adjusts the inherited layers in case of decap.

Fixes: 6e77151286b2 ("net/mlx5: fix match information in meter")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 70031d3dc9..2a976d843b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -122,4 +122,11 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,
 	 */
 	if (layers) {
+		if (tunnel_decap) {
+			/*
+			 * If decap action before modify, it means the driver
+			 * should take the inner as outer for the modify actions.
+			 */
+			layers = ((layers >> 6) & MLX5_FLOW_LAYER_OUTER);
+		}
 		if (layers & MLX5_FLOW_LAYER_OUTER_L3_IPV4)
 			attr->ipv4 = 1;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.131091988 +0100
+++ 0070-net-mlx5-fix-modify-action-with-tunnel-decapsulation.patch	2022-10-25 14:18:58.493798385 +0100
@@ -1 +1 @@
-From 9f71a297da6b9d4be18e624107b8e0017e890154 Mon Sep 17 00:00:00 2001
+From 9412d614c2759a971c72056a94451f7ce55ffcf6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f71a297da6b9d4be18e624107b8e0017e890154 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 52f1361a14..535b620ed4 100644
+index 70031d3dc9..2a976d843b 100644


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

* patch 'net/mlx5: fix meter profile delete after disable' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (68 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/mlx5: fix modify action with tunnel decapsulation' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/iavf: check illegal packet sizes' " Kevin Traynor
                   ` (27 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Shun Hao; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 6a68e9ad38ca18d1a785ae671a26bd24487d7b12 Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Sun, 18 Sep 2022 03:58:02 +0300
Subject: [PATCH] net/mlx5: fix meter profile delete after disable

[ upstream commit 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 ]

If a meter's profile is changed after meter disabled, there's an issue
that will fail when deleting the old profile.

This patch fixes this by adding the correct process to decrease the old
profile's reference count when changing profile.

Fixes: 63ffeb2ff2 ("net/mlx5: support meter profile update")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_meter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index a58e30dc83..fd3f993892 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -1625,5 +1625,5 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
 	/* Update meter params in HW (if not disabled). */
 	if (fm->active_state == MLX5_FLOW_METER_DISABLE)
-		return 0;
+		goto dec_ref_cnt;
 	ret = mlx5_flow_meter_action_modify(priv, fm, &fm->profile->srtcm_prm,
 					      modify_bits, fm->active_state, 1);
@@ -1635,4 +1635,5 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
 					  " parameters in hardware.");
 	}
+dec_ref_cnt:
 	old_fmp->ref_cnt--;
 	fmp->ref_cnt++;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.162003845 +0100
+++ 0071-net-mlx5-fix-meter-profile-delete-after-disable.patch	2022-10-25 14:18:58.494798388 +0100
@@ -1 +1 @@
-From 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 Mon Sep 17 00:00:00 2001
+From 6a68e9ad38ca18d1a785ae671a26bd24487d7b12 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 7c0d84907a..d4aafe4eea 100644
+index a58e30dc83..fd3f993892 100644
@@ -25 +26 @@
-@@ -1657,5 +1657,5 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
+@@ -1625,5 +1625,5 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
@@ -32 +33 @@
-@@ -1667,4 +1667,5 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
+@@ -1635,4 +1635,5 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,


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

* patch 'net/iavf: check illegal packet sizes' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (69 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/mlx5: fix meter profile delete after disable' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/ice: " Kevin Traynor
                   ` (26 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Kevin Liu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 60f243aee8f548a1380d707687ae736719da24cb Mon Sep 17 00:00:00 2001
From: Kevin Liu <kevinx.liu@intel.com>
Date: Tue, 27 Sep 2022 07:15:21 +0000
Subject: [PATCH] net/iavf: check illegal packet sizes

[ upstream commit 19ee91c6bd9a196b17394d69b18576a7ff8e2489 ]

If the length of data_len in mbuf is less than 17 or
greater than the maximum frame size, it is illegal.

These illegal packets will lead to Tx/Rx hang and
can't recover automatically.

This patch check those illegal packets and protect
Tx/Rx from hanging.

Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 9 +++++++++
 drivers/net/iavf/iavf_rxtx.h | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 7be759c791..45d75d46f7 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2761,4 +2761,5 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 	struct iavf_tx_queue *txq = tx_queue;
 	struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id];
+	uint16_t max_frame_size = dev->data->mtu + IAVF_ETH_OVERHEAD;
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
@@ -2789,4 +2790,12 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 		}
 
+		/* check the data_len in mbuf */
+		if (m->data_len < IAVF_TX_MIN_PKT_LEN ||
+			m->data_len > max_frame_size) {
+			rte_errno = EINVAL;
+			PMD_DRV_LOG(ERR, "INVALID mbuf: bad data_len=[%hu]", m->data_len);
+			return i;
+		}
+
 #ifdef RTE_ETHDEV_DEBUG_TX
 		ret = rte_validate_tx_offload(m);
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 48cc0da6f5..743ff5e9d8 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -54,4 +54,6 @@
 #define IAVF_TX_MAX_MTU_SEG       8
 
+#define IAVF_TX_MIN_PKT_LEN 17
+
 #define IAVF_TX_CKSUM_OFFLOAD_MASK (		 \
 		RTE_MBUF_F_TX_IP_CKSUM |		 \
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.183433577 +0100
+++ 0072-net-iavf-check-illegal-packet-sizes.patch	2022-10-25 14:18:58.497798399 +0100
@@ -1 +1 @@
-From 19ee91c6bd9a196b17394d69b18576a7ff8e2489 Mon Sep 17 00:00:00 2001
+From 60f243aee8f548a1380d707687ae736719da24cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 19ee91c6bd9a196b17394d69b18576a7ff8e2489 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index fc5d9e38cc..89a1d141ba 100644
+index 7be759c791..45d75d46f7 100644
@@ -29 +30 @@
-@@ -2917,4 +2917,5 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2761,4 +2761,5 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -35 +36 @@
-@@ -2945,4 +2946,12 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2789,4 +2790,12 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -49 +50 @@
-index 66e832713c..3c89303980 100644
+index 48cc0da6f5..743ff5e9d8 100644
@@ -52 +53 @@
-@@ -56,4 +56,6 @@
+@@ -54,4 +54,6 @@


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

* patch 'net/ice: check illegal packet sizes' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (70 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/iavf: check illegal packet sizes' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/cnxk: fix DF bit in vector mode' " Kevin Traynor
                   ` (25 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Kevin Liu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From d141aba6a03f8b95c350fcf0d933d3f09b4895b5 Mon Sep 17 00:00:00 2001
From: Kevin Liu <kevinx.liu@intel.com>
Date: Tue, 27 Sep 2022 07:15:22 +0000
Subject: [PATCH] net/ice: check illegal packet sizes

[ upstream commit ccf33dccf7aaf208ef67ed7b8ef45d05bce5e3a5 ]

If the length of data_len in mbuf is less than 17 or
greater than the maximum frame size, it is illegal.

These illegal packets will lead to Tx/Rx hang and
can't recover automatically.

This patch check those illegal packets and protect
Tx/Rx from hanging.

Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 11 +++++++++++
 drivers/net/ice/ice_rxtx.h |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 71e5c6f5d6..e64fb00792 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -3460,4 +3460,7 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint64_t ol_flags;
 	struct rte_mbuf *m;
+	struct ice_tx_queue *txq = tx_queue;
+	struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id];
+	uint16_t max_frame_size = dev->data->mtu + ICE_ETH_OVERHEAD;
 
 	for (i = 0; i < nb_pkts; i++) {
@@ -3476,4 +3479,12 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 		}
 
+		/* check the data_len in mbuf */
+		if (m->data_len < ICE_TX_MIN_PKT_LEN ||
+			m->data_len > max_frame_size) {
+			rte_errno = EINVAL;
+			PMD_DRV_LOG(ERR, "INVALID mbuf: bad data_len=[%hu]", m->data_len);
+			return i;
+		}
+
 #ifdef RTE_ETHDEV_DEBUG_TX
 		ret = rte_validate_tx_offload(m);
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index f5337d5284..e86c8977e4 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -41,4 +41,6 @@
 #define ICE_RXDID_COMMS_OVS	22
 
+#define ICE_TX_MIN_PKT_LEN 17
+
 extern uint64_t ice_timestamp_dynflag;
 extern int ice_timestamp_dynfield_offset;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.205973126 +0100
+++ 0073-net-ice-check-illegal-packet-sizes.patch	2022-10-25 14:18:58.500798410 +0100
@@ -1 +1 @@
-From ccf33dccf7aaf208ef67ed7b8ef45d05bce5e3a5 Mon Sep 17 00:00:00 2001
+From d141aba6a03f8b95c350fcf0d933d3f09b4895b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ccf33dccf7aaf208ef67ed7b8ef45d05bce5e3a5 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 5af7c0c8f6..d1e1fadf9d 100644
+index 71e5c6f5d6..e64fb00792 100644
@@ -29 +30 @@
-@@ -3443,4 +3443,7 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -3460,4 +3460,7 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -37 +38 @@
-@@ -3459,4 +3462,12 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -3476,4 +3479,12 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -51 +52 @@
-index 6c08c175dc..e1d4fe8e47 100644
+index f5337d5284..e86c8977e4 100644


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

* patch 'net/cnxk: fix DF bit in vector mode' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (71 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/ice: " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/axgbe: reset end of packet in scattered Rx' " Kevin Traynor
                   ` (24 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Hanumanth Pothula; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 1747e299c284bb61fb6d8ce11290285240605e4b Mon Sep 17 00:00:00 2001
From: Hanumanth Pothula <hpothula@marvell.com>
Date: Thu, 1 Sep 2022 11:58:02 +0530
Subject: [PATCH] net/cnxk: fix DF bit in vector mode

[ upstream commit 8a96c7f8a5d7a394eafc94c28a6d30a98a855118 ]

In vector mode, DF bit is not programmed correctly, as the
return value of vsetq_lane_u64() is ignored, which actually
contains the updated value, leading HW to free mbufs though
NIX_TX_OFFLOAD_MBUF_NOFF_F flag is set.

Hence, save return value of vsetq_lane_u64() appropriately so
that DF bit is programmed correctly.

Fixes: 862e28128707 ("net/cnxk: add vector Tx for CN9K")
Fixes: f71b7dbbf04b ("net/cnxk: add vector Tx for CN10K")

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h | 8 ++++----
 drivers/net/cnxk/cn9k_tx.h  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 6704d2d655..a28c9a7e22 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -2351,5 +2351,5 @@ again:
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf0))
-				vsetq_lane_u64(0x80000, xmask01, 0);
+				xmask01 = vsetq_lane_u64(0x80000, xmask01, 0);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
@@ -2358,5 +2358,5 @@ again:
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf1))
-				vsetq_lane_u64(0x80000, xmask01, 1);
+				xmask01 = vsetq_lane_u64(0x80000, xmask01, 1);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
@@ -2365,5 +2365,5 @@ again:
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf2))
-				vsetq_lane_u64(0x80000, xmask23, 0);
+				xmask23 = vsetq_lane_u64(0x80000, xmask23, 0);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
@@ -2372,5 +2372,5 @@ again:
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf3))
-				vsetq_lane_u64(0x80000, xmask23, 1);
+				xmask23 = vsetq_lane_u64(0x80000, xmask23, 1);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 8167313a15..66a59ab533 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -1626,5 +1626,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf0))
-				vsetq_lane_u64(0x80000, xmask01, 0);
+				xmask01 = vsetq_lane_u64(0x80000, xmask01, 0);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
@@ -1633,5 +1633,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf1))
-				vsetq_lane_u64(0x80000, xmask01, 1);
+				xmask01 = vsetq_lane_u64(0x80000, xmask01, 1);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
@@ -1640,5 +1640,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf2))
-				vsetq_lane_u64(0x80000, xmask23, 0);
+				xmask23 = vsetq_lane_u64(0x80000, xmask23, 0);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
@@ -1647,5 +1647,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 			if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf3))
-				vsetq_lane_u64(0x80000, xmask23, 1);
+				xmask23 = vsetq_lane_u64(0x80000, xmask23, 1);
 			else
 				RTE_MEMPOOL_CHECK_COOKIES(
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.228250825 +0100
+++ 0074-net-cnxk-fix-DF-bit-in-vector-mode.patch	2022-10-25 14:18:58.503798421 +0100
@@ -1 +1 @@
-From 8a96c7f8a5d7a394eafc94c28a6d30a98a855118 Mon Sep 17 00:00:00 2001
+From 1747e299c284bb61fb6d8ce11290285240605e4b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a96c7f8a5d7a394eafc94c28a6d30a98a855118 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index b87fb29951..492942de15 100644
+index 6704d2d655..a28c9a7e22 100644
@@ -28 +29 @@
-@@ -2603,5 +2603,5 @@ again:
+@@ -2351,5 +2351,5 @@ again:
@@ -35 +36 @@
-@@ -2610,5 +2610,5 @@ again:
+@@ -2358,5 +2358,5 @@ again:
@@ -42 +43 @@
-@@ -2617,5 +2617,5 @@ again:
+@@ -2365,5 +2365,5 @@ again:
@@ -49 +50 @@
-@@ -2624,5 +2624,5 @@ again:
+@@ -2372,5 +2372,5 @@ again:
@@ -57 +58 @@
-index 6ce81f5c96..a609814dfb 100644
+index 8167313a15..66a59ab533 100644
@@ -60 +61 @@
-@@ -1706,5 +1706,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1626,5 +1626,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -67 +68 @@
-@@ -1713,5 +1713,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1633,5 +1633,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -74 +75 @@
-@@ -1720,5 +1720,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1640,5 +1640,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -81 +82 @@
-@@ -1727,5 +1727,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1647,5 +1647,5 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,


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

* patch 'net/axgbe: reset end of packet in scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (72 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/cnxk: fix DF bit in vector mode' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/axgbe: clear buffer on scattered Rx chaining failure' " Kevin Traynor
                   ` (23 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 18895ee575c74388c6cd54dfa476f6209f252bc7 Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Wed, 7 Sep 2022 23:31:07 -0400
Subject: [PATCH] net/axgbe: reset end of packet in scattered Rx

[ upstream commit 2a761aec228caf66025cacf07c7c9662ae021e03 ]

Reset the EOP in the failure scenario and also after the last segment.
Remove updating the packet length explicitly as it is done in chaining.

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 7bac482e92..d73f0ef49c 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -348,8 +348,9 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
 	uint16_t idx, pidx, data_len = 0, pkt_len = 0;
 	uint64_t offloads;
+	bool eop = 0;
 
 	idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur);
+
 	while (nb_rx < nb_pkts) {
-		bool eop = 0;
 next_desc:
 		idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur);
@@ -418,7 +419,10 @@ next_desc:
 
 		if (first_seg != NULL) {
-			if (rte_pktmbuf_chain(first_seg, mbuf) != 0)
+			if (rte_pktmbuf_chain(first_seg, mbuf) != 0) {
 				rte_mempool_put(rxq->mb_pool,
 						first_seg);
+				eop = 0;
+				break;
+			}
 		} else {
 			first_seg = mbuf;
@@ -462,6 +466,6 @@ err_set:
 		if (!eop)
 			goto next_desc;
+		eop = 0;
 
-		first_seg->pkt_len = pkt_len;
 		rxq->bytes += pkt_len;
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.251205288 +0100
+++ 0075-net-axgbe-reset-end-of-packet-in-scattered-Rx.patch	2022-10-25 14:18:58.504798424 +0100
@@ -1 +1 @@
-From 2a761aec228caf66025cacf07c7c9662ae021e03 Mon Sep 17 00:00:00 2001
+From 18895ee575c74388c6cd54dfa476f6209f252bc7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2a761aec228caf66025cacf07c7c9662ae021e03 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d4224992ee..4c16c59f37 100644
+index 7bac482e92..d73f0ef49c 100644
@@ -22 +23 @@
-@@ -347,8 +347,9 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
+@@ -348,8 +348,9 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
@@ -33 +34 @@
-@@ -417,7 +418,10 @@ next_desc:
+@@ -418,7 +419,10 @@ next_desc:
@@ -45 +46 @@
-@@ -461,6 +465,6 @@ err_set:
+@@ -462,6 +466,6 @@ err_set:


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

* patch 'net/axgbe: clear buffer on scattered Rx chaining failure' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (73 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/axgbe: reset end of packet in scattered Rx' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/axgbe: save segment data in scattered Rx' " Kevin Traynor
                   ` (22 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 9683271240f1b499ae6e94215d75a40cab7b2807 Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Wed, 7 Sep 2022 23:31:08 -0400
Subject: [PATCH] net/axgbe: clear buffer on scattered Rx chaining failure

[ upstream commit 30ff4d00d92dd4126efc8236299126e199e92461 ]

Clearing mbuf, first_seg when chaining mbufs fail.
Increment the error count for the same.

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index d73f0ef49c..968602bdff 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -420,6 +420,8 @@ next_desc:
 		if (first_seg != NULL) {
 			if (rte_pktmbuf_chain(first_seg, mbuf) != 0) {
-				rte_mempool_put(rxq->mb_pool,
-						first_seg);
+				rte_pktmbuf_free(first_seg);
+				first_seg = NULL;
+				rte_pktmbuf_free(mbuf);
+				rxq->errors++;
 				eop = 0;
 				break;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.271871746 +0100
+++ 0076-net-axgbe-clear-buffer-on-scattered-Rx-chaining-fail.patch	2022-10-25 14:18:58.504798424 +0100
@@ -1 +1 @@
-From 30ff4d00d92dd4126efc8236299126e199e92461 Mon Sep 17 00:00:00 2001
+From 9683271240f1b499ae6e94215d75a40cab7b2807 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 30ff4d00d92dd4126efc8236299126e199e92461 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4c16c59f37..f2136e30b0 100644
+index d73f0ef49c..968602bdff 100644
@@ -22 +23 @@
-@@ -419,6 +419,8 @@ next_desc:
+@@ -420,6 +420,8 @@ next_desc:


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

* patch 'net/axgbe: save segment data in scattered Rx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (74 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/axgbe: clear buffer on scattered Rx chaining failure' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'common/sfc_efx/base: fix maximum Tx data count' " Kevin Traynor
                   ` (21 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From fb442d0c0f2c81663ab7c61551fde83616b60ffa Mon Sep 17 00:00:00 2001
From: Bhagyada Modali <bhagyada.modali@amd.com>
Date: Wed, 7 Sep 2022 23:31:09 -0400
Subject: [PATCH] net/axgbe: save segment data in scattered Rx

[ upstream commit 91907ec24783fedb28c7ebd82b88942caf0863ca ]

Saving the current segments of the packet, when the next segment data is
not ready.

Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
---
 drivers/net/axgbe/axgbe_rxtx.c | 10 ++++++++++
 drivers/net/axgbe/axgbe_rxtx.h |  6 ++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 968602bdff..1de5b29f06 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -418,4 +418,9 @@ next_desc:
 		mbuf->pkt_len = data_len;
 
+		if (rxq->saved_mbuf) {
+			first_seg = rxq->saved_mbuf;
+			rxq->saved_mbuf = NULL;
+		}
+
 		if (first_seg != NULL) {
 			if (rte_pktmbuf_chain(first_seg, mbuf) != 0) {
@@ -423,4 +428,5 @@ next_desc:
 				first_seg = NULL;
 				rte_pktmbuf_free(mbuf);
+				rxq->saved_mbuf = NULL;
 				rxq->errors++;
 				eop = 0;
@@ -501,4 +507,8 @@ err_set:
 	}
 
+	/* Check if we need to save state before leaving */
+	if (first_seg != NULL && eop == 0)
+		rxq->saved_mbuf = first_seg;
+
 	/* Save receive context.*/
 	rxq->pkts += nb_rx;
diff --git a/drivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h
index 2a330339cd..2da3095547 100644
--- a/drivers/net/axgbe/axgbe_rxtx.h
+++ b/drivers/net/axgbe/axgbe_rxtx.h
@@ -66,4 +66,10 @@ struct axgbe_rx_queue {
 	/* address of  s/w rx buffers */
 	struct rte_mbuf **sw_ring;
+
+	/* For segemented packets - save the current state
+	 * of packet, if next descriptor is not ready yet
+	 */
+	struct rte_mbuf *saved_mbuf;
+
 	/* Port private data */
 	struct axgbe_port *pdata;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.292195656 +0100
+++ 0077-net-axgbe-save-segment-data-in-scattered-Rx.patch	2022-10-25 14:18:58.505798428 +0100
@@ -1 +1 @@
-From 91907ec24783fedb28c7ebd82b88942caf0863ca Mon Sep 17 00:00:00 2001
+From fb442d0c0f2c81663ab7c61551fde83616b60ffa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 91907ec24783fedb28c7ebd82b88942caf0863ca ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f2136e30b0..a1a463bc79 100644
+index 968602bdff..1de5b29f06 100644
@@ -23 +24 @@
-@@ -417,4 +417,9 @@ next_desc:
+@@ -418,4 +418,9 @@ next_desc:
@@ -33 +34 @@
-@@ -422,4 +427,5 @@ next_desc:
+@@ -423,4 +428,5 @@ next_desc:
@@ -39 +40 @@
-@@ -500,4 +506,8 @@ err_set:
+@@ -501,4 +507,8 @@ err_set:


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

* patch 'common/sfc_efx/base: fix maximum Tx data count' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (75 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/axgbe: save segment data in scattered Rx' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'event/cnxk: fix missing xstats operations' " Kevin Traynor
                   ` (20 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 67f330498055c933160e64e9ce6f4e946cb44857 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Fri, 12 Aug 2022 15:24:52 +0300
Subject: [PATCH] common/sfc_efx/base: fix maximum Tx data count

[ upstream commit 79b0c1926137690d680dec1b96b7a03279674fb9 ]

Maximum data count of a Tx descriptor is advertised to users,
however, this value is mistakenly derived from the Rx define.
Use the Tx one instead. The resulting value will be the same.

Fixes: 1e43fe3cb41e ("net/sfc/base: separate limitations on Tx DMA descriptors")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/ef10_nic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c
index 355d274470..4b0e4c10b4 100644
--- a/drivers/common/sfc_efx/base/ef10_nic.c
+++ b/drivers/common/sfc_efx/base/ef10_nic.c
@@ -2186,5 +2186,5 @@ ef10_nic_board_cfg(
 	encp->enc_rx_push_align = EF10_RX_WPTR_ALIGN;
 
-	encp->enc_tx_dma_desc_size_max = EFX_MASK32(ESF_DZ_RX_KER_BYTE_CNT);
+	encp->enc_tx_dma_desc_size_max = EFX_MASK32(ESF_DZ_TX_KER_BYTE_CNT);
 	/* No boundary crossing limits */
 	encp->enc_tx_dma_desc_boundary = 0;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.313081466 +0100
+++ 0078-common-sfc_efx-base-fix-maximum-Tx-data-count.patch	2022-10-25 14:18:58.507798435 +0100
@@ -1 +1 @@
-From 79b0c1926137690d680dec1b96b7a03279674fb9 Mon Sep 17 00:00:00 2001
+From 67f330498055c933160e64e9ce6f4e946cb44857 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79b0c1926137690d680dec1b96b7a03279674fb9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b27fc64210..7bda778f8b 100644
+index 355d274470..4b0e4c10b4 100644
@@ -23 +24 @@
-@@ -2234,5 +2234,5 @@ ef10_nic_board_cfg(
+@@ -2186,5 +2186,5 @@ ef10_nic_board_cfg(


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

* patch 'event/cnxk: fix missing xstats operations' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (76 preceding siblings ...)
  2022-10-25 15:07 ` patch 'common/sfc_efx/base: fix maximum Tx data count' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'cryptodev: fix unduly newlines in logs' " Kevin Traynor
                   ` (19 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 86727609c5f97ef03dd8d8cda169cd913c9da0c7 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Tue, 27 Sep 2022 21:01:51 +0530
Subject: [PATCH] event/cnxk: fix missing xstats operations

[ upstream commit edbb4c09c5e4db1cefa1a78f1f25d12305a3dd19 ]

Fix missing xstats ops registration when initializing event device.

Fixes: b5a52c9d97e2 ("event/cnxk: add event port and queue xstats")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cn10k_eventdev.c | 4 ++++
 drivers/event/cnxk/cn9k_eventdev.c  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index 4d878fc2b7..9e51fa2385 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -819,4 +819,8 @@ static struct eventdev_ops cn10k_sso_dev_ops = {
 	.crypto_adapter_queue_pair_del = cn10k_crypto_adapter_qp_del,
 
+	.xstats_get = cnxk_sso_xstats_get,
+	.xstats_reset = cnxk_sso_xstats_reset,
+	.xstats_get_names = cnxk_sso_xstats_get_names,
+
 	.dump = cnxk_sso_dump,
 	.dev_start = cn10k_sso_start,
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index d2ec4aedd7..73cf61670a 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -1067,4 +1067,8 @@ static struct eventdev_ops cn9k_sso_dev_ops = {
 	.crypto_adapter_queue_pair_del = cn9k_crypto_adapter_qp_del,
 
+	.xstats_get = cnxk_sso_xstats_get,
+	.xstats_reset = cnxk_sso_xstats_reset,
+	.xstats_get_names = cnxk_sso_xstats_get_names,
+
 	.dump = cnxk_sso_dump,
 	.dev_start = cn9k_sso_start,
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.334333189 +0100
+++ 0079-event-cnxk-fix-missing-xstats-operations.patch	2022-10-25 14:18:58.508798439 +0100
@@ -1 +1 @@
-From edbb4c09c5e4db1cefa1a78f1f25d12305a3dd19 Mon Sep 17 00:00:00 2001
+From 86727609c5f97ef03dd8d8cda169cd913c9da0c7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit edbb4c09c5e4db1cefa1a78f1f25d12305a3dd19 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 0586e47cab..bbaa6d0361 100644
+index 4d878fc2b7..9e51fa2385 100644
@@ -21 +22 @@
-@@ -1111,4 +1111,8 @@ static struct eventdev_ops cn10k_sso_dev_ops = {
+@@ -819,4 +819,8 @@ static struct eventdev_ops cn10k_sso_dev_ops = {
@@ -31 +32 @@
-index 29c952c791..764963db85 100644
+index d2ec4aedd7..73cf61670a 100644
@@ -34 +35 @@
-@@ -1200,4 +1200,8 @@ static struct eventdev_ops cn9k_sso_dev_ops = {
+@@ -1067,4 +1067,8 @@ static struct eventdev_ops cn9k_sso_dev_ops = {


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

* patch 'cryptodev: fix unduly newlines in logs' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (77 preceding siblings ...)
  2022-10-25 15:07 ` patch 'event/cnxk: fix missing xstats operations' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/bnxt: fix null pointer dereference in LED config' " Kevin Traynor
                   ` (18 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Olivier Matz; +Cc: David Marchand, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 6638450e4b8cb42f1deebf600c63e7c04373a33f Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 29 Sep 2022 14:05:01 +0200
Subject: [PATCH] cryptodev: fix unduly newlines in logs

[ upstream commit a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd ]

The CDEV_LOG_* macros already add a '\n' at the end of
the line. Remove it from format strings to avoid duplicated
newlines.

Fixes: 9e6edea4180 ("cryptodev: add APIs to assist PMD initialisation")
Fixes: e764cd72a9b ("cryptodev: update symmetric session structure")
Fixes: 1d6f89885e1 ("cryptodev: add sym session mempool create")
Fixes: 1f1e4b7cbaa ("cryptodev: use single mempool for asymmetric session")
Fixes: 757f40e28e1 ("cryptodev: modify return value for asym session create")
Fixes: cea66374dcb ("cryptodev: support asymmetric operations")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/cryptodev_pmd.c |  4 ++--
 lib/cryptodev/cryptodev_pmd.h |  2 +-
 lib/cryptodev/rte_cryptodev.c | 20 ++++++++++----------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 739a0b3f34..3b8ccdcede 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -97,9 +97,9 @@ rte_cryptodev_pmd_create(const char *name,
 
 	if (params->name[0] != '\0') {
-		CDEV_LOG_INFO("User specified device name = %s\n", params->name);
+		CDEV_LOG_INFO("User specified device name = %s", params->name);
 		name = params->name;
 	}
 
-	CDEV_LOG_INFO("Creating cryptodev %s\n", name);
+	CDEV_LOG_INFO("Creating cryptodev %s", name);
 
 	CDEV_LOG_INFO("Initialisation parameters - name: %s,"
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 56e659b474..bc71cada4a 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -624,5 +624,5 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 {
 	if (unlikely(sess->nb_drivers <= driver_id)) {
-		CDEV_LOG_ERR("Set private data for driver %u not allowed\n",
+		CDEV_LOG_ERR("Set private data for driver %u not allowed",
 				driver_id);
 		return;
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index e38d7b067a..bf75ce70ad 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1225,5 +1225,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 
 	if (!qp_conf) {
-		CDEV_LOG_ERR("qp_conf cannot be NULL\n");
+		CDEV_LOG_ERR("qp_conf cannot be NULL");
 		return -EINVAL;
 	}
@@ -1231,5 +1231,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 	if ((qp_conf->mp_session && !qp_conf->mp_session_private) ||
 			(!qp_conf->mp_session && qp_conf->mp_session_private)) {
-		CDEV_LOG_ERR("Invalid mempools\n");
+		CDEV_LOG_ERR("Invalid mempools");
 		return -EINVAL;
 	}
@@ -1244,5 +1244,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		if (!pool_priv || qp_conf->mp_session->private_data_size <
 				sizeof(*pool_priv)) {
-			CDEV_LOG_ERR("Invalid mempool\n");
+			CDEV_LOG_ERR("Invalid mempool");
 			return -EINVAL;
 		}
@@ -1255,5 +1255,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 			rte_cryptodev_sym_get_private_session_size(dev_id) >
 				obj_priv_size) {
-			CDEV_LOG_ERR("Invalid mempool\n");
+			CDEV_LOG_ERR("Invalid mempool");
 			return -EINVAL;
 		}
@@ -1813,5 +1813,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 	obj_sz = rte_cryptodev_sym_get_header_session_size() + user_data_size;
 	if (obj_sz > elt_size)
-		CDEV_LOG_INFO("elt_size %u is expanded to %u\n", elt_size,
+		CDEV_LOG_INFO("elt_size %u is expanded to %u", elt_size,
 				obj_sz);
 	else
@@ -1823,5 +1823,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 			socket_id, 0);
 	if (mp == NULL) {
-		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n",
+		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d",
 			__func__, name, rte_errno);
 		return NULL;
@@ -1830,5 +1830,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 	pool_priv = rte_mempool_get_priv(mp);
 	if (!pool_priv) {
-		CDEV_LOG_ERR("%s(name=%s) failed to get private data\n",
+		CDEV_LOG_ERR("%s(name=%s) failed to get private data",
 			__func__, name);
 		rte_mempool_free(mp);
@@ -1878,5 +1878,5 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 
 	if (!rte_cryptodev_sym_is_valid_session_pool(mp)) {
-		CDEV_LOG_ERR("Invalid mempool\n");
+		CDEV_LOG_ERR("Invalid mempool");
 		return NULL;
 	}
@@ -1912,5 +1912,5 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp)
 
 	if (!mp) {
-		CDEV_LOG_ERR("invalid mempool\n");
+		CDEV_LOG_ERR("invalid mempool");
 		return NULL;
 	}
@@ -2296,5 +2296,5 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
 		                    sizeof(struct rte_crypto_asym_op));
 	} else {
-		CDEV_LOG_ERR("Invalid op_type\n");
+		CDEV_LOG_ERR("Invalid op_type");
 		return NULL;
 	}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.355145274 +0100
+++ 0080-cryptodev-fix-unduly-newlines-in-logs.patch	2022-10-25 14:18:58.510798446 +0100
@@ -1 +1 @@
-From a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd Mon Sep 17 00:00:00 2001
+From 6638450e4b8cb42f1deebf600c63e7c04373a33f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +25,2 @@
- lib/cryptodev/rte_cryptodev.c | 26 +++++++++++++-------------
- 3 files changed, 16 insertions(+), 16 deletions(-)
+ lib/cryptodev/rte_cryptodev.c | 20 ++++++++++----------
+ 3 files changed, 13 insertions(+), 13 deletions(-)
@@ -28 +29 @@
-index d90b2570b1..77b269f312 100644
+index 739a0b3f34..3b8ccdcede 100644
@@ -31 +32 @@
-@@ -100,9 +100,9 @@ rte_cryptodev_pmd_create(const char *name,
+@@ -97,9 +97,9 @@ rte_cryptodev_pmd_create(const char *name,
@@ -44 +45 @@
-index 96d7e225b0..09ba952455 100644
+index 56e659b474..bc71cada4a 100644
@@ -47 +48 @@
-@@ -653,5 +653,5 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
+@@ -624,5 +624,5 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
@@ -55 +56 @@
-index 0b3c64df89..9e76a1c72d 100644
+index e38d7b067a..bf75ce70ad 100644
@@ -58 +59 @@
-@@ -1352,5 +1352,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1225,5 +1225,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -65 +66 @@
-@@ -1358,5 +1358,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1231,5 +1231,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -72 +73 @@
-@@ -1371,5 +1371,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1244,5 +1244,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -79 +80 @@
-@@ -1382,5 +1382,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1255,5 +1255,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -86 +87 @@
-@@ -1922,5 +1922,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1813,5 +1813,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -93,22 +94 @@
-@@ -1932,5 +1932,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
- 			socket_id, 0);
- 	if (mp == NULL) {
--		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n",
-+		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d",
- 			__func__, name, rte_errno);
- 		return NULL;
-@@ -1939,5 +1939,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
- 	pool_priv = rte_mempool_get_priv(mp);
- 	if (!pool_priv) {
--		CDEV_LOG_ERR("%s(name=%s) failed to get private data\n",
-+		CDEV_LOG_ERR("%s(name=%s) failed to get private data",
- 			__func__, name);
- 		rte_mempool_free(mp);
-@@ -1970,5 +1970,5 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
- 		}
- 	if (max_priv_sz == 0) {
--		CDEV_LOG_INFO("Could not set max private session size\n");
-+		CDEV_LOG_INFO("Could not set max private session size");
- 		return NULL;
- 	}
-@@ -1983,5 +1983,5 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1823,5 +1823,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -121 +101 @@
-@@ -1990,5 +1990,5 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1830,5 +1830,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -128 +108 @@
-@@ -2037,5 +2037,5 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
+@@ -1878,5 +1878,5 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
@@ -135 +115 @@
-@@ -2087,5 +2087,5 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
+@@ -1912,5 +1912,5 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp)
@@ -140 +120 @@
- 		return -EINVAL;
+ 		return NULL;
@@ -142 +122 @@
-@@ -2571,5 +2571,5 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
+@@ -2296,5 +2296,5 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,


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

* patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (78 preceding siblings ...)
  2022-10-25 15:07 ` patch 'cryptodev: fix unduly newlines in logs' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-11-17  9:05   ` 答复: " Mao,Yingming
  2022-10-25 15:07 ` patch 'net/bnxt: fix error code during MTU change' " Kevin Traynor
                   ` (17 subsequent siblings)
  97 siblings, 1 reply; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Mao YingMing; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001
From: Mao YingMing <maoyingming@baidu.com>
Date: Tue, 2 Aug 2022 12:08:17 +0800
Subject: [PATCH] net/bnxt: fix null pointer dereference in LED config

[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ]

For VFs, bp->leds is uninitialized, check bp->leds is
not null before checking for bp->leds->num_leds.

segfault backtrace in trex program when use VF:
11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true)
10: bnxt_dev_led_on_op (dev=0x22d7780 <rte_eth_devices>)
 9: rte_eth_led_on (port_id=0)
 8: DpdkTRexPortAttr::set_led (this=0x23b6ce0, on=true)
 7: DpdkTRexPortAttr::DpdkTRexPortAttr
 6: CTRexExtendedDriverBnxt::create_port_attr
 5: CPhyEthIF::Create
 4: CGlobalTRex::device_start
 3: CGlobalTRex::Create
 2: main_test
 1: main

Fixes: d4d5a04 ("net/bnxt: fix unnecessary memory allocation")

Signed-off-by: Mao YingMing <maoyingming@baidu.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 9c5257309a..51e1e2d6b3 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4536,5 +4536,5 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on)
 	int rc, i;
 
-	if (!bp->leds->num_leds || BNXT_VF(bp))
+	if (BNXT_VF(bp) || !bp->leds || !bp->leds->num_leds)
 		return -EOPNOTSUPP;
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.377396063 +0100
+++ 0081-net-bnxt-fix-null-pointer-dereference-in-LED-config.patch	2022-10-25 14:18:58.513798456 +0100
@@ -1 +1 @@
-From 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 Mon Sep 17 00:00:00 2001
+From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/bnxt: fix error code during MTU change' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (79 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/bnxt: fix null pointer dereference in LED config' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/bnxt: remove unnecessary check' " Kevin Traynor
                   ` (16 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Benjamin Le Berre; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From a12a1fcc0c38e8694d1abe3252c2e8b83605fec9 Mon Sep 17 00:00:00 2001
From: Benjamin Le Berre <benjamin.le_berre@6wind.com>
Date: Thu, 15 Sep 2022 13:29:06 +0200
Subject: [PATCH] net/bnxt: fix error code during MTU change

[ upstream commit 09b5b2880d58d256eb23cf5bb19cc9923e78b8e1 ]

When the BNXT PMD was made to disallow MTU changes on active ports, the
error code chosen for the case in bnxt_set_mtu_op() was -EPERM.

The doc comment for rte_eth_dev_set_mtu() in lib/ethdev/rte_ethdev.h
lists -EBUSY as the value to be used if the port must be stopped before
applying an MTU change and does not list -EPERM as a possible return
value.

This patch makes bnxt_set_mtu_op() return -EBUSY instead of -EPERM so
that rte_eth_dev_set_mtu() behaves as expected.

Fixes: a42ab1eb33ff ("net/bnxt: disallow MTU change when device is started")

Signed-off-by: Benjamin Le Berre <benjamin.le_berre@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 517e4b3898..5c9a260db5 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3032,5 +3032,5 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	if (eth_dev->data->dev_started) {
 		PMD_DRV_LOG(ERR, "Stop port before changing MTU\n");
-		return -EPERM;
+		return -EBUSY;
 	}
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.401026048 +0100
+++ 0082-net-bnxt-fix-error-code-during-MTU-change.patch	2022-10-25 14:18:58.517798471 +0100
@@ -1 +1 @@
-From 09b5b2880d58d256eb23cf5bb19cc9923e78b8e1 Mon Sep 17 00:00:00 2001
+From a12a1fcc0c38e8694d1abe3252c2e8b83605fec9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 09b5b2880d58d256eb23cf5bb19cc9923e78b8e1 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 1460dce2ab..c4d863e3fe 100644
+index 517e4b3898..5c9a260db5 100644
@@ -30 +31 @@
-@@ -3031,5 +3031,5 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
+@@ -3032,5 +3032,5 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)


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

* patch 'net/bnxt: remove unnecessary check' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (80 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/bnxt: fix error code during MTU change' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/bnxt: fix representor info freeing' " Kevin Traynor
                   ` (15 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 50e07634fe4052d34629df128d840da95b517e06 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 27 Sep 2022 21:29:01 +0530
Subject: [PATCH] net/bnxt: remove unnecessary check

[ upstream commit aaa44cb125ba43e543955831b6eba19c41c4fa87 ]

We are not invoking rte_eth_switch_domain_free currently owing to
an unnecessary check. This patch fixes that.

Fixes: e2895305a5b5 ("net/bnxt: fix resource cleanup")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 5c9a260db5..4da4030fce 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5978,6 +5978,5 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 
 	bnxt_free_flow_stats_info(bp);
-	if (bp->rep_info != NULL)
-		bnxt_free_switch_domain(bp);
+	bnxt_free_switch_domain(bp);
 	bnxt_free_rep_info(bp);
 	rte_free(bp->ptp_cfg);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.423856839 +0100
+++ 0083-net-bnxt-remove-unnecessary-check.patch	2022-10-25 14:18:58.520798481 +0100
@@ -1 +1 @@
-From aaa44cb125ba43e543955831b6eba19c41c4fa87 Mon Sep 17 00:00:00 2001
+From 50e07634fe4052d34629df128d840da95b517e06 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aaa44cb125ba43e543955831b6eba19c41c4fa87 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c4d863e3fe..2b5279f32c 100644
+index 5c9a260db5..4da4030fce 100644


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

* patch 'net/bnxt: fix representor info freeing' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (81 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/bnxt: remove unnecessary check' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/bnxt: fix build with GCC 13' " Kevin Traynor
                   ` (14 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From b673b37b9aaf889c05ed462d0890027023f576c6 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 27 Sep 2022 21:29:02 +0530
Subject: [PATCH] net/bnxt: fix representor info freeing

[ upstream commit 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 ]

Driver allocates "bp->rep_info" inside bnxt_init_rep_info() which is
invoked from bnxt_rep_port_probe(). But the memory is freed inside
bnxt_uninit_resources(), which is wrong. As a result, after error
recovery bp->rep_info will be NULL. The memory should have freed inside
bnxt_drv_uninit() to maintain symmetry of calls.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4da4030fce..f72740752a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1656,4 +1656,5 @@ static void bnxt_drv_uninit(struct bnxt *bp)
 	bnxt_free_parent_info(bp);
 	bnxt_uninit_locks(bp);
+	bnxt_free_rep_info(bp);
 
 	rte_memzone_free((const struct rte_memzone *)bp->tx_mem_zone);
@@ -5979,5 +5980,4 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 	bnxt_free_flow_stats_info(bp);
 	bnxt_free_switch_domain(bp);
-	bnxt_free_rep_info(bp);
 	rte_free(bp->ptp_cfg);
 	bp->ptp_cfg = NULL;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.446242626 +0100
+++ 0084-net-bnxt-fix-representor-info-freeing.patch	2022-10-25 14:18:58.524798496 +0100
@@ -1 +1 @@
-From 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 Mon Sep 17 00:00:00 2001
+From b673b37b9aaf889c05ed462d0890027023f576c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 2b5279f32c..3dfe9efc09 100644
+index 4da4030fce..f72740752a 100644
@@ -26 +27 @@
-@@ -1655,4 +1655,5 @@ static void bnxt_drv_uninit(struct bnxt *bp)
+@@ -1656,4 +1656,5 @@ static void bnxt_drv_uninit(struct bnxt *bp)


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

* patch 'net/bnxt: fix build with GCC 13' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (82 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/bnxt: fix representor info freeing' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'mem: fix API doc about allocation on secondary processes' " Kevin Traynor
                   ` (13 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: David Marchand; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 1b93855eb5a34513ed76e58a92e0443ec58962c6 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 3 Oct 2022 18:57:44 +0200
Subject: [PATCH] net/bnxt: fix build with GCC 13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit bb7e1f17a6f3419725d11184e68749298205a8dc ]

GCC 13 complains with:

../../../dpdk/drivers/net/bnxt/tf_ulp/ulp_flow_db.c:962:1:
    error: conflicting types for ‘ulp_flow_db_flush_flows’ due to
    enum/integer mismatch; have ‘int32_t(struct bnxt_ulp_context *,
    enum bnxt_ulp_fdb_type)’ {aka ‘int(struct bnxt_ulp_context *,
    enum bnxt_ulp_fdb_type)’} [-Werror=enum-int-mismatch]
  962 | ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from
../../../dpdk/drivers/net/bnxt/tf_ulp/ulp_flow_db.c:12:
../../../dpdk/drivers/net/bnxt/tf_ulp/ulp_flow_db.h:211:1: note:
    previous declaration of ‘ulp_flow_db_flush_flows’ with type
    ‘int32_t(struct bnxt_ulp_context *, uint32_t)’ {aka ‘int(struct
    bnxt_ulp_context *, unsigned int)’}
  211 | ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
      | ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fixes: 30683082a8ed ("net/bnxt: combine default and regular flows")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
index b27678dae9..2b02836a40 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
@@ -204,5 +204,5 @@ ulp_flow_db_resource_get(struct bnxt_ulp_context *ulp_ctxt,
  *
  * ulp_ctxt [in] Ptr to ulp context
- * tbl_idx [in] The index to table
+ * flow_type [in] - specify default or regular
  *
  * returns 0 on success or negative number on failure
@@ -210,5 +210,5 @@ ulp_flow_db_resource_get(struct bnxt_ulp_context *ulp_ctxt,
 int32_t
 ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
-			uint32_t idx);
+			enum bnxt_ulp_fdb_type flow_type);
 
 /*
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.469340901 +0100
+++ 0085-net-bnxt-fix-build-with-GCC-13.patch	2022-10-25 14:18:58.524798496 +0100
@@ -1 +1 @@
-From bb7e1f17a6f3419725d11184e68749298205a8dc Mon Sep 17 00:00:00 2001
+From 1b93855eb5a34513ed76e58a92e0443ec58962c6 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit bb7e1f17a6f3419725d11184e68749298205a8dc ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org


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

* patch 'mem: fix API doc about allocation on secondary processes' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (83 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/bnxt: fix build with GCC 13' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'examples/vm_power_manager: use safe list iterator' " Kevin Traynor
                   ` (12 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From e3b8a0894a03510565f2bb32e3f435248d48764d Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 29 Sep 2022 14:23:11 +0200
Subject: [PATCH] mem: fix API doc about allocation on secondary processes

[ upstream commit d5262b521d096349e9e96b436f90eee6554ba595 ]

Since 10 years, memzone allocation is allowed on secondary
processes. Now it's time to update the documentation accordingly.

At the same time, fix mempool, mbuf and ring documentation which rely on
memzones internally.

Bugzilla ID: 1074
Fixes: 916e4f4f4e45 ("memory: fix for multi process support")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/eal/include/rte_memzone.h | 3 ---
 lib/mbuf/rte_mbuf.h           | 3 ---
 lib/mempool/rte_mempool.h     | 1 -
 lib/ring/rte_ring.h           | 1 -
 lib/ring/rte_ring_elem.h      | 1 -
 5 files changed, 9 deletions(-)

diff --git a/lib/eal/include/rte_memzone.h b/lib/eal/include/rte_memzone.h
index 5db1210831..bb4223a056 100644
--- a/lib/eal/include/rte_memzone.h
+++ b/lib/eal/include/rte_memzone.h
@@ -119,5 +119,4 @@ struct rte_memzone {
  *   On error case, rte_errno will be set appropriately:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - ENOSPC - the maximum number of memzones has already been allocated
  *    - EEXIST - a memzone with the same name already exists
@@ -185,5 +184,4 @@ const struct rte_memzone *rte_memzone_reserve(const char *name,
  *   On error case, rte_errno will be set appropriately:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - ENOSPC - the maximum number of memzones has already been allocated
  *    - EEXIST - a memzone with the same name already exists
@@ -257,5 +255,4 @@ const struct rte_memzone *rte_memzone_reserve_aligned(const char *name,
  *   On error case, rte_errno will be set appropriately:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - ENOSPC - the maximum number of memzones has already been allocated
  *    - EEXIST - a memzone with the same name already exists
diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
index dedf83c38d..30d7937349 100644
--- a/lib/mbuf/rte_mbuf.h
+++ b/lib/mbuf/rte_mbuf.h
@@ -667,5 +667,4 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg);
  *   with rte_errno set appropriately. Possible rte_errno values include:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - EINVAL - cache size provided is too large, or priv_size is not aligned.
  *    - ENOSPC - the maximum number of memzones has already been allocated
@@ -709,5 +708,4 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,
  *   with rte_errno set appropriately. Possible rte_errno values include:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - EINVAL - cache size provided is too large, or priv_size is not aligned.
  *    - ENOSPC - the maximum number of memzones has already been allocated
@@ -763,5 +761,4 @@ struct rte_pktmbuf_extmem {
  *   with rte_errno set appropriately. Possible rte_errno values include:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - EINVAL - cache size provided is too large, or priv_size is not aligned.
  *    - ENOSPC - the maximum number of memzones has already been allocated
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index 1e7a3c1527..f023418a6b 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -1042,5 +1042,4 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
  *   with rte_errno set appropriately. Possible rte_errno values include:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - EINVAL - cache size provided is too large or an unknown flag was passed
  *    - ENOSPC - the maximum number of memzones has already been allocated
diff --git a/lib/ring/rte_ring.h b/lib/ring/rte_ring.h
index da17ed6d7c..937cfbb7a0 100644
--- a/lib/ring/rte_ring.h
+++ b/lib/ring/rte_ring.h
@@ -165,5 +165,4 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count,
  *    rte_errno set appropriately. Possible errno values include:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - EINVAL - count provided is not a power of 2
  *    - ENOSPC - the maximum number of memzones has already been allocated
diff --git a/lib/ring/rte_ring_elem.h b/lib/ring/rte_ring_elem.h
index 4bd016c110..91f2b5ff2a 100644
--- a/lib/ring/rte_ring_elem.h
+++ b/lib/ring/rte_ring_elem.h
@@ -97,5 +97,4 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count);
  *    rte_errno set appropriately. Possible errno values include:
  *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- *    - E_RTE_SECONDARY - function was called from a secondary process instance
  *    - EINVAL - esize is not a multiple of 4 or count provided is not a
  *		 power of 2.
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.489865684 +0100
+++ 0086-mem-fix-API-doc-about-allocation-on-secondary-proces.patch	2022-10-25 14:18:58.528798510 +0100
@@ -1 +1 @@
-From d5262b521d096349e9e96b436f90eee6554ba595 Mon Sep 17 00:00:00 2001
+From e3b8a0894a03510565f2bb32e3f435248d48764d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5262b521d096349e9e96b436f90eee6554ba595 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index 9811e8c760..b6e23d98ce 100644
+index dedf83c38d..30d7937349 100644
@@ -52 +53 @@
-@@ -665,5 +665,4 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg);
+@@ -667,5 +667,4 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg);
@@ -58 +59 @@
-@@ -707,5 +706,4 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,
+@@ -709,5 +708,4 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,
@@ -64 +65 @@
-@@ -761,5 +759,4 @@ struct rte_pktmbuf_extmem {
+@@ -763,5 +761,4 @@ struct rte_pktmbuf_extmem {
@@ -71 +72 @@
-index a3c4ee351d..4c4af2a8ed 100644
+index 1e7a3c1527..f023418a6b 100644
@@ -74 +75 @@
-@@ -1024,5 +1024,4 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
+@@ -1042,5 +1042,4 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
@@ -81 +82 @@
-index 980e92e594..7c48e35d27 100644
+index da17ed6d7c..937cfbb7a0 100644
@@ -84 +85 @@
-@@ -181,5 +181,4 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count,
+@@ -165,5 +165,4 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count,
@@ -91 +92 @@
-index fb1edc9aad..7f7d4951d3 100644
+index 4bd016c110..91f2b5ff2a 100644


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

* patch 'examples/vm_power_manager: use safe list iterator' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (84 preceding siblings ...)
  2022-10-25 15:07 ` patch 'mem: fix API doc about allocation on secondary processes' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'timer: fix stopping all timers' " Kevin Traynor
                   ` (11 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Hamza Khan; +Cc: Reshma Pattan, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From e7ad87f0343edbfafca9709618cfd373cff7222a Mon Sep 17 00:00:00 2001
From: Hamza Khan <hamza.khan@intel.com>
Date: Tue, 4 Oct 2022 23:09:04 +0100
Subject: [PATCH] examples/vm_power_manager: use safe list iterator

[ upstream commit 9c20d0fdc536df2a320cb1ae6cce49c2c7a02ebb ]

Currently, when vm_power_manager exits, we are using a LIST_FOREACH
macro to iterate over VM info structures while freeing them. This
leads to use-after-free error. To address this, replace all usages of
LIST_* with TAILQ_* macros, and use the RTE_TAILQ_FOREACH_SAFE macro
to iterate and delete VM info structures.

Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in host")

Signed-off-by: Hamza Khan <hamza.khan@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/channel_manager.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 838465ab4b..7d7efdd05a 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -23,4 +23,5 @@
 #include <rte_log.h>
 #include <rte_spinlock.h>
+#include <rte_tailq.h>
 
 #include <libvirt/libvirt.h>
@@ -59,8 +60,8 @@ struct virtual_machine_info {
 	rte_spinlock_t config_spinlock;
 	int allow_query;
-	LIST_ENTRY(virtual_machine_info) vms_info;
+	RTE_TAILQ_ENTRY(virtual_machine_info) vms_info;
 };
 
-LIST_HEAD(, virtual_machine_info) vm_list_head;
+RTE_TAILQ_HEAD(, virtual_machine_info) vm_list_head;
 
 static struct virtual_machine_info *
@@ -68,5 +69,5 @@ find_domain_by_name(const char *name)
 {
 	struct virtual_machine_info *info;
-	LIST_FOREACH(info, &vm_list_head, vms_info) {
+	RTE_TAILQ_FOREACH(info, &vm_list_head, vms_info) {
 		if (!strncmp(info->name, name, CHANNEL_MGR_MAX_NAME_LEN-1))
 			return info;
@@ -879,5 +880,5 @@ add_vm(const char *vm_name)
 	new_domain->allow_query = 0;
 	rte_spinlock_init(&(new_domain->config_spinlock));
-	LIST_INSERT_HEAD(&vm_list_head, new_domain, vms_info);
+	TAILQ_INSERT_HEAD(&vm_list_head, new_domain, vms_info);
 	return 0;
 }
@@ -901,5 +902,5 @@ remove_vm(const char *vm_name)
 		return -1;
 	}
-	LIST_REMOVE(vm_info, vms_info);
+	TAILQ_REMOVE(&vm_list_head, vm_info, vms_info);
 	rte_spinlock_unlock(&vm_info->config_spinlock);
 	rte_free(vm_info);
@@ -954,5 +955,5 @@ channel_manager_init(const char *path __rte_unused)
 	virNodeInfo info;
 
-	LIST_INIT(&vm_list_head);
+	TAILQ_INIT(&vm_list_head);
 	if (connect_hypervisor(path) < 0) {
 		global_n_host_cpus = 64;
@@ -1006,7 +1007,7 @@ channel_manager_exit(void)
 	unsigned i;
 	char mask[RTE_MAX_LCORE];
-	struct virtual_machine_info *vm_info;
+	struct virtual_machine_info *vm_info, *tmp;
 
-	LIST_FOREACH(vm_info, &vm_list_head, vms_info) {
+	RTE_TAILQ_FOREACH_SAFE(vm_info, &vm_list_head, vms_info, tmp) {
 
 		rte_spinlock_lock(&(vm_info->config_spinlock));
@@ -1023,5 +1024,5 @@ channel_manager_exit(void)
 		rte_spinlock_unlock(&(vm_info->config_spinlock));
 
-		LIST_REMOVE(vm_info, vms_info);
+		TAILQ_REMOVE(&vm_list_head, vm_info, vms_info);
 		rte_free(vm_info);
 	}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.512714144 +0100
+++ 0087-examples-vm_power_manager-use-safe-list-iterator.patch	2022-10-25 14:18:58.529798514 +0100
@@ -1 +1 @@
-From 9c20d0fdc536df2a320cb1ae6cce49c2c7a02ebb Mon Sep 17 00:00:00 2001
+From e7ad87f0343edbfafca9709618cfd373cff7222a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c20d0fdc536df2a320cb1ae6cce49c2c7a02ebb ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'timer: fix stopping all timers' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (85 preceding siblings ...)
  2022-10-25 15:07 ` patch 'examples/vm_power_manager: use safe list iterator' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'vhost: fix build with GCC 12' " Kevin Traynor
                   ` (10 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 84e55d681a70d5aa9b57e68c80a6b4bbbdf43cba Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Wed, 14 Sep 2022 10:33:18 -0500
Subject: [PATCH] timer: fix stopping all timers

[ upstream commit eb63c85d7bae32fdc1cbafcd91e88bd6515c39cf ]

There is a possibility of deadlock in this API,
as same spinlock is tried to be acquired in nested manner.

If the lcore that is stopping the timer is different from the lcore
that owns the timer, the timer list lock is acquired in timer_del(),
even if local_is_locked is true. Because the same lock was already
acquired in rte_timer_stop_all(), the thread will hang.

This patch removes the acquisition of nested lock.

Fixes: 821c51267bcd63a ("timer: add function to stop all timers in a list")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/timer/rte_timer.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/lib/timer/rte_timer.c b/lib/timer/rte_timer.c
index 6d19ce469b..98c1941cb1 100644
--- a/lib/timer/rte_timer.c
+++ b/lib/timer/rte_timer.c
@@ -588,5 +588,5 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,
 
 static int
-__rte_timer_stop(struct rte_timer *tim, int local_is_locked,
+__rte_timer_stop(struct rte_timer *tim,
 		 struct rte_timer_data *timer_data)
 {
@@ -610,5 +610,5 @@ __rte_timer_stop(struct rte_timer *tim, int local_is_locked,
 	/* remove it from list */
 	if (prev_status.state == RTE_TIMER_PENDING) {
-		timer_del(tim, prev_status, local_is_locked, priv_timer);
+		timer_del(tim, prev_status, 0, priv_timer);
 		__TIMER_STAT_ADD(priv_timer, pending, -1);
 	}
@@ -639,5 +639,5 @@ rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim)
 	TIMER_DATA_VALID_GET_OR_ERR_RET(timer_data_id, timer_data, -EINVAL);
 
-	return __rte_timer_stop(tim, 0, timer_data);
+	return __rte_timer_stop(tim, timer_data);
 }
 
@@ -995,6 +995,4 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,
 		priv_timer = &timer_data->priv_timer[walk_lcore];
 
-		rte_spinlock_lock(&priv_timer->list_lock);
-
 		for (tim = priv_timer->pending_head.sl_next[0];
 		     tim != NULL;
@@ -1002,12 +1000,9 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,
 			next_tim = tim->sl_next[0];
 
-			/* Call timer_stop with lock held */
-			__rte_timer_stop(tim, 1, timer_data);
+			__rte_timer_stop(tim, timer_data);
 
 			if (f)
 				f(tim, f_arg);
 		}
-
-		rte_spinlock_unlock(&priv_timer->list_lock);
 	}
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.533619770 +0100
+++ 0088-timer-fix-stopping-all-timers.patch	2022-10-25 14:18:58.529798514 +0100
@@ -1 +1 @@
-From eb63c85d7bae32fdc1cbafcd91e88bd6515c39cf Mon Sep 17 00:00:00 2001
+From 84e55d681a70d5aa9b57e68c80a6b4bbbdf43cba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb63c85d7bae32fdc1cbafcd91e88bd6515c39cf ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 9994813d0d..85d67573eb 100644
+index 6d19ce469b..98c1941cb1 100644
@@ -29 +30 @@
-@@ -581,5 +581,5 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,
+@@ -588,5 +588,5 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,
@@ -36 +37 @@
-@@ -603,5 +603,5 @@ __rte_timer_stop(struct rte_timer *tim, int local_is_locked,
+@@ -610,5 +610,5 @@ __rte_timer_stop(struct rte_timer *tim, int local_is_locked,
@@ -43 +44 @@
-@@ -632,5 +632,5 @@ rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim)
+@@ -639,5 +639,5 @@ rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim)
@@ -50 +51 @@
-@@ -988,6 +988,4 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,
+@@ -995,6 +995,4 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,
@@ -57 +58 @@
-@@ -995,12 +993,9 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,
+@@ -1002,12 +1000,9 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,


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

* patch 'vhost: fix build with GCC 12' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (86 preceding siblings ...)
  2022-10-25 15:07 ` patch 'timer: fix stopping all timers' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/i40e: fix build with MinGW " Kevin Traynor
                   ` (9 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, Amit Prakash Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 54a98eecdb81d95d958998c3ecb85b20cde03837 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 5 Oct 2022 22:35:24 +0200
Subject: [PATCH] vhost: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 4226aa9caca9511bf95a093b6ad9c1f8727a4d43 ]

This patch fixes a compilation issue met with GCC 12 on
LoongArch64:

In function ‘mbuf_to_desc’,
    inlined from ‘vhost_enqueue_async_packed’
    inlined from ‘virtio_dev_rx_async_packed’
    inlined from ‘virtio_dev_rx_async_submit_packed’
lib/vhost/virtio_net.c:1159:18: error:
        ‘buf_vec[0].buf_addr’ may be used uninitialized
 1159 |         buf_addr = buf_vec[vec_idx].buf_addr;
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/vhost/virtio_net.c: In function ‘virtio_dev_rx_async_submit_packed’:
lib/vhost/virtio_net.c:1834:27: note: ‘buf_vec’ declared here
 1834 |         struct buf_vector buf_vec[BUF_VECTOR_MAX];
      |                           ^~~~~~~

It happens because the compiler assumes that 'size'
variable in vhost_enqueue_async_packed could wrap to 0 since
'size' is uint32_t and pkt->pkt_len too.

In practice, it would never happen since 'pkt->pkt_len' is
unlikely to be close to UINT32_MAX, but let's just change
'size' to uint64_t to make the compiler happy without
having to add runtime checks.

This patch also fixes similar patterns in three other
places, including one that also produces similar build
issue on ARM64 in vhost_enqueue_single_packed().

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

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Amit Prakash Shukla <amitprakashs@marvell.com>
---
 lib/vhost/virtio_net.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index bf4d75b4bd..64460e3e8c 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -600,5 +600,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 static inline int
 reserve_avail_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
-				uint32_t size, struct buf_vector *buf_vec,
+				uint64_t size, struct buf_vector *buf_vec,
 				uint16_t *num_buffers, uint16_t avail_head,
 				uint16_t *nr_vec)
@@ -1070,5 +1070,5 @@ vhost_enqueue_single_packed(struct virtio_net *dev,
 	uint32_t len = 0;
 	uint16_t desc_count;
-	uint32_t size = pkt->pkt_len + sizeof(struct virtio_net_hdr_mrg_rxbuf);
+	uint64_t size = pkt->pkt_len + sizeof(struct virtio_net_hdr_mrg_rxbuf);
 	uint16_t num_buffers = 0;
 	uint32_t buffer_len[vq->size];
@@ -1138,5 +1138,5 @@ virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 	for (pkt_idx = 0; pkt_idx < count; pkt_idx++) {
-		uint32_t pkt_len = pkts[pkt_idx]->pkt_len + dev->vhost_hlen;
+		uint64_t pkt_len = pkts[pkt_idx]->pkt_len + dev->vhost_hlen;
 		uint16_t nr_vec = 0;
 
@@ -1486,5 +1486,5 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
 
 	for (pkt_idx = 0; pkt_idx < count; pkt_idx++) {
-		uint32_t pkt_len = pkts[pkt_idx]->pkt_len + dev->vhost_hlen;
+		uint64_t pkt_len = pkts[pkt_idx]->pkt_len + dev->vhost_hlen;
 		uint16_t nr_vec = 0;
 
@@ -1576,5 +1576,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
 	uint32_t len = 0;
 	uint16_t desc_count = 0;
-	uint32_t size = pkt->pkt_len + sizeof(struct virtio_net_hdr_mrg_rxbuf);
+	uint64_t size = pkt->pkt_len + sizeof(struct virtio_net_hdr_mrg_rxbuf);
 	uint32_t buffer_len[vq->size];
 	uint16_t buffer_buf_id[vq->size];
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.554242334 +0100
+++ 0089-vhost-fix-build-with-GCC-12.patch	2022-10-25 14:18:58.531798521 +0100
@@ -1 +1 @@
-From 4226aa9caca9511bf95a093b6ad9c1f8727a4d43 Mon Sep 17 00:00:00 2001
+From 54a98eecdb81d95d958998c3ecb85b20cde03837 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4226aa9caca9511bf95a093b6ad9c1f8727a4d43 ]
+
@@ -39 +40,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index 8f4d0f0502..6b4a062df3 100644
+index bf4d75b4bd..64460e3e8c 100644
@@ -52 +53 @@
-@@ -788,5 +788,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -600,5 +600,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -59 +60 @@
-@@ -1278,5 +1278,5 @@ vhost_enqueue_single_packed(struct virtio_net *dev,
+@@ -1070,5 +1070,5 @@ vhost_enqueue_single_packed(struct virtio_net *dev,
@@ -66 +67 @@
-@@ -1346,5 +1346,5 @@ virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -1138,5 +1138,5 @@ virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -73 +74 @@
-@@ -1690,5 +1690,5 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev, struct vhost_virtqueue
+@@ -1486,5 +1486,5 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
@@ -80 +81 @@
-@@ -1781,5 +1781,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
+@@ -1576,5 +1576,5 @@ vhost_enqueue_async_packed(struct virtio_net *dev,


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

* patch 'net/i40e: fix build with MinGW GCC 12' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (87 preceding siblings ...)
  2022-10-25 15:07 ` patch 'vhost: fix build with GCC 12' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/qede/base: fix 32-bit build with " Kevin Traynor
                   ` (8 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Amit Prakash Shukla; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 9ba87edbe69cac90bf8aff9714e3724519c633bf Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@marvell.com>
Date: Wed, 24 Aug 2022 19:33:38 +0530
Subject: [PATCH] net/i40e: fix build with MinGW GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit eb440cea1e05245f362ec7fca932f2d977f12359 ]

When compiling with MinGW GCC 12,
the rte_flow_item array is seen as read out of bound:

net/i40e/i40e_hash.c:389:47: error:
    array subscript 50 is above array bounds of ‘const uint64_t[50]’
    {aka ‘const long long unsigned int[50]’} [-Werror=array-bounds]
    389 | item_hdr = pattern_item_header[last_item_type];
        |            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

It seems the assert check done above this line has no impact.
A real check is added to make the compiler happy.

Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/i40e/i40e_hash.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_hash.c b/drivers/net/i40e/i40e_hash.c
index 8962e9d97a..a1ff85fceb 100644
--- a/drivers/net/i40e/i40e_hash.c
+++ b/drivers/net/i40e/i40e_hash.c
@@ -385,6 +385,8 @@ i40e_hash_get_pattern_type(const struct rte_flow_item pattern[],
 
 		prev_item_type = last_item_type;
-		assert(last_item_type < (enum rte_flow_item_type)
-				RTE_DIM(pattern_item_header));
+		if (last_item_type >= (enum rte_flow_item_type)
+				RTE_DIM(pattern_item_header))
+			goto not_sup;
+
 		item_hdr = pattern_item_header[last_item_type];
 		assert(item_hdr);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.575625743 +0100
+++ 0090-net-i40e-fix-build-with-MinGW-GCC-12.patch	2022-10-25 14:18:58.532798524 +0100
@@ -1 +1 @@
-From eb440cea1e05245f362ec7fca932f2d977f12359 Mon Sep 17 00:00:00 2001
+From 9ba87edbe69cac90bf8aff9714e3724519c633bf Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit eb440cea1e05245f362ec7fca932f2d977f12359 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/qede/base: fix 32-bit build with GCC 12' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (88 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/i40e: fix build with MinGW " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/tap: fix overflow of network interface index' " Kevin Traynor
                   ` (7 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Amit Prakash Shukla; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 4d4b866a158e5079dcac3f6533c06c4acdf2dd69 Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@marvell.com>
Date: Wed, 24 Aug 2022 19:33:39 +0530
Subject: [PATCH] net/qede/base: fix 32-bit build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit acc0ed087cd1ce6464f63489ab17eca52b0c94b2 ]

A pointer is passed to a macro and it seems mistakenly referenced.
This issue is seen only when compiling with GCC 12 for 32-bit:

drivers/net/qede/base/ecore_init_fw_funcs.c:1418:25:
        error: array subscript 1 is outside array bounds of ‘u32[1]’
        {aka ‘unsigned int[1]’} [-Werror=array-bounds]
 1418 |                 ecore_wr(dev, ptt, ((addr) + (4 * i)),  \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1419 |                          ((u32 *)&(arr))[i]);           \
      |                          ~~~~~~~~~~~~~~~~~~~
drivers/net/qede/base/ecore_init_fw_funcs.c:1465:17:
        note: in expansion of macro ‘ARR_REG_WR’
 1465 |         ARR_REG_WR(p_hwfn, p_ptt, addr, pData, len_in_dwords);
      |         ^~~~~~~~~~
drivers/net/qede/base/ecore_init_fw_funcs.c:1439:35:
        note: at offset 4 into object ‘pData’ of size 4
 1439 |                              u32 *pData,
      |                              ~~~~~^~~~~

Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/qede/base/ecore_init_fw_funcs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/qede/base/ecore_init_fw_funcs.c b/drivers/net/qede/base/ecore_init_fw_funcs.c
index 6a52f32cc9..4e4d1dc374 100644
--- a/drivers/net/qede/base/ecore_init_fw_funcs.c
+++ b/drivers/net/qede/base/ecore_init_fw_funcs.c
@@ -1417,5 +1417,5 @@ void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn,
 		for (i = 0; i < (arr_size); i++)		\
 			ecore_wr(dev, ptt, ((addr) + (4 * i)),	\
-				 ((u32 *)&(arr))[i]);		\
+				 ((u32 *)(arr))[i]);		\
 	} while (0)
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.596504266 +0100
+++ 0091-net-qede-base-fix-32-bit-build-with-GCC-12.patch	2022-10-25 14:18:58.533798528 +0100
@@ -1 +1 @@
-From acc0ed087cd1ce6464f63489ab17eca52b0c94b2 Mon Sep 17 00:00:00 2001
+From 4d4b866a158e5079dcac3f6533c06c4acdf2dd69 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit acc0ed087cd1ce6464f63489ab17eca52b0c94b2 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/tap: fix overflow of network interface index' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (89 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/qede/base: fix 32-bit build with " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/memif: fix crash with different number of Rx/Tx queues' " Kevin Traynor
                   ` (6 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Alex Kiselev; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 37560c8deb988246db128907e5fcb115eb3f4eb0 Mon Sep 17 00:00:00 2001
From: Alex Kiselev <alex@bisonrouter.com>
Date: Thu, 21 Jul 2022 11:13:01 +0000
Subject: [PATCH] net/tap: fix overflow of network interface index

[ upstream commit 8772bbfa717fdf3251b32ea48bdd21ddd6836dde ]

On Linux and most other systems, network interface index is a 32-bit
integer.  Indexes overflowing the 16-bit integer are frequently seen
when used inside a Docker container.

Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")
Fixes: 2bc06869cd94 ("net/tap: add remote netdevice traffic capture")

Signed-off-by: Alex Kiselev <alex@bisonrouter.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/tap_flow.c   |  2 +-
 drivers/net/tap/tap_tcmsgs.c | 18 +++++++++---------
 drivers/net/tap/tap_tcmsgs.h | 16 ++++++++--------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 7673823945..f53bc297f8 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1685,5 +1685,5 @@ int tap_flow_implicit_create(struct pmd_internals *pmd,
 	struct rte_flow_attr *attr = &implicit_rte_flows[idx].attr;
 	struct rte_flow_item_eth eth_local = { .type = 0 };
-	uint16_t if_index = pmd->remote_if_index;
+	unsigned int if_index = pmd->remote_if_index;
 	struct rte_flow *remote_flow = NULL;
 	struct nlmsg *msg = NULL;
diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c
index b478b5951e..a3aae3c814 100644
--- a/drivers/net/tap/tap_tcmsgs.c
+++ b/drivers/net/tap/tap_tcmsgs.c
@@ -20,5 +20,5 @@ struct qdisc {
 struct list_args {
 	int nlsk_fd;
-	uint16_t ifindex;
+	unsigned int ifindex;
 	void *custom_arg;
 };
@@ -43,5 +43,5 @@ struct qdisc_custom_arg {
  */
 void
-tc_init_msg(struct nlmsg *msg, uint16_t ifindex, uint16_t type, uint16_t flags)
+tc_init_msg(struct nlmsg *msg, unsigned int ifindex, uint16_t type, uint16_t flags)
 {
 	struct nlmsghdr *n = &msg->nh;
@@ -71,5 +71,5 @@ tc_init_msg(struct nlmsg *msg, uint16_t ifindex, uint16_t type, uint16_t flags)
  */
 static int
-qdisc_del(int nlsk_fd, uint16_t ifindex, struct qdisc *qinfo)
+qdisc_del(int nlsk_fd, unsigned int ifindex, struct qdisc *qinfo)
 {
 	struct nlmsg msg;
@@ -115,5 +115,5 @@ error:
  */
 int
-qdisc_add_multiq(int nlsk_fd, uint16_t ifindex)
+qdisc_add_multiq(int nlsk_fd, unsigned int ifindex)
 {
 	struct tc_multiq_qopt opt = {0};
@@ -145,5 +145,5 @@ qdisc_add_multiq(int nlsk_fd, uint16_t ifindex)
  */
 int
-qdisc_add_ingress(int nlsk_fd, uint16_t ifindex)
+qdisc_add_ingress(int nlsk_fd, unsigned int ifindex)
 {
 	struct nlmsg msg;
@@ -209,5 +209,5 @@ qdisc_del_cb(struct nlmsghdr *nh, void *arg)
  */
 static int
-qdisc_iterate(int nlsk_fd, uint16_t ifindex,
+qdisc_iterate(int nlsk_fd, unsigned int ifindex,
 	      int (*callback)(struct nlmsghdr *, void *), void *arg)
 {
@@ -239,5 +239,5 @@ qdisc_iterate(int nlsk_fd, uint16_t ifindex,
  */
 int
-qdisc_flush(int nlsk_fd, uint16_t ifindex)
+qdisc_flush(int nlsk_fd, unsigned int ifindex)
 {
 	return qdisc_iterate(nlsk_fd, ifindex, qdisc_del_cb, NULL);
@@ -257,5 +257,5 @@ qdisc_flush(int nlsk_fd, uint16_t ifindex)
  */
 int
-qdisc_create_multiq(int nlsk_fd, uint16_t ifindex)
+qdisc_create_multiq(int nlsk_fd, unsigned int ifindex)
 {
 	int err = 0;
@@ -283,5 +283,5 @@ qdisc_create_multiq(int nlsk_fd, uint16_t ifindex)
  */
 int
-qdisc_create_ingress(int nlsk_fd, uint16_t ifindex)
+qdisc_create_ingress(int nlsk_fd, unsigned int ifindex)
 {
 	int err = 0;
diff --git a/drivers/net/tap/tap_tcmsgs.h b/drivers/net/tap/tap_tcmsgs.h
index 8cedea8462..a64cb29d6f 100644
--- a/drivers/net/tap/tap_tcmsgs.h
+++ b/drivers/net/tap/tap_tcmsgs.h
@@ -25,13 +25,13 @@
 #define MULTIQ_MAJOR_HANDLE (1 << 16)
 
-void tc_init_msg(struct nlmsg *msg, uint16_t ifindex, uint16_t type,
+void tc_init_msg(struct nlmsg *msg, unsigned int ifindex, uint16_t type,
 		 uint16_t flags);
-int qdisc_list(int nlsk_fd, uint16_t ifindex);
-int qdisc_flush(int nlsk_fd, uint16_t ifindex);
-int qdisc_create_ingress(int nlsk_fd, uint16_t ifindex);
-int qdisc_create_multiq(int nlsk_fd, uint16_t ifindex);
-int qdisc_add_ingress(int nlsk_fd, uint16_t ifindex);
-int qdisc_add_multiq(int nlsk_fd, uint16_t ifindex);
-int filter_list_ingress(int nlsk_fd, uint16_t ifindex);
+int qdisc_list(int nlsk_fd, unsigned int ifindex);
+int qdisc_flush(int nlsk_fd, unsigned int ifindex);
+int qdisc_create_ingress(int nlsk_fd, unsigned int ifindex);
+int qdisc_create_multiq(int nlsk_fd, unsigned int ifindex);
+int qdisc_add_ingress(int nlsk_fd, unsigned int ifindex);
+int qdisc_add_multiq(int nlsk_fd, unsigned int ifindex);
+int filter_list_ingress(int nlsk_fd, unsigned int ifindex);
 
 #endif /* _TAP_TCMSGS_H_ */
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.617725325 +0100
+++ 0092-net-tap-fix-overflow-of-network-interface-index.patch	2022-10-25 14:18:58.534798532 +0100
@@ -1 +1 @@
-From 8772bbfa717fdf3251b32ea48bdd21ddd6836dde Mon Sep 17 00:00:00 2001
+From 37560c8deb988246db128907e5fcb115eb3f4eb0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8772bbfa717fdf3251b32ea48bdd21ddd6836dde ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a9a55e439e..efe66fe059 100644
+index 7673823945..f53bc297f8 100644
@@ -26 +27 @@
-@@ -1683,5 +1683,5 @@ int tap_flow_implicit_create(struct pmd_internals *pmd,
+@@ -1685,5 +1685,5 @@ int tap_flow_implicit_create(struct pmd_internals *pmd,


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

* patch 'net/memif: fix crash with different number of Rx/Tx queues' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (90 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/tap: fix overflow of network interface index' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'common/sfc_efx/base: remove VQ index check during VQ start' " Kevin Traynor
                   ` (5 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Huzaifa Rahman; +Cc: Joyce Kong, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From ee7decc2c9bb39bcbdd3106aef045551ae3d00fa Mon Sep 17 00:00:00 2001
From: Huzaifa Rahman <huzaifa.rahman@emumba.com>
Date: Tue, 26 Jul 2022 15:16:28 +0500
Subject: [PATCH] net/memif: fix crash with different number of Rx/Tx queues

[ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ]

There's a bug in memif_stats_get() function due to confusion
between C2S (client->server) and S2C (server->client) rings,
causing a crash if there's a different number of Rx and Tx queues.

Fixit by selectiing the correct rings for Rx and Tx i.e for Rx, S2C
rings are selected and for Tx, C2S rings are selected.

Bugzilla ID: 734
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Huzaifa Rahman <huzaifa.rahman@emumba.com>
Reviewed-by: Joyce Kong <joyce.kong@arm.com>
---
 drivers/net/memif/rte_eth_memif.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 205d08b028..2c716355be 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1448,6 +1448,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->obytes = 0;
 
-	tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings :
-	    pmd->run.num_s2c_rings;
+	tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings :
+	    pmd->run.num_c2s_rings;
 	nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp :
 	    RTE_ETHDEV_QUEUE_STAT_CNTRS;
@@ -1462,6 +1462,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	}
 
-	tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings :
-	    pmd->run.num_c2s_rings;
+	tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings :
+	    pmd->run.num_s2c_rings;
 	nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp :
 	    RTE_ETHDEV_QUEUE_STAT_CNTRS;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.639734251 +0100
+++ 0093-net-memif-fix-crash-with-different-number-of-Rx-Tx-q.patch	2022-10-25 14:18:58.536798539 +0100
@@ -1 +1 @@
-From 231435a5e6c7fa915697d8f84a91b44176bba4d1 Mon Sep 17 00:00:00 2001
+From ee7decc2c9bb39bcbdd3106aef045551ae3d00fa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index a574bce49e..5b5cae34ea 100644
+index 205d08b028..2c716355be 100644
@@ -27 +28 @@
-@@ -1445,6 +1445,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1448,6 +1448,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -36 +37 @@
-@@ -1459,6 +1459,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1462,6 +1462,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)


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

* patch 'common/sfc_efx/base: remove VQ index check during VQ start' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (91 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/memif: fix crash with different number of Rx/Tx queues' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/hns3: fix Rx with PTP' " Kevin Traynor
                   ` (4 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Abhimanyu Saini; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 84cc72849a59db523b69e322a84a4d879032ceb1 Mon Sep 17 00:00:00 2001
From: Abhimanyu Saini <absaini@amd.com>
Date: Thu, 14 Jul 2022 19:18:00 +0530
Subject: [PATCH] common/sfc_efx/base: remove VQ index check during VQ start

[ upstream commit 93211a52a65f3f9c4280155ce7bd12a11c48ffdb ]

The used/avail queue indexes are not bound by queue size,
because HW calculates descriptor entry index by performing
a simple modulo between queue index and queue_size.

So, do not check initial used and avail queue indexes
against queue size because it is possible for these
indexes to be greater than queue size in the
following cases:
1) The queue is created to be migrated into, or
2) The client issues a qstop/qstart after running datapath

Fixes: 4dda72dbdeab3 ("common/sfc_efx/base: add base virtio support for vDPA")

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/rhead_virtio.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/common/sfc_efx/base/rhead_virtio.c b/drivers/common/sfc_efx/base/rhead_virtio.c
index 335cb747d1..7f087170fe 100644
--- a/drivers/common/sfc_efx/base/rhead_virtio.c
+++ b/drivers/common/sfc_efx/base/rhead_virtio.c
@@ -48,12 +48,4 @@ rhead_virtio_qstart(
 	}
 
-	if (evvdp != NULL) {
-		if ((evvdp->evvd_vq_cidx > evvcp->evvc_vq_size) ||
-		    (evvdp->evvd_vq_pidx > evvcp->evvc_vq_size)) {
-			rc = EINVAL;
-			goto fail3;
-		}
-	}
-
 	req.emr_cmd = MC_CMD_VIRTIO_INIT_QUEUE;
 	req.emr_in_buf = payload;
@@ -117,5 +109,5 @@ rhead_virtio_qstart(
 	if (req.emr_rc != 0) {
 		rc = req.emr_rc;
-		goto fail4;
+		goto fail3;
 	}
 
@@ -124,6 +116,4 @@ rhead_virtio_qstart(
 	return (0);
 
-fail4:
-	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.664254730 +0100
+++ 0094-common-sfc_efx-base-remove-VQ-index-check-during-VQ-.patch	2022-10-25 14:18:58.536798539 +0100
@@ -1 +1 @@
-From 93211a52a65f3f9c4280155ce7bd12a11c48ffdb Mon Sep 17 00:00:00 2001
+From 84cc72849a59db523b69e322a84a4d879032ceb1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 93211a52a65f3f9c4280155ce7bd12a11c48ffdb ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix Rx with PTP' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (92 preceding siblings ...)
  2022-10-25 15:07 ` patch 'common/sfc_efx/base: remove VQ index check during VQ start' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/hns3: fix crash in SVE Tx' " Kevin Traynor
                   ` (3 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 5210f643fed4a12d746a871ac0cc351381bff5fc Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 5 Sep 2022 16:59:31 +0800
Subject: [PATCH] net/hns3: fix Rx with PTP

[ upstream commit 4ac14c1d961b27212f7af1c6441fa8f7ec594db9 ]

The Rx and Tx vector algorithm of hns3 PMD don't support PTP
function. Currently, hns3 driver uses 'pf->ptp_enable' to check
whether PTP is enabled so as to not select Rx and Tx vector
algorithm. And the variable is set when call rte_eth_timesync_enable().
Namely, it may not be set before selecting Rx/Tx function, let's say
the case: set PTP offload in dev_configure(), do dev_start() and then
call rte_eth_timesync_enable(). In this case, all PTP packets can not
be received to application. So this patch fixes the check based on the
RTE_ETH_RX_OFFLOAD_TIMESTAMP flag.

Fixes: 3ca3dcd65101 ("net/hns3: fix vector Rx/Tx when PTP enabled")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ptp.c      |  1 -
 drivers/net/hns3/hns3_rxtx_vec.c | 20 +++++++++-----------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 0b0061bba5..6bbd85ba23 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -126,5 +126,4 @@ hns3_timesync_enable(struct rte_eth_dev *dev)
 	if (pf->ptp_enable)
 		return 0;
-	hns3_warn(hw, "note: please ensure Rx/Tx burst mode is simple or common when enabling PTP!");
 
 	rte_spinlock_lock(&hw->lock);
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index 73f0ab6bc8..153866cf03 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -18,6 +18,5 @@ hns3_tx_check_vec_support(struct rte_eth_dev *dev)
 {
 	struct rte_eth_txmode *txmode = &dev->data->dev_conf.txmode;
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_pf *pf = &hns->pf;
+	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 
 	/* Only support RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE */
@@ -25,6 +24,10 @@ hns3_tx_check_vec_support(struct rte_eth_dev *dev)
 		return -ENOTSUP;
 
-	/* Vec is not supported when PTP enabled */
-	if (pf->ptp_enable)
+	/*
+	 * PTP function requires the cooperation of Rx and Tx.
+	 * Tx vector isn't supported if RTE_ETH_RX_OFFLOAD_TIMESTAMP is set
+	 * in Rx offloads.
+	 */
+	if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
 		return -ENOTSUP;
 
@@ -234,7 +237,6 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
 	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 	uint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |
-				 RTE_ETH_RX_OFFLOAD_VLAN;
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_pf *pf = &hns->pf;
+				 RTE_ETH_RX_OFFLOAD_VLAN |
+				 RTE_ETH_RX_OFFLOAD_TIMESTAMP;
 
 	if (dev->data->scattered_rx)
@@ -250,8 +252,4 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
 		return -ENOTSUP;
 
-	/* Vec is not supported when PTP enabled */
-	if (pf->ptp_enable)
-		return -ENOTSUP;
-
 	return 0;
 }
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.687252841 +0100
+++ 0095-net-hns3-fix-Rx-with-PTP.patch	2022-10-25 14:18:58.537798542 +0100
@@ -1 +1 @@
-From 4ac14c1d961b27212f7af1c6441fa8f7ec594db9 Mon Sep 17 00:00:00 2001
+From 5210f643fed4a12d746a871ac0cc351381bff5fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ac14c1d961b27212f7af1c6441fa8f7ec594db9 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index 0dd6fccb13..cd9264d91b 100644
+index 73f0ab6bc8..153866cf03 100644
@@ -61 +62 @@
-@@ -233,7 +236,6 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
+@@ -234,7 +237,6 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
@@ -71 +72 @@
-@@ -246,8 +248,4 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
+@@ -250,8 +252,4 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)


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

* patch 'net/hns3: fix crash in SVE Tx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (93 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/hns3: fix Rx with PTP' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/hns3: fix next-to-use overflow " Kevin Traynor
                   ` (2 subsequent siblings)
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 2197709643a6bb8beb1b31e241cecd0e8c125622 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 5 Sep 2022 16:59:32 +0800
Subject: [PATCH] net/hns3: fix crash in SVE Tx

[ upstream commit 905487d35fb3d2481cb46ad9bd0e348e9c188911 ]

Currently, the number of Tx send bytes is obtained by accumulating the
length of the batch 'mbuf' packets of the current loop cycle.
Unfortunately, it uses svcntd (which means all lane, regardless of
whether the corresponding lane is valid) which may lead to overflow,
and thus refers to an invalid mbuf.

Because the SVE xmit algorithm applies only to a single mbuf, the
mbuf's data_len is equal pkt_len, so this patch fixes it by using
svaddv_u64(svbool_t pg, svuint64_t data_len) which only adds valid
lanes.

Fixes: fdcd6a3e0246 ("net/hns3: add bytes stats")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx_vec_sve.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c
index be1fdbcdf0..b0dfb052bb 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c
+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c
@@ -436,7 +436,6 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq,
 
 		/* Increment bytes counter */
-		uint32_t idx;
-		for (idx = 0; idx < svcntd(); idx++)
-			txq->basic_stats.bytes += pkts[idx]->pkt_len;
+		txq->basic_stats.bytes +=
+			(svaddv_u64(pg, data_len) >> HNS3_UINT16_BIT);
 
 		/* update index for next loop */
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.709366359 +0100
+++ 0096-net-hns3-fix-crash-in-SVE-Tx.patch	2022-10-25 14:18:58.537798542 +0100
@@ -1 +1 @@
-From 905487d35fb3d2481cb46ad9bd0e348e9c188911 Mon Sep 17 00:00:00 2001
+From 2197709643a6bb8beb1b31e241cecd0e8c125622 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 905487d35fb3d2481cb46ad9bd0e348e9c188911 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix next-to-use overflow in SVE Tx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (94 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/hns3: fix crash in SVE Tx' " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/hns3: fix next-to-use overflow in simple " Kevin Traynor
  2022-10-25 15:07 ` patch 'net/hns3: fix crash when secondary process access FW' " Kevin Traynor
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From 540c8608d64bc2e8b1d6738606da87a65b3b50ea Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 5 Sep 2022 16:59:33 +0800
Subject: [PATCH] net/hns3: fix next-to-use overflow in SVE Tx

[ upstream commit 3efbc3c4027c87c14727a6a5ce13b099cd8d5866 ]

If txq's next-to-use plus nb_pkts equal txq's nb_tx_desc when using
SVE xmit algorithm, the txq's next-to-use will equal nb_tx_desc after
the xmit, this does not cause Tx exceptions, but may affect other ops
that depend on this field, such as tx_descriptor_status.

Fixes: f0c243a6cb6f ("net/hns3: support SVE Tx")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx_vec_sve.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c
index b0dfb052bb..f09a81dbd5 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c
+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c
@@ -465,5 +465,5 @@ hns3_xmit_fixed_burst_vec_sve(void *__restrict tx_queue,
 	}
 
-	if (txq->next_to_use + nb_pkts > txq->nb_tx_desc) {
+	if (txq->next_to_use + nb_pkts >= txq->nb_tx_desc) {
 		nb_tx = txq->nb_tx_desc - txq->next_to_use;
 		hns3_tx_fill_hw_ring_sve(txq, tx_pkts, nb_tx);
@@ -471,6 +471,8 @@ hns3_xmit_fixed_burst_vec_sve(void *__restrict tx_queue,
 	}
 
-	hns3_tx_fill_hw_ring_sve(txq, tx_pkts + nb_tx, nb_pkts - nb_tx);
-	txq->next_to_use += nb_pkts - nb_tx;
+	if (nb_pkts > nb_tx) {
+		hns3_tx_fill_hw_ring_sve(txq, tx_pkts + nb_tx, nb_pkts - nb_tx);
+		txq->next_to_use += nb_pkts - nb_tx;
+	}
 
 	txq->tx_bd_ready -= nb_pkts;
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.733916638 +0100
+++ 0097-net-hns3-fix-next-to-use-overflow-in-SVE-Tx.patch	2022-10-25 14:18:58.537798542 +0100
@@ -1 +1 @@
-From 3efbc3c4027c87c14727a6a5ce13b099cd8d5866 Mon Sep 17 00:00:00 2001
+From 540c8608d64bc2e8b1d6738606da87a65b3b50ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3efbc3c4027c87c14727a6a5ce13b099cd8d5866 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix next-to-use overflow in simple Tx' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (95 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/hns3: fix next-to-use overflow " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  2022-10-25 15:07 ` patch 'net/hns3: fix crash when secondary process access FW' " Kevin Traynor
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From daf6edc3174b090cae59e226206511428629aaa0 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 5 Sep 2022 16:59:34 +0800
Subject: [PATCH] net/hns3: fix next-to-use overflow in simple Tx

[ upstream commit 76a9c980cf61d8ee21402d1d1d650d2f9d49cfb0 ]

If txq's next-to-use plus nb_pkts equal txq's nb_tx_desc when using
simple xmit algorithm, the txq's next-to-use will equal nb_tx_desc
fter the xmit, this does not cause Tx exceptions, but may affect other
ops that depend on this field, such as tx_descriptor_status.

Fixes: 7ef933908f04 ("net/hns3: add simple Tx path")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 403f811a51..49b116c1b8 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4138,5 +4138,5 @@ hns3_xmit_pkts_simple(void *tx_queue,
 
 	txq->tx_bd_ready -= nb_pkts;
-	if (txq->next_to_use + nb_pkts > txq->nb_tx_desc) {
+	if (txq->next_to_use + nb_pkts >= txq->nb_tx_desc) {
 		nb_tx = txq->nb_tx_desc - txq->next_to_use;
 		hns3_tx_fill_hw_ring(txq, tx_pkts, nb_tx);
@@ -4144,6 +4144,8 @@ hns3_xmit_pkts_simple(void *tx_queue,
 	}
 
-	hns3_tx_fill_hw_ring(txq, tx_pkts + nb_tx, nb_pkts - nb_tx);
-	txq->next_to_use += nb_pkts - nb_tx;
+	if (nb_pkts > nb_tx) {
+		hns3_tx_fill_hw_ring(txq, tx_pkts + nb_tx, nb_pkts - nb_tx);
+		txq->next_to_use += nb_pkts - nb_tx;
+	}
 
 	hns3_write_txq_tail_reg(txq, nb_pkts);
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.758120693 +0100
+++ 0098-net-hns3-fix-next-to-use-overflow-in-simple-Tx.patch	2022-10-25 14:18:58.540798553 +0100
@@ -1 +1 @@
-From 76a9c980cf61d8ee21402d1d1d650d2f9d49cfb0 Mon Sep 17 00:00:00 2001
+From daf6edc3174b090cae59e226206511428629aaa0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76a9c980cf61d8ee21402d1d1d650d2f9d49cfb0 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index a6481bb68b..ecee5363b2 100644
+index 403f811a51..49b116c1b8 100644
@@ -24 +25 @@
-@@ -4127,5 +4127,5 @@ hns3_xmit_pkts_simple(void *tx_queue,
+@@ -4138,5 +4138,5 @@ hns3_xmit_pkts_simple(void *tx_queue,
@@ -31 +32 @@
-@@ -4133,6 +4133,8 @@ hns3_xmit_pkts_simple(void *tx_queue,
+@@ -4144,6 +4144,8 @@ hns3_xmit_pkts_simple(void *tx_queue,


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

* patch 'net/hns3: fix crash when secondary process access FW' has been queued to stable release 21.11.3
  2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
                   ` (96 preceding siblings ...)
  2022-10-25 15:07 ` patch 'net/hns3: fix next-to-use overflow in simple " Kevin Traynor
@ 2022-10-25 15:07 ` Kevin Traynor
  97 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-10-25 15:07 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From afa520b633f434f31bf3cd90cc8c78c0ac71c40d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 5 Sep 2022 16:59:36 +0800
Subject: [PATCH] net/hns3: fix crash when secondary process access FW

[ upstream commit a8f1f7cf1b429c3b95fa94f794f697a30f4c482d ]

Currently, to prevent missing reporting of reset interrupts and quickly
identify reset interrupts, the following logic is designed in the
FW (firmware) command interface hns3_cmd_send: if an unprocessed
interrupt exist (by checking reset registers), related reset task is
scheduled.

The secondary process may invoke the hns3_cmd_send interface (e.g. using
proc-info query some stats). Unfortunately, the secondary process
does not support reset processing, and a segment fault may occur if it
schedules reset task.

Fix it by limit the checking and scheduling of reset under only primary
process.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 10 +++++++++-
 drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 40a33549e0..ddd4323d19 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5630,5 +5630,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
 	enum hns3_reset_level reset;
 
-	hns3_check_event_cause(hns, NULL);
+	/*
+	 * Check the registers to confirm whether there is reset pending.
+	 * Note: This check may lead to schedule reset task, but only primary
+	 *       process can process the reset event. Therefore, limit the
+	 *       checking under only primary process.
+	 */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		hns3_check_event_cause(hns, NULL);
+
 	reset = hns3_get_reset_level(hns, &hw->reset.pending);
 	if (reset != HNS3_NONE_RESET && hw->reset.level != HNS3_NONE_RESET &&
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 0af4dcb324..ed20c30bc7 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1913,6 +1913,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
 		return false;
 
-	/* Check the registers to confirm whether there is reset pending */
-	hns3vf_check_event_cause(hns, NULL);
+	/*
+	 * Check the registers to confirm whether there is reset pending.
+	 * Note: This check may lead to schedule reset task, but only primary
+	 *       process can process the reset event. Therefore, limit the
+	 *       checking under only primary process.
+	 */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		hns3vf_check_event_cause(hns, NULL);
+
 	reset = hns3vf_get_reset_level(hw, &hw->reset.pending);
 	if (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET &&
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.785719795 +0100
+++ 0099-net-hns3-fix-crash-when-secondary-process-access-FW.patch	2022-10-25 14:18:58.545798571 +0100
@@ -1 +1 @@
-From a8f1f7cf1b429c3b95fa94f794f697a30f4c482d Mon Sep 17 00:00:00 2001
+From afa520b633f434f31bf3cd90cc8c78c0ac71c40d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a8f1f7cf1b429c3b95fa94f794f697a30f4c482d ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 95d3c93c42..3d9f7c6ec7 100644
+index 40a33549e0..ddd4323d19 100644
@@ -34 +35 @@
-@@ -5603,5 +5603,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
+@@ -5630,5 +5630,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
@@ -50 +51 @@
-index 86f2ba24cc..a72535eb7d 100644
+index 0af4dcb324..ed20c30bc7 100644
@@ -53 +54 @@
-@@ -1865,6 +1865,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
+@@ -1913,6 +1913,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)


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

* 答复: patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 21.11.3
  2022-10-25 15:07 ` patch 'net/bnxt: fix null pointer dereference in LED config' " Kevin Traynor
@ 2022-11-17  9:05   ` Mao,Yingming
  2022-11-17 10:08     ` Kevin Traynor
  0 siblings, 1 reply; 101+ messages in thread
From: Mao,Yingming @ 2022-11-17  9:05 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi Kevin,
I had received your email in 2022/10/25. Sorry for late reply. I have tested the following patch base dpdk20.11.6, it works ok.

https://github.com/kevintraynor/dpdk-stable/commit/d4774717275b47c291f8da09da17aea4deedd822

This patch should backport to dpdk 20.11. Please push it do dpdk LTS 20.11.
This patch dose not need to be backported and does not apply to 19.11

Regards,
Mao Yingming


-----邮件原件-----
发件人: Kevin Traynor <ktraynor@redhat.com> 
发送时间: 2022年10月25日 23:07
收件人: Mao,Yingming <maoyingming@baidu.com>
抄送: Somnath Kotur <somnath.kotur@broadcom.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>; dpdk stable <stable@dpdk.org>
主题: patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 21.11.3

Hi,

FYI, your patch has been queued to stable release 21.11.3

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

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

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

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

Thanks.

Kevin

---
From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001
From: Mao YingMing <maoyingming@baidu.com>
Date: Tue, 2 Aug 2022 12:08:17 +0800
Subject: [PATCH] net/bnxt: fix null pointer dereference in LED config

[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ]

For VFs, bp->leds is uninitialized, check bp->leds is not null before checking for bp->leds->num_leds.

segfault backtrace in trex program when use VF:
11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true)
10: bnxt_dev_led_on_op (dev=0x22d7780 <rte_eth_devices>)
 9: rte_eth_led_on (port_id=0)
 8: DpdkTRexPortAttr::set_led (this=0x23b6ce0, on=true)
 7: DpdkTRexPortAttr::DpdkTRexPortAttr
 6: CTRexExtendedDriverBnxt::create_port_attr
 5: CPhyEthIF::Create
 4: CGlobalTRex::device_start
 3: CGlobalTRex::Create
 2: main_test
 1: main

Fixes: d4d5a04 ("net/bnxt: fix unnecessary memory allocation")

Signed-off-by: Mao YingMing <maoyingming@baidu.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 9c5257309a..51e1e2d6b3 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4536,5 +4536,5 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on)
 	int rc, i;
 
-	if (!bp->leds->num_leds || BNXT_VF(bp))
+	if (BNXT_VF(bp) || !bp->leds || !bp->leds->num_leds)
 		return -EOPNOTSUPP;
 
--
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.377396063 +0100
+++ 0081-net-bnxt-fix-null-pointer-dereference-in-LED-config.patch	2022-10-25 14:18:58.513798456 +0100
@@ -1 +1 @@
-From 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 Mon Sep 17 00:00:00 2001
+From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org


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

* Re: 答复: patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 21.11.3
  2022-11-17  9:05   ` 答复: " Mao,Yingming
@ 2022-11-17 10:08     ` Kevin Traynor
  0 siblings, 0 replies; 101+ messages in thread
From: Kevin Traynor @ 2022-11-17 10:08 UTC (permalink / raw)
  To: Mao,Yingming
  Cc: Somnath Kotur, Ajit Khaparde, dpdk stable, Luca Boccassi,
	Christian Ehrhardt, Xueming(Steven) Li

On 17/11/2022 09:05, Mao,Yingming wrote:
> Hi Kevin,

Hi Mao Yingming,

> I had received your email in 2022/10/25. Sorry for late reply. I have tested the following patch base dpdk20.11.6, it works ok.
> 
> https://github.com/kevintraynor/dpdk-stable/commit/d4774717275b47c291f8da09da17aea4deedd822
> 
> This patch should backport to dpdk 20.11. Please push it do dpdk LTS 20.11.
> This patch dose not need to be backported and does not apply to 19.11
> 

Cc'ing 20.11 and 19.11 LTS maintainers, Luca and Christian.

> Regards,
> Mao Yingming
> 
> 
> -----邮件原件-----
> 发件人: Kevin Traynor <ktraynor@redhat.com>
> 发送时间: 2022年10月25日 23:07
> 收件人: Mao,Yingming <maoyingming@baidu.com>
> 抄送: Somnath Kotur <somnath.kotur@broadcom.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>; dpdk stable <stable@dpdk.org>
> 主题: patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 21.11.3
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 21.11.3
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/01/22. So please shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable
> 
> This queued commit can be viewed at:
> https://github.com/kevintraynor/dpdk-stable/commit/d4774717275b47c291f8da09da17aea4deedd822
> 
> Thanks.
> 
> Kevin
> 
> ---
>  From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001
> From: Mao YingMing <maoyingming@baidu.com>
> Date: Tue, 2 Aug 2022 12:08:17 +0800
> Subject: [PATCH] net/bnxt: fix null pointer dereference in LED config
> 
> [ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ]
> 
> For VFs, bp->leds is uninitialized, check bp->leds is not null before checking for bp->leds->num_leds.
> 
> segfault backtrace in trex program when use VF:
> 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true)
> 10: bnxt_dev_led_on_op (dev=0x22d7780 <rte_eth_devices>)
>   9: rte_eth_led_on (port_id=0)
>   8: DpdkTRexPortAttr::set_led (this=0x23b6ce0, on=true)
>   7: DpdkTRexPortAttr::DpdkTRexPortAttr
>   6: CTRexExtendedDriverBnxt::create_port_attr
>   5: CPhyEthIF::Create
>   4: CGlobalTRex::device_start
>   3: CGlobalTRex::Create
>   2: main_test
>   1: main
> 
> Fixes: d4d5a04 ("net/bnxt: fix unnecessary memory allocation")
> 
> Signed-off-by: Mao YingMing <maoyingming@baidu.com>
> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>   drivers/net/bnxt/bnxt_hwrm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 9c5257309a..51e1e2d6b3 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -4536,5 +4536,5 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on)
>   	int rc, i;
>   
> -	if (!bp->leds->num_leds || BNXT_VF(bp))
> +	if (BNXT_VF(bp) || !bp->leds || !bp->leds->num_leds)
>   		return -EOPNOTSUPP;
>   
> --
> 2.37.3
> 
> ---
>    Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -	2022-10-25 14:19:00.377396063 +0100
> +++ 0081-net-bnxt-fix-null-pointer-dereference-in-LED-config.patch	2022-10-25 14:18:58.513798456 +0100
> @@ -1 +1 @@
> -From 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 Mon Sep 17 00:00:00 2001
> +From d4774717275b47c291f8da09da17aea4deedd822 Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ]
> +
> @@ -23 +24,0 @@
> -Cc: stable@dpdk.org
> 


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

end of thread, other threads:[~2022-11-21  9:54 UTC | newest]

Thread overview: 101+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 15:05 patch 'build: enable developer mode for all working trees' has been queued to stable release 21.11.3 Kevin Traynor
2022-10-25 15:05 ` patch 'net: accept unaligned data in checksum routines' " Kevin Traynor
2022-10-25 15:05 ` patch 'eal: fix side effect in some pointer arithmetic macros' " Kevin Traynor
2022-10-25 15:05 ` patch 'app/testpmd: restore ixgbe bypass commands' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/bonding: fix array overflow in Rx burst' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/bonding: fix double slave link status query' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/failsafe: fix interrupt handle leak' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/nfp: compose firmware file name with new hwinfo' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/axgbe: fix scattered Rx' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/axgbe: fix mbuf lengths in " Kevin Traynor
2022-10-25 15:06 ` patch 'net/axgbe: fix length of each segment " Kevin Traynor
2022-10-25 15:06 ` patch 'net/axgbe: fix checksum and RSS " Kevin Traynor
2022-10-25 15:06 ` patch 'net/axgbe: optimise " Kevin Traynor
2022-10-25 15:06 ` patch 'net/axgbe: remove freeing buffer in " Kevin Traynor
2022-10-25 15:06 ` patch 'net/nfp: improve HW info header log readability' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/txgbe: fix IPv6 flow rule' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/txgbe: remove semaphore between SW/FW' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/txgbe: rename some extended statistics' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ngbe: " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ngbe: remove semaphore between SW/FW' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ngbe: fix maximum frame size' " Kevin Traynor
2022-10-25 15:06 ` patch 'common/cnxk: fix log level during MCAM allocation' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/mvneta: fix build with GCC 12' " Kevin Traynor
2022-10-25 15:06 ` patch 'common/cnxk: fix missing flow counter reset' " Kevin Traynor
2022-10-25 15:06 ` patch 'common/cnxk: fix printing disabled MKEX registers' " Kevin Traynor
2022-10-25 15:06 ` patch 'malloc: fix storage size for some allocations' " Kevin Traynor
2022-10-25 15:06 ` patch 'event/dsw: fix flow migration' " Kevin Traynor
2022-10-25 15:06 ` patch 'event/sw: fix device name in dump' " Kevin Traynor
2022-10-25 15:06 ` patch 'eventdev/eth_tx: add spinlock for adapter start/stop' " Kevin Traynor
2022-10-25 15:06 ` patch 'eventdev/eth_tx: fix adapter stop' " Kevin Traynor
2022-10-25 15:06 ` patch 'test/ipsec: skip if no compatible device' " Kevin Traynor
2022-10-25 15:06 ` patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' " Kevin Traynor
2022-10-25 15:06 ` patch 'test/crypto: fix debug messages' " Kevin Traynor
2022-10-25 15:06 ` patch 'common/qat: fix VF to PF answer' " Kevin Traynor
2022-10-25 15:06 ` patch 'test/ipsec: fix build with GCC 12' " Kevin Traynor
2022-10-25 15:06 ` patch 'ipsec: " Kevin Traynor
2022-10-25 15:06 ` patch 'crypto/qat: " Kevin Traynor
2022-10-25 15:06 ` patch 'cryptodev: fix missing SHA3 algorithm strings' " Kevin Traynor
2022-10-25 15:06 ` patch 'eventdev: fix name of Rx conf type in documentation' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/i40e: fix VF representor release' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice: fix RSS hash update' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix inner symmetric RSS hash in raw flow' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/iavf: fix L3 checksum Tx offload flag' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/iavf: fix VLAN insertion' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/iavf: fix pattern check for flow director parser' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/iavf: fix Tx done descriptors cleanup' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/iavf: update IPsec ESN values when updating session' " Kevin Traynor
2022-10-25 15:06 ` patch 'common/iavf: avoid copy in async mode' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix division during E822 PTP init' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix 100M speed capability' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix DSCP PFC TLV creation' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix media type of PHY 10G SFI C2C' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix function descriptions for parser' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix endian format' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix array overflow in add switch recipe' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix bit finding range over ptype bitmap' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix add MAC rule' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix double VLAN in promiscuous mode' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: ignore promiscuous already exist' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/ice/base: fix input set of GTPoGRE' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/iavf: fix processing VLAN TCI in SSE path' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/iavf: fix outer checksum flags' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/virtio: fix crash when configured twice' " Kevin Traynor
2022-10-25 15:06 ` patch 'net/mlx4: fix Verbs FD leak in secondary process' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/mlx5: " Kevin Traynor
2022-10-25 15:07 ` patch 'net/mlx5: fix check for orphan wait descriptor' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/mlx5: fix single not inline packet storing' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/mlx5: fix inline length exceeding descriptor limit' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/mlx5: fix Tx check for hardware descriptor length' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/mlx5: fix modify action with tunnel decapsulation' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/mlx5: fix meter profile delete after disable' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/iavf: check illegal packet sizes' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/ice: " Kevin Traynor
2022-10-25 15:07 ` patch 'net/cnxk: fix DF bit in vector mode' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/axgbe: reset end of packet in scattered Rx' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/axgbe: clear buffer on scattered Rx chaining failure' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/axgbe: save segment data in scattered Rx' " Kevin Traynor
2022-10-25 15:07 ` patch 'common/sfc_efx/base: fix maximum Tx data count' " Kevin Traynor
2022-10-25 15:07 ` patch 'event/cnxk: fix missing xstats operations' " Kevin Traynor
2022-10-25 15:07 ` patch 'cryptodev: fix unduly newlines in logs' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/bnxt: fix null pointer dereference in LED config' " Kevin Traynor
2022-11-17  9:05   ` 答复: " Mao,Yingming
2022-11-17 10:08     ` Kevin Traynor
2022-10-25 15:07 ` patch 'net/bnxt: fix error code during MTU change' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/bnxt: remove unnecessary check' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/bnxt: fix representor info freeing' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/bnxt: fix build with GCC 13' " Kevin Traynor
2022-10-25 15:07 ` patch 'mem: fix API doc about allocation on secondary processes' " Kevin Traynor
2022-10-25 15:07 ` patch 'examples/vm_power_manager: use safe list iterator' " Kevin Traynor
2022-10-25 15:07 ` patch 'timer: fix stopping all timers' " Kevin Traynor
2022-10-25 15:07 ` patch 'vhost: fix build with GCC 12' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/i40e: fix build with MinGW " Kevin Traynor
2022-10-25 15:07 ` patch 'net/qede/base: fix 32-bit build with " Kevin Traynor
2022-10-25 15:07 ` patch 'net/tap: fix overflow of network interface index' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/memif: fix crash with different number of Rx/Tx queues' " Kevin Traynor
2022-10-25 15:07 ` patch 'common/sfc_efx/base: remove VQ index check during VQ start' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/hns3: fix Rx with PTP' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/hns3: fix crash in SVE Tx' " Kevin Traynor
2022-10-25 15:07 ` patch 'net/hns3: fix next-to-use overflow " Kevin Traynor
2022-10-25 15:07 ` patch 'net/hns3: fix next-to-use overflow in simple " Kevin Traynor
2022-10-25 15:07 ` patch 'net/hns3: fix crash when secondary process access FW' " Kevin Traynor

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