Skip to content

ibv_get_device_name()

Contents

0.00 avg. rating (0% score) - 0 votes
const char *ibv_get_device_name(struct ibv_device *device);

Description

ibv_get_device_name() returns a string of the name, which is associated with the RDMA device device.

This name is unique within a specific machine (the same name cannot be assigned to more than one device)

However, this name isn't unique across an InfiniBand fabric (this name can be found in different machines).

When there are more than one RDMA devices in a computer, changing the device location in the computer (i.e. in the PCI bus) may result a change in the names associated with the devices. In order to distinguish between the device, it is recommended using the device GUID, returned by ibv_get_device_guid().

Parameters

Name Direction Description
device in RDMA device entry that was returned from ibv_get_device_list()

Return Values

ibv_get_device_name() returns a pointer to the device name, or NULL in case of a failure.

The name is composed from:

  • prefix - which describes the RDMA device vendor and model
    • cxgb3 - Chelsio Communications, T3 RDMA family
    • cxgb4 - Chelsio Communications, T4 RDMA family
    • ehca - IBM, eHCA family
    • ipathverbs - QLogic
    • mlx4 - Mellanox Technologies, ConnectX family
    • mthca - Mellanox Technologies, InfiniHost family
    • nes - Intel, Intel-NE family
  • Index - a number that helps to differentiate between several devices from the same vendor and family in the same computer

Examples

Here are some examples for RDMA device names that may be returned by ibv_get_device_name():

  • mlx4_0
  • mlx4_1
  • mthca0

Show all existing RDMA device names:

struct ibv_device **device_list;
int num_devices;
int i;
 
device_list = ibv_get_device_list(&num_devices);
if (!device_list) {
        fprintf(stderr, "Error, ibv_get_device_list() failed\n");
        exit(1);
}
 
for (i = 0; i < num_devices; ++ i)
        printf("RDMA device[%d]: name=%s\n", i,
               ibv_get_device_name(device_list[i]));
 
ibv_free_device_list(device_list);

show_devices_name.c

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.