Accessing TLS for EAL threads

Pavel Vazharov freakpv at gmail.com
Thu Nov 18 08:36:02 CET 2021


Hi there,

I think the DPDK uses the pthread_ functions to manages its threads. You
can see in `rte_eal_init` in `lib/librte_eal/linux/eal.c` that it "spawns"
the threads using
```
        /* create a thread for each lcore */

        ret = pthread_create(&lcore_config[i].thread_id, NULL,

                     eal_thread_loop, NULL);
```
So I think you should be able to use other pthread_ functions without
problems from inside the EAL threads.
Hope that helps.

Regards,
Pavel.

On Thu, Nov 18, 2021 at 9:24 AM Antonio Di Bacco <
antonio.di-bacco at keysight.com> wrote:

> I need to emulate the pthread_setspecific and pthread_getspecific for EAL
> threads. I don’t find any suitable APIs in the DPDK to access the TLS and
> get and set keys.
>
>
>
> I launched a number of threads using the rte_eal_remote launch but I don’t
> find any API that allows me to access the TLS for those threads.
>
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20211118/5c668299/attachment.htm>


More information about the users mailing list