IBV_QUERY_COMP_CNTR_CAPS(3)

πŸ“¦
version 65.0 Β· 2 versions
, in arch rolling

πŸ’… NAME πŸ’…

okok so like β€” ibv_query_comp_cntr_caps β€” bestie this one queries completion counter capabilities. That's it, that's the whole gig ✨ (and yeah, this is the ibv_query_comp_cntr_caps(3) page from the Libibverbs Programmer's Manual, hi, welcome 🫢)


🌸 SYNOPSIS 🌸

#include <infiniband/verbs.h>

int ibv_query_comp_cntr_caps(struct ibv_context *context,
                             struct ibv_comp_cntr_caps *caps);

literally just drop that include and you're in πŸŽ€


✨ DESCRIPTION ✨

okay so ibv_query_comp_cntr_caps() asks the RDMA device that's hanging out behind context all about its completion counter capabilities. it's giving "vibe check the hardware before you commit" energy, and honestly? obsessed πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

πŸŽ€ ibv_comp_cntr_caps

this is the struct you're filling up, and she's a whole personality:

struct ibv_comp_cntr_caps {
    uint64_t max_value;
    uint32_t max_counters;
    uint32_t supported_qp_attach_ops;
};
  • max_value β€” the biggest number a completion counter can hold, no cap... well, actually yes cap πŸ’€. if a subsequent increment would push past this value, the counter just wraps back around to zero. bye bestie πŸ‘‹
  • max_counters β€” the max number of completion counters you can create on this device. that's your limit, periodt.
  • supported_qp_attach_ops β€” a bitmask of ibv_qp_attach_comp_cntr_op values, aka the receipts on which attach operations this device actually supports. the full list of operations lives over in ibv_qp_attach_comp_cntr(3) β€” go look, iykyk πŸ‘‘

πŸ’– RETURN VALUE πŸ’–

ibv_query_comp_cntr_caps() returns 0 on success πŸ’š or, if it's not feeling it, the value of errno on failure β€” and that value tells you why it flopped 😭


πŸ’€ ERRORS πŸ’€

  • ENOTSUP β€” completion counters are simply not supported on this device. not her thing, not today, next question πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the main characters of this friend group 🌈


🧚 AUTHORS 🧚

Michael Margolin mrgolin@amazon.com β€” ty for the lore 🫢


⭐ and that's the whole page!! brought to you by libibverbs, dated 2026-07-17, filing under ibv_query...cntr_caps(3) β€” slay, stay hydrated, read your manpages πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from
  • arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms