patch 'app/testpmd: revert primary process polling all queues fix' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Thu Aug 10 01:58:45 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=56b89656df888c122f485125b0c259f9758cf690

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 56b89656df888c122f485125b0c259f9758cf690 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at amd.com>
Date: Wed, 5 Jul 2023 15:32:06 +0100
Subject: [PATCH] app/testpmd: revert primary process polling all queues fix
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]

For some drivers [1], testpmd forwarding is broken with commit [2].

This is because with [2] testpmd gets queue state from ethdev and
forwarding is done only on queues in started state, but some drivers
don't update queue status properly, and this breaks forwarding for those
drivers.

Drivers should be fixed but more time is required to verify drivers
again, instead reverting [2] for now to not break drivers.
Target is to merge [2] back at the beginning of next release cycle and
fix drivers accordingly.

[1]
Bugzilla ID: 1259

[2]
Fixes: 141a520b35f7 ("app/testpmd: fix primary process not polling all queues")

Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
Tested-by: Song Jiale <songx.jiale at intel.com>
Tested-by: Ali Alnubani <alialnu at nvidia.com>
---
 app/test-pmd/testpmd.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5c1388a8c0..b69b248e47 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2355,13 +2355,6 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
 		ports[port_id].rxq[queue_id].state =
 			rx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
-		/*
-		 * Do not change the rxq state for primary process
-		 * to ensure that the PMDs do not implement
-		 * rte_eth_rx_queue_info_get can forward as before.
-		 */
-		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-			return;
 		/*
 		 * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
 		 * to ensure that the PMDs do not implement
@@ -2387,13 +2380,6 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
 		ports[port_id].txq[queue_id].state =
 			tx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
-		/*
-		 * Do not change the txq state for primary process
-		 * to ensure that the PMDs do not implement
-		 * rte_eth_tx_queue_info_get can forward as before.
-		 */
-		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-			return;
 		/*
 		 * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
 		 * to ensure that the PMDs do not implement
@@ -2461,7 +2447,8 @@ start_packet_forwarding(int with_tx_first)
 		return;
 
 	if (stream_init != NULL) {
-		update_queue_state();
+		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+			update_queue_state();
 		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
 			stream_init(fwd_streams[i]);
 	}
@@ -3224,7 +3211,8 @@ start_port(portid_t pid)
 		pl[cfg_pi++] = pi;
 	}
 
-	update_queue_state();
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+		update_queue_state();
 
 	if (at_least_one_port_successfully_started && !no_link_check)
 		check_all_ports_link_status(RTE_PORT_ALL);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.869420300 +0800
+++ 0066-app-testpmd-revert-primary-process-polling-all-queue.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From d7d802daf80f4a03c77a815da6d47a7b3657ef2c Mon Sep 17 00:00:00 2001
+From 56b89656df888c122f485125b0c259f9758cf690 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]
@@ -23 +25,0 @@
-Cc: stable at dpdk.org
@@ -29,3 +31,2 @@
- app/test-pmd/testpmd.c                 | 20 ++++----------------
- doc/guides/rel_notes/release_23_07.rst |  9 +++++++++
- 2 files changed, 13 insertions(+), 16 deletions(-)
+ app/test-pmd/testpmd.c | 20 ++++----------------
+ 1 file changed, 4 insertions(+), 16 deletions(-)
@@ -34 +35 @@
-index 1fc70650e0..c6ad9b18bf 100644
+index 5c1388a8c0..b69b248e47 100644
@@ -37 +38 @@
-@@ -2424,13 +2424,6 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2355,13 +2355,6 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -51 +52 @@
-@@ -2456,13 +2449,6 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2387,13 +2380,6 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -65 +66 @@
-@@ -2530,7 +2516,8 @@ start_packet_forwarding(int with_tx_first)
+@@ -2461,7 +2447,8 @@ start_packet_forwarding(int with_tx_first)
@@ -75 +76 @@
-@@ -3293,7 +3280,8 @@ start_port(portid_t pid)
+@@ -3224,7 +3211,8 @@ start_port(portid_t pid)
@@ -85,20 +85,0 @@
-diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst
-index be8027f71a..234650ac39 100644
---- a/doc/guides/rel_notes/release_23_07.rst
-+++ b/doc/guides/rel_notes/release_23_07.rst
-@@ -286,6 +286,15 @@ Known Issues
-    Also, make sure to start the actual text at the margin.
-    =======================================================
- 
-+* **Testpmd is not forwarding on queues individually stopped.**
-+
-+  Testpmd forwards packets on started queues.
-+  If a queue explicitly stopped, and later port stopped and started again,
-+  the status of the previously stopped queue is not updated,
-+  so forwarding is not working on those queues.
-+
-+  As a workaround start queues back explicitly, instead of port stop/start.
-+
- 
- Tested Platforms
- ----------------


More information about the stable mailing list