diff mbox

opensm/osm_sa_slvl_record.c: Fix out port for CAs and routers

Message ID 50CF4E7F.6040305@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Alex Netes
Headers show

Commit Message

Hal Rosenstock Dec. 17, 2012, 4:55 p.m. UTC
Also, no need to set in port there as already 0 due to memset

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
---
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Alex Netes Jan. 30, 2013, 5:47 p.m. UTC | #1
Hi Hal,

On 11:55 Mon 17 Dec     , Hal Rosenstock wrote:
> 
> Also, no need to set in port there as already 0 due to memset
> 
> Signed-off-by: Hal Rosenstock <hal@mellanox.com>
> ---

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

Patch

diff --git a/opensm/osm_sa_slvl_record.c b/opensm/osm_sa_slvl_record.c
index 8f6d7b8..12c87f7 100644
--- a/opensm/osm_sa_slvl_record.c
+++ b/opensm/osm_sa_slvl_record.c
@@ -103,8 +103,10 @@  static void sa_slvl_create(IN osm_sa_t * sa, IN const osm_physp_t * p_physp,
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
 	p_rec_item->rec.lid = lid;
-	p_rec_item->rec.out_port_num = osm_physp_get_port_num(p_physp);
-	p_rec_item->rec.in_port_num = in_port_idx;
+	if (p_physp->p_node->node_info.node_type == IB_NODE_TYPE_SWITCH) {
+		p_rec_item->rec.out_port_num = osm_physp_get_port_num(p_physp);
+		p_rec_item->rec.in_port_num = in_port_idx;
+	}
 	p_rec_item->rec.slvl_tbl =
 	    *(osm_physp_get_slvl_tbl(p_physp, in_port_idx));