1manadv_set_context_attr(3)                          manadv_set_context_attr(3)
2
3
4

NAME

6       manadv_set_context_attr - Set context attributes
7

SYNOPSIS

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

DESCRIPTION

16       manadv_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.
27
28   attr_type
29              enum manadv_set_ctx_attr_type {
30                  /* Attribute type uint8_t */
31                  MANADV_SET_CTX_ATTR_BUF_ALLOCATORS = 0,
32              };
33
34       MANADV_SET_CTX_ATTR_BUF_ALLOCATORS
35              Provide an external buffer allocator
36
37              struct manadv_ctx_allocators {
38                  void *(*alloc)(size_t size, void *priv_data);
39                  void (*free)(void *ptr, void *priv_data);
40                  void *data;
41              };
42
43       alloc  Function used for buffer allocation instead of libmana  internal
44              method
45
46       free   Function used to free buffers allocated by alloc function
47
48       data   Metadata that can be used by alloc and free functions
49

RETURN VALUE

51       Returns 0 on success, or the value of errno on failure (which indicates
52       the failure reason).
53

AUTHOR

55       Long Li <longli@microsoft.com>
56
57
58
59                                                    manadv_set_context_attr(3)
Impressum