* [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
@ 2015-05-08 18:21 Jeff Squyres
[not found] ` <1431109314-31662-1-git-send-email-jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Squyres @ 2015-05-08 18:21 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jeff Squyres
Signed-off-by: Jeff Squyres <jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
---
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
[not found] ` <1431109314-31662-1-git-send-email-jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2015-05-09 14:04 ` Yann Droneaud
2015-05-11 20:32 ` Jeff Squyres (jsquyres)
0 siblings, 1 reply; 5+ messages in thread
From: Yann Droneaud @ 2015-05-09 14:04 UTC (permalink / raw)
To: Jeff Squyres; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hi,
Le vendredi 08 mai 2015 à 11:21 -0700, Jeff Squyres a écrit :
> Signed-off-by: Jeff Squyres <jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
2015-05-09 14:04 ` Yann Droneaud
@ 2015-05-11 20:32 ` Jeff Squyres (jsquyres)
[not found] ` <91CD4206-FE67-45DF-BFFD-3AFBC4DE30E3-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Squyres (jsquyres) @ 2015-05-11 20:32 UTC (permalink / raw)
To: Yann Droneaud; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
[-- 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¾Ú³9uÀ¦æåÈ&jw¨®\x03(éÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þàþf£¢·h§~m
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
[not found] ` <91CD4206-FE67-45DF-BFFD-3AFBC4DE30E3-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2015-05-11 21:32 ` Yann Droneaud
2015-05-12 14:10 ` Jeff Squyres (jsquyres)
0 siblings, 1 reply; 5+ messages in thread
From: Yann Droneaud @ 2015-05-11 21:32 UTC (permalink / raw)
To: Jeff Squyres (jsquyres)
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sean Hefty
Hi,
Le lundi 11 mai 2015 à 20:32 +0000, Jeff Squyres (jsquyres) a écrit :
> On May 9, 2015, at 8:04 AM, Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org> wrote:
> >
> > Le vendredi 08 mai 2015 à 11:21 -0700, Jeff Squyres a écrit :
> >> Signed-off-by: Jeff Squyres <jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
> >
> > 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.
>
OK.
(I have to find some information about this libfabric which is already
released as 1.0.0 version).
> 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).
>
This paragraph should definitively be part of your commit message.
> FWIW, Sean just removed a similar set of stderr warnings from librdmacm:
>
> http://git.openfabrics.org/?p=~shefty/librdmacm.git;a=commitdiff;h=2b2aad809afc56fa3157f5cf99036f92b9c90f16
>
I don't think this a good thing to remove all the error messages
unconditionally. It could have been made a build option + an environment
variable option to help mere mortals to debug their setups.
Regards.
--
Yann Droneaud
OPTEYA
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found
2015-05-11 21:32 ` Yann Droneaud
@ 2015-05-12 14:10 ` Jeff Squyres (jsquyres)
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Squyres (jsquyres) @ 2015-05-12 14:10 UTC (permalink / raw)
To: Yann Droneaud
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sean Hefty
On May 11, 2015, at 2:32 PM, Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org> wrote:
>
> (I have to find some information about this libfabric which is already
> released as 1.0.0 version).
See http://ofiwg.github.io/libfabric/ (and the corresponding code https://github.com/ofiwg/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).
>
> This paragraph should definitively be part of your commit message.
Ok.
>> FWIW, Sean just removed a similar set of stderr warnings from librdmacm:
>>
>> http://git.openfabrics.org/?p=~shefty/librdmacm.git;a=commitdiff;h=2b2aad809afc56fa3157f5cf99036f92b9c90f16
>
> I don't think this a good thing to remove all the error messages
> unconditionally. It could have been made a build option + an environment
> variable option to help mere mortals to debug their setups.
Ok. v3 coming shortly.
--
Jeff Squyres
jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-12 14:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08 18:21 [PATCH] libibverbs init.c: remove stderr warnings if no userspace driver found Jeff Squyres
[not found] ` <1431109314-31662-1-git-send-email-jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2015-05-09 14:04 ` Yann Droneaud
2015-05-11 20:32 ` Jeff Squyres (jsquyres)
[not found] ` <91CD4206-FE67-45DF-BFFD-3AFBC4DE30E3-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2015-05-11 21:32 ` Yann Droneaud
2015-05-12 14:10 ` Jeff Squyres (jsquyres)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox