From: "Jim Schutt" <jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
To: sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jim Schutt <jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
Subject: [PATCH 1/2] opensm/osm_torus.c: Add check for invalid topology discovery due to user misconfiguration.
Date: Fri, 17 Sep 2010 11:03:13 -0600 [thread overview]
Message-ID: <1284742994-24503-2-git-send-email-jaschut@sandia.gov> (raw)
In-Reply-To: <1284742994-24503-1-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
Hal Rosenstock found a way to make torus-2QoS seg fault: when
the fabric contains a torus dimension with radix 4, but the
configuration info in torus-2QoS.conf didn't say so. This
patch detects the result of such misconfiguration, and warns.
Tested-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Jim Schutt <jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
---
opensm/opensm/osm_torus.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/opensm/opensm/osm_torus.c b/opensm/opensm/osm_torus.c
index 0b7741d..12b480d 100644
--- a/opensm/opensm/osm_torus.c
+++ b/opensm/opensm/osm_torus.c
@@ -1623,6 +1623,22 @@ bool link_srcsink(struct torus *t, int i, int j, int k)
return true;
fsw = tsw->tmp;
+ /*
+ * link_srcsink is supposed to get called once for every switch in
+ * the fabric. At this point every fsw we encounter must have a
+ * non-null osm_switch. Otherwise something has gone horribly
+ * wrong with topology discovery; the most likely reason is that
+ * the fabric contains a radix-4 torus dimension, but the user gave
+ * a config that didn't say so, breaking all the checking in
+ * safe_x_perpendicular and friends.
+ */
+ if (!(fsw && fsw->osm_switch)) {
+ OSM_LOG(&t->osm->log, OSM_LOG_ERROR,
+ "Error: Invalid topology discovery. "
+ "Verify torus-2QoS.conf contents.\n");
+ return false;
+ }
+
pg = &tsw->ptgrp[2 * TORUS_MAX_DIM];
pg->type = SRCSINK;
tsw->osm_switch = fsw->osm_switch;
--
1.6.2.2
--
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 prev parent reply other threads:[~2010-09-17 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-17 17:03 [PATCH 0/2] opensm: Bug fixes for torus-2QoS patchset Jim Schutt
[not found] ` <1284742994-24503-1-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2010-09-17 17:03 ` Jim Schutt [this message]
2010-09-17 17:03 ` [PATCH 2/2] opensm/osm_torus.c: Handle calloc() failure on routing engine context creation Jim Schutt
2010-11-30 14:53 ` [PATCH 0/2] opensm: Bug fixes for torus-2QoS patchset 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=1284742994-24503-2-git-send-email-jaschut@sandia.gov \
--to=jaschut-4ohpyypu0djtx7qsmkvirg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox