From: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Jim Schutt <jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1v2] opensm: fixed port order configuration in torus routing engine
Date: Wed, 1 Jun 2011 18:40:46 +0300 [thread overview]
Message-ID: <20110601154046.GA1098@calypso.voltaire.com> (raw)
In-Reply-To: <4DE50C21.7020305-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
Commit 1c2a298b295eba7e24205519abc24e47106d15df broke port order
configuration for torus routing engine. order was incorrectly initiated,
causing setting LFTs to fail.
Signed-off-by: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes since v1:
1. Defined order[] as uint8_t
2. Removed error message while parsing port_order. It gives false alarms,
because strtok() returns NULL when no tokens left.
--
opensm/osm_torus.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c
index cd3d490..29c1bb4 100644
--- a/opensm/osm_torus.c
+++ b/opensm/osm_torus.c
@@ -868,11 +868,9 @@ bool parse_port_order(struct torus *t, const char *parse_sep)
unsigned i, j, k, n;
for (i = 0; i < ARRAY_SIZE(t->port_order); i++) {
- if (!parse_port(&(t->port_order[i]), parse_sep)) {
- OSM_LOG(&t->osm->log, OSM_LOG_ERROR,
- "Error: cannot parse port_order");
+ if (!parse_port(&(t->port_order[i]), parse_sep))
break;
- }
+
for (j = 0; j < i; j++) {
if (t->port_order[j] == t->port_order[i]) {
OSM_LOG(&t->osm->log, OSM_LOG_ERROR,
@@ -8484,7 +8482,7 @@ bool torus_lft(struct torus *t, struct t_switch *sw)
struct port_grp *pgrp;
struct t_switch *dsw;
osm_switch_t *osm_sw;
- unsigned order[IB_NODE_NUM_PORTS_MAX+1];
+ uint8_t order[IB_NODE_NUM_PORTS_MAX+1];
if (!(sw->osm_switch && sw->osm_switch->priv == sw)) {
OSM_LOG(&t->osm->log, OSM_LOG_ERROR,
@@ -8506,7 +8504,7 @@ bool torus_lft(struct torus *t, struct t_switch *sw)
for (p = 0; p < ARRAY_SIZE(order); p++) {
- unsigned px = order[t->port_order[p]];
+ uint8_t px = order[t->port_order[p]];
if (px == IB_INVALID_PORT_NUM)
continue;
--
1.7.5.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:[~2011-06-01 15:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 13:23 opensm: fixed port order configuration in torus routing engine Alex Netes
[not found] ` <20110530132345.GB20342-iQai9MGU/dyyaiaB+Ve85laTQe2KTcn/@public.gmane.org>
2011-05-31 15:41 ` Jim Schutt
[not found] ` <4DE50C21.7020305-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2011-06-01 15:40 ` Alex Netes [this message]
[not found] ` <20110601154046.GA1098-iQai9MGU/dyyaiaB+Ve85laTQe2KTcn/@public.gmane.org>
2011-06-01 22:30 ` [PATCH 1v2] " Jim Schutt
[not found] ` <4DE6BD7A.9030102-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2011-06-01 22:33 ` [PATCH 1/2] opensm: fail if configured torus port order references a port not available in all switches Jim Schutt
[not found] ` <1306967581-1015-1-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2011-06-03 10:49 ` Alex Netes
2011-06-01 22:33 ` [PATCH 2/2] opensm: use OSM_LOG_INFO on duplicate torus port order parsing Jim Schutt
[not found] ` <1306967581-1015-2-git-send-email-jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2011-06-03 10:49 ` Alex Netes
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=20110601154046.GA1098@calypso.voltaire.com \
--to=alexne-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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