| 1 |
.\" -*- nroff -*- |
| 2 |
.\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md |
| 3 |
.\" |
| 4 |
.TH IBV_MODIFY_QP_RATE_LIMIT 3 2018-01-09 libibverbs "Libibverbs Programmer's Manual" |
| 5 |
.SH "NAME" |
| 6 |
ibv_modify_qp_rate_limit \- modify the send rate limits attributes of a queue pair (QP) |
| 7 |
.SH "SYNOPSIS" |
| 8 |
.nf |
| 9 |
.B #include <infiniband/verbs.h> |
| 10 |
.sp |
| 11 |
.BI "int ibv_modify_qp_rate_limit(struct ibv_qp " "*qp" ", struct ibv_qp_rate_limit_attr " "*attr"); |
| 12 |
.fi |
| 13 |
.SH "DESCRIPTION" |
| 14 |
.B ibv_modify_qp_rate_limit() |
| 15 |
modifies the send rate limiting packet pacing attributes of QP |
| 16 |
.I qp |
| 17 |
with the attributes in |
| 18 |
.I attr\fR. |
| 19 |
The argument \fIattr\fR is an ibv_qp_rate_limit_attr struct, as defined in <infiniband/verbs.h>. |
| 20 |
.PP |
| 21 |
The |
| 22 |
.I rate_limit |
| 23 |
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. |
| 24 |
.PP |
| 25 |
Finer control for shaping the rate limit of a QP is achieved by defining the |
| 26 |
.I max_burst_sz\fR, |
| 27 |
single burst max bytes size and the |
| 28 |
.I typical_pkt_sz\fR, |
| 29 |
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. |
| 30 |
.PP |
| 31 |
Setting a value of 0 for |
| 32 |
.I max_burst_sz |
| 33 |
or |
| 34 |
.I typical_pkt_sz |
| 35 |
will use the devices defaults. |
| 36 |
.I typical_pkt_sz |
| 37 |
will default to the port's MTU value. |
| 38 |
.PP |
| 39 |
.nf |
| 40 |
struct ibv_qp_rate_limit_attr { |
| 41 |
.in +8 |
| 42 |
uint32_t rate_limit; /* kbps */ |
| 43 |
uint32_t max_burst_sz; /* bytes */ |
| 44 |
uint16_t typical_pkt_sz; /* bytes */ |
| 45 |
.in -8 |
| 46 |
}; |
| 47 |
.fi |
| 48 |
.PP |
| 49 |
.SH "RETURN VALUE" |
| 50 |
.B ibv_modify_qp_rate_limit() |
| 51 |
returns 0 on success, or the value of errno on failure (which indicates the failure reason). |
| 52 |
.SH "ERRORS" |
| 53 |
.SS EINVAL |
| 54 |
Invalid arguments. |
| 55 |
.SS EOPNOTSUPP |
| 56 |
Function is not implemented for this device. |
| 57 |
(ENOSYS may sometimes be returned by old versions of libibverbs). |
| 58 |
.PP |
| 59 |
.SH "SEE ALSO" |
| 60 |
.BR ibv_create_qp (3), |
| 61 |
.BR ibv_destroy_qp (3), |
| 62 |
.BR ibv_modify_qp (3), |
| 63 |
.BR ibv_query_qp (3) |
| 64 |
.SH "AUTHORS" |
| 65 |
.TP |
| 66 |
Alex Rosenbaum <[email protected]> |
| 67 |
.TP |
| 68 |
Bodong Wang <[email protected]> |