---
name: "umad_set_pkey"
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_set_pkey"
---

# umad\_set\_pkey(3)

set pkey index within umad buffer

## NAME

umad\_set\_pkey - set pkey index within umad buffer

## SYNOPSIS

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

int umad_set_pkey(void *umad, int pkey_index);
```

## DESCRIPTION

**umad\_set\_pkey()** sets the pkey index within the specified *umad* buffer.

## RETURN VALUE

**umad\_set\_pkey()** returns 0 on success, and a negative value on an error.

## AUTHOR

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