MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_set_context_attr

Function mlx5_set_context_attr

dpdk/drivers/common/mlx5/linux/mlx5_common_verbs.c:78–90  ·  view source on GitHub ↗

* Hint libmlx5 to use PMD allocator for data plane resources. * * @param dev * Pointer to the generic device. */

Source from the content-addressed store, hash-verified

76 * Pointer to the generic device.
77 */
78void
79mlx5_set_context_attr(struct rte_device *dev, struct ibv_context *ctx)
80{
81 struct mlx5dv_ctx_allocators allocator = {
82 .alloc = &mlx5_alloc_verbs_buf,
83 .free = &mlx5_free_verbs_buf,
84 .data = dev,
85 };
86
87 /* Hint libmlx5 to use PMD allocator for data plane resources */
88 mlx5_glue->dv_set_context_attr(ctx, MLX5DV_CTX_ATTR_BUF_ALLOCATORS,
89 (void *)((uintptr_t)&allocator));
90}
91
92/**
93 * Register mr. Given protection domain pointer, pointer to addr and length

Callers 1

mlx5_os_open_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected