HNSDV_CREATE_QP(3)

✨ HNSDV_CREATE_QP(3) ✨

okay so bestie, this one's from the HNS Programmer's Manual and it's literally the glow-up moment for creating queue pairs πŸ’… no cap.


🌸 NAME 🌸

hnsdv_create_qp β€” creates a HNS specific queue pair (QP) 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <infiniband/hnsdv.h>

struct ibv_qp *hnsdv_create_qp(struct ibv_context *context,
                               struct ibv_qp_init_attr_ex *qp_attr,
                               struct hnsdv_qp_init_attr *hns_attr);

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, hnsdv_create_qp() creates a HNS specific queue pair (QP) with specific driver properties. it's giving main character energy for your QP fr fr ✨


πŸ’– ARGUMENTS πŸ’–

For context and qp_attr, bestie, please go see the ibv_create_qp_ex(3) man page β€” they've got the whole lore over there πŸ“–

🌈 hns_attr

struct hnsdv_qp_init_attr {
        uint64_t comp_mask;
        uint32_t create_flags;
        uint8_t congest_type;
        uint8_t reserved[3];
};

⭐ comp_mask

Bitmask specifying what fields in the structure are valid πŸ‘‘

  • HNSDV_QP_INIT_ATTR_MASK_QP_CONGEST_TYPE β€” says the values in congest_type are valid. allows setting a congestion control algorithm for the QP πŸ’«

⭐ create_flags

Enable the QP of a feature πŸ”§

⭐ congest_type

Type of congestion control algorithm β€” pick your vibe:

  • HNSDV_QP_CREATE_ENABLE_DCQCN β€” Data Center Quantized Congestion Notification πŸ“
  • HNSDV_QP_CREATE_ENABLE_LDCP β€” Low Delay Control Protocol πŸ’œ
  • HNSDV_QP_CREATE_ENABLE_HC3 β€” Huawei Converged Congestion Control πŸ”₯
  • HNSDV_QP_CREATE_ENABLE_DIP β€” Destination IP based Quantized Congestion Notification 🌸

🧚 RETURN VALUE 🧚

hnsdv_create_qp() returns a pointer to the created QP β€” iconic, we love to see it πŸ‘‘ but on error NULL will be returned and errno will be set 😭 (so like, check it, bestie, don't just vibes your way through).


πŸ”₯ SEE ALSO πŸ”₯

ibv_create_qp_ex(3)


πŸ’… AUTHOR πŸ’…

Junxian Huang <huangjunxian6@hisilicon.com> β€” ty for your service 🫢


<div align="center">β€” πŸŽ€ β€”</div>

and that's the whole thing, bestie!! ✨ this page is from hns, dated 2024-02-06, and it lives in section HNSDV_CREATE_QP(3) β€” go slay your queue pairs πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from