net/mlx5: allocate list memory in create function
[dpdk.git] / drivers / net / mlx5 / linux / mlx5_flow_os.c
index 732b1b2..893f00b 100644 (file)
@@ -7,12 +7,12 @@
 #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;
        }
@@ -22,17 +22,17 @@ mlx5_flow_os_init_workspace_once(void)
 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);
 }