mult_to_ibv_rate()
Contents
enum ibv_rate mult_to_ibv_rate(int mult); |
Description
mult_to_ibv_rate() converts a multiplier value of 2.5 Gbit/sec to an InfiniBand transmission rate enumeration value.
For example, if mult is 2, the rate enumeration IBV_RATE_5_GBPS will be returned.
Parameters
Name | Direction | Description |
---|---|---|
mult | in | The multiplier that its rate enumeration value is requested |
Return Values
Value | Description |
---|---|
On success | An InfiniBand transmission rate enumeration |
On error | IBV_RATE_MAX. If mult isn't a valid multiplier value |
Examples
Print a rate of a multiplier value:
enum ibv_rate rate; rate = mult_to_ibv_rate(16); if (rate == IBV_RATE_MAX) { fprintf(stderr, "Error, mult_to_ibv_rate() failed\n"); return -1; } printf("The enumerated rate of the multiplier %d is %d\n", 16, rate); |
Comments
Tell us what do you think.
There are no comments on this entry.