IBV_RATE_TO_MBPS(3)

โœจ ibv_rate_to_mbps(3) โœจ

okay so bestie, this is the libibverbs programmer's manual page for ibv_rate_to_mbps and mbps_to_ibv_rate โ€” two lil functions that literally just translate between the IB rate enumeration and plain old Mbit/sec ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

like, here's the vibe:

#include <infiniband/verbs.h>

int ibv_rate_to_mbps(enum ibv_rate rate);

enum ibv_rate mbps_to_ibv_rate(int mbps);

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so first up, ibv_rate_to_mbps() โ€” it takes that IB transmission rate enumeration (rate) and converts it into a number of Mbit/sec. fr fr, watch this: if rate is IBV_RATE_5_GBPS, you get 5000 back (because 5 Gbit/sec = 5000 Mbit/sec, math is mathing ๐Ÿงฎโœจ).

and then mbps_to_ibv_rate() is the reverse bestie โ€” it takes a number of Mbit/sec (mult) and gives you back the IB transmission rate enumeration. so if mult is 5000, congrats, you get IBV_RATE_5_GBPS returned to you ๐ŸŽ€

๐Ÿ’– 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) โ€” go check it out, iykyk ๐Ÿ’œ

๐ŸŒˆ AUTHOR ๐ŸŒˆ

Dotan Barak <dotanb@dev.mellanox.co.il> โ€” thank you for your service ๐Ÿซถ


mwah ๐Ÿ’‹ that's the whole page bestie, no cap. this was libibverbs, dated 2012-03-31 โ€” iconic behavior, periodt โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from