DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: stop secondary process fwd_lcores during primary teardown
@ 2025-09-10 11:02 Khadem Ullah
  2025-09-10 17:34 ` Stephen Hemminger
  2025-09-11 10:25 ` [PATCH v2] " Khadem Ullah
  0 siblings, 2 replies; 9+ messages in thread
From: Khadem Ullah @ 2025-09-10 11:02 UTC (permalink / raw)
  To: Aman Singh, Anatoly Burakov, Ferruh Yigit, Andrew Rybchenko,
	Ajit Khaparde, Xiaoyun Li
  Cc: dev, Khadem Ullah, stable

When the secondary process testpmd application running any fwd_engine
and after that primary has exited will cause a crash.

This patch forces secondary process forwarding lcores
in fwd_engine to stop before the primary process exits.

Fixes: a550baf24af90f ("app/testpmd: support multi-process")
Cc: stable@dpdk.org

Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
---
 app/test-pmd/testpmd.c | 61 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 58 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0f58a31eb5..1642bdda27 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -103,8 +103,13 @@ uint16_t verbose_level = 0; /**< Silent by default. */
 int testpmd_logtype; /**< Log type for testpmd logs */
 
 /* Maximum delay for exiting after primary process. */
-#define MONITOR_INTERVAL (500 * 1000)
+#define MONITOR_INTERVAL (500)
+static const char *_MSG_POOL = "MSG_POOL";
+static const char *_SEC_2_PRI = "SEC_2_PRI";
+static const char *_PRI_2_SEC = "PRI_2_SEC";
 
+struct rte_ring *send_ring, *recv_ring;
+struct rte_mempool *message_pool;
 /* use main core for command line ? */
 uint8_t interactive = 0;
 uint8_t auto_start = 0;
@@ -2563,7 +2568,8 @@ stop_packet_forwarding(void)
 	for (lc_id = 0; lc_id < cur_fwd_config.nb_fwd_lcores; lc_id++)
 		fwd_lcores[lc_id]->stopped = 1;
 	printf("\nWaiting for lcores to finish...\n");
-	rte_eal_mp_wait_lcore();
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		rte_eal_mp_wait_lcore();
 	port_fwd_end = cur_fwd_config.fwd_eng->port_fwd_end;
 	if (port_fwd_end != NULL) {
 		for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
@@ -3634,6 +3640,17 @@ pmd_test_exit(void)
 			printf("\nStopping port %d...\n", pt_id);
 			fflush(stdout);
 			stop_port(pt_id);
+#ifndef RTE_EXEC_ENV_WINDOWS
+			printf("Stopping secondary process ...\n");
+			void *msg = NULL;
+			if (rte_mempool_get(message_pool, &msg) < 0)
+				rte_panic("Failed to get message buffer\n");
+			strlcpy((char *)msg, "stop", STR_TOKEN_SIZE);
+			if (rte_ring_enqueue(send_ring, msg) < 0) {
+				printf("Failed to send message - message discarded\n");
+				rte_mempool_put(message_pool, msg);
+			}
+#endif
 		}
 		RTE_ETH_FOREACH_DEV(pt_id) {
 			printf("\nShutting down port %d...\n", pt_id);
@@ -4370,8 +4387,21 @@ signal_handler(int signum __rte_unused)
 static void
 monitor_primary(void *arg __rte_unused)
 {
+	void *msg;
 	if (rte_eal_primary_proc_alive(NULL)) {
-		rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary, NULL);
+		if (rte_ring_dequeue(recv_ring, &msg) < 0) {
+			rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary, NULL);
+		} else {
+			rte_mempool_put(message_pool, msg);
+			if (!strcmp((char *)msg, "stop")) {
+				printf("Received '%s'\n", (char *)msg);
+				stop_packet_forwarding();
+				fprintf(stderr, "\nPrimary process is no longer active,"
+					"exiting...\n");
+				exit(EXIT_FAILURE);
+			}
+		}
+
 	} else {
 		/*
 		 * If primary process exits, then all the device information
@@ -4429,9 +4459,34 @@ main(int argc, char** argv)
 			 rte_strerror(rte_errno));
 
 #ifndef RTE_EXEC_ENV_WINDOWS
+	unsigned int flags = 0;
+	unsigned int ring_size = 64;
+	unsigned int pool_size = 1024;
+	unsigned int pool_cache = 32;
+	unsigned int priv_data_sz = 0;
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
 	    enable_primary_monitor() < 0)
 		rte_exit(EXIT_FAILURE, "Cannot setup primary monitor");
+			/* Start of ring structure. 8< */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		send_ring = rte_ring_create(_PRI_2_SEC, ring_size, rte_socket_id(), flags);
+		recv_ring = rte_ring_create(_SEC_2_PRI, ring_size, rte_socket_id(), flags);
+		message_pool = rte_mempool_create(_MSG_POOL, pool_size,
+				STR_TOKEN_SIZE, pool_cache, priv_data_sz,
+				NULL, NULL, NULL, NULL,
+				rte_socket_id(), flags);
+	} else {
+		recv_ring = rte_ring_lookup(_PRI_2_SEC);
+		send_ring = rte_ring_lookup(_SEC_2_PRI);
+		message_pool = rte_mempool_lookup(_MSG_POOL);
+	}
+	/* >8 End of ring structure. */
+	if (send_ring == NULL)
+		rte_exit(EXIT_FAILURE, "Problem getting sending ring\n");
+	if (recv_ring == NULL)
+		rte_exit(EXIT_FAILURE, "Problem getting receiving ring\n");
+	if (message_pool == NULL)
+		rte_exit(EXIT_FAILURE, "Problem getting message pool\n");
 #endif
 
 	/* allocate port structures, and init them */
-- 
2.27.0


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

* Re: [PATCH] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-10 11:02 [PATCH] app/testpmd: stop secondary process fwd_lcores during primary teardown Khadem Ullah
@ 2025-09-10 17:34 ` Stephen Hemminger
  2025-09-10 18:16   ` Khadem Ullah
  2025-09-11 10:25 ` [PATCH v2] " Khadem Ullah
  1 sibling, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2025-09-10 17:34 UTC (permalink / raw)
  To: Khadem Ullah
  Cc: Aman Singh, Anatoly Burakov, Ferruh Yigit, Andrew Rybchenko,
	Ajit Khaparde, Xiaoyun Li, dev, stable

On Wed, 10 Sep 2025 04:02:37 -0700
Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote:

> +#ifndef RTE_EXEC_ENV_WINDOWS
> +			printf("Stopping secondary process ...\n");
> +			void *msg = NULL;
> +			if (rte_mempool_get(message_pool, &msg) < 0)
> +				rte_panic("Failed to get message buffer\n");
> +			strlcpy((char *)msg, "stop", STR_TOKEN_SIZE);
> +			if (rte_ring_enqueue(send_ring, msg) < 0) {
> +				printf("Failed to send message - message discarded\n");
> +				rte_mempool_put(message_pool, msg);
> +			}
> +#endif

Windows doesn't support secondary processes, not sure how you tested this.
When Windows supports secondary processes it should the existing EAL API's,
not fixing every service.

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

* Re: [PATCH] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-10 17:34 ` Stephen Hemminger
@ 2025-09-10 18:16   ` Khadem Ullah
  0 siblings, 0 replies; 9+ messages in thread
From: Khadem Ullah @ 2025-09-10 18:16 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Aman Singh, Anatoly Burakov, Ferruh Yigit, Andrew Rybchenko,
	Ajit Khaparde, Xiaoyun Li, dev, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

Hi Stephen,

On Wed, Sep 10, 2025, 22:34 Stephen Hemminger <stephen@networkplumber.org>
wrote:

>
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> > +
>
> Windows doesn't support secondary processes, not sure how you tested this.
> When Windows supports secondary processes it should the existing EAL API's,
> not fixing every service.
>
Yeah, I have tested on Linux only, the code is under the macro
#ifndef RTE_EXEC_ENV_WINDOWS
#endif

Best regards,
Khadem

>

[-- Attachment #2: Type: text/html, Size: 1150 bytes --]

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

* [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-10 11:02 [PATCH] app/testpmd: stop secondary process fwd_lcores during primary teardown Khadem Ullah
  2025-09-10 17:34 ` Stephen Hemminger
@ 2025-09-11 10:25 ` Khadem Ullah
  2025-09-11 17:53   ` Stephen Hemminger
  2025-09-11 23:50   ` Stephen Hemminger
  1 sibling, 2 replies; 9+ messages in thread
From: Khadem Ullah @ 2025-09-11 10:25 UTC (permalink / raw)
  To: Aman Singh, Anatoly Burakov, Ajit Khaparde, Lijun Ou,
	Ferruh Yigit, Andrew Rybchenko
  Cc: dev, Khadem Ullah, stable

When the secondary process testpmd application running any fwd_engine
and after that primary has exited will cause a crash.

This patch forces secondary process forwarding lcores
in fwd_engine to stop before the primary process exits.

Fixes: a550baf24af90f ("app/testpmd: support multi-process")
Cc: stable@dpdk.org

Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
---
 app/test-pmd/testpmd.c | 65 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 61 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0f58a31eb5..c325e3a7cb 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -102,9 +102,17 @@
 uint16_t verbose_level = 0; /**< Silent by default. */
 int testpmd_logtype; /**< Log type for testpmd logs */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* Maximum delay for exiting after primary process. */
-#define MONITOR_INTERVAL (500 * 1000)
-
+#define MONITOR_INTERVAL (500)
+#define STR_SIZE 128
+static const char *_MSG_POOL = "MSG_POOL";
+static const char *_SEC_2_PRI = "SEC_2_PRI";
+static const char *_PRI_2_SEC = "PRI_2_SEC";
+
+struct rte_ring *send_ring, *recv_ring;
+struct rte_mempool *message_pool;
+#endif
 /* use main core for command line ? */
 uint8_t interactive = 0;
 uint8_t auto_start = 0;
@@ -2563,7 +2571,8 @@ stop_packet_forwarding(void)
 	for (lc_id = 0; lc_id < cur_fwd_config.nb_fwd_lcores; lc_id++)
 		fwd_lcores[lc_id]->stopped = 1;
 	printf("\nWaiting for lcores to finish...\n");
-	rte_eal_mp_wait_lcore();
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		rte_eal_mp_wait_lcore();
 	port_fwd_end = cur_fwd_config.fwd_eng->port_fwd_end;
 	if (port_fwd_end != NULL) {
 		for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
@@ -3634,6 +3643,18 @@ pmd_test_exit(void)
 			printf("\nStopping port %d...\n", pt_id);
 			fflush(stdout);
 			stop_port(pt_id);
+
+#ifndef RTE_EXEC_ENV_WINDOWS
+			printf("Stopping secondary processes ...\n");
+			void *msg = NULL;
+			if (rte_mempool_get(message_pool, &msg) < 0)
+				rte_panic("Failed to get message buffer\n");
+			strlcpy((char *)msg, "stop", STR_SIZE);
+			if (rte_ring_enqueue(send_ring, msg) < 0) {
+				printf("Failed to send message - message discarded\n");
+				rte_mempool_put(message_pool, msg);
+			}
+#endif
 		}
 		RTE_ETH_FOREACH_DEV(pt_id) {
 			printf("\nShutting down port %d...\n", pt_id);
@@ -4370,8 +4391,19 @@ signal_handler(int signum __rte_unused)
 static void
 monitor_primary(void *arg __rte_unused)
 {
+	void *msg;
 	if (rte_eal_primary_proc_alive(NULL)) {
-		rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary, NULL);
+		if (rte_ring_dequeue(recv_ring, &msg) < 0) {
+			rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary, NULL);
+		} else {
+			/* Stopping any number of secondary processes fwd_egines */
+			recv_ring->prod.head = 0;
+			recv_ring->prod.tail = 0;
+			rte_mempool_put(message_pool, msg);
+			stop_packet_forwarding();
+			fprintf(stderr, "\nPrimary process is no longer active exiting...\n");
+			exit(EXIT_FAILURE);
+		}
 	} else {
 		/*
 		 * If primary process exits, then all the device information
@@ -4429,9 +4461,34 @@ main(int argc, char** argv)
 			 rte_strerror(rte_errno));
 
 #ifndef RTE_EXEC_ENV_WINDOWS
+	unsigned int flags = 0;
+	unsigned int ring_size = 64;
+	unsigned int pool_size = 1024;
+	unsigned int pool_cache = 32;
+	unsigned int priv_data_sz = 0;
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
 	    enable_primary_monitor() < 0)
 		rte_exit(EXIT_FAILURE, "Cannot setup primary monitor");
+			/* Start of ring structure. 8< */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		send_ring = rte_ring_create(_PRI_2_SEC, ring_size, rte_socket_id(), flags);
+		recv_ring = rte_ring_create(_SEC_2_PRI, ring_size, rte_socket_id(), flags);
+		message_pool = rte_mempool_create(_MSG_POOL, pool_size,
+				STR_SIZE, pool_cache, priv_data_sz,
+				NULL, NULL, NULL, NULL,
+				rte_socket_id(), flags);
+	} else {
+		recv_ring = rte_ring_lookup(_PRI_2_SEC);
+		send_ring = rte_ring_lookup(_SEC_2_PRI);
+		message_pool = rte_mempool_lookup(_MSG_POOL);
+	}
+	/* >8 End of ring structure. */
+	if (send_ring == NULL)
+		rte_exit(EXIT_FAILURE, "Problem getting sending ring\n");
+	if (recv_ring == NULL)
+		rte_exit(EXIT_FAILURE, "Problem getting receiving ring\n");
+	if (message_pool == NULL)
+		rte_exit(EXIT_FAILURE, "Problem getting message pool\n");
 #endif
 
 	/* allocate port structures, and init them */
-- 
2.27.0


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

* Re: [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-11 10:25 ` [PATCH v2] " Khadem Ullah
@ 2025-09-11 17:53   ` Stephen Hemminger
  2025-09-11 18:51     ` Khadem Ullah
                       ` (2 more replies)
  2025-09-11 23:50   ` Stephen Hemminger
  1 sibling, 3 replies; 9+ messages in thread
From: Stephen Hemminger @ 2025-09-11 17:53 UTC (permalink / raw)
  To: Khadem Ullah
  Cc: Aman Singh, Anatoly Burakov, Ajit Khaparde, Lijun Ou,
	Ferruh Yigit, Andrew Rybchenko, dev, stable

On Thu, 11 Sep 2025 03:25:01 -0700
Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote:

> When the secondary process testpmd application running any fwd_engine
> and after that primary has exited will cause a crash.
> 
> This patch forces secondary process forwarding lcores
> in fwd_engine to stop before the primary process exits.
> 
> Fixes: a550baf24af90f ("app/testpmd: support multi-process")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>

NAK
As you said, you did not test it on Windows, yet you added #ifdef
for Windows support. Since Windows doesn't support secondary
processes (yet) how could you.

Adding Windows here has to wait until it can be tested.

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

* Re: [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-11 17:53   ` Stephen Hemminger
@ 2025-09-11 18:51     ` Khadem Ullah
  2025-09-11 19:00     ` Khadem Ullah
  2025-09-11 19:23     ` Khadem Ullah
  2 siblings, 0 replies; 9+ messages in thread
From: Khadem Ullah @ 2025-09-11 18:51 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Aman Singh, Anatoly Burakov, Ajit Khaparde, Lijun Ou,
	Ferruh Yigit, Andrew Rybchenko, dev, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

Hi Stephen,

On Thu, Sep 11, 2025, 22:53 Stephen Hemminger <stephen@networkplumber.org>
wrote:

>
> NAK
> As you said, you did not test it on Windows, yet you added #ifdef
> for Windows support. Since Windows doesn't support secondary
> processes (yet) how could you.
>
> Adding Windows here has to wait until it can be tested.
>
I have tested only on Linux, all the codes are under #ifndef i.e., if
window support environment is not defined.

>

[-- Attachment #2: Type: text/html, Size: 993 bytes --]

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

* Re: [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-11 17:53   ` Stephen Hemminger
  2025-09-11 18:51     ` Khadem Ullah
@ 2025-09-11 19:00     ` Khadem Ullah
  2025-09-11 19:23     ` Khadem Ullah
  2 siblings, 0 replies; 9+ messages in thread
From: Khadem Ullah @ 2025-09-11 19:00 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Aman Singh, Anatoly Burakov, Ajit Khaparde, Lijun Ou,
	Ferruh Yigit, Andrew Rybchenko, dev, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

Hi,


On Thu, Sep 11, 2025, 22:53 Stephen Hemminger <stephen@networkplumber.org>
wrote:

> On Thu, 11 Sep 2025 03:25:01 -0700
> Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote:
>
> > When the secondary process testpmd application running any fwd_engine
> > and after that primary has exited will cause a crash.
> >
> > This patch forces secondary process forwarding lcores
> > in fwd_engine to stop before the primary process exits.
> >
> > Fixes: a550baf24af90f ("app/testpmd: support multi-process")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
>
> NAK
> As you said, you did not test it on Windows, yet you added #ifdef
> for Windows support. Since Windows doesn't support secondary
> processes (yet) how could you.
>
> Adding Windows here has to wait until it can be tested.
>
Can you please double check the code?
I have used the following macro everywhere which means the code is only
targeted to Linux.
#ifndef RTE_EXEC_ENV_WINDOWS

I will add a newer version to if you agree to add additional comments to
further clarify that the solution is only targeted for Linux.

Best regards,
Khadem

>

[-- Attachment #2: Type: text/html, Size: 2200 bytes --]

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

* Re: [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-11 17:53   ` Stephen Hemminger
  2025-09-11 18:51     ` Khadem Ullah
  2025-09-11 19:00     ` Khadem Ullah
@ 2025-09-11 19:23     ` Khadem Ullah
  2 siblings, 0 replies; 9+ messages in thread
From: Khadem Ullah @ 2025-09-11 19:23 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Aman Singh, Anatoly Burakov, Ajit Khaparde, Lijun Ou,
	Ferruh Yigit, Andrew Rybchenko, dev, dpdk stable,
	Thomas Monjalon, Bruce Richardson

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

Hi Thomas,

On Thu, Sep 11, 2025, 22:53 Stephen Hemminger <stephen@networkplumber.org>
wrote:

> On Thu, 11 Sep 2025 03:25:01 -0700
> Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote:
>
> > When the secondary process testpmd application running any fwd_engine
> > and after that primary has exited will cause a crash.
> >
> > This patch forces secondary process forwarding lcores
> > in fwd_engine to stop before the primary process exits.
> >
> > Fixes: a550baf24af90f ("app/testpmd: support multi-process")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
>
> NAK
> As you said, you did not test it on Windows, yet you added #ifdef
> for Windows support. Since Windows doesn't support secondary
> processes (yet) how could you.
>
> Adding Windows here has to wait until it can be tested.
>
Can you please check if my understanding is correct that #ifndef
RTE_EXEC_ENV_WINDOWS means only Linux based systems ?
I have added all the codes under this macro :)


Best regards,
Khadem

>

[-- Attachment #2: Type: text/html, Size: 2023 bytes --]

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

* Re: [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown
  2025-09-11 10:25 ` [PATCH v2] " Khadem Ullah
  2025-09-11 17:53   ` Stephen Hemminger
@ 2025-09-11 23:50   ` Stephen Hemminger
  1 sibling, 0 replies; 9+ messages in thread
From: Stephen Hemminger @ 2025-09-11 23:50 UTC (permalink / raw)
  To: Khadem Ullah
  Cc: Aman Singh, Anatoly Burakov, Ajit Khaparde, Lijun Ou,
	Ferruh Yigit, Andrew Rybchenko, dev, stable

On Thu, 11 Sep 2025 03:25:01 -0700
Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote:

> When the secondary process testpmd application running any fwd_engine
> and after that primary has exited will cause a crash.
> 
> This patch forces secondary process forwarding lcores
> in fwd_engine to stop before the primary process exits.
> 
> Fixes: a550baf24af90f ("app/testpmd: support multi-process")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>

Ok, the Windows #ifdef was confusing me then looked more closely.
This patch is adding a set of rings so that primary and secondary
can communicate, the adding one command.

The idea is good, but there is a better way to handle this.
There already exists a way for primary and secondary to communicate
through the mp service. This is used for hotplug and pdump and probably
other things as well.

The communication can be either way, for example I proposed patches
to pdump so that primary can tell secondary to participate.

https://patchwork.dpdk.org/project/dpdk/patch/20250814165307.12786-7-stephen@networkplumber.org/

This of testpmd can be done in similar way.
The handler in secondary should be able to act same as
when SIGINT is received. Set the flag f_exit which will cause the main
loop to exit.

This can then happen immediately, and the proc monitor alarm function
is only then needed to handle when primary process crashes.



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

end of thread, other threads:[~2025-09-11 23:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-10 11:02 [PATCH] app/testpmd: stop secondary process fwd_lcores during primary teardown Khadem Ullah
2025-09-10 17:34 ` Stephen Hemminger
2025-09-10 18:16   ` Khadem Ullah
2025-09-11 10:25 ` [PATCH v2] " Khadem Ullah
2025-09-11 17:53   ` Stephen Hemminger
2025-09-11 18:51     ` Khadem Ullah
2025-09-11 19:00     ` Khadem Ullah
2025-09-11 19:23     ` Khadem Ullah
2025-09-11 23:50   ` Stephen Hemminger

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