---
name: "ibv_modify_qp_rate_limit"
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_modify_qp_rate_limit"
---

# ibv\_modify\_qp\_rate\_limit(3)

modify the send rate limits attributes of a queue pair (QP)

## NAME

ibv\_modify\_qp\_rate\_limit - modify the send rate limits attributes of a queue pair (QP)

## SYNOPSIS

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

int ibv_modify_qp_rate_limit(struct ibv_qp *qp, struct ibv_qp_rate_limit_attr *attr);
```

## DESCRIPTION

**ibv\_modify\_qp\_rate\_limit()** modifies the send rate limiting packet pacing attributes of QP *qp* with the attributes in *attr.* The argument *attr* is an ibv\_qp\_rate\_limit\_attr struct, as defined in \<infiniband/verbs.h\>.

The *rate\_limit* defines the MAX send rate this QP will send as long as the link in not blocked and there are work requests in send queue.

Finer control for shaping the rate limit of a QP is achieved by defining the *max\_burst\_sz,* single burst max bytes size and the *typical\_pkt\_sz,* typical packet bytes size. These allow the device to adjust the inter-burst gap delay required to correctly shape the scheduling of sends to the wire in order to reach for requested application requirements.

Setting a value of 0 for *max\_burst\_sz* or *typical\_pkt\_sz* will use the devices defaults. *typical\_pkt\_sz* will default to the port's MTU value.

```
struct ibv_qp_rate_limit_attr {
uint32_t        rate_limit;     /* kbps */
uint32_t        max_burst_sz;   /* bytes */
uint16_t        typical_pkt_sz; /* bytes */
};
```

## RETURN VALUE

**ibv\_modify\_qp\_rate\_limit()** returns 0 on success, or the value of errno on failure (which indicates the failure reason).

## ERRORS

### EINVAL

Invalid arguments.

### EOPNOTSUPP

Function is not implemented for this device. (ENOSYS may sometimes be returned by old versions of libibverbs).

## SEE ALSO

[**ibv\_create\_qp**(3)](/ibv_create_qp/3.md), [**ibv\_destroy\_qp**(3)](/ibv_destroy_qp/3.md), [**ibv\_modify\_qp**(3)](/ibv_modify_qp/3.md), [**ibv\_query\_qp**(3)](/ibv_query_qp/3.md)

## AUTHORS

- Alex Rosenbaum \<alexr@mellanox.com\>

  - Bodong Wang \<bodong@mellanox.com\>
