[ofa-general] [PATCH] opensm: Add infrastructure support for MulticastFDBTop

Hal Rosenstock hnrose at comcast.net
Wed Aug 26 07:04:50 PDT 2009


Add support for SwitchInfo:MulticastFDBTop
Added by MgtWG errata #4505-4508

Add OpenSM infrastructure support to ib_types.h and osm_helper.c

Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
---
diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
index fe3f051..e1e2bdb 100644
--- a/opensm/include/iba/ib_types.h
+++ b/opensm/include/iba/ib_types.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 2002-2009 Mellanox Technologies LTD. All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
  * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
@@ -4492,7 +4492,7 @@ typedef struct _ib_port_info {
 #define IB_PORT_CAP_HAS_LINK_SPEED_WIDTH_PAIRS_TBL (CL_HTON32(0x08000000))
 #define IB_PORT_CAP_RESV28        (CL_HTON32(0x10000000))
 #define IB_PORT_CAP_RESV29        (CL_HTON32(0x20000000))
-#define IB_PORT_CAP_RESV30        (CL_HTON32(0x40000000))
+#define IB_PORT_CAP_HAS_MCAST_FDB_TOP (CL_HTON32(0x40000000))
 #define IB_PORT_CAP_RESV31        (CL_HTON32(0x80000000))
 
 /****f* IBA Base: Types/ib_port_info_get_port_state
@@ -5899,6 +5899,8 @@ typedef struct _ib_switch_info {
 	ib_net16_t lids_per_port;
 	ib_net16_t enforce_cap;
 	uint8_t flags;
+	uint8_t resvd;
+	ib_net16_t mcast_top;
 } PACK_SUFFIX ib_switch_info_t;
 #include <complib/cl_packoff.h>
 /************/
@@ -5908,7 +5910,7 @@ typedef struct _ib_switch_info_record {
 	ib_net16_t lid;
 	uint16_t resv0;
 	ib_switch_info_t switch_info;
-	uint8_t pad[3];
+	uint8_t pad[1];
 } PACK_SUFFIX ib_switch_info_record_t;
 #include <complib/cl_packoff.h>
 
diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
index 23392a4..b8a6523 100644
--- a/opensm/opensm/osm_helper.c
+++ b/opensm/opensm/osm_helper.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 2002-2009 Mellanox Technologies LTD. All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
  * Copyright (c) 2009 HNR Consulting. All rights reserved.
  * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
@@ -766,9 +766,9 @@ static void dbg_get_capabilities_str(IN char *p_buf, IN const uint32_t buf_size,
 				&total_len) != IB_SUCCESS)
 			return;
 	}
-	if (p_pi->capability_mask & IB_PORT_CAP_RESV30) {
+	if (p_pi->capability_mask & IB_PORT_CAP_HAS_MCAST_FDB_TOP) {
 		if (dbg_do_line(&p_local, buf_size, p_prefix_str,
-				"IB_PORT_CAP_RESV30\n",
+				"IB_PORT_CAP_HAS_MCAST_FDB_TOP\n",
 				&total_len) != IB_SUCCESS)
 			return;
 	}
@@ -1514,7 +1514,8 @@ void osm_dump_switch_info(IN osm_log_t * p_log,
 			"\t\t\t\tlife_state..............0x%X\n"
 			"\t\t\t\tlids_per_port...........%u\n"
 			"\t\t\t\tpartition_enf_cap.......0x%X\n"
-			"\t\t\t\tflags...................0x%X\n",
+			"\t\t\t\tflags...................0x%X\n"
+			"\t\t\t\tmcast_top...............0x%X\n",
 			cl_ntoh16(p_si->lin_cap),
 			cl_ntoh16(p_si->rand_cap),
 			cl_ntoh16(p_si->mcast_cap),
@@ -1524,7 +1525,8 @@ void osm_dump_switch_info(IN osm_log_t * p_log,
 			p_si->def_mcast_not_port,
 			p_si->life_state,
 			cl_ntoh16(p_si->lids_per_port),
-			cl_ntoh16(p_si->enforce_cap), p_si->flags);
+			cl_ntoh16(p_si->enforce_cap), p_si->flags,
+			cl_ntoh16(p_si->mcast_top));
 	}
 }
 



More information about the general mailing list