IBV_MODIFY_CQ(3)

πŸ’– NAME πŸ’–

ibv_modify_cq β€” bestie, this is how you modify a completion queue (CQ) ✨

So like, a CQ but make it a glow-up. This is from the Libibverbs Programmer's Manual, and yeah we're gonna read it together 🫢


🌸 SYNOPSIS 🌸

#include <infiniband/verbs.h>

int ibv_modify_cq(struct ibv_cq *cq, struct ibv_modify_cq_attr *cq_attr);

✨ DESCRIPTION ✨

Okay so ibv_modify_cq() modifies a CQ, and the CQ in question is cq. πŸ“

The argument cq_attr is an ibv_modify_cq_attr struct, which lives in <infiniband/verbs.h> β€” iconic, we love a header that carries. πŸ’…

Here's the struct, verbatim, no edits, we don't touch the source material:

struct ibv_moderate_cq {
        uint16_t cq_count;  /* number of completions per event */
        uint16_t cq_period; /* in micro seconds */
};

struct ibv_modify_cq_attr {
             uint32_t attr_mask;
             struct ibv_moderate_cq moderate;
};

And the way that ibv_modify_cq() works is: it modifies the CQ based on the given cq_attr->attr_mask. That mask is literally the main character here β€” it decides what actually gets changed. πŸ‘‘


πŸ¦‹ RETURN VALUE πŸ¦‹

It returns 0 on success, or the value of errno on failure β€” and that errno value is what tells you the failure reason. So if you get a nonzero number back, that's not a vibe, that's a diagnosis. πŸ”


πŸŽ€ SEE ALSO πŸŽ€


πŸ‘‘ AUTHORS πŸ‘‘

Yonatan Cohen <yonatanc@mellanox.com>


Okay bestie that's the whole page, you ate it, periodt πŸ’– This was libibverbs, dated 2017-10-20, and yeah β€” IBV_MODIFY_CQ(3) fr fr. Go modify that CQ, you got this 🌈⭐

πŸ“¦ where this page comes from