* @param mr
* Pointer to MR to free.
*/
-static void
-mr_free(struct mlx5_mr *mr, mlx5_dereg_mr_t dereg_mr_cb)
+void
+mlx5_mr_free(struct mlx5_mr *mr, mlx5_dereg_mr_t dereg_mr_cb)
{
if (mr == NULL)
return;
struct mlx5_mr *mr = mr_next;
mr_next = LIST_NEXT(mr, mr);
- mr_free(mr, share_cache->dereg_mr_cb);
+ mlx5_mr_free(mr, share_cache->dereg_mr_cb);
}
}
data.start = RTE_ALIGN_FLOOR(addr, msl->page_sz);
data.end = data.start + msl->page_sz;
rte_mcfg_mem_read_unlock();
- mr_free(mr, share_cache->dereg_mr_cb);
+ mlx5_mr_free(mr, share_cache->dereg_mr_cb);
goto alloc_resources;
}
MLX5_ASSERT(data.msl == data_re.msl);
* Must be unlocked before calling rte_free() because
* mlx5_mr_mem_event_free_cb() can be called inside.
*/
- mr_free(mr, share_cache->dereg_mr_cb);
+ mlx5_mr_free(mr, share_cache->dereg_mr_cb);
return entry->lkey;
}
/*
* calling rte_free() because mlx5_mr_mem_event_free_cb() can be called
* inside.
*/
- mr_free(mr, share_cache->dereg_mr_cb);
+ mlx5_mr_free(mr, share_cache->dereg_mr_cb);
return UINT32_MAX;
}
return -1;
}
LIST_REMOVE(mr, mr);
- LIST_INSERT_HEAD(&sh->share_cache.mr_free_list, mr, mr);
+ mlx5_mr_free(mr, sh->share_cache.dereg_mr_cb);
DEBUG("port %u remove MR(%p) from list", dev->data->port_id,
(void *)mr);
mlx5_mr_rebuild_cache(&sh->share_cache);