* Hint libmlx5 to use PMD allocator for data plane resources. * * @param dev * Pointer to the generic device. */
| 76 | * Pointer to the generic device. |
| 77 | */ |
| 78 | void |
| 79 | mlx5_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 |
no outgoing calls
no test coverage detected