Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found

Jeff Squyres (jsquyres)
2015-05-11T20:32:41Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1531 bytes --]

On May 9, 2015, at 8:04 AM, Yann Droneaud <ydroneaud@opteya.com> wrote:
>
> Le vendredi 08 mai 2015 Ã  11:21 -0700, Jeff Squyres a Ã©crit :
>> Signed-off-by: Jeff Squyres <jsquyres@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
jsquyres@cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/

N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±­ÙšŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hš‹»öì\x17/oSc¾™Ú³9˜uÀ¦æå‰È&jw¨®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þ–Šàþf£¢·hšˆ§~ˆmš