Re: [vpp-dev] query on use_pthread in startup.conf
Thanks Damjan . l was trying that because I want to move threads to other partition.At the system start if main core is associated with some control core group worker thread inherits this from parent thread and later set affinity fails if you try to move worker thread to different partition. Hence wanted to explore pthread with dpdk .is there any way where we can specify worker thread group association ? Regards, Bindiya On Wed, May 23, 2018 at 9:31 PM, Damjan Marion wrote: > You cannot do that if you use DPDK. If you disable DPDK you will get all > worker threads started as pthreads. > > And to be even more precise, DPDK threads are also pthreads, they just > come with some extra stuff. > > What do you want to achieve? > > — > Damjan > > On 17 May 2018, at 13:43, bindiya Kurle wrote: > > Hi all, > I am tried to use use_pthread in startup.conf.but still it takes > Tried following option for creating multiple threads > > cpu { > use-pthreads > >main-core 1 >corelist-workers 2,3 > } > > With this config , code always hit else part of below config , > file : src/vlib/threads.c > > if (tr->use_pthreads || tm->use_pthreads) > { > > for (j = 0; j < tr->count; j++) > { > w = vlib_worker_threads + worker_thread_index++; > err = vlib_launch_thread_int (vlib_worker_thread_bootstrap_ > fn, > w, 0); > if (err) > clib_error_report (err); > } > > } > > > > > > > > > > > *else{ uword c; /* *INDENT-OFF* */ > clib_bitmap_foreach (c, tr->coremask, ({w = vlib_worker_threads > + worker_thread_index++;err = vlib_launch_thread_int > (vlib_worker_thread_bootstrap_fn, > w, c);if (err) clib_error_report (err); > }));* > /* *INDENT-ON* */ > } > > Can somebody help how can I create multiple thread using pthread instead > dpdk_launch_thread? > > > Regards, > Bindiya > > >
Re: [vpp-dev] query on use_pthread in startup.conf
You cannot do that if you use DPDK. If you disable DPDK you will get all worker threads started as pthreads. And to be even more precise, DPDK threads are also pthreads, they just come with some extra stuff. What do you want to achieve? — Damjan > On 17 May 2018, at 13:43, bindiya Kurlewrote: > > Hi all, > I am tried to use use_pthread in startup.conf.but still it takes > Tried following option for creating multiple threads > > cpu { > use-pthreads > >main-core 1 >corelist-workers 2,3 > } > > With this config , code always hit else part of below config , > file : src/vlib/threads.c > > if (tr->use_pthreads || tm->use_pthreads) > { > > for (j = 0; j < tr->count; j++) > { > w = vlib_worker_threads + worker_thread_index++; > err = vlib_launch_thread_int (vlib_worker_thread_bootstrap_fn, > w, 0); > if (err) > clib_error_report (err); > } > > } > else > { > uword c; > /* *INDENT-OFF* */ > clib_bitmap_foreach (c, tr->coremask, ({ > w = vlib_worker_threads + worker_thread_index++; > err = vlib_launch_thread_int (vlib_worker_thread_bootstrap_fn, > w, c); > if (err) > clib_error_report (err); > })); > /* *INDENT-ON* */ > } > > Can somebody help how can I create multiple thread using pthread instead > dpdk_launch_thread? > > > Regards, > Bindiya >
[vpp-dev] query on use_pthread in startup.conf
Hi all, I am tried to use use_pthread in startup.conf.but still it takes Tried following option for creating multiple threads cpu { use-pthreads main-core 1 corelist-workers 2,3 } With this config , code always hit else part of below config , file : src/vlib/threads.c if (tr->use_pthreads || tm->use_pthreads) { for (j = 0; j < tr->count; j++) { w = vlib_worker_threads + worker_thread_index++; err = vlib_launch_thread_int (vlib_worker_thread_bootstrap_fn, w, 0); if (err) clib_error_report (err); } } *else{ uword c; /* *INDENT-OFF* */ clib_bitmap_foreach (c, tr->coremask, ({w = vlib_worker_threads + worker_thread_index++;err = vlib_launch_thread_int (vlib_worker_thread_bootstrap_fn, w, c);if (err) clib_error_report (err); }));* /* *INDENT-ON* */ } Can somebody help how can I create multiple thread using pthread instead dpdk_launch_thread? Regards, Bindiya