Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Khadem Ullah
Hi Vipin, Thank you for understanding! As Stephen mentioned: "There is no easy way to handle the case where primary crashes; leaving secondary process with invalid data (dangling pointers)." Best regards, Khadem

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Varghese, Vipin
[Public] Hi Khadem, Please do not use `sorry for any confusion`. Very clearly, I shared what works and why your case is different. Snipped Hi Vipin, sorry for any confusion. I am only trying to explain that these patches are in its final state (waiting to upstream). [VV] it is not about the s

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Khadem Ullah
Hi Vipin, sorry for any confusion. I am only trying to explain that these patches are in its final state (waiting to upstream). You have provided your valuable insights and I am very thankful for that. There was much discussion about these patches from start to finish. Already mentioned that with

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Varghese, Vipin
[Public] HI, Snipped Hi, You can create a simple setup with only running testpmd with primary and another testpmd with secondary and then see the results. No, the reason for the primary process termination could be close or shutdown (ctrl + c or ctrl + q) or any other. The reason is clear: "I

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Khadem Ullah
Hi, You can create a simple setup with only running testpmd with primary and another testpmd with secondary and then see the results. No, the reason for the primary process termination could be close or shutdown (ctrl + c or ctrl + q) or any other. The reason is clear: "In secondary processes, ac

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Varghese, Vipin
[Public] Hi Khadem snipped Hi Vipin, Glad you got the reason. I have only checked it in testpmd, any other application which provides primary-secondary support could also follow the same model. This patch only adds stability and robustness to primary-secondary applications. Primary application

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Khadem Ullah
Hi Vipin, Glad you got the reason. I have only checked it in testpmd, any other application which provides primary-secondary support could also follow the same model. This patch only adds stability and robustness to primary-secondary applications. Primary applications can be closed, quit or shutdow

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Varghese, Vipin
[Public] Hi Stepehen, Thank you for sharing Snipped > > > On Fri, 8 Aug 2025 07:49:09 -0400 > Khadem Ullah <14pwcse1...@uetpeshawar.edu.pk> wrote: > > > The crashes are on 22.11, 23.03, 24.11, it is on all dpdk stable versions > > and 25.07 > as well. > > Please first close primary testpmd be

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-11 Thread Varghese, Vipin
[AMD Official Use Only - AMD Internal Distribution Only] Thank you for sharing the details in this thread, Snipped > > > The crashes are on 22.11, 23.03, 24.11, it is on all dpdk stable versions and > 25.07 > as well. > Please first close primary testpmd before secondary testpmd application and

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-08 Thread Khadem Ullah
Now, it is much clearer from the diagram that we do not need any cleanup in the secondary process if the primary has already been done! Thanks again for the help!

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-08 Thread Stephen Hemminger
On Fri, 8 Aug 2025 07:49:09 -0400 Khadem Ullah <14pwcse1...@uetpeshawar.edu.pk> wrote: > The crashes are on 22.11, 23.03, 24.11, it is on all dpdk stable versions and > 25.07 as well. > Please first close primary testpmd before secondary testpmd application > and try to close secondary or exec

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-08 Thread Stephen Hemminger
se1...@uetpeshawar.edu.pk> > > Sent: Monday, August 4, 2025 5:03 PM > > To: step...@networkplumber.org; tho...@monjalon.net; Yigit, Ferruh > > ; andrew.rybche...@oktetlabs.ru > > Cc: dev@dpdk.org; sta...@dpdk.org; Khadem Ullah > > <14pwcse1...@uetpeshawar.edu.pk>

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-08 Thread Khadem Ullah
Hi Stephen, Thanks for the feedback. So, it means the patch is perfect in the current state (i.e., v7)? Best Regards, Khadem

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-08 Thread Stephen Hemminger
On Fri, 8 Aug 2025 01:44:52 -0400 Khadem Ullah <14pwcse1...@uetpeshawar.edu.pk> wrote: > * run into use after free. > */ > + int ret; > fprintf(stderr, "\nPrimary process is no longer active, > exiting...\n"); > + ret

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-08 Thread Khadem Ullah
The crashes are on 22.11, 23.03, 24.11, it is on all dpdk stable versions and 25.07 as well. Please first close primary testpmd before secondary testpmd application and try to close secondary or execute any of the following commands, "show device info all show port stats all show port xstats

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-08 Thread Varghese, Vipin
[Public] Hi Khadem, Snipped > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Hi Vipin Varghese, > Thank you for your feedback! > > Yes we need graceful exit, directly calling eal_cleanup from seconda

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-07 Thread Khadem Ullah
Hi Vipin Varghese, Thank you for your feedback! Yes we need graceful exit, directly calling eal_cleanup from secondary was not working, we can do the following workaround to use `eal_cleanup`. diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index b7affa6da9..5ef6008a3c 100644 ---

RE: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-07 Thread Varghese, Vipin
onjalon.net; Yigit, Ferruh > ; andrew.rybche...@oktetlabs.ru > Cc: dev@dpdk.org; sta...@dpdk.org; Khadem Ullah > <14pwcse1...@uetpeshawar.edu.pk> > Subject: [PATCH v7] app/testpmd: monitor state of primary process when using > secondary > > Caution: This message originate

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-04 Thread fengchengwen
Acked-by: Chengwen Feng On 8/4/2025 7:33 PM, Khadem Ullah wrote: > In secondary processes, accessing device after primary has exited > will cause crash. > > This patch adds a mechanism in testpmd to monitor the primary process > from the secondary process. > When primary process exits it forces

Re: [PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-04 Thread Stephen Hemminger
On Mon, 4 Aug 2025 07:33:22 -0400 Khadem Ullah <14pwcse1...@uetpeshawar.edu.pk> wrote: > In secondary processes, accessing device after primary has exited > will cause crash. > > This patch adds a mechanism in testpmd to monitor the primary process > from the secondary process. > When primary pr

[PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-04 Thread Khadem Ullah
In secondary processes, accessing device after primary has exited will cause crash. This patch adds a mechanism in testpmd to monitor the primary process from the secondary process. When primary process exits it forces secondary to exit avoiding issues from cleanup logic. Fixes: a550baf24af9 ('ap

[PATCH v7] app/testpmd: monitor state of primary process when using secondary

2025-08-04 Thread Khadem Ullah
In secondary processes, accessing device after primary has exited will cause crash. This patch adds a mechanism in testpmd to monitor the primary process from the secondary process. When primary process exits it forces secondary to exit avoiding issues from cleanup logic. Fixes: a550baf24af9 ('ap