Roland Dreier wrote:
I don't have any file like that in my system either.  Not sure where
it might be coming from for you.

However, I do have /sys/class/infiniband_verbs/uverbs1/ibdev (which
should be present everywhere), and that has "cxgb3_0" in it, which you
could use to get to /sys/class/infiniband/cxgb3_0/<whatever>.

libibverbs does set up ibv_device.ibdev_path with that path, but it
happens too late for your library initialization function
unfortunately.  So you can either wait until someone tries to create a
context and fail/warn then about firmware version, or you can
duplicate the libibverbs code to come up with that ibdev_path.

 - R.

How does this look?

        /*
         * Verify that the firmware major number matches.  Major number
         * mismatches are fatal.  Minor number mismatches are tolerated.
         */
        if (ibv_read_sysfs_file(uverbs_sys_path, "ibdev",
                                ibdev, sizeof ibdev) < 0)
                return NULL;

        memset(devstr, 0, sizeof devstr);
snprintf(devstr, sizeof devstr, "%s/class/infiniband/%s", ibv_get_sysfs_path(), ibdev);
        if (ibv_read_sysfs_file(devstr, "fw_ver", value, sizeof value) < 0)
                return NULL;


_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to