Skip to content


5.00 avg. rating (97% score) - 1 vote
uint64_t ibv_get_device_guid(struct ibv_device *device);


ibv_get_device_guid() returns the Global Unique IDentifier (GUID) of the RDMA device device.

This GUID, that was assigned to this device by its vendor during the manufacturing, is unique and can be used as an identifier to an RDMA device.

From the prefix of the RDMA device GUID, one can know who is the vendor of that device using the following URL: IEEE OUI


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

Return Values

Value Description
Device GUID in network byte order On success
0 On failure, errno indicates the failure reason:

EMFILE Too many files are opened by this process


Show all existing RDMA device GUID numbers:

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");
for (i = 0; i < num_devices; ++ i)
        printf("RDMA device[%d]: GUID=%016llx\n", i,
               (unsigned long long)ntohll(ibv_get_device_guid(device_list[i])));


Share Our Posts

Share this post through social bookmarks.

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


Tell us what do you think.

  1. Ariel says: December 18, 2014

    Hi Dotan,
    I'm experiencing an error where ibv_get_device_guid is returning zero. Is there some way to find out what is causing the error?
    There is nothing on the man page regarding errors.

    • Dotan Barak says: December 18, 2014

      ibv_get_device_guid() is only a wrapper to /sys/class/infiniband//ports//gids/.
      You should check manually if there is a value.
      (This can give a hint on what is going on).

      Theoretically, this verb should never fail..


      • Ariel says: December 21, 2014

        Thanks for your help,
        The issue was caused when i reached the system limit for the number of open files.

      • Dotan Barak says: December 27, 2014


        I updated the post on this issue.


Add a Comment

Fill in the form and submit.

Time limit is exhausted. Please reload CAPTCHA.