Skip to content

mult_to_ibv_rate()

Contents

0.00 avg. rating (0% score) - 0 votes
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);

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.