---
name: "ibv_rate_to_mbps"
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_rate_to_mbps"
---

# ibv\_rate\_to\_mbps(3)

convert IB rate enumeration to Mbit/sec mbps\_to\_ibv\_rate - convert Mbit/sec to an IB rate enumeration

## NAME

ibv\_rate\_to\_mbps - convert IB rate enumeration to Mbit/sec

mbps\_to\_ibv\_rate - convert Mbit/sec to an IB rate enumeration

## SYNOPSIS

-

  ```
  #include <infiniband/verbs.h>
  int ibv_rate_to_mbps(enum ibv_rate rate);
  enum ibv_rate mbps_to_ibv_rate(int mbps);
  ```

## DESCRIPTION

**ibv\_rate\_to\_mbps()** converts the IB transmission rate enumeration *rate* to a number of Mbit/sec. For example, if *rate* is **IBV\_RATE\_5\_GBPS**, the value 5000 will be returned (5 Gbit/sec = 5000 Mbit/sec).

**mbps\_to\_ibv\_rate()** converts the number of Mbit/sec *mult* to an IB transmission rate enumeration. For example, if *mult* is 5000, the rate enumeration **IBV\_RATE\_5\_GBPS** will be returned.

## RETURN VALUE

**ibv\_rate\_to\_mbps()** returns the number of Mbit/sec.

**mbps\_to\_ibv\_rate()** returns the enumeration representing the IB transmission rate.

## SEE ALSO

[**ibv\_query\_port**(3)](/ibv_query_port/3.md)

## AUTHOR

Dotan Barak ⟨dotanb@dev.mellanox.co.il⟩\\c
