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

# rdma\_get\_recv\_comp(3)

retrieves a completed receive request.

## NAME

rdma\_get\_recv\_comp - retrieves a completed receive request.

## SYNOPSIS

**#include \<rdma/rdma\_verbs.h\>**

**int rdma\_get\_recv\_comp** **(struct rdma\_cm\_id \****id***,** **struct ibv\_wc \****wc***);**

## ARGUMENTS

- id

  A reference to a communication identifier to check for completions.

- wc

  A reference to a work completion structure to fill in.

## DESCRIPTION

Retrieves a completed work request for a receive operation.  Information about the completed request is returned through the wc parameter, with the wr\_id set to the context of the request.  For details on the work completion structure, see ibv\_poll\_cq.

## RETURN VALUE

Returns the number of returned completions (0 or 1) on success, or -1 on error. If an error occurs, errno will be set to indicate the failure reason.

## NOTES

This calls polls the receive completion queue associated with an rdma\_cm\_id. If a completion is not found, the call blocks until a request completes. This call should only be used on rdma\_cm\_id's that do not share CQs with other rdma\_cm\_id's, and maintain separate CQs for sends and receive completions.

## SEE ALSO

[rdma\_cm(7)](/rdma_cm/7.md), [ibv\_poll\_cq(3)](/ibv_poll_cq/3.md), [rdma\_get\_send\_comp(3)](/rdma_get_send_comp/3.md), [rdma\_post\_send(3)](/rdma_post_send/3.md), [rdma\_post\_read(3)](/rdma_post_read/3.md), [rdma\_post\_write(3)](/rdma_post_write/3.md)
