Re: [dpdk-dev] [PATCH v4] eal: add generic thread-local-storage functions

2020-12-23 Thread Dmitry Kozlyuk
On Wed, 23 Dec 2020 11:44:31 +, Tal Shnaiderman wrote: > > > diff --git a/lib/librte_eal/windows/meson.build > > > b/lib/librte_eal/windows/meson.build > > > index 3b2faf29eb..1f1398dfe9 100644 > > > --- a/lib/librte_eal/windows/meson.build > > > +++ b/lib/librte_eal/windows/meson.build > > > @

Re: [dpdk-dev] [PATCH v4] eal: add generic thread-local-storage functions

2020-12-23 Thread Tal Shnaiderman
> Subject: Re: [PATCH v4] eal: add generic thread-local-storage functions > > External email: Use caution opening links or attachments > > > > [...] > > +int > > +rte_thread_tls_set_value(rte_tls_key key, const void *value) { > > + int err; > > + > > + if (!key) { > > + RTE_L

Re: [dpdk-dev] [PATCH v4] eal: add generic thread-local-storage functions

2020-12-22 Thread Dmitry Kozlyuk
> [...] > +int > +rte_thread_tls_set_value(rte_tls_key key, const void *value) > +{ > + int err; > + > + if (!key) { > + RTE_LOG(DEBUG, EAL, "invalid tls key passed to function.\n"); > + return -1; > + } > + err = pthread_setspecific(key->thread_index, value)

[dpdk-dev] [PATCH v4] eal: add generic thread-local-storage functions

2020-12-21 Thread Tal Shnaiderman
Add support for tls functionality in EAL. The following functions are added: rte_thread_tls_create_key - function to create a tls data key. rte_thread_tls_delete_key - function to delete a tls data key. rte_thread_tls_set_value - function to set value bound to the tls key rte_thread_tls_get_value