Skip to content

ibv_rate_to_mult()

Contents

0.00 avg. rating (0% score) - 0 votes
int ibv_rate_to_mult(enum ibv_rate rate);

Description

ibv_rate_to_mult() converts an InfiniBand transmission enumeration rate to a multiple of 2.5 Gbit/sec (the base rate).

For example, if rate is IBV_RATE_5_GBPS, the value 2 will be returned (5 Gbit/sec = 2 * 2.5 Gbit/sec).

Parameters

Name Direction Description
rate in The rate that its multiplier is requested

Return Values

Value Description
On success The multiplier of the base rate 2.5 Gbit/sec
On error -1. If rate isn't a supported enumeration value

Examples

Print a multiplier of a specific rate:

int mult;
 
mult = ibv_rate_to_mult(IBV_RATE_40_GBPS);
if (mult < 0) {
	fprintf(stderr, "Error, ibv_rate_to_mult() failed\n");
	return -1;
}
 
printf("The multiplier of the value %d is %d\n", IBV_RATE_40_GBPS, mult);

Share Our Posts

Share this post through social bookmarks.

  • Delicious
  • Digg
  • Newsvine
  • RSS
  • StumbleUpon
  • Technorati

Comments

Tell us what do you think.

There are no comments on this entry.

Add a Comment

This comment will be moderated; answer may be provided within 14 days.

Time limit is exhausted. Please reload CAPTCHA.