+ struct mlx5_list_entry *entry;
+ int lcore_index = rte_lcore_index(rte_lcore_id());
+
+ if (unlikely(lcore_index == -1)) {
+ lcore_index = MLX5_LIST_NLCORE;
+ rte_spinlock_lock(&list->l_const.lcore_lock);
+ }
+ entry = _mlx5_list_register(&list->l_inconst, &list->l_const, ctx,
+ lcore_index);
+ if (unlikely(lcore_index == MLX5_LIST_NLCORE))
+ rte_spinlock_unlock(&list->l_const.lcore_lock);
+ return entry;