All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/multi_process: fix RX packets distribution
@ 2021-10-26  9:50 Gregory Etelson
  2021-10-28 14:29 ` Burakov, Anatoly
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Gregory Etelson @ 2021-10-26  9:50 UTC (permalink / raw)
  To: dev, getelson; +Cc: matan, rasland, Dmitry Kozlyuk, Anatoly Burakov

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 a multiple of clients number.
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@nvidia.com>
Reviewed-by: Dmitry Kozlyuk <dkozlyuk@oss.nvidia.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 b4761ebc7b..fb441cbbf0 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -234,7 +234,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 = 0;
 
 	for (i = 0; i < rx_count; i++) {
 		enqueue_rx_packet(client, pkts[i]);
-- 
2.33.1


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

end of thread, other threads:[~2021-11-16 15:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  9:50 [dpdk-dev] [PATCH] examples/multi_process: fix RX packets distribution Gregory Etelson
2021-10-28 14:29 ` Burakov, Anatoly
2021-10-28 15:14   ` Gregory Etelson
2021-10-28 15:35     ` Burakov, Anatoly
2021-11-08 21:27       ` Thomas Monjalon
2021-11-09  6:42         ` Gregory Etelson
2021-11-09  7:30           ` Thomas Monjalon
2021-11-09  9:35             ` Gregory Etelson
2021-11-09  9:58 ` [dpdk-dev] [PATCH v2] examples/multi_proces: fix Rx " Gregory Etelson
2021-11-09 11:35   ` Thomas Monjalon
2021-11-09 11:49     ` Gregory Etelson
2021-11-09 14:17       ` Thomas Monjalon
2021-11-10 16:52 ` [PATCH v3] " Gregory Etelson
2021-11-10 16:57 ` [PATCH v4] examples/multi_process: " Gregory Etelson
2021-11-16 15:07   ` David Marchand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.