---
name: "hnsdv_query_device"
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_query_device"
---

# hnsdv\_query\_device(3)

Query hns device specific attributes

## NAME

hnsdv\_query\_device - Query hns device specific attributes

## SYNOPSIS

-

  ```
  #include <infiniband/hnsdv.h>
  int hnsdv_query_device(struct ibv_context *context,
                         struct hnsdv_context *attrs_out);
  ```

## DESCRIPTION

**hnsdv\_query\_device()** Queries hns device specific attributes.

## ARGUMENTS

Please see *[ibv\_query\_device(3)](/ibv_query_device/3.md)* man page for *context*.

### attrs\_out

-

  ```
  struct hnsdv_context {
          uint64_t comp_mask;
          uint64_t flags;
          uint8_t congest_type;
          uint8_t reserved[7];
  };
  ```

- *comp\_mask*

  Bitmask specifying what fields in the structure are valid:

  HNSDV\_CONTEXT\_MASK\_CONGEST\_TYPE: Congestion control algorithm is supported.

- *congest\_type*

  Bitmask of supported congestion control algorithms.

  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\_query\_device()** returns 0 on success, or the value of errno on failure (which indicates the failure reason).

## SEE ALSO

[**ibv\_query\_device**(3)](/ibv_query_device/3.md)

## NOTES

- •

  *flags* is an out field and currently has no values.

## AUTHORS

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