ibv_create_counters(3)
π ibv_create_counters(3) π
okay so bestie, this is the Libibverbs Programmerβs Manual page for ibv_create_counters(3), and itβs literally all about making and destroying a counters handle. slay.
πΈ NAME πΈ
ibv_create_counters,ibv_destroy_countersβ Create or destroy a counters handle
β¨ SYNOPSIS β¨
#include <infiniband/verbs.h>
struct ibv_counters *
ibv_create_counters(struct ibv_context *context,
struct ibv_counters_init_attr *init_attr);
int ibv_destroy_counters(struct ibv_counters *counters);
π¦ DESCRIPTION π¦
ibv_create_counters() creates a new counters handle for the RDMA device context. main character behavior, honestly.
An ibv_counters handle can be attached to a verbs resource (e.g.: QP, WQ, Flow) statically when these are created.
For example attach an ibv_counters statically to a Flow (struct ibv_flow) during creation of a new Flow by calling ibv_create_flow().
Counters are cleared upon creation and values will be monotonically increasing. so they only go up, no cap π
ibv_destroy_counters() releases the counters handle, user should detach the counters object before destroying it.
bestie please detach first, okay? the page says you should, and we respect the page π
π ARGUMENTS π
contextβ RDMA device context to create the counters on.init_attrβ Is anibv_counters_init_attrstruct, as defined inverbs.h.
π§ init_attr Argument π§
struct ibv_counters_init_attr {
int comp_mask;
};
comp_maskβ Bitmask specifying what fields in the structure are valid.
π« RETURN VALUE π«
ibv_create_counters() returns a pointer to the allocated ibv_counters object, or NULL if the request fails (and sets errno to indicate the failure reason).
ibv_destroy_counters() returns 0 on success, or the value of errno on failure (which indicates the failure reason).
π¨ ERRORS π¨
EOPNOTSUPPβibv_create_counters()is not currently supported on this device (ENOSYSmay sometimes be returned by old versions oflibibverbs).ENOMEMβibv_create_counters()could not createibv_countersobject, not enough memory.EINVALβ invalid parameter suppliedibv_destroy_counters().
π EXAMPLE π
An example of use of ibv_counters is shown in ibv_read_counters.
π SEE ALSO π
ibv_attach_counters_point_flow, ibv_read_counters, ibv_create_flow
π AUTHORS π
- Raed Salem
<raeds@mellanox.com> - Alex Rosenbaum
<alexr@mellanox.com>
xoxo, this page is brought to you by libibverbs, dated 2018-04-02, and itβs the ibv_create_counters(3) manual page π«Άβ¨
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms