[ofa-general] ***SPAM*** [PATCH] ibsim: Add SMSL support to PortInfo attribute

Hal Rosenstock hnrose at comcast.net
Tue Mar 24 11:25:10 PDT 2009


Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>

---
diff --git a/ibsim/sim.h b/ibsim/sim.h
index 5e9b4f0..4c1439c 100644
--- a/ibsim/sim.h
+++ b/ibsim/sim.h
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This file is part of ibsim.
  *
@@ -189,6 +190,7 @@ struct Port {
 	int portnum;
 	int lid;
 	int smlid;
+	int smsl;
 	int linkwidth;
 	int linkwidthena;
 	int linkspeed;
diff --git a/ibsim/sim_mad.c b/ibsim/sim_mad.c
index d2c313c..a24e5d3 100644
--- a/ibsim/sim_mad.c
+++ b/ibsim/sim_mad.c
@@ -432,6 +432,7 @@ do_portinfo(Port * port, unsigned op, uint32_t portnum, uint8_t * data)
 		}
 		p->lid = newlid;
 		p->smlid = mad_get_field(data, 0, IB_PORT_SMLID_F);
+		p->smsl = mad_get_field(data, 0, IB_PORT_SMSL_F);
 //              p->linkwidth = mad_get_field(data, 0, IB_PORT_LINK_WIDTH_ENABLED_F); // ignored
 		p->lmc = mad_get_field(data, 0, IB_PORT_LMC_F);
 		p->hoqlife = mad_get_field(data, 0, IB_PORT_HOQ_LIFE_F);
diff --git a/ibsim/sim_net.c b/ibsim/sim_net.c
index 13c3b8c..8b95947 100644
--- a/ibsim/sim_net.c
+++ b/ibsim/sim_net.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This file is part of ibsim.
  *
@@ -1077,6 +1078,7 @@ void update_portinfo(Port * p)
 		      p->node->type == SWITCH_NODE ? 0 : p->portnum);
 	mad_set_field(pi, 0, IB_PORT_LID_F, p->lid);
 	mad_set_field(pi, 0, IB_PORT_SMLID_F, p->smlid);
+	mad_set_field(pi, 0, IB_PORT_SMSL_F, p->smsl);
 	mad_set_field(pi, 0, IB_PORT_OPER_VLS_F, p->op_vls);
 	mad_set_field(pi, 0, IB_PORT_LINK_WIDTH_ENABLED_F, p->linkwidthena);
 	mad_set_field(pi, 0, IB_PORT_LINK_WIDTH_SUPPORTED_F,



More information about the general mailing list