patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2
@ 2022-06-09 11:35 Kevin Traynor
  2022-06-09 11:35 ` patch 'test/ring: remove excessive inlining' " Kevin Traynor
                   ` (73 more replies)
  0 siblings, 74 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/8ce6cfe851152ad08d15dbce591ba5241e138608

Thanks.

Kevin

---
From 8ce6cfe851152ad08d15dbce591ba5241e138608 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Wed, 11 May 2022 16:56:50 +0200
Subject: [PATCH] examples/l3fwd: fix scalar LPM

[ upstream commit a137eb2b2512c202eb01ba96bb592a24cffc72c8 ]

The lpm_process_event_pkt() can either process a packet using an
architecture specific (defined for X86/SSE, ARM/Neon and PPC64/Altivec)
path or a scalar one. The choice is however done using an ifdef
pre-processor macro. Because of that the scalar version was apparently
not widely exercised/compiled.
Due to some copy/paste errors, the scalar logic in
lpm_process_event_pkt() retained a "continue" statement where it should
utilize rfc1812_process() and return the port/BAD_PORT.

Fixes: 99fc91d18082 ("examples/l3fwd: add event lpm main loop")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/l3fwd/l3fwd_lpm.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index a5b476ced3..5f5c22705c 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -29,4 +29,5 @@
 
 #include "l3fwd.h"
+#include "l3fwd_common.h"
 #include "l3fwd_event.h"
 
@@ -238,22 +239,5 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
 	struct rte_ether_hdr *eth_hdr = rte_pktmbuf_mtod(mbuf,
 			struct rte_ether_hdr *);
-#ifdef DO_RFC_1812_CHECKS
-	struct rte_ipv4_hdr *ipv4_hdr;
-	if (RTE_ETH_IS_IPV4_HDR(mbuf->packet_type)) {
-		/* Handle IPv4 headers.*/
-		ipv4_hdr = rte_pktmbuf_mtod_offset(mbuf,
-				struct rte_ipv4_hdr *,
-				sizeof(struct rte_ether_hdr));
 
-		if (is_valid_ipv4_pkt(ipv4_hdr, mbuf->pkt_len)
-				< 0) {
-			mbuf->port = BAD_PORT;
-			continue;
-		}
-		/* Update time to live and header checksum */
-		--(ipv4_hdr->time_to_live);
-		++(ipv4_hdr->hdr_checksum);
-	}
-#endif
 	/* dst addr */
 	*(uint64_t *)&eth_hdr->dst_addr = dest_eth_addr[mbuf->port];
@@ -262,4 +246,8 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
 	rte_ether_addr_copy(&ports_eth_addr[mbuf->port],
 			&eth_hdr->src_addr);
+
+	rfc1812_process(rte_pktmbuf_mtod_offset(mbuf, struct rte_ipv4_hdr *,
+						sizeof(struct rte_ether_hdr)),
+			&mbuf->port, mbuf->packet_type);
 #endif
 	return mbuf->port;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.832557114 +0100
+++ 0001-examples-l3fwd-fix-scalar-LPM.patch	2022-06-09 12:34:29.605980402 +0100
@@ -1 +1 @@
-From a137eb2b2512c202eb01ba96bb592a24cffc72c8 Mon Sep 17 00:00:00 2001
+From 8ce6cfe851152ad08d15dbce591ba5241e138608 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a137eb2b2512c202eb01ba96bb592a24cffc72c8 ]
+
@@ -24 +26 @@
-index 501fc5db5e..d1b850dd5b 100644
+index a5b476ced3..5f5c22705c 100644


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

* patch 'test/ring: remove excessive inlining' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'eal/freebsd: fix use of newer cpuset macros' " Kevin Traynor
                   ` (72 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Stanislaw Kardach
  Cc: Bruce Richardson, Honnappa Nagarahalli, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f

Thanks.

Kevin

---
From 3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Wed, 11 May 2022 17:07:25 +0200
Subject: [PATCH] test/ring: remove excessive inlining

[ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ]

Forcing inlining in test_ring_enqueue and test_ring_dequeue can cause
the compiled code to grow extensively when compiled with no optimization
(-O0 or -Og). This is default in the meson's debug configuration. This
can collide with compiler bugs and cause issues during linking of unit
tests where the api_type or esize are non-const variables causing
inlining cascade. In perf tests this is not the case in perf-tests as
esize and api_type are const values.

One such case was discovered when porting DPDK to RISC-V. GCC 11.2 (and
no fix still in 12.1) is generating a short relative jump instruction
(J <offset>) for goto and for loops. When loop body grows extensively in
ring test, the target offset goes beyond supported offfset of +/- 1MB
from PC. This is an obvious bug in the GCC as RISC-V has a
two-instruction construct to jump to any absolute address (AUIPC+JALR).

However there is no reason to force inlining as the test code works
perfectly fine without it.

GCC has a bug report for a similar case (with conditionals):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93062

Fixes: a9fe152363e2 ("test/ring: add custom element size functional tests")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
---
 app/test/test_ring.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_ring.h b/app/test/test_ring.h
index c8bfec8399..45c263f3ff 100644
--- a/app/test/test_ring.h
+++ b/app/test/test_ring.h
@@ -98,5 +98,5 @@ test_ring_copy_from(struct rte_ring_zc_data *zcd, void *dst, int esize,
 }
 
-static __rte_always_inline unsigned int
+static inline unsigned int
 test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 			unsigned int api_type)
@@ -159,5 +159,5 @@ test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 }
 
-static __rte_always_inline unsigned int
+static inline unsigned int
 test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 			unsigned int api_type)
@@ -223,5 +223,5 @@ test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n,
  * performance and functional tests.
  */
-static __rte_always_inline void *
+static inline void *
 test_ring_calloc(unsigned int rsize, int esize)
 {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.852349481 +0100
+++ 0002-test-ring-remove-excessive-inlining.patch	2022-06-09 12:34:29.606980404 +0100
@@ -1 +1 @@
-From 981a025741f80b4036f994ed30b04e757299ab19 Mon Sep 17 00:00:00 2001
+From 3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ]


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

* patch 'eal/freebsd: fix use of newer cpuset macros' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
  2022-06-09 11:35 ` patch 'test/ring: remove excessive inlining' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'test: avoid hang if queues are full and Tx fails' " Kevin Traynor
                   ` (71 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/034b700e08a742502eb214c6ef46a642b817387a

Thanks.

Kevin

---
From 034b700e08a742502eb214c6ef46a642b817387a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 20 May 2022 19:10:50 +0100
Subject: [PATCH] eal/freebsd: fix use of newer cpuset macros

[ upstream commit 2f51bc9c27a4f1da674d66499667155663dcc419 ]

FreeBSD has updated its CPU macros to align more with the definitions
used on Linux[1]. Unfortunately, while this makes compatibility better
in future, it means we need to have both legacy and newer definition
support. Use a meson check to determine which set of macros are used.

[1] https://cgit.freebsd.org/src/commit/?id=e2650af157bc

Bugzilla ID: 1014
Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity")
Fixes: b6be16acfeb1 ("eal: fix control thread affinity with --lcores")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 lib/eal/freebsd/include/rte_os.h | 17 ++++++++++++++++-
 lib/eal/freebsd/meson.build      | 11 +++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/lib/eal/freebsd/include/rte_os.h b/lib/eal/freebsd/include/rte_os.h
index b4afd45adc..003468caff 100644
--- a/lib/eal/freebsd/include/rte_os.h
+++ b/lib/eal/freebsd/include/rte_os.h
@@ -29,4 +29,6 @@ extern "C" {
 typedef cpuset_t rte_cpuset_t;
 #define RTE_HAS_CPUSET
+
+#ifdef RTE_EAL_FREEBSD_CPUSET_LEGACY
 #define RTE_CPU_AND(dst, src1, src2) do \
 { \
@@ -62,5 +64,18 @@ typedef cpuset_t rte_cpuset_t;
 	CPU_COPY(&tmp, dst); \
 } while (0)
-#endif
+#endif /* CPU_NAND */
+
+#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */
+
+#define RTE_CPU_AND CPU_AND
+#define RTE_CPU_OR CPU_OR
+#define RTE_CPU_FILL CPU_FILL
+#define RTE_CPU_NOT(dst, src) do { \
+	cpu_set_t tmp; \
+	CPU_FILL(&tmp); \
+	CPU_XOR(dst, src, &tmp); \
+} while (0)
+
+#endif /* RTE_EAL_FREEBSD_CPUSET_LEGACY */
 
 #ifdef __cplusplus
diff --git a/lib/eal/freebsd/meson.build b/lib/eal/freebsd/meson.build
index 398ceab71d..fe9097303a 100644
--- a/lib/eal/freebsd/meson.build
+++ b/lib/eal/freebsd/meson.build
@@ -20,2 +20,13 @@ sources += files(
 
 deps += ['kvargs', 'telemetry']
+
+# test for version of cpuset macros
+cpuset_test_code = '''
+        #include <sys/types.h>
+        #include <sys/cpuset.h>
+        void cpu_test_or(cpuset_t *s) { CPU_OR(s, s, s); }
+'''
+
+if not cc.compiles(cpuset_test_code, name: 'Detect argument count for CPU_OR')
+    dpdk_conf.set('RTE_EAL_FREEBSD_CPUSET_LEGACY', 1)
+endif
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.872078246 +0100
+++ 0003-eal-freebsd-fix-use-of-newer-cpuset-macros.patch	2022-06-09 12:34:29.607980405 +0100
@@ -1 +1 @@
-From 2f51bc9c27a4f1da674d66499667155663dcc419 Mon Sep 17 00:00:00 2001
+From 034b700e08a742502eb214c6ef46a642b817387a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2f51bc9c27a4f1da674d66499667155663dcc419 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* patch 'test: avoid hang if queues are full and Tx fails' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
  2022-06-09 11:35 ` patch 'test/ring: remove excessive inlining' " Kevin Traynor
  2022-06-09 11:35 ` patch 'eal/freebsd: fix use of newer cpuset macros' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'acl: fix rules with 8-byte field size' " Kevin Traynor
                   ` (70 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/242c01792cbc6a75299951e0177c014b7b74fc6c

Thanks.

Kevin

---
From 242c01792cbc6a75299951e0177c014b7b74fc6c Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 20 Jul 2021 22:20:52 +0530
Subject: [PATCH] test: avoid hang if queues are full and Tx fails

[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]

Current pmd_perf_autotest() in continuous mode tries
to enqueue MAX_TRAFFIC_BURST completely before starting
the test. Some drivers cannot accept complete
MAX_TRAFFIC_BURST even though rx+tx desc count can fit it.
This patch changes behaviour to stop enqueuing after few
retries.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 app/test/test_pmd_perf.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..4094057b27 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -455,4 +455,5 @@ main_loop(__rte_unused void *args)
 #define FRAME_GAP 12
 #define MAC_PREAMBLE 8
+#define MAX_RETRY_COUNT 5
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
 	unsigned lcore_id;
@@ -462,4 +463,6 @@ main_loop(__rte_unused void *args)
 	uint64_t diff_tsc;
 	uint64_t packets_per_second, total_packets;
+	int retry_cnt = 0;
+	int free_pkt = 0;
 
 	lcore_id = rte_lcore_id();
@@ -479,8 +482,17 @@ main_loop(__rte_unused void *args)
 			nb_tx = rte_eth_tx_burst(portid, 0,
 						&tx_burst[idx], nb_tx);
+			if (nb_tx == 0)
+				retry_cnt++;
 			num -= nb_tx;
 			idx += nb_tx;
+			if (retry_cnt == MAX_RETRY_COUNT) {
+				retry_cnt = 0;
+				break;
+			}
 		}
 	}
+	for (free_pkt = idx; free_pkt < (MAX_TRAFFIC_BURST * conf->nb_ports);
+			free_pkt++)
+		rte_pktmbuf_free(tx_burst[free_pkt]);
 	printf("Total packets inject to prime ports = %u\n", idx);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.892223393 +0100
+++ 0004-test-avoid-hang-if-queues-are-full-and-Tx-fails.patch	2022-06-09 12:34:29.609980409 +0100
@@ -1 +1 @@
-From 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 Mon Sep 17 00:00:00 2001
+From 242c01792cbc6a75299951e0177c014b7b74fc6c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 25611bfe9b..ec3dc251d1 100644
+index 0aa9dc1b1c..4094057b27 100644
@@ -25 +26 @@
-@@ -457,4 +457,5 @@ main_loop(__rte_unused void *args)
+@@ -455,4 +455,5 @@ main_loop(__rte_unused void *args)
@@ -31 +32 @@
-@@ -464,4 +465,6 @@ main_loop(__rte_unused void *args)
+@@ -462,4 +463,6 @@ main_loop(__rte_unused void *args)
@@ -38 +39 @@
-@@ -481,8 +484,17 @@ main_loop(__rte_unused void *args)
+@@ -479,8 +482,17 @@ main_loop(__rte_unused void *args)


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

* patch 'acl: fix rules with 8-byte field size' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (2 preceding siblings ...)
  2022-06-09 11:35 ` patch 'test: avoid hang if queues are full and Tx fails' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'rib: fix traversal with /32 route' " Kevin Traynor
                   ` (69 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Ido Goshen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/7bbf330ca1699c46309144027c93471a18929eec

Thanks.

Kevin

---
From 7bbf330ca1699c46309144027c93471a18929eec Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Date: Sun, 15 May 2022 21:03:18 +0100
Subject: [PATCH] acl: fix rules with 8-byte field size

[ upstream commit 451098159c2209bc5c395a30d2dae325af93e8c2 ]

In theory ACL library allows fields with 8B long.
Though in practice they usually not used, not tested,
and as was revealed by Ido, this functionality is not working properly.
There are few places inside ACL build code-path that need to be addressed.

Bugzilla ID: 673
Fixes: dc276b5780c2 ("acl: new library")

Reported-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Tested-by: Ido Goshen <ido@cgstowernetworks.com>
---
 lib/acl/acl_bld.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/acl/acl_bld.c b/lib/acl/acl_bld.c
index 7ea30f4186..2816632803 100644
--- a/lib/acl/acl_bld.c
+++ b/lib/acl/acl_bld.c
@@ -13,4 +13,7 @@
 #define ACL_PTR_ALLOC	32
 
+/* account for situation when all fields are 8B long */
+#define ACL_MAX_INDEXES	(2 * RTE_ACL_MAX_FIELDS)
+
 /* macros for dividing rule sets heuristics */
 #define NODE_MAX	0x4000
@@ -81,5 +84,5 @@ struct acl_build_context {
 	struct rte_acl_trie       tries[RTE_ACL_MAX_TRIES];
 	struct rte_acl_bld_trie   bld_tries[RTE_ACL_MAX_TRIES];
-	uint32_t            data_indexes[RTE_ACL_MAX_TRIES][RTE_ACL_MAX_FIELDS];
+	uint32_t            data_indexes[RTE_ACL_MAX_TRIES][ACL_MAX_INDEXES];
 
 	/* memory free lists for nodes and blocks used for node ptrs */
@@ -989,5 +992,5 @@ build_trie(struct acl_build_context *context, struct rte_acl_build_rule *head,
 				uint64_t mask;
 				mask = RTE_ACL_MASKLEN_TO_BITMASK(
-					fld->mask_range.u32,
+					fld->mask_range.u64,
 					rule->config->defs[n].size);
 
@@ -1302,4 +1305,7 @@ acl_build_index(const struct rte_acl_config *config, uint32_t *data_index)
 			last_header = config->defs[n].input_index;
 			data_index[m++] = config->defs[n].offset;
+			if (config->defs[n].size > sizeof(uint32_t))
+				data_index[m++] = config->defs[n].offset +
+					sizeof(uint32_t);
 		}
 	}
@@ -1488,5 +1494,5 @@ acl_set_data_indexes(struct rte_acl_ctx *ctx)
 			n * sizeof(ctx->data_indexes[0]));
 		ctx->trie[i].data_index = ctx->data_indexes + ofs;
-		ofs += RTE_ACL_MAX_FIELDS;
+		ofs += ACL_MAX_INDEXES;
 	}
 }
@@ -1644,5 +1650,5 @@ rte_acl_build(struct rte_acl_ctx *ctx, const struct rte_acl_config *cfg)
 			rc = rte_acl_gen(ctx, bcx.tries, bcx.bld_tries,
 				bcx.num_tries, bcx.cfg.num_categories,
-				RTE_ACL_MAX_FIELDS * RTE_DIM(bcx.tries) *
+				ACL_MAX_INDEXES * RTE_DIM(bcx.tries) *
 				sizeof(ctx->data_indexes[0]), max_size);
 			if (rc == 0) {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.913213048 +0100
+++ 0005-acl-fix-rules-with-8-byte-field-size.patch	2022-06-09 12:34:29.611980412 +0100
@@ -1 +1 @@
-From 451098159c2209bc5c395a30d2dae325af93e8c2 Mon Sep 17 00:00:00 2001
+From 7bbf330ca1699c46309144027c93471a18929eec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 451098159c2209bc5c395a30d2dae325af93e8c2 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'rib: fix traversal with /32 route' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (3 preceding siblings ...)
  2022-06-09 11:35 ` patch 'acl: fix rules with 8-byte field size' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'mbuf: dump outer VLAN' " Kevin Traynor
                   ` (68 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/6bbdd05838e297f3980d6d221848057f696b99a7

Thanks.

Kevin

---
From 6bbdd05838e297f3980d6d221848057f696b99a7 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Apr 2022 13:01:04 -0700
Subject: [PATCH] rib: fix traversal with /32 route

[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ]

If a /32 route is entered in the RIB the code to traverse
will not see end of the tree. This is due to trying
to do a negative shift which is an undefined in C.

Fix by checking for max depth as is already done in rib6.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/rib/rte_rib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/rib/rte_rib.c b/lib/rib/rte_rib.c
index 6c29e1c49a..1a4b10d728 100644
--- a/lib/rib/rte_rib.c
+++ b/lib/rib/rte_rib.c
@@ -74,4 +74,6 @@ static inline struct rte_rib_node *
 get_nxt_node(struct rte_rib_node *node, uint32_t ip)
 {
+	if (node->depth == RIB_MAXDEPTH)
+		return NULL;
 	return (ip & (1 << (31 - node->depth))) ? node->right : node->left;
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.933581768 +0100
+++ 0006-rib-fix-traversal-with-32-route.patch	2022-06-09 12:34:29.611980412 +0100
@@ -1 +1 @@
-From 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 Mon Sep 17 00:00:00 2001
+From 6bbdd05838e297f3980d6d221848057f696b99a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index cd9e823068..0603980cab 100644
+index 6c29e1c49a..1a4b10d728 100644
@@ -25 +26 @@
-@@ -72,4 +72,6 @@ static inline struct rte_rib_node *
+@@ -74,4 +74,6 @@ static inline struct rte_rib_node *


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

* patch 'mbuf: dump outer VLAN' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (4 preceding siblings ...)
  2022-06-09 11:35 ` patch 'rib: fix traversal with /32 route' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'doc: fix API index Markdown syntax' " Kevin Traynor
                   ` (67 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Ben Magistro; +Cc: Morten Brørup, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/1fae8c76b75781382f55648ac7b156e7b35a6224

Thanks.

Kevin

---
From 1fae8c76b75781382f55648ac7b156e7b35a6224 Mon Sep 17 00:00:00 2001
From: Ben Magistro <koncept1@gmail.com>
Date: Mon, 4 Apr 2022 00:56:35 +0000
Subject: [PATCH] mbuf: dump outer VLAN
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 4d75f3fcdedd86327c5d515e8fe5ece1ef16394d ]

Enable printing of the outer VLAN if flags indicate it is present.

Signed-off-by: Ben Magistro <koncept1@gmail.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/mbuf/rte_mbuf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c
index 604d77bbda..dce900f28f 100644
--- a/lib/mbuf/rte_mbuf.c
+++ b/lib/mbuf/rte_mbuf.c
@@ -686,4 +686,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 		m->pkt_len, m->ol_flags, m->nb_segs, m->port);
 
+	if (m->ol_flags & (RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_TX_QINQ))
+		fprintf(f, ", vlan_tci_outer=%u", m->vlan_tci_outer);
+
 	if (m->ol_flags & (RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_TX_VLAN))
 		fprintf(f, ", vlan_tci=%u", m->vlan_tci);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.952945865 +0100
+++ 0007-mbuf-dump-outer-VLAN.patch	2022-06-09 12:34:29.613980415 +0100
@@ -1 +1 @@
-From 4d75f3fcdedd86327c5d515e8fe5ece1ef16394d Mon Sep 17 00:00:00 2001
+From 1fae8c76b75781382f55648ac7b156e7b35a6224 Mon Sep 17 00:00:00 2001
@@ -9 +9 @@
-Enable printing of the outer VLAN if flags indicate it is present.
+[ upstream commit 4d75f3fcdedd86327c5d515e8fe5ece1ef16394d ]
@@ -11 +11 @@
-Cc: stable@dpdk.org
+Enable printing of the outer VLAN if flags indicate it is present.
@@ -21 +21 @@
-index 87592faccb..a2307cebe6 100644
+index 604d77bbda..dce900f28f 100644
@@ -24 +24 @@
-@@ -675,4 +675,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
+@@ -686,4 +686,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)


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

* patch 'doc: fix API index Markdown syntax' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (5 preceding siblings ...)
  2022-06-09 11:35 ` patch 'mbuf: dump outer VLAN' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'devtools: fix null test for NUMA systems' " Kevin Traynor
                   ` (66 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/0470e12ac43287272da74bf5a772971ecb6fca99

Thanks.

Kevin

---
From 0470e12ac43287272da74bf5a772971ecb6fca99 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Wed, 6 Apr 2022 20:10:11 +0300
Subject: [PATCH] doc: fix API index Markdown syntax

[ upstream commit a9d84ead56b40cb9cb5b4efe8709528f12b81e2e ]

API documentation index had spaces between link caption and URL,
which may be unsupported by some Markdown implementations.
That is, "[caption](URL)" is valid but "[caption] (URL)" is not.
The problematic behavior is observed with Doxygen on Windows.
Remove the spaces.
Unfortunately, Markdown syntax is not formally specified.

Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 doc/api/doxy-api-index.md | 366 +++++++++++++++++++-------------------
 1 file changed, 183 insertions(+), 183 deletions(-)

diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 4245b9635c..baecb2e52e 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -10,221 +10,221 @@ The public API headers are grouped by topics:
 
 - **device**:
-  [dev]                (@ref rte_dev.h),
-  [ethdev]             (@ref rte_ethdev.h),
-  [ethctrl]            (@ref rte_eth_ctrl.h),
-  [rte_flow]           (@ref rte_flow.h),
-  [rte_tm]             (@ref rte_tm.h),
-  [rte_mtr]            (@ref rte_mtr.h),
-  [bbdev]              (@ref rte_bbdev.h),
-  [cryptodev]          (@ref rte_cryptodev.h),
-  [security]           (@ref rte_security.h),
-  [compressdev]        (@ref rte_compressdev.h),
-  [compress]           (@ref rte_comp.h),
-  [regexdev]           (@ref rte_regexdev.h),
-  [dmadev]             (@ref rte_dmadev.h),
-  [eventdev]           (@ref rte_eventdev.h),
-  [event_eth_rx_adapter]   (@ref rte_event_eth_rx_adapter.h),
-  [event_eth_tx_adapter]   (@ref rte_event_eth_tx_adapter.h),
-  [event_timer_adapter]    (@ref rte_event_timer_adapter.h),
-  [event_crypto_adapter]   (@ref rte_event_crypto_adapter.h),
-  [rawdev]             (@ref rte_rawdev.h),
-  [metrics]            (@ref rte_metrics.h),
-  [bitrate]            (@ref rte_bitrate.h),
-  [latency]            (@ref rte_latencystats.h),
-  [devargs]            (@ref rte_devargs.h),
-  [PCI]                (@ref rte_pci.h),
-  [vdev]               (@ref rte_bus_vdev.h),
-  [vfio]               (@ref rte_vfio.h)
+  [dev](@ref rte_dev.h),
+  [ethdev](@ref rte_ethdev.h),
+  [ethctrl](@ref rte_eth_ctrl.h),
+  [rte_flow](@ref rte_flow.h),
+  [rte_tm](@ref rte_tm.h),
+  [rte_mtr](@ref rte_mtr.h),
+  [bbdev](@ref rte_bbdev.h),
+  [cryptodev](@ref rte_cryptodev.h),
+  [security](@ref rte_security.h),
+  [compressdev](@ref rte_compressdev.h),
+  [compress](@ref rte_comp.h),
+  [regexdev](@ref rte_regexdev.h),
+  [dmadev](@ref rte_dmadev.h),
+  [eventdev](@ref rte_eventdev.h),
+  [event_eth_rx_adapter](@ref rte_event_eth_rx_adapter.h),
+  [event_eth_tx_adapter](@ref rte_event_eth_tx_adapter.h),
+  [event_timer_adapter](@ref rte_event_timer_adapter.h),
+  [event_crypto_adapter](@ref rte_event_crypto_adapter.h),
+  [rawdev](@ref rte_rawdev.h),
+  [metrics](@ref rte_metrics.h),
+  [bitrate](@ref rte_bitrate.h),
+  [latency](@ref rte_latencystats.h),
+  [devargs](@ref rte_devargs.h),
+  [PCI](@ref rte_pci.h),
+  [vdev](@ref rte_bus_vdev.h),
+  [vfio](@ref rte_vfio.h)
 
 - **device specific**:
-  [softnic]            (@ref rte_eth_softnic.h),
-  [bond]               (@ref rte_eth_bond.h),
-  [vhost]              (@ref rte_vhost.h),
-  [vdpa]               (@ref rte_vdpa.h),
-  [KNI]                (@ref rte_kni.h),
-  [ixgbe]              (@ref rte_pmd_ixgbe.h),
-  [i40e]               (@ref rte_pmd_i40e.h),
-  [ice]                (@ref rte_pmd_ice.h),
-  [iavf]               (@ref rte_pmd_iavf.h),
-  [ioat]               (@ref rte_ioat_rawdev.h),
-  [bnxt]               (@ref rte_pmd_bnxt.h),
-  [dpaa]               (@ref rte_pmd_dpaa.h),
-  [dpaa2]              (@ref rte_pmd_dpaa2.h),
-  [mlx5]               (@ref rte_pmd_mlx5.h),
-  [dpaa2_mempool]      (@ref rte_dpaa2_mempool.h),
-  [dpaa2_cmdif]        (@ref rte_pmd_dpaa2_cmdif.h),
-  [dpaa2_qdma]         (@ref rte_pmd_dpaa2_qdma.h),
-  [crypto_scheduler]   (@ref rte_cryptodev_scheduler.h),
-  [dlb2]               (@ref rte_pmd_dlb2.h),
-  [ifpga]              (@ref rte_pmd_ifpga.h)
+  [softnic](@ref rte_eth_softnic.h),
+  [bond](@ref rte_eth_bond.h),
+  [vhost](@ref rte_vhost.h),
+  [vdpa](@ref rte_vdpa.h),
+  [KNI](@ref rte_kni.h),
+  [ixgbe](@ref rte_pmd_ixgbe.h),
+  [i40e](@ref rte_pmd_i40e.h),
+  [ice](@ref rte_pmd_ice.h),
+  [iavf](@ref rte_pmd_iavf.h),
+  [ioat](@ref rte_ioat_rawdev.h),
+  [bnxt](@ref rte_pmd_bnxt.h),
+  [dpaa](@ref rte_pmd_dpaa.h),
+  [dpaa2](@ref rte_pmd_dpaa2.h),
+  [mlx5](@ref rte_pmd_mlx5.h),
+  [dpaa2_mempool](@ref rte_dpaa2_mempool.h),
+  [dpaa2_cmdif](@ref rte_pmd_dpaa2_cmdif.h),
+  [dpaa2_qdma](@ref rte_pmd_dpaa2_qdma.h),
+  [crypto_scheduler](@ref rte_cryptodev_scheduler.h),
+  [dlb2](@ref rte_pmd_dlb2.h),
+  [ifpga](@ref rte_pmd_ifpga.h)
 
 - **memory**:
-  [memseg]             (@ref rte_memory.h),
-  [memzone]            (@ref rte_memzone.h),
-  [mempool]            (@ref rte_mempool.h),
-  [malloc]             (@ref rte_malloc.h),
-  [memcpy]             (@ref rte_memcpy.h)
+  [memseg](@ref rte_memory.h),
+  [memzone](@ref rte_memzone.h),
+  [mempool](@ref rte_mempool.h),
+  [malloc](@ref rte_malloc.h),
+  [memcpy](@ref rte_memcpy.h)
 
 - **timers**:
-  [cycles]             (@ref rte_cycles.h),
-  [timer]              (@ref rte_timer.h),
-  [alarm]              (@ref rte_alarm.h)
+  [cycles](@ref rte_cycles.h),
+  [timer](@ref rte_timer.h),
+  [alarm](@ref rte_alarm.h)
 
 - **locks**:
-  [atomic]             (@ref rte_atomic.h),
-  [mcslock]            (@ref rte_mcslock.h),
-  [pflock]             (@ref rte_pflock.h),
-  [rwlock]             (@ref rte_rwlock.h),
-  [spinlock]           (@ref rte_spinlock.h),
-  [ticketlock]         (@ref rte_ticketlock.h),
-  [RCU]                (@ref rte_rcu_qsbr.h)
+  [atomic](@ref rte_atomic.h),
+  [mcslock](@ref rte_mcslock.h),
+  [pflock](@ref rte_pflock.h),
+  [rwlock](@ref rte_rwlock.h),
+  [spinlock](@ref rte_spinlock.h),
+  [ticketlock](@ref rte_ticketlock.h),
+  [RCU](@ref rte_rcu_qsbr.h)
 
 - **CPU arch**:
-  [branch prediction]  (@ref rte_branch_prediction.h),
-  [cache prefetch]     (@ref rte_prefetch.h),
-  [SIMD]               (@ref rte_vect.h),
-  [byte order]         (@ref rte_byteorder.h),
-  [CPU flags]          (@ref rte_cpuflags.h),
-  [CPU pause]          (@ref rte_pause.h),
-  [I/O access]         (@ref rte_io.h),
-  [power management]   (@ref rte_power_intrinsics.h)
+  [branch prediction](@ref rte_branch_prediction.h),
+  [cache prefetch](@ref rte_prefetch.h),
+  [SIMD](@ref rte_vect.h),
+  [byte order](@ref rte_byteorder.h),
+  [CPU flags](@ref rte_cpuflags.h),
+  [CPU pause](@ref rte_pause.h),
+  [I/O access](@ref rte_io.h),
+  [power management](@ref rte_power_intrinsics.h)
 
 - **CPU multicore**:
-  [interrupts]         (@ref rte_interrupts.h),
-  [launch]             (@ref rte_launch.h),
-  [lcore]              (@ref rte_lcore.h),
-  [per-lcore]          (@ref rte_per_lcore.h),
-  [service cores]      (@ref rte_service.h),
-  [keepalive]          (@ref rte_keepalive.h),
-  [power/freq]         (@ref rte_power.h),
-  [PMD power]          (@ref rte_power_pmd_mgmt.h)
+  [interrupts](@ref rte_interrupts.h),
+  [launch](@ref rte_launch.h),
+  [lcore](@ref rte_lcore.h),
+  [per-lcore](@ref rte_per_lcore.h),
+  [service cores](@ref rte_service.h),
+  [keepalive](@ref rte_keepalive.h),
+  [power/freq](@ref rte_power.h),
+  [PMD power](@ref rte_power_pmd_mgmt.h)
 
 - **layers**:
-  [ethernet]           (@ref rte_ether.h),
-  [ARP]                (@ref rte_arp.h),
-  [HIGIG]              (@ref rte_higig.h),
-  [ICMP]               (@ref rte_icmp.h),
-  [ESP]                (@ref rte_esp.h),
-  [IPsec]              (@ref rte_ipsec.h),
-  [IPsec group]        (@ref rte_ipsec_group.h),
-  [IPsec SA]           (@ref rte_ipsec_sa.h),
-  [IPsec SAD]          (@ref rte_ipsec_sad.h),
-  [IP]                 (@ref rte_ip.h),
-  [frag/reass]         (@ref rte_ip_frag.h),
-  [SCTP]               (@ref rte_sctp.h),
-  [TCP]                (@ref rte_tcp.h),
-  [UDP]                (@ref rte_udp.h),
-  [GTP]                (@ref rte_gtp.h),
-  [GRO]                (@ref rte_gro.h),
-  [GSO]                (@ref rte_gso.h),
-  [GRE]                (@ref rte_gre.h),
-  [MPLS]               (@ref rte_mpls.h),
-  [VXLAN]              (@ref rte_vxlan.h),
-  [Geneve]             (@ref rte_geneve.h),
-  [eCPRI]              (@ref rte_ecpri.h),
-  [L2TPv2]             (@ref rte_l2tpv2.h),
-  [PPP]                (@ref rte_ppp.h)
+  [ethernet](@ref rte_ether.h),
+  [ARP](@ref rte_arp.h),
+  [HIGIG](@ref rte_higig.h),
+  [ICMP](@ref rte_icmp.h),
+  [ESP](@ref rte_esp.h),
+  [IPsec](@ref rte_ipsec.h),
+  [IPsec group](@ref rte_ipsec_group.h),
+  [IPsec SA](@ref rte_ipsec_sa.h),
+  [IPsec SAD](@ref rte_ipsec_sad.h),
+  [IP](@ref rte_ip.h),
+  [frag/reass](@ref rte_ip_frag.h),
+  [SCTP](@ref rte_sctp.h),
+  [TCP](@ref rte_tcp.h),
+  [UDP](@ref rte_udp.h),
+  [GTP](@ref rte_gtp.h),
+  [GRO](@ref rte_gro.h),
+  [GSO](@ref rte_gso.h),
+  [GRE](@ref rte_gre.h),
+  [MPLS](@ref rte_mpls.h),
+  [VXLAN](@ref rte_vxlan.h),
+  [Geneve](@ref rte_geneve.h),
+  [eCPRI](@ref rte_ecpri.h),
+  [L2TPv2](@ref rte_l2tpv2.h),
+  [PPP](@ref rte_ppp.h)
 
 - **QoS**:
-  [metering]           (@ref rte_meter.h),
-  [scheduler]          (@ref rte_sched.h),
-  [RED congestion]     (@ref rte_red.h)
+  [metering](@ref rte_meter.h),
+  [scheduler](@ref rte_sched.h),
+  [RED congestion](@ref rte_red.h)
 
 - **routing**:
-  [LPM IPv4 route]     (@ref rte_lpm.h),
-  [LPM IPv6 route]     (@ref rte_lpm6.h),
-  [RIB IPv4]           (@ref rte_rib.h),
-  [RIB IPv6]           (@ref rte_rib6.h),
-  [FIB IPv4]           (@ref rte_fib.h),
-  [FIB IPv6]           (@ref rte_fib6.h)
+  [LPM IPv4 route](@ref rte_lpm.h),
+  [LPM IPv6 route](@ref rte_lpm6.h),
+  [RIB IPv4](@ref rte_rib.h),
+  [RIB IPv6](@ref rte_rib6.h),
+  [FIB IPv4](@ref rte_fib.h),
+  [FIB IPv6](@ref rte_fib6.h)
 
 - **hashes**:
-  [hash]               (@ref rte_hash.h),
-  [jhash]              (@ref rte_jhash.h),
-  [thash]              (@ref rte_thash.h),
-  [thash_gfni]         (@ref rte_thash_gfni.h),
-  [FBK hash]           (@ref rte_fbk_hash.h),
-  [CRC hash]           (@ref rte_hash_crc.h)
+  [hash](@ref rte_hash.h),
+  [jhash](@ref rte_jhash.h),
+  [thash](@ref rte_thash.h),
+  [thash_gfni](@ref rte_thash_gfni.h),
+  [FBK hash](@ref rte_fbk_hash.h),
+  [CRC hash](@ref rte_hash_crc.h)
 
 - **classification**
-  [reorder]            (@ref rte_reorder.h),
-  [distributor]        (@ref rte_distributor.h),
-  [EFD]                (@ref rte_efd.h),
-  [ACL]                (@ref rte_acl.h),
-  [member]             (@ref rte_member.h),
-  [flow classify]      (@ref rte_flow_classify.h),
-  [BPF]                (@ref rte_bpf.h)
+  [reorder](@ref rte_reorder.h),
+  [distributor](@ref rte_distributor.h),
+  [EFD](@ref rte_efd.h),
+  [ACL](@ref rte_acl.h),
+  [member](@ref rte_member.h),
+  [flow classify](@ref rte_flow_classify.h),
+  [BPF](@ref rte_bpf.h)
 
 - **containers**:
-  [mbuf]               (@ref rte_mbuf.h),
-  [mbuf pool ops]      (@ref rte_mbuf_pool_ops.h),
-  [ring]               (@ref rte_ring.h),
-  [stack]              (@ref rte_stack.h),
-  [tailq]              (@ref rte_tailq.h),
-  [bitmap]             (@ref rte_bitmap.h)
+  [mbuf](@ref rte_mbuf.h),
+  [mbuf pool ops](@ref rte_mbuf_pool_ops.h),
+  [ring](@ref rte_ring.h),
+  [stack](@ref rte_stack.h),
+  [tailq](@ref rte_tailq.h),
+  [bitmap](@ref rte_bitmap.h)
 
 - **packet framework**:
-  * [port]             (@ref rte_port.h):
-    [ethdev]           (@ref rte_port_ethdev.h),
-    [ring]             (@ref rte_port_ring.h),
-    [frag]             (@ref rte_port_frag.h),
-    [reass]            (@ref rte_port_ras.h),
-    [sched]            (@ref rte_port_sched.h),
-    [kni]              (@ref rte_port_kni.h),
-    [src/sink]         (@ref rte_port_source_sink.h)
-  * [table]            (@ref rte_table.h):
-    [lpm IPv4]         (@ref rte_table_lpm.h),
-    [lpm IPv6]         (@ref rte_table_lpm_ipv6.h),
-    [ACL]              (@ref rte_table_acl.h),
-    [hash]             (@ref rte_table_hash.h),
-    [array]            (@ref rte_table_array.h),
-    [stub]             (@ref rte_table_stub.h)
-  * [pipeline]         (@ref rte_pipeline.h)
-    [port_in_action]   (@ref rte_port_in_action.h)
-    [table_action]     (@ref rte_table_action.h)
+  * [port](@ref rte_port.h):
+    [ethdev](@ref rte_port_ethdev.h),
+    [ring](@ref rte_port_ring.h),
+    [frag](@ref rte_port_frag.h),
+    [reass](@ref rte_port_ras.h),
+    [sched](@ref rte_port_sched.h),
+    [kni](@ref rte_port_kni.h),
+    [src/sink](@ref rte_port_source_sink.h)
+  * [table](@ref rte_table.h):
+    [lpm IPv4](@ref rte_table_lpm.h),
+    [lpm IPv6](@ref rte_table_lpm_ipv6.h),
+    [ACL](@ref rte_table_acl.h),
+    [hash](@ref rte_table_hash.h),
+    [array](@ref rte_table_array.h),
+    [stub](@ref rte_table_stub.h)
+  * [pipeline](@ref rte_pipeline.h)
+    [port_in_action](@ref rte_port_in_action.h)
+    [table_action](@ref rte_table_action.h)
   * SWX pipeline:
-    [control]          (@ref rte_swx_ctl.h),
-    [extern]           (@ref rte_swx_extern.h),
-    [pipeline]         (@ref rte_swx_pipeline.h)
+    [control](@ref rte_swx_ctl.h),
+    [extern](@ref rte_swx_extern.h),
+    [pipeline](@ref rte_swx_pipeline.h)
   * SWX port:
-    [port]             (@ref rte_swx_port.h),
-    [ethdev]           (@ref rte_swx_port_ethdev.h),
-    [fd]               (@ref rte_swx_port_fd.h),
-    [ring]             (@ref rte_swx_port_ring.h),
-    [src/sink]         (@ref rte_swx_port_source_sink.h)
+    [port](@ref rte_swx_port.h),
+    [ethdev](@ref rte_swx_port_ethdev.h),
+    [fd](@ref rte_swx_port_fd.h),
+    [ring](@ref rte_swx_port_ring.h),
+    [src/sink](@ref rte_swx_port_source_sink.h)
   * SWX table:
-    [table]            (@ref rte_swx_table.h),
-    [table_em]         (@ref rte_swx_table_em.h)
-    [table_wm]         (@ref rte_swx_table_wm.h)
-  * [graph]            (@ref rte_graph.h):
-    [graph_worker]     (@ref rte_graph_worker.h)
+    [table](@ref rte_swx_table.h),
+    [table_em](@ref rte_swx_table_em.h)
+    [table_wm](@ref rte_swx_table_wm.h)
+  * [graph](@ref rte_graph.h):
+    [graph_worker](@ref rte_graph_worker.h)
   * graph_nodes:
-    [eth_node]         (@ref rte_node_eth_api.h),
-    [ip4_node]         (@ref rte_node_ip4_api.h)
+    [eth_node](@ref rte_node_eth_api.h),
+    [ip4_node](@ref rte_node_ip4_api.h)
 
 - **basic**:
-  [bitops]             (@ref rte_bitops.h),
-  [approx fraction]    (@ref rte_approx.h),
-  [random]             (@ref rte_random.h),
-  [config file]        (@ref rte_cfgfile.h),
-  [key/value args]     (@ref rte_kvargs.h),
-  [string]             (@ref rte_string_fns.h)
+  [bitops](@ref rte_bitops.h),
+  [approx fraction](@ref rte_approx.h),
+  [random](@ref rte_random.h),
+  [config file](@ref rte_cfgfile.h),
+  [key/value args](@ref rte_kvargs.h),
+  [string](@ref rte_string_fns.h)
 
 - **debug**:
-  [jobstats]           (@ref rte_jobstats.h),
-  [telemetry]          (@ref rte_telemetry.h),
-  [pcapng]             (@ref rte_pcapng.h),
-  [pdump]              (@ref rte_pdump.h),
-  [hexdump]            (@ref rte_hexdump.h),
-  [debug]              (@ref rte_debug.h),
-  [log]                (@ref rte_log.h),
-  [errno]              (@ref rte_errno.h),
-  [trace]              (@ref rte_trace.h),
-  [trace_point]        (@ref rte_trace_point.h)
+  [jobstats](@ref rte_jobstats.h),
+  [telemetry](@ref rte_telemetry.h),
+  [pcapng](@ref rte_pcapng.h),
+  [pdump](@ref rte_pdump.h),
+  [hexdump](@ref rte_hexdump.h),
+  [debug](@ref rte_debug.h),
+  [log](@ref rte_log.h),
+  [errno](@ref rte_errno.h),
+  [trace](@ref rte_trace.h),
+  [trace_point](@ref rte_trace_point.h)
 
 - **misc**:
-  [EAL config]         (@ref rte_eal.h),
-  [common]             (@ref rte_common.h),
-  [experimental APIs]  (@ref rte_compat.h),
-  [ABI versioning]     (@ref rte_function_versioning.h),
-  [version]            (@ref rte_version.h)
+  [EAL config](@ref rte_eal.h),
+  [common](@ref rte_common.h),
+  [experimental APIs](@ref rte_compat.h),
+  [ABI versioning](@ref rte_function_versioning.h),
+  [version](@ref rte_version.h)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.973472492 +0100
+++ 0008-doc-fix-API-index-Markdown-syntax.patch	2022-06-09 12:34:29.614980417 +0100
@@ -1 +1 @@
-From a9d84ead56b40cb9cb5b4efe8709528f12b81e2e Mon Sep 17 00:00:00 2001
+From 0470e12ac43287272da74bf5a772971ecb6fca99 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a9d84ead56b40cb9cb5b4efe8709528f12b81e2e ]
+
@@ -17,2 +19,2 @@
- doc/api/doxy-api-index.md | 368 +++++++++++++++++++-------------------
- 1 file changed, 184 insertions(+), 184 deletions(-)
+ doc/api/doxy-api-index.md | 366 +++++++++++++++++++-------------------
+ 1 file changed, 183 insertions(+), 183 deletions(-)
@@ -21 +23 @@
-index 2b78d796ea..bb19cf9bc6 100644
+index 4245b9635c..baecb2e52e 100644
@@ -24 +26 @@
-@@ -10,222 +10,222 @@ The public API headers are grouped by topics:
+@@ -10,221 +10,221 @@ The public API headers are grouped by topics:
@@ -92 +93,0 @@
--  [cnxk]               (@ref rte_pmd_cnxk.h),
@@ -113 +113,0 @@
-+  [cnxk](@ref rte_pmd_cnxk.h),


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

* patch 'devtools: fix null test for NUMA systems' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (6 preceding siblings ...)
  2022-06-09 11:35 ` patch 'doc: fix API index Markdown syntax' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'pipeline: fix emit instruction for invalid headers' " Kevin Traynor
                   ` (65 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/43384988f1e76181f5345c3b38fb4be28e380df9

Thanks.

Kevin

---
From 43384988f1e76181f5345c3b38fb4be28e380df9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 13 Apr 2022 13:19:44 +0200
Subject: [PATCH] devtools: fix null test for NUMA systems

[ upstream commit 924de7b8e64489231351c48767973a1042d8ffd3 ]

On NUMA systems, default cores (0 and 1) might be on different memory
nodes. Double the amount of memory.

Fixes: 9e6b36c34ce9 ("app/testpmd: reduce memory consumption")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/test-null.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/devtools/test-null.sh b/devtools/test-null.sh
index 4ba57a6829..6cd34f64f1 100755
--- a/devtools/test-null.sh
+++ b/devtools/test-null.sh
@@ -28,5 +28,6 @@ fi
 
 (sleep 1 && echo stop) |
-$testpmd -c $coremask --no-huge -m 20 \
+# testpmd only needs 20M, make it x2 (default number of cores) for NUMA systems
+$testpmd -c $coremask --no-huge -m 40 \
 	$libs -a 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \
 	--no-mlockall --total-num-mbufs=2048 $testpmd_options -ia
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.993406572 +0100
+++ 0009-devtools-fix-null-test-for-NUMA-systems.patch	2022-06-09 12:34:29.614980417 +0100
@@ -1 +1 @@
-From 924de7b8e64489231351c48767973a1042d8ffd3 Mon Sep 17 00:00:00 2001
+From 43384988f1e76181f5345c3b38fb4be28e380df9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 924de7b8e64489231351c48767973a1042d8ffd3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'pipeline: fix emit instruction for invalid headers' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (7 preceding siblings ...)
  2022-06-09 11:35 ` patch 'devtools: fix null test for NUMA systems' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'pcapng: fix timestamp wrapping in output files' " Kevin Traynor
                   ` (64 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: Venkata Suresh Kumar P, Yogesh Jangra, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/bf68ce756dcb5287d636a8fbda8d82903d09ab85

Thanks.

Kevin

---
From bf68ce756dcb5287d636a8fbda8d82903d09ab85 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Wed, 27 Apr 2022 22:56:52 +0100
Subject: [PATCH] pipeline: fix emit instruction for invalid headers

[ upstream commit 775be5b5399da981100f77988b100613ce44a9d5 ]

Fix the emit instruction for the pathological case of all headers to
be emitted being invalid. In this case, the for loop was essentially
skipped and the last emitted header (or an invalid memory location)
getting corrupted by setting its size to 0 through the assignment to
ho->n_bytes right after the for loop.

Fixes: d60dbdc88a3e ("pipeline: create inline functions for emit instruction")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
---
 lib/pipeline/rte_swx_pipeline_internal.h | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/lib/pipeline/rte_swx_pipeline_internal.h b/lib/pipeline/rte_swx_pipeline_internal.h
index fa944c95f2..c8fa978580 100644
--- a/lib/pipeline/rte_swx_pipeline_internal.h
+++ b/lib/pipeline/rte_swx_pipeline_internal.h
@@ -1821,7 +1821,7 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
 	uint64_t valid_headers = t->valid_headers;
 	uint32_t n_headers_out = t->n_headers_out;
-	struct header_out_runtime *ho = &t->headers_out[n_headers_out - 1];
+	struct header_out_runtime *ho = NULL;
 	uint8_t *ho_ptr = NULL;
-	uint32_t ho_nbytes = 0, first = 1, i;
+	uint32_t ho_nbytes = 0, i;
 
 	for (i = 0; i < n_emit; i++) {
@@ -1835,16 +1835,19 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
 		uint8_t *hi_ptr = t->structs[struct_id];
 
-		if (!MASK64_BIT_GET(valid_headers, header_id))
+		if (!MASK64_BIT_GET(valid_headers, header_id)) {
+			TRACE("[Thread %2u]: emit header %u (invalid)\n",
+			      p->thread_id,
+			      header_id);
+
 			continue;
+		}
 
-		TRACE("[Thread %2u]: emit header %u\n",
+		TRACE("[Thread %2u]: emit header %u (valid)\n",
 		      p->thread_id,
 		      header_id);
 
 		/* Headers. */
-		if (first) {
-			first = 0;
-
-			if (!t->n_headers_out) {
+		if (!ho) {
+			if (!n_headers_out) {
 				ho = &t->headers_out[0];
 
@@ -1859,4 +1862,6 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
 				continue;
 			} else {
+				ho = &t->headers_out[n_headers_out - 1];
+
 				ho_ptr = ho->ptr;
 				ho_nbytes = ho->n_bytes;
@@ -1880,5 +1885,6 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
 	}
 
-	ho->n_bytes = ho_nbytes;
+	if (ho)
+		ho->n_bytes = ho_nbytes;
 	t->n_headers_out = n_headers_out;
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.013050823 +0100
+++ 0010-pipeline-fix-emit-instruction-for-invalid-headers.patch	2022-06-09 12:34:29.617980422 +0100
@@ -1 +1 @@
-From 775be5b5399da981100f77988b100613ce44a9d5 Mon Sep 17 00:00:00 2001
+From bf68ce756dcb5287d636a8fbda8d82903d09ab85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 775be5b5399da981100f77988b100613ce44a9d5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index da3e88bfa8..8d932993fe 100644
+index fa944c95f2..c8fa978580 100644
@@ -26 +27 @@
-@@ -1841,7 +1841,7 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
+@@ -1821,7 +1821,7 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
@@ -36 +37 @@
-@@ -1855,16 +1855,19 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
+@@ -1835,16 +1835,19 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
@@ -62 +63 @@
-@@ -1879,4 +1882,6 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
+@@ -1859,4 +1862,6 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
@@ -69 +70 @@
-@@ -1900,5 +1905,6 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,
+@@ -1880,5 +1885,6 @@ __instr_hdr_emit_many_exec(struct rte_swx_pipeline *p __rte_unused,


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

* patch 'pcapng: fix timestamp wrapping in output files' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (8 preceding siblings ...)
  2022-06-09 11:35 ` patch 'pipeline: fix emit instruction for invalid headers' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:35 ` patch 'examples/ipsec-secgw: fix uninitialized memory access' " Kevin Traynor
                   ` (63 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Quentin Armitage; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/3a9e4cdb3f8cf9b98b22ef0d51a22dcf6519cdb8

Thanks.

Kevin

---
From 3a9e4cdb3f8cf9b98b22ef0d51a22dcf6519cdb8 Mon Sep 17 00:00:00 2001
From: Quentin Armitage <quentin@armitage.org.uk>
Date: Tue, 17 May 2022 11:01:15 +0100
Subject: [PATCH] pcapng: fix timestamp wrapping in output files

[ upstream commit c882eb544842d94ce06af12b87bb7a4c572b20fb ]

In pcap_tsc_to_ns(), delta * NSEC_PER_SEC will overflow approx 8
seconds after pcap_init is called when using a TSC with a frequency
of 2.5GHz.

To avoid the overflow, update the saved time and TSC value once
delta >= tsc_hz.

Fixes: 8d23ce8f5ee ("pcapng: add new library for writing pcapng files")

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/pcapng/rte_pcapng.c | 45 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 41 insertions(+), 4 deletions(-)

diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 9db058fe42..0caf3d31f8 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -21,4 +21,5 @@
 #include <rte_mbuf.h>
 #include <rte_pcapng.h>
+#include <rte_reciprocal.h>
 #include <rte_time.h>
 
@@ -36,10 +37,13 @@ struct rte_pcapng {
 
 /* For converting TSC cycles to PCAPNG ns format */
-struct pcapng_time {
+static struct pcapng_time {
 	uint64_t ns;
 	uint64_t cycles;
+	uint64_t tsc_hz;
+	struct rte_reciprocal_u64 tsc_hz_inverse;
 } pcapng_time;
 
-RTE_INIT(pcapng_init)
+static inline void
+pcapng_init(void)
 {
 	struct timespec ts;
@@ -47,5 +51,9 @@ RTE_INIT(pcapng_init)
 	pcapng_time.cycles = rte_get_tsc_cycles();
 	clock_gettime(CLOCK_REALTIME, &ts);
+	pcapng_time.cycles = (pcapng_time.cycles + rte_get_tsc_cycles()) / 2;
 	pcapng_time.ns = rte_timespec_to_ns(&ts);
+
+	pcapng_time.tsc_hz = rte_get_tsc_hz();
+	pcapng_time.tsc_hz_inverse = rte_reciprocal_value_u64(pcapng_time.tsc_hz);
 }
 
@@ -53,8 +61,37 @@ RTE_INIT(pcapng_init)
 static uint64_t pcapng_tsc_to_ns(uint64_t cycles)
 {
-	uint64_t delta;
+	uint64_t delta, secs;
 
+	if (!pcapng_time.tsc_hz)
+		pcapng_init();
+
+	/* In essence the calculation is:
+	 *   delta = (cycles - pcapng_time.cycles) * NSEC_PRE_SEC / rte_get_tsc_hz()
+	 * but this overflows within 4 to 8 seconds depending on TSC frequency.
+	 * Instead, if delta >= pcapng_time.tsc_hz:
+	 *   Increase pcapng_time.ns and pcapng_time.cycles by the number of
+	 *   whole seconds in delta and reduce delta accordingly.
+	 * delta will therefore always lie in the interval [0, pcapng_time.tsc_hz),
+	 * which will not overflow when multiplied by NSEC_PER_SEC provided the
+	 * TSC frequency < approx 18.4GHz.
+	 *
+	 * Currently all TSCs operate below 5GHz.
+	 */
 	delta = cycles - pcapng_time.cycles;
-	return pcapng_time.ns + (delta * NSEC_PER_SEC) / rte_get_tsc_hz();
+	if (unlikely(delta >= pcapng_time.tsc_hz)) {
+		if (likely(delta < pcapng_time.tsc_hz * 2)) {
+			delta -= pcapng_time.tsc_hz;
+			pcapng_time.cycles += pcapng_time.tsc_hz;
+			pcapng_time.ns += NSEC_PER_SEC;
+		} else {
+			secs = rte_reciprocal_divide_u64(delta, &pcapng_time.tsc_hz_inverse);
+			delta -= secs * pcapng_time.tsc_hz;
+			pcapng_time.cycles += secs * pcapng_time.tsc_hz;
+			pcapng_time.ns += secs * NSEC_PER_SEC;
+		}
+	}
+
+	return pcapng_time.ns + rte_reciprocal_divide_u64(delta * NSEC_PER_SEC,
+							  &pcapng_time.tsc_hz_inverse);
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.035182769 +0100
+++ 0011-pcapng-fix-timestamp-wrapping-in-output-files.patch	2022-06-09 12:34:29.618980424 +0100
@@ -1 +1 @@
-From c882eb544842d94ce06af12b87bb7a4c572b20fb Mon Sep 17 00:00:00 2001
+From 3a9e4cdb3f8cf9b98b22ef0d51a22dcf6519cdb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c882eb544842d94ce06af12b87bb7a4c572b20fb ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 90b2f5bc69..06ad712bd1 100644
+index 9db058fe42..0caf3d31f8 100644
@@ -26 +27 @@
-@@ -20,4 +20,5 @@
+@@ -21,4 +21,5 @@
@@ -32 +33 @@
-@@ -35,10 +36,13 @@ struct rte_pcapng {
+@@ -36,10 +37,13 @@ struct rte_pcapng {
@@ -48 +49 @@
-@@ -46,5 +50,9 @@ RTE_INIT(pcapng_init)
+@@ -47,5 +51,9 @@ RTE_INIT(pcapng_init)
@@ -58 +59 @@
-@@ -52,8 +60,37 @@ RTE_INIT(pcapng_init)
+@@ -53,8 +61,37 @@ RTE_INIT(pcapng_init)


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

* patch 'examples/ipsec-secgw: fix uninitialized memory access' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (9 preceding siblings ...)
  2022-06-09 11:35 ` patch 'pcapng: fix timestamp wrapping in output files' " Kevin Traynor
@ 2022-06-09 11:35 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " Kevin Traynor
                   ` (62 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:35 UTC (permalink / raw)
  To: Volodymyr Fialko; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/51952c8f0ca75186b972dcef5e2627221157180d

Thanks.

Kevin

---
From 51952c8f0ca75186b972dcef5e2627221157180d Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko@marvell.com>
Date: Fri, 25 Mar 2022 12:29:42 +0100
Subject: [PATCH] examples/ipsec-secgw: fix uninitialized memory access

[ upstream commit 0b512a92b77009ab6e4291382b18f0e0ac74645f ]

rte_flow_validate and rte_flow_create not always initialize flow error.
Using error.message in some error cases will cause read from
uninitialized memory.

Fixes: 6738c0a9569 ("examples/ipsec-secgw: support flow director")

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/flow.c  | 2 +-
 examples/ipsec-secgw/ipsec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/flow.c b/examples/ipsec-secgw/flow.c
index 1a1ec7861c..c217b9e475 100644
--- a/examples/ipsec-secgw/flow.c
+++ b/examples/ipsec-secgw/flow.c
@@ -215,5 +215,5 @@ flow_init_single(struct flow_rule_entry *rule)
 	struct rte_flow_action action[MAX_RTE_FLOW_ACTIONS] = {};
 	struct rte_flow_attr attr = {};
-	struct rte_flow_error err;
+	struct rte_flow_error err = {};
 	int ret;
 
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 2d4a26c962..b66ff2b650 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -497,5 +497,5 @@ create_ipsec_esp_flow(struct ipsec_sa *sa)
 {
 	int ret = 0;
-	struct rte_flow_error err;
+	struct rte_flow_error err = {};
 	if (sa->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
 		RTE_LOG(ERR, IPSEC,
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.055204563 +0100
+++ 0012-examples-ipsec-secgw-fix-uninitialized-memory-access.patch	2022-06-09 12:34:29.619980426 +0100
@@ -1 +1 @@
-From 0b512a92b77009ab6e4291382b18f0e0ac74645f Mon Sep 17 00:00:00 2001
+From 51952c8f0ca75186b972dcef5e2627221157180d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0b512a92b77009ab6e4291382b18f0e0ac74645f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/ipsec-secgw: fix promiscuous mode option' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (10 preceding siblings ...)
  2022-06-09 11:35 ` patch 'examples/ipsec-secgw: fix uninitialized memory access' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'test/crypto: fix null check for ZUC authentication' " Kevin Traynor
                   ` (61 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/0b9e45d53423a127256ec8b1bf6669499ac42c7e

Thanks.

Kevin

---
From 0b9e45d53423a127256ec8b1bf6669499ac42c7e Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 28 Apr 2022 20:48:30 +0530
Subject: [PATCH] examples/ipsec-secgw: fix promiscuous mode option

[ upstream commit 23d3a468c42ac8b63a36c9c4a6f01e459350f777 ]

Currently default value of promiscuous mode flag is true and
even there is command line argument to set it to true.
So it never is in non-promiscuous mode. Fix it by
changing default value to false.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 21abc0d251..a1faff6a59 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -170,5 +170,5 @@ uint32_t single_sa_idx;
 static uint32_t enabled_port_mask;
 static uint64_t enabled_cryptodev_mask = UINT64_MAX;
-static int32_t promiscuous_on = 1;
+static int32_t promiscuous_on;
 static int32_t numa_on = 1; /**< NUMA is enabled by default. */
 static uint32_t nb_lcores;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.075227718 +0100
+++ 0013-examples-ipsec-secgw-fix-promiscuous-mode-option.patch	2022-06-09 12:34:29.623980433 +0100
@@ -1 +1 @@
-From 23d3a468c42ac8b63a36c9c4a6f01e459350f777 Mon Sep 17 00:00:00 2001
+From 0b9e45d53423a127256ec8b1bf6669499ac42c7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 23d3a468c42ac8b63a36c9c4a6f01e459350f777 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ad1b55f85c..25255e053c 100644
+index 21abc0d251..a1faff6a59 100644
@@ -24 +25 @@
-@@ -169,5 +169,5 @@ uint32_t single_sa_idx;
+@@ -170,5 +170,5 @@ uint32_t single_sa_idx;


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

* patch 'test/crypto: fix null check for ZUC authentication' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (11 preceding siblings ...)
  2022-06-09 11:36 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " Kevin Traynor
                   ` (60 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Ciara Power; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/877eae4a8c612d486afac7c1df44b0a5ba19889f

Thanks.

Kevin

---
From 877eae4a8c612d486afac7c1df44b0a5ba19889f Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 11 May 2022 13:29:24 +0000
Subject: [PATCH] test/crypto: fix null check for ZUC authentication

[ upstream commit e6d37ffa69ac7fb4eec9580af5b005e6c130b79d ]

Check if the returned op is NULL because of failure,
before using it and causing a segmentation fault.

Fixes: 4c99481f49c4 ("app/test: add ZUC")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 16431efc88..7a1c649757 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6234,6 +6234,6 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
 		ut_params->op = process_crypto_request(ts_params->valid_devs[0],
 				ut_params->op);
-	ut_params->obuf = ut_params->op->sym->m_src;
 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
+	ut_params->obuf = ut_params->op->sym->m_src;
 	ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
 			+ plaintext_pad_len;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.097078725 +0100
+++ 0014-test-crypto-fix-null-check-for-ZUC-authentication.patch	2022-06-09 12:34:29.634980451 +0100
@@ -1 +1 @@
-From e6d37ffa69ac7fb4eec9580af5b005e6c130b79d Mon Sep 17 00:00:00 2001
+From 877eae4a8c612d486afac7c1df44b0a5ba19889f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6d37ffa69ac7fb4eec9580af5b005e6c130b79d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f444144cc6..4ffaadc008 100644
+index 16431efc88..7a1c649757 100644
@@ -22 +23 @@
-@@ -6239,6 +6239,6 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
+@@ -6234,6 +6234,6 @@ test_zuc_authentication(const struct wireless_test_data *tdata)


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

* patch 'drivers/crypto: fix warnings for OpenSSL version' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (12 preceding siblings ...)
  2022-06-09 11:36 ` patch 'test/crypto: fix null check for ZUC authentication' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'test/crypto: fix driver name for DPAA raw API test' " Kevin Traynor
                   ` (59 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Daxue Gao, David Marchand, Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/ef06b4307eb59be8ef67eb4cdfcdb12992051e0e

Thanks.

Kevin

---
From ef06b4307eb59be8ef67eb4cdfcdb12992051e0e Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 10 May 2022 17:06:35 +0200
Subject: [PATCH] drivers/crypto: fix warnings for OpenSSL version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]

The API of the OpenSSL library has changed with version 3.0. This results
in a lot of compiler warnings like

    ../dpdk/drivers/crypto/ccp/ccp_crypto.c:182:9:
    warning: ‘SHA256_Transform’ is deprecated:
    Since OpenSSL 3.0 [-Wdeprecated-declarations]

As many Linux distributions still use elder OpenSSL libraries we cannot
change the used API now. Instead define OPENSSL_API_COMPAT to indicate
that we are using the OpenSSL 1.1.0 API.

OPENSSL_API_COMPAT is introduced in *.c files and not in *.h files as some
*.c files directly include OpenSSL headers.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/ccp/ccp_crypto.c              | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd.c     | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 2 ++
 drivers/crypto/qat/qat_sym.c                 | 2 ++
 drivers/crypto/qat/qat_sym_session.c         | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4ed91a7436..4bab18323b 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <dirent.h>
 #include <fcntl.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 5794ed8159..5977bc746c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 52715f86f8..35c4ad13ba 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <string.h>
 
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 00ec703754..0dd83ee2ee 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/evp.h>
 
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 8ca475ca8b..f439bbd0f1 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/sha.h>	/* Needed to calculate pre-compute values */
 #include <openssl/aes.h>	/* Needed to calculate pre-compute values */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.126109737 +0100
+++ 0015-drivers-crypto-fix-warnings-for-OpenSSL-version.patch	2022-06-09 12:34:29.640980462 +0100
@@ -1 +1 @@
-From 7360749f167b9039f549818700db3f57d6f8a9fd Mon Sep 17 00:00:00 2001
+From ef06b4307eb59be8ef67eb4cdfcdb12992051e0e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -50 +51 @@
-index d80e1052e2..4f331af157 100644
+index 5794ed8159..5977bc746c 100644
@@ -61 +62 @@
-index 1cb07794bd..87c395a836 100644
+index 52715f86f8..35c4ad13ba 100644
@@ -72 +73 @@
-index ca8c9a8124..3a6c9dcc0a 100644
+index 00ec703754..0dd83ee2ee 100644
@@ -83 +84 @@
-index 9d6a19c0be..737a180810 100644
+index 8ca475ca8b..f439bbd0f1 100644


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

* patch 'test/crypto: fix driver name for DPAA raw API test' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (13 preceding siblings ...)
  2022-06-09 11:36 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'doc: add missing auth algo for IPsec example' " Kevin Traynor
                   ` (58 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/db0adcbebe5c0fb4ab257d2c5d5db02810248ea7

Thanks.

Kevin

---
From db0adcbebe5c0fb4ab257d2c5d5db02810248ea7 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 20 May 2022 09:51:01 +0530
Subject: [PATCH] test/crypto: fix driver name for DPAA raw API test

[ upstream commit 97ed177930d76d85d4f111dc5a104568abafb88b ]

PMD name for DPAA raw buffer crypto driver test cases is
updated with correct name.

Fixes: cd8166c28cd1 ("test/crypto: add raw API test for dpaax")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 7a1c649757..553c52e0dd 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -15698,5 +15698,5 @@ static int
 test_cryptodev_dpaa_sec_raw_api(void)
 {
-	static const char *pmd_name = RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD);
+	static const char *pmd_name = RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD);
 	int ret;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.149559652 +0100
+++ 0016-test-crypto-fix-driver-name-for-DPAA-raw-API-test.patch	2022-06-09 12:34:29.650980479 +0100
@@ -1 +1 @@
-From 97ed177930d76d85d4f111dc5a104568abafb88b Mon Sep 17 00:00:00 2001
+From db0adcbebe5c0fb4ab257d2c5d5db02810248ea7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97ed177930d76d85d4f111dc5a104568abafb88b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4ffaadc008..7c5d55368b 100644
+index 7a1c649757..553c52e0dd 100644
@@ -22 +23 @@
-@@ -16589,5 +16589,5 @@ static int
+@@ -15698,5 +15698,5 @@ static int


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

* patch 'doc: add missing auth algo for IPsec example' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (14 preceding siblings ...)
  2022-06-09 11:36 ` patch 'test/crypto: fix driver name for DPAA raw API test' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: fix port status of bonding slave device' " Kevin Traynor
                   ` (57 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/9bd73e2c323bbe61fcc5c1a1625e00174273a86c

Thanks.

Kevin

---
From 9bd73e2c323bbe61fcc5c1a1625e00174273a86c Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 20 May 2022 09:51:04 +0530
Subject: [PATCH] doc: add missing auth algo for IPsec example

[ upstream commit d05828ac583876f05590ac14136c398a54014bc6 ]

Adding the missing SHA256-HMAC authentication algorithm
in ipsec-secgw guide.

Fixes: b5350285ce6e ("examples/ipsec-secgw: support SHA256 HMAC")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/sample_app_ug/ipsec_secgw.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst
index c53ee7c386..468a977478 100644
--- a/doc/guides/sample_app_ug/ipsec_secgw.rst
+++ b/doc/guides/sample_app_ug/ipsec_secgw.rst
@@ -117,5 +117,6 @@ Constraints
 *  No AH mode.
 *  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, HMAC-SHA1,
-   AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305 and NULL.
+   HMAC-SHA256, AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305
+   and NULL.
 *  Each SA must be handle by a unique lcore (*1 RX queue per port*).
 
@@ -587,4 +588,5 @@ where each options means:
     * *null*: NULL algorithm
     * *sha1-hmac*: HMAC SHA1 algorithm
+    * *sha256-hmac*: HMAC SHA256 algorithm
 
 ``<auth_key>``
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.178209102 +0100
+++ 0017-doc-add-missing-auth-algo-for-IPsec-example.patch	2022-06-09 12:34:29.651980480 +0100
@@ -1 +1 @@
-From d05828ac583876f05590ac14136c398a54014bc6 Mon Sep 17 00:00:00 2001
+From 9bd73e2c323bbe61fcc5c1a1625e00174273a86c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d05828ac583876f05590ac14136c398a54014bc6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- doc/guides/sample_app_ug/ipsec_secgw.rst | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ doc/guides/sample_app_ug/ipsec_secgw.rst | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
@@ -19 +20 @@
-index 5cb6a69a27..94197a34f0 100644
+index c53ee7c386..468a977478 100644
@@ -22 +23 @@
-@@ -117,6 +117,6 @@ Constraints
+@@ -117,5 +117,6 @@ Constraints
@@ -24,5 +25,4 @@
- *  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, DES-CBC,
--   HMAC-SHA1, AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305
--   and NULL.
-+   HMAC-SHA1, HMAC-SHA256, AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM,
-+   CHACHA20_POLY1305 and NULL.
+ *  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, HMAC-SHA1,
+-   AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305 and NULL.
++   HMAC-SHA256, AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305
++   and NULL.
@@ -31 +31 @@
-@@ -596,4 +596,5 @@ where each options means:
+@@ -587,4 +588,5 @@ where each options means:
@@ -35 +34,0 @@
-     * *aes-xcbc-mac*: AES XCBC MAC algorithm
@@ -36,0 +36 @@
+ ``<auth_key>``


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

* patch 'app/testpmd: fix port status of bonding slave device' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (15 preceding siblings ...)
  2022-06-09 11:36 ` patch 'doc: add missing auth algo for IPsec example' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' " Kevin Traynor
                   ` (56 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, Aman Singh, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/0dd479b1a1df56292b58b4b8983c94aac5bfb5f7

Thanks.

Kevin

---
From 0dd479b1a1df56292b58b4b8983c94aac5bfb5f7 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 11 May 2022 10:14:34 +0800
Subject: [PATCH] app/testpmd: fix port status of bonding slave device

[ upstream commit e46372d7b082706718bb17981ae632e4e4d56414 ]

Starting or stopping a bonded port also starts or stops all active slaves
under the bonded port. If this port is a bonded device, we need to modify
the port status of all slaves.

Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
---
 app/test-pmd/cmdline.c |  1 +
 app/test-pmd/testpmd.c | 73 +++++++++++++++++++++++++++++++++++++++---
 app/test-pmd/testpmd.h |  3 +-
 3 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0b5bece513..2c531ff0af 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -6661,4 +6661,5 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,
 				port_id, rte_strerror(-ret));
 
+		ports[port_id].bond_flag = 1;
 		ports[port_id].need_setup = 0;
 		ports[port_id].port_status = RTE_PORT_STOPPED;
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e4f9d5f147..dd1f286d59 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -67,4 +67,7 @@
 #include <process.h>
 #endif
+#ifdef RTE_NET_BOND
+#include <rte_eth_bond.h>
+#endif
 
 #include "testpmd.h"
@@ -598,9 +601,56 @@ eth_dev_configure_mp(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 }
 
+static int
+change_bonding_slave_port_status(portid_t bond_pid, bool is_stop)
+{
+#ifdef RTE_NET_BOND
+
+	portid_t slave_pids[RTE_MAX_ETHPORTS];
+	struct rte_port *port;
+	int num_slaves;
+	portid_t slave_pid;
+	int i;
+
+	num_slaves = rte_eth_bond_slaves_get(bond_pid, slave_pids,
+						RTE_MAX_ETHPORTS);
+	if (num_slaves < 0) {
+		fprintf(stderr, "Failed to get slave list for port = %u\n",
+			bond_pid);
+		return num_slaves;
+	}
+
+	for (i = 0; i < num_slaves; i++) {
+		slave_pid = slave_pids[i];
+		port = &ports[slave_pid];
+		port->port_status =
+			is_stop ? RTE_PORT_STOPPED : RTE_PORT_STARTED;
+	}
+#else
+	RTE_SET_USED(bond_pid);
+	RTE_SET_USED(is_stop);
+#endif
+	return 0;
+}
+
 static int
 eth_dev_start_mp(uint16_t port_id)
 {
-	if (is_proc_primary())
-		return rte_eth_dev_start(port_id);
+	int ret;
+
+	if (is_proc_primary()) {
+		ret = rte_eth_dev_start(port_id);
+		if (ret != 0)
+			return ret;
+
+		struct rte_port *port = &ports[port_id];
+
+		/*
+		 * Starting a bonded port also starts all slaves under the bonded
+		 * device. So if this port is bond device, we need to modify the
+		 * port status of these slaves.
+		 */
+		if (port->bond_flag == 1)
+			return change_bonding_slave_port_status(port_id, false);
+	}
 
 	return 0;
@@ -610,6 +660,21 @@ static int
 eth_dev_stop_mp(uint16_t port_id)
 {
-	if (is_proc_primary())
-		return rte_eth_dev_stop(port_id);
+	int ret;
+
+	if (is_proc_primary()) {
+		ret = rte_eth_dev_stop(port_id);
+		if (ret != 0)
+			return ret;
+
+		struct rte_port *port = &ports[port_id];
+
+		/*
+		 * Stopping a bonded port also stops all slaves under the bonded
+		 * device. So if this port is bond device, we need to modify the
+		 * port status of these slaves.
+		 */
+		if (port->bond_flag == 1)
+			return change_bonding_slave_port_status(port_id, true);
+	}
 
 	return 0;
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9967825044..bedc4e07fb 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -244,5 +244,6 @@ struct rte_port {
 	struct rte_ether_addr   *mc_addr_pool; /**< pool of multicast addrs */
 	uint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */
-	uint8_t                 slave_flag; /**< bonding slave port */
+	uint8_t                 slave_flag : 1, /**< bonding slave port */
+				bond_flag : 1; /**< port is bond device */
 	struct port_flow        *flow_list; /**< Associated flows. */
 	struct port_indirect_action *actions_list;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.197919359 +0100
+++ 0018-app-testpmd-fix-port-status-of-bonding-slave-device.patch	2022-06-09 12:34:29.666980506 +0100
@@ -1 +1 @@
-From e46372d7b082706718bb17981ae632e4e4d56414 Mon Sep 17 00:00:00 2001
+From 0dd479b1a1df56292b58b4b8983c94aac5bfb5f7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e46372d7b082706718bb17981ae632e4e4d56414 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 91e4090582..44ddf9bbc8 100644
+index 0b5bece513..2c531ff0af 100644
@@ -27 +28 @@
-@@ -6668,4 +6668,5 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,
+@@ -6661,4 +6661,5 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,
@@ -34 +35 @@
-index 79bb23264b..777763f749 100644
+index e4f9d5f147..dd1f286d59 100644
@@ -129 +130 @@
-index 31f766c965..67f253b30e 100644
+index 9967825044..bedc4e07fb 100644
@@ -132,3 +133,3 @@
-@@ -267,5 +267,6 @@ struct rte_port {
- 	queueid_t               queue_nb; /**< nb. of queues for flow rules */
- 	uint32_t                queue_sz; /**< size of a queue for flow rules */
+@@ -244,5 +244,6 @@ struct rte_port {
+ 	struct rte_ether_addr   *mc_addr_pool; /**< pool of multicast addrs */
+ 	uint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */
@@ -138,2 +139,2 @@
- 	struct port_template    *pattern_templ_list; /**< Pattern templates. */
- 	struct port_template    *actions_templ_list; /**< Actions templates. */
+ 	struct port_flow        *flow_list; /**< Associated flows. */
+ 	struct port_indirect_action *actions_list;


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

* patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (16 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: fix port status of bonding slave device' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: remove useless pointer checks' " Kevin Traynor
                   ` (55 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Jiayu Hu, Wei Ling, Yuying Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/960622e0ddb839accd2852af3e36aadbf3034217

Thanks.

Kevin

---
From 960622e0ddb839accd2852af3e36aadbf3034217 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Thu, 12 May 2022 01:07:56 +0000
Subject: [PATCH] app/testpmd: perform SW IP checksum for GRO/GSO packets

[ upstream commit 1945c64674b2b9ad55af0ef31f8a02ae0b747400 ]

The GRO/GSO library doesn't re-calculate checksums for
merged/fragmented packets. If users want the packets to
have correct IP checksums, they should select HW IP
checksum calculation for the port which the packets are
transmitted to. But if the port doesn't support HW IP
checksum, users may perform a SW IP checksum.

Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO")
Fixes: 52f38a2055ed ("app/testpmd: enable TCP/IPv4 VxLAN and GRE GSO")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
---
 app/test-pmd/csumonly.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index f0c69c5d16..24265ce4de 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -769,4 +769,26 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 }
 
+#if defined(RTE_LIB_GRO) || defined(RTE_LIB_GSO)
+/*
+ * Re-calculate IP checksum for merged/fragmented packets.
+ */
+static void
+pkts_ip_csum_recalc(struct rte_mbuf **pkts_burst, const uint16_t nb_pkts, uint64_t tx_offloads)
+{
+	int i;
+	struct rte_ipv4_hdr *ipv4_hdr;
+	for (i = 0; i < nb_pkts; i++) {
+		if ((pkts_burst[i]->ol_flags & RTE_MBUF_F_TX_IPV4) &&
+			(tx_offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) == 0) {
+			ipv4_hdr = rte_pktmbuf_mtod_offset(pkts_burst[i],
+						struct rte_ipv4_hdr *,
+						pkts_burst[i]->l2_len);
+			ipv4_hdr->hdr_checksum = 0;
+			ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
+		}
+	}
+}
+#endif
+
 /*
  * Receive a burst of packets, and for each packet:
@@ -1092,4 +1114,6 @@ tunnel_update:
 			}
 		}
+
+		pkts_ip_csum_recalc(pkts_burst, nb_rx, tx_offloads);
 	}
 #endif
@@ -1125,4 +1149,6 @@ tunnel_update:
 		tx_pkts_burst = gso_segments;
 		nb_rx = nb_segments;
+
+		pkts_ip_csum_recalc(tx_pkts_burst, nb_rx, tx_offloads);
 	} else
 #endif
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.231901931 +0100
+++ 0019-app-testpmd-perform-SW-IP-checksum-for-GRO-GSO-packe.patch	2022-06-09 12:34:29.667980508 +0100
@@ -1 +1 @@
-From 1945c64674b2b9ad55af0ef31f8a02ae0b747400 Mon Sep 17 00:00:00 2001
+From 960622e0ddb839accd2852af3e36aadbf3034217 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1945c64674b2b9ad55af0ef31f8a02ae0b747400 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index cdb1920763..05763a71e8 100644
+index f0c69c5d16..24265ce4de 100644
@@ -29 +30 @@
-@@ -779,4 +779,26 @@ pkt_copy_split(const struct rte_mbuf *pkt)
+@@ -769,4 +769,26 @@ pkt_copy_split(const struct rte_mbuf *pkt)
@@ -56 +57 @@
-@@ -1103,4 +1125,6 @@ tunnel_update:
+@@ -1092,4 +1114,6 @@ tunnel_update:
@@ -63 +64 @@
-@@ -1136,4 +1160,6 @@ tunnel_update:
+@@ -1125,4 +1149,6 @@ tunnel_update:


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

* patch 'app/testpmd: remove useless pointer checks' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (17 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/hns3: fix xstats get return if xstats is null' " Kevin Traynor
                   ` (54 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/f84770f8fcc62e7a3e2e2c8c32dff99e0a2c2b31

Thanks.

Kevin

---
From f84770f8fcc62e7a3e2e2c8c32dff99e0a2c2b31 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 24 Mar 2022 17:15:03 +0100
Subject: [PATCH] app/testpmd: remove useless pointer checks

[ upstream commit 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 ]

Parameters to this static helper can't be NULL.
str has already been dereferenced in caller.
dst and size point to variable in stack.

Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/cmdline_flow.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index a8140eda92..ce57e409df 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -7706,9 +7706,5 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
 	uint32_t left;
 
-	/* Check input parameters */
-	if ((src == NULL) ||
-		(dst == NULL) ||
-		(size == NULL) ||
-		(*size == 0))
+	if (*size == 0)
 		return -1;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.252371780 +0100
+++ 0020-app-testpmd-remove-useless-pointer-checks.patch	2022-06-09 12:34:29.673980518 +0100
@@ -1 +1 @@
-From 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 Mon Sep 17 00:00:00 2001
+From f84770f8fcc62e7a3e2e2c8c32dff99e0a2c2b31 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fc4a6d9cca..e3269e278d 100644
+index a8140eda92..ce57e409df 100644
@@ -22 +23 @@
-@@ -9339,9 +9339,5 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
+@@ -7706,9 +7706,5 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)


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

* patch 'net/hns3: fix xstats get return if xstats is null' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (18 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: remove useless pointer checks' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ipn3ke: " Kevin Traynor
                   ` (53 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/0072520fd5b67a2ed2c4b7af40bda0c2294dbcab

Thanks.

Kevin

---
From 0072520fd5b67a2ed2c4b7af40bda0c2294dbcab Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:51 +0800
Subject: [PATCH] net/hns3: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e15401f362779dba8623b4ee3db388fdf79dca7f ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently hns3 PMD
returns zero when xstats is null.

Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/hns3/hns3_stats.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 2799ff4432..07fad03485 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -1032,7 +1032,11 @@ hns3_imissed_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
  *   A pointer to a table of structure of type *rte_eth_xstat*
  *   to be filled with device statistics ids and values.
- *   This parameter can be set to NULL if n is 0.
+ *   This parameter can be set to NULL if and only if n is 0.
  * @param n
  *   The size of the xstats array (number of elements).
+ *   If lower than the required number of elements, the function returns the
+ *   required number of elements.
+ *   If equal to zero, the xstats parameter must be NULL, the function returns
+ *   the required number of elements.
  * @return
  *   0 on fail, count(The size of the statistics elements) on success.
@@ -1053,7 +1057,4 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	int ret;
 
-	if (xstats == NULL)
-		return 0;
-
 	count = hns3_xstats_calc_num(dev);
 	if ((int)n < count)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.278443675 +0100
+++ 0021-net-hns3-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-09 12:34:29.674980520 +0100
@@ -1 +1 @@
-From e15401f362779dba8623b4ee3db388fdf79dca7f Mon Sep 17 00:00:00 2001
+From 0072520fd5b67a2ed2c4b7af40bda0c2294dbcab Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e15401f362779dba8623b4ee3db388fdf79dca7f ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/ipn3ke: fix xstats get return if xstats is null' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (19 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/hns3: fix xstats get return if xstats is null' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/mvpp2: " Kevin Traynor
                   ` (52 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/6682fda5b37e3d31ec2a64901c4b8b112c9d1019

Thanks.

Kevin

---
From 6682fda5b37e3d31ec2a64901c4b8b112c9d1019 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:52 +0800
Subject: [PATCH] net/ipn3ke: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently ipn3ke PMD
returns zero when xstats is null.

Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).

Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/ipn3ke/ipn3ke_representor.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index c9dde1d82e..abbecfdf2e 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2219,7 +2219,4 @@ ipn3ke_rpst_xstats_get
 	struct rte_eth_stats stats;
 
-	if (!xstats)
-		return 0;
-
 	if (!ethdev) {
 		IPN3KE_AFU_PMD_ERR("ethernet device to get statistics is NULL");
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.298091929 +0100
+++ 0022-net-ipn3ke-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-09 12:34:29.675980521 +0100
@@ -1 +1 @@
-From e17cb41db7656121f5809e353f8db126b026fbb4 Mon Sep 17 00:00:00 2001
+From 6682fda5b37e3d31ec2a64901c4b8b112c9d1019 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/mvpp2: fix xstats get return if xstats is null' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (20 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ipn3ke: " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/axgbe: " Kevin Traynor
                   ` (51 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/d26f48cdcf6b38663dd9f6e1b3d08d753c24ee10

Thanks.

Kevin

---
From d26f48cdcf6b38663dd9f6e1b3d08d753c24ee10 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:53 +0800
Subject: [PATCH] net/mvpp2: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d853d24b27d6524f26a2a830c7ef678ba739cfce ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently mvpp2 PMD
returns zero when xstats is null.

Remove the logic of "return zero when xstats is NULL", and add the logic
of "return the required number of entries when n is lower than the
required number of entries".

Fixes: a77b5378cd41 ("net/mrvl: add extended statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index f86701d248..735efb6cfc 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1627,11 +1627,12 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
 	struct mrvl_priv *priv = dev->data->dev_private;
 	struct pp2_ppio_statistics ppio_stats;
-	unsigned int i;
+	unsigned int i, count;
 
-	if (!stats)
-		return 0;
+	count = RTE_DIM(mrvl_xstats_tbl);
+	if (n < count)
+		return count;
 
 	pp2_ppio_get_statistics(priv->ppio, &ppio_stats, 0);
-	for (i = 0; i < n && i < RTE_DIM(mrvl_xstats_tbl); i++) {
+	for (i = 0; i < count; i++) {
 		uint64_t val;
 
@@ -1649,5 +1650,5 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
 	}
 
-	return n;
+	return count;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.319097862 +0100
+++ 0023-net-mvpp2-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-09 12:34:29.676980523 +0100
@@ -1 +1 @@
-From d853d24b27d6524f26a2a830c7ef678ba739cfce Mon Sep 17 00:00:00 2001
+From d26f48cdcf6b38663dd9f6e1b3d08d753c24ee10 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d853d24b27d6524f26a2a830c7ef678ba739cfce ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/axgbe: fix xstats get return if xstats is null' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (21 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/mvpp2: " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'ethdev: fix memory leak in xstats telemetry' " Kevin Traynor
                   ` (50 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/b6a52d1937f975baa402c5d4aa4c856c75e78a2a

Thanks.

Kevin

---
From b6a52d1937f975baa402c5d4aa4c856c75e78a2a Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:54 +0800
Subject: [PATCH] net/axgbe: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 93041fd5149a4f8cc795ea8ebb229415e2994e51 ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently axgbe PMD
returns zero when xstats is null.

Remove the logic of "return zero when xstats is NULL", and add the logic
of "return the required number of entries when n is lower than the
required number of entries".

Fixes: 9d1ef6b2e731 ("net/axgbe: add xstats")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/axgbe/axgbe_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index e9546469f3..5add403235 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -1012,10 +1012,10 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 	unsigned int i;
 
-	if (!stats)
-		return 0;
+	if (n < AXGBE_XSTATS_COUNT)
+		return AXGBE_XSTATS_COUNT;
 
 	axgbe_read_mmc_stats(pdata);
 
-	for (i = 0; i < n && i < AXGBE_XSTATS_COUNT; i++) {
+	for (i = 0; i < AXGBE_XSTATS_COUNT; i++) {
 		stats[i].id = i;
 		stats[i].value = *(u64 *)((uint8_t *)&pdata->mmc_stats +
@@ -1023,5 +1023,5 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 	}
 
-	return i;
+	return AXGBE_XSTATS_COUNT;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.340636450 +0100
+++ 0024-net-axgbe-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-09 12:34:29.678980526 +0100
@@ -1 +1 @@
-From 93041fd5149a4f8cc795ea8ebb229415e2994e51 Mon Sep 17 00:00:00 2001
+From b6a52d1937f975baa402c5d4aa4c856c75e78a2a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 93041fd5149a4f8cc795ea8ebb229415e2994e51 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 951da5cc26..e6822fa711 100644
+index e9546469f3..5add403235 100644
@@ -31 +32 @@
-@@ -1014,10 +1014,10 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
+@@ -1012,10 +1012,10 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
@@ -45 +46 @@
-@@ -1025,5 +1025,5 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
+@@ -1023,5 +1023,5 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,


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

* patch 'ethdev: fix memory leak in xstats telemetry' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (22 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/axgbe: " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'ethdev: fix possible null pointer access' " Kevin Traynor
                   ` (49 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/b132a5c8172eb9c7a916ba16e7fc5d027e6fbbc5

Thanks.

Kevin

---
From b132a5c8172eb9c7a916ba16e7fc5d027e6fbbc5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:55 +0800
Subject: [PATCH] ethdev: fix memory leak in xstats telemetry
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 2d00e2b4382d6538d305fc6f3606ecea72011f5b ]

The 'eth_xstats' should be freed after telemetry dictionary setup.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/ethdev/rte_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 0ab5a3470d..5846e35804 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6276,4 +6276,5 @@ eth_dev_handle_port_xstats(const char *cmd __rte_unused,
 		rte_tel_data_add_dict_u64(d, xstat_names[i].name,
 				eth_xstats[i].value);
+	free(eth_xstats);
 	return 0;
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.360966852 +0100
+++ 0025-ethdev-fix-memory-leak-in-xstats-telemetry.patch	2022-06-09 12:34:29.681980531 +0100
@@ -1 +1 @@
-From 2d00e2b4382d6538d305fc6f3606ecea72011f5b Mon Sep 17 00:00:00 2001
+From b132a5c8172eb9c7a916ba16e7fc5d027e6fbbc5 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 2d00e2b4382d6538d305fc6f3606ecea72011f5b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 10db76c1a6..dc47543e6b 100644
+index 0ab5a3470d..5846e35804 100644
@@ -25 +26 @@
-@@ -5596,4 +5596,5 @@ eth_dev_handle_port_xstats(const char *cmd __rte_unused,
+@@ -6276,4 +6276,5 @@ eth_dev_handle_port_xstats(const char *cmd __rte_unused,


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

* patch 'ethdev: fix possible null pointer access' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (23 preceding siblings ...)
  2022-06-09 11:36 ` patch 'ethdev: fix memory leak in xstats telemetry' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/cnxk: fix possible null dereference in telemetry' " Kevin Traynor
                   ` (48 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/c81b66e128a778261168988e06d667e1615bc6e7

Thanks.

Kevin

---
From c81b66e128a778261168988e06d667e1615bc6e7 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:56 +0800
Subject: [PATCH] ethdev: fix possible null pointer access
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ]

The rte_tel_data_alloc() may return NULL, so the caller should add
judgement for it.

Fixes: 083b0b310b19 ("ethdev: add common stats for telemetry")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/ethdev/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 5846e35804..1704e852b5 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6183,4 +6183,6 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,
 	int q;
 	struct rte_tel_data *q_data = rte_tel_data_alloc();
+	if (q_data == NULL)
+		return;
 	rte_tel_data_start_array(q_data, RTE_TEL_U64_VAL);
 	for (q = 0; q < RTE_ETHDEV_QUEUE_STAT_CNTRS; q++)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.383100684 +0100
+++ 0026-ethdev-fix-possible-null-pointer-access.patch	2022-06-09 12:34:29.685980538 +0100
@@ -1 +1 @@
-From 590e988fdfca241d810d6cc94098c223ccb7c737 Mon Sep 17 00:00:00 2001
+From c81b66e128a778261168988e06d667e1615bc6e7 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index dc47543e6b..a175867651 100644
+index 5846e35804..1704e852b5 100644
@@ -26 +27 @@
-@@ -5503,4 +5503,6 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,
+@@ -6183,4 +6183,6 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,


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

* patch 'net/cnxk: fix possible null dereference in telemetry' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (24 preceding siblings ...)
  2022-06-09 11:36 ` patch 'ethdev: fix possible null pointer access' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " Kevin Traynor
                   ` (47 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/c5693310a68473007a05801a279684e636ff1cb8

Thanks.

Kevin

---
From c5693310a68473007a05801a279684e636ff1cb8 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:57 +0800
Subject: [PATCH] net/cnxk: fix possible null dereference in telemetry
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 67ead3fa8c3a6775b2b0c9888afd08bdf02c4d9b ]

The return value of rte_tel_data_alloc() may be null pointer.
Add missing check vs null.

Fixes: 5ea354a1f2cc ("net/cnxk: support telemetry")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/cnxk/cnxk_ethdev_telemetry.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev_telemetry.c b/drivers/net/cnxk/cnxk_ethdev_telemetry.c
index 83bc65848c..4fd9048643 100644
--- a/drivers/net/cnxk/cnxk_ethdev_telemetry.c
+++ b/drivers/net/cnxk/cnxk_ethdev_telemetry.c
@@ -50,4 +50,6 @@ ethdev_tel_handle_info(const char *cmd __rte_unused,
 
 	i_data = rte_tel_data_alloc();
+	if (i_data == NULL)
+		return -ENOMEM;
 	rte_tel_data_start_array(i_data, RTE_TEL_U64_VAL);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.404880365 +0100
+++ 0027-net-cnxk-fix-possible-null-dereference-in-telemetry.patch	2022-06-09 12:34:29.685980538 +0100
@@ -1 +1 @@
-From 67ead3fa8c3a6775b2b0c9888afd08bdf02c4d9b Mon Sep 17 00:00:00 2001
+From c5693310a68473007a05801a279684e636ff1cb8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 67ead3fa8c3a6775b2b0c9888afd08bdf02c4d9b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b76dbdfef9..180108ab9c 100644
+index 83bc65848c..4fd9048643 100644
@@ -26 +27 @@
-@@ -51,4 +51,6 @@ ethdev_tel_handle_info(const char *cmd __rte_unused,
+@@ -50,4 +50,6 @@ ethdev_tel_handle_info(const char *cmd __rte_unused,


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

* patch 'app/testpmd: replace hardcoded min mbuf number with macro' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (25 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/cnxk: fix possible null dereference in telemetry' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " Kevin Traynor
                   ` (46 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Mingxia Liu; +Cc: Yuying Zhang, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/8f2021fbd91840f1c2cc860dd44d6cffa34cfaea

Thanks.

Kevin

---
From 8f2021fbd91840f1c2cc860dd44d6cffa34cfaea Mon Sep 17 00:00:00 2001
From: Mingxia Liu <mingxia.liu@intel.com>
Date: Thu, 31 Mar 2022 02:33:33 +0000
Subject: [PATCH] app/testpmd: replace hardcoded min mbuf number with macro

[ upstream commit 57d91f5b8dc589226a307560bd36181ac7a6b7df ]

Add macro MIN_TOTAL_NUM_MBUFS (1024) to indicate
what the value of total-num-mbufs should bigger than.

Fixes: c87988187fdb ("app/testpmd: add --total-num-mbufs option")

Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/parameters.c | 5 +++--
 app/test-pmd/testpmd.h    | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index daf6a31b2b..641c9c767e 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -941,9 +941,10 @@ launch_args_parse(int argc, char** argv)
 			if (!strcmp(lgopts[opt_idx].name, "total-num-mbufs")) {
 				n = atoi(optarg);
-				if (n > 1024)
+				if (n > MIN_TOTAL_NUM_MBUFS)
 					param_total_num_mbufs = (unsigned)n;
 				else
 					rte_exit(EXIT_FAILURE,
-						 "total-num-mbufs should be > 1024\n");
+						 "total-num-mbufs should be > %d\n",
+						 MIN_TOTAL_NUM_MBUFS);
 			}
 			if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index bedc4e07fb..943217f2bd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -73,4 +73,6 @@
 #define UMA_NO_CONFIG  0xFF
 
+#define MIN_TOTAL_NUM_MBUFS 1024
+
 typedef uint8_t  lcoreid_t;
 typedef uint16_t portid_t;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.424453072 +0100
+++ 0028-app-testpmd-replace-hardcoded-min-mbuf-number-with-m.patch	2022-06-09 12:34:29.687980542 +0100
@@ -1 +1 @@
-From 57d91f5b8dc589226a307560bd36181ac7a6b7df Mon Sep 17 00:00:00 2001
+From 8f2021fbd91840f1c2cc860dd44d6cffa34cfaea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57d91f5b8dc589226a307560bd36181ac7a6b7df ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 67f253b30e..f04a9a11b4 100644
+index bedc4e07fb..943217f2bd 100644


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

* patch 'app/testpmd: fix metering and policing command for RFC4115' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (26 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'ethdev: prohibit polling stopped queue' " Kevin Traynor
                   ` (45 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Shun Hao; +Cc: Matan Azrad, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/a8da51df5be29553960e9c5c1c4804e3f3311e3c

Thanks.

Kevin

---
From a8da51df5be29553960e9c5c1c4804e3f3311e3c Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Fri, 13 May 2022 06:57:38 +0300
Subject: [PATCH] app/testpmd: fix metering and policing command for RFC4115

[ upstream commit b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca ]

Add CLI command support for metering and policing of trtcm_rfc4115.

Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2c531ff0af..7e4efbf4db 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17841,4 +17841,5 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
 	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,
+	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm_rfc4115,
 	(cmdline_parse_inst_t *)&cmd_del_port_meter_profile,
 	(cmdline_parse_inst_t *)&cmd_create_port_meter,
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.445871019 +0100
+++ 0029-app-testpmd-fix-metering-and-policing-command-for-RF.patch	2022-06-09 12:34:29.699980562 +0100
@@ -1 +1 @@
-From b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca Mon Sep 17 00:00:00 2001
+From a8da51df5be29553960e9c5c1c4804e3f3311e3c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 44ddf9bbc8..1e5b294ab3 100644
+index 2c531ff0af..7e4efbf4db 100644
@@ -22 +23 @@
-@@ -17964,4 +17964,5 @@ cmdline_parse_ctx_t main_ctx[] = {
+@@ -17841,4 +17841,5 @@ cmdline_parse_ctx_t main_ctx[] = {


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

* patch 'ethdev: prohibit polling stopped queue' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (27 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: fix use of indirect action after port close' " Kevin Traynor
                   ` (44 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/79dd4206a76ad622f3ea78700df40fbe6bd0d979

Thanks.

Kevin

---
From 79dd4206a76ad622f3ea78700df40fbe6bd0d979 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 11 Apr 2022 00:35:50 +0300
Subject: [PATCH] ethdev: prohibit polling stopped queue

[ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ]

Whether it is allowed to call Rx/Tx functions for a stopped queue
was undocumented. Some PMDs make this behavior a no-op
either by explicitly checking the queue state
or by the way how their routines are implemented or HW works.

No-op behavior may be convenient for application developers.
But it also means that pollers of stopped queues
would go all the way down to PMD Rx/Tx routines, wasting cycles.
Some PMDs would do a check for the queue state on data path,
even though it may never be needed for a particular application.
Also, use cases for stopping queues or starting them deferred
do not logically require polling stopped queues.

Use case 1: a secondary that was polling the queue has crashed,
the primary is doing a recovery to free all mbufs.
By definition the queue to be restarted is not polled.

Use case 2: deferred queue start or queue reconfiguration.
The polling thread must be synchronized anyway,
because queue start and stop are non-atomic.

Prohibit calling Rx/Tx functions on stopped queues.

Fixes: 0748be2cf9a2 ("ethdev: queue start and stop")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/ethdev/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 1d11a002d5..0be04c5809 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -75,5 +75,5 @@
  * device and then do the reconfiguration before calling rte_eth_dev_start()
  * again. The transmit and receive functions should not be invoked when the
- * device is stopped.
+ * device or the queue is stopped.
  *
  * Please note that some configuration is not stored between calls to
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.476383256 +0100
+++ 0030-ethdev-prohibit-polling-stopped-queue.patch	2022-06-09 12:34:29.703980569 +0100
@@ -1 +1 @@
-From b77d3318d6a3ca266751031ff04520b7ad485529 Mon Sep 17 00:00:00 2001
+From 79dd4206a76ad622f3ea78700df40fbe6bd0d979 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 04225bba4d..02df65d923 100644
+index 1d11a002d5..0be04c5809 100644


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

* patch 'app/testpmd: fix use of indirect action after port close' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (28 preceding siblings ...)
  2022-06-09 11:36 ` patch 'ethdev: prohibit polling stopped queue' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: do not poll stopped queues' " Kevin Traynor
                   ` (43 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Matan Azrad, Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/057ebd40e3db01e87cd7bc7029674c4bd8d97580

Thanks.

Kevin

---
From 057ebd40e3db01e87cd7bc7029674c4bd8d97580 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 7 Mar 2022 18:48:21 +0200
Subject: [PATCH] app/testpmd: fix use of indirect action after port close

[ upstream commit f7352c176bbf131728445680ee08961a67cc09a6 ]

When a port was closed, indirect actions could remain
with their handles no longer valid.
If a newly attached device was assigned the same ID as the closed port,
those indirect actions became accessible again.
Any attempt to use them resulted in an undefined behavior.
Automatically flush indirect actions when a port is closed.

Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/config.c  | 31 +++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.c |  1 +
 app/test-pmd/testpmd.h |  1 +
 3 files changed, 33 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index face2f805f..ae2ace42cc 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1758,4 +1758,35 @@ port_action_handle_destroy(portid_t port_id,
 }
 
+int
+port_action_handle_flush(portid_t port_id)
+{
+	struct rte_port *port;
+	struct port_indirect_action **tmp;
+	int ret = 0;
+
+	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+	    port_id == (portid_t)RTE_PORT_ALL)
+		return -EINVAL;
+	port = &ports[port_id];
+	tmp = &port->actions_list;
+	while (*tmp != NULL) {
+		struct rte_flow_error error;
+		struct port_indirect_action *pia = *tmp;
+
+		/* Poisoning to make sure PMDs update it in case of error. */
+		memset(&error, 0x44, sizeof(error));
+		if (pia->handle != NULL &&
+		    rte_flow_action_handle_destroy
+					(port_id, pia->handle, &error) != 0) {
+			printf("Indirect action #%u not destroyed\n", pia->id);
+			ret = port_flow_complain(&error);
+			tmp = &pia->next;
+		} else {
+			*tmp = pia->next;
+			free(pia);
+		}
+	}
+	return ret;
+}
 
 /** Get indirect action by port + id */
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index dd1f286d59..5c62f48efd 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3218,4 +3218,5 @@ close_port(portid_t pid)
 			port_flow_flush(pi);
 			port_flex_item_flush(pi);
+			port_action_handle_flush(pi);
 			rte_eth_dev_close(pi);
 		}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 943217f2bd..59bb9e3c66 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -885,4 +885,5 @@ int port_action_handle_create(portid_t port_id, uint32_t id,
 int port_action_handle_destroy(portid_t port_id,
 			       uint32_t n, const uint32_t *action);
+int port_action_handle_flush(portid_t port_id);
 struct rte_flow_action_handle *port_action_handle_get_by_id(portid_t port_id,
 							    uint32_t id);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.499983894 +0100
+++ 0031-app-testpmd-fix-use-of-indirect-action-after-port-cl.patch	2022-06-09 12:34:29.710980581 +0100
@@ -1 +1 @@
-From f7352c176bbf131728445680ee08961a67cc09a6 Mon Sep 17 00:00:00 2001
+From 057ebd40e3db01e87cd7bc7029674c4bd8d97580 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7352c176bbf131728445680ee08961a67cc09a6 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 1b1e738f83..dc9ef1e868 100644
+index face2f805f..ae2ace42cc 100644
@@ -29 +30 @@
-@@ -1906,4 +1906,35 @@ port_action_handle_destroy(portid_t port_id,
+@@ -1758,4 +1758,35 @@ port_action_handle_destroy(portid_t port_id,
@@ -66 +67 @@
-index 777763f749..5b742911a8 100644
+index dd1f286d59..5c62f48efd 100644
@@ -69 +70 @@
-@@ -3217,4 +3217,5 @@ close_port(portid_t pid)
+@@ -3218,4 +3218,5 @@ close_port(portid_t pid)
@@ -76 +77 @@
-index f04a9a11b4..8ee682b362 100644
+index 943217f2bd..59bb9e3c66 100644
@@ -79 +80 @@
-@@ -911,4 +911,5 @@ int port_action_handle_create(portid_t port_id, uint32_t id,
+@@ -885,4 +885,5 @@ int port_action_handle_create(portid_t port_id, uint32_t id,


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

* patch 'app/testpmd: do not poll stopped queues' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (29 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: fix use of indirect action after port close' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/bonding: fix mbuf fast free usage' " Kevin Traynor
                   ` (42 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/fa7ae869320cccab03969a7a679ce2c554e488f6

Thanks.

Kevin

---
From fa7ae869320cccab03969a7a679ce2c554e488f6 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 7 Mar 2022 14:53:50 +0200
Subject: [PATCH] app/testpmd: do not poll stopped queues

[ upstream commit 3c4426db54fc24e7a97f2b4000a0a4f30897a104 ]

Calling Rx/Tx functions on a stopped queue is not supported.
Do not run packet forwarding for streams that use stopped queues.

Each stream has a read-only "disabled" field,
so that lcore function can skip such streams.
Forwarding engines can set this field
using a new "stream_init" callback function
by checking relevant queue states,
which are stored along with queue configurations
(not all PMDs implement rte_eth_rx/tx_queue_info_get()
to query the state from there).

Fixes: 5f4ec54f1d16 ("testpmd: queue start and stop")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-pmd/5tswap.c         | 13 ++++++
 app/test-pmd/cmdline.c        | 45 ++++++++++--------
 app/test-pmd/config.c         |  8 ++--
 app/test-pmd/csumonly.c       | 13 ++++++
 app/test-pmd/flowgen.c        | 13 ++++++
 app/test-pmd/icmpecho.c       | 13 ++++++
 app/test-pmd/ieee1588fwd.c    | 13 ++++++
 app/test-pmd/iofwd.c          | 13 ++++++
 app/test-pmd/macfwd.c         | 13 ++++++
 app/test-pmd/macswap.c        | 13 ++++++
 app/test-pmd/noisy_vnf.c      | 13 ++++++
 app/test-pmd/rxonly.c         |  8 ++++
 app/test-pmd/shared_rxq_fwd.c |  8 ++++
 app/test-pmd/testpmd.c        | 87 ++++++++++++++++++++++-------------
 app/test-pmd/testpmd.h        | 19 +++++++-
 app/test-pmd/txonly.c         |  8 ++++
 16 files changed, 244 insertions(+), 56 deletions(-)

diff --git a/app/test-pmd/5tswap.c b/app/test-pmd/5tswap.c
index 629d3e0d31..f041a5e1d5 100644
--- a/app/test-pmd/5tswap.c
+++ b/app/test-pmd/5tswap.c
@@ -186,8 +186,21 @@ pkt_burst_5tuple_swap(struct fwd_stream *fs)
 }
 
+static void
+stream_init_5tuple_swap(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine five_tuple_swap_fwd_engine = {
 	.fwd_mode_name  = "5tswap",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_5tuple_swap,
 	.packet_fwd     = pkt_burst_5tuple_swap,
 };
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 7e4efbf4db..35da020129 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2648,6 +2648,8 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
 {
 	struct cmd_config_rxtx_queue *res = parsed_result;
+	struct rte_port *port;
 	uint8_t isrx;
 	uint8_t isstart;
+	uint8_t *state;
 	int ret = 0;
 
@@ -2697,6 +2699,13 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
 		ret = rte_eth_dev_tx_queue_stop(res->portid, res->qid);
 
-	if (ret == -ENOTSUP)
+	if (ret == -ENOTSUP) {
 		fprintf(stderr, "Function not supported in PMD\n");
+		return;
+	}
+
+	port = &ports[res->portid];
+	state = isrx ? &port->rxq[res->qid].state : &port->txq[res->qid].state;
+	*state = isstart ? RTE_ETH_QUEUE_STATE_STARTED :
+			   RTE_ETH_QUEUE_STATE_STOPPED;
 }
 
@@ -2767,9 +2776,9 @@ cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result,
 	ison = !strcmp(res->state, "on");
 
-	if (isrx && port->rx_conf[res->qid].rx_deferred_start != ison) {
-		port->rx_conf[res->qid].rx_deferred_start = ison;
+	if (isrx && port->rxq[res->qid].conf.rx_deferred_start != ison) {
+		port->rxq[res->qid].conf.rx_deferred_start = ison;
 		needreconfig = 1;
-	} else if (!isrx && port->tx_conf[res->qid].tx_deferred_start != ison) {
-		port->tx_conf[res->qid].tx_deferred_start = ison;
+	} else if (!isrx && port->txq[res->qid].conf.tx_deferred_start != ison) {
+		port->txq[res->qid].conf.tx_deferred_start = ison;
 		needreconfig = 1;
 	}
@@ -2889,5 +2898,5 @@ cmd_setup_rxtx_queue_parsed(
 				     port->nb_rx_desc[res->qid],
 				     socket_id,
-				     &port->rx_conf[res->qid],
+				     &port->rxq[res->qid].conf,
 				     mp);
 		if (ret)
@@ -2907,5 +2916,5 @@ cmd_setup_rxtx_queue_parsed(
 					     port->nb_tx_desc[res->qid],
 					     socket_id,
-					     &port->tx_conf[res->qid]);
+					     &port->txq[res->qid].conf);
 		if (ret)
 			fprintf(stderr, "Failed to setup TX queue\n");
@@ -4683,5 +4692,5 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
 	/* Apply queue tx offloads configuration */
 	for (k = 0; k < port->dev_info.max_tx_queues; k++)
-		port->tx_conf[k].offloads =
+		port->txq[k].conf.offloads =
 			port->dev_conf.txmode.offloads;
 }
@@ -16080,5 +16089,5 @@ cmd_rx_offload_get_configuration_parsed(
 	nb_rx_queues = dev_info.nb_rx_queues;
 	for (q = 0; q < nb_rx_queues; q++) {
-		queue_offloads = port->rx_conf[q].offloads;
+		queue_offloads = port->rxq[q].conf.offloads;
 		printf("  Queue[%2d] :", q);
 		print_rx_offloads(queue_offloads);
@@ -16200,9 +16209,9 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result,
 		port->dev_conf.rxmode.offloads |= single_offload;
 		for (q = 0; q < nb_rx_queues; q++)
-			port->rx_conf[q].offloads |= single_offload;
+			port->rxq[q].conf.offloads |= single_offload;
 	} else {
 		port->dev_conf.rxmode.offloads &= ~single_offload;
 		for (q = 0; q < nb_rx_queues; q++)
-			port->rx_conf[q].offloads &= ~single_offload;
+			port->rxq[q].conf.offloads &= ~single_offload;
 	}
 
@@ -16310,7 +16319,7 @@ cmd_config_per_queue_rx_offload_parsed(void *parsed_result,
 
 	if (!strcmp(res->on_off, "on"))
-		port->rx_conf[queue_id].offloads |= single_offload;
+		port->rxq[queue_id].conf.offloads |= single_offload;
 	else
-		port->rx_conf[queue_id].offloads &= ~single_offload;
+		port->rxq[queue_id].conf.offloads &= ~single_offload;
 
 	cmd_reconfig_device_queue(port_id, 1, 1);
@@ -16499,5 +16508,5 @@ cmd_tx_offload_get_configuration_parsed(
 	nb_tx_queues = dev_info.nb_tx_queues;
 	for (q = 0; q < nb_tx_queues; q++) {
-		queue_offloads = port->tx_conf[q].offloads;
+		queue_offloads = port->txq[q].conf.offloads;
 		printf("  Queue[%2d] :", q);
 		print_tx_offloads(queue_offloads);
@@ -16623,9 +16632,9 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
 		port->dev_conf.txmode.offloads |= single_offload;
 		for (q = 0; q < nb_tx_queues; q++)
-			port->tx_conf[q].offloads |= single_offload;
+			port->txq[q].conf.offloads |= single_offload;
 	} else {
 		port->dev_conf.txmode.offloads &= ~single_offload;
 		for (q = 0; q < nb_tx_queues; q++)
-			port->tx_conf[q].offloads &= ~single_offload;
+			port->txq[q].conf.offloads &= ~single_offload;
 	}
 
@@ -16736,7 +16745,7 @@ cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
 
 	if (!strcmp(res->on_off, "on"))
-		port->tx_conf[queue_id].offloads |= single_offload;
+		port->txq[queue_id].conf.offloads |= single_offload;
 	else
-		port->tx_conf[queue_id].offloads &= ~single_offload;
+		port->txq[queue_id].conf.offloads &= ~single_offload;
 
 	cmd_reconfig_device_queue(port_id, 1, 1);
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ae2ace42cc..3855a6809f 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2865,6 +2865,6 @@ rxtx_config_display(void)
 
 	RTE_ETH_FOREACH_DEV(pid) {
-		struct rte_eth_rxconf *rx_conf = &ports[pid].rx_conf[0];
-		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf[0];
+		struct rte_eth_rxconf *rx_conf = &ports[pid].rxq[0].conf;
+		struct rte_eth_txconf *tx_conf = &ports[pid].txq[0].conf;
 		uint16_t *nb_rx_desc = &ports[pid].nb_rx_desc[0];
 		uint16_t *nb_tx_desc = &ports[pid].nb_tx_desc[0];
@@ -3124,5 +3124,5 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
 			port = &ports[fs->rx_port];
 			dev_info = &port->dev_info;
-			rxq_conf = &port->rx_conf[fs->rx_queue];
+			rxq_conf = &port->rxq[fs->rx_queue].conf;
 			if ((dev_info->dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)
 			    == 0 || rxq_conf->share_group == 0)
@@ -3184,5 +3184,5 @@ pkt_fwd_shared_rxq_check(void)
 			port = &ports[fs->rx_port];
 			dev_info = &port->dev_info;
-			rxq_conf = &port->rx_conf[fs->rx_queue];
+			rxq_conf = &port->rxq[fs->rx_queue].conf;
 			if ((dev_info->dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)
 			    == 0 || rxq_conf->share_group == 0)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 24265ce4de..aaaec17841 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -1193,8 +1193,21 @@ tunnel_update:
 }
 
+static void
+stream_init_checksum_forward(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine csum_fwd_engine = {
 	.fwd_mode_name  = "csum",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_checksum_forward,
 	.packet_fwd     = pkt_burst_checksum_forward,
 };
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 9ceef3b54a..1e01120ae9 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -208,8 +208,21 @@ flowgen_begin(portid_t pi)
 }
 
+static void
+flowgen_stream_init(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine flow_gen_engine = {
 	.fwd_mode_name  = "flowgen",
 	.port_fwd_begin = flowgen_begin,
 	.port_fwd_end   = NULL,
+	.stream_init    = flowgen_stream_init,
 	.packet_fwd     = pkt_burst_flow_gen,
 };
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index 99c94cb282..066f2a3ab7 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -513,8 +513,21 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 }
 
+static void
+icmpecho_stream_init(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine icmp_echo_engine = {
 	.fwd_mode_name  = "icmpecho",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = icmpecho_stream_init,
 	.packet_fwd     = reply_to_icmp_echo_rqsts,
 };
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 9ff817aa68..fc4e2d014c 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -212,8 +212,21 @@ port_ieee1588_fwd_end(portid_t pi)
 }
 
+static void
+port_ieee1588_stream_init(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine ieee1588_fwd_engine = {
 	.fwd_mode_name  = "ieee1588",
 	.port_fwd_begin = port_ieee1588_fwd_begin,
 	.port_fwd_end   = port_ieee1588_fwd_end,
+	.stream_init    = port_ieee1588_stream_init,
 	.packet_fwd     = ieee1588_packet_fwd,
 };
diff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c
index 19cd920f70..71849aaf96 100644
--- a/app/test-pmd/iofwd.c
+++ b/app/test-pmd/iofwd.c
@@ -89,8 +89,21 @@ pkt_burst_io_forward(struct fwd_stream *fs)
 }
 
+static void
+stream_init_forward(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine io_fwd_engine = {
 	.fwd_mode_name  = "io",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_forward,
 	.packet_fwd     = pkt_burst_io_forward,
 };
diff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c
index 812a0c721f..79c9241d00 100644
--- a/app/test-pmd/macfwd.c
+++ b/app/test-pmd/macfwd.c
@@ -120,8 +120,21 @@ pkt_burst_mac_forward(struct fwd_stream *fs)
 }
 
+static void
+stream_init_mac_forward(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine mac_fwd_engine = {
 	.fwd_mode_name  = "mac",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_mac_forward,
 	.packet_fwd     = pkt_burst_mac_forward,
 };
diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c
index 4627ff83e9..acb0fd7fb4 100644
--- a/app/test-pmd/macswap.c
+++ b/app/test-pmd/macswap.c
@@ -98,8 +98,21 @@ pkt_burst_mac_swap(struct fwd_stream *fs)
 }
 
+static void
+stream_init_mac_swap(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine mac_swap_engine = {
 	.fwd_mode_name  = "macswap",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_mac_swap,
 	.packet_fwd     = pkt_burst_mac_swap,
 };
diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
index e4434bea95..a92e810190 100644
--- a/app/test-pmd/noisy_vnf.c
+++ b/app/test-pmd/noisy_vnf.c
@@ -278,8 +278,21 @@ noisy_fwd_begin(portid_t pi)
 }
 
+static void
+stream_init_noisy_vnf(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine noisy_vnf_engine = {
 	.fwd_mode_name  = "noisy",
 	.port_fwd_begin = noisy_fwd_begin,
 	.port_fwd_end   = noisy_fwd_end,
+	.stream_init    = stream_init_noisy_vnf,
 	.packet_fwd     = pkt_burst_noisy_vnf,
 };
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index d1a579d8d8..04457010f4 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -69,8 +69,16 @@ pkt_burst_receive(struct fwd_stream *fs)
 }
 
+static void
+stream_init_receive(struct fwd_stream *fs)
+{
+	fs->disabled = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+}
+
 struct fwd_engine rx_only_engine = {
 	.fwd_mode_name  = "rxonly",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_receive,
 	.packet_fwd     = pkt_burst_receive,
 };
diff --git a/app/test-pmd/shared_rxq_fwd.c b/app/test-pmd/shared_rxq_fwd.c
index da54a383fd..2e9047804b 100644
--- a/app/test-pmd/shared_rxq_fwd.c
+++ b/app/test-pmd/shared_rxq_fwd.c
@@ -108,8 +108,16 @@ shared_rxq_fwd(struct fwd_stream *fs)
 }
 
+static void
+shared_rxq_stream_init(struct fwd_stream *fs)
+{
+	fs->disabled = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+}
+
 struct fwd_engine shared_rxq_engine = {
 	.fwd_mode_name  = "shared_rxq",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = shared_rxq_stream_init,
 	.packet_fwd     = shared_rxq_fwd,
 };
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5c62f48efd..fa449183c1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1640,8 +1640,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	/* Apply Rx offloads configuration */
 	for (i = 0; i < port->dev_info.max_rx_queues; i++)
-		port->rx_conf[i].offloads = port->dev_conf.rxmode.offloads;
+		port->rxq[i].conf.offloads = port->dev_conf.rxmode.offloads;
 	/* Apply Tx offloads configuration */
 	for (i = 0; i < port->dev_info.max_tx_queues; i++)
-		port->tx_conf[i].offloads = port->dev_conf.txmode.offloads;
+		port->txq[i].conf.offloads = port->dev_conf.txmode.offloads;
 
 	if (eth_link_speed)
@@ -1830,5 +1830,4 @@ reconfig(portid_t new_port_id, unsigned socket_id)
 }
 
-
 int
 init_fwd_streams(void)
@@ -2235,4 +2234,10 @@ flush_fwd_rx_queues(void)
 			for (rxq = 0; rxq < nb_rxq; rxq++) {
 				port_id = fwd_ports_ids[rxp];
+
+				/* Polling stopped queues is prohibited. */
+				if (ports[port_id].rxq[rxq].state ==
+				    RTE_ETH_QUEUE_STATE_STOPPED)
+					continue;
+
 				/**
 				* testpmd can stuck in the below do while loop
@@ -2280,5 +2285,6 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
 	do {
 		for (sm_id = 0; sm_id < nb_fs; sm_id++)
-			(*pkt_fwd)(fsm[sm_id]);
+			if (!fsm[sm_id]->disabled)
+				(*pkt_fwd)(fsm[sm_id]);
 #ifdef RTE_LIB_BITRATESTATS
 		if (bitrate_enabled != 0 &&
@@ -2362,4 +2368,5 @@ start_packet_forwarding(int with_tx_first)
 	port_fwd_begin_t port_fwd_begin;
 	port_fwd_end_t  port_fwd_end;
+	stream_init_t stream_init = cur_fwd_eng->stream_init;
 	unsigned int i;
 
@@ -2392,4 +2399,8 @@ start_packet_forwarding(int with_tx_first)
 		return;
 
+	if (stream_init != NULL)
+		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
+			stream_init(fwd_streams[i]);
+
 	port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin;
 	if (port_fwd_begin != NULL) {
@@ -2653,5 +2664,5 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 					     nb_rx_desc, socket_id,
 					     rx_conf, mp);
-		return ret;
+		goto exit;
 	}
 	for (i = 0; i < rx_pkt_nb_segs; i++) {
@@ -2678,4 +2689,8 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 	rx_conf->rx_seg = NULL;
 	rx_conf->rx_nseg = 0;
+exit:
+	ports[port_id].rxq[rx_queue_id].state = rx_conf->rx_deferred_start ?
+						RTE_ETH_QUEUE_STATE_STOPPED :
+						RTE_ETH_QUEUE_STATE_STARTED;
 	return ret;
 }
@@ -2880,5 +2895,5 @@ start_port(portid_t pid)
 				     k < port->dev_info.max_rx_queues;
 				     k++)
-					port->rx_conf[k].offloads |=
+					port->rxq[k].conf.offloads |=
 						dev_conf.rxmode.offloads;
 			}
@@ -2891,5 +2906,5 @@ start_port(portid_t pid)
 				     k < port->dev_info.max_tx_queues;
 				     k++)
-					port->tx_conf[k].offloads |=
+					port->txq[k].conf.offloads |=
 						dev_conf.txmode.offloads;
 			}
@@ -2899,4 +2914,7 @@ start_port(portid_t pid)
 			/* setup tx queues */
 			for (qi = 0; qi < nb_txq; qi++) {
+				struct rte_eth_txconf *conf =
+							&port->txq[qi].conf;
+
 				if ((numa_support) &&
 					(txring_numa[pi] != NUMA_NO_CONFIG))
@@ -2904,13 +2922,18 @@ start_port(portid_t pid)
 						port->nb_tx_desc[qi],
 						txring_numa[pi],
-						&(port->tx_conf[qi]));
+						&(port->txq[qi].conf));
 				else
 					diag = rte_eth_tx_queue_setup(pi, qi,
 						port->nb_tx_desc[qi],
 						port->socket_id,
-						&(port->tx_conf[qi]));
+						&(port->txq[qi].conf));
 
-				if (diag == 0)
+				if (diag == 0) {
+					port->txq[qi].state =
+						conf->tx_deferred_start ?
+						RTE_ETH_QUEUE_STATE_STOPPED :
+						RTE_ETH_QUEUE_STATE_STARTED;
 					continue;
+				}
 
 				/* Fail to setup tx queue, return */
@@ -2945,5 +2968,5 @@ start_port(portid_t pid)
 					     port->nb_rx_desc[qi],
 					     rxring_numa[pi],
-					     &(port->rx_conf[qi]),
+					     &(port->rxq[qi].conf),
 					     mp);
 				} else {
@@ -2960,5 +2983,5 @@ start_port(portid_t pid)
 					     port->nb_rx_desc[qi],
 					     port->socket_id,
-					     &(port->rx_conf[qi]),
+					     &(port->rxq[qi].conf),
 					     mp);
 				}
@@ -3736,32 +3759,32 @@ rxtx_port_config(portid_t pid)
 
 	for (qid = 0; qid < nb_rxq; qid++) {
-		offloads = port->rx_conf[qid].offloads;
-		port->rx_conf[qid] = port->dev_info.default_rxconf;
+		offloads = port->rxq[qid].conf.offloads;
+		port->rxq[qid].conf = port->dev_info.default_rxconf;
 
 		if (rxq_share > 0 &&
 		    (port->dev_info.dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)) {
 			/* Non-zero share group to enable RxQ share. */
-			port->rx_conf[qid].share_group = pid / rxq_share + 1;
-			port->rx_conf[qid].share_qid = qid; /* Equal mapping. */
+			port->rxq[qid].conf.share_group = pid / rxq_share + 1;
+			port->rxq[qid].conf.share_qid = qid; /* Equal mapping. */
 		}
 
 		if (offloads != 0)
-			port->rx_conf[qid].offloads = offloads;
+			port->rxq[qid].conf.offloads = offloads;
 
 		/* Check if any Rx parameters have been passed */
 		if (rx_pthresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_thresh.pthresh = rx_pthresh;
+			port->rxq[qid].conf.rx_thresh.pthresh = rx_pthresh;
 
 		if (rx_hthresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_thresh.hthresh = rx_hthresh;
+			port->rxq[qid].conf.rx_thresh.hthresh = rx_hthresh;
 
 		if (rx_wthresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_thresh.wthresh = rx_wthresh;
+			port->rxq[qid].conf.rx_thresh.wthresh = rx_wthresh;
 
 		if (rx_free_thresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_free_thresh = rx_free_thresh;
+			port->rxq[qid].conf.rx_free_thresh = rx_free_thresh;
 
 		if (rx_drop_en != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_drop_en = rx_drop_en;
+			port->rxq[qid].conf.rx_drop_en = rx_drop_en;
 
 		port->nb_rx_desc[qid] = nb_rxd;
@@ -3769,24 +3792,24 @@ rxtx_port_config(portid_t pid)
 
 	for (qid = 0; qid < nb_txq; qid++) {
-		offloads = port->tx_conf[qid].offloads;
-		port->tx_conf[qid] = port->dev_info.default_txconf;
+		offloads = port->txq[qid].conf.offloads;
+		port->txq[qid].conf = port->dev_info.default_txconf;
 		if (offloads != 0)
-			port->tx_conf[qid].offloads = offloads;
+			port->txq[qid].conf.offloads = offloads;
 
 		/* Check if any Tx parameters have been passed */
 		if (tx_pthresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_thresh.pthresh = tx_pthresh;
+			port->txq[qid].conf.tx_thresh.pthresh = tx_pthresh;
 
 		if (tx_hthresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_thresh.hthresh = tx_hthresh;
+			port->txq[qid].conf.tx_thresh.hthresh = tx_hthresh;
 
 		if (tx_wthresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_thresh.wthresh = tx_wthresh;
+			port->txq[qid].conf.tx_thresh.wthresh = tx_wthresh;
 
 		if (tx_rs_thresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_rs_thresh = tx_rs_thresh;
+			port->txq[qid].conf.tx_rs_thresh = tx_rs_thresh;
 
 		if (tx_free_thresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_free_thresh = tx_free_thresh;
+			port->txq[qid].conf.tx_free_thresh = tx_free_thresh;
 
 		port->nb_tx_desc[qid] = nb_txd;
@@ -3869,5 +3892,5 @@ init_port_config(void)
 				     i < port->dev_info.nb_rx_queues;
 				     i++)
-					port->rx_conf[i].offloads &=
+					port->rxq[i].conf.offloads &=
 						~RTE_ETH_RX_OFFLOAD_RSS_HASH;
 			}
@@ -4043,5 +4066,5 @@ init_port_dcb_config(portid_t pid,
 		port_conf.rxmode.offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH;
 		for (i = 0; i < nb_rxq; i++)
-			rte_port->rx_conf[i].offloads &=
+			rte_port->rxq[i].conf.offloads &=
 				~RTE_ETH_RX_OFFLOAD_RSS_HASH;
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 59bb9e3c66..42db6b56df 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -137,4 +137,5 @@ struct fwd_stream {
 	queueid_t  tx_queue;  /**< TX queue to send forwarded packets */
 	streamid_t peer_addr; /**< index of peer ethernet address of packets */
+	bool       disabled;  /**< the stream is disabled and should not run */
 
 	unsigned int retry_enabled;
@@ -220,4 +221,16 @@ struct xstat_display_info {
 };
 
+/** RX queue configuration and state. */
+struct port_rxqueue {
+	struct rte_eth_rxconf conf;
+	uint8_t state; /**< RTE_ETH_QUEUE_STATE_* value. */
+};
+
+/** TX queue configuration and state. */
+struct port_txqueue {
+	struct rte_eth_txconf conf;
+	uint8_t state; /**< RTE_ETH_QUEUE_STATE_* value. */
+};
+
 /**
  * The data structure associated with each port.
@@ -242,6 +255,6 @@ struct rte_port {
 	uint16_t                nb_rx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx desc number */
 	uint16_t                nb_tx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx desc number */
-	struct rte_eth_rxconf   rx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx configuration */
-	struct rte_eth_txconf   tx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx configuration */
+	struct port_rxqueue     rxq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Rx config and state */
+	struct port_txqueue     txq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Tx config and state */
 	struct rte_ether_addr   *mc_addr_pool; /**< pool of multicast addrs */
 	uint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */
@@ -301,4 +314,5 @@ struct fwd_lcore {
 typedef int (*port_fwd_begin_t)(portid_t pi);
 typedef void (*port_fwd_end_t)(portid_t pi);
+typedef void (*stream_init_t)(struct fwd_stream *fs);
 typedef void (*packet_fwd_t)(struct fwd_stream *fs);
 
@@ -307,4 +321,5 @@ struct fwd_engine {
 	port_fwd_begin_t port_fwd_begin; /**< NULL if nothing special to do. */
 	port_fwd_end_t   port_fwd_end;   /**< NULL if nothing special to do. */
+	stream_init_t    stream_init;    /**< NULL if nothing special to do. */
 	packet_fwd_t     packet_fwd;     /**< Mandatory. */
 };
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index fc039a622c..e1bc78b73d 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -505,8 +505,16 @@ tx_only_begin(portid_t pi)
 }
 
+static void
+tx_only_stream_init(struct fwd_stream *fs)
+{
+	fs->disabled = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+}
+
 struct fwd_engine tx_only_engine = {
 	.fwd_mode_name  = "txonly",
 	.port_fwd_begin = tx_only_begin,
 	.port_fwd_end   = NULL,
+	.stream_init    = tx_only_stream_init,
 	.packet_fwd     = pkt_burst_transmit,
 };
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.526371753 +0100
+++ 0032-app-testpmd-do-not-poll-stopped-queues.patch	2022-06-09 12:34:29.732980618 +0100
@@ -1 +1 @@
-From 3c4426db54fc24e7a97f2b4000a0a4f30897a104 Mon Sep 17 00:00:00 2001
+From fa7ae869320cccab03969a7a679ce2c554e488f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c4426db54fc24e7a97f2b4000a0a4f30897a104 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -69 +70 @@
-index 1e5b294ab3..d8900a0d07 100644
+index 7e4efbf4db..35da020129 100644
@@ -72 +73 @@
-@@ -2655,6 +2655,8 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
+@@ -2648,6 +2648,8 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
@@ -81 +82 @@
-@@ -2704,6 +2706,13 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
+@@ -2697,6 +2699,13 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
@@ -96 +97 @@
-@@ -2774,9 +2783,9 @@ cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result,
+@@ -2767,9 +2776,9 @@ cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result,
@@ -110 +111 @@
-@@ -2896,5 +2905,5 @@ cmd_setup_rxtx_queue_parsed(
+@@ -2889,5 +2898,5 @@ cmd_setup_rxtx_queue_parsed(
@@ -117 +118 @@
-@@ -2914,5 +2923,5 @@ cmd_setup_rxtx_queue_parsed(
+@@ -2907,5 +2916,5 @@ cmd_setup_rxtx_queue_parsed(
@@ -124 +125 @@
-@@ -4690,5 +4699,5 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
+@@ -4683,5 +4692,5 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
@@ -131 +132 @@
-@@ -16202,5 +16211,5 @@ cmd_rx_offload_get_configuration_parsed(
+@@ -16080,5 +16089,5 @@ cmd_rx_offload_get_configuration_parsed(
@@ -138 +139 @@
-@@ -16322,9 +16331,9 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result,
+@@ -16200,9 +16209,9 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result,
@@ -150 +151 @@
-@@ -16432,7 +16441,7 @@ cmd_config_per_queue_rx_offload_parsed(void *parsed_result,
+@@ -16310,7 +16319,7 @@ cmd_config_per_queue_rx_offload_parsed(void *parsed_result,
@@ -160 +161 @@
-@@ -16621,5 +16630,5 @@ cmd_tx_offload_get_configuration_parsed(
+@@ -16499,5 +16508,5 @@ cmd_tx_offload_get_configuration_parsed(
@@ -167 +168 @@
-@@ -16745,9 +16754,9 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
+@@ -16623,9 +16632,9 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
@@ -179 +180 @@
-@@ -16858,7 +16867,7 @@ cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
+@@ -16736,7 +16745,7 @@ cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
@@ -190 +191 @@
-index dc9ef1e868..72d2606d19 100644
+index ae2ace42cc..3855a6809f 100644
@@ -193 +194 @@
-@@ -3644,6 +3644,6 @@ rxtx_config_display(void)
+@@ -2865,6 +2865,6 @@ rxtx_config_display(void)
@@ -202 +203 @@
-@@ -3903,5 +3903,5 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
+@@ -3124,5 +3124,5 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
@@ -209 +210 @@
-@@ -3963,5 +3963,5 @@ pkt_fwd_shared_rxq_check(void)
+@@ -3184,5 +3184,5 @@ pkt_fwd_shared_rxq_check(void)
@@ -217 +218 @@
-index 05763a71e8..7df201e047 100644
+index 24265ce4de..aaaec17841 100644
@@ -220 +221 @@
-@@ -1204,8 +1204,21 @@ tunnel_update:
+@@ -1193,8 +1193,21 @@ tunnel_update:
@@ -467 +468 @@
-index 5b742911a8..99f2a31bb8 100644
+index 5c62f48efd..fa449183c1 100644
@@ -470 +471 @@
-@@ -1639,8 +1639,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
+@@ -1640,8 +1640,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
@@ -481 +482 @@
-@@ -1829,5 +1829,4 @@ reconfig(portid_t new_port_id, unsigned socket_id)
+@@ -1830,5 +1830,4 @@ reconfig(portid_t new_port_id, unsigned socket_id)
@@ -487 +488 @@
-@@ -2234,4 +2233,10 @@ flush_fwd_rx_queues(void)
+@@ -2235,4 +2234,10 @@ flush_fwd_rx_queues(void)
@@ -498 +499 @@
-@@ -2279,5 +2284,6 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
+@@ -2280,5 +2285,6 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
@@ -506 +507 @@
-@@ -2361,4 +2367,5 @@ start_packet_forwarding(int with_tx_first)
+@@ -2362,4 +2368,5 @@ start_packet_forwarding(int with_tx_first)
@@ -512 +513 @@
-@@ -2391,4 +2398,8 @@ start_packet_forwarding(int with_tx_first)
+@@ -2392,4 +2399,8 @@ start_packet_forwarding(int with_tx_first)
@@ -521 +522 @@
-@@ -2652,5 +2663,5 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2653,5 +2664,5 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -528 +529 @@
-@@ -2677,4 +2688,8 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2678,4 +2689,8 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -537 +538 @@
-@@ -2879,5 +2894,5 @@ start_port(portid_t pid)
+@@ -2880,5 +2895,5 @@ start_port(portid_t pid)
@@ -544 +545 @@
-@@ -2890,5 +2905,5 @@ start_port(portid_t pid)
+@@ -2891,5 +2906,5 @@ start_port(portid_t pid)
@@ -551 +552 @@
-@@ -2898,4 +2913,7 @@ start_port(portid_t pid)
+@@ -2899,4 +2914,7 @@ start_port(portid_t pid)
@@ -559 +560 @@
-@@ -2903,13 +2921,18 @@ start_port(portid_t pid)
+@@ -2904,13 +2922,18 @@ start_port(portid_t pid)
@@ -581 +582 @@
-@@ -2944,5 +2967,5 @@ start_port(portid_t pid)
+@@ -2945,5 +2968,5 @@ start_port(portid_t pid)
@@ -588 +589 @@
-@@ -2959,5 +2982,5 @@ start_port(portid_t pid)
+@@ -2960,5 +2983,5 @@ start_port(portid_t pid)
@@ -595 +596 @@
-@@ -3735,32 +3758,32 @@ rxtx_port_config(portid_t pid)
+@@ -3736,32 +3759,32 @@ rxtx_port_config(portid_t pid)
@@ -638 +639 @@
-@@ -3768,24 +3791,24 @@ rxtx_port_config(portid_t pid)
+@@ -3769,24 +3792,24 @@ rxtx_port_config(portid_t pid)
@@ -671 +672 @@
-@@ -3868,5 +3891,5 @@ init_port_config(void)
+@@ -3869,5 +3892,5 @@ init_port_config(void)
@@ -678 +679 @@
-@@ -4042,5 +4065,5 @@ init_port_dcb_config(portid_t pid,
+@@ -4043,5 +4066,5 @@ init_port_dcb_config(portid_t pid,
@@ -686 +687 @@
-index 8ee682b362..63e19c9aef 100644
+index 59bb9e3c66..42db6b56df 100644
@@ -695 +696 @@
-@@ -241,4 +242,16 @@ struct xstat_display_info {
+@@ -220,4 +221,16 @@ struct xstat_display_info {
@@ -712 +713 @@
-@@ -263,6 +276,6 @@ struct rte_port {
+@@ -242,6 +255,6 @@ struct rte_port {
@@ -721 +722 @@
-@@ -327,4 +340,5 @@ struct fwd_lcore {
+@@ -301,4 +314,5 @@ struct fwd_lcore {
@@ -727 +728 @@
-@@ -333,4 +347,5 @@ struct fwd_engine {
+@@ -307,4 +321,5 @@ struct fwd_engine {


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

* patch 'net/bonding: fix mbuf fast free usage' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (30 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: do not poll stopped queues' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/memif: fix overwriting of head segment' " Kevin Traynor
                   ` (41 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/046b6944e8e3f66ec27284861c37657240755504

Thanks.

Kevin

---
From 046b6944e8e3f66ec27284861c37657240755504 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 25 May 2022 09:08:28 +0800
Subject: [PATCH] net/bonding: fix mbuf fast free usage

[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]

Usage of 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload has two
constraints: per-queue all mbufs comes from the same mempool and
has refcnt = 1.

Bonding mode Broadcast, Tx mbuf has more than one refcnt.
Bonding mode 8023AD, It contains two mempools separately for LACP
packets and other packets. In Tx or Rx, Fast mbuf free will operate
mbuf from different mempool.

This patch will prevent 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload
when in bonding mode Broadcast and mode 8023AD.

Fixes: 78aecefed955 ("bond: move param parsing in configure step")

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

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 5257d4c07b..b6fed1495b 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3583,4 +3583,5 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_kvargs *kvlist = internals->kvlist;
+	uint64_t offloads;
 	int arg_count;
 	uint16_t port_id = dev - rte_eth_devices;
@@ -3643,4 +3644,14 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	}
 
+	offloads = dev->data->dev_conf.txmode.offloads;
+	if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) &&
+			(internals->mode == BONDING_MODE_8023AD ||
+			internals->mode == BONDING_MODE_BROADCAST)) {
+		RTE_BOND_LOG(WARNING,
+			"bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it.");
+		offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
+		dev->data->dev_conf.txmode.offloads = offloads;
+	}
+
 	/* set the max_rx_pktlen */
 	internals->max_rx_pktlen = internals->candidate_max_rx_pktlen;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.563342782 +0100
+++ 0033-net-bonding-fix-mbuf-fast-free-usage.patch	2022-06-09 12:34:29.734980622 +0100
@@ -1 +1 @@
-From 18c41457cbaeaf44a87f88fe861de35c923ab702 Mon Sep 17 00:00:00 2001
+From 046b6944e8e3f66ec27284861c37657240755504 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index f0668a636f..ace8f8b45e 100644
+index 5257d4c07b..b6fed1495b 100644
@@ -30 +31 @@
-@@ -3584,4 +3584,5 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3583,4 +3583,5 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -36 +37 @@
-@@ -3644,4 +3645,14 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3643,4 +3644,14 @@ bond_ethdev_configure(struct rte_eth_dev *dev)


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

* patch 'net/memif: fix overwriting of head segment' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (31 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/bonding: fix mbuf fast free usage' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'ethdev: fix port state when stop' " Kevin Traynor
                   ` (40 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Ferruh Yigit, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/277cd2bf752d6f118df705440aa8c33387828df2

Thanks.

Kevin

---
From 277cd2bf752d6f118df705440aa8c33387828df2 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Wed, 25 May 2022 05:56:35 +0000
Subject: [PATCH] net/memif: fix overwriting of head segment

[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]

The 'dst_off' was reset in multi segment case.
This caused memif buffer segment to write to
beginning of mbuf, overwriting previous data.
Fix it with this patch.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Reported-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/memif/rte_eth_memif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index d3459c5007..205d08b028 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -352,4 +352,5 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		mbuf = mbuf_head;
 		mbuf->port = mq->in_port;
+		dst_off = 0;
 
 next_slot:
@@ -358,5 +359,4 @@ next_slot:
 
 		src_len = d0->length;
-		dst_off = 0;
 		src_off = 0;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.585345710 +0100
+++ 0034-net-memif-fix-overwriting-of-head-segment.patch	2022-06-09 12:34:29.736980625 +0100
@@ -1 +1 @@
-From 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c Mon Sep 17 00:00:00 2001
+From 277cd2bf752d6f118df705440aa8c33387828df2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 587ad45576..dd951b8296 100644
+index d3459c5007..205d08b028 100644
@@ -25 +26 @@
-@@ -349,4 +349,5 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -352,4 +352,5 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -31 +32 @@
-@@ -355,5 +356,4 @@ next_slot:
+@@ -358,5 +359,4 @@ next_slot:


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

* patch 'ethdev: fix port state when stop' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (32 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/memif: fix overwriting of head segment' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ngbe: fix link speed check' " Kevin Traynor
                   ` (39 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Thomas Monjalon, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/b6db13dcd97679cfa54eecff1328dabcdff4b475

Thanks.

Kevin

---
From b6db13dcd97679cfa54eecff1328dabcdff4b475 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 3 May 2022 18:02:17 +0800
Subject: [PATCH] ethdev: fix port state when stop

[ upstream commit 74b74269978c2790bc49238029e00b7c6e81c450 ]

Currently, 'dev_started' is always set to be 0 when dev stop, whether
it succeeded or failed. This is unreasonable and this patch fixed it.

Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 lib/ethdev/rte_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 1704e852b5..98f3f03885 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -1891,6 +1891,7 @@ rte_eth_dev_stop(uint16_t port_id)
 	eth_dev_fp_ops_reset(rte_eth_fp_ops + port_id);
 
-	dev->data->dev_started = 0;
 	ret = (*dev->dev_ops->dev_stop)(dev);
+	if (ret == 0)
+		dev->data->dev_started = 0;
 	rte_ethdev_trace_stop(port_id, ret);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.605857631 +0100
+++ 0035-ethdev-fix-port-state-when-stop.patch	2022-06-09 12:34:29.739980630 +0100
@@ -1 +1 @@
-From 74b74269978c2790bc49238029e00b7c6e81c450 Mon Sep 17 00:00:00 2001
+From b6db13dcd97679cfa54eecff1328dabcdff4b475 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 74b74269978c2790bc49238029e00b7c6e81c450 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a175867651..fe64f8d39d 100644
+index 1704e852b5..98f3f03885 100644
@@ -23 +24 @@
-@@ -1534,6 +1534,7 @@ rte_eth_dev_stop(uint16_t port_id)
+@@ -1891,6 +1891,7 @@ rte_eth_dev_stop(uint16_t port_id)


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

* patch 'net/ngbe: fix link speed check' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (33 preceding siblings ...)
  2022-06-09 11:36 ` patch 'ethdev: fix port state when stop' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ngbe: fix reading PHY ID' " Kevin Traynor
                   ` (38 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/c2f1874e68453fa6cc7a51c7cc28da29b8a73753

Thanks.

Kevin

---
From c2f1874e68453fa6cc7a51c7cc28da29b8a73753 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 30 May 2022 17:30:08 +0800
Subject: [PATCH] net/ngbe: fix link speed check

[ upstream commit bf1bc993eab153ffc488c435ad007bd827b7cd37 ]

Since the bit of ETH_LINK_SPEED_FIXED was set for the force link
speed, it conflicts with '~allowed_speeds'.

Fixes: 3518df5774c7 ("net/ngbe: support device start/stop")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 30c9e68579..af8d6911d1 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1042,5 +1042,5 @@ ngbe_dev_start(struct rte_eth_dev *dev)
 		allowed_speeds |= RTE_ETH_LINK_SPEED_10M;
 
-	if (*link_speeds & ~allowed_speeds) {
+	if (((*link_speeds) >> 1) & ~(allowed_speeds >> 1)) {
 		PMD_INIT_LOG(ERR, "Invalid link setting");
 		goto error;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.628146466 +0100
+++ 0036-net-ngbe-fix-link-speed-check.patch	2022-06-09 12:34:29.741980634 +0100
@@ -1 +1 @@
-From bf1bc993eab153ffc488c435ad007bd827b7cd37 Mon Sep 17 00:00:00 2001
+From c2f1874e68453fa6cc7a51c7cc28da29b8a73753 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf1bc993eab153ffc488c435ad007bd827b7cd37 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 4a2a9dde10..c7301a9616 100644
+index 30c9e68579..af8d6911d1 100644
@@ -21 +22 @@
-@@ -1049,5 +1049,5 @@ ngbe_dev_start(struct rte_eth_dev *dev)
+@@ -1042,5 +1042,5 @@ ngbe_dev_start(struct rte_eth_dev *dev)


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

* patch 'net/ngbe: fix reading PHY ID' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (34 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ngbe: fix link speed check' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ngbe: fix PCIe related operations with bus API' " Kevin Traynor
                   ` (37 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/fe6c80f4a5a7a98b31aeddd75b5986735706f993

Thanks.

Kevin

---
From fe6c80f4a5a7a98b31aeddd75b5986735706f993 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 30 May 2022 17:30:10 +0800
Subject: [PATCH] net/ngbe: fix reading PHY ID

[ upstream commit abe02c6c4c08b293ec523db0d69b36a0cb9f582c ]

Change to check low ID register to determine the valid PHY address,
for yt8521s PHY with high ID register value 0. And fix polling
register when expect value is 0, to complete MDIO read.

Fixes: 44e97550ca68 ("net/ngbe: identify and reset PHY")

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

diff --git a/drivers/net/ngbe/base/ngbe_phy.c b/drivers/net/ngbe/base/ngbe_phy.c
index 7a0ebba98c..e2b6b05ddf 100644
--- a/drivers/net/ngbe/base/ngbe_phy.c
+++ b/drivers/net/ngbe/base/ngbe_phy.c
@@ -122,9 +122,6 @@ bool ngbe_validate_phy_addr(struct ngbe_hw *hw, u32 phy_addr)
 	bool valid = false;
 
-	if (hw->sub_device_id == NGBE_SUB_DEV_ID_EM_YT8521S_SFP)
-		return true;
-
 	hw->phy.addr = phy_addr;
-	hw->phy.read_reg(hw, NGBE_MD_PHY_ID_HIGH,
+	hw->phy.read_reg(hw, NGBE_MD_PHY_ID_LOW,
 			     NGBE_MD_DEV_PMA_PMD, &phy_id);
 
@@ -132,5 +129,5 @@ bool ngbe_validate_phy_addr(struct ngbe_hw *hw, u32 phy_addr)
 		valid = true;
 
-	DEBUGOUT("PHY ID HIGH is 0x%04X", phy_id);
+	DEBUGOUT("PHY ID LOW is 0x%04X", phy_id);
 
 	return valid;
diff --git a/drivers/net/ngbe/base/ngbe_regs.h b/drivers/net/ngbe/base/ngbe_regs.h
index 6432ad8736..640e385990 100644
--- a/drivers/net/ngbe/base/ngbe_regs.h
+++ b/drivers/net/ngbe/base/ngbe_regs.h
@@ -1423,6 +1423,11 @@ po32m(struct ngbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
 
 	do {
-		all |= rd32(hw, reg);
-		value |= mask & all;
+		if (expect != 0) {
+			all |= rd32(hw, reg);
+			value |= mask & all;
+		} else {
+			all = rd32(hw, reg);
+			value = mask & all;
+		}
 		if (value == expect)
 			break;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.649380926 +0100
+++ 0037-net-ngbe-fix-reading-PHY-ID.patch	2022-06-09 12:34:29.742980635 +0100
@@ -1 +1 @@
-From abe02c6c4c08b293ec523db0d69b36a0cb9f582c Mon Sep 17 00:00:00 2001
+From fe6c80f4a5a7a98b31aeddd75b5986735706f993 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit abe02c6c4c08b293ec523db0d69b36a0cb9f582c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8199696428..1025d7d3a1 100644
+index 7a0ebba98c..e2b6b05ddf 100644
@@ -23 +24 @@
-@@ -121,9 +121,6 @@ bool ngbe_validate_phy_addr(struct ngbe_hw *hw, u32 phy_addr)
+@@ -122,9 +122,6 @@ bool ngbe_validate_phy_addr(struct ngbe_hw *hw, u32 phy_addr)
@@ -34 +35 @@
-@@ -131,5 +128,5 @@ bool ngbe_validate_phy_addr(struct ngbe_hw *hw, u32 phy_addr)
+@@ -132,5 +129,5 @@ bool ngbe_validate_phy_addr(struct ngbe_hw *hw, u32 phy_addr)


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

* patch 'net/ngbe: fix PCIe related operations with bus API' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (35 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ngbe: fix reading PHY ID' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/txgbe: fix SGMII mode to link up' " Kevin Traynor
                   ` (36 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/ff15e8fab98e51eab2a1b59c3560052c745a0d73

Thanks.

Kevin

---
From ff15e8fab98e51eab2a1b59c3560052c745a0d73 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 30 May 2022 17:30:13 +0800
Subject: [PATCH] net/ngbe: fix PCIe related operations with bus API

[ upstream commit 0aeb133c585fd6809cf7acb6a5dc4c54392ac575 ]

When using mailbox to request firmware to enable or disable PCIe bus
master, there is a small probability that mailbox cannot respond.
Change to use rte_pci_read_config() and rte_pci_write_config(), to
avoid this problem.

Fixes: ac6c5e9af56a ("net/ngbe: fix Tx hang on queue disable")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_hw.c    | 25 +++++++++++++++++++------
 drivers/net/ngbe/base/ngbe_osdep.h |  4 ++++
 drivers/net/ngbe/ngbe_ethdev.c     |  1 +
 3 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index c462fec9f9..08a7e02943 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -1060,15 +1060,28 @@ out:
 s32 ngbe_set_pcie_master(struct ngbe_hw *hw, bool enable)
 {
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *)hw->back;
 	s32 status = 0;
-	u16 addr = 0x04;
-	u32 data, i;
+	s32 ret = 0;
+	u32 i;
+	u16 reg;
+
+	ret = rte_pci_read_config(pci_dev, &reg,
+			sizeof(reg), PCI_COMMAND);
+	if (ret != sizeof(reg)) {
+		DEBUGOUT("Cannot read command from PCI config space!\n");
+		return -1;
+	}
 
-	ngbe_hic_pcie_read(hw, addr, &data, 4);
 	if (enable)
-		data |= 0x04;
+		reg |= PCI_COMMAND_MASTER;
 	else
-		data &= ~0x04;
+		reg &= ~PCI_COMMAND_MASTER;
 
-	ngbe_hic_pcie_write(hw, addr, &data, 4);
+	ret = rte_pci_write_config(pci_dev, &reg,
+			sizeof(reg), PCI_COMMAND);
+	if (ret != sizeof(reg)) {
+		DEBUGOUT("Cannot write command to PCI config space!\n");
+		return -1;
+	}
 
 	if (enable)
diff --git a/drivers/net/ngbe/base/ngbe_osdep.h b/drivers/net/ngbe/base/ngbe_osdep.h
index b62d793191..bf1fa30312 100644
--- a/drivers/net/ngbe/base/ngbe_osdep.h
+++ b/drivers/net/ngbe/base/ngbe_osdep.h
@@ -20,4 +20,5 @@
 #include <rte_io.h>
 #include <rte_ether.h>
+#include <rte_bus_pci.h>
 
 #include "../ngbe_logs.h"
@@ -181,3 +182,6 @@ static inline u64 REVERT_BIT_MASK64(u64 mask)
 #define ETH_P_8021AD     0x88A8
 
+#define PCI_COMMAND		0x04
+#define  PCI_COMMAND_MASTER	0x4
+
 #endif /* _NGBE_OS_H_ */
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index af8d6911d1..ccb45ab92c 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -356,4 +356,5 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 
 	/* Vendor and Device ID need to be set before init of shared code */
+	hw->back = pci_dev;
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.669599827 +0100
+++ 0038-net-ngbe-fix-PCIe-related-operations-with-bus-API.patch	2022-06-09 12:34:29.746980642 +0100
@@ -1 +1 @@
-From 0aeb133c585fd6809cf7acb6a5dc4c54392ac575 Mon Sep 17 00:00:00 2001
+From ff15e8fab98e51eab2a1b59c3560052c745a0d73 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0aeb133c585fd6809cf7acb6a5dc4c54392ac575 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 050649e0a6..facc1d9e82 100644
+index c462fec9f9..08a7e02943 100644
@@ -25 +26 @@
-@@ -1059,15 +1059,28 @@ out:
+@@ -1060,15 +1060,28 @@ out:
@@ -78 +79 @@
-index 9df9f824a1..5ac1c27a58 100644
+index af8d6911d1..ccb45ab92c 100644
@@ -81 +82 @@
-@@ -357,4 +357,5 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -356,4 +356,5 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)


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

* patch 'net/txgbe: fix SGMII mode to link up' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (36 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ngbe: fix PCIe related operations with bus API' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/txgbe: fix max number of queues for SR-IOV' " Kevin Traynor
                   ` (35 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/57e5b5747a87164938cc6ecf2295a9ff81b27239

Thanks.

Kevin

---
From 57e5b5747a87164938cc6ecf2295a9ff81b27239 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 30 May 2022 17:30:15 +0800
Subject: [PATCH] net/txgbe: fix SGMII mode to link up

[ upstream commit 6a925602a9cdd903a5ede52a10c6575e499e5b88 ]

Fix SGMII mode to link up.

Fixes: 01c3cf5c85a7 ("net/txgbe: add autoneg control read and write")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_phy.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index da2bbc43e0..9f46d5bdb0 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1368,7 +1368,15 @@ txgbe_set_sgmii_an37_ability(struct txgbe_hw *hw)
 {
 	u32 value;
+	u8 device_type = hw->subsystem_device_id & 0xF0;
 
 	wr32_epcs(hw, VR_XS_OR_PCS_MMD_DIGI_CTL1, 0x3002);
-	wr32_epcs(hw, SR_MII_MMD_AN_CTL, 0x0105);
+	/* for sgmii + external phy, set to 0x0105 (phy sgmii mode) */
+	/* for sgmii direct link, set to 0x010c (mac sgmii mode) */
+	if (device_type == TXGBE_DEV_ID_MAC_SGMII ||
+			hw->phy.media_type == txgbe_media_type_fiber)
+		wr32_epcs(hw, SR_MII_MMD_AN_CTL, 0x010C);
+	else if (device_type == TXGBE_DEV_ID_SGMII ||
+			device_type == TXGBE_DEV_ID_XAUI)
+		wr32_epcs(hw, SR_MII_MMD_AN_CTL, 0x0105);
 	wr32_epcs(hw, SR_MII_MMD_DIGI_CTL, 0x0200);
 	value = rd32_epcs(hw, SR_MII_MMD_CTL);
@@ -2281,4 +2289,6 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
 	} else if (hw->phy.media_type == txgbe_media_type_fiber) {
 		txgbe_set_link_to_sfi(hw, speed);
+		if (speed == TXGBE_LINK_SPEED_1GB_FULL)
+			txgbe_set_sgmii_an37_ability(hw);
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.692841923 +0100
+++ 0039-net-txgbe-fix-SGMII-mode-to-link-up.patch	2022-06-09 12:34:29.747980644 +0100
@@ -1 +1 @@
-From 6a925602a9cdd903a5ede52a10c6575e499e5b88 Mon Sep 17 00:00:00 2001
+From 57e5b5747a87164938cc6ecf2295a9ff81b27239 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6a925602a9cdd903a5ede52a10c6575e499e5b88 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/txgbe: fix max number of queues for SR-IOV' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (37 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/txgbe: fix SGMII mode to link up' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/nfp: fix disabling VLAN stripping' " Kevin Traynor
                   ` (34 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/22bac415760705b95cbab84a542443f80ef22468

Thanks.

Kevin

---
From 22bac415760705b95cbab84a542443f80ef22468 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 30 May 2022 17:30:16 +0800
Subject: [PATCH] net/txgbe: fix max number of queues for SR-IOV

[ upstream commit 09b010da8ec6388edae44ff55e1feab5c08191ab ]

Hardware restrictions require a maximum of 4 queues for every pool.

Fixes: a6712cd029a4 ("net/txgbe: add PF module init and uninit for SRIOV")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c
index 67d92bfa56..0b82fb1a88 100644
--- a/drivers/net/txgbe/txgbe_pf.c
+++ b/drivers/net/txgbe/txgbe_pf.c
@@ -109,5 +109,5 @@ int txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 		RTE_ETH_DEV_SRIOV(eth_dev).active = RTE_ETH_32_POOLS;
 	} else {
-		nb_queue = 8;
+		nb_queue = 4;
 		RTE_ETH_DEV_SRIOV(eth_dev).active = RTE_ETH_16_POOLS;
 	}
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.714050369 +0100
+++ 0040-net-txgbe-fix-max-number-of-queues-for-SR-IOV.patch	2022-06-09 12:34:29.748980646 +0100
@@ -1 +1 @@
-From 09b010da8ec6388edae44ff55e1feab5c08191ab Mon Sep 17 00:00:00 2001
+From 22bac415760705b95cbab84a542443f80ef22468 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 09b010da8ec6388edae44ff55e1feab5c08191ab ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/nfp: fix disabling VLAN stripping' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (38 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/txgbe: fix max number of queues for SR-IOV' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'app/testpmd: fix help of create meter command' " Kevin Traynor
                   ` (33 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Peng Zhang; +Cc: Yong Xu, Chaoyong He, Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/19854d0a91feb99cfbb0b1ebc09f6662fad161e0

Thanks.

Kevin

---
From 19854d0a91feb99cfbb0b1ebc09f6662fad161e0 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Thu, 26 May 2022 16:34:44 +0200
Subject: [PATCH] net/nfp: fix disabling VLAN stripping
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 7988cdca98940faa80d3e030c1b9811bcdd4c67d ]

"vlan set strip off 0" can't work, due to the incorrect usage
of the mask, it just represent that the status is changed or not,
not represent offloaded or not, so that the driver send the
error control message to the nic.

Now, by first inspect the mask of things that changed, and then
change the requested state if VLAN stripping according the
requested offload status. So this change can fix this bug.

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

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Signed-off-by: Yong Xu <yong.xu@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_common.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index b26770dbfb..57c50ec475 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -966,20 +966,23 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	uint32_t new_ctrl, update;
 	struct nfp_net_hw *hw;
+	struct rte_eth_conf *dev_conf;
 	int ret;
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	new_ctrl = 0;
+	dev_conf = &dev->data->dev_conf;
+	new_ctrl = hw->ctrl;
 
-	/* Enable vlan strip if it is not configured yet */
-	if ((mask & RTE_ETH_VLAN_STRIP_OFFLOAD) &&
-	    !(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
-		new_ctrl = hw->ctrl | NFP_NET_CFG_CTRL_RXVLAN;
+	/*
+	 * Vlan stripping setting
+	 * Enable or disable VLAN stripping
+	 */
+	if (mask & RTE_ETH_VLAN_STRIP_MASK) {
+		if (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
+			new_ctrl |= NFP_NET_CFG_CTRL_RXVLAN;
+		else
+			new_ctrl &= ~NFP_NET_CFG_CTRL_RXVLAN;
+	}
 
-	/* Disable vlan strip just if it is configured */
-	if (!(mask & RTE_ETH_VLAN_STRIP_OFFLOAD) &&
-	    (hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
-		new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_RXVLAN;
-
-	if (new_ctrl == 0)
+	if (new_ctrl == hw->ctrl)
 		return 0;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.733408674 +0100
+++ 0041-net-nfp-fix-disabling-VLAN-stripping.patch	2022-06-09 12:34:29.749980647 +0100
@@ -1 +1 @@
-From 7988cdca98940faa80d3e030c1b9811bcdd4c67d Mon Sep 17 00:00:00 2001
+From 19854d0a91feb99cfbb0b1ebc09f6662fad161e0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 7988cdca98940faa80d3e030c1b9811bcdd4c67d ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index be68c25fb8..34e3a03edd 100644
+index b26770dbfb..57c50ec475 100644
@@ -33 +34 @@
-@@ -990,20 +990,23 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -966,20 +966,23 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)


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

* patch 'app/testpmd: fix help of create meter command' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (39 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/nfp: fix disabling VLAN stripping' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/vmxnet3: fix Rx data ring initialization' " Kevin Traynor
                   ` (32 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jin Liu; +Cc: Chaoyong He, Niklas Söderlund, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/694f638eb125e5d51525fa7555256dcdbd164b80

Thanks.

Kevin

---
From 694f638eb125e5d51525fa7555256dcdbd164b80 Mon Sep 17 00:00:00 2001
From: Jin Liu <jin.liu@corigine.com>
Date: Thu, 28 Apr 2022 04:03:32 +0200
Subject: [PATCH] app/testpmd: fix help of create meter command
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit dfffd090c38522fa8859e6c3e41ae6e1313787b7 ]

The help message of create meter command is incomplete,
lack of policy_id param, update help string.

Fixes: f29fa2c59b85 ("app/testpmd: support policy actions per color")

Signed-off-by: Jin Liu <jin.liu@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/cmdline_mtr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index ad7ef6ad98..a0f885f190 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -818,6 +818,6 @@ cmdline_parse_inst_t cmd_create_port_meter = {
 	.f = cmd_create_port_meter_parsed,
 	.data = NULL,
-	.help_str = "create port meter <port_id> <mtr_id> <profile_id> <meter_enable>(yes|no) "
-		"<stats_mask> <shared> <use_pre_meter_color> "
+	.help_str = "create port meter <port_id> <mtr_id> <profile_id> <policy_id> "
+		"<meter_enable>(yes|no) <stats_mask> <shared> <use_pre_meter_color> "
 		"[<dscp_tbl_entry0> <dscp_tbl_entry1> ...<dscp_tbl_entry63>]",
 	.tokens = {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.753712338 +0100
+++ 0042-app-testpmd-fix-help-of-create-meter-command.patch	2022-06-09 12:34:29.749980647 +0100
@@ -1 +1 @@
-From dfffd090c38522fa8859e6c3e41ae6e1313787b7 Mon Sep 17 00:00:00 2001
+From 694f638eb125e5d51525fa7555256dcdbd164b80 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit dfffd090c38522fa8859e6c3e41ae6e1313787b7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/vmxnet3: fix Rx data ring initialization' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (40 preceding siblings ...)
  2022-06-09 11:36 ` patch 'app/testpmd: fix help of create meter command' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'common/sfc_efx/base: convert EFX PCIe INTF to MCDI value' " Kevin Traynor
                   ` (31 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Pankaj Gupta; +Cc: Jochen Behrens, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/a3f86b4d6b55f28cabf130c1a5223da3ed5f71d6

Thanks.

Kevin

---
From a3f86b4d6b55f28cabf130c1a5223da3ed5f71d6 Mon Sep 17 00:00:00 2001
From: Pankaj Gupta <pagupta@vmware.com>
Date: Tue, 24 May 2022 17:40:28 -0700
Subject: [PATCH] net/vmxnet3: fix Rx data ring initialization

[ upstream commit cac5e257f670159310a9558860463e562d480aa8 ]

Fix merge error.

Tested, using testpmd, for different hardware versions on ESXi 7.0
Update 2.

Fixes: 046f11619567 ("net/vmxnet3: support MSI-X interrupt")

Signed-off-by: Pankaj Gupta <pagupta@vmware.com>
Reviewed-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d1ef1cad08..d4aea74026 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -823,4 +823,9 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 		rqd->conf.compRingSize    = rxq->comp_ring.size;
 
+		if (VMXNET3_VERSION_GE_3(hw)) {
+			rqd->conf.rxDataRingBasePA = rxq->data_ring.basePA;
+			rqd->conf.rxDataRingDescSize = rxq->data_desc_size;
+		}
+
 		if (hw->intr.lsc_only)
 			rqd->conf.intrIdx = 1;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.773603050 +0100
+++ 0043-net-vmxnet3-fix-Rx-data-ring-initialization.patch	2022-06-09 12:34:29.751980651 +0100
@@ -1 +1 @@
-From cac5e257f670159310a9558860463e562d480aa8 Mon Sep 17 00:00:00 2001
+From a3f86b4d6b55f28cabf130c1a5223da3ed5f71d6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cac5e257f670159310a9558860463e562d480aa8 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c9e352b73a..2af67dc0a3 100644
+index d1ef1cad08..d4aea74026 100644
@@ -24 +25 @@
-@@ -876,4 +876,9 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
+@@ -823,4 +823,9 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)


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

* patch 'common/sfc_efx/base: convert EFX PCIe INTF to MCDI value' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (41 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/vmxnet3: fix Rx data ring initialization' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'ethdev: fix port close in secondary process' " Kevin Traynor
                   ` (30 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/240030005bd8259119d06d88726ae7b525879eeb

Thanks.

Kevin

---
From 240030005bd8259119d06d88726ae7b525879eeb Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Thu, 26 May 2022 11:45:48 +0300
Subject: [PATCH] common/sfc_efx/base: convert EFX PCIe INTF to MCDI value

[ upstream commit b85f50487eed8f94c85952587890fffd4de9a0d9 ]

When the driver queries its PCIe interface type via MCDI,
the value from the response is translated to an EFX enum.

When the driver passes this enum value back to any other
MCDI helper, the inverse translation has to be conducted.

Fixes: 1bf9ff57ccb3 ("common/sfc_efx/base: allow getting VNIC MCDI client handles")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_impl.h |  6 ++++
 drivers/common/sfc_efx/base/efx_mcdi.c | 44 +++++++++++++++++++++++---
 2 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h
index e2802e6672..ba00eeeb47 100644
--- a/drivers/common/sfc_efx/base/efx_impl.h
+++ b/drivers/common/sfc_efx/base/efx_impl.h
@@ -1556,4 +1556,10 @@ efx_mcdi_intf_from_pcie(
 	__out			efx_pcie_interface_t *efx_intf);
 
+LIBEFX_INTERNAL
+extern	__checkReturn		efx_rc_t
+efx_mcdi_intf_to_pcie(
+	__in			efx_pcie_interface_t efx_intf,
+	__out			uint32_t *pcie_intf);
+
 LIBEFX_INTERNAL
 extern	__checkReturn	efx_rc_t
diff --git a/drivers/common/sfc_efx/base/efx_mcdi.c b/drivers/common/sfc_efx/base/efx_mcdi.c
index 9189a7a8b3..404ca23d58 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -660,4 +660,5 @@ efx_mcdi_get_client_handle(
 	    MC_CMD_GET_CLIENT_HANDLE_IN_LEN,
 	    MC_CMD_GET_CLIENT_HANDLE_OUT_LEN);
+	uint32_t pcie_intf;
 	efx_rc_t rc;
 
@@ -667,4 +668,8 @@ efx_mcdi_get_client_handle(
 	}
 
+	rc = efx_mcdi_intf_to_pcie(intf, &pcie_intf);
+	if (rc != 0)
+		goto fail2;
+
 	req.emr_cmd = MC_CMD_GET_CLIENT_HANDLE;
 	req.emr_in_buf = payload;
@@ -677,5 +682,5 @@ efx_mcdi_get_client_handle(
 	MCDI_IN_SET_WORD(req, GET_CLIENT_HANDLE_IN_FUNC_PF, pf);
 	MCDI_IN_SET_WORD(req, GET_CLIENT_HANDLE_IN_FUNC_VF, vf);
-	MCDI_IN_SET_DWORD(req, GET_CLIENT_HANDLE_IN_FUNC_INTF, intf);
+	MCDI_IN_SET_DWORD(req, GET_CLIENT_HANDLE_IN_FUNC_INTF, pcie_intf);
 
 	efx_mcdi_execute(enp, &req);
@@ -683,10 +688,10 @@ efx_mcdi_get_client_handle(
 	if (req.emr_rc != 0) {
 		rc = req.emr_rc;
-		goto fail2;
+		goto fail3;
 	}
 
 	if (req.emr_out_length_used < MC_CMD_GET_CLIENT_HANDLE_OUT_LEN) {
 		rc = EMSGSIZE;
-		goto fail3;
+		goto fail4;
 	}
 
@@ -694,4 +699,6 @@ efx_mcdi_get_client_handle(
 
 	return 0;
+fail4:
+	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
@@ -710,5 +717,5 @@ efx_mcdi_get_own_client_handle(
 	efx_rc_t rc;
 
-	rc = efx_mcdi_get_client_handle(enp, PCIE_INTERFACE_CALLER,
+	rc = efx_mcdi_get_client_handle(enp, EFX_PCIE_INTERFACE_CALLER,
 	    PCIE_FUNCTION_PF_NULL, PCIE_FUNCTION_VF_NULL, handle);
 	if (rc != 0)
@@ -2234,4 +2241,33 @@ fail1:
 }
 
+	__checkReturn		efx_rc_t
+efx_mcdi_intf_to_pcie(
+	__in			efx_pcie_interface_t efx_intf,
+	__out			uint32_t *pcie_intf)
+{
+	efx_rc_t rc;
+
+	switch (efx_intf) {
+	case EFX_PCIE_INTERFACE_CALLER:
+		*pcie_intf = PCIE_INTERFACE_CALLER;
+		break;
+	case EFX_PCIE_INTERFACE_HOST_PRIMARY:
+		*pcie_intf = PCIE_INTERFACE_HOST_PRIMARY;
+		break;
+	case EFX_PCIE_INTERFACE_NIC_EMBEDDED:
+		*pcie_intf = PCIE_INTERFACE_NIC_EMBEDDED;
+		break;
+	default:
+		rc = EINVAL;
+		goto fail1;
+	}
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+	return (rc);
+}
+
 /*
  * This function returns the pf and vf number of a function.  If it is a pf the
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.793309055 +0100
+++ 0044-common-sfc_efx-base-convert-EFX-PCIe-INTF-to-MCDI-va.patch	2022-06-09 12:34:29.753980654 +0100
@@ -1 +1 @@
-From b85f50487eed8f94c85952587890fffd4de9a0d9 Mon Sep 17 00:00:00 2001
+From 240030005bd8259119d06d88726ae7b525879eeb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b85f50487eed8f94c85952587890fffd4de9a0d9 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 7dfe30b695..9a5d465fa0 100644
+index e2802e6672..ba00eeeb47 100644
@@ -27 +28 @@
-@@ -1557,4 +1557,10 @@ efx_mcdi_intf_from_pcie(
+@@ -1556,4 +1556,10 @@ efx_mcdi_intf_from_pcie(


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

* patch 'ethdev: fix port close in secondary process' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (42 preceding siblings ...)
  2022-06-09 11:36 ` patch 'common/sfc_efx/base: convert EFX PCIe INTF to MCDI value' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/bnxt: fix compatibility with some old firmwares' " Kevin Traynor
                   ` (29 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/7c2df6be1edcc59f8e969d37f602c49cda793bc6

Thanks.

Kevin

---
From 7c2df6be1edcc59f8e969d37f602c49cda793bc6 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 1 Jun 2022 11:15:13 +0800
Subject: [PATCH] ethdev: fix port close in secondary process

[ upstream commit ea6101a8e483f3b6ec505c91b7e72ab1628dab1f ]

Secondary process needs to close device to release process private
resources.  But secondary process should not be obliged to wait for
device stop before closing ethdev.

Fixes: febc855b358e ("ethdev: forbid closing started device")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/ethdev/rte_ethdev.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 98f3f03885..62e67f006d 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -1933,5 +1933,11 @@ rte_eth_dev_close(uint16_t port_id)
 	dev = &rte_eth_devices[port_id];
 
-	if (dev->data->dev_started) {
+	/*
+	 * Secondary process needs to close device to release process private
+	 * resources. But secondary process should not be obliged to wait
+	 * for device stop before closing ethdev.
+	 */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY &&
+			dev->data->dev_started) {
 		RTE_ETHDEV_LOG(ERR, "Cannot close started device (port %u)\n",
 			       port_id);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.815526507 +0100
+++ 0045-ethdev-fix-port-close-in-secondary-process.patch	2022-06-09 12:34:29.757980661 +0100
@@ -1 +1 @@
-From ea6101a8e483f3b6ec505c91b7e72ab1628dab1f Mon Sep 17 00:00:00 2001
+From 7c2df6be1edcc59f8e969d37f602c49cda793bc6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ea6101a8e483f3b6ec505c91b7e72ab1628dab1f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 46c088dc88..b9c5dea09f 100644
+index 98f3f03885..62e67f006d 100644
@@ -23 +24 @@
-@@ -1577,5 +1577,11 @@ rte_eth_dev_close(uint16_t port_id)
+@@ -1933,5 +1933,11 @@ rte_eth_dev_close(uint16_t port_id)


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

* patch 'net/bnxt: fix compatibility with some old firmwares' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (43 preceding siblings ...)
  2022-06-09 11:36 ` patch 'ethdev: fix port close in secondary process' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/bnxt: fix ULP parser to ignore segment offset' " Kevin Traynor
                   ` (28 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: David Marchand; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/df8b0db584a99a49fe422549b03d1c5f20c802d9

Thanks.

Kevin

---
From df8b0db584a99a49fe422549b03d1c5f20c802d9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 18 Mar 2022 16:03:31 +0100
Subject: [PATCH] net/bnxt: fix compatibility with some old firmwares

[ upstream commit a43d0129579034af06314b6603d92a866d809eeb ]

This reverts commit 3972281f47b2cc0cf844698885f0e6b4228c0975.

Reported by Red Hat QE: with older firmware versions (at least versions
20.6.112.0 and 20.6.143.0), initialisation never succeeds following this
change.
Revert it for now, waiting for a more complete fix.

Fixes: 3972281f47b2 ("net/bnxt: fix device readiness check")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7f2ac2c72a..6e87242992 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1245,9 +1245,4 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 		HWRM_CHECK_RESULT();
 
-	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY) {
-		rc = -EAGAIN;
-		goto error;
-	}
-
 	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
 		resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
@@ -6150,8 +6145,4 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
 
 	HWRM_CHECK_RESULT_SILENT();
-
-	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY)
-		rc = -EAGAIN;
-
 	HWRM_UNLOCK();
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.838182444 +0100
+++ 0046-net-bnxt-fix-compatibility-with-some-old-firmwares.patch	2022-06-09 12:34:29.761980668 +0100
@@ -1 +1 @@
-From a43d0129579034af06314b6603d92a866d809eeb Mon Sep 17 00:00:00 2001
+From df8b0db584a99a49fe422549b03d1c5f20c802d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a43d0129579034af06314b6603d92a866d809eeb ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6e4753c508..9eb8b8d56d 100644
+index 7f2ac2c72a..6e87242992 100644
@@ -26 +27 @@
-@@ -1250,9 +1250,4 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1245,9 +1245,4 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -36 +37 @@
-@@ -6155,8 +6150,4 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
+@@ -6150,8 +6145,4 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)


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

* patch 'net/bnxt: fix ULP parser to ignore segment offset' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (44 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/bnxt: fix compatibility with some old firmwares' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'vhost: fix async access' " Kevin Traynor
                   ` (27 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Shuanglin Wang; +Cc: Randy Schacher, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/78eaf9fbc3bd2e6bff051611018281aed6940f18

Thanks.

Kevin

---
From 78eaf9fbc3bd2e6bff051611018281aed6940f18 Mon Sep 17 00:00:00 2001
From: Shuanglin Wang <shuanglin.wang@broadcom.com>
Date: Mon, 14 Mar 2022 14:23:33 -0700
Subject: [PATCH] net/bnxt: fix ULP parser to ignore segment offset

[ upstream commit 631ac1da5176323746974e60990f313c79357158 ]

Fix ULP parser to ignore segment_offset of IPv4 header.
Currently the IPv4 handler is assuming default setting,
which causes the flow table to be updated incorrectly.

Fixes: 741172be52de ("net/bnxt: refactor flow parser in ULP")

Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index f4274dd634..9edf3e8799 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -1097,5 +1097,5 @@ ulp_rte_ipv4_hdr_handler(const struct rte_flow_item *item,
 			      ulp_deference_struct(ipv4_mask,
 						   hdr.fragment_offset),
-			      ULP_PRSR_ACT_DEFAULT);
+			      ULP_PRSR_ACT_MASK_IGNORE);
 
 	size = sizeof(((struct rte_flow_item_ipv4 *)NULL)->hdr.time_to_live);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.862108321 +0100
+++ 0047-net-bnxt-fix-ULP-parser-to-ignore-segment-offset.patch	2022-06-09 12:34:29.762980669 +0100
@@ -1 +1 @@
-From 631ac1da5176323746974e60990f313c79357158 Mon Sep 17 00:00:00 2001
+From 78eaf9fbc3bd2e6bff051611018281aed6940f18 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 631ac1da5176323746974e60990f313c79357158 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'vhost: fix async access' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (45 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/bnxt: fix ULP parser to ignore segment offset' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'doc: fix vhost multi-queue reconnection' " Kevin Traynor
                   ` (26 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: David Marchand; +Cc: Sunil Pai G, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/fadc687f559274967c43c55317b66e924002a261

Thanks.

Kevin

---
From fadc687f559274967c43c55317b66e924002a261 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 11 Apr 2022 13:00:08 +0200
Subject: [PATCH] vhost: fix async access

[ upstream commit 2d47fd3dfb596d266b89d82c2c4b2351c3d6fe20 ]

vq->async accesses must be protected with vq->access_lock.

Fixes: eb666d24085f ("vhost: fix async unregister deadlock")
Fixes: 0c0935c5f794 ("vhost: allow to check in-flight packets for async vhost")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index 474645b64e..24f94495c6 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -1784,24 +1784,20 @@ rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
 		return ret;
 
-	ret = 0;
-
-	if (!vq->async)
-		return ret;
-
 	if (!rte_spinlock_trylock(&vq->access_lock)) {
 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
 			"virt queue busy.\n");
-		return -1;
+		return ret;
 	}
 
-	if (vq->async->pkts_inflight_n) {
+	if (!vq->async) {
+		ret = 0;
+	} else if (vq->async->pkts_inflight_n) {
 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
 			"async inflight packets must be completed before unregistration.\n");
-		ret = -1;
-		goto out;
+	} else {
+		vhost_free_async_mem(vq);
+		ret = 0;
 	}
 
-	vhost_free_async_mem(vq);
-out:
 	rte_spinlock_unlock(&vq->access_lock);
 
@@ -1858,7 +1854,4 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)
 		return ret;
 
-	if (!vq->async)
-		return ret;
-
 	if (!rte_spinlock_trylock(&vq->access_lock)) {
 		VHOST_LOG_CONFIG(DEBUG, "Failed to check in-flight packets. "
@@ -1867,5 +1860,7 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)
 	}
 
-	ret = vq->async->pkts_inflight_n;
+	if (vq->async)
+		ret = vq->async->pkts_inflight_n;
+
 	rte_spinlock_unlock(&vq->access_lock);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.882751020 +0100
+++ 0048-vhost-fix-async-access.patch	2022-06-09 12:34:29.763980671 +0100
@@ -1 +1 @@
-From 2d47fd3dfb596d266b89d82c2c4b2351c3d6fe20 Mon Sep 17 00:00:00 2001
+From fadc687f559274967c43c55317b66e924002a261 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d47fd3dfb596d266b89d82c2c4b2351c3d6fe20 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index df0bb9d043..14863144f3 100644
+index 474645b64e..24f94495c6 100644
@@ -23 +24 @@
-@@ -1754,25 +1754,21 @@ rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
+@@ -1784,24 +1784,20 @@ rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
@@ -32,2 +33,2 @@
- 		VHOST_LOG_CONFIG(ERR, "(%s) failed to unregister async channel, virtqueue busy.\n",
- 				dev->ifname);
+ 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
+ 			"virt queue busy.\n");
@@ -42,3 +43,2 @@
- 		VHOST_LOG_CONFIG(ERR, "(%s) failed to unregister async channel.\n", dev->ifname);
- 		VHOST_LOG_CONFIG(ERR, "(%s) inflight packets must be completed before unregistration.\n",
- 			dev->ifname);
+ 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
+ 			"async inflight packets must be completed before unregistration.\n");
@@ -56 +56 @@
-@@ -1892,7 +1888,4 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)
+@@ -1858,7 +1854,4 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)
@@ -63,2 +63,2 @@
- 		VHOST_LOG_CONFIG(DEBUG,
-@@ -1902,5 +1895,7 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)
+ 		VHOST_LOG_CONFIG(DEBUG, "Failed to check in-flight packets. "
+@@ -1867,5 +1860,7 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)


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

* patch 'doc: fix vhost multi-queue reconnection' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (46 preceding siblings ...)
  2022-06-09 11:36 ` patch 'vhost: fix async access' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'vhost: fix deadlock when message handling failed' " Kevin Traynor
                   ` (25 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Xuan Ding; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/e74119baf13365895c63f5e68cbe7c32d31860ae

Thanks.

Kevin

---
From e74119baf13365895c63f5e68cbe7c32d31860ae Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Mon, 9 May 2022 04:11:58 +0000
Subject: [PATCH] doc: fix vhost multi-queue reconnection

[ upstream commit 5d4a6a437076c3ba6230a36b1d811ab69272fab6 ]

Since QEMU 5.2.0 fixes the vhost split ring multi-queue reconnection
issue in commit f66337bdbfda ("vhost-user: save features of multiqueues
if chardev is closed"), this patch updates known issue to indicate
the range of affeacted QEMU versions.

Fixes: b37e95507e1b ("doc: add vhost multi-queue reconnection issue")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 doc/guides/rel_notes/known_issues.rst | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index 187d9c942e..570550843a 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -886,6 +886,6 @@ Unsuitable IOVA mode may be picked as the default
    ALL.
 
-Vhost multi-queue reconnection failed with QEMU version >= 4.2.0
-----------------------------------------------------------------
+Vhost multi-queue reconnection failed with QEMU version 4.2.0 to 5.1.0
+----------------------------------------------------------------------
 
 **Description**
@@ -893,5 +893,6 @@ Vhost multi-queue reconnection failed with QEMU version >= 4.2.0
    acked features for one vhost-net when vhost quits. When vhost reconnects
    to virtio-net/virtio-pmd in multi-queue situations, the features been
-   set multiple times are not consistent.
+   set multiple times are not consistent. QEMU-5.2.0 fixes this issue in commit
+   f66337bdbfda ("vhost-user: save features of multiqueues if chardev is closed").
 
 **Implication**
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.903296309 +0100
+++ 0049-doc-fix-vhost-multi-queue-reconnection.patch	2022-06-09 12:34:29.764980673 +0100
@@ -1 +1 @@
-From 5d4a6a437076c3ba6230a36b1d811ab69272fab6 Mon Sep 17 00:00:00 2001
+From e74119baf13365895c63f5e68cbe7c32d31860ae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d4a6a437076c3ba6230a36b1d811ab69272fab6 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org


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

* patch 'vhost: fix deadlock when message handling failed' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (47 preceding siblings ...)
  2022-06-09 11:36 ` patch 'doc: fix vhost multi-queue reconnection' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'examples/vhost: fix crash when no VMDq' " Kevin Traynor
                   ` (24 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Chenbo Xia, Wei Ling, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/b3062120fffdf5d4f3ca65127c3f22fda410d4e5

Thanks.

Kevin

---
From b3062120fffdf5d4f3ca65127c3f22fda410d4e5 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Sat, 7 May 2022 13:27:53 +0000
Subject: [PATCH] vhost: fix deadlock when message handling failed

[ upstream commit 9e89b06d027c6087624f36f288bd82c643c5a269 ]

In vhost_user_msg_handler(), if vhost message handling
failed, we should check whether the queue is locked and
release the lock before returning. Or, it will cause a
deadlock later.

Fixes: 7f31d4ea05ca ("vhost: fix lock on device readiness notification")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/vhost/vhost_user.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 9a266b5d42..ff47247d2b 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2974,5 +2974,4 @@ vhost_user_msg_handler(int vid, int fd)
 	}
 
-	ret = 0;
 	request = msg.request.master;
 	if (request > VHOST_USER_NONE && request < VHOST_USER_MAX &&
@@ -3116,7 +3115,9 @@ skip_to_post_handle:
 		VHOST_LOG_CONFIG(ERR,
 			"vhost message handling failed.\n");
-		return -1;
+		ret = -1;
+		goto unlock;
 	}
 
+	ret = 0;
 	for (i = 0; i < dev->nr_vring; i++) {
 		struct vhost_virtqueue *vq = dev->virtqueue[i];
@@ -3129,8 +3130,9 @@ skip_to_post_handle:
 	}
 
+unlock:
 	if (unlock_required)
 		vhost_user_unlock_all_queue_pairs(dev);
 
-	if (!virtio_is_ready(dev))
+	if (ret != 0 || !virtio_is_ready(dev))
 		goto out;
 
@@ -3159,5 +3161,5 @@ skip_to_post_handle:
 
 out:
-	return 0;
+	return ret;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.923616928 +0100
+++ 0050-vhost-fix-deadlock-when-message-handling-failed.patch	2022-06-09 12:34:29.765980675 +0100
@@ -1 +1 @@
-From 9e89b06d027c6087624f36f288bd82c643c5a269 Mon Sep 17 00:00:00 2001
+From b3062120fffdf5d4f3ca65127c3f22fda410d4e5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e89b06d027c6087624f36f288bd82c643c5a269 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 850848c269..91e69d1d97 100644
+index 9a266b5d42..ff47247d2b 100644
@@ -26 +27 @@
-@@ -2888,5 +2888,4 @@ vhost_user_msg_handler(int vid, int fd)
+@@ -2974,5 +2974,4 @@ vhost_user_msg_handler(int vid, int fd)
@@ -30,5 +31,5 @@
- 	request = ctx.msg.request.master;
- 	if (request > VHOST_USER_NONE && request < RTE_DIM(vhost_message_handlers))
-@@ -3032,7 +3031,9 @@ skip_to_post_handle:
- 	} else if (ret == RTE_VHOST_MSG_RESULT_ERR) {
- 		VHOST_LOG_CONFIG(ERR, "(%s) vhost message handling failed.\n", dev->ifname);
+ 	request = msg.request.master;
+ 	if (request > VHOST_USER_NONE && request < VHOST_USER_MAX &&
+@@ -3116,7 +3115,9 @@ skip_to_post_handle:
+ 		VHOST_LOG_CONFIG(ERR,
+ 			"vhost message handling failed.\n");
@@ -43 +44 @@
-@@ -3045,8 +3046,9 @@ skip_to_post_handle:
+@@ -3129,8 +3130,9 @@ skip_to_post_handle:
@@ -54 +55 @@
-@@ -3075,5 +3077,5 @@ skip_to_post_handle:
+@@ -3159,5 +3161,5 @@ skip_to_post_handle:


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

* patch 'examples/vhost: fix crash when no VMDq' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (48 preceding siblings ...)
  2022-06-09 11:36 ` patch 'vhost: fix deadlock when message handling failed' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/mlx5: fix Tx recovery' " Kevin Traynor
                   ` (23 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/d512315deffeb5f0496c865fe02c981a067a92b2

Thanks.

Kevin

---
From d512315deffeb5f0496c865fe02c981a067a92b2 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Wed, 18 May 2022 21:36:33 +0800
Subject: [PATCH] examples/vhost: fix crash when no VMDq

[ upstream commit 6f3d83c7f207d435d960ad881f127e9971a81069 ]

If the VMDq limits is 0, a divide-by-zero error occurs.
This patch replaces throwing a floating point exception with
a normal error message.

Fixes: d19533e86f ("examples/vhost: copy old vhost example")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 examples/vhost/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 6c3bd9e4b0..84844da68f 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -265,4 +265,8 @@ port_init(uint16_t port)
 		return retval;
 	}
+	if (dev_info.max_vmdq_pools == 0) {
+		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDq info.\n");
+		return -1;
+	}
 
 	rxconf = &dev_info.default_rxconf;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.944888468 +0100
+++ 0051-examples-vhost-fix-crash-when-no-VMDq.patch	2022-06-09 12:34:29.767980678 +0100
@@ -1 +1 @@
-From 6f3d83c7f207d435d960ad881f127e9971a81069 Mon Sep 17 00:00:00 2001
+From d512315deffeb5f0496c865fe02c981a067a92b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f3d83c7f207d435d960ad881f127e9971a81069 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 5bc34b0c52..e7fee5aa1b 100644
+index 6c3bd9e4b0..84844da68f 100644
@@ -23 +24 @@
-@@ -432,4 +432,8 @@ port_init(uint16_t port)
+@@ -265,4 +265,8 @@ port_init(uint16_t port)


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

* patch 'net/mlx5: fix Tx recovery' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (49 preceding siblings ...)
  2022-06-09 11:36 ` patch 'examples/vhost: fix crash when no VMDq' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/mlx5: fix statistics read on Linux' " Kevin Traynor
                   ` (22 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/942307408c2fbf24d28123660dcbf851c7685005

Thanks.

Kevin

---
From 942307408c2fbf24d28123660dcbf851c7685005 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 18 May 2022 12:42:32 +0300
Subject: [PATCH] net/mlx5: fix Tx recovery

[ upstream commit 1485d961e2c9d77dfa4900a16b5ba70cbaa4c7ce ]

When an error occurs in Tx, and it is moved to ERROR state, it
is not recoverable, during recovery it's state cannot be modified
to INIT. to modify state from RESET to INIT, the port must be
passed in modify attributes, and in case of ERROR to READY
modification path, it was not provided.

Provide port number when changing state from RESET to INIT.

Fixes: 3a87b964edd3 ("net/mlx5: create Tx queues with DevX")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_verbs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 2b6eef44a7..b113731097 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -95,5 +95,4 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,
 		.port_num = dev_port,
 	};
-	int attr_mask = (IBV_QP_STATE | IBV_QP_PORT);
 	int ret;
 
@@ -109,8 +108,6 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,
 			return 0;
 	}
-	if (type == MLX5_TXQ_MOD_ERR2RDY)
-		attr_mask = IBV_QP_STATE;
 	mod.qp_state = IBV_QPS_INIT;
-	ret = mlx5_glue->modify_qp(obj->qp, &mod, attr_mask);
+	ret = mlx5_glue->modify_qp(obj->qp, &mod, IBV_QP_STATE | IBV_QP_PORT);
 	if (ret) {
 		DRV_LOG(ERR, "Cannot change Tx QP state to INIT %s",
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.965613356 +0100
+++ 0052-net-mlx5-fix-Tx-recovery.patch	2022-06-09 12:34:29.768980680 +0100
@@ -1 +1 @@
-From 1485d961e2c9d77dfa4900a16b5ba70cbaa4c7ce Mon Sep 17 00:00:00 2001
+From 942307408c2fbf24d28123660dcbf851c7685005 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1485d961e2c9d77dfa4900a16b5ba70cbaa4c7ce ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index b6ba21c216..67a7bec22b 100644
+index 2b6eef44a7..b113731097 100644


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

* patch 'net/mlx5: fix statistics read on Linux' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (50 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/mlx5: fix Tx recovery' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'kni: fix build with Linux 5.18' " Kevin Traynor
                   ` (21 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  Cc: Didier Pallard, Geoffrey Le Gourriérec,
	Bassam Zaid AlKilani, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/2d0228a9e95bfc46513969fb7f098d43a34e0d64

Thanks.

Kevin

---
From 2d0228a9e95bfc46513969fb7f098d43a34e0d64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Geoffrey=20Le=20Gourri=C3=A9rec?=
 <geoffrey.le_gourrierec@6wind.com>
Date: Thu, 17 Mar 2022 14:23:48 +0100
Subject: [PATCH] net/mlx5: fix statistics read on Linux
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit eadc35df59a1a1a5017c0db1c7a9978ca8eb56e9 ]

This patch encompasses a few fixes carried by a previous patch
that aimed to support bonding device stats counting.

- If mlx5_os_read_dev_stat fails, it returns 1 instead of a
  negative value, causing mlx5_xstats_get to return an invalid
  number of counters. Since this error is not blocking, do not
  mess ret value with mlx5_os_read_dev_stat returned value.

  This allows avoiding the very annoying log:
  "n_xstats != n_xstats_names => skipping"

- Invert the check for mlx5_os_read_dev_stat(), currently leading
  us to store the result if the function failed, and use a
  backup value if it succeeded, which is the opposite of what we
  actually want. Revert to the original (correct) test.

- Add missing test on _mlx5_os_read_dev_counters() to prevent
  using trash stats values.

Fixes: 7ed15acdcd69 ("net/mlx5: improve xstats of bonding port")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Geoffrey Le Gourriérec <geoffrey.le_gourrierec@6wind.com>
Tested-by: Bassam Zaid AlKilani <bzalkilani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 8fe73f1adb..b5819cc656 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1387,4 +1387,6 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
 	} else {
 		ret = _mlx5_os_read_dev_counters(dev, -1, stats);
+		if (ret)
+			return ret;
 	}
 	/* Read IB counters. */
@@ -1392,8 +1394,7 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
 		if (!xstats_ctrl->info[i].dev)
 			continue;
-		ret = mlx5_os_read_dev_stat(priv, xstats_ctrl->info[i].ctr_name,
-					    &stats[i]);
 		/* return last xstats counter if fail to read. */
-		if (ret != 0)
+		if (mlx5_os_read_dev_stat(priv, xstats_ctrl->info[i].ctr_name,
+			    &stats[i]) == 0)
 			xstats_ctrl->xstats[i] = stats[i];
 		else
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.985373149 +0100
+++ 0053-net-mlx5-fix-statistics-read-on-Linux.patch	2022-06-09 12:34:29.769980681 +0100
@@ -1 +1 @@
-From eadc35df59a1a1a5017c0db1c7a9978ca8eb56e9 Mon Sep 17 00:00:00 2001
+From 2d0228a9e95bfc46513969fb7f098d43a34e0d64 Mon Sep 17 00:00:00 2001
@@ -9,0 +10,2 @@
+[ upstream commit eadc35df59a1a1a5017c0db1c7a9978ca8eb56e9 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -41 +42 @@
-index 6fbfcfad48..8d30ad0994 100644
+index 8fe73f1adb..b5819cc656 100644


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

* patch 'kni: fix build with Linux 5.18' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (51 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/mlx5: fix statistics read on Linux' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: fix data path selection' " Kevin Traynor
                   ` (20 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/85185a45528ba4eb07d37f7b10fd4b744aba971c

Thanks.

Kevin

---
From 85185a45528ba4eb07d37f7b10fd4b744aba971c Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Wed, 1 Jun 2022 08:53:58 +0200
Subject: [PATCH] kni: fix build with Linux 5.18

[ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ]

Since commit 2655926aea9b (net: Remove netif_rx_any_context() and
netif_rx_ni().) in 5.18, netif_rx_ni() no longer exists as netif_rx()
can be called from any context. So define HAVE_NETIF_RX_NI for older
releases and call the appropriate function in kni_net.

netif_rx_ni() must be used on older kernel since netif_rx() might
might lead to deadlocks or other problems there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 kernel/linux/kni/compat.h  | 4 ++++
 kernel/linux/kni/kni_net.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 664785674f..0db29a4a6f 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -142,2 +142,6 @@
 #define HAVE_TSK_IN_GUP
 #endif
+
+#if KERNEL_VERSION(5, 18, 0) > LINUX_VERSION_CODE
+#define HAVE_NETIF_RX_NI
+#endif
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 29e5b9e21f..a8b092b756 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -442,5 +442,9 @@ kni_net_rx_normal(struct kni_dev *kni)
 
 		/* Call netif interface */
+#ifdef HAVE_NETIF_RX_NI
 		netif_rx_ni(skb);
+#else
+		netif_rx(skb);
+#else
 
 		/* Update statistics */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.005263410 +0100
+++ 0054-kni-fix-build-with-Linux-5.18.patch	2022-06-09 12:34:29.769980681 +0100
@@ -1 +1 @@
-From c98600d4bed6d15599e448990f2ba117ca938a2d Mon Sep 17 00:00:00 2001
+From 85185a45528ba4eb07d37f7b10fd4b744aba971c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ]
+
@@ -13,2 +14,0 @@
-
-Cc: stable@dpdk.org


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

* patch 'net/iavf: fix data path selection' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (52 preceding siblings ...)
  2022-06-09 11:36 ` patch 'kni: fix build with Linux 5.18' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " Kevin Traynor
                   ` (19 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Yiding Zhou; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89

Thanks.

Kevin

---
From 83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89 Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou@intel.com>
Date: Sun, 8 May 2022 03:52:39 +0800
Subject: [PATCH] net/iavf: fix data path selection

[ upstream commit 865df516f931827580f00e65f246f49838c722bb ]

If PF driver don't support a flex Rx descriptor that required by VF,
legacy descriptor format will be negotiated to configure the hardware
queue.

The patch fixes the issue that an Rx data path that handle flexible
descriptor  (e.g.:
iavf_recv_scattered_pkts_vec_avx512_flex_rxd) is selected while the
actual hardware queues are configured as legacy due to above scenario,
which will cause following coredump.

Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction")

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index ede6c21668..4c8007043a 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2797,12 +2797,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-
-#ifdef RTE_ARCH_X86
-	struct iavf_rx_queue *rxq;
 	int i;
+	struct iavf_rx_queue *rxq;
+	bool use_flex = true;
+
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		rxq = dev->data->rx_queues[i];
+		if (rxq->rxdid <= IAVF_RXDID_LEGACY_1) {
+			PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is legacy, "
+				"set rx_pkt_burst as legacy for all queues", rxq->rxdid, i);
+			use_flex = false;
+		} else if (!(vf->supported_rxdid & BIT(rxq->rxdid))) {
+			PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is not supported, "
+				"set rx_pkt_burst as legacy for all queues", rxq->rxdid, i);
+			use_flex = false;
+		}
+	}
+
+#ifdef RTE_ARCH_X86
 	int check_ret;
 	bool use_avx2 = false;
 	bool use_avx512 = false;
-	bool use_flex = false;
 
 	check_ret = iavf_rx_vec_dev_check(dev);
@@ -2821,8 +2834,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 #endif
 
-		if (vf->vf_res->vf_cap_flags &
-			VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
-			use_flex = true;
-
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			rxq = dev->data->rx_queues[i];
@@ -2928,5 +2937,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 		PMD_DRV_LOG(DEBUG, "Using a Scattered Rx callback (port=%d).",
 			    dev->data->port_id);
-		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
+		if (use_flex)
 			dev->rx_pkt_burst = iavf_recv_scattered_pkts_flex_rxd;
 		else
@@ -2939,5 +2948,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 		PMD_DRV_LOG(DEBUG, "Using Basic Rx callback (port=%d).",
 			    dev->data->port_id);
-		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
+		if (use_flex)
 			dev->rx_pkt_burst = iavf_recv_pkts_flex_rxd;
 		else
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.025932177 +0100
+++ 0055-net-iavf-fix-data-path-selection.patch	2022-06-09 12:34:29.772980687 +0100
@@ -1 +1 @@
-From 865df516f931827580f00e65f246f49838c722bb Mon Sep 17 00:00:00 2001
+From 83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 865df516f931827580f00e65f246f49838c722bb ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 345f6aeebc..d3b1a58b27 100644
+index ede6c21668..4c8007043a 100644
@@ -29 +30 @@
-@@ -2900,12 +2900,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2797,12 +2797,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -59 +60 @@
-@@ -2924,8 +2937,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2821,8 +2834,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -68 +69 @@
-@@ -3031,5 +3040,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2928,5 +2937,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -75 +76 @@
-@@ -3042,5 +3051,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2939,5 +2948,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)


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

* patch 'net/ixgbe: add option for link up check on pin SDP3' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (53 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: fix data path selection' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ice/base: fix getting sched node from ID type' " Kevin Traynor
                   ` (18 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Jeff Daly; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/5115fe4013c28b14ad576660ce8f66aa1151aa5b

Thanks.

Kevin

---
From 5115fe4013c28b14ad576660ce8f66aa1151aa5b Mon Sep 17 00:00:00 2001
From: Jeff Daly <jeffd@silicom-usa.com>
Date: Tue, 10 May 2022 14:57:25 -0400
Subject: [PATCH] net/ixgbe: add option for link up check on pin SDP3

[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]

1ca05831b9b added a check that SDP3 (used as a TX_DISABLE output to the
SFP cage on these cards) is not asserted to avoid incorrectly reporting
link up when the SFP's laser is turned off.

ff8162cb957 limited this workaround to fiber ports

This patch:
* Adds devarg 'fiber_sdp3_no_tx_disable' not all fiber ixgbe devs use
  SDP3 as TX_DISABLE

Fixes: 1ca05831b9b ("net/ixgbe: fix link status")
Fixes: ff8162cb957 ("net/ixgbe: fix link status")

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/ixgbe.rst        | 17 ++++++++++++++
 drivers/net/ixgbe/ixgbe_ethdev.c | 39 +++++++++++++++++++++++++++++++-
 drivers/net/ixgbe/ixgbe_ethdev.h |  3 +++
 3 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index 82fa453fa2..ad1a3da610 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -102,4 +102,21 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
 fdir_conf->mode will also be checked.
 
+Disable SDP3 TX_DISABLE for Fiber Links
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following ``devargs`` option can be enabled at runtime.  It must
+be passed as part of EAL arguments. For example,
+
+.. code-block:: console
+
+   dpdk-testpmd -a fiber_sdp3_no_tx_disable=1 -- -i
+
+- ``fiber_sdp3_no_tx_disable`` (default **0**)
+
+  Not all IXGBE implementations with SFP cages use the SDP3 signal as
+  TX_DISABLE as a means to disable the laser on fiber SFP modules.
+  This option informs the driver that in this case, SDP3 is not to be
+  used as a check for link up by testing for laser on/off.
+
 VF Runtime Options
 ^^^^^^^^^^^^^^^^^^
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 052fdb9639..31d06b6110 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -129,4 +129,11 @@
 #define IXGBE_DMATXCTL_VT_MASK                 0xFFFF0000
 
+#define IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE	"fiber_sdp3_no_tx_disable"
+
+static const char * const ixgbe_valid_arguments[] = {
+	IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+	NULL
+};
+
 #define IXGBEVF_DEVARG_PFLINK_FULLCHK		"pflink_fullchk"
 
@@ -349,4 +356,6 @@ static int ixgbe_filter_restore(struct rte_eth_dev *dev);
 static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
 static int ixgbe_wait_for_link_up(struct ixgbe_hw *hw);
+static int devarg_handle_int(__rte_unused const char *key, const char *value,
+			     void *extra_args);
 
 /*
@@ -1033,4 +1042,27 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
 }
 
+static void
+ixgbe_parse_devargs(struct ixgbe_adapter *adapter,
+		      struct rte_devargs *devargs)
+{
+	struct rte_kvargs *kvlist;
+	uint16_t sdp3_no_tx_disable;
+
+	if (devargs == NULL)
+		return;
+
+	kvlist = rte_kvargs_parse(devargs->args, ixgbe_valid_arguments);
+	if (kvlist == NULL)
+		return;
+
+	if (rte_kvargs_count(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE) == 1 &&
+	    rte_kvargs_process(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+			       devarg_handle_int, &sdp3_no_tx_disable) == 0 &&
+	    sdp3_no_tx_disable == 1)
+		adapter->sdp3_no_tx_disable = 1;
+
+	rte_kvargs_free(kvlist);
+}
+
 /*
  * This function is based on code in ixgbe_attach() in base/ixgbe.c.
@@ -1096,4 +1128,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 
 	rte_atomic32_clear(&ad->link_thread_running);
+	ixgbe_parse_devargs(eth_dev->data->dev_private,
+			    pci_dev->device.devargs);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
@@ -4266,5 +4300,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	}
 
-	if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+	if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber &&
+	    !ad->sdp3_no_tx_disable) {
 		esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
 		if ((esdp_reg & IXGBE_ESDP_SDP3))
@@ -8255,4 +8290,6 @@ RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe,
+			      IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE "=<0|1>");
 RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 69e0e82a5b..cc6049a66a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -502,4 +502,7 @@ struct ixgbe_adapter {
 	uint8_t rss_reta_updated;
 
+	/* Used for limiting SDP3 TX_DISABLE checks */
+	uint8_t sdp3_no_tx_disable;
+
 	/* Used for VF link sync with PF's physical and logical (by checking
 	 * mailbox status) link status.
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.047793437 +0100
+++ 0056-net-ixgbe-add-option-for-link-up-check-on-pin-SDP3.patch	2022-06-09 12:34:29.778980697 +0100
@@ -1 +1 @@
-From 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 Mon Sep 17 00:00:00 2001
+From 5115fe4013c28b14ad576660ce8f66aa1151aa5b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -55 +56 @@
-index 2da3f67bbc..f31bbb7895 100644
+index 052fdb9639..31d06b6110 100644
@@ -112 +113 @@
-@@ -4262,5 +4296,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4266,5 +4300,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -120 +121 @@
-@@ -8251,4 +8286,6 @@ RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd);
+@@ -8255,4 +8290,6 @@ RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd);


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

* patch 'net/ice/base: fix getting sched node from ID type' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (54 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ice/base: fix direction of flow that matches any' " Kevin Traynor
                   ` (17 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/447908e781e826b2f679a983ce95e09407898320

Thanks.

Kevin

---
From 447908e781e826b2f679a983ce95e09407898320 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Tue, 17 May 2022 13:09:26 +0800
Subject: [PATCH] net/ice/base: fix getting sched node from ID type

[ upstream commit 8f7a83e19325be26207e4cb2f11856f0fe3dbeca ]

The function ice_sched_get_node_by_id_type needs to be called
with the scheduler lock held. However, the function
ice_sched_get_node also requests the scheduler lock.
It will cause the dead lock issue.

This patch replaces function ice_sched_get_node with
function ice_sched_find_node_by_teid to solve this problem.

Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 2620892c9e..e697c579be 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -4775,10 +4775,10 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,
 	case ICE_AGG_TYPE_Q:
 		/* The current implementation allows single queue to modify */
-		node = ice_sched_get_node(pi, id);
+		node = ice_sched_find_node_by_teid(pi->root, id);
 		break;
 
 	case ICE_AGG_TYPE_QG:
 		/* The current implementation allows single qg to modify */
-		child_node = ice_sched_get_node(pi, id);
+		child_node = ice_sched_find_node_by_teid(pi->root, id);
 		if (!child_node)
 			break;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.073321522 +0100
+++ 0057-net-ice-base-fix-getting-sched-node-from-ID-type.patch	2022-06-09 12:34:29.780980700 +0100
@@ -1 +1 @@
-From 8f7a83e19325be26207e4cb2f11856f0fe3dbeca Mon Sep 17 00:00:00 2001
+From 447908e781e826b2f679a983ce95e09407898320 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f7a83e19325be26207e4cb2f11856f0fe3dbeca ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/ice/base: fix direction of flow that matches any' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (55 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ice/base: fix getting sched node from ID type' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/ice: fix MTU info for DCF' " Kevin Traynor
                   ` (16 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Yuying Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/981abb1aebfe7002f29f415bbf068e859b9faffa

Thanks.

Kevin

---
From 981abb1aebfe7002f29f415bbf068e859b9faffa Mon Sep 17 00:00:00 2001
From: Yuying Zhang <yuying.zhang@intel.com>
Date: Thu, 12 May 2022 07:42:00 +0000
Subject: [PATCH] net/ice/base: fix direction of flow that matches any

[ upstream commit 8b95092b7f691a888f7b1a80872b549b08ee05ad ]

The tx/rx packets were both dropped when creating drop any rule
for ingress direction only, the root cause is the recipe didn't
contain direction flag matching.

This patch adds the packet flag which represents the direction of
source interface to solve the issue.

Fixes: 92317961a731 ("net/ice: support drop any and steer all to queue")

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_protocol_type.h |  6 +++--
 drivers/net/ice/base/ice_switch.c        | 31 ++++++++++++++++++++----
 2 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 0e6e5990be..7dcc983707 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -55,4 +55,5 @@ enum ice_protocol_type {
 	ICE_VLAN_EX,
 	ICE_VLAN_IN,
+	ICE_FLG_DIR,
 	ICE_PROTOCOL_LAST
 };
@@ -219,7 +220,8 @@ enum ice_prot_id {
 
 #define ICE_MDID_SIZE 2
-#define ICE_TUN_FLAG_MDID 21
-#define ICE_TUN_FLAG_MDID_OFF (ICE_MDID_SIZE * ICE_TUN_FLAG_MDID)
+#define ICE_TUN_FLAG_MDID 20
+#define ICE_TUN_FLAG_MDID_OFF(word)   (ICE_MDID_SIZE * (ICE_TUN_FLAG_MDID + (word)))
 #define ICE_TUN_FLAG_MASK 0xFF
+#define ICE_DIR_FLAG_MASK 0x10
 #define ICE_TUN_FLAG_VLAN_MASK 0x01
 #define ICE_TUN_FLAG_FV_IND 2
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index d4cc664ad7..c0df3a1815 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -2304,5 +2304,5 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,
 				rg_entry->fv_mask[i];
 			if (prot == ICE_META_DATA_ID_HW &&
-			    off == ICE_TUN_FLAG_MDID_OFF)
+			    off == ICE_TUN_FLAG_MDID_OFF(1))
 				vlan = true;
 			fv_word_idx++;
@@ -6771,4 +6771,5 @@ static struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {
 	{ ICE_VLAN_EX,		ICE_VLAN_OF_HW },
 	{ ICE_VLAN_IN,		ICE_VLAN_OL_HW },
+	{ ICE_FLG_DIR,		ICE_META_DATA_ID_HW},
 };
 
@@ -7489,7 +7490,8 @@ free_mem:
  * ice_tun_type_match_word - determine if tun type needs a match mask
  * @tun_type: tunnel type
+ * @off: offset of packet flag
  * @mask: mask to be used for the tunnel
  */
-static bool ice_tun_type_match_word(enum ice_sw_tunnel_type tun_type, u16 *mask)
+static bool ice_tun_type_match_word(enum ice_sw_tunnel_type tun_type, u16 *off, u16 *mask)
 {
 	switch (tun_type) {
@@ -7507,4 +7509,10 @@ static bool ice_tun_type_match_word(enum ice_sw_tunnel_type tun_type, u16 *mask)
 	case ICE_SW_TUN_PPPOE_IPV6_QINQ:
 		*mask = ICE_TUN_FLAG_MASK;
+		*off = ICE_TUN_FLAG_MDID_OFF(1);
+		return true;
+
+	case ICE_SW_TUN_AND_NON_TUN:
+		*mask = ICE_DIR_FLAG_MASK;
+		*off = ICE_TUN_FLAG_MDID_OFF(0);
 		return true;
 
@@ -7512,8 +7520,10 @@ static bool ice_tun_type_match_word(enum ice_sw_tunnel_type tun_type, u16 *mask)
 	case ICE_SW_TUN_VXLAN_VLAN:
 		*mask = ICE_TUN_FLAG_MASK & ~ICE_TUN_FLAG_VLAN_MASK;
+		*off = ICE_TUN_FLAG_MDID_OFF(1);
 		return true;
 
 	default:
 		*mask = 0;
+		*off = 0;
 		return false;
 	}
@@ -7530,14 +7540,16 @@ ice_add_special_words(struct ice_adv_rule_info *rinfo,
 {
 	u16 mask;
+	u16 off;
 
 	/* If this is a tunneled packet, then add recipe index to match the
-	 * tunnel bit in the packet metadata flags.
+	 * tunnel bit in the packet metadata flags. If this is a tun_and_non_tun
+	 * packet, then add recipe index to match the direction bit in the flag.
 	 */
-	if (ice_tun_type_match_word(rinfo->tun_type, &mask)) {
+	if (ice_tun_type_match_word(rinfo->tun_type, &off, &mask)) {
 		if (lkup_exts->n_val_words < ICE_MAX_CHAIN_WORDS) {
 			u8 word = lkup_exts->n_val_words++;
 
 			lkup_exts->fv_words[word].prot_id = ICE_META_DATA_ID_HW;
-			lkup_exts->fv_words[word].off = ICE_TUN_FLAG_MDID_OFF;
+			lkup_exts->fv_words[word].off = off;
 			lkup_exts->field_mask[word] = mask;
 		} else {
@@ -7865,4 +7877,13 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	ice_get_compat_fv_bitmap(hw, rinfo, fv_bitmap);
 
+	/* If it is a packet to match any, add a lookup element to match direction
+	 * flag of source interface.
+	 */
+	if (rinfo->tun_type == ICE_SW_TUN_AND_NON_TUN &&
+	    lkups_cnt < ICE_MAX_CHAIN_WORDS) {
+		lkups[lkups_cnt].type = ICE_FLG_DIR;
+		lkups_cnt++;
+	}
+
 	status = ice_get_fv(hw, lkups, lkups_cnt, fv_bitmap, &rm->fv_list);
 	if (status)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.096546096 +0100
+++ 0058-net-ice-base-fix-direction-of-flow-that-matches-any.patch	2022-06-09 12:34:29.785980709 +0100
@@ -1 +1 @@
-From 8b95092b7f691a888f7b1a80872b549b08ee05ad Mon Sep 17 00:00:00 2001
+From 981abb1aebfe7002f29f415bbf068e859b9faffa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b95092b7f691a888f7b1a80872b549b08ee05ad ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 83867418c6..8fb95a8a8d 100644
+index 0e6e5990be..7dcc983707 100644
@@ -33 +34 @@
-@@ -220,7 +221,8 @@ enum ice_prot_id {
+@@ -219,7 +220,8 @@ enum ice_prot_id {


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

* patch 'net/ice: fix MTU info for DCF' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (56 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ice/base: fix direction of flow that matches any' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/i40e: fix max frame size config at port level' " Kevin Traynor
                   ` (15 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Kevin Liu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/21e2c340946ad2a8701256e7fcc12ec558b172b0

Thanks.

Kevin

---
From 21e2c340946ad2a8701256e7fcc12ec558b172b0 Mon Sep 17 00:00:00 2001
From: Kevin Liu <kevinx.liu@intel.com>
Date: Fri, 8 Apr 2022 01:43:08 +0000
Subject: [PATCH] net/ice: fix MTU info for DCF

[ upstream commit 24e6e0363e1704d7471eacafea80c182d4016739 ]

In the DCF module, Missing maximum and minimum
MTU value settings.

This patch adds the settings of the maximum and
minimum MTU to correctly calculate the MTU value.

Fixes: bf89db4409bb ("net/ice: complete device info get in DCF")

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 59610e058f..6e9e80c1df 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -665,4 +665,6 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->flow_type_rss_offloads = ICE_RSS_OFFLOAD_ALL;
 	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
+	dev_info->max_mtu = dev_info->max_rx_pktlen - ICE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
 
 	dev_info->rx_offload_capa =
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.122488659 +0100
+++ 0059-net-ice-fix-MTU-info-for-DCF.patch	2022-06-09 12:34:29.786980710 +0100
@@ -1 +1 @@
-From 24e6e0363e1704d7471eacafea80c182d4016739 Mon Sep 17 00:00:00 2001
+From 21e2c340946ad2a8701256e7fcc12ec558b172b0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24e6e0363e1704d7471eacafea80c182d4016739 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 8005eb2ab8..0da267db1f 100644
+index 59610e058f..6e9e80c1df 100644
@@ -25 +26 @@
-@@ -714,4 +714,6 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
+@@ -665,4 +665,6 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,


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

* patch 'net/i40e: fix max frame size config at port level' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (57 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/ice: fix MTU info for DCF' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: fix queue start exception handling' " Kevin Traynor
                   ` (14 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Wenxuan Wu; +Cc: Yuying Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/dbae86def3ac04bec69e8123bef672356ad33f24

Thanks.

Kevin

---
From dbae86def3ac04bec69e8123bef672356ad33f24 Mon Sep 17 00:00:00 2001
From: Wenxuan Wu <wenxuanx.wu@intel.com>
Date: Wed, 18 May 2022 04:59:14 +0000
Subject: [PATCH] net/i40e: fix max frame size config at port level

[ upstream commit 2184f7cdeeaa7eb814e102fd01773db204ccd3bf ]

Previously, max frame size can only be set when link is up, and the wait
time is 1 sec. Startup time of 10G_BASET longer than 1s would result in
failure.

Actually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set
regardless of link status.

This patch omitted the link status check of 10G_MEDIA_TYPE_BASET.

Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port level")

Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4ac31c2fec..bad27355fc 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12113,14 +12113,18 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
 	struct rte_eth_link link;
 	enum i40e_status_code status;
+	bool can_be_set = true;
 
-	do {
-		update_link_reg(hw, &link);
-		if (link.link_status)
-			break;
+	/* I40E_MEDIA_TYPE_BASET link up can be ignored */
+	if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET) {
+		do {
+			update_link_reg(hw, &link);
+			if (link.link_status)
+				break;
+			rte_delay_ms(CHECK_INTERVAL);
+		} while (--rep_cnt);
+		can_be_set = !!link.link_status;
+	}
 
-		rte_delay_ms(CHECK_INTERVAL);
-	} while (--rep_cnt);
-
-	if (link.link_status) {
+	if (can_be_set) {
 		status = i40e_aq_set_mac_config(hw, size, TRUE, 0, false, NULL);
 		if (status != I40E_SUCCESS)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.143086158 +0100
+++ 0060-net-i40e-fix-max-frame-size-config-at-port-level.patch	2022-06-09 12:34:29.795980726 +0100
@@ -1 +1 @@
-From 2184f7cdeeaa7eb814e102fd01773db204ccd3bf Mon Sep 17 00:00:00 2001
+From dbae86def3ac04bec69e8123bef672356ad33f24 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2184f7cdeeaa7eb814e102fd01773db204ccd3bf ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 755786dc10..7ffd7e7384 100644
+index 4ac31c2fec..bad27355fc 100644
@@ -28 +29 @@
-@@ -12104,14 +12104,18 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
+@@ -12113,14 +12113,18 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)


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

* patch 'net/iavf: fix queue start exception handling' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (58 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/i40e: fix max frame size config at port level' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: fix mbuf release in multi-process' " Kevin Traynor
                   ` (13 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/01e45a13abdcfd4e958df756da5038a86274501e

Thanks.

Kevin

---
From 01e45a13abdcfd4e958df756da5038a86274501e Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 19 May 2022 05:01:56 +0000
Subject: [PATCH] net/iavf: fix queue start exception handling

[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]

If any queue start fail during dev_start, all started queues
should be stopped.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 79397f15e5..69472869e3 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -897,26 +897,36 @@ iavf_start_queues(struct rte_eth_dev *dev)
 	struct iavf_tx_queue *txq;
 	int i;
+	uint16_t nb_txq, nb_rxq;
 
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		txq = dev->data->tx_queues[i];
+	for (nb_txq = 0; nb_txq < dev->data->nb_tx_queues; nb_txq++) {
+		txq = dev->data->tx_queues[nb_txq];
 		if (txq->tx_deferred_start)
 			continue;
-		if (iavf_dev_tx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_tx_queue_start(dev, nb_txq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start tx queue %u", nb_txq);
+			goto tx_err;
 		}
 	}
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		rxq = dev->data->rx_queues[i];
+	for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) {
+		rxq = dev->data->rx_queues[nb_rxq];
 		if (rxq->rx_deferred_start)
 			continue;
-		if (iavf_dev_rx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_rx_queue_start(dev, nb_rxq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start rx queue %u", nb_rxq);
+			goto rx_err;
 		}
 	}
 
 	return 0;
+
+rx_err:
+	for (i = 0; i < nb_rxq; i++)
+		iavf_dev_rx_queue_stop(dev, i);
+tx_err:
+	for (i = 0; i < nb_txq; i++)
+		iavf_dev_tx_queue_stop(dev, i);
+
+	return -1;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.169618556 +0100
+++ 0061-net-iavf-fix-queue-start-exception-handling.patch	2022-06-09 12:34:29.796980727 +0100
@@ -1 +1 @@
-From 1fa739c3f2b3876d21e506c024a3c6bee6562943 Mon Sep 17 00:00:00 2001
+From 01e45a13abdcfd4e958df756da5038a86274501e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 198d8299af..315ab15aad 100644
+index 79397f15e5..69472869e3 100644
@@ -22 +23 @@
-@@ -927,26 +927,36 @@ iavf_start_queues(struct rte_eth_dev *dev)
+@@ -897,26 +897,36 @@ iavf_start_queues(struct rte_eth_dev *dev)


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

* patch 'net/iavf: fix mbuf release in multi-process' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (59 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: fix queue start exception handling' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: fix Rx queue interrupt setting' " Kevin Traynor
                   ` (12 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/6d3526ad40c2db79b895fd0d25649b4526bcf44d

Thanks.

Kevin

---
From 6d3526ad40c2db79b895fd0d25649b4526bcf44d Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Thu, 19 May 2022 07:36:04 +0000
Subject: [PATCH] net/iavf: fix mbuf release in multi-process

[ upstream commit fced83c1229e0ad89f26d07fa7bd46b8767d9f5c ]

In the multiple process environment, the subprocess operates on the
shared memory and changes the function pointer of the main process,
resulting in the failure to find the address of the function when main
process releasing, resulting in crash.

Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c            | 36 ++++++++++++++++---------
 drivers/net/iavf/iavf_rxtx.h            | 11 ++++++++
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |  8 ++----
 drivers/net/iavf/iavf_rxtx_vec_sse.c    | 16 +++--------
 4 files changed, 41 insertions(+), 30 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 4c8007043a..0d380bf80e 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -364,10 +364,22 @@ release_txq_mbufs(struct iavf_tx_queue *txq)
 }
 
-static const struct iavf_rxq_ops def_rxq_ops = {
-	.release_mbufs = release_rxq_mbufs,
+static const
+struct iavf_rxq_ops iavf_rxq_release_mbufs_ops[] = {
+	[IAVF_REL_MBUFS_DEFAULT].release_mbufs = release_rxq_mbufs,
+#ifdef RTE_ARCH_X86
+	[IAVF_REL_MBUFS_SSE_VEC].release_mbufs = iavf_rx_queue_release_mbufs_sse,
+#endif
 };
 
-static const struct iavf_txq_ops def_txq_ops = {
-	.release_mbufs = release_txq_mbufs,
+static const
+struct iavf_txq_ops iavf_txq_release_mbufs_ops[] = {
+	[IAVF_REL_MBUFS_DEFAULT].release_mbufs = release_txq_mbufs,
+#ifdef RTE_ARCH_X86
+	[IAVF_REL_MBUFS_SSE_VEC].release_mbufs = iavf_tx_queue_release_mbufs_sse,
+#ifdef CC_AVX512_SUPPORT
+	[IAVF_REL_MBUFS_AVX512_VEC].release_mbufs = iavf_tx_queue_release_mbufs_avx512,
+#endif
+#endif
+
 };
 
@@ -676,5 +688,5 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	dev->data->rx_queues[queue_idx] = rxq;
 	rxq->qrx_tail = hw->hw_addr + IAVF_QRX_TAIL1(rxq->queue_id);
-	rxq->ops = &def_rxq_ops;
+	rxq->rel_mbufs_type = IAVF_REL_MBUFS_DEFAULT;
 
 	if (check_rx_bulk_allow(rxq) == true) {
@@ -813,5 +825,5 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	dev->data->tx_queues[queue_idx] = txq;
 	txq->qtx_tail = hw->hw_addr + IAVF_QTX_TAIL1(queue_idx);
-	txq->ops = &def_txq_ops;
+	txq->rel_mbufs_type = IAVF_REL_MBUFS_DEFAULT;
 
 	if (check_tx_vec_allow(txq) == false) {
@@ -945,5 +957,5 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 
 	rxq = dev->data->rx_queues[rx_queue_id];
-	rxq->ops->release_mbufs(rxq);
+	iavf_rxq_release_mbufs_ops[rxq->rel_mbufs_type].release_mbufs(rxq);
 	reset_rx_queue(rxq);
 	dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
@@ -973,5 +985,5 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 
 	txq = dev->data->tx_queues[tx_queue_id];
-	txq->ops->release_mbufs(txq);
+	iavf_txq_release_mbufs_ops[txq->rel_mbufs_type].release_mbufs(txq);
 	reset_tx_queue(txq);
 	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
@@ -988,5 +1000,5 @@ iavf_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
 		return;
 
-	q->ops->release_mbufs(q);
+	iavf_rxq_release_mbufs_ops[q->rel_mbufs_type].release_mbufs(q);
 	rte_free(q->sw_ring);
 	rte_memzone_free(q->mz);
@@ -1002,5 +1014,5 @@ iavf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
 		return;
 
-	q->ops->release_mbufs(q);
+	iavf_txq_release_mbufs_ops[q->rel_mbufs_type].release_mbufs(q);
 	rte_free(q->sw_ring);
 	rte_memzone_free(q->mz);
@@ -1036,5 +1048,5 @@ iavf_stop_queues(struct rte_eth_dev *dev)
 		if (!txq)
 			continue;
-		txq->ops->release_mbufs(txq);
+		iavf_txq_release_mbufs_ops[txq->rel_mbufs_type].release_mbufs(txq);
 		reset_tx_queue(txq);
 		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
@@ -1044,5 +1056,5 @@ iavf_stop_queues(struct rte_eth_dev *dev)
 		if (!rxq)
 			continue;
-		rxq->ops->release_mbufs(rxq);
+		iavf_rxq_release_mbufs_ops[rxq->rel_mbufs_type].release_mbufs(rxq);
 		reset_rx_queue(rxq);
 		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index bf8aebbce8..48cc0da6f5 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -188,4 +188,5 @@ struct iavf_rx_queue {
 	struct rte_mbuf fake_mbuf;      /* dummy mbuf */
 	uint8_t rxdid;
+	uint8_t rel_mbufs_type;
 
 	/* used for VPMD */
@@ -247,4 +248,5 @@ struct iavf_tx_queue {
 	uint16_t free_thresh;
 	uint16_t rs_thresh;
+	uint8_t rel_mbufs_type;
 
 	uint16_t port_id;
@@ -390,4 +392,10 @@ struct iavf_32b_rx_flex_desc_comms_ipsec {
 };
 
+enum iavf_rxtx_rel_mbufs_type {
+	IAVF_REL_MBUFS_DEFAULT		= 0,
+	IAVF_REL_MBUFS_SSE_VEC		= 1,
+	IAVF_REL_MBUFS_AVX512_VEC	= 2,
+};
+
 /* Receive Flex Descriptor profile IDs: There are a total
  * of 64 profiles where profile IDs 0/1 are for legacy; and
@@ -693,4 +701,7 @@ uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
 
 void iavf_set_default_ptype_table(struct rte_eth_dev *dev);
+void iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq);
+void iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq);
+void iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq);
 
 static inline
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index 6ff38ac368..c975a5e7d7 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1995,5 +1995,5 @@ iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
 }
 
-static inline void
+void __rte_cold
 iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
 {
@@ -2015,12 +2015,8 @@ iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
 }
 
-static const struct iavf_txq_ops avx512_vec_txq_ops = {
-	.release_mbufs = iavf_tx_queue_release_mbufs_avx512,
-};
-
 int __rte_cold
 iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq)
 {
-	txq->ops = &avx512_vec_txq_ops;
+	txq->rel_mbufs_type = IAVF_REL_MBUFS_AVX512_VEC;
 	return 0;
 }
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index d582a36326..4b23ca8d82 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -1201,5 +1201,5 @@ iavf_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 }
 
-static void __rte_cold
+void __rte_cold
 iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq)
 {
@@ -1207,5 +1207,5 @@ iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq)
 }
 
-static void __rte_cold
+void __rte_cold
 iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq)
 {
@@ -1213,16 +1213,8 @@ iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq)
 }
 
-static const struct iavf_rxq_ops sse_vec_rxq_ops = {
-	.release_mbufs = iavf_rx_queue_release_mbufs_sse,
-};
-
-static const struct iavf_txq_ops sse_vec_txq_ops = {
-	.release_mbufs = iavf_tx_queue_release_mbufs_sse,
-};
-
 int __rte_cold
 iavf_txq_vec_setup(struct iavf_tx_queue *txq)
 {
-	txq->ops = &sse_vec_txq_ops;
+	txq->rel_mbufs_type = IAVF_REL_MBUFS_SSE_VEC;
 	return 0;
 }
@@ -1231,5 +1223,5 @@ int __rte_cold
 iavf_rxq_vec_setup(struct iavf_rx_queue *rxq)
 {
-	rxq->ops = &sse_vec_rxq_ops;
+	rxq->rel_mbufs_type = IAVF_REL_MBUFS_SSE_VEC;
 	return iavf_rxq_vec_setup_default(rxq);
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.190059316 +0100
+++ 0062-net-iavf-fix-mbuf-release-in-multi-process.patch	2022-06-09 12:34:29.801980736 +0100
@@ -1 +1 @@
-From fced83c1229e0ad89f26d07fa7bd46b8767d9f5c Mon Sep 17 00:00:00 2001
+From 6d3526ad40c2db79b895fd0d25649b4526bcf44d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fced83c1229e0ad89f26d07fa7bd46b8767d9f5c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 73e4960257..ff0c98ffc3 100644
+index 4c8007043a..0d380bf80e 100644
@@ -27 +28 @@
-@@ -363,10 +363,22 @@ release_txq_mbufs(struct iavf_tx_queue *txq)
+@@ -364,10 +364,22 @@ release_txq_mbufs(struct iavf_tx_queue *txq)
@@ -54 +55 @@
-@@ -682,5 +694,5 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -676,5 +688,5 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -61 +62 @@
-@@ -822,5 +834,5 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -813,5 +825,5 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -68 +69 @@
-@@ -954,5 +966,5 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -945,5 +957,5 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -75 +76 @@
-@@ -982,5 +994,5 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -973,5 +985,5 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -82 +83 @@
-@@ -997,5 +1009,5 @@ iavf_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
+@@ -988,5 +1000,5 @@ iavf_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
@@ -89 +90 @@
-@@ -1011,5 +1023,5 @@ iavf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
+@@ -1002,5 +1014,5 @@ iavf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
@@ -96 +97 @@
-@@ -1045,5 +1057,5 @@ iavf_stop_queues(struct rte_eth_dev *dev)
+@@ -1036,5 +1048,5 @@ iavf_stop_queues(struct rte_eth_dev *dev)
@@ -103 +104 @@
-@@ -1053,5 +1065,5 @@ iavf_stop_queues(struct rte_eth_dev *dev)
+@@ -1044,5 +1056,5 @@ iavf_stop_queues(struct rte_eth_dev *dev)
@@ -111 +112 @@
-index 642b9a700a..e8362bbd1d 100644
+index bf8aebbce8..48cc0da6f5 100644
@@ -114 +115 @@
-@@ -191,4 +191,5 @@ struct iavf_rx_queue {
+@@ -188,4 +188,5 @@ struct iavf_rx_queue {
@@ -120 +121 @@
-@@ -250,4 +251,5 @@ struct iavf_tx_queue {
+@@ -247,4 +248,5 @@ struct iavf_tx_queue {
@@ -126 +127 @@
-@@ -393,4 +395,10 @@ struct iavf_32b_rx_flex_desc_comms_ipsec {
+@@ -390,4 +392,10 @@ struct iavf_32b_rx_flex_desc_comms_ipsec {
@@ -137 +138 @@
-@@ -696,4 +704,7 @@ uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
+@@ -693,4 +701,7 @@ uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
@@ -146 +147 @@
-index 7319d4cb65..3bfec63851 100644
+index 6ff38ac368..c975a5e7d7 100644
@@ -149 +150 @@
-@@ -1993,5 +1993,5 @@ iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1995,5 +1995,5 @@ iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -156 +157 @@
-@@ -2013,12 +2013,8 @@ iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
+@@ -2015,12 +2015,8 @@ iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
@@ -171 +172 @@
-index 717a227b2c..4a5232c1d2 100644
+index d582a36326..4b23ca8d82 100644
@@ -174 +175 @@
-@@ -1199,5 +1199,5 @@ iavf_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1201,5 +1201,5 @@ iavf_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -181 +182 @@
-@@ -1205,5 +1205,5 @@ iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq)
+@@ -1207,5 +1207,5 @@ iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq)
@@ -188 +189 @@
-@@ -1211,16 +1211,8 @@ iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq)
+@@ -1213,16 +1213,8 @@ iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq)
@@ -206 +207 @@
-@@ -1229,5 +1221,5 @@ int __rte_cold
+@@ -1231,5 +1223,5 @@ int __rte_cold


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

* patch 'net/iavf: fix Rx queue interrupt setting' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (60 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: fix mbuf release in multi-process' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'doc: update matching versions in i40e guide' " Kevin Traynor
                   ` (11 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/088e0839f16b3eb033f3618aa9785ee2d971ddbe

Thanks.

Kevin

---
From 088e0839f16b3eb033f3618aa9785ee2d971ddbe Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Fri, 20 May 2022 03:00:23 +0000
Subject: [PATCH] net/iavf: fix Rx queue interrupt setting

[ upstream commit a08f9cb698c3d4687765860e328dca727f7a516b ]

For Rx-Queue Interrupt Setting, when VF Rx interrupt
disable (INTENA=0), there are two ways to write back
descriptor to host memory:

1) Set WB_ON_ITR bit 0 to Interrupt Dynamic Control Register:
Completed descriptors are posted to host memory according to
the internal descriptor cache policy (in other words when a
full cache line is available for write-back).

A internal descriptor size is 16 bytes or 32 bytes, a cache
line size is 64 bytes or 128 bytes from datasheet :
PCIe Global Config 2 - GLPCI_CNF2 (0x000BE004; RO)
so the full cache line could contains 4 packets, it means
Network card will send 4 packets to host when a full cache line
is available.

2) Set WB_ON_ITR bit 1 to Interrupt Dynamic Control Register:
Completed descriptors also trigger the ITR. Following ITR
expiration, all leftover completed descriptors are posted to
host memory.

Network card will send packet to host even if only one
descriptor is completed.

Changing 1) to 2) to make sure VF send the packet to host even
if there is only one Rx packet is ready in hardware.

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 69472869e3..7e7042bd07 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1844,5 +1844,5 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 	IAVF_WRITE_REG(hw,
 		      IAVF_VFINT_DYN_CTLN1(msix_intr - IAVF_RX_VEC_START),
-		      0);
+		      IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK);
 
 	IAVF_WRITE_FLUSH(hw);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.213886289 +0100
+++ 0063-net-iavf-fix-Rx-queue-interrupt-setting.patch	2022-06-09 12:34:29.803980739 +0100
@@ -1 +1 @@
-From a08f9cb698c3d4687765860e328dca727f7a516b Mon Sep 17 00:00:00 2001
+From 088e0839f16b3eb033f3618aa9785ee2d971ddbe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a08f9cb698c3d4687765860e328dca727f7a516b ]
+
@@ -34 +35,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index 315ab15aad..a74056f0f1 100644
+index 69472869e3..7e7042bd07 100644
@@ -46 +47 @@
-@@ -1926,5 +1926,5 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -1844,5 +1844,5 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)


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

* patch 'doc: update matching versions in i40e guide' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (61 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: fix Rx queue interrupt setting' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: fix device initialization without inline crypto' " Kevin Traynor
                   ` (10 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/effce17dbfe95f85c15c49580b2297aff125045c

Thanks.

Kevin

---
From effce17dbfe95f85c15c49580b2297aff125045c Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Fri, 20 May 2022 15:04:41 +0800
Subject: [PATCH] doc: update matching versions in i40e guide

[ upstream commit c43bfb7d598585271573e3231d831b9cd5ad4708 ]

Add recommended matching list for i40e PMD in DPDK 21.05,
21.08, 21.11 and 22.03. And add a known issue when FW upgrade
to a version 8.4 and higher

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

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index ef91b3a1ac..aedb1afc4b 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -102,4 +102,12 @@ For X710/XL710/XXV710,
    | DPDK version | Kernel driver version | Firmware version |
    +==============+=======================+==================+
+   |    22.03     |         2.17.15       |       8.30       |
+   +--------------+-----------------------+------------------+
+   |    21.11     |         2.17.4        |       8.30       |
+   +--------------+-----------------------+------------------+
+   |    21.08     |         2.15.9        |       8.30       |
+   +--------------+-----------------------+------------------+
+   |    21.05     |         2.15.9        |       8.30       |
+   +--------------+-----------------------+------------------+
    |    21.02     |         2.14.13       |       8.00       |
    +--------------+-----------------------+------------------+
@@ -149,4 +157,12 @@ For X722,
    | DPDK version | Kernel driver version | Firmware version |
    +==============+=======================+==================+
+   |    22.03     |         2.17.15       |       5.50       |
+   +--------------+-----------------------+------------------+
+   |    21.11     |         2.17.4        |       5.30       |
+   +--------------+-----------------------+------------------+
+   |    21.08     |         2.15.9        |       5.30       |
+   +--------------+-----------------------+------------------+
+   |    21.05     |         2.15.9        |       5.30       |
+   +--------------+-----------------------+------------------+
    |    21.02     |         2.14.13       |       5.00       |
    +--------------+-----------------------+------------------+
@@ -772,4 +788,11 @@ which means the current rule's input set conflicts with the first rule's.
 Remove the first rule if want to change the input set of the PCTYPE.
 
+PF reset fail after QinQ set with FW >= 8.4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If upgrade FW to version 8.4 and higher, after set MAC VLAN filter and configure outer VLAN on PF, kill
+DPDK process will cause the card crash.
+
+
 Example of getting best performance with l3fwd example
 ------------------------------------------------------
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.234569726 +0100
+++ 0064-doc-update-matching-versions-in-i40e-guide.patch	2022-06-09 12:34:29.804980741 +0100
@@ -1 +1 @@
-From c43bfb7d598585271573e3231d831b9cd5ad4708 Mon Sep 17 00:00:00 2001
+From effce17dbfe95f85c15c49580b2297aff125045c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c43bfb7d598585271573e3231d831b9cd5ad4708 ]
+
@@ -9,2 +10,0 @@
-
-Cc: stable@dpdk.org


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

* patch 'net/iavf: fix device initialization without inline crypto' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (62 preceding siblings ...)
  2022-06-09 11:36 ` patch 'doc: update matching versions in i40e guide' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: fix device stop' " Kevin Traynor
                   ` (9 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/2ab0f947606ac135ff7b6ab59b6faaac139f206d

Thanks.

Kevin

---
From 2ab0f947606ac135ff7b6ab59b6faaac139f206d Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 20 Apr 2022 12:03:01 +0100
Subject: [PATCH] net/iavf: fix device initialization without inline crypto

[ upstream commit 3940cd9b8cb3b8b9d1ab3a7b4b18177b1e954d82 ]

When the inline crypto feature VF capability flag is set also check if the
feature is enabled, otherwise the initialization will fail even when
the inline crypto is not required.

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 | 69 ++++++++++++++++++++++++++--
 1 file changed, 66 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index b1949cee91..72ce39a052 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1564,15 +1564,78 @@ iavf_security_ctx_destroy(struct iavf_adapter *adapter)
 }
 
+static int
+iavf_ipsec_crypto_status_get(struct iavf_adapter *adapter,
+		struct virtchnl_ipsec_status *status)
+{
+	/* Perform pf-vf comms */
+	struct inline_ipsec_msg *request = NULL, *response = NULL;
+	size_t request_len, response_len;
+	int rc;
+
+	request_len = sizeof(struct inline_ipsec_msg);
+
+	request = rte_malloc("iavf-device-status-request", request_len, 0);
+	if (request == NULL) {
+		rc = -ENOMEM;
+		goto update_cleanup;
+	}
+
+	response_len = sizeof(struct inline_ipsec_msg) +
+			sizeof(struct virtchnl_ipsec_cap);
+	response = rte_malloc("iavf-device-status-response",
+			response_len, 0);
+	if (response == NULL) {
+		rc = -ENOMEM;
+		goto update_cleanup;
+	}
+
+	/* set msg header params */
+	request->ipsec_opcode = INLINE_IPSEC_OP_GET_STATUS;
+	request->req_id = (uint16_t)0xDEADBEEF;
+
+	/* send virtual channel request to add SA to hardware database */
+	rc = iavf_ipsec_crypto_request(adapter,
+			(uint8_t *)request, request_len,
+			(uint8_t *)response, response_len);
+	if (rc)
+		goto update_cleanup;
+
+	/* verify response id */
+	if (response->ipsec_opcode != request->ipsec_opcode ||
+		response->req_id != request->req_id){
+		rc = -EFAULT;
+		goto update_cleanup;
+	}
+	memcpy(status, response->ipsec_data.ipsec_status, sizeof(*status));
+
+update_cleanup:
+	rte_free(response);
+	rte_free(request);
+
+	return rc;
+}
+
+
 int
 iavf_ipsec_crypto_supported(struct iavf_adapter *adapter)
 {
 	struct virtchnl_vf_resource *resources = adapter->vf.vf_res;
+	int crypto_supported = false;
 
 	/** Capability check for IPsec Crypto */
 	if (resources && (resources->vf_cap_flags &
-		VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO))
-		return true;
+		VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO)) {
+		struct virtchnl_ipsec_status status;
+		int rc = iavf_ipsec_crypto_status_get(adapter, &status);
+		if (rc == 0 && status.status == INLINE_IPSEC_STATUS_AVAILABLE)
+			crypto_supported = true;
+	}
 
-	return false;
+	/* Clear the VF flag to return faster next call */
+	if (resources && !crypto_supported)
+		resources->vf_cap_flags &=
+				~(VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO);
+
+	return crypto_supported;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.254173090 +0100
+++ 0065-net-iavf-fix-device-initialization-without-inline-cr.patch	2022-06-09 12:34:29.805980743 +0100
@@ -1 +1 @@
-From 3940cd9b8cb3b8b9d1ab3a7b4b18177b1e954d82 Mon Sep 17 00:00:00 2001
+From 2ab0f947606ac135ff7b6ab59b6faaac139f206d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3940cd9b8cb3b8b9d1ab3a7b4b18177b1e954d82 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/iavf: fix device stop' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (63 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: fix device initialization without inline crypto' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: increase reset complete wait count' " Kevin Traynor
                   ` (8 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/45e89ed9fdcfef1d525988e97d74a2871505fef3

Thanks.

Kevin

---
From 45e89ed9fdcfef1d525988e97d74a2871505fef3 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Mon, 23 May 2022 13:04:36 +0100
Subject: [PATCH] net/iavf: fix device stop

[ upstream commit 5933c656b972441718d65275c6bdbec24ee71f9e ]

Move security context destroy from device stop to device close function.
Deleting the context on device stop can prevent the application from
properly cleaning and releasing resources.

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_ethdev.c       | 6 +++---
 drivers/net/iavf/iavf_ipsec_crypto.c | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 7e7042bd07..a3e66dda9f 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1041,7 +1041,4 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 				  false);
 
-	/* free iAVF security device context all related resources */
-	iavf_security_ctx_destroy(adapter);
-
 	adapter->stopped = 1;
 	dev->data->dev_started = 0;
@@ -2595,4 +2592,7 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	ret = iavf_dev_stop(dev);
 
+	/* free iAVF security device context all related resources */
+	iavf_security_ctx_destroy(adapter);
+
 	iavf_flow_flush(dev, NULL);
 	iavf_flow_uninit(adapter);
diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index 72ce39a052..fa1cecc1e1 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1552,6 +1552,4 @@ iavf_security_ctx_destroy(struct iavf_adapter *adapter)
 		return -ENODEV;
 
-	/* TODO: Add resources cleanup */
-
 	/* free and reset security data structures */
 	rte_free(iavf_sctx);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.275791777 +0100
+++ 0066-net-iavf-fix-device-stop.patch	2022-06-09 12:34:29.808980748 +0100
@@ -1 +1 @@
-From 5933c656b972441718d65275c6bdbec24ee71f9e Mon Sep 17 00:00:00 2001
+From 45e89ed9fdcfef1d525988e97d74a2871505fef3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5933c656b972441718d65275c6bdbec24ee71f9e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 7a3b37d5e3..e85ae0ed0e 100644
+index 7e7042bd07..a3e66dda9f 100644
@@ -24 +25 @@
-@@ -1089,7 +1089,4 @@ iavf_dev_stop(struct rte_eth_dev *dev)
+@@ -1041,7 +1041,4 @@ iavf_dev_stop(struct rte_eth_dev *dev)
@@ -32,2 +33,2 @@
-@@ -2714,4 +2711,7 @@ iavf_dev_close(struct rte_eth_dev *dev)
- 	adapter->closed = true;
+@@ -2595,4 +2592,7 @@ iavf_dev_close(struct rte_eth_dev *dev)
+ 	ret = iavf_dev_stop(dev);


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

* patch 'net/iavf: increase reset complete wait count' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (64 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: fix device stop' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'net/iavf: remove dead code' " Kevin Traynor
                   ` (7 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/68e6b52952ae0b8a1eb81308cfc9781c22c148fe

Thanks.

Kevin

---
From 68e6b52952ae0b8a1eb81308cfc9781c22c148fe Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Mon, 30 May 2022 13:34:58 +0800
Subject: [PATCH] net/iavf: increase reset complete wait count

[ upstream commit be7226980c9ad4963b92b489c8afb17f08899953 ]

Kernel iavf driver has sent patch to increase the completion
wait time to reduce the "Reset never finished" case.
Follow this action in DPDK iavf driver.
Kernel reference commit:
8e3e4b9da7e6 ("iavf: increase reset complete wait time")

Fixes: 22b123a36d07 ("net/avf: initialize PMD")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 0bb5698583..7e085af53e 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -19,5 +19,5 @@
 #define IAVF_AQ_LEN               32
 #define IAVF_AQ_BUF_SZ            4096
-#define IAVF_RESET_WAIT_CNT       50
+#define IAVF_RESET_WAIT_CNT       500
 #define IAVF_BUF_SIZE_MIN         1024
 #define IAVF_FRAME_SIZE_MAX       9728
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.297343616 +0100
+++ 0067-net-iavf-increase-reset-complete-wait-count.patch	2022-06-09 12:34:29.808980748 +0100
@@ -1 +1 @@
-From be7226980c9ad4963b92b489c8afb17f08899953 Mon Sep 17 00:00:00 2001
+From 68e6b52952ae0b8a1eb81308cfc9781c22c148fe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be7226980c9ad4963b92b489c8afb17f08899953 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index f1c2daa06e..025ab3ff60 100644
+index 0bb5698583..7e085af53e 100644


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

* patch 'net/iavf: remove dead code' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (65 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: increase reset complete wait count' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'common/mlx5: remove unused lcore check' " Kevin Traynor
                   ` (6 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/149acf1689eefa77836563e867d02ec1da053fd5

Thanks.

Kevin

---
From 149acf1689eefa77836563e867d02ec1da053fd5 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 30 May 2022 07:36:29 -0400
Subject: [PATCH] net/iavf: remove dead code

[ upstream commit c4716123a1e8ac79eadf57054145e330c9f7ed8b ]

Remove unimplemented function call be wrapped by
RTE_LIBRTE_IAVF_DEBUG_TX_DESC_RING

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

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

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 0d380bf80e..70c68d8c4b 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2543,10 +2543,4 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	txe = &txe_ring[desc_idx];
 
-#ifdef RTE_LIBRTE_IAVF_DEBUG_TX_DESC_RING
-		iavf_dump_tx_entry_ring(txq);
-		iavf_dump_tx_desc_ring(txq);
-#endif
-
-
 	for (idx = 0; idx < nb_pkts; idx++) {
 		volatile struct iavf_tx_desc *ddesc;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.316761092 +0100
+++ 0068-net-iavf-remove-dead-code.patch	2022-06-09 12:34:29.810980751 +0100
@@ -1 +1 @@
-From c4716123a1e8ac79eadf57054145e330c9f7ed8b Mon Sep 17 00:00:00 2001
+From 149acf1689eefa77836563e867d02ec1da053fd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c4716123a1e8ac79eadf57054145e330c9f7ed8b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bb3d7ea434..14d4dbe967 100644
+index 0d380bf80e..70c68d8c4b 100644
@@ -22 +23 @@
-@@ -2661,10 +2661,4 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -2543,10 +2543,4 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)


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

* patch 'common/mlx5: remove unused lcore check' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (66 preceding siblings ...)
  2022-06-09 11:36 ` patch 'net/iavf: remove dead code' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'examples/dma: fix MTU configuration' " Kevin Traynor
                   ` (5 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/2bf9a6595f6de3717d20cddd41b08b1227cef295

Thanks.

Kevin

---
From 2bf9a6595f6de3717d20cddd41b08b1227cef295 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Tue, 31 May 2022 04:25:48 +0300
Subject: [PATCH] common/mlx5: remove unused lcore check

[ upstream commit dfa2f5338757ea84f39426a3068c58c9d71e8d68 ]

While non-lcore list operations were supported, non-lcore index will
be converted to MLX5_LIST_NLCORE. In that case, no need to check the
lcore index be -1 or not anymore.

This commit removes the unused lcore check in list.

Fixes: 7e1cf892711b ("common/mlx5: support list non-lcore operations")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_common_utils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common_utils.c b/drivers/common/mlx5/mlx5_common_utils.c
index 775fabd478..58d744b4d4 100644
--- a/drivers/common/mlx5/mlx5_common_utils.c
+++ b/drivers/common/mlx5/mlx5_common_utils.c
@@ -294,9 +294,7 @@ _mlx5_list_unregister(struct mlx5_list_inconst *l_inconst,
 		else
 			l_const->cb_remove(l_const->ctx, entry);
-	} else if (likely(lcore_idx != -1)) {
+	} else {
 		__atomic_add_fetch(&l_inconst->cache[entry->lcore_idx]->inv_cnt,
 				   1, __ATOMIC_RELAXED);
-	} else {
-		return 0;
 	}
 	if (!l_const->lcores_share) {
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.338254355 +0100
+++ 0069-common-mlx5-remove-unused-lcore-check.patch	2022-06-09 12:34:29.811980753 +0100
@@ -1 +1 @@
-From dfa2f5338757ea84f39426a3068c58c9d71e8d68 Mon Sep 17 00:00:00 2001
+From 2bf9a6595f6de3717d20cddd41b08b1227cef295 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dfa2f5338757ea84f39426a3068c58c9d71e8d68 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/dma: fix MTU configuration' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (67 preceding siblings ...)
  2022-06-09 11:36 ` patch 'common/mlx5: remove unused lcore check' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'examples/dma: fix Tx drop statistics' " Kevin Traynor
                   ` (4 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Huisong Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/d6c4c6477678456f878fa6b1d5aa69de60362f82

Thanks.

Kevin

---
From d6c4c6477678456f878fa6b1d5aa69de60362f82 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sun, 24 Apr 2022 14:07:39 +0800
Subject: [PATCH] examples/dma: fix MTU configuration

[ upstream commit e0e95de2be21f05b0a7beb0e63ef969337b60a40 ]

The MTU in dma App can be configured by 'max_frame_size' parameters which
have a default value(1518). It's not reasonable to use it directly as MTU.
This patch fix it.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 examples/dma/dmafwd.c | 43 +++++++++++++++++++++++++++++++++++++++----
 1 file changed, 39 insertions(+), 4 deletions(-)

diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c
index 608487e35c..a03ca05129 100644
--- a/examples/dma/dmafwd.c
+++ b/examples/dma/dmafwd.c
@@ -118,5 +118,5 @@ static volatile bool force_quit;
 
 static uint32_t dma_batch_sz = MAX_PKT_BURST;
-static uint32_t max_frame_size = RTE_ETHER_MAX_LEN;
+static uint32_t max_frame_size;
 
 /* ethernet addresses of ports */
@@ -852,4 +852,36 @@ assign_rings(void)
 /* >8 End of assigning ring structures for packet exchanging. */
 
+static uint32_t
+eth_dev_get_overhead_len(uint32_t max_rx_pktlen, uint16_t max_mtu)
+{
+	uint32_t overhead_len;
+
+	if (max_mtu != UINT16_MAX && max_rx_pktlen > max_mtu)
+		overhead_len = max_rx_pktlen - max_mtu;
+	else
+		overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+	return overhead_len;
+}
+
+static int
+config_port_max_pkt_len(struct rte_eth_conf *conf,
+		struct rte_eth_dev_info *dev_info)
+{
+	uint32_t overhead_len;
+
+	if (max_frame_size == 0)
+		return 0;
+
+	if (max_frame_size < RTE_ETHER_MIN_LEN)
+		return -1;
+
+	overhead_len = eth_dev_get_overhead_len(dev_info->max_rx_pktlen,
+			dev_info->max_mtu);
+	conf->rxmode.mtu = max_frame_size - overhead_len;
+
+	return 0;
+}
+
 /*
  * Initializes a given port using global settings and with the RX buffers
@@ -879,7 +911,4 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
 	int ret, i;
 
-	if (max_frame_size > local_port_conf.rxmode.mtu)
-		local_port_conf.rxmode.mtu = max_frame_size;
-
 	/* Skip ports that are not enabled */
 	if ((dma_enabled_port_mask & (1 << portid)) == 0) {
@@ -896,4 +925,10 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
 			rte_strerror(-ret), portid);
 
+	ret = config_port_max_pkt_len(&local_port_conf, &dev_info);
+	if (ret != 0)
+		rte_exit(EXIT_FAILURE,
+			"Invalid max frame size: %u (port %u)\n",
+			max_frame_size, portid);
+
 	local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
 		dev_info.flow_type_rss_offloads;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.358342128 +0100
+++ 0070-examples-dma-fix-MTU-configuration.patch	2022-06-09 12:34:29.811980753 +0100
@@ -1 +1 @@
-From e0e95de2be21f05b0a7beb0e63ef969337b60a40 Mon Sep 17 00:00:00 2001
+From d6c4c6477678456f878fa6b1d5aa69de60362f82 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e0e95de2be21f05b0a7beb0e63ef969337b60a40 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/dma: fix Tx drop statistics' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (68 preceding siblings ...)
  2022-06-09 11:36 ` patch 'examples/dma: fix MTU configuration' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:36 ` patch 'dma/hisilicon: fix index returned when no DMA completed' " Kevin Traynor
                   ` (3 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Bruce Richardson, Kevin Laatz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/6681d13cb4831d205f6c87d0b77f6475db889b6d

Thanks.

Kevin

---
From 6681d13cb4831d205f6c87d0b77f6475db889b6d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sun, 24 Apr 2022 14:07:40 +0800
Subject: [PATCH] examples/dma: fix Tx drop statistics

[ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ]

The Tx drop statistic was designed to be collected by
rte_eth_dev_tx_buffer mechanism, but the application uses
rte_eth_tx_burst to send packets and this lead the Tx drop statistic
was not collected.

This patch removes rte_eth_dev_tx_buffer mechanism to fix the problem.

Fixes: 632bcd9b5d4f ("examples/ioat: print statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
 examples/dma/dmafwd.c | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c
index a03ca05129..dd576bcf77 100644
--- a/examples/dma/dmafwd.c
+++ b/examples/dma/dmafwd.c
@@ -123,5 +123,4 @@ static uint32_t max_frame_size;
 static struct rte_ether_addr dma_ports_eth_addr[RTE_MAX_ETHPORTS];
 
-static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
 struct rte_mempool *dma_pktmbuf_pool;
 
@@ -485,8 +484,11 @@ dma_tx_port(struct rxtx_port_config *tx_config)
 		port_statistics.tx[tx_config->rxtx_port] += nb_tx;
 
-		/* Free any unsent packets. */
-		if (unlikely(nb_tx < nb_dq))
+		if (unlikely(nb_tx < nb_dq)) {
+			port_statistics.tx_dropped[tx_config->rxtx_port] +=
+				(nb_dq - nb_tx);
+			/* Free any unsent packets. */
 			rte_mempool_put_bulk(dma_pktmbuf_pool,
 			(void *)&mbufs[nb_tx], nb_dq - nb_tx);
+		}
 	}
 }
@@ -971,23 +973,4 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
 			ret, portid);
 
-	/* Initialize TX buffers */
-	tx_buffer[portid] = rte_zmalloc_socket("tx_buffer",
-			RTE_ETH_TX_BUFFER_SIZE(MAX_PKT_BURST), 0,
-			rte_eth_dev_socket_id(portid));
-	if (tx_buffer[portid] == NULL)
-		rte_exit(EXIT_FAILURE,
-			"Cannot allocate buffer for tx on port %u\n",
-			portid);
-
-	rte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST);
-
-	ret = rte_eth_tx_buffer_set_err_callback(tx_buffer[portid],
-		rte_eth_tx_buffer_count_callback,
-		&port_statistics.tx_dropped[portid]);
-	if (ret < 0)
-		rte_exit(EXIT_FAILURE,
-			"Cannot set error callback for tx buffer on port %u\n",
-			portid);
-
 	/* Start device. 8< */
 	ret = rte_eth_dev_start(portid);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.378205805 +0100
+++ 0071-examples-dma-fix-Tx-drop-statistics.patch	2022-06-09 12:34:29.812980755 +0100
@@ -1 +1 @@
-From 7d3cb76fba200e1649842319facb932d9a05467d Mon Sep 17 00:00:00 2001
+From 6681d13cb4831d205f6c87d0b77f6475db889b6d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org


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

* patch 'dma/hisilicon: fix index returned when no DMA completed' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (69 preceding siblings ...)
  2022-06-09 11:36 ` patch 'examples/dma: fix Tx drop statistics' " Kevin Traynor
@ 2022-06-09 11:36 ` Kevin Traynor
  2022-06-09 11:37 ` patch 'dma/hisilicon: enhance CQ scan robustness' " Kevin Traynor
                   ` (2 subsequent siblings)
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:36 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/2f31401e715f387050af1b1d09da26a949ad3396

Thanks.

Kevin

---
From 2f31401e715f387050af1b1d09da26a949ad3396 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 27 May 2022 11:40:52 +0800
Subject: [PATCH] dma/hisilicon: fix index returned when no DMA completed

[ upstream commit 2301dee9709fe07f79f92a032bf510a206397cc4 ]

If no DMA request is completed, the ring_idx of the last completed
operation need returned by last_idx parameter. This patch fixes it.

Fixes: 2db4f0b82360 ("dma/hisilicon: add data path")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/dma/hisilicon/hisi_dmadev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index ff80622ec0..ef4c7b18f7 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -650,10 +650,10 @@ hisi_dma_completed(void *dev_private,
 		sq_head = (sq_head + 1) & hw->sq_depth_mask;
 	}
+	*last_idx = hw->cridx + i - 1;
 	if (i > 0) {
 		hw->cridx += i;
-		*last_idx = hw->cridx - 1;
 		hw->sq_head = sq_head;
+		hw->completed += i;
 	}
-	hw->completed += i;
 
 	return i;
@@ -709,10 +709,10 @@ hisi_dma_completed_status(void *dev_private,
 		sq_head = (sq_head + 1) & hw->sq_depth_mask;
 	}
+	*last_idx = hw->cridx + cpl_num - 1;
 	if (likely(cpl_num > 0)) {
 		hw->cridx += cpl_num;
-		*last_idx = hw->cridx - 1;
 		hw->sq_head = sq_head;
+		hw->completed += cpl_num;
 	}
-	hw->completed += cpl_num;
 
 	return cpl_num;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.398158019 +0100
+++ 0072-dma-hisilicon-fix-index-returned-when-no-DMA-complet.patch	2022-06-09 12:34:29.813980756 +0100
@@ -1 +1 @@
-From 2301dee9709fe07f79f92a032bf510a206397cc4 Mon Sep 17 00:00:00 2001
+From 2f31401e715f387050af1b1d09da26a949ad3396 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2301dee9709fe07f79f92a032bf510a206397cc4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 9cef2cbfbe..f5c3cd914d 100644
+index ff80622ec0..ef4c7b18f7 100644
@@ -21 +22 @@
-@@ -703,10 +703,10 @@ hisi_dma_completed(void *dev_private,
+@@ -650,10 +650,10 @@ hisi_dma_completed(void *dev_private,
@@ -34 +35 @@
-@@ -762,10 +762,10 @@ hisi_dma_completed_status(void *dev_private,
+@@ -709,10 +709,10 @@ hisi_dma_completed_status(void *dev_private,


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

* patch 'dma/hisilicon: enhance CQ scan robustness' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (70 preceding siblings ...)
  2022-06-09 11:36 ` patch 'dma/hisilicon: fix index returned when no DMA completed' " Kevin Traynor
@ 2022-06-09 11:37 ` Kevin Traynor
  2022-06-09 11:37 ` patch 'eal/ppc: fix compilation for musl' " Kevin Traynor
  2022-06-09 12:53 ` patch 'examples/l3fwd: fix scalar LPM' " Stanisław Kardach
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:37 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/216108acda7431ddb793c352c16fcf824621fdf0

Thanks.

Kevin

---
From 216108acda7431ddb793c352c16fcf824621fdf0 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 27 May 2022 11:40:54 +0800
Subject: [PATCH] dma/hisilicon: enhance CQ scan robustness

[ upstream commit e03c601acb4d483a7305fb9ad15e13f6645b02e2 ]

The CQ (completion queue) descriptors were updated by hardware, and then
scanned by driver to retrieve hardware completion status.

This patch enhances robustness by following:
1. replace while (true) with a finite loop to avoid potential dead loop.
2. check the csq_head field in CQ descriptor to avoid status array
overflows.

Fixes: 2db4f0b82360 ("dma/hisilicon: add data path")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/dma/hisilicon/hisi_dmadev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index ef4c7b18f7..ec687ef67e 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -582,5 +582,5 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)
 	uint64_t misc;
 
-	while (true) {
+	while (count < hw->cq_depth) {
 		cqe = &hw->cqe[cq_head];
 		misc = cqe->misc;
@@ -590,4 +590,14 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)
 
 		csq_head = FIELD_GET(CQE_SQ_HEAD_MASK, misc);
+		if (unlikely(csq_head > hw->sq_depth_mask)) {
+			/**
+			 * Defensive programming to prevent overflow of the
+			 * status array indexed by csq_head. Only error logs
+			 * are used for prompting.
+			 */
+			HISI_DMA_ERR(hw, "invalid csq_head:%u!\n", csq_head);
+			count = 0;
+			break;
+		}
 		if (unlikely(misc & CQE_STATUS_MASK))
 			hw->status[csq_head] = FIELD_GET(CQE_STATUS_MASK,
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.418484139 +0100
+++ 0073-dma-hisilicon-enhance-CQ-scan-robustness.patch	2022-06-09 12:34:29.813980756 +0100
@@ -1 +1 @@
-From e03c601acb4d483a7305fb9ad15e13f6645b02e2 Mon Sep 17 00:00:00 2001
+From 216108acda7431ddb793c352c16fcf824621fdf0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e03c601acb4d483a7305fb9ad15e13f6645b02e2 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f5c3cd914d..fbe09284ed 100644
+index ef4c7b18f7..ec687ef67e 100644
@@ -26 +27 @@
-@@ -635,5 +635,5 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)
+@@ -582,5 +582,5 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)
@@ -33 +34 @@
-@@ -643,4 +643,14 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)
+@@ -590,4 +590,14 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)


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

* patch 'eal/ppc: fix compilation for musl' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (71 preceding siblings ...)
  2022-06-09 11:37 ` patch 'dma/hisilicon: enhance CQ scan robustness' " Kevin Traynor
@ 2022-06-09 11:37 ` Kevin Traynor
  2022-06-09 12:53 ` patch 'examples/l3fwd: fix scalar LPM' " Stanisław Kardach
  73 siblings, 0 replies; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 11:37 UTC (permalink / raw)
  To: Duncan Bellamy; +Cc: David Christensen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/52c9e902beb02d3d458a13eaa484c23b4487eae7

Thanks.

Kevin

---
From 52c9e902beb02d3d458a13eaa484c23b4487eae7 Mon Sep 17 00:00:00 2001
From: Duncan Bellamy <dunk@denkimushi.com>
Date: Sat, 14 May 2022 08:14:35 +0100
Subject: [PATCH] eal/ppc: fix compilation for musl

[ upstream commit 0615dd2aa139312a93ae312233a80e164c8f1048 ]

musl lacks __ppc_get_timebase() but has __builtin_ppc_get_timebase()

Signed-off-by: Duncan Bellamy <dunk@denkimushi.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
---
 lib/eal/ppc/include/rte_cycles.h |  7 ++++++
 lib/eal/ppc/rte_cycles.c         | 39 ++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/lib/eal/ppc/include/rte_cycles.h b/lib/eal/ppc/include/rte_cycles.h
index 5585f9273c..666fc9b0bf 100644
--- a/lib/eal/ppc/include/rte_cycles.h
+++ b/lib/eal/ppc/include/rte_cycles.h
@@ -11,5 +11,8 @@ extern "C" {
 #endif
 
+#include <features.h>
+#ifdef __GLIBC__
 #include <sys/platform/ppc.h>
+#endif
 
 #include "generic/rte_cycles.h"
@@ -27,5 +30,9 @@ static inline uint64_t
 rte_rdtsc(void)
 {
+#ifdef __GLIBC__
 	return __ppc_get_timebase();
+#else
+	return __builtin_ppc_get_timebase();
+#endif
 }
 
diff --git a/lib/eal/ppc/rte_cycles.c b/lib/eal/ppc/rte_cycles.c
index 3180adb0ff..cd4bdff8b8 100644
--- a/lib/eal/ppc/rte_cycles.c
+++ b/lib/eal/ppc/rte_cycles.c
@@ -3,5 +3,11 @@
  */
 
+#include <features.h>
+#ifdef __GLIBC__
 #include <sys/platform/ppc.h>
+#elif RTE_EXEC_ENV_LINUX
+#include <string.h>
+#include <stdio.h>
+#endif
 
 #include "eal_private.h"
@@ -10,4 +16,37 @@ uint64_t
 get_tsc_freq_arch(void)
 {
+#ifdef __GLIBC__
 	return __ppc_get_timebase_freq();
+#elif RTE_EXEC_ENV_LINUX
+	static unsigned long base;
+	char buf[512];
+	ssize_t nr;
+	FILE *f;
+
+	if (base != 0)
+		goto out;
+
+	f = fopen("/proc/cpuinfo", "rb");
+	if (f == NULL)
+		goto out;
+
+	while (fgets(buf, sizeof(buf), f) != NULL) {
+		char *ret = strstr(buf, "timebase");
+
+		if (ret == NULL)
+			continue;
+		ret += sizeof("timebase") - 1;
+		ret = strchr(ret, ':');
+		if (ret == NULL)
+			continue;
+		base = strtoul(ret + 1, NULL, 10);
+		break;
+	}
+	fclose(f);
+out:
+	return (uint64_t) base;
+#else
+	return 0;
+#endif
+
 }
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.438797115 +0100
+++ 0074-eal-ppc-fix-compilation-for-musl.patch	2022-06-09 12:34:29.814980758 +0100
@@ -1 +1 @@
-From 0615dd2aa139312a93ae312233a80e164c8f1048 Mon Sep 17 00:00:00 2001
+From 52c9e902beb02d3d458a13eaa484c23b4487eae7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 0615dd2aa139312a93ae312233a80e164c8f1048 ]


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

* Re: patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2
  2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (72 preceding siblings ...)
  2022-06-09 11:37 ` patch 'eal/ppc: fix compilation for musl' " Kevin Traynor
@ 2022-06-09 12:53 ` Stanisław Kardach
  2022-06-09 13:12   ` Kevin Traynor
  73 siblings, 1 reply; 78+ messages in thread
From: Stanisław Kardach @ 2022-06-09 12:53 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: David Marchand, dpdk stable

On Thu, Jun 9, 2022 at 1:37 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> Hi,
>
> FYI, your patch has been queued to stable release 21.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 06/13/22. So please
> shout if anyone has objections.
>
Hi Kevin,

I'm not sure if this patch has to go to stable. Main reason being that
this issue won't be encountered unless someone explicitly enables the
scalar code. Until RISC-V port this never happened.

Actually same goes for:
  a9fe152363e2 ("test/ring: add custom element size functional tests")
that is in the stable queue too.

Best Regards,
Stanisław Kardach

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

* Re: patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2
  2022-06-09 12:53 ` patch 'examples/l3fwd: fix scalar LPM' " Stanisław Kardach
@ 2022-06-09 13:12   ` Kevin Traynor
  2022-06-09 13:17     ` Kevin Traynor
  0 siblings, 1 reply; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 13:12 UTC (permalink / raw)
  To: Stanisław Kardach; +Cc: David Marchand, dpdk stable

On 09/06/2022 13:53, Stanisław Kardach wrote:
> On Thu, Jun 9, 2022 at 1:37 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>>
>> Hi,
>>
>> FYI, your patch has been queued to stable release 21.11.2
>>
>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>> It will be pushed if I get no objections before 06/13/22. So please
>> shout if anyone has objections.
>>
> Hi Kevin,
> 

Hi Stanslaw,

> I'm not sure if this patch has to go to stable. Main reason being that
> this issue won't be encountered unless someone explicitly enables the
> scalar code. Until RISC-V port this never happened.
> 

Reading the commit, it seemed like a logic error which is why i thought 
maybe it should be backported. I'm fine with not backporting it as 
you've explained it's not needed. Also, it's just example/test code.

> Actually same goes for:
>    a9fe152363e2 ("test/ring: add custom element size functional tests")
> that is in the stable queue too.
>

Ack.

Thanks for checking the commits and replying :-)
Kevin.

> Best Regards,
> Stanisław Kardach
> 


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

* Re: patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2
  2022-06-09 13:12   ` Kevin Traynor
@ 2022-06-09 13:17     ` Kevin Traynor
  2022-06-09 13:21       ` Stanisław Kardach
  0 siblings, 1 reply; 78+ messages in thread
From: Kevin Traynor @ 2022-06-09 13:17 UTC (permalink / raw)
  To: Stanisław Kardach; +Cc: David Marchand, dpdk stable

On 09/06/2022 14:12, Kevin Traynor wrote:
> On 09/06/2022 13:53, Stanisław Kardach wrote:
>> On Thu, Jun 9, 2022 at 1:37 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>>>
>>> Hi,
>>>
>>> FYI, your patch has been queued to stable release 21.11.2
>>>
>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>> It will be pushed if I get no objections before 06/13/22. So please
>>> shout if anyone has objections.
>>>
>> Hi Kevin,
>>
> 
> Hi Stanslaw,
> 
>> I'm not sure if this patch has to go to stable. Main reason being that
>> this issue won't be encountered unless someone explicitly enables the
>> scalar code. Until RISC-V port this never happened.
>>
> 
> Reading the commit, it seemed like a logic error which is why i thought
> maybe it should be backported. I'm fine with not backporting it as
> you've explained it's not needed. Also, it's just example/test code.
> 
>> Actually same goes for:
>>     a9fe152363e2 ("test/ring: add custom element size functional tests")
>> that is in the stable queue too.
>>

Checked and that ^ commit is in since DPDK 20.02. Just to confirm, I 
think you meant this one?

 From 3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Wed, 11 May 2022 17:07:25 +0200
Subject: [PATCH] test/ring: remove excessive inlining

[ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ]

> 
> Ack.
> 
> Thanks for checking the commits and replying :-)
> Kevin.
> 
>> Best Regards,
>> Stanisław Kardach
>>
> 


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

* Re: patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2
  2022-06-09 13:17     ` Kevin Traynor
@ 2022-06-09 13:21       ` Stanisław Kardach
  0 siblings, 0 replies; 78+ messages in thread
From: Stanisław Kardach @ 2022-06-09 13:21 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: David Marchand, dpdk stable

On Thu, Jun 9, 2022 at 3:17 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> On 09/06/2022 14:12, Kevin Traynor wrote:
> > On 09/06/2022 13:53, Stanisław Kardach wrote:
> >> On Thu, Jun 9, 2022 at 1:37 PM Kevin Traynor <ktraynor@redhat.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> FYI, your patch has been queued to stable release 21.11.2
> >>>
> >>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> >>> It will be pushed if I get no objections before 06/13/22. So please
> >>> shout if anyone has objections.
> >>>
> >> Hi Kevin,
> >>
> >
> > Hi Stanslaw,
> >
> >> I'm not sure if this patch has to go to stable. Main reason being that
> >> this issue won't be encountered unless someone explicitly enables the
> >> scalar code. Until RISC-V port this never happened.
> >>
> >
> > Reading the commit, it seemed like a logic error which is why i thought
> > maybe it should be backported. I'm fine with not backporting it as
> > you've explained it's not needed. Also, it's just example/test code.
You're totally right, it's a logical error. Just by pure luck it's not
a compile error.
> >
> >> Actually same goes for:
> >>     a9fe152363e2 ("test/ring: add custom element size functional tests")
> >> that is in the stable queue too.
> >>
>
> Checked and that ^ commit is in since DPDK 20.02. Just to confirm, I
> think you meant this one?
>
>  From 3ec90e3ec0b68d06e9b9494798b79f2abaa2a49f Mon Sep 17 00:00:00 2001
> From: Stanislaw Kardach <kda@semihalf.com>
> Date: Wed, 11 May 2022 17:07:25 +0200
> Subject: [PATCH] test/ring: remove excessive inlining
>
> [ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ]
Yes, sorry I did a copy paste of a wrong hash by mistake.
>
> >
> > Ack.
> >
> > Thanks for checking the commits and replying :-)
> > Kevin.
> >
> >> Best Regards,
> >> Stanisław Kardach
> >>
> >
>

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

end of thread, other threads:[~2022-06-09 13:22 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 11:35 patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 21.11.2 Kevin Traynor
2022-06-09 11:35 ` patch 'test/ring: remove excessive inlining' " Kevin Traynor
2022-06-09 11:35 ` patch 'eal/freebsd: fix use of newer cpuset macros' " Kevin Traynor
2022-06-09 11:35 ` patch 'test: avoid hang if queues are full and Tx fails' " Kevin Traynor
2022-06-09 11:35 ` patch 'acl: fix rules with 8-byte field size' " Kevin Traynor
2022-06-09 11:35 ` patch 'rib: fix traversal with /32 route' " Kevin Traynor
2022-06-09 11:35 ` patch 'mbuf: dump outer VLAN' " Kevin Traynor
2022-06-09 11:35 ` patch 'doc: fix API index Markdown syntax' " Kevin Traynor
2022-06-09 11:35 ` patch 'devtools: fix null test for NUMA systems' " Kevin Traynor
2022-06-09 11:35 ` patch 'pipeline: fix emit instruction for invalid headers' " Kevin Traynor
2022-06-09 11:35 ` patch 'pcapng: fix timestamp wrapping in output files' " Kevin Traynor
2022-06-09 11:35 ` patch 'examples/ipsec-secgw: fix uninitialized memory access' " Kevin Traynor
2022-06-09 11:36 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " Kevin Traynor
2022-06-09 11:36 ` patch 'test/crypto: fix null check for ZUC authentication' " Kevin Traynor
2022-06-09 11:36 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " Kevin Traynor
2022-06-09 11:36 ` patch 'test/crypto: fix driver name for DPAA raw API test' " Kevin Traynor
2022-06-09 11:36 ` patch 'doc: add missing auth algo for IPsec example' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: fix port status of bonding slave device' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: remove useless pointer checks' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/hns3: fix xstats get return if xstats is null' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ipn3ke: " Kevin Traynor
2022-06-09 11:36 ` patch 'net/mvpp2: " Kevin Traynor
2022-06-09 11:36 ` patch 'net/axgbe: " Kevin Traynor
2022-06-09 11:36 ` patch 'ethdev: fix memory leak in xstats telemetry' " Kevin Traynor
2022-06-09 11:36 ` patch 'ethdev: fix possible null pointer access' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/cnxk: fix possible null dereference in telemetry' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " Kevin Traynor
2022-06-09 11:36 ` patch 'ethdev: prohibit polling stopped queue' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: fix use of indirect action after port close' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: do not poll stopped queues' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/bonding: fix mbuf fast free usage' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/memif: fix overwriting of head segment' " Kevin Traynor
2022-06-09 11:36 ` patch 'ethdev: fix port state when stop' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ngbe: fix link speed check' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ngbe: fix reading PHY ID' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ngbe: fix PCIe related operations with bus API' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/txgbe: fix SGMII mode to link up' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/txgbe: fix max number of queues for SR-IOV' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/nfp: fix disabling VLAN stripping' " Kevin Traynor
2022-06-09 11:36 ` patch 'app/testpmd: fix help of create meter command' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/vmxnet3: fix Rx data ring initialization' " Kevin Traynor
2022-06-09 11:36 ` patch 'common/sfc_efx/base: convert EFX PCIe INTF to MCDI value' " Kevin Traynor
2022-06-09 11:36 ` patch 'ethdev: fix port close in secondary process' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/bnxt: fix compatibility with some old firmwares' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/bnxt: fix ULP parser to ignore segment offset' " Kevin Traynor
2022-06-09 11:36 ` patch 'vhost: fix async access' " Kevin Traynor
2022-06-09 11:36 ` patch 'doc: fix vhost multi-queue reconnection' " Kevin Traynor
2022-06-09 11:36 ` patch 'vhost: fix deadlock when message handling failed' " Kevin Traynor
2022-06-09 11:36 ` patch 'examples/vhost: fix crash when no VMDq' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/mlx5: fix Tx recovery' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/mlx5: fix statistics read on Linux' " Kevin Traynor
2022-06-09 11:36 ` patch 'kni: fix build with Linux 5.18' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: fix data path selection' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ice/base: fix getting sched node from ID type' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ice/base: fix direction of flow that matches any' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/ice: fix MTU info for DCF' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/i40e: fix max frame size config at port level' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: fix queue start exception handling' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: fix mbuf release in multi-process' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: fix Rx queue interrupt setting' " Kevin Traynor
2022-06-09 11:36 ` patch 'doc: update matching versions in i40e guide' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: fix device initialization without inline crypto' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: fix device stop' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: increase reset complete wait count' " Kevin Traynor
2022-06-09 11:36 ` patch 'net/iavf: remove dead code' " Kevin Traynor
2022-06-09 11:36 ` patch 'common/mlx5: remove unused lcore check' " Kevin Traynor
2022-06-09 11:36 ` patch 'examples/dma: fix MTU configuration' " Kevin Traynor
2022-06-09 11:36 ` patch 'examples/dma: fix Tx drop statistics' " Kevin Traynor
2022-06-09 11:36 ` patch 'dma/hisilicon: fix index returned when no DMA completed' " Kevin Traynor
2022-06-09 11:37 ` patch 'dma/hisilicon: enhance CQ scan robustness' " Kevin Traynor
2022-06-09 11:37 ` patch 'eal/ppc: fix compilation for musl' " Kevin Traynor
2022-06-09 12:53 ` patch 'examples/l3fwd: fix scalar LPM' " Stanisław Kardach
2022-06-09 13:12   ` Kevin Traynor
2022-06-09 13:17     ` Kevin Traynor
2022-06-09 13:21       ` Stanisław Kardach

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).