IBV_RATE_TO_MULT(3)

IBV_RATE_TO_MULT(3) ✨

okay so bestie, this is from the Libibverbs Programmer’s Manual, and it’s literally just two lil functions that translate between IB rate enums and multiples of 2.5 Gbit/sec. no cap, that’s the whole vibe. πŸ¦‹


🌸 NAME 🌸

ibv_rate_to_mult β€” converts an IB rate enumeration into a multiplier of 2.5 Gbit/sec πŸ’…

mult_to_ibv_rate β€” converts a multiplier of 2.5 Gbit/sec into an IB rate enumeration πŸŽ€


✨ SYNOPSIS ✨

#include <infiniband/verbs.h>

int ibv_rate_to_mult(enum ibv_rate rate);

enum ibv_rate mult_to_ibv_rate(int mult);

πŸ’– DESCRIPTION πŸ’–

ibv_rate_to_mult() takes the IB transmission rate enumeration rate and turns it into a multiple of 2.5 Gbit/sec β€” that’s the base rate, periodt. so like, if rate is IBV_RATE_5_GBPS, you get 2 back, because 5 Gbit/sec = 2 * 2.5 Gbit/sec. math ate, honestly. πŸ”₯

mult_to_ibv_rate() goes the other way: it takes the multiplier mult (again, a multiple of 2.5 Gbit/sec) and gives you back the IB transmission rate enumeration. example time: if mult is 2, then IBV_RATE_5_GBPS is what you get. icon behavior. πŸ‘‘


🫢 RETURN VALUE 🫢

ibv_rate_to_mult() returns the multiplier of the base rate 2.5 Gbit/sec. slay. ⭐

mult_to_ibv_rate() returns the enumeration representing the IB transmission rate. πŸ’œ


🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Dotan Barak <dotanba@gmail.com>


mwah πŸ’‹ β€” this lil page is from libibverbs, dated 2006-10-31. go off, bestie. πŸŽ€

πŸ“¦ where this page comes from