uint32_t ret;
while (entry != NULL) {
- if (list->cb_match(list, entry, ctx) == 0) {
+ if (list->cb_match(list->ctx, entry, ctx) == 0) {
if (reuse) {
ret = __atomic_add_fetch(&entry->ref_cnt, 1,
__ATOMIC_RELAXED) - 1;
mlx5_list_cache_insert(struct mlx5_list *list, int lcore_index,
struct mlx5_list_entry *gentry, void *ctx)
{
- struct mlx5_list_entry *lentry = list->cb_clone(list, gentry, ctx);
+ struct mlx5_list_entry *lentry = list->cb_clone(list->ctx, gentry, ctx);
if (unlikely(!lentry))
return NULL;
if (__atomic_load_n(&entry->ref_cnt, __ATOMIC_RELAXED) == 0) {
LIST_REMOVE(entry, next);
if (list->lcores_share)
- list->cb_clone_free(list, entry);
+ list->cb_clone_free(list->ctx, entry);
else
- list->cb_remove(list, entry);
+ list->cb_remove(list->ctx, entry);
inv_cnt--;
}
entry = nentry;
rte_rwlock_read_unlock(&list->lock);
}
/* 3. Prepare new entry for global list and for cache. */
- entry = list->cb_create(list, entry, ctx);
+ entry = list->cb_create(list->ctx, ctx);
if (unlikely(!entry))
return NULL;
entry->ref_cnt = 1u;
list->name, lcore_index, (void *)entry, entry->ref_cnt);
return entry;
}
- local_entry = list->cb_clone(list, entry, ctx);
+ local_entry = list->cb_clone(list->ctx, entry, ctx);
if (unlikely(!local_entry)) {
- list->cb_remove(list, entry);
+ list->cb_remove(list->ctx, entry);
return NULL;
}
local_entry->ref_cnt = 1u;
if (unlikely(oentry)) {
/* 4.5. Found real race!!, reuse the old entry. */
rte_rwlock_write_unlock(&list->lock);
- list->cb_remove(list, entry);
- list->cb_clone_free(list, local_entry);
+ list->cb_remove(list->ctx, entry);
+ list->cb_clone_free(list->ctx, local_entry);
return mlx5_list_cache_insert(list, lcore_index, oentry,
ctx);
}
if (entry->lcore_idx == (uint32_t)lcore_idx) {
LIST_REMOVE(entry, next);
if (list->lcores_share)
- list->cb_clone_free(list, entry);
+ list->cb_clone_free(list->ctx, entry);
else
- list->cb_remove(list, entry);
+ list->cb_remove(list->ctx, entry);
} else if (likely(lcore_idx != -1)) {
__atomic_add_fetch(&list->cache[entry->lcore_idx].inv_cnt, 1,
__ATOMIC_RELAXED);
if (likely(gentry->ref_cnt == 0)) {
LIST_REMOVE(gentry, next);
rte_rwlock_write_unlock(&list->lock);
- list->cb_remove(list, gentry);
+ list->cb_remove(list->ctx, gentry);
__atomic_sub_fetch(&list->count, 1, __ATOMIC_RELAXED);
DRV_LOG(DEBUG, "mlx5 list %s entry %p removed.",
list->name, (void *)gentry);
/**
* Type of callback function for entry removal.
*
- * @param list
- * The mlx5 list.
+ * @param tool_ctx
+ * The tool instance user context.
* @param entry
* The entry in the list.
*/
-typedef void (*mlx5_list_remove_cb)(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
+typedef void (*mlx5_list_remove_cb)(void *tool_ctx,
+ struct mlx5_list_entry *entry);
/**
* Type of function for user defined matching.
*
- * @param list
- * The mlx5 list.
+ * @param tool_ctx
+ * The tool instance context.
* @param entry
* The entry in the list.
* @param ctx
* @return
* 0 if matching, non-zero number otherwise.
*/
-typedef int (*mlx5_list_match_cb)(struct mlx5_list *list,
+typedef int (*mlx5_list_match_cb)(void *tool_ctx,
struct mlx5_list_entry *entry, void *ctx);
-typedef struct mlx5_list_entry *(*mlx5_list_clone_cb)
- (struct mlx5_list *list,
- struct mlx5_list_entry *entry, void *ctx);
+typedef struct mlx5_list_entry *(*mlx5_list_clone_cb)(void *tool_ctx,
+ struct mlx5_list_entry *entry, void *ctx);
-typedef void (*mlx5_list_clone_free_cb)(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
+typedef void (*mlx5_list_clone_free_cb)(void *tool_ctx,
+ struct mlx5_list_entry *entry);
/**
* Type of function for user defined mlx5 list entry creation.
*
- * @param list
- * The mlx5 list.
- * @param entry
- * The new allocated entry, NULL if list entry size unspecified,
- * New entry has to be allocated in callback and return.
+ * @param tool_ctx
+ * The mlx5 tool instance context.
* @param ctx
* The pointer to new entry context.
*
* @return
* Pointer of entry on success, NULL otherwise.
*/
-typedef struct mlx5_list_entry *(*mlx5_list_create_cb)
- (struct mlx5_list *list,
- struct mlx5_list_entry *entry,
- void *ctx);
+typedef struct mlx5_list_entry *(*mlx5_list_create_cb)(void *tool_ctx,
+ void *ctx);
/**
* Linked mlx5 list structure.
void flow_dv_encap_decap_remove_cb(struct mlx5_hlist *list,
struct mlx5_hlist_entry *entry);
-int flow_dv_matcher_match_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry, void *ctx);
-struct mlx5_list_entry *flow_dv_matcher_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
- void *ctx);
-void flow_dv_matcher_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
-
-int flow_dv_port_id_match_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry, void *cb_ctx);
-struct mlx5_list_entry *flow_dv_port_id_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
- void *cb_ctx);
-void flow_dv_port_id_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
-struct mlx5_list_entry *flow_dv_port_id_clone_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx);
-void flow_dv_port_id_clone_free_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused);
-int flow_dv_push_vlan_match_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry, void *cb_ctx);
-struct mlx5_list_entry *flow_dv_push_vlan_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
- void *cb_ctx);
-void flow_dv_push_vlan_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
-struct mlx5_list_entry *flow_dv_push_vlan_clone_cb
- (struct mlx5_list *list,
+int flow_dv_matcher_match_cb(void *tool_ctx, struct mlx5_list_entry *entry,
+ void *ctx);
+struct mlx5_list_entry *flow_dv_matcher_create_cb(void *tool_ctx, void *ctx);
+void flow_dv_matcher_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry);
+
+int flow_dv_port_id_match_cb(void *tool_ctx, struct mlx5_list_entry *entry,
+ void *cb_ctx);
+struct mlx5_list_entry *flow_dv_port_id_create_cb(void *tool_ctx, void *cb_ctx);
+void flow_dv_port_id_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry);
+struct mlx5_list_entry *flow_dv_port_id_clone_cb(void *tool_ctx,
+ struct mlx5_list_entry *entry, void *cb_ctx);
+void flow_dv_port_id_clone_free_cb(void *tool_ctx,
+ struct mlx5_list_entry *entry);
+
+int flow_dv_push_vlan_match_cb(void *tool_ctx, struct mlx5_list_entry *entry,
+ void *cb_ctx);
+struct mlx5_list_entry *flow_dv_push_vlan_create_cb(void *tool_ctx,
+ void *cb_ctx);
+void flow_dv_push_vlan_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry);
+struct mlx5_list_entry *flow_dv_push_vlan_clone_cb(void *tool_ctx,
struct mlx5_list_entry *entry, void *cb_ctx);
-void flow_dv_push_vlan_clone_free_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
-
-int flow_dv_sample_match_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry, void *cb_ctx);
-struct mlx5_list_entry *flow_dv_sample_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
- void *cb_ctx);
-void flow_dv_sample_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
-struct mlx5_list_entry *flow_dv_sample_clone_cb
- (struct mlx5_list *list,
+void flow_dv_push_vlan_clone_free_cb(void *tool_ctx,
+ struct mlx5_list_entry *entry);
+
+int flow_dv_sample_match_cb(void *tool_ctx, struct mlx5_list_entry *entry,
+ void *cb_ctx);
+struct mlx5_list_entry *flow_dv_sample_create_cb(void *tool_ctx, void *cb_ctx);
+void flow_dv_sample_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry);
+struct mlx5_list_entry *flow_dv_sample_clone_cb(void *tool_ctx,
struct mlx5_list_entry *entry, void *cb_ctx);
-void flow_dv_sample_clone_free_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
-
-int flow_dv_dest_array_match_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry, void *cb_ctx);
-struct mlx5_list_entry *flow_dv_dest_array_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
- void *cb_ctx);
-void flow_dv_dest_array_remove_cb(struct mlx5_list *list,
+void flow_dv_sample_clone_free_cb(void *tool_ctx,
struct mlx5_list_entry *entry);
-struct mlx5_list_entry *flow_dv_dest_array_clone_cb
- (struct mlx5_list *list,
- struct mlx5_list_entry *entry, void *cb_ctx);
-void flow_dv_dest_array_clone_free_cb(struct mlx5_list *list,
+
+int flow_dv_dest_array_match_cb(void *tool_ctx, struct mlx5_list_entry *entry,
+ void *cb_ctx);
+struct mlx5_list_entry *flow_dv_dest_array_create_cb(void *tool_ctx,
+ void *cb_ctx);
+void flow_dv_dest_array_remove_cb(void *tool_ctx,
struct mlx5_list_entry *entry);
+struct mlx5_list_entry *flow_dv_dest_array_clone_cb(void *tool_ctx,
+ struct mlx5_list_entry *entry, void *cb_ctx);
+void flow_dv_dest_array_clone_free_cb(void *tool_ctx,
+ struct mlx5_list_entry *entry);
+
struct mlx5_aso_age_action *flow_aso_age_get_by_idx(struct rte_eth_dev *dev,
uint32_t age_idx);
int flow_dev_geneve_tlv_option_resource_register(struct rte_eth_dev *dev,
}
int
-flow_dv_port_id_match_cb(struct mlx5_list *list __rte_unused,
+flow_dv_port_id_match_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_port_id_action_resource *ref = ctx->data;
struct mlx5_flow_dv_port_id_action_resource *res =
- container_of(entry, typeof(*res), entry);
+ container_of(entry, typeof(*res), entry);
return ref->port_id != res->port_id;
}
struct mlx5_list_entry *
-flow_dv_port_id_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_port_id_create_cb(void *tool_ctx, void *cb_ctx)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_port_id_action_resource *ref = ctx->data;
struct mlx5_flow_dv_port_id_action_resource *resource;
}
struct mlx5_list_entry *
-flow_dv_port_id_clone_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_port_id_clone_cb(void *tool_ctx,
+ struct mlx5_list_entry *entry __rte_unused,
+ void *cb_ctx)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_port_id_action_resource *resource;
uint32_t idx;
}
void
-flow_dv_port_id_clone_free_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry)
+flow_dv_port_id_clone_free_cb(void *tool_ctx, struct mlx5_list_entry *entry)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_dv_port_id_action_resource *resource =
- container_of(entry, typeof(*resource), entry);
+ container_of(entry, typeof(*resource), entry);
mlx5_ipool_free(sh->ipool[MLX5_IPOOL_PORT_ID], resource->idx);
}
}
int
-flow_dv_push_vlan_match_cb(struct mlx5_list *list __rte_unused,
- struct mlx5_list_entry *entry, void *cb_ctx)
+flow_dv_push_vlan_match_cb(void *tool_ctx __rte_unused,
+ struct mlx5_list_entry *entry, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_push_vlan_action_resource *ref = ctx->data;
struct mlx5_flow_dv_push_vlan_action_resource *res =
- container_of(entry, typeof(*res), entry);
+ container_of(entry, typeof(*res), entry);
return ref->vlan_tag != res->vlan_tag || ref->ft_type != res->ft_type;
}
struct mlx5_list_entry *
-flow_dv_push_vlan_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_push_vlan_create_cb(void *tool_ctx, void *cb_ctx)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_push_vlan_action_resource *ref = ctx->data;
struct mlx5_flow_dv_push_vlan_action_resource *resource;
}
struct mlx5_list_entry *
-flow_dv_push_vlan_clone_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_push_vlan_clone_cb(void *tool_ctx,
+ struct mlx5_list_entry *entry __rte_unused,
+ void *cb_ctx)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_push_vlan_action_resource *resource;
uint32_t idx;
}
void
-flow_dv_push_vlan_clone_free_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry)
+flow_dv_push_vlan_clone_free_cb(void *tool_ctx, struct mlx5_list_entry *entry)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_dv_push_vlan_action_resource *resource =
- container_of(entry, typeof(*resource), entry);
+ container_of(entry, typeof(*resource), entry);
mlx5_ipool_free(sh->ipool[MLX5_IPOOL_PUSH_VLAN], resource->idx);
}
}
static struct mlx5_list_entry *
-flow_dv_matcher_clone_cb(struct mlx5_list *list __rte_unused,
+flow_dv_matcher_clone_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
}
static void
-flow_dv_matcher_clone_free_cb(struct mlx5_list *list __rte_unused,
+flow_dv_matcher_clone_free_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry)
{
mlx5_free(entry);
}
int
-flow_dv_matcher_match_cb(struct mlx5_list *list __rte_unused,
+flow_dv_matcher_match_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
}
struct mlx5_list_entry *
-flow_dv_matcher_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_matcher_create_cb(void *tool_ctx, void *cb_ctx)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_matcher *ref = ctx->data;
struct mlx5_flow_dv_matcher *resource;
}
int
-flow_dv_sample_match_cb(struct mlx5_list *list __rte_unused,
+flow_dv_sample_match_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
}
struct mlx5_list_entry *
-flow_dv_sample_create_cb(struct mlx5_list *list __rte_unused,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_sample_create_cb(void *tool_ctx __rte_unused, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct rte_eth_dev *dev = ctx->dev;
}
struct mlx5_list_entry *
-flow_dv_sample_clone_cb(struct mlx5_list *list __rte_unused,
+flow_dv_sample_clone_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry __rte_unused,
void *cb_ctx)
{
}
void
-flow_dv_sample_clone_free_cb(struct mlx5_list *list __rte_unused,
- struct mlx5_list_entry *entry)
+flow_dv_sample_clone_free_cb(void *tool_ctx __rte_unused,
+ struct mlx5_list_entry *entry)
{
struct mlx5_flow_dv_sample_resource *resource =
- container_of(entry, typeof(*resource), entry);
+ container_of(entry, typeof(*resource), entry);
struct rte_eth_dev *dev = resource->dev;
struct mlx5_priv *priv = dev->data->dev_private;
- mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_SAMPLE],
- resource->idx);
+ mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_SAMPLE], resource->idx);
}
/**
}
int
-flow_dv_dest_array_match_cb(struct mlx5_list *list __rte_unused,
+flow_dv_dest_array_match_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_dv_dest_array_resource *ctx_resource = ctx->data;
struct rte_eth_dev *dev = ctx->dev;
struct mlx5_flow_dv_dest_array_resource *resource =
- container_of(entry, typeof(*resource), entry);
+ container_of(entry, typeof(*resource), entry);
uint32_t idx = 0;
if (ctx_resource->num_of_dest == resource->num_of_dest &&
}
struct mlx5_list_entry *
-flow_dv_dest_array_create_cb(struct mlx5_list *list __rte_unused,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_dest_array_create_cb(void *tool_ctx __rte_unused, void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct rte_eth_dev *dev = ctx->dev;
}
struct mlx5_list_entry *
-flow_dv_dest_array_clone_cb(struct mlx5_list *list __rte_unused,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+flow_dv_dest_array_clone_cb(void *tool_ctx __rte_unused,
+ struct mlx5_list_entry *entry __rte_unused,
+ void *cb_ctx)
{
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct rte_eth_dev *dev = ctx->dev;
}
void
-flow_dv_dest_array_clone_free_cb(struct mlx5_list *list __rte_unused,
- struct mlx5_list_entry *entry)
+flow_dv_dest_array_clone_free_cb(void *tool_ctx __rte_unused,
+ struct mlx5_list_entry *entry)
{
struct mlx5_flow_dv_dest_array_resource *resource =
container_of(entry, typeof(*resource), entry);
}
void
-flow_dv_matcher_remove_cb(struct mlx5_list *list __rte_unused,
+flow_dv_matcher_remove_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry)
{
struct mlx5_flow_dv_matcher *resource = container_of(entry,
}
void
-flow_dv_port_id_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry)
+flow_dv_port_id_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_dv_port_id_action_resource *resource =
container_of(entry, typeof(*resource), entry);
}
void
-flow_dv_push_vlan_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry)
+flow_dv_push_vlan_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)
{
- struct mlx5_dev_ctx_shared *sh = list->ctx;
+ struct mlx5_dev_ctx_shared *sh = tool_ctx;
struct mlx5_flow_dv_push_vlan_action_resource *resource =
container_of(entry, typeof(*resource), entry);
}
void
-flow_dv_sample_remove_cb(struct mlx5_list *list __rte_unused,
+flow_dv_sample_remove_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry)
{
struct mlx5_flow_dv_sample_resource *resource = container_of(entry,
}
void
-flow_dv_dest_array_remove_cb(struct mlx5_list *list __rte_unused,
+flow_dv_dest_array_remove_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry)
{
struct mlx5_flow_dv_dest_array_resource *resource =
struct mlx5_ind_table_obj *ind_tbl,
uint16_t *queues, const uint32_t queues_n,
bool standalone);
-struct mlx5_list_entry *mlx5_hrxq_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused, void *cb_ctx);
-int mlx5_hrxq_match_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
+struct mlx5_list_entry *mlx5_hrxq_create_cb(void *tool_ctx, void *cb_ctx);
+int mlx5_hrxq_match_cb(void *tool_ctx, struct mlx5_list_entry *entry,
void *cb_ctx);
-void mlx5_hrxq_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry);
-struct mlx5_list_entry *mlx5_hrxq_clone_cb(struct mlx5_list *list,
+void mlx5_hrxq_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry);
+struct mlx5_list_entry *mlx5_hrxq_clone_cb(void *tool_ctx,
struct mlx5_list_entry *entry,
void *cb_ctx __rte_unused);
-void mlx5_hrxq_clone_free_cb(struct mlx5_list *list,
+void mlx5_hrxq_clone_free_cb(void *tool_ctx __rte_unused,
struct mlx5_list_entry *entry);
uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,
struct mlx5_flow_rss_desc *rss_desc);
return ret;
}
-/**
- * Match an Rx Hash queue.
- *
- * @param list
- * mlx5 list pointer.
- * @param entry
- * Hash queue entry pointer.
- * @param cb_ctx
- * Context of the callback function.
- *
- * @return
- * 0 if match, none zero if not match.
- */
int
-mlx5_hrxq_match_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
- void *cb_ctx)
+mlx5_hrxq_match_cb(void *tool_ctx, struct mlx5_list_entry *entry, void *cb_ctx)
{
- struct rte_eth_dev *dev = list->ctx;
+ struct rte_eth_dev *dev = tool_ctx;
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_rss_desc *rss_desc = ctx->data;
struct mlx5_hrxq *hrxq = container_of(entry, typeof(*hrxq), entry);
* Hash queue entry pointer.
*/
void
-mlx5_hrxq_remove_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry)
+mlx5_hrxq_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)
{
- struct rte_eth_dev *dev = list->ctx;
+ struct rte_eth_dev *dev = tool_ctx;
struct mlx5_hrxq *hrxq = container_of(entry, typeof(*hrxq), entry);
__mlx5_hrxq_remove(dev, hrxq);
return NULL;
}
-/**
- * Create an Rx Hash queue.
- *
- * @param list
- * mlx5 list pointer.
- * @param entry
- * Hash queue entry pointer.
- * @param cb_ctx
- * Context of the callback function.
- *
- * @return
- * queue entry on success, NULL otherwise.
- */
struct mlx5_list_entry *
-mlx5_hrxq_create_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry __rte_unused,
- void *cb_ctx)
+mlx5_hrxq_create_cb(void *tool_ctx, void *cb_ctx)
{
- struct rte_eth_dev *dev = list->ctx;
+ struct rte_eth_dev *dev = tool_ctx;
struct mlx5_flow_cb_ctx *ctx = cb_ctx;
struct mlx5_flow_rss_desc *rss_desc = ctx->data;
struct mlx5_hrxq *hrxq;
}
struct mlx5_list_entry *
-mlx5_hrxq_clone_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry,
+mlx5_hrxq_clone_cb(void *tool_ctx, struct mlx5_list_entry *entry,
void *cb_ctx __rte_unused)
{
- struct rte_eth_dev *dev = list->ctx;
+ struct rte_eth_dev *dev = tool_ctx;
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_hrxq *hrxq;
uint32_t hrxq_idx = 0;
}
void
-mlx5_hrxq_clone_free_cb(struct mlx5_list *list,
- struct mlx5_list_entry *entry)
+mlx5_hrxq_clone_free_cb(void *tool_ctx, struct mlx5_list_entry *entry)
{
- struct rte_eth_dev *dev = list->ctx;
+ struct rte_eth_dev *dev = tool_ctx;
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_hrxq *hrxq = container_of(entry, typeof(*hrxq), entry);