---
name: "ibv_modify_wq"
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/ibv_modify_wq"
---

# ibv\_modify\_wq(3)

Modify a Work Queue (WQ).

## NAME

ibv\_modify\_wq - Modify a Work Queue (WQ).

## SYNOPSIS

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

struct int ibv_modify_wq(struct ibv_wq *wq,
                             struct ibv_wq_attr *wq_attr);

```

## DESCRIPTION

**ibv\_modify\_wq()** modifys a WQ *wq.* The argument *wq\_attr* is an ibv\_wq\_attr struct, as defined in \<infiniband/verbs.h\>.

```
struct ibv_wq_attr {
uint32_t                attr_mask;     /* Use enum ibv_wq_attr_mask */
enum ibv_wq_state       wq_state;      /* Move to this state */
enum ibv_wq_state       curr_wq_state; /* Assume this is the current state */
uint32_t                flags;         /* Flags values to modify, use enum ibv_wq_flags */
uint32_t                flags_mask;    /* Which flags to modify, use enum ibv_wq_flags */
};
```

The function **ibv\_modify\_wq()** will modify the WQ based on the given *wq\_attr-\>attr\_mask*

## RETURN VALUE

returns 0 on success, or the value of errno on failure (which indicates the failure reason).

## SEE ALSO

[**ibv\_create\_wq**(3)](/ibv_create_wq/3.md), [**ibv\_destroy\_wq**(3)](/ibv_destroy_wq/3.md),

## AUTHORS

- Yishai Hadas \<yishaih@mellanox.com\>
