* [PATCH 1/3] librdmacm: Report error messages on stderr
@ 2012-08-25 13:03 Yann Droneaud
[not found] ` <1345899810-1615-1-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Yann Droneaud @ 2012-08-25 13:03 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Yann Droneaud
Signed-off-by: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
---
src/cma.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/cma.c b/src/cma.c
index 5280620..ddd81d1 100755
--- a/src/cma.c
+++ b/src/cma.c
@@ -226,13 +226,13 @@ int ucma_init(void)
dev_list = ibv_get_device_list(&dev_cnt);
if (!dev_list) {
- printf("CMA: unable to get RDMA device list\n");
+ fprintf(stderr, "CMA: unable to get RDMA device list\n");
ret = ERR(ENODEV);
goto err1;
}
if (!dev_cnt) {
- printf("CMA: no RDMA devices found\n");
+ fprintf(stderr, "CMA: no RDMA devices found\n");
ret = ERR(ENODEV);
goto err2;
}
@@ -249,7 +249,7 @@ int ucma_init(void)
cma_dev->guid = ibv_get_device_guid(dev_list[i]);
cma_dev->verbs = ibv_open_device(dev_list[i]);
if (!cma_dev->verbs) {
- printf("CMA: unable to open RDMA device\n");
+ fprintf(stderr, "CMA: unable to open RDMA device\n");
ret = ERR(ENODEV);
goto err3;
}
@@ -257,7 +257,7 @@ int ucma_init(void)
i++;
ret = ibv_query_device(cma_dev->verbs, &attr);
if (ret) {
- printf("CMA: unable to query RDMA device\n");
+ fprintf(stderr, "CMA: unable to query RDMA device\n");
ret = ERR(ret);
goto err3;
}
@@ -329,7 +329,7 @@ struct rdma_event_channel *rdma_create_event_channel(void)
channel->fd = open("/dev/infiniband/rdma_cm", O_RDWR);
if (channel->fd < 0) {
- printf("CMA: unable to open /dev/infiniband/rdma_cm\n");
+ fprintf(stderr, "CMA: unable to open /dev/infiniband/rdma_cm\n");
goto err;
}
return channel;
--
1.7.11.4
--
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
* [PATCH 2/3] librdmacm: Use common prefix for error messages
[not found] ` <1345899810-1615-1-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
@ 2012-08-25 13:03 ` Yann Droneaud
[not found] ` <1345899810-1615-2-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2012-08-25 13:03 ` [PATCH 3/3] librdmacm: Report error level in " Yann Droneaud
2012-08-27 23:38 ` [PATCH 1/3] librdmacm: Report error messages on stderr Hefty, Sean
2 siblings, 1 reply; 5+ messages in thread
From: Yann Droneaud @ 2012-08-25 13:03 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Yann Droneaud
Signed-off-by: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
---
src/cma.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/cma.c b/src/cma.c
index ddd81d1..7002513 100755
--- a/src/cma.c
+++ b/src/cma.c
@@ -158,15 +158,15 @@ static int check_abi_version(void)
* backports, assume the most recent version of the ABI. If
* we're wrong, we'll simply fail later when calling the ABI.
*/
- fprintf(stderr, "librdmacm: couldn't read ABI version.\n");
- fprintf(stderr, "librdmacm: assuming: %d\n", abi_ver);
+ fprintf(stderr, PFX "couldn't read ABI version.\n");
+ fprintf(stderr, PFX "assuming: %d\n", abi_ver);
return 0;
}
abi_ver = strtol(value, NULL, 10);
if (abi_ver < RDMA_USER_CM_MIN_ABI_VERSION ||
abi_ver > RDMA_USER_CM_MAX_ABI_VERSION) {
- fprintf(stderr, "librdmacm: kernel ABI version %d "
+ fprintf(stderr, PFX "kernel ABI version %d "
"doesn't match library version %d.\n",
abi_ver, RDMA_USER_CM_MAX_ABI_VERSION);
return -1;
@@ -226,13 +226,13 @@ int ucma_init(void)
dev_list = ibv_get_device_list(&dev_cnt);
if (!dev_list) {
- fprintf(stderr, "CMA: unable to get RDMA device list\n");
+ fprintf(stderr, PFX "unable to get RDMA device list\n");
ret = ERR(ENODEV);
goto err1;
}
if (!dev_cnt) {
- fprintf(stderr, "CMA: no RDMA devices found\n");
+ fprintf(stderr, PFX "no RDMA devices found\n");
ret = ERR(ENODEV);
goto err2;
}
@@ -249,7 +249,7 @@ int ucma_init(void)
cma_dev->guid = ibv_get_device_guid(dev_list[i]);
cma_dev->verbs = ibv_open_device(dev_list[i]);
if (!cma_dev->verbs) {
- fprintf(stderr, "CMA: unable to open RDMA device\n");
+ fprintf(stderr, PFX "unable to open RDMA device\n");
ret = ERR(ENODEV);
goto err3;
}
@@ -257,7 +257,7 @@ int ucma_init(void)
i++;
ret = ibv_query_device(cma_dev->verbs, &attr);
if (ret) {
- fprintf(stderr, "CMA: unable to query RDMA device\n");
+ fprintf(stderr, PFX "unable to query RDMA device\n");
ret = ERR(ret);
goto err3;
}
@@ -329,7 +329,7 @@ struct rdma_event_channel *rdma_create_event_channel(void)
channel->fd = open("/dev/infiniband/rdma_cm", O_RDWR);
if (channel->fd < 0) {
- fprintf(stderr, "CMA: unable to open /dev/infiniband/rdma_cm\n");
+ fprintf(stderr, PFX "unable to open /dev/infiniband/rdma_cm\n");
goto err;
}
return channel;
--
1.7.11.4
--
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
* [PATCH 3/3] librdmacm: Report error level in error messages
[not found] ` <1345899810-1615-1-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2012-08-25 13:03 ` [PATCH 2/3] librdmacm: Use common prefix for error messages Yann Droneaud
@ 2012-08-25 13:03 ` Yann Droneaud
2012-08-27 23:38 ` [PATCH 1/3] librdmacm: Report error messages on stderr Hefty, Sean
2 siblings, 0 replies; 5+ messages in thread
From: Yann Droneaud @ 2012-08-25 13:03 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Yann Droneaud
libibverbs report error messages with either "Warning" or "Fatal" level,
librdmacm should do the same.
Signed-off-by: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
---
src/cma.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/cma.c b/src/cma.c
index 7002513..4f6a5ab 100755
--- a/src/cma.c
+++ b/src/cma.c
@@ -158,15 +158,15 @@ static int check_abi_version(void)
* backports, assume the most recent version of the ABI. If
* we're wrong, we'll simply fail later when calling the ABI.
*/
- fprintf(stderr, PFX "couldn't read ABI version.\n");
- fprintf(stderr, PFX "assuming: %d\n", abi_ver);
+ fprintf(stderr, PFX "Warning: couldn't read ABI version.\n");
+ fprintf(stderr, PFX "Warning: assuming: %d\n", abi_ver);
return 0;
}
abi_ver = strtol(value, NULL, 10);
if (abi_ver < RDMA_USER_CM_MIN_ABI_VERSION ||
abi_ver > RDMA_USER_CM_MAX_ABI_VERSION) {
- fprintf(stderr, PFX "kernel ABI version %d "
+ fprintf(stderr, PFX "Fatal: kernel ABI version %d "
"doesn't match library version %d.\n",
abi_ver, RDMA_USER_CM_MAX_ABI_VERSION);
return -1;
@@ -226,13 +226,13 @@ int ucma_init(void)
dev_list = ibv_get_device_list(&dev_cnt);
if (!dev_list) {
- fprintf(stderr, PFX "unable to get RDMA device list\n");
+ fprintf(stderr, PFX "Fatal: unable to get RDMA device list\n");
ret = ERR(ENODEV);
goto err1;
}
if (!dev_cnt) {
- fprintf(stderr, PFX "no RDMA devices found\n");
+ fprintf(stderr, PFX "Fatal: no RDMA devices found\n");
ret = ERR(ENODEV);
goto err2;
}
@@ -249,7 +249,7 @@ int ucma_init(void)
cma_dev->guid = ibv_get_device_guid(dev_list[i]);
cma_dev->verbs = ibv_open_device(dev_list[i]);
if (!cma_dev->verbs) {
- fprintf(stderr, PFX "unable to open RDMA device\n");
+ fprintf(stderr, PFX "Fatal: unable to open RDMA device\n");
ret = ERR(ENODEV);
goto err3;
}
@@ -257,7 +257,7 @@ int ucma_init(void)
i++;
ret = ibv_query_device(cma_dev->verbs, &attr);
if (ret) {
- fprintf(stderr, PFX "unable to query RDMA device\n");
+ fprintf(stderr, PFX "Fatal: unable to query RDMA device\n");
ret = ERR(ret);
goto err3;
}
@@ -329,7 +329,7 @@ struct rdma_event_channel *rdma_create_event_channel(void)
channel->fd = open("/dev/infiniband/rdma_cm", O_RDWR);
if (channel->fd < 0) {
- fprintf(stderr, PFX "unable to open /dev/infiniband/rdma_cm\n");
+ fprintf(stderr, PFX "Fatal: unable to open /dev/infiniband/rdma_cm\n");
goto err;
}
return channel;
--
1.7.11.4
--
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 2/3] librdmacm: Use common prefix for error messages
[not found] ` <1345899810-1615-2-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
@ 2012-08-26 10:07 ` Yann Droneaud
0 siblings, 0 replies; 5+ messages in thread
From: Yann Droneaud @ 2012-08-26 10:07 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hi,
Sorry for the scarce description of this patch:
libibverb is using a prefix for all messages, and like libibverbs,
librdmacm has a #define PFX, but did not use it.
This patch use the prefix for all errors messages issued by librdmacm.
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 1/3] librdmacm: Report error messages on stderr
[not found] ` <1345899810-1615-1-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2012-08-25 13:03 ` [PATCH 2/3] librdmacm: Use common prefix for error messages Yann Droneaud
2012-08-25 13:03 ` [PATCH 3/3] librdmacm: Report error level in " Yann Droneaud
@ 2012-08-27 23:38 ` Hefty, Sean
2 siblings, 0 replies; 5+ messages in thread
From: Hefty, Sean @ 2012-08-27 23:38 UTC (permalink / raw)
To: Yann Droneaud, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
thanks - all 3 applied
--
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:[~2012-08-27 23:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-25 13:03 [PATCH 1/3] librdmacm: Report error messages on stderr Yann Droneaud
[not found] ` <1345899810-1615-1-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2012-08-25 13:03 ` [PATCH 2/3] librdmacm: Use common prefix for error messages Yann Droneaud
[not found] ` <1345899810-1615-2-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2012-08-26 10:07 ` Yann Droneaud
2012-08-25 13:03 ` [PATCH 3/3] librdmacm: Report error level in " Yann Droneaud
2012-08-27 23:38 ` [PATCH 1/3] librdmacm: Report error messages on stderr Hefty, Sean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).