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

# umad\_poll(3)

poll umad

## NAME

umad\_poll - poll umad

## SYNOPSIS

```
#include <infiniband/umad.h>

int umad_poll(int portid, int timeout_ms);
```

## DESCRIPTION

**umad\_poll()** waits up to *timeout\_ms* milliseconds for a packet to be received from the port specified by *portid.* Once a packet is ready to be read, the function returns 0. After that the packet can be read using **umad\_recv().** Otherwise, -ETIMEDOUT is returned. Note that successfully polling a port does not guarantee that the subsequent **umad\_recv()** will be non blocking when several threads are using the same port. Instead, use a *timeout\_ms* parameter of zero to **umad\_recv()** to ensure a non-blocking read.

## RETURN VALUE

**umad\_poll()** returns 0 on success, and a negative value on error as follows:\
  \-EINVAL    invalid port handle or agentid\
  \-ETIMEDOUT poll operation timed out\
  \-EIO       poll operation failed

## SEE ALSO

[**umad\_recv**(3)](/umad_recv/3.md)

## AUTHOR

- Hal Rosenstock \<halr@voltaire.com\>
