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

# ibv\_query\_qp\_data\_in\_order(3)

check if qp data is guaranteed to be in order.

## NAME

ibv\_query\_qp\_data\_in\_order - check if qp data is guaranteed to be in order.

## SYNOPSIS

-

  ```
  #include <infiniband/verbs.h>
  int ibv_query_qp_data_in_order(struct ibv_qp *qp, enum ibv_wr_opcode op, uint32_t flags);
  ```

## DESCRIPTION

**ibv\_query\_qp\_data\_in\_order()** Checks whether WQE data is guaranteed to be written in-order, and thus reader may poll for data instead of poll for completion. This function indicates data is written in-order within each WQE, but cannot be used to determine ordering between separate WQEs. This function describes ordering at the receiving side of the QP, not the sending side.

## ARGUMENTS

- *qp*

  -

  ```
    The local queue pair (QP) to query.
  ```

- *op*

  -

  ```
    The operation type to query about. Different operation types may write data in a different order.
  ```

  For RDMA read operations: describes ordering of RDMA reads posted on this local QP. For RDMA write operations: describes ordering of remote RDMA writes being done into this local QP. For RDMA send operations: describes ordering of remote RDMA sends being done into this local QP. This function should not be used to determine ordering of other operation types.

- *flags*

  Flags are used to select a query type. Supported values:

IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_RETURN\_CAPS - Query for supported capabilities and return a capabilities vector.

IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_DEVICE\_ONLY - Allows querying only the RDMA device side support for data-in-order semantics without enforcing host CPU architecture restrictions. It is the responsibility of the application to ensure data-in-order semantics support for the host CPU or receiver device.

Passing 0 is equivalent to using IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_RETURN\_CAPS and checking for IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_WHOLE\_MSG support.

## RETURN VALUE

**ibv\_query\_qp\_data\_in\_order()** Return value is determined by flags. For each capability bit, 1 is returned if the data is guaranteed to be written in-order for selected operation and type, 0 otherwise. If IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_RETURN\_CAPS flag is used, return value can consist of following capabilities:

IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_WHOLE\_MSG - All data is being written in order.

IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_ALIGNED\_128\_BYTES - Each 128 bytes aligned block is being written in order.

If flags is 0, the function will return 1 if IBV\_QUERY\_QP\_DATA\_IN\_ORDER\_WHOLE\_MSG is supported and 0 otherwise.

## NOTES

Return value is valid only when the data is read by the CPU and relaxed ordering MR is not the target of the transfer.

## SEE ALSO

[**ibv\_query\_qp**(3)](/ibv_query_qp/3.md)

## AUTHOR

Patrisious Haddad ⟨phaddad@nvidia.com⟩\\c

Yochai Cohen ⟨yochai@nvidia.com⟩\\c
