cp_mreg.src = ret;
/* Check if already registered. */
MLX5_ASSERT(priv->mreg_cp_tbl);
- mcp_res = (void *)mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id);
+ mcp_res = (void *)mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, NULL);
if (mcp_res) {
/* For non-default rule. */
if (mark_id != MLX5_DEFAULT_COPY_ID)
goto error;
mcp_res->refcnt++;
mcp_res->hlist_ent.key = mark_id;
- ret = mlx5_hlist_insert(priv->mreg_cp_tbl,
- &mcp_res->hlist_ent);
+ ret = !mlx5_hlist_insert(priv->mreg_cp_tbl, &mcp_res->hlist_ent);
MLX5_ASSERT(!ret);
if (ret)
goto error;
if (!priv->mreg_cp_tbl)
return;
mcp_res = (void *)mlx5_hlist_lookup(priv->mreg_cp_tbl,
- MLX5_DEFAULT_COPY_ID);
+ MLX5_DEFAULT_COPY_ID, NULL);
if (!mcp_res)
return;
MLX5_ASSERT(mcp_res->rix_flow);
union mlx5_flow_tbl_key table_key = {
{
.table_id = tunnel_id_to_flow_tbl(mbits.table_id),
- .reserved = 0,
+ .dummy = 0,
.domain = !!mbits.transfer,
.direction = 0,
}
};
- he = mlx5_hlist_lookup(sh->flow_tbls, table_key.v64);
+ he = mlx5_hlist_lookup(sh->flow_tbls, table_key.v64, NULL);
return he ?
container_of(he, struct mlx5_flow_tbl_data_entry, entry) : NULL;
}
struct mlx5_hlist *group_hash;
group_hash = tunnel ? tunnel->groups : thub->groups;
- he = mlx5_hlist_lookup(group_hash, key.val);
+ he = mlx5_hlist_lookup(group_hash, key.val, NULL);
if (!he) {
tte = mlx5_malloc(MLX5_MEM_SYS | MLX5_MEM_ZERO,
sizeof(*tte), 0,
LIST_REMOVE(tunnel, chain);
mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_TUNNEL_ID],
tunnel->tunnel_id);
- mlx5_hlist_destroy(tunnel->groups, NULL, NULL);
+ mlx5_hlist_destroy(tunnel->groups);
mlx5_free(tunnel);
}
[MLX5_IPOOL_RSS_EXPANTION_FLOW_ID], id);
return NULL;
}
- tunnel->groups = mlx5_hlist_create("tunnel groups", 1024);
+ tunnel->groups = mlx5_hlist_create("tunnel groups", 1024, 0, 0,
+ NULL, NULL, NULL);
if (!tunnel->groups) {
mlx5_ipool_free(priv->sh->ipool
[MLX5_IPOOL_RSS_EXPANTION_FLOW_ID], id);
return;
if (!LIST_EMPTY(&thub->tunnels))
DRV_LOG(WARNING, "port %u tunnels present\n", port_id);
- mlx5_hlist_destroy(thub->groups, NULL, NULL);
+ mlx5_hlist_destroy(thub->groups);
mlx5_free(thub);
}
if (!thub)
return -ENOMEM;
LIST_INIT(&thub->tunnels);
- thub->groups = mlx5_hlist_create("flow groups", MLX5_MAX_TABLES);
+ thub->groups = mlx5_hlist_create("flow groups", MLX5_MAX_TABLES, 0,
+ 0, NULL, NULL, NULL);
if (!thub->groups) {
err = -rte_errno;
goto err;
err:
if (thub->groups)
- mlx5_hlist_destroy(thub->groups, NULL, NULL);
+ mlx5_hlist_destroy(thub->groups);
if (thub)
mlx5_free(thub);
return err;