1ibv_create_counters(3)  Libibverbs Programmer's Manual  ibv_create_counters(3)
2
3
4

NAME

6       ibv_create_counters,  ibv_destroy_counters  - Create or destroy a coun‐
7       ters handle
8

SYNOPSIS

10              #include <infiniband/verbs.h>
11
12              struct ibv_counters *
13              ibv_create_counters(struct ibv_context *context,
14                                  struct ibv_counters_init_attr *init_attr);
15
16              int ibv_destroy_counters(struct ibv_counters *counters);
17

DESCRIPTION

19       ibv_create_counters() creates a new counters handle for the RDMA device
20       context.
21
22       An  ibv_counters  handle can be attached to a verbs resource (e.g.: QP,
23       WQ, Flow) statically when these are created.
24
25       For example  attach  an  ibv_counters  statically  to  a  Flow  (struct
26       ibv_flow) during creation of a new Flow by calling ibv_create_flow().
27
28       Counters are cleared upon creation and values will be monotonically in‐
29       creasing.
30
31       ibv_destroy_counters() releases the counters handle, user should detach
32       the counters object before destroying it.
33

ARGUMENTS

35       context
36              RDMA device context to create the counters on.
37
38       init_attr
39              Is an ibv_counters_init_attr struct, as defined in verbs.h.
40
41   init_attr Argument
42              struct ibv_counters_init_attr {
43                  int comp_mask;
44              };
45
46       comp_mask
47              Bitmask specifying what fields in the structure are valid.
48

RETURN VALUE

50       ibv_create_counters()  returns  a pointer to the allocated ibv_counters
51       object, or NULL if the request fails (and sets errno  to  indicate  the
52       failure reason)
53
54       ibv_destroy_counters()  returns  0 on success, or the value of errno on
55       failure (which indicates the failure reason)
56

ERRORS

58       ENOSYS ibv_create_counters() is not currently supported on this device
59
60       ENOMEM ibv_create_counters() could not create ibv_counters object,  not
61              enough memory
62
63       EINVAL invalid parameter supplied ibv_destroy_counters()
64

EXAMPLE

66       An example of use of ibv_counters is shown in ibv_read_counters
67

SEE ALSO

69       ibv_attach_counters_point_flow, ibv_read_counters, ibv_create_flow
70

AUTHORS

72       Raed Salem <raeds@mellanox.com>
73
74       Alex Rosenbaum <alexr@mellanox.com>
75
76
77
78libibverbs                        2018-04-02            ibv_create_counters(3)
Impressum