Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
On May 9, 2015, at 8:04 AM, Yann Droneaud ydrone...@opteya.com wrote: Le vendredi 08 mai 2015 à 11:21 -0700, Jeff Squyres a écrit : Signed-off-by: Jeff Squyres jsquy...@cisco.com This is a little short for an explanation: what was the issue with the error messages ? Cisco has stopped shipping its libibverbs usnic driver, although we are still using the kernel driver in the /sys/class/infiniband space (since it's the only way to be upstream). Specifically: instead of using libibverbs for userspace access, we are now using libfabric. That is: it's not a warning or an error if libibverbs cannot find a userspace driver for kernel devices. Indeed, returning a num_devices of 0 is sufficient -- the middleware shouldn't be unconditionally printing out stderr message; let the upper layer application do that (if it wants to). FWIW, Sean just removed a similar set of stderr warnings from librdmacm: http://git.openfabrics.org/?p=~shefty/librdmacm.git;a=commitdiff;h=2b2aad809afc56fa3157f5cf99036f92b9c90f16 -free(sysfs_dev); I believe this free() was necessary to not leak some memory. Ah -- I mis-read the loop. I'll re-submit with the loop still there, but just removing the fprintf block. -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/ N�r��yb�X��ǧv�^�){.n�+{��ٚ�{ay�ʇڙ�,j��f���h���z��w��� ���j:+v���w�j�mzZ+�ݢj��!�i
Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
Hi, Le vendredi 08 mai 2015 à 11:21 -0700, Jeff Squyres a écrit : Signed-off-by: Jeff Squyres jsquy...@cisco.com This is a little short for an explanation: what was the issue with the error messages ? --- src/init.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/src/init.c b/src/init.c index d0e4b1c..9c21768 100644 --- a/src/init.c +++ b/src/init.c @@ -557,19 +557,5 @@ HIDDEN int ibverbs_init(struct ibv_device ***list) } out: - for (sysfs_dev = sysfs_dev_list, - next_dev = sysfs_dev ? sysfs_dev-next : NULL; - sysfs_dev; - sysfs_dev = next_dev, next_dev = sysfs_dev ? sysfs_dev-next : NULL) { - if (!sysfs_dev-have_driver) { - fprintf(stderr, PFX Warning: no userspace device-specific - driver found for %s\n, sysfs_dev-sysfs_path); - if (statically_linked) - fprintf(stderr,When linking libibverbs statically, - driver must be statically linked too.\n); - } - free(sysfs_dev); I believe this free() was necessary to not leak some memory. - } - return num_devices; } Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
Signed-off-by: Jeff Squyres jsquy...@cisco.com --- src/init.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/src/init.c b/src/init.c index d0e4b1c..9c21768 100644 --- a/src/init.c +++ b/src/init.c @@ -557,19 +557,5 @@ HIDDEN int ibverbs_init(struct ibv_device ***list) } out: - for (sysfs_dev = sysfs_dev_list, -next_dev = sysfs_dev ? sysfs_dev-next : NULL; -sysfs_dev; -sysfs_dev = next_dev, next_dev = sysfs_dev ? sysfs_dev-next : NULL) { - if (!sysfs_dev-have_driver) { - fprintf(stderr, PFX Warning: no userspace device-specific - driver found for %s\n, sysfs_dev-sysfs_path); - if (statically_linked) - fprintf(stderr,When linking libibverbs statically, - driver must be statically linked too.\n); - } - free(sysfs_dev); - } - return num_devices; } -- 2.2.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html