Re: [PATCH 1v2] opensm: fixed port order configuration in torus routing engine

2011-06-01 Thread Jim Schutt

Alex Netes wrote:

Commit 1c2a298b295eba7e24205519abc24e47106d15df broke port order
configuration for torus routing engine. order was incorrectly initiated,
causing setting LFTs to fail.

Signed-off-by: Alex Netes ale...@mellanox.com


Acked-by: Jim Schutt jasc...@sandia.gov

Also, while reviewing this I noticed a couple things in the
port-order patch that I should have noticed earlier, but
didn't.  I have a couple of minor fixup patches that go on
top of this one, to send along in a minute.

-- Jim

--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: opensm: fixed port order configuration in torus routing engine

2011-05-31 Thread Jim Schutt

Hi Alex,

Alex Netes wrote:

Commit 1c2a298b295eba7e24205519abc24e47106d15df broke port order
configuration for torus routing engine. order was incorrectly initiated,
causing setting LFTs to fail.

Signed-off-by: Alex Netes ale...@mellanox.com
---
 opensm/osm_torus.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c
index cd3d490..75724d2 100644
--- a/opensm/osm_torus.c
+++ b/opensm/osm_torus.c
@@ -8484,7 +8484,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];
+   unsigned char 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 +8506,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]];

+   unsigned char px = order[t-port_order[p]];
 
 			if (px == IB_INVALID_PORT_NUM)

continue;


I guess the memset(order, IB_INVALID_PORT_NUM, sizeof(order))
a few lines up does the wrong thing without your fix,
since we compare here with IB_INVALID_PORT_NUM?

Nice catch - I'm sorry I missed it.

FWIW, ib_types.h uses uint8_t for ports - maybe should do
that here as well rather than unsigned char?

Acked-by: Jim Schutt jasc...@sandia.gov

-- Jim

--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


opensm: fixed port order configuration in torus routing engine

2011-05-30 Thread Alex Netes
Commit 1c2a298b295eba7e24205519abc24e47106d15df broke port order
configuration for torus routing engine. order was incorrectly initiated,
causing setting LFTs to fail.

Signed-off-by: Alex Netes ale...@mellanox.com
---
 opensm/osm_torus.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c
index cd3d490..75724d2 100644
--- a/opensm/osm_torus.c
+++ b/opensm/osm_torus.c
@@ -8484,7 +8484,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];
+   unsigned char 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 +8506,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]];
+   unsigned char px = order[t-port_order[p]];
 
if (px == IB_INVALID_PORT_NUM)
continue;
-- 
1.7.5.2

-- 

-- Alex
--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html