[openib-general] [PATCH 3/4] OpenSM: Other changes to incorporate optional SA MFTRecord support
Hal Rosenstock
halr at voltaire.com
Fri Dec 29 09:12:22 PST 2006
OpenSM: Other changes to incorporate optional SA MFTRecord support
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
diff --git a/osm/include/Makefile.am b/osm/include/Makefile.am
index d051b9a..ea8ab10 100644
--- a/osm/include/Makefile.am
+++ b/osm/include/Makefile.am
@@ -28,6 +28,7 @@ EXTRA_DIST = \
$(srcdir)/opensm/osm_sa_service_record_ctrl.h \
$(srcdir)/opensm/osm_pkey_rcv_ctrl.h \
$(srcdir)/opensm/osm_sa_lft_record.h \
+ $(srcdir)/opensm/osm_sa_mft_record.h \
$(srcdir)/opensm/osm_resp.h \
$(srcdir)/opensm/osm_partition.h \
$(srcdir)/opensm/osm_slvl_map_rcv_ctrl.h \
@@ -47,6 +48,7 @@ EXTRA_DIST = \
$(srcdir)/opensm/osm_sminfo_rcv_ctrl.h \
$(srcdir)/opensm/osm_sa_pkey_record.h \
$(srcdir)/opensm/osm_sa_lft_record_ctrl.h \
+ $(srcdir)/opensm/osm_sa_mft_record_ctrl.h \
$(srcdir)/opensm/osm_inform.h \
$(srcdir)/opensm/osm_path.h \
$(srcdir)/opensm/osm_lin_fwd_rcv.h \
diff --git a/osm/include/opensm/osm_msgdef.h b/osm/include/opensm/osm_msgdef.h
index 3611025..87c943f 100644
--- a/osm/include/opensm/osm_msgdef.h
+++ b/osm/include/opensm/osm_msgdef.h
@@ -196,6 +196,7 @@ enum
OSM_MSG_MAD_GUIDINFO_RECORD,
OSM_MSG_MAD_INFORM_INFO_RECORD,
OSM_MSG_MAD_SWITCH_INFO_RECORD,
+ OSM_MSG_MAD_MFT_RECORD,
#if defined (VENDOR_RMPP_SUPPORT) && defined (DUAL_SIDED_RMPP)
OSM_MSG_MAD_MULTIPATH_RECORD,
#endif
diff --git a/osm/include/opensm/osm_sa.h b/osm/include/opensm/osm_sa.h
index ae8d5ac..1508f44 100644
--- a/osm/include/opensm/osm_sa.h
+++ b/osm/include/opensm/osm_sa.h
@@ -77,6 +77,7 @@
#include <opensm/osm_sa_pkey_record_ctrl.h>
#include <opensm/osm_sa_lft_record_ctrl.h>
#include <opensm/osm_sa_sw_info_record_ctrl.h>
+#include <opensm/osm_sa_mft_record_ctrl.h>
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
@@ -195,6 +196,10 @@ typedef struct _osm_sa
/* SwitchInfo Query */
osm_sir_rcv_t sir_rcv;
osm_sir_rcv_ctrl_t sir_rcv_ctrl;
+
+ /* MulticastForwardingTable Query */
+ osm_mftr_rcv_t mftr_rcv;
+ osm_mftr_rcv_ctrl_t mftr_rcv_ctrl;
} osm_sa_t;
/*
* FIELDS
diff --git a/osm/opensm/Makefile.am b/osm/opensm/Makefile.am
index aed60d7..8f42387 100644
--- a/osm/opensm/Makefile.am
+++ b/osm/opensm/Makefile.am
@@ -43,7 +43,8 @@ opensm_SOURCES = main.c osm_console.c os
osm_resp.c osm_sa.c osm_sa_class_port_info.c \
osm_sa_class_port_info_ctrl.c osm_sa_informinfo.c \
osm_sa_informinfo_ctrl.c osm_sa_lft_record.c \
- osm_sa_lft_record_ctrl.c osm_sa_link_record.c \
+ osm_sa_lft_record_ctrl.c osm_sa_mft_record.c \
+ osm_sa_mft_record_ctrl.c osm_sa_link_record.c \
osm_sa_link_record_ctrl.c osm_sa_mad_ctrl.c \
osm_sa_mcmember_record.c osm_sa_mcmember_record_ctrl.c \
osm_sa_node_record.c osm_sa_node_record_ctrl.c \
diff --git a/osm/opensm/osm_sa.c b/osm/opensm/osm_sa.c
index 983d5e5..7a993f1 100644
--- a/osm/opensm/osm_sa.c
+++ b/osm/opensm/osm_sa.c
@@ -131,6 +131,9 @@ osm_sa_construct(
osm_sir_rcv_construct( &p_sa->sir_rcv );
osm_sir_rcv_ctrl_construct( &p_sa->sir_rcv_ctrl );
+
+ osm_mftr_rcv_construct( &p_sa->mftr_rcv );
+ osm_mftr_rcv_ctrl_construct( &p_sa->mftr_rcv_ctrl );
}
/**********************************************************************
@@ -163,6 +166,7 @@ osm_sa_shutdown(
osm_pkey_rec_rcv_ctrl_destroy( &p_sa->pkey_rec_rcv_ctrl );
osm_lftr_rcv_ctrl_destroy( &p_sa->lftr_rcv_ctrl );
osm_sir_rcv_ctrl_destroy( &p_sa->sir_rcv_ctrl );
+ osm_mftr_rcv_ctrl_destroy( &p_sa->mftr_rcv_ctrl );
osm_sa_mad_ctrl_destroy( &p_sa->mad_ctrl );
OSM_LOG_EXIT( p_sa->p_log );
@@ -195,6 +199,7 @@ osm_sa_destroy(
osm_pkey_rec_rcv_destroy( &p_sa->pkey_rec_rcv );
osm_lftr_rcv_destroy( &p_sa->lftr_rcv );
osm_sir_rcv_destroy( &p_sa->sir_rcv );
+ osm_mftr_rcv_destroy( &p_sa->mftr_rcv );
osm_sa_resp_destroy( &p_sa->resp );
OSM_LOG_EXIT( p_sa->p_log );
@@ -537,6 +542,24 @@ osm_sa_init(
if( status != IB_SUCCESS )
goto Exit;
+ status = osm_mftr_rcv_init(
+ &p_sa->mftr_rcv,
+ &p_sa->resp,
+ p_sa->p_mad_pool,
+ p_subn,
+ p_log,
+ p_lock);
+ if( status != IB_SUCCESS )
+ goto Exit;
+
+ status = osm_mftr_rcv_ctrl_init(
+ &p_sa->mftr_rcv_ctrl,
+ &p_sa->mftr_rcv,
+ p_log,
+ p_disp );
+ if( status != IB_SUCCESS )
+ goto Exit;
+
Exit:
OSM_LOG_EXIT( p_log );
return( status );
diff --git a/osm/opensm/osm_sa_class_port_info.c b/osm/opensm/osm_sa_class_port_info.c
index 4d7bcbb..84fa016 100644
--- a/osm/opensm/osm_sa_class_port_info.c
+++ b/osm/opensm/osm_sa_class_port_info.c
@@ -195,7 +195,6 @@ __osm_cpi_rcv_respond(
/* we do not support the following optional records:
OSM_CAP_IS_SUBN_OPT_RECS_SUP :
RandomForwardingTableRecord,
- MulticastForwardingTableRecord,
ServiceAssociationRecord
other optional records supported "under the table"
diff --git a/osm/opensm/osm_sa_mad_ctrl.c b/osm/opensm/osm_sa_mad_ctrl.c
index 90c732d..85d0b2a 100644
--- a/osm/opensm/osm_sa_mad_ctrl.c
+++ b/osm/opensm/osm_sa_mad_ctrl.c
@@ -216,6 +216,10 @@ __osm_sa_mad_ctrl_process(
msg_id = OSM_MSG_MAD_SWITCH_INFO_RECORD;
break;
+ case IB_MAD_ATTR_MFT_RECORD:
+ msg_id = OSM_MSG_MAD_MFT_RECORD;
+ break;
+
#if defined (VENDOR_RMPP_SUPPORT) && defined (DUAL_SIDED_RMPP)
case IB_MAD_ATTR_MULTIPATH_RECORD:
msg_id = OSM_MSG_MAD_MULTIPATH_RECORD;
More information about the general
mailing list