Also, make sure to start the actual text at the margin.
=======================================================
+* eal: The experimental TLS API added in ``rte_thread.h`` has been renamed
+ from ``rte_thread_tls_*`` to ``rte_thread_*`` to avoid naming redundancy
+ and confusion with the transport layer security term.
+
ABI Changes
-----------
#include <rte_thread.h>
/* Key of thread specific flow workspace data. */
-static rte_tls_key key_workspace;
+static rte_thread_key key_workspace;
int
mlx5_flow_os_init_workspace_once(void)
{
- if (rte_thread_tls_key_create(&key_workspace, flow_release_workspace)) {
+ if (rte_thread_key_create(&key_workspace, flow_release_workspace)) {
DRV_LOG(ERR, "Can't create flow workspace data thread key.");
return -ENOMEM;
}
void *
mlx5_flow_os_get_specific_workspace(void)
{
- return rte_thread_tls_value_get(key_workspace);
+ return rte_thread_value_get(key_workspace);
}
int
mlx5_flow_os_set_specific_workspace(struct mlx5_flow_workspace *data)
{
- return rte_thread_tls_value_set(key_workspace, data);
+ return rte_thread_value_set(key_workspace, data);
}
void
mlx5_flow_os_release_workspace(void)
{
- rte_thread_tls_key_delete(key_workspace);
+ rte_thread_key_delete(key_workspace);
}
*/
static struct mlx5_workspace_thread *curr;
static struct mlx5_workspace_thread *first;
-rte_tls_key ws_tls_index;
+rte_thread_key ws_tls_index;
static pthread_mutex_t lock_thread_list;
static bool
flow_release_workspace(first->mlx5_ws);
free(first);
}
- rte_thread_tls_key_delete(ws_tls_index);
+ rte_thread_key_delete(ws_tls_index);
pthread_mutex_destroy(&lock_thread_list);
}
int
mlx5_flow_os_init_workspace_once(void)
{
- int err = rte_thread_tls_key_create(&ws_tls_index, NULL);
+ int err = rte_thread_key_create(&ws_tls_index, NULL);
if (err) {
DRV_LOG(ERR, "Can't create flow workspace data thread key.");
void *
mlx5_flow_os_get_specific_workspace(void)
{
- return rte_thread_tls_value_get(ws_tls_index);
+ return rte_thread_value_get(ws_tls_index);
}
int
int old_err = rte_errno;
rte_errno = 0;
- if (!rte_thread_tls_value_get(ws_tls_index)) {
+ if (!rte_thread_value_get(ws_tls_index)) {
if (rte_errno) {
DRV_LOG(ERR, "Failed checking specific workspace.");
rte_errno = old_err;
return -1;
}
}
- if (rte_thread_tls_value_set(ws_tls_index, data)) {
+ if (rte_thread_value_set(ws_tls_index, data)) {
DRV_LOG(ERR, "Failed setting specific workspace.");
err = -1;
}
/**
* TLS key type, an opaque pointer.
*/
-typedef struct eal_tls_key *rte_tls_key;
+typedef struct eal_tls_key *rte_thread_key;
#ifdef RTE_HAS_CPUSET
*/
__rte_experimental
-int rte_thread_tls_key_create(rte_tls_key *key, void (*destructor)(void *));
+int rte_thread_key_create(rte_thread_key *key,
+ void (*destructor)(void *));
/**
* Delete a TLS data key visible to all threads in the process.
*
* @param key
- * The key allocated by rte_thread_tls_key_create().
+ * The key allocated by rte_thread_key_create().
*
* @return
* On success, zero.
* ENOEXEC - Specific OS error.
*/
__rte_experimental
-int rte_thread_tls_key_delete(rte_tls_key key);
+int rte_thread_key_delete(rte_thread_key key);
/**
* Set value bound to the TLS key on behalf of the calling thread.
*
* @param key
- * The key allocated by rte_thread_tls_key_create().
+ * The key allocated by rte_thread_key_create().
* @param value
- * The value bound to the rte_tls_key key for the calling thread.
+ * The value bound to the rte_thread_key key for the calling thread.
*
* @return
* On success, zero.
* ENOEXEC - Specific OS error.
*/
__rte_experimental
-int rte_thread_tls_value_set(rte_tls_key key, const void *value);
+int rte_thread_value_set(rte_thread_key key, const void *value);
/**
* Get value bound to the TLS key on behalf of the calling thread.
*
* @param key
- * The key allocated by rte_thread_tls_key_create().
+ * The key allocated by rte_thread_key_create().
*
* @return
* On success, value data pointer (can also be NULL).
* ENOEXEC - Specific OS error.
*/
__rte_experimental
-void *rte_thread_tls_value_get(rte_tls_key key);
+void *rte_thread_value_get(rte_thread_key key);
#ifdef __cplusplus
}
rte_vect_get_max_simd_bitwidth
rte_vect_set_max_simd_bitwidth
- rte_thread_tls_key_create
- rte_thread_tls_key_delete
- rte_thread_tls_value_get
- rte_thread_tls_value_set
+ rte_thread_key_create
+ rte_thread_key_delete
+ rte_thread_value_get
+ rte_thread_value_set
rte_mem_lock
rte_mem_map
};
int
-rte_thread_tls_key_create(rte_tls_key *key, void (*destructor)(void *))
+rte_thread_key_create(rte_thread_key *key, void (*destructor)(void *))
{
int err;
}
int
-rte_thread_tls_key_delete(rte_tls_key key)
+rte_thread_key_delete(rte_thread_key key)
{
int err;
}
int
-rte_thread_tls_value_set(rte_tls_key key, const void *value)
+rte_thread_value_set(rte_thread_key key, const void *value)
{
int err;
}
void *
-rte_thread_tls_value_get(rte_tls_key key)
+rte_thread_value_get(rte_thread_key key)
{
if (!key) {
RTE_LOG(DEBUG, EAL, "Invalid TLS key.\n");
rte_power_monitor;
rte_power_monitor_wakeup;
rte_power_pause;
- rte_thread_tls_key_create;
- rte_thread_tls_key_delete;
- rte_thread_tls_value_get;
- rte_thread_tls_value_set;
# added in 21.05
+ rte_thread_key_create;
+ rte_thread_key_delete;
+ rte_thread_value_get;
+ rte_thread_value_set;
rte_version_minor;
rte_version_month;
rte_version_prefix;
};
int
-rte_thread_tls_key_create(rte_tls_key *key,
+rte_thread_key_create(rte_thread_key *key,
__rte_unused void (*destructor)(void *))
{
*key = malloc(sizeof(**key));
}
int
-rte_thread_tls_key_delete(rte_tls_key key)
+rte_thread_key_delete(rte_thread_key key)
{
if (!key) {
RTE_LOG(DEBUG, EAL, "Invalid TLS key.\n");
}
int
-rte_thread_tls_value_set(rte_tls_key key, const void *value)
+rte_thread_value_set(rte_thread_key key, const void *value)
{
char *p;
}
void *
-rte_thread_tls_value_get(rte_tls_key key)
+rte_thread_value_get(rte_thread_key key)
{
void *output;