---
name: "hnsdv_create_qp"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/hnsdv_create_qp"
---

# hnsdv\_create\_qp(3)

creates a HNS specific queue pair (QP)

## 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

**hnsdv\_create\_qp()** creates a HNS specific queue pair (QP) with specific driver properties.

## ARGUMENTS

Please see *[ibv\_create\_qp\_ex(3)](/ibv_create_qp_ex/3.md)* man page for *context* and *qp\_attr*.

### 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:
      Valid values in congest_type. Allow setting a congestion control algorithm for QP.
  ```

- *create\_flags*

  Enable the QP of a feature.

- *congest\_type*

  Type of congestion control algorithm:

  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, on error NULL will be returned and errno will be set.

## SEE ALSO

[**ibv\_create\_qp\_ex**(3)](/ibv_create_qp_ex/3.md)

## AUTHOR

Junxian Huang ⟨huangjunxian6@hisilicon.com⟩\\c
