[dpdk-dev] [PATCH v9 2/2] eal: add generic thread-local-storage functions

Medvedkin, Vladimir vladimir.medvedkin at intel.com
Wed Feb 10 15:26:33 CET 2021


Hi Tal,

On 10/02/2021 13:33, Burakov, Anatoly wrote:
> On 06-Jan-21 8:35 PM, Tal Shnaiderman wrote:
>> Add support for TLS functionality in EAL.
>>
>> The following functions are added:
>> rte_thread_tls_key_create - create a TLS data key.
>> rte_thread_tls_key_delete - delete a TLS data key.
>> rte_thread_tls_value_set - set value bound to the TLS key
>> rte_thread_tls_value_get - get value bound to the TLS key
>>
>> TLS key is defined by the new type rte_tls_key.

I would suggest changing rte_tls_key to rte_thread_tls_key so that it is 
consistent with the API and not confused with transport layer security.

>>
>> The API allocates the thread local storage (TLS) key.
>> Any thread of the process can subsequently use this key
>> to store and retrieve values that are local to the thread.
>>
>> Those functions are added in addition to TLS capability
>> in rte_per_lcore.h to allow abstraction of the pthread
>> layer for all operating systems.
>>
>> Windows implementation is under librte_eal/windows and
>> implemented using WIN32 API for Windows only.
>>
>> Unix implementation is under librte_eal/unix and
>> implemented using pthread for UNIX compilation.
>>
>> Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
>> ---
> 

-- 
Regards,
Vladimir


More information about the dev mailing list