1mlx4dv_set_context_attr(3)                          mlx4dv_set_context_attr(3)
2
3
4

NAME

6       mlx4dv_set_context_attr - Set context attributes
7

SYNOPSIS

9              #include <infiniband/mlx4dv.h>
10
11              int mlx4dv_set_context_attr(struct ibv_context *context,
12                                          enum mlx4dv_set_ctx_attr_type attr_type,
13                                          void *attr);
14

DESCRIPTION

16       mlx4dv_set_context_attr  gives  the  ability to set vendor specific at‐
17       tributes on the RDMA context.
18

ARGUMENTS

20       context
21              RDMA device context to work on.
22
23       attr_type
24              The type of the provided attribute.
25
26       attr   Pointer to the attribute to be set.  ## attr_type
27
28              enum mlx4dv_set_ctx_attr_type {
29                  /* Attribute type uint8_t */
30                  MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ    = 0,
31                  MLX4DV_SET_CTX_ATTR_BUF_ALLOCATORS  = 1,
32              };
33
34       MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ
35              Change the LOG WQs Range size for RSS
36
37       MLX4DV_SET_CTX_ATTR_BUF_ALLOCATORS
38              Provide an external buffer allocator
39
40              struct mlx4dv_ctx_allocators {
41                  void *(*alloc)(size_t size, void *priv_data);
42                  void (*free)(void *ptr, void *priv_data);
43                  void *data;
44              };
45
46       alloc  Function used for buffer allocation instead of libmlx4  internal
47              method
48
49       free   Function used to free buffers allocated by alloc function
50
51       data   Metadata that can be used by alloc and free functions
52

RETURN VALUE

54       Returns 0 on success, or the value of errno on failure (which indicates
55       the failure reason).
56
57       #AUTHOR
58
59       Majd Dibbiny <majd@mellanox.com>
60
61
62
63                                                    mlx4dv_set_context_attr(3)
Impressum