.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "ibv_query_comp_cntr_caps" "3" "2026-07-17" "libibverbs" "Libibverbs Programmer\[cq]s Manual"
.hy
.SH NAME
.PP
\f[B]ibv_query_comp_cntr_caps\f[R] - Query completion counter
capabilities
.SH SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/verbs.h>

int ibv_query_comp_cntr_caps(struct ibv_context *context,
                             struct ibv_comp_cntr_caps *caps);
\f[R]
.fi
.SH DESCRIPTION
.PP
\f[B]ibv_query_comp_cntr_caps\f[R]() queries the completion counter
capabilities of the RDMA device associated with \f[I]context\f[R].
.SH ARGUMENTS
.SS ibv_comp_cntr_caps
.IP
.nf
\f[C]
struct ibv_comp_cntr_caps {
    uint64_t max_value;
    uint32_t max_counters;
    uint32_t supported_qp_attach_ops;
};
\f[R]
.fi
.TP
\f[I]max_value\f[R]
The maximum value a completion counter can hold.
A subsequent increment that would exceed this value wraps the counter to
zero.
.TP
\f[I]max_counters\f[R]
The maximum number of completion counters that can be created on this
device.
.TP
\f[I]supported_qp_attach_ops\f[R]
A bitmask of \f[B]ibv_qp_attach_comp_cntr_op\f[R] values indicating
which attach operations are supported by the device.
See \f[B]ibv_qp_attach_comp_cntr\f[R](3) for the list of operations.
.SH RETURN VALUE
.PP
\f[B]ibv_query_comp_cntr_caps\f[R]() returns 0 on success, or the value
of errno on failure (which indicates the failure reason).
.SH ERRORS
.TP
ENOTSUP
Completion counters are not supported on this device.
.SH SEE ALSO
.PP
\f[B]ibv_create_comp_cntr\f[R](3), \f[B]ibv_qp_attach_comp_cntr\f[R](3)
.SH AUTHORS
.PP
Michael Margolin <mrgolin@amazon.com>
