* [dpdk-dev] Can pthread_create be called directly in a dpdk application? @ 2015-08-14 10:13 Rajesh R 2015-08-14 10:18 ` Bruce Richardson 0 siblings, 1 reply; 3+ messages in thread From: Rajesh R @ 2015-08-14 10:13 UTC (permalink / raw) To: dev I am relatively new to dpdk. I could make the examples work. Now I am experimenting with a traffic measurement application which capture packets using dpdk. The application requires few other threads apart from the rte_threads. If I put the code for thread creation (pthread_create()) before calling eal_rte_init and remote_launch, the rte_init/remote launch is not proceeding. But if I put the eal_rte_init()/remote_launch first it is working, but coee will wait there and would not proceed to the subsequent lines How to do it correctly? -- Regards Rajesh R ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] Can pthread_create be called directly in a dpdk application? 2015-08-14 10:13 [dpdk-dev] Can pthread_create be called directly in a dpdk application? Rajesh R @ 2015-08-14 10:18 ` Bruce Richardson 2015-08-15 6:47 ` Rajesh R 0 siblings, 1 reply; 3+ messages in thread From: Bruce Richardson @ 2015-08-14 10:18 UTC (permalink / raw) To: Rajesh R; +Cc: dev On Fri, Aug 14, 2015 at 06:13:46AM -0400, Rajesh R wrote: > I am relatively new to dpdk. I could make the examples work. > > Now I am experimenting with a traffic measurement application which capture > packets using dpdk. The application requires few other threads apart from > the rte_threads. > If I put the code for thread creation (pthread_create()) before calling > eal_rte_init and remote_launch, the rte_init/remote launch is not > proceeding. But if I put the eal_rte_init()/remote_launch first it is > working, but coee will wait there and would not proceed to the subsequent > lines > > How to do it correctly? > > -- Hi Rajesh there should be no issues with spawning extra threads using pthread_create in your application. Can you provide a few more specifics and perhaps snippets of code which exhibit the problem. For example, when spawning the threads before init and remote launch - can you clarify in what way it is "not proceding"? Does it do nothing, does it hang, does it crash etc.? Similarly, putting the pthread later, where exactly does it wait? Does gdb show anything of interest, or show more specifics as to what the thread is waiting on? Regards, /Bruce ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] Can pthread_create be called directly in a dpdk application? 2015-08-14 10:18 ` Bruce Richardson @ 2015-08-15 6:47 ` Rajesh R 0 siblings, 0 replies; 3+ messages in thread From: Rajesh R @ 2015-08-15 6:47 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev On Fri, Aug 14, 2015 at 3:48 PM, Bruce Richardson < bruce.richardson@intel.com> wrote: > On Fri, Aug 14, 2015 at 06:13:46AM -0400, Rajesh R wrote: > > I am relatively new to dpdk. I could make the examples work. > > > > Now I am experimenting with a traffic measurement application which > capture > > packets using dpdk. The application requires few other threads apart from > > the rte_threads. > > If I put the code for thread creation (pthread_create()) before calling > > eal_rte_init and remote_launch, the rte_init/remote launch is not > > proceeding. But if I put the eal_rte_init()/remote_launch first it is > > working, but coee will wait there and would not proceed to the subsequent > > lines > > > > How to do it correctly? > > > > -- > Hi Rajesh > > there should be no issues with spawning extra threads using pthread_create > in > your application. Can you provide a few more specifics and perhaps > snippets of > code which exhibit the problem. For example, when spawning the threads > before > init and remote launch - can you clarify in what way it is "not > proceding"? Does > it do nothing, does it hang, does it crash etc.? Similarly, putting the > pthread later, where exactly does it wait? Does gdb show anything of > interest, > or show more specifics as to what the thread is waiting on? > > Regards, > /Bruce > Hi Bruce, Thanks for a quick reply. Sory it was my mistake. I realized I was doing the mistake of putting the pthread_join()/rte_eal_wait_lcore() before the next segment of code and the control was waiting there. Now by moving those waiting part to the end of the complete code I could make it work. It works in either ways, putting pthread_create() first or rte_eal_remote_launch() first. Thanks a lot. Regards Rajesh R ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-15 6:47 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-08-14 10:13 [dpdk-dev] Can pthread_create be called directly in a dpdk application? Rajesh R 2015-08-14 10:18 ` Bruce Richardson 2015-08-15 6:47 ` Rajesh R
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).