IBV_OPEN_QP(3)

πŸ’– ibv_open_qp β€” a.k.a. IBV_OPEN_QP(3) πŸ’–

okay bestie, buckle up, we're in the Libibverbs Programmer's Manual and this one is literally about opening a shareable queue pair (QP) πŸ¦‹


✨ NAME ✨

ibv_open_qp β€” open a shareable queue pair (QP) πŸ‘‘


✨ SYNOPSIS ✨

#include <infiniband/verbs.h>

struct ibv_qp *ibv_open_qp(struct ibv_context *context,
                           struct ibv_qp_open_attr *qp_open_attr);

✨ DESCRIPTION ✨

So ibv_open_qp() opens an existing queue pair (QP) that's associated with the extended protection domain xrcd. Not creating, bestie β€” opening. It's already there, you're just sliding into its DMs 🫢

The argument qp_open_attr is an ibv_qp_open_attr struct, as defined in <infiniband/verbs.h. And here's the whole fit, character for character:

struct ibv_qp_open_attr {
        uint32_t          comp_mask;  /* Identifies valid fields */
        uint32_t          qp_num;     /* QP number */
        struct            *ibv_xrcd;  /* XRC domain */
        void             *qp_context; /* User defined opaque value */
        enum ibv_qp_type  qp_type;    /* QP transport service type */

Then ibv_destroy_qp() closes the opened QP and destroys the underlying QP if it has no other references. qp.

no fr, that trailing "qp." is just sitting there at the end of the sentence in the original and we respect the lore πŸ’€

✨ RETURN VALUE ✨

ibv_open_qp() returns a pointer to the opened QP, or NULL if the request fails. And the vibe check? Look at the QP number (qp_num) in the returned QP. πŸ‘€


✨ NOTES ✨

ibv_open_qp() will fail if it is asked to open a QP that does not exist within the xrcd with the specified qp_num and qp_type. Like, if it's not there, it's not there β€” no cap. πŸ’…


✨ SEE ALSO ✨


✨ AUTHORS ✨

Sean Hefty <sean.hefty@intel.com> β€” iconic behavior, we love to see it 🌈


and that's the whole page, bestie πŸ’– this was libibverbs, dated 2011-08-12, and the page itself is IBV_OPEN_QP(3) β€” periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from