From: "Eli Dorfman (Voltaire)" <dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] return no path when path does not exist
Date: Thu, 10 Jun 2010 18:01:31 +0300 [thread overview]
Message-ID: <4C10FE4B.9080106@gmail.com> (raw)
return OSM_NO_PATH (instead of port num) when path does not exists.
this will also be reported as error in the log.
Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
opensm/opensm/osm_switch.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/opensm/opensm/osm_switch.c b/opensm/opensm/osm_switch.c
index 311c4f7..b621852 100644
--- a/opensm/opensm/osm_switch.c
+++ b/opensm/opensm/osm_switch.c
@@ -628,6 +628,8 @@ uint8_t osm_switch_recommend_mcast_path(IN osm_switch_t * p_sw,
a black hole that will destroy the Earth in a firey conflagration.
*/
least_hops = osm_switch_get_least_hops(p_sw, base_lid);
+ if (least_hops == OSM_NO_PATH)
+ return OSM_NO_PATH;
for (port_num = 1; port_num < num_ports; port_num++)
if (osm_switch_get_hop_count(p_sw, base_lid, port_num) ==
least_hops)
--
1.5.5
--
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
next reply other threads:[~2010-06-10 15:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 15:01 Eli Dorfman (Voltaire) [this message]
[not found] ` <4C10FE4B.9080106-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-06-14 11:37 ` [PATCH] return no path when path does not exist Sasha Khapyorsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C10FE4B.9080106@gmail.com \
--to=dorfman.eli-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.