patch 'examples/multi_process: fix Rx packets distribution' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:41 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bb4c5550b15b4b26cffa97f7122d93569d87316c

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From bb4c5550b15b4b26cffa97f7122d93569d87316c Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Wed, 10 Nov 2021 18:57:59 +0200
Subject: [PATCH] examples/multi_process: fix Rx packets distribution
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 69f9d8aa357d2299e057b7e335f340e20a0c5e7e ]

MP servers distributes Rx packets between clients according to
round-robin scheme.

Current implementation always started packets distribution from
the first client. That procedure resulted in uniform distribution
in cases when Rx packets number was around clients number
multiplication. However, if RX burst repeatedly returned single
packet, round-robin scheme would not work because all packets
were assigned to the first client only.

The patch does not restart packets distribution from
the first client.
Packets distribution always continues to the next client.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 examples/multi_process/client_server_mp/mp_server/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 9bcee460fd..89a996eb58 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -233,7 +233,7 @@ process_packets(uint32_t port_num __rte_unused,
 		struct rte_mbuf *pkts[], uint16_t rx_count)
 {
 	uint16_t i;
-	uint8_t client = 0;
+	static uint8_t client;
 
 	for (i = 0; i < rx_count; i++) {
 		enqueue_rx_packet(client, pkts[i]);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.281707508 +0800
+++ 0037-examples-multi_process-fix-Rx-packets-distribution.patch	2021-11-28 22:41:03.286874917 +0800
@@ -1 +1 @@
-From 69f9d8aa357d2299e057b7e335f340e20a0c5e7e Mon Sep 17 00:00:00 2001
+From bb4c5550b15b4b26cffa97f7122d93569d87316c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 69f9d8aa357d2299e057b7e335f340e20a0c5e7e ]
@@ -21 +23,0 @@
-Cc: stable at dpdk.org
@@ -30 +32 @@
-index b4761ebc7b..f54bb8b75a 100644
+index 9bcee460fd..89a996eb58 100644
@@ -33 +35 @@
-@@ -234,7 +234,7 @@ process_packets(uint32_t port_num __rte_unused,
+@@ -233,7 +233,7 @@ process_packets(uint32_t port_num __rte_unused,


More information about the stable mailing list