[ofa-general] [PATCH] opensm: cleanup dummy SM req and resp objects

Sasha Khapyorsky sashak at voltaire.com
Sun Jan 6 07:52:22 PST 2008


Cleanup dummy SM req and resp objects, eliminate data duplications.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/include/opensm/osm_drop_mgr.h     |    5 -
 opensm/include/opensm/osm_lid_mgr.h      |    5 -
 opensm/include/opensm/osm_link_mgr.h     |    5 -
 opensm/include/opensm/osm_mcast_mgr.h    |    5 -
 opensm/include/opensm/osm_perfmgr.h      |    1 -
 opensm/include/opensm/osm_pkey.h         |    2 +-
 opensm/include/opensm/osm_req.h          |  107 ----------------------
 opensm/include/opensm/osm_resp.h         |   37 --------
 opensm/include/opensm/osm_sm.h           |  143 +++++++++++++++++++++++++++--
 opensm/include/opensm/osm_sm_state_mgr.h |    4 -
 opensm/include/opensm/osm_state_mgr.h    |    4 -
 opensm/include/opensm/osm_ucast_mgr.h    |    5 -
 opensm/opensm/osm_drop_mgr.c             |    1 -
 opensm/opensm/osm_lid_mgr.c              |    3 +-
 opensm/opensm/osm_link_mgr.c             |    3 +-
 opensm/opensm/osm_mcast_mgr.c            |    5 +-
 opensm/opensm/osm_node_info_rcv.c        |   18 +---
 opensm/opensm/osm_perfmgr.c              |    8 +-
 opensm/opensm/osm_pkey_mgr.c             |   38 ++++-----
 opensm/opensm/osm_port_info_rcv.c        |   14 +--
 opensm/opensm/osm_qos.c                  |   32 ++++----
 opensm/opensm/osm_req.c                  |   86 +++++-------------
 opensm/opensm/osm_resp.c                 |   64 +++-----------
 opensm/opensm/osm_sm.c                   |   14 ---
 opensm/opensm/osm_sm_state_mgr.c         |    3 +-
 opensm/opensm/osm_sminfo_rcv.c           |    8 +-
 opensm/opensm/osm_state_mgr.c            |   17 ++---
 opensm/opensm/osm_sw_info_rcv.c          |    4 +-
 opensm/opensm/osm_trap_rcv.c             |    5 +-
 opensm/opensm/osm_ucast_mgr.c            |    8 +--
 opensm/opensm/osm_vl_arb_rcv.c           |    1 -
 31 files changed, 234 insertions(+), 421 deletions(-)

diff --git a/opensm/include/opensm/osm_drop_mgr.h b/opensm/include/opensm/osm_drop_mgr.h
index c9d881c..758fe60 100644
--- a/opensm/include/opensm/osm_drop_mgr.h
+++ b/opensm/include/opensm/osm_drop_mgr.h
@@ -52,7 +52,6 @@
 #include <opensm/osm_base.h>
 #include <opensm/osm_madw.h>
 #include <opensm/osm_subnet.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_log.h>
 
 #ifdef __cplusplus
@@ -98,7 +97,6 @@ typedef struct _osm_drop_mgr {
 	struct osm_sm *sm;
 	osm_subn_t *p_subn;
 	osm_log_t *p_log;
-	osm_req_t *p_req;
 	cl_plock_t *p_lock;
 
 } osm_drop_mgr_t;
@@ -113,9 +111,6 @@ typedef struct _osm_drop_mgr {
 *	p_log
 *		Pointer to the log object.
 *
-*	p_req
-*		Pointer to the Request object.
-*
 *	p_lock
 *		Pointer to the serializing lock.
 *
diff --git a/opensm/include/opensm/osm_lid_mgr.h b/opensm/include/opensm/osm_lid_mgr.h
index d76cf56..15b230f 100644
--- a/opensm/include/opensm/osm_lid_mgr.h
+++ b/opensm/include/opensm/osm_lid_mgr.h
@@ -51,7 +51,6 @@
 #include <complib/cl_passivelock.h>
 #include <opensm/osm_base.h>
 #include <opensm/osm_madw.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_subnet.h>
 #include <opensm/osm_db.h>
 #include <opensm/osm_log.h>
@@ -100,7 +99,6 @@ typedef struct _osm_lid_mgr {
 	struct osm_sm *sm;
 	osm_subn_t *p_subn;
 	osm_db_t *p_db;
-	osm_req_t *p_req;
 	osm_log_t *p_log;
 	cl_plock_t *p_lock;
 	boolean_t send_set_reqs;
@@ -119,9 +117,6 @@ typedef struct _osm_lid_mgr {
 *	p_db
 *		Pointer to the database (persistency) object
 *
-*	p_req
-*		Pointer to the Requester object sending SMPs.
-*
 *	p_log
 *		Pointer to the log object.
 *
diff --git a/opensm/include/opensm/osm_link_mgr.h b/opensm/include/opensm/osm_link_mgr.h
index c9cd796..3c799a6 100644
--- a/opensm/include/opensm/osm_link_mgr.h
+++ b/opensm/include/opensm/osm_link_mgr.h
@@ -51,7 +51,6 @@
 #include <complib/cl_passivelock.h>
 #include <opensm/osm_base.h>
 #include <opensm/osm_madw.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_subnet.h>
 #include <opensm/osm_log.h>
 
@@ -97,7 +96,6 @@ struct osm_sm;
 typedef struct _osm_link_mgr {
 	struct osm_sm *sm;
 	osm_subn_t *p_subn;
-	osm_req_t *p_req;
 	osm_log_t *p_log;
 	cl_plock_t *p_lock;
 } osm_link_mgr_t;
@@ -109,9 +107,6 @@ typedef struct _osm_link_mgr {
 *	p_subn
 *		Pointer to the Subnet object for this subnet.
 *
-*	p_req
-*		Pointer to the Requester object sending SMPs.
-*
 *	p_log
 *		Pointer to the log object.
 *
diff --git a/opensm/include/opensm/osm_mcast_mgr.h b/opensm/include/opensm/osm_mcast_mgr.h
index 08e4b7a..5f89c0b 100644
--- a/opensm/include/opensm/osm_mcast_mgr.h
+++ b/opensm/include/opensm/osm_mcast_mgr.h
@@ -51,7 +51,6 @@
 #include <complib/cl_passivelock.h>
 #include <opensm/osm_base.h>
 #include <opensm/osm_madw.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_subnet.h>
 #include <opensm/osm_log.h>
 #include <opensm/osm_multicast.h>
@@ -99,7 +98,6 @@ struct osm_sm;
 typedef struct _osm_mcast_mgr {
 	struct osm_sm *sm;
 	osm_subn_t *p_subn;
-	osm_req_t *p_req;
 	osm_log_t *p_log;
 	cl_plock_t *p_lock;
 } osm_mcast_mgr_t;
@@ -111,9 +109,6 @@ typedef struct _osm_mcast_mgr {
 *	p_subn
 *		Pointer to the Subnet object for this subnet.
 *
-*	p_req
-*		Pointer to the Requester object sending SMPs.
-*
 *	p_log
 *		Pointer to the log object.
 *
diff --git a/opensm/include/opensm/osm_perfmgr.h b/opensm/include/opensm/osm_perfmgr.h
index 4bd05f5..9152f5f 100644
--- a/opensm/include/opensm/osm_perfmgr.h
+++ b/opensm/include/opensm/osm_perfmgr.h
@@ -46,7 +46,6 @@
 #include <complib/cl_event.h>
 #include <complib/cl_timer.h>
 #include <opensm/osm_subnet.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_log.h>
 #include <opensm/osm_perfmgr_db.h>
 #include <opensm/osm_sm.h>
diff --git a/opensm/include/opensm/osm_pkey.h b/opensm/include/opensm/osm_pkey.h
index 0dce001..c1cdcc6 100644
--- a/opensm/include/opensm/osm_pkey.h
+++ b/opensm/include/opensm/osm_pkey.h
@@ -38,10 +38,10 @@
 
 #include <iba/ib_types.h>
 #include <complib/cl_dispatcher.h>
+#include <complib/cl_map.h>
 #include <opensm/osm_base.h>
 #include <opensm/osm_log.h>
 #include <opensm/osm_msgdef.h>
-#include <opensm/osm_req.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
diff --git a/opensm/include/opensm/osm_req.h b/opensm/include/opensm/osm_req.h
index 1d6b26e..6a32f70 100644
--- a/opensm/include/opensm/osm_req.h
+++ b/opensm/include/opensm/osm_req.h
@@ -233,112 +233,5 @@ osm_req_init(IN osm_req_t * const p_req,
 *	osm_req_destroy
 *********/
 
-/****f* OpenSM: Generic Requester/osm_req_get
-* NAME
-*	osm_req_get
-*
-* DESCRIPTION
-*	Starts the process to transmit a directed route request for
-*	the attribute.
-*
-* SYNOPSIS
-*/
-ib_api_status_t
-osm_req_get(IN const osm_req_t * const p_req,
-	    IN const osm_dr_path_t * const p_path,
-	    IN const uint16_t attr_id,
-	    IN const uint32_t attr_mod,
-	    IN const cl_disp_msgid_t err_msg,
-	    IN const osm_madw_context_t * const p_context);
-/*
-* PARAMETERS
-*	p_req
-*		[in] Pointer to an osm_req_t object.
-*
-*	p_path
-*		[in] Pointer to the directed route path to the node
-*		from which to retrieve the attribute.
-*
-*	attr_id
-*		[in] Attribute ID to request.
-*
-*	attr_mod
-*		[in] Attribute modifier for this request.
-*
-*	err_msg
-*		[in] Message id with which to post this MAD if an error occurs.
-*
-*	p_context
-*		[in] Mad wrapper context structure to be copied into the wrapper
-*		context, and thus visible to the recipient of the response.
-*
-* RETURN VALUES
-*	IB_SUCCESS if the request was successful.
-*
-* NOTES
-*	This function asynchronously requests the specified attribute.
-*	The response from the node will be routed through the Dispatcher
-*	to the appropriate receive controller object.
-*
-* SEE ALSO
-*	Generic Requester
-*********/
-/****f* OpenSM: Generic Requester/osm_req_set
-* NAME
-*	osm_req_set
-*
-* DESCRIPTION
-*	Starts the process to transmit a directed route Set() request.
-*
-* SYNOPSIS
-*/
-ib_api_status_t
-osm_req_set(IN const osm_req_t * const p_req,
-	    IN const osm_dr_path_t * const p_path,
-	    IN const uint8_t * const p_payload,
-	    IN const size_t payload_size,
-	    IN const uint16_t attr_id,
-	    IN const uint32_t attr_mod,
-	    IN const cl_disp_msgid_t err_msg,
-	    IN const osm_madw_context_t * const p_context);
-/*
-* PARAMETERS
-*	p_req
-*		[in] Pointer to an osm_req_t object.
-*
-*	p_path
-*		[in] Pointer to the directed route path of the recipient.
-*
-*	p_payload
-*		[in] Pointer to the SMP payload to send.
-*
-*	payload_size
-*		[in] The size of the payload to be copied to the SMP data field.
-*
-*	attr_id
-*		[in] Attribute ID to request.
-*
-*	attr_mod
-*		[in] Attribute modifier for this request.
-*
-*	err_msg
-*		[in] Message id with which to post this MAD if an error occurs.
-*
-*	p_context
-*		[in] Mad wrapper context structure to be copied into the wrapper
-*		context, and thus visible to the recipient of the response.
-*
-* RETURN VALUES
-*	IB_SUCCESS if the request was successful.
-*
-* NOTES
-*	This function asynchronously requests the specified attribute.
-*	The response from the node will be routed through the Dispatcher
-*	to the appropriate receive controller object.
-*
-* SEE ALSO
-*	Generic Requester
-*********/
-
 END_C_DECLS
 #endif				/* _OSM_REQ_H_ */
diff --git a/opensm/include/opensm/osm_resp.h b/opensm/include/opensm/osm_resp.h
index 4299f98..115d227 100644
--- a/opensm/include/opensm/osm_resp.h
+++ b/opensm/include/opensm/osm_resp.h
@@ -225,42 +225,5 @@ osm_resp_init(IN osm_resp_t * const p_resp,
 *	osm_resp_destroy
 *********/
 
-/****f* OpenSM: Generic Responder/osm_resp_send
-* NAME
-*	osm_resp_send
-*
-* DESCRIPTION
-*	Starts the process to transmit a directed route response.
-*
-* SYNOPSIS
-*/
-ib_api_status_t
-osm_resp_send(IN const osm_resp_t * const p_resp,
-	      IN const osm_madw_t * const p_req_madw,
-	      IN const ib_net16_t status, IN const uint8_t * const p_payload);
-/*
-* PARAMETERS
-*	p_resp
-*		[in] Pointer to an osm_resp_t object.
-*
-*	p_madw
-*		[in] Pointer to the MAD Wrapper object for the requesting MAD
-*		to which this response is generated.
-*
-*	status
-*		[in] Status for this response.
-*
-*	p_payload
-*		[in] Pointer to the payload of the response MAD.
-*
-* RETURN VALUES
-*	IB_SUCCESS if the response was successful.
-*
-* NOTES
-*
-* SEE ALSO
-*	Generic Responder
-*********/
-
 END_C_DECLS
 #endif				/* _OSM_RESP_H_ */
diff --git a/opensm/include/opensm/osm_sm.h b/opensm/include/opensm/osm_sm.h
index f68d59e..e0b3d01 100644
--- a/opensm/include/opensm/osm_sm.h
+++ b/opensm/include/opensm/osm_sm.h
@@ -59,8 +59,6 @@
 #include <opensm/osm_subnet.h>
 #include <opensm/osm_vl15intf.h>
 #include <opensm/osm_mad_pool.h>
-#include <opensm/osm_req.h>
-#include <opensm/osm_resp.h>
 #include <opensm/osm_log.h>
 #include <opensm/osm_sm_mad_ctrl.h>
 #include <opensm/osm_lid_mgr.h>
@@ -133,8 +131,6 @@ typedef struct osm_sm {
 	atomic32_t sm_trans_id;
 	cl_spinlock_t mgrp_lock;
 	cl_qlist_t mgrp_list;
-	osm_req_t req;
-	osm_resp_t resp;
 	osm_sm_mad_ctrl_t mad_ctrl;
 	osm_lid_mgr_t lid_mgr;
 	osm_ucast_mgr_t ucast_mgr;
@@ -176,12 +172,6 @@ typedef struct osm_sm {
 *	p_vl15
 *		Pointer to the VL15 interface.
 *
-*	req
-*		Generic MAD attribute requester.
-*
-*	resp
-*		MAD attribute responder.
-*
 *	mad_ctrl
 *		MAD Controller.
 *
@@ -413,6 +403,139 @@ osm_sm_bind(IN osm_sm_t * const p_sm, IN const ib_net64_t port_guid);
 * SEE ALSO
 *********/
 
+/****f* OpenSM: SM/osm_req_get
+* NAME
+*	osm_req_get
+*
+* DESCRIPTION
+*	Starts the process to transmit a directed route request for
+*	the attribute.
+*
+* SYNOPSIS
+*/
+ib_api_status_t
+osm_req_get(IN osm_sm_t * sm,
+	    IN const osm_dr_path_t * const p_path,
+	    IN const uint16_t attr_id,
+	    IN const uint32_t attr_mod,
+	    IN const cl_disp_msgid_t err_msg,
+	    IN const osm_madw_context_t * const p_context);
+/*
+* PARAMETERS
+*	sm
+*		[in] Pointer to an osm_sm_t object.
+*
+*	p_path
+*		[in] Pointer to the directed route path to the node
+*		from which to retrieve the attribute.
+*
+*	attr_id
+*		[in] Attribute ID to request.
+*
+*	attr_mod
+*		[in] Attribute modifier for this request.
+*
+*	err_msg
+*		[in] Message id with which to post this MAD if an error occurs.
+*
+*	p_context
+*		[in] Mad wrapper context structure to be copied into the wrapper
+*		context, and thus visible to the recipient of the response.
+*
+* RETURN VALUES
+*	IB_SUCCESS if the request was successful.
+*
+* NOTES
+*	This function asynchronously requests the specified attribute.
+*	The response from the node will be routed through the Dispatcher
+*	to the appropriate receive controller object.
+*********/
+/****f* OpenSM: SM/osm_req_set
+* NAME
+*	osm_req_set
+*
+* DESCRIPTION
+*	Starts the process to transmit a directed route Set() request.
+*
+* SYNOPSIS
+*/
+ib_api_status_t
+osm_req_set(IN osm_sm_t * sm,
+	    IN const osm_dr_path_t * const p_path,
+	    IN const uint8_t * const p_payload,
+	    IN const size_t payload_size,
+	    IN const uint16_t attr_id,
+	    IN const uint32_t attr_mod,
+	    IN const cl_disp_msgid_t err_msg,
+	    IN const osm_madw_context_t * const p_context);
+/*
+* PARAMETERS
+*	sm
+*		[in] Pointer to an osm_sm_t object.
+*
+*	p_path
+*		[in] Pointer to the directed route path of the recipient.
+*
+*	p_payload
+*		[in] Pointer to the SMP payload to send.
+*
+*	payload_size
+*		[in] The size of the payload to be copied to the SMP data field.
+*
+*	attr_id
+*		[in] Attribute ID to request.
+*
+*	attr_mod
+*		[in] Attribute modifier for this request.
+*
+*	err_msg
+*		[in] Message id with which to post this MAD if an error occurs.
+*
+*	p_context
+*		[in] Mad wrapper context structure to be copied into the wrapper
+*		context, and thus visible to the recipient of the response.
+*
+* RETURN VALUES
+*	IB_SUCCESS if the request was successful.
+*
+* NOTES
+*	This function asynchronously requests the specified attribute.
+*	The response from the node will be routed through the Dispatcher
+*	to the appropriate receive controller object.
+*********/
+/****f* OpenSM: SM/osm_resp_send
+* NAME
+*	osm_resp_send
+*
+* DESCRIPTION
+*	Starts the process to transmit a directed route response.
+*
+* SYNOPSIS
+*/
+ib_api_status_t
+osm_resp_send(IN osm_sm_t * sm,
+	      IN const osm_madw_t * const p_req_madw,
+	      IN const ib_net16_t status, IN const uint8_t * const p_payload);
+/*
+* PARAMETERS
+*	p_resp
+*		[in] Pointer to an osm_resp_t object.
+*
+*	p_madw
+*		[in] Pointer to the MAD Wrapper object for the requesting MAD
+*		to which this response is generated.
+*
+*	status
+*		[in] Status for this response.
+*
+*	p_payload
+*		[in] Pointer to the payload of the response MAD.
+*
+* RETURN VALUES
+*	IB_SUCCESS if the response was successful.
+*
+*********/
+
 /****f* OpenSM: SM/osm_sm_mcgrp_join
 * NAME
 *	osm_sm_mcgrp_join
diff --git a/opensm/include/opensm/osm_sm_state_mgr.h b/opensm/include/opensm/osm_sm_state_mgr.h
index db05e2f..3007554 100644
--- a/opensm/include/opensm/osm_sm_state_mgr.h
+++ b/opensm/include/opensm/osm_sm_state_mgr.h
@@ -107,7 +107,6 @@ typedef struct _osm_sm_state_mgr {
 	uint32_t retry_number;
 	ib_net64_t master_guid;
 	osm_subn_t *p_subn;
-	osm_req_t *p_req;
 	osm_log_t *p_log;
 	osm_remote_sm_t *p_polling_sm;
 } osm_sm_state_mgr_t;
@@ -133,9 +132,6 @@ typedef struct _osm_sm_state_mgr {
 *	p_subn
 *		Pointer to the Subnet object for this subnet.
 *
-*	p_req
-*		Pointer to the generic attribute request object.
-*
 *	p_log
 *		Pointer to the log object.
 *
diff --git a/opensm/include/opensm/osm_state_mgr.h b/opensm/include/opensm/osm_state_mgr.h
index 968f233..f3886ec 100644
--- a/opensm/include/opensm/osm_state_mgr.h
+++ b/opensm/include/opensm/osm_state_mgr.h
@@ -107,7 +107,6 @@ typedef struct _osm_state_mgr {
 	osm_mcast_mgr_t *p_mcast_mgr;
 	osm_link_mgr_t *p_link_mgr;
 	osm_drop_mgr_t *p_drop_mgr;
-	osm_req_t *p_req;
 	osm_stats_t *p_stats;
 	struct _osm_sm_state_mgr *p_sm_state_mgr;
 	const osm_sm_mad_ctrl_t *p_mad_ctrl;
@@ -141,9 +140,6 @@ typedef struct _osm_state_mgr {
 *	p_drop_mgr
 *		Pointer to the Drop Manager object.
 *
-*	p_req
-*		Pointer to the Requester object sending SMPs.
-*
 *	p_stats
 *		Pointer to the OpenSM statistics block.
 *
diff --git a/opensm/include/opensm/osm_ucast_mgr.h b/opensm/include/opensm/osm_ucast_mgr.h
index 1868eae..2acab49 100644
--- a/opensm/include/opensm/osm_ucast_mgr.h
+++ b/opensm/include/opensm/osm_ucast_mgr.h
@@ -51,7 +51,6 @@
 #include <complib/cl_passivelock.h>
 #include <opensm/osm_base.h>
 #include <opensm/osm_madw.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_subnet.h>
 #include <opensm/osm_switch.h>
 #include <opensm/osm_log.h>
@@ -99,7 +98,6 @@ struct osm_sm;
 typedef struct _osm_ucast_mgr {
 	struct osm_sm *sm;
 	osm_subn_t *p_subn;
-	osm_req_t *p_req;
 	osm_log_t *p_log;
 	cl_plock_t *p_lock;
 	boolean_t is_dor;
@@ -115,9 +113,6 @@ typedef struct _osm_ucast_mgr {
 *	p_subn
 *		Pointer to the Subnet object for this subnet.
 *
-*	p_req
-*		Pointer to the Requester object sending SMPs.
-*
 *	p_log
 *		Pointer to the log object.
 *
diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
index 202b33c..39ceaa1 100644
--- a/opensm/opensm/osm_drop_mgr.c
+++ b/opensm/opensm/osm_drop_mgr.c
@@ -101,7 +101,6 @@ osm_drop_mgr_init(IN osm_drop_mgr_t * const p_mgr, IN osm_sm_t * sm)
 	p_mgr->p_log = sm->p_log;
 	p_mgr->p_subn = sm->p_subn;
 	p_mgr->p_lock = sm->p_lock;
-	p_mgr->p_req = &sm->req;
 
 	OSM_LOG_EXIT(p_mgr->p_log);
 	return (status);
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index 3194f42..f248676 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -254,7 +254,6 @@ osm_lid_mgr_init(IN osm_lid_mgr_t * const p_mgr, IN osm_sm_t *sm)
 	p_mgr->p_subn = sm->p_subn;
 	p_mgr->p_db = sm->p_db;
 	p_mgr->p_lock = sm->p_lock;
-	p_mgr->p_req = &sm->req;
 
 	/* we initialize and restore the db domain of guid to lid map */
 	p_mgr->p_g2l = osm_db_domain_init(p_mgr->p_db, "/guid2lid");
@@ -1149,7 +1148,7 @@ __osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
 
 	if (send_set) {
 		p_mgr->send_set_reqs = TRUE;
-		status = osm_req_set(p_mgr->p_req,
+		status = osm_req_set(p_mgr->sm,
 				     osm_physp_get_dr_path_ptr(p_physp),
 				     payload,
 				     sizeof(payload),
diff --git a/opensm/opensm/osm_link_mgr.c b/opensm/opensm/osm_link_mgr.c
index d5e0956..3d38362 100644
--- a/opensm/opensm/osm_link_mgr.c
+++ b/opensm/opensm/osm_link_mgr.c
@@ -89,7 +89,6 @@ osm_link_mgr_init(IN osm_link_mgr_t * const p_mgr, IN osm_sm_t * sm)
 	p_mgr->p_log = sm->p_log;
 	p_mgr->p_subn = sm->p_subn;
 	p_mgr->p_lock = sm->p_lock;
-	p_mgr->p_req = &sm->req;
 
 	OSM_LOG_EXIT(p_mgr->p_log);
 	return (status);
@@ -371,7 +370,7 @@ __osm_link_mgr_set_physp_pi(IN osm_link_mgr_t * const p_mgr,
 		send_set = TRUE;
 
 	if (send_set)
-		status = osm_req_set(p_mgr->p_req,
+		status = osm_req_set(p_mgr->sm,
 				     osm_physp_get_dr_path_ptr(p_physp),
 				     payload,
 				     sizeof(payload),
diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index 3bdbd31..be220c5 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -387,7 +387,6 @@ osm_mcast_mgr_init(IN osm_mcast_mgr_t * const p_mgr, IN osm_sm_t * sm)
 	p_mgr->p_log = sm->p_log;
 	p_mgr->p_subn = sm->p_subn;
 	p_mgr->p_lock = sm->p_lock;
-	p_mgr->p_req = &sm->req;
 
 	OSM_LOG_EXIT(p_mgr->p_log);
 	return (status);
@@ -447,9 +446,7 @@ __osm_mcast_mgr_set_tbl(IN osm_mcast_mgr_t * const p_mgr,
 
 		block_id_ho = block_num + (position << 28);
 
-		status = osm_req_set(p_mgr->p_req,
-				     p_path,
-				     (void *)block,
+		status = osm_req_set(p_mgr->sm, p_path, (void *)block,
 				     sizeof(block),
 				     IB_MAD_ATTR_MCAST_FWD_TBL,
 				     cl_hton32(block_id_ho),
diff --git a/opensm/opensm/osm_node_info_rcv.c b/opensm/opensm/osm_node_info_rcv.c
index b84788a..50287dc 100644
--- a/opensm/opensm/osm_node_info_rcv.c
+++ b/opensm/opensm/osm_node_info_rcv.c
@@ -55,7 +55,6 @@
 #include <complib/cl_qmap.h>
 #include <complib/cl_passivelock.h>
 #include <complib/cl_debug.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_madw.h>
 #include <opensm/osm_log.h>
 #include <opensm/osm_node.h>
@@ -116,9 +115,7 @@ static void requery_dup_node_info(IN osm_sm_t * sm,
 	context.ni_context.dup_port_num = p_physp->port_num;
 	context.ni_context.dup_count = count;
 
-	status = osm_req_get(&sm->req,
-			     &path,
-			     IB_MAD_ATTR_NODE_INFO,
+	status = osm_req_get(sm, &path, IB_MAD_ATTR_NODE_INFO,
 			     0, CL_DISP_MSGID_NONE, &context);
 
 	if (status != IB_SUCCESS)
@@ -313,8 +310,7 @@ __osm_ni_rcv_process_new_node(IN osm_sm_t * sm,
 	context.pi_context.light_sweep = FALSE;
 	context.pi_context.active_transition = FALSE;
 
-	status = osm_req_get(&sm->req,
-			     osm_physp_get_dr_path_ptr(p_physp),
+	status = osm_req_get(sm, osm_physp_get_dr_path_ptr(p_physp),
 			     IB_MAD_ATTR_PORT_INFO,
 			     cl_hton32(port_num), CL_DISP_MSGID_NONE, &context);
 	if (status != IB_SUCCESS)
@@ -367,8 +363,7 @@ __osm_ni_rcv_get_node_desc(IN osm_sm_t * sm,
 
 	context.nd_context.node_guid = osm_node_get_node_guid(p_node);
 
-	status = osm_req_get(&sm->req,
-			     osm_physp_get_dr_path_ptr(p_physp),
+	status = osm_req_get(sm, osm_physp_get_dr_path_ptr(p_physp),
 			     IB_MAD_ATTR_NODE_DESC,
 			     0, CL_DISP_MSGID_NONE, &context);
 	if (status != IB_SUCCESS)
@@ -509,8 +504,7 @@ __osm_ni_rcv_process_existing_ca_or_router(IN osm_sm_t * sm,
 	context.pi_context.update_master_sm_base_lid = FALSE;
 	context.pi_context.light_sweep = FALSE;
 
-	status = osm_req_get(&sm->req,
-			     osm_physp_get_dr_path_ptr(p_physp),
+	status = osm_req_get(sm, osm_physp_get_dr_path_ptr(p_physp),
 			     IB_MAD_ATTR_PORT_INFO,
 			     cl_hton32(port_num), CL_DISP_MSGID_NONE, &context);
 
@@ -552,9 +546,7 @@ __osm_ni_rcv_process_switch(IN osm_sm_t * sm,
 	context.si_context.light_sweep = FALSE;
 
 	/* Request a SwitchInfo attribute */
-	status = osm_req_get(&sm->req,
-			     &dr_path,
-			     IB_MAD_ATTR_SWITCH_INFO,
+	status = osm_req_get(sm, &dr_path, IB_MAD_ATTR_SWITCH_INFO,
 			     0, CL_DISP_MSGID_NONE, &context);
 	if (status != IB_SUCCESS)
 		/* continue despite error */
diff --git a/opensm/opensm/osm_perfmgr.c b/opensm/opensm/osm_perfmgr.c
index a7c0abc..76ef080 100644
--- a/opensm/opensm/osm_perfmgr.c
+++ b/opensm/opensm/osm_perfmgr.c
@@ -612,8 +612,7 @@ static int sweep_hop_1(osm_sm_t * sm)
 		path_array[1] = port_num;
 
 		osm_dr_path_init(&hop_1_path, h_bind, 1, path_array);
-		status = osm_req_get(&sm->req,
-				     &hop_1_path,
+		status = osm_req_get(sm, &hop_1_path,
 				     IB_MAD_ATTR_NODE_INFO, 0,
 				     CL_DISP_MSGID_NONE, &context);
 
@@ -647,7 +646,7 @@ static int sweep_hop_1(osm_sm_t * sm)
 			path_array[1] = port_num;
 
 			osm_dr_path_init(&hop_1_path, h_bind, 1, path_array);
-			status = osm_req_get(&sm->req, &hop_1_path,
+			status = osm_req_get(sm, &hop_1_path,
 					     IB_MAD_ATTR_NODE_INFO, 0,
 					     CL_DISP_MSGID_NONE, &context);
 
@@ -708,8 +707,7 @@ static int sweep_hop_0(osm_sm_t * const sm)
 	}
 
 	osm_dr_path_init(&dr_path, h_bind, 0, path_array);
-	status = osm_req_get(&sm->req,
-			     &dr_path, IB_MAD_ATTR_NODE_INFO, 0,
+	status = osm_req_get(sm, &dr_path, IB_MAD_ATTR_NODE_INFO, 0,
 			     CL_DISP_MSGID_NONE, NULL);
 
 	if (status != IB_SUCCESS)
diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
index 58eed04..e098d9b 100644
--- a/opensm/opensm/osm_pkey_mgr.c
+++ b/opensm/opensm/osm_pkey_mgr.c
@@ -87,7 +87,7 @@ pkey_mgr_get_physp_max_blocks(IN const osm_subn_t * p_subn,
  */
 static void
 pkey_mgr_process_physical_port(IN osm_log_t * p_log,
-			       IN const osm_req_t * p_req,
+			       IN osm_sm_t * sm,
 			       IN const ib_net16_t pkey,
 			       IN osm_physp_t * p_physp)
 {
@@ -149,8 +149,7 @@ pkey_mgr_process_physical_port(IN osm_log_t * p_log,
 /**********************************************************************
  **********************************************************************/
 static void
-pkey_mgr_process_partition_table(osm_log_t * p_log,
-				 const osm_req_t * p_req,
+pkey_mgr_process_partition_table(osm_log_t * p_log, osm_sm_t * sm,
 				 const osm_prtn_t * p_prtn,
 				 const boolean_t full)
 {
@@ -169,7 +168,7 @@ pkey_mgr_process_partition_table(osm_log_t * p_log,
 		i_next = cl_map_next(i);
 		p_physp = cl_map_obj(i);
 		if (p_physp && osm_physp_is_valid(p_physp))
-			pkey_mgr_process_physical_port(p_log, p_req, pkey,
+			pkey_mgr_process_physical_port(p_log, sm, pkey,
 						       p_physp);
 	}
 }
@@ -177,7 +176,7 @@ pkey_mgr_process_partition_table(osm_log_t * p_log,
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-pkey_mgr_update_pkey_entry(IN const osm_req_t * p_req,
+pkey_mgr_update_pkey_entry(IN osm_sm_t * sm,
 			   IN const osm_physp_t * p_physp,
 			   IN const ib_pkey_table_t * block,
 			   IN const uint16_t block_index)
@@ -192,7 +191,7 @@ pkey_mgr_update_pkey_entry(IN const osm_req_t * p_req,
 	attr_mod = block_index;
 	if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH)
 		attr_mod |= osm_physp_get_port_num(p_physp) << 16;
-	return osm_req_set(p_req, osm_physp_get_dr_path_ptr(p_physp),
+	return osm_req_set(sm, osm_physp_get_dr_path_ptr(p_physp),
 			   (uint8_t *) block, sizeof(*block),
 			   IB_MAD_ATTR_P_KEY_TABLE,
 			   cl_hton32(attr_mod), CL_DISP_MSGID_NONE, &context);
@@ -201,8 +200,7 @@ pkey_mgr_update_pkey_entry(IN const osm_req_t * p_req,
 /**********************************************************************
  **********************************************************************/
 static boolean_t
-pkey_mgr_enforce_partition(IN osm_log_t * p_log,
-			   IN const osm_req_t * p_req,
+pkey_mgr_enforce_partition(IN osm_log_t * p_log, osm_sm_t * sm,
 			   IN osm_physp_t * p_physp, IN const boolean_t enforce)
 {
 	osm_madw_context_t context;
@@ -242,7 +240,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log,
 	context.pi_context.light_sweep = FALSE;
 	context.pi_context.active_transition = FALSE;
 
-	status = osm_req_set(p_req, osm_physp_get_dr_path_ptr(p_physp),
+	status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p_physp),
 			     payload, sizeof(payload),
 			     IB_MAD_ATTR_PORT_INFO,
 			     cl_hton32(osm_physp_get_port_num(p_physp)),
@@ -270,8 +268,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log,
 
 /**********************************************************************
  **********************************************************************/
-static boolean_t pkey_mgr_update_port(osm_log_t * p_log,
-				      osm_req_t * p_req,
+static boolean_t pkey_mgr_update_port(osm_log_t * p_log, osm_sm_t * sm,
 				      const osm_port_t * const p_port)
 {
 	osm_physp_t *p_physp;
@@ -300,7 +297,7 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log,
 	p_pkey_tbl = osm_physp_get_mod_pkey_tbl(p_physp);
 	num_of_blocks = osm_pkey_tbl_get_num_blocks(p_pkey_tbl);
 	max_num_of_blocks =
-	    pkey_mgr_get_physp_max_blocks(p_req->p_subn, p_physp);
+	    pkey_mgr_get_physp_max_blocks(sm->p_subn, p_physp);
 	if (p_pkey_tbl->max_blocks > max_num_of_blocks) {
 		osm_log(p_log, OSM_LOG_INFO,
 			"pkey_mgr_update_port: "
@@ -379,7 +376,7 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log,
 			continue;
 
 		status =
-		    pkey_mgr_update_pkey_entry(p_req, p_physp, new_block,
+		    pkey_mgr_update_pkey_entry(sm, p_physp, new_block,
 					       block_index);
 		if (status == IB_SUCCESS) {
 			osm_log(p_log, OSM_LOG_DEBUG,
@@ -407,8 +404,7 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log,
 /**********************************************************************
  **********************************************************************/
 static boolean_t
-pkey_mgr_update_peer_port(osm_log_t * p_log,
-			  const osm_req_t * p_req,
+pkey_mgr_update_peer_port(osm_log_t * p_log, osm_sm_t * sm,
 			  const osm_subn_t * p_subn,
 			  const osm_port_t * const p_port, boolean_t enforce)
 {
@@ -452,7 +448,7 @@ pkey_mgr_update_peer_port(osm_log_t * p_log,
 		enforce = FALSE;
 	}
 
-	if (pkey_mgr_enforce_partition(p_log, p_req, peer, enforce))
+	if (pkey_mgr_enforce_partition(p_log, sm, peer, enforce))
 		port_info_set = TRUE;
 
 	if (enforce == FALSE)
@@ -470,7 +466,7 @@ pkey_mgr_update_peer_port(osm_log_t * p_log,
 		if (!peer_block
 		    || memcmp(peer_block, block, sizeof(*peer_block))) {
 			status =
-			    pkey_mgr_update_pkey_entry(p_req, peer, block,
+			    pkey_mgr_update_pkey_entry(sm, peer, block,
 						       block_index);
 			if (status == IB_SUCCESS)
 				ret_val = TRUE;
@@ -529,9 +525,9 @@ osm_signal_t osm_pkey_mgr_process(IN osm_opensm_t * p_osm)
 	while (p_next != cl_qmap_end(p_tbl)) {
 		p_prtn = (osm_prtn_t *) p_next;
 		p_next = cl_qmap_next(p_next);
-		pkey_mgr_process_partition_table(&p_osm->log, &p_osm->sm.req,
+		pkey_mgr_process_partition_table(&p_osm->log, &p_osm->sm,
 						 p_prtn, FALSE);
-		pkey_mgr_process_partition_table(&p_osm->log, &p_osm->sm.req,
+		pkey_mgr_process_partition_table(&p_osm->log, &p_osm->sm,
 						 p_prtn, TRUE);
 	}
 
@@ -541,10 +537,10 @@ osm_signal_t osm_pkey_mgr_process(IN osm_opensm_t * p_osm)
 	while (p_next != cl_qmap_end(p_tbl)) {
 		p_port = (osm_port_t *) p_next;
 		p_next = cl_qmap_next(p_next);
-		if (pkey_mgr_update_port(&p_osm->log, &p_osm->sm.req, p_port))
+		if (pkey_mgr_update_port(&p_osm->log, &p_osm->sm, p_port))
 			signal = OSM_SIGNAL_DONE_PENDING;
 		if ((osm_node_get_type(p_port->p_node) != IB_NODE_TYPE_SWITCH)
-		    && pkey_mgr_update_peer_port(&p_osm->log, &p_osm->sm.req,
+		    && pkey_mgr_update_peer_port(&p_osm->log, &p_osm->sm,
 						 &p_osm->subn, p_port,
 						 !p_osm->subn.opt.
 						 no_partition_enforcement))
diff --git a/opensm/opensm/osm_port_info_rcv.c b/opensm/opensm/osm_port_info_rcv.c
index 3775665..8cc33c5 100644
--- a/opensm/opensm/osm_port_info_rcv.c
+++ b/opensm/opensm/osm_port_info_rcv.c
@@ -55,7 +55,6 @@
 #include <complib/cl_passivelock.h>
 #include <complib/cl_debug.h>
 #include <vendor/osm_vendor_api.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_madw.h>
 #include <opensm/osm_log.h>
 #include <opensm/osm_node.h>
@@ -191,7 +190,7 @@ __osm_pi_rcv_process_endport(IN osm_sm_t * sm,
 				memset(&context, 0, sizeof(context));
 				context.smi_context.set_method = FALSE;
 				context.smi_context.port_guid = port_guid;
-				status = osm_req_get(&sm->req,
+				status = osm_req_get(sm,
 						     osm_physp_get_dr_path_ptr
 						     (p_physp),
 						     IB_MAD_ATTR_SM_INFO, 0,
@@ -295,7 +294,7 @@ __osm_pi_rcv_process_switch_port(IN osm_sm_t * sm,
 				context.ni_context.port_num =
 				    osm_physp_get_port_num(p_physp);
 
-				status = osm_req_get(&sm->req,
+				status = osm_req_get(sm,
 						     &path,
 						     IB_MAD_ATTR_NODE_INFO,
 						     0,
@@ -373,8 +372,7 @@ __osm_pi_rcv_process_ca_or_router_port(IN osm_sm_t * sm,
 /**********************************************************************
  **********************************************************************/
 static void get_pkey_table(IN osm_log_t * p_log,
-			   IN osm_req_t * p_req,
-			   IN osm_subn_t * const p_subn,
+			   IN osm_sm_t * sm,
 			   IN osm_node_t * const p_node,
 			   IN osm_physp_t * const p_physp)
 {
@@ -426,9 +424,7 @@ static void get_pkey_table(IN osm_log_t * p_log,
 			attr_mod_ho = block_num;
 		else
 			attr_mod_ho = block_num | (port_num << 16);
-		status = osm_req_get(p_req,
-				     &path,
-				     IB_MAD_ATTR_P_KEY_TABLE,
+		status = osm_req_get(sm, &path, IB_MAD_ATTR_P_KEY_TABLE,
 				     cl_hton32(attr_mod_ho),
 				     CL_DISP_MSGID_NONE, &context);
 
@@ -454,7 +450,7 @@ __osm_pi_rcv_get_pkey_slvl_vla_tables(IN osm_sm_t * sm,
 {
 	OSM_LOG_ENTER(sm->p_log, __osm_pi_rcv_get_pkey_slvl_vla_tables);
 
-	get_pkey_table(sm->p_log, &sm->req, sm->p_subn, p_node, p_physp);
+	get_pkey_table(sm->p_log, sm, p_node, p_physp);
 
 	OSM_LOG_EXIT(sm->p_log);
 }
diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c
index 1c1e1f1..c437028 100644
--- a/opensm/opensm/osm_qos.c
+++ b/opensm/opensm/osm_qos.c
@@ -68,7 +68,7 @@ static void qos_build_config(struct qos_config *cfg,
 /*
  * QoS primitives
  */
-static ib_api_status_t vlarb_update_table_block(osm_req_t * p_req,
+static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,
 						osm_physp_t * p,
 						uint8_t port_num,
 						unsigned force_update,
@@ -100,13 +100,13 @@ static ib_api_status_t vlarb_update_table_block(osm_req_t * p_req,
 	context.vla_context.set_method = TRUE;
 	attr_mod = ((block_num + 1) << 16) | port_num;
 
-	return osm_req_set(p_req, osm_physp_get_dr_path_ptr(p),
+	return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
 			   (uint8_t *) & block, sizeof(block),
 			   IB_MAD_ATTR_VL_ARBITRATION,
 			   cl_hton32(attr_mod), CL_DISP_MSGID_NONE, &context);
 }
 
-static ib_api_status_t vlarb_update(osm_req_t * p_req,
+static ib_api_status_t vlarb_update(osm_sm_t * sm,
 				    osm_physp_t * p, uint8_t port_num,
 				    unsigned force_update,
 				    const struct qos_config *qcfg)
@@ -118,7 +118,7 @@ static ib_api_status_t vlarb_update(osm_req_t * p_req,
 	if (p_pi->vl_arb_low_cap > 0) {
 		len = p_pi->vl_arb_low_cap < IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK ?
 		    p_pi->vl_arb_low_cap : IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK;
-		if ((status = vlarb_update_table_block(p_req, p, port_num,
+		if ((status = vlarb_update_table_block(sm, p, port_num,
 						       force_update,
 						       &qcfg->vlarb_low[0],
 						       len, 0)) != IB_SUCCESS)
@@ -126,7 +126,7 @@ static ib_api_status_t vlarb_update(osm_req_t * p_req,
 	}
 	if (p_pi->vl_arb_low_cap > IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK) {
 		len = p_pi->vl_arb_low_cap % IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK;
-		if ((status = vlarb_update_table_block(p_req, p, port_num,
+		if ((status = vlarb_update_table_block(sm, p, port_num,
 						       force_update,
 						       &qcfg->vlarb_low[1],
 						       len, 1)) != IB_SUCCESS)
@@ -135,7 +135,7 @@ static ib_api_status_t vlarb_update(osm_req_t * p_req,
 	if (p_pi->vl_arb_high_cap > 0) {
 		len = p_pi->vl_arb_high_cap < IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK ?
 		    p_pi->vl_arb_high_cap : IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK;
-		if ((status = vlarb_update_table_block(p_req, p, port_num,
+		if ((status = vlarb_update_table_block(sm, p, port_num,
 						       force_update,
 						       &qcfg->vlarb_high[0],
 						       len, 2)) != IB_SUCCESS)
@@ -143,7 +143,7 @@ static ib_api_status_t vlarb_update(osm_req_t * p_req,
 	}
 	if (p_pi->vl_arb_high_cap > IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK) {
 		len = p_pi->vl_arb_high_cap % IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK;
-		if ((status = vlarb_update_table_block(p_req, p, port_num,
+		if ((status = vlarb_update_table_block(sm, p, port_num,
 						       force_update,
 						       &qcfg->vlarb_high[1],
 						       len, 3)) != IB_SUCCESS)
@@ -153,7 +153,7 @@ static ib_api_status_t vlarb_update(osm_req_t * p_req,
 	return status;
 }
 
-static ib_api_status_t sl2vl_update_table(osm_req_t * p_req,
+static ib_api_status_t sl2vl_update_table(osm_sm_t * sm,
 					  osm_physp_t * p, uint8_t in_port,
 					  uint8_t out_port,
 					  unsigned force_update,
@@ -187,13 +187,13 @@ static ib_api_status_t sl2vl_update_table(osm_req_t * p_req,
 	context.slvl_context.port_guid = osm_physp_get_port_guid(p);
 	context.slvl_context.set_method = TRUE;
 	attr_mod = in_port << 8 | out_port;
-	return osm_req_set(p_req, osm_physp_get_dr_path_ptr(p),
+	return osm_req_set(sm, osm_physp_get_dr_path_ptr(p),
 			   (uint8_t *) & tbl, sizeof(tbl),
 			   IB_MAD_ATTR_SLVL_TABLE,
 			   cl_hton32(attr_mod), CL_DISP_MSGID_NONE, &context);
 }
 
-static ib_api_status_t sl2vl_update(osm_req_t * p_req, osm_port_t * p_port,
+static ib_api_status_t sl2vl_update(osm_sm_t * sm, osm_port_t * p_port,
 				    osm_physp_t * p, uint8_t port_num,
 				    unsigned force_update,
 				    const struct qos_config *qcfg)
@@ -220,7 +220,7 @@ static ib_api_status_t sl2vl_update(osm_req_t * p_req, osm_port_t * p_port,
 
 	for (i = 0; i < num_ports; i++) {
 		status =
-		    sl2vl_update_table(p_req, p, i, port_num,
+		    sl2vl_update_table(sm, p, i, port_num,
 				       force_update, &qcfg->sl2vl);
 		if (status != IB_SUCCESS)
 			return status;
@@ -229,7 +229,7 @@ static ib_api_status_t sl2vl_update(osm_req_t * p_req, osm_port_t * p_port,
 	return IB_SUCCESS;
 }
 
-static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_req_t * p_req,
+static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_sm_t * sm,
 				       osm_port_t * p_port, osm_physp_t * p,
 				       uint8_t port_num,
 				       unsigned force_update,
@@ -243,7 +243,7 @@ static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_req_t * p_req,
 	p->vl_high_limit = qcfg->vl_high_limit;
 
 	/* setup VLArbitration */
-	status = vlarb_update(p_req, p, port_num, force_update, qcfg);
+	status = vlarb_update(sm, p, port_num, force_update, qcfg);
 	if (status != IB_SUCCESS) {
 		osm_log(p_log, OSM_LOG_ERROR,
 			"qos_physp_setup: ERR 6202 : "
@@ -254,7 +254,7 @@ static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_req_t * p_req,
 	}
 
 	/* setup SL2VL tables */
-	status = sl2vl_update(p_req, p_port, p, port_num, force_update, qcfg);
+	status = sl2vl_update(sm, p_port, p, port_num, force_update, qcfg);
 	if (status != IB_SUCCESS) {
 		osm_log(p_log, OSM_LOG_ERROR,
 			"qos_physp_setup: ERR 6203 : "
@@ -316,7 +316,7 @@ osm_signal_t osm_qos_setup(osm_opensm_t * p_osm)
 				force_update = p_physp->need_update ||
 				    p_osm->subn.need_update;
 				status =
-				    qos_physp_setup(&p_osm->log, &p_osm->sm.req,
+				    qos_physp_setup(&p_osm->log, &p_osm->sm,
 						    p_port, p_physp, i,
 						    force_update, &swe_config);
 			}
@@ -336,7 +336,7 @@ osm_signal_t osm_qos_setup(osm_opensm_t * p_osm)
 			continue;
 
 		force_update = p_physp->need_update || p_osm->subn.need_update;
-		status = qos_physp_setup(&p_osm->log, &p_osm->sm.req,
+		status = qos_physp_setup(&p_osm->log, &p_osm->sm,
 					 p_port, p_physp, 0, force_update, cfg);
 	}
 
diff --git a/opensm/opensm/osm_req.c b/opensm/opensm/osm_req.c
index ed1d19c..0524ce2 100644
--- a/opensm/opensm/osm_req.c
+++ b/opensm/opensm/osm_req.c
@@ -52,7 +52,6 @@
 #include <string.h>
 #include <iba/ib_types.h>
 #include <complib/cl_debug.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_madw.h>
 #include <opensm/osm_attrib_req.h>
 #include <opensm/osm_log.h>
@@ -63,51 +62,10 @@
 #include <opensm/osm_opensm.h>
 
 /**********************************************************************
- **********************************************************************/
-void osm_req_construct(IN osm_req_t * const p_req)
-{
-	CL_ASSERT(p_req);
-
-	memset(p_req, 0, sizeof(*p_req));
-}
-
-/**********************************************************************
- **********************************************************************/
-void osm_req_destroy(IN osm_req_t * const p_req)
-{
-	CL_ASSERT(p_req);
-}
-
-/**********************************************************************
- **********************************************************************/
-ib_api_status_t
-osm_req_init(IN osm_req_t * const p_req,
-	     IN osm_mad_pool_t * const p_pool,
-	     IN osm_vl15_t * const p_vl15,
-	     IN osm_subn_t * const p_subn,
-	     IN osm_log_t * const p_log, IN atomic32_t * const p_sm_trans_id)
-{
-	ib_api_status_t status = IB_SUCCESS;
-
-	OSM_LOG_ENTER(p_log, osm_req_init);
-
-	osm_req_construct(p_req);
-	p_req->p_log = p_log;
-
-	p_req->p_pool = p_pool;
-	p_req->p_vl15 = p_vl15;
-	p_req->p_subn = p_subn;
-	p_req->p_sm_trans_id = p_sm_trans_id;
-
-	OSM_LOG_EXIT(p_log);
-	return (status);
-}
-
-/**********************************************************************
   The plock MAY or MAY NOT be held before calling this function.
 **********************************************************************/
 ib_api_status_t
-osm_req_get(IN const osm_req_t * const p_req,
+osm_req_get(IN osm_sm_t * sm,
 	    IN const osm_dr_path_t * const p_path,
 	    IN const uint16_t attr_id,
 	    IN const uint32_t attr_mod,
@@ -118,9 +76,9 @@ osm_req_get(IN const osm_req_t * const p_req,
 	ib_api_status_t status = IB_SUCCESS;
 	ib_net64_t tid;
 
-	CL_ASSERT(p_req);
+	CL_ASSERT(sm);
 
-	OSM_LOG_ENTER(p_req->p_log, osm_req_get);
+	OSM_LOG_ENTER(sm->p_log, osm_req_get);
 
 	CL_ASSERT(p_path);
 	CL_ASSERT(attr_id);
@@ -131,20 +89,20 @@ osm_req_get(IN const osm_req_t * const p_req,
 
 	/* p_context may be NULL. */
 
-	p_madw = osm_mad_pool_get(p_req->p_pool,
+	p_madw = osm_mad_pool_get(sm->p_mad_pool,
 				  p_path->h_bind, MAD_BLOCK_SIZE, NULL);
 
 	if (p_madw == NULL) {
-		osm_log(p_req->p_log, OSM_LOG_ERROR,
+		osm_log(sm->p_log, OSM_LOG_ERROR,
 			"osm_req_get: ERR 1101: " "Unable to acquire MAD\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
-	tid = cl_hton64((uint64_t) cl_atomic_inc(p_req->p_sm_trans_id));
+	tid = cl_hton64((uint64_t) cl_atomic_inc(&sm->sm_trans_id));
 
-	if (osm_log_is_active(p_req->p_log, OSM_LOG_DEBUG)) {
-		osm_log(p_req->p_log, OSM_LOG_DEBUG,
+	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
+		osm_log(sm->p_log, OSM_LOG_DEBUG,
 			"osm_req_get: "
 			"Getting %s (0x%X), modifier 0x%X, TID 0x%" PRIx64 "\n",
 			ib_get_sm_attr_str(attr_id),
@@ -158,7 +116,7 @@ osm_req_get(IN const osm_req_t * const p_req,
 			attr_id,
 			attr_mod,
 			p_path->hop_count,
-			p_req->p_subn->opt.m_key,
+			sm->p_subn->opt.m_key,
 			p_path->path, IB_LID_PERMISSIVE, IB_LID_PERMISSIVE);
 
 	p_madw->mad_addr.dest_lid = IB_LID_PERMISSIVE;
@@ -175,10 +133,10 @@ osm_req_get(IN const osm_req_t * const p_req,
 	if (p_context)
 		p_madw->context = *p_context;
 
-	osm_vl15_post(p_req->p_vl15, p_madw);
+	osm_vl15_post(sm->p_vl15, p_madw);
 
       Exit:
-	OSM_LOG_EXIT(p_req->p_log);
+	OSM_LOG_EXIT(sm->p_log);
 	return (status);
 }
 
@@ -186,7 +144,7 @@ osm_req_get(IN const osm_req_t * const p_req,
   The plock MAY or MAY NOT be held before calling this function.
 **********************************************************************/
 ib_api_status_t
-osm_req_set(IN const osm_req_t * const p_req,
+osm_req_set(IN osm_sm_t * sm,
 	    IN const osm_dr_path_t * const p_path,
 	    IN const uint8_t * const p_payload,
 	    IN const size_t payload_size,
@@ -199,9 +157,9 @@ osm_req_set(IN const osm_req_t * const p_req,
 	ib_api_status_t status = IB_SUCCESS;
 	ib_net64_t tid;
 
-	CL_ASSERT(p_req);
+	CL_ASSERT(sm);
 
-	OSM_LOG_ENTER(p_req->p_log, osm_req_set);
+	OSM_LOG_ENTER(sm->p_log, osm_req_set);
 
 	CL_ASSERT(p_path);
 	CL_ASSERT(attr_id);
@@ -213,20 +171,20 @@ osm_req_set(IN const osm_req_t * const p_req,
 
 	/* p_context may be NULL. */
 
-	p_madw = osm_mad_pool_get(p_req->p_pool,
+	p_madw = osm_mad_pool_get(sm->p_mad_pool,
 				  p_path->h_bind, MAD_BLOCK_SIZE, NULL);
 
 	if (p_madw == NULL) {
-		osm_log(p_req->p_log, OSM_LOG_ERROR,
+		osm_log(sm->p_log, OSM_LOG_ERROR,
 			"osm_req_set: ERR 1102: " "Unable to acquire MAD\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
-	tid = cl_hton64((uint64_t) cl_atomic_inc(p_req->p_sm_trans_id));
+	tid = cl_hton64((uint64_t) cl_atomic_inc(&sm->sm_trans_id));
 
-	if (osm_log_is_active(p_req->p_log, OSM_LOG_DEBUG)) {
-		osm_log(p_req->p_log, OSM_LOG_DEBUG,
+	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
+		osm_log(sm->p_log, OSM_LOG_DEBUG,
 			"osm_req_set: "
 			"Setting %s (0x%X), modifier 0x%X, TID 0x%" PRIx64 "\n",
 			ib_get_sm_attr_str(attr_id),
@@ -240,7 +198,7 @@ osm_req_set(IN const osm_req_t * const p_req,
 			attr_id,
 			attr_mod,
 			p_path->hop_count,
-			p_req->p_subn->opt.m_key,
+			sm->p_subn->opt.m_key,
 			p_path->path, IB_LID_PERMISSIVE, IB_LID_PERMISSIVE);
 
 	p_madw->mad_addr.dest_lid = IB_LID_PERMISSIVE;
@@ -259,9 +217,9 @@ osm_req_set(IN const osm_req_t * const p_req,
 
 	memcpy(osm_madw_get_smp_ptr(p_madw)->data, p_payload, payload_size);
 
-	osm_vl15_post(p_req->p_vl15, p_madw);
+	osm_vl15_post(sm->p_vl15, p_madw);
 
       Exit:
-	OSM_LOG_EXIT(p_req->p_log);
+	OSM_LOG_EXIT(sm->p_log);
 	return (status);
 }
diff --git a/opensm/opensm/osm_resp.c b/opensm/opensm/osm_resp.c
index e5beb45..285559a 100644
--- a/opensm/opensm/osm_resp.c
+++ b/opensm/opensm/osm_resp.c
@@ -52,7 +52,6 @@
 #include <string.h>
 #include <iba/ib_types.h>
 #include <complib/cl_debug.h>
-#include <opensm/osm_resp.h>
 #include <opensm/osm_madw.h>
 #include <opensm/osm_attrib_req.h>
 #include <opensm/osm_log.h>
@@ -64,51 +63,14 @@
 
 /**********************************************************************
  **********************************************************************/
-void osm_resp_construct(IN osm_resp_t * const p_resp)
-{
-	memset(p_resp, 0, sizeof(*p_resp));
-}
-
-/**********************************************************************
- **********************************************************************/
-void osm_resp_destroy(IN osm_resp_t * const p_resp)
-{
-	CL_ASSERT(p_resp);
-}
-
-/**********************************************************************
- **********************************************************************/
-ib_api_status_t
-osm_resp_init(IN osm_resp_t * const p_resp,
-	      IN osm_mad_pool_t * const p_pool,
-	      IN osm_vl15_t * const p_vl15,
-	      IN osm_subn_t * const p_subn, IN osm_log_t * const p_log)
-{
-	ib_api_status_t status = IB_SUCCESS;
-
-	OSM_LOG_ENTER(p_log, osm_resp_init);
-
-	osm_resp_construct(p_resp);
-
-	p_resp->p_log = p_log;
-	p_resp->p_pool = p_pool;
-	p_resp->p_vl15 = p_vl15;
-	p_resp->p_subn = p_subn;
-
-	OSM_LOG_EXIT(p_log);
-	return (status);
-}
-
-/**********************************************************************
- **********************************************************************/
 static void
-osm_resp_make_resp_smp(IN const osm_resp_t * const p_resp,
+osm_resp_make_resp_smp(IN osm_sm_t * sm,
 		       IN const ib_smp_t * const p_src_smp,
 		       IN const ib_net16_t status,
 		       IN const uint8_t * const p_payload,
 		       OUT ib_smp_t * const p_dest_smp)
 {
-	OSM_LOG_ENTER(p_resp->p_log, osm_resp_make_resp_smp);
+	OSM_LOG_ENTER(sm->p_log, osm_resp_make_resp_smp);
 
 	CL_ASSERT(p_dest_smp);
 	CL_ASSERT(p_src_smp);
@@ -123,7 +85,7 @@ osm_resp_make_resp_smp(IN const osm_resp_t * const p_resp,
 		p_dest_smp->method = IB_MAD_METHOD_TRAP_REPRESS;
 		p_dest_smp->status = 0;
 	} else {
-		osm_log(p_resp->p_log, OSM_LOG_ERROR,
+		osm_log(sm->p_log, OSM_LOG_ERROR,
 			"osm_resp_make_resp_smp: ERR 1302: "
 			"src smp method unsupported 0x%X\n", p_src_smp->method);
 		goto Exit;
@@ -137,13 +99,13 @@ osm_resp_make_resp_smp(IN const osm_resp_t * const p_resp,
 	memcpy(&p_dest_smp->data, p_payload, IB_SMP_DATA_SIZE);
 
       Exit:
-	OSM_LOG_EXIT(p_resp->p_log);
+	OSM_LOG_EXIT(sm->p_log);
 }
 
 /**********************************************************************
  **********************************************************************/
 ib_api_status_t
-osm_resp_send(IN const osm_resp_t * const p_resp,
+osm_resp_send(IN osm_sm_t * sm,
 	      IN const osm_madw_t * const p_req_madw,
 	      IN const ib_net16_t mad_status,
 	      IN const uint8_t * const p_payload)
@@ -153,7 +115,7 @@ osm_resp_send(IN const osm_resp_t * const p_resp,
 	osm_madw_t *p_madw;
 	ib_api_status_t status = IB_SUCCESS;
 
-	OSM_LOG_ENTER(p_resp->p_log, osm_resp_send);
+	OSM_LOG_ENTER(sm->p_log, osm_resp_send);
 
 	CL_ASSERT(p_req_madw);
 	CL_ASSERT(p_payload);
@@ -162,12 +124,12 @@ osm_resp_send(IN const osm_resp_t * const p_resp,
 	if (osm_exit_flag)
 		goto Exit;
 
-	p_madw = osm_mad_pool_get(p_resp->p_pool,
+	p_madw = osm_mad_pool_get(sm->p_mad_pool,
 				  osm_madw_get_bind_handle(p_req_madw),
 				  MAD_BLOCK_SIZE, NULL);
 
 	if (p_madw == NULL) {
-		osm_log(p_resp->p_log, OSM_LOG_ERROR,
+		osm_log(sm->p_log, OSM_LOG_ERROR,
 			"osm_resp_send: ERR 1301: " "Unable to acquire MAD\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
@@ -179,7 +141,7 @@ osm_resp_send(IN const osm_resp_t * const p_resp,
 	 */
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 	p_req_smp = osm_madw_get_smp_ptr(p_req_madw);
-	osm_resp_make_resp_smp(p_resp, p_req_smp, mad_status, p_payload, p_smp);
+	osm_resp_make_resp_smp(sm, p_req_smp, mad_status, p_payload, p_smp);
 	p_madw->mad_addr.dest_lid =
 	    p_req_madw->mad_addr.addr_type.smi.source_lid;
 	p_madw->mad_addr.addr_type.smi.source_lid =
@@ -188,8 +150,8 @@ osm_resp_send(IN const osm_resp_t * const p_resp,
 	p_madw->resp_expected = FALSE;
 	p_madw->fail_msg = CL_DISP_MSGID_NONE;
 
-	if (osm_log_is_active(p_resp->p_log, OSM_LOG_DEBUG)) {
-		osm_log(p_resp->p_log, OSM_LOG_DEBUG,
+	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
+		osm_log(sm->p_log, OSM_LOG_DEBUG,
 			"osm_resp_send: "
 			"Responding to %s (0x%X)"
 			"\n\t\t\t\tattribute modifier 0x%X, TID 0x%" PRIx64
@@ -198,9 +160,9 @@ osm_resp_send(IN const osm_resp_t * const p_resp,
 			cl_ntoh64(p_smp->trans_id));
 	}
 
-	osm_vl15_post(p_resp->p_vl15, p_madw);
+	osm_vl15_post(sm->p_vl15, p_madw);
 
       Exit:
-	OSM_LOG_EXIT(p_resp->p_log);
+	OSM_LOG_EXIT(sm->p_log);
 	return (status);
 }
diff --git a/opensm/opensm/osm_sm.c b/opensm/opensm/osm_sm.c
index af8c569..f2d259d 100644
--- a/opensm/opensm/osm_sm.c
+++ b/opensm/opensm/osm_sm.c
@@ -158,8 +158,6 @@ void osm_sm_construct(IN osm_sm_t * const p_sm)
 	cl_event_wheel_construct(&p_sm->trap_aging_tracker);
 	cl_thread_construct(&p_sm->sweeper);
 	cl_spinlock_construct(&p_sm->mgrp_lock);
-	osm_req_construct(&p_sm->req);
-	osm_resp_construct(&p_sm->resp);
 	osm_sm_mad_ctrl_construct(&p_sm->mad_ctrl);
 	osm_lid_mgr_construct(&p_sm->lid_mgr);
 	osm_ucast_mgr_construct(&p_sm->ucast_mgr);
@@ -224,8 +222,6 @@ void osm_sm_shutdown(IN osm_sm_t * const p_sm)
 void osm_sm_destroy(IN osm_sm_t * const p_sm)
 {
 	OSM_LOG_ENTER(p_sm->p_log, osm_sm_destroy);
-	osm_req_destroy(&p_sm->req);
-	osm_resp_destroy(&p_sm->resp);
 	osm_lid_mgr_destroy(&p_sm->lid_mgr);
 	osm_ucast_mgr_destroy(&p_sm->ucast_mgr);
 	osm_link_mgr_destroy(&p_sm->link_mgr);
@@ -301,16 +297,6 @@ osm_sm_init(IN osm_sm_t * const p_sm,
 	if (status != IB_SUCCESS)
 		goto Exit;
 
-	status = osm_req_init(&p_sm->req,
-			      p_mad_pool,
-			      p_vl15, p_subn, p_log, &p_sm->sm_trans_id);
-	if (status != IB_SUCCESS)
-		goto Exit;
-
-	status = osm_resp_init(&p_sm->resp, p_mad_pool, p_vl15, p_subn, p_log);
-	if (status != IB_SUCCESS)
-		goto Exit;
-
 	status = cl_event_wheel_init(&p_sm->trap_aging_tracker);
 	if (status != IB_SUCCESS)
 		goto Exit;
diff --git a/opensm/opensm/osm_sm_state_mgr.c b/opensm/opensm/osm_sm_state_mgr.c
index 52aa199..8cd3276 100644
--- a/opensm/opensm/osm_sm_state_mgr.c
+++ b/opensm/opensm/osm_sm_state_mgr.c
@@ -238,7 +238,7 @@ __osm_sm_state_mgr_send_master_sm_info_req(IN osm_sm_state_mgr_t * p_sm_mgr)
 	context.smi_context.port_guid = p_port->guid;
 	context.smi_context.set_method = FALSE;
 
-	status = osm_req_get(p_sm_mgr->p_req,
+	status = osm_req_get(p_sm_mgr->sm,
 			     osm_physp_get_dr_path_ptr(p_port->p_physp),
 			     IB_MAD_ATTR_SM_INFO, 0, CL_DISP_MSGID_NONE,
 			     &context);
@@ -403,7 +403,6 @@ osm_sm_state_mgr_init(IN osm_sm_state_mgr_t * const p_sm_mgr, IN osm_sm_t * sm)
 
 	p_sm_mgr->sm = sm;
 	p_sm_mgr->p_log = sm->p_log;
-	p_sm_mgr->p_req = &sm->req;
 	p_sm_mgr->p_subn = sm->p_subn;
 
 	if (p_sm_mgr->p_subn->opt.sm_inactive) {
diff --git a/opensm/opensm/osm_sminfo_rcv.c b/opensm/opensm/osm_sminfo_rcv.c
index b150edd..63cc393 100644
--- a/opensm/opensm/osm_sminfo_rcv.c
+++ b/opensm/opensm/osm_sminfo_rcv.c
@@ -128,7 +128,7 @@ __osm_sminfo_rcv_process_get_request(IN osm_sm_t * sm,
 		p_smi->sm_key = 0;
 	}
 
-	status = osm_resp_send(&sm->resp, p_madw, 0, payload);
+	status = osm_resp_send(sm, p_madw, 0, payload);
 	if (status != IB_SUCCESS) {
 		osm_log(sm->p_log, OSM_LOG_ERROR,
 			"__osm_sminfo_rcv_process_get_request: ERR 2F02: "
@@ -241,7 +241,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 			osm_get_sm_mgr_state_str(ib_sminfo_get_state
 						 (sm_smi)));
 		/* send a response with error code */
-		status = osm_resp_send(&sm->resp, p_madw, 7, payload);
+		status = osm_resp_send(sm, p_madw, 7, payload);
 		if (status != IB_SUCCESS)
 			osm_log(sm->p_log, OSM_LOG_ERROR,
 				"__osm_sminfo_rcv_process_set_request: ERR 2F05: "
@@ -291,7 +291,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 			osm_get_sm_mgr_state_str(ib_sminfo_get_state
 						 (sm_smi)));
 		/* send a response with error code */
-		status = osm_resp_send(&sm->resp, p_madw, 7, payload);
+		status = osm_resp_send(sm, p_madw, 7, payload);
 		if (status != IB_SUCCESS)
 			osm_log(sm->p_log, OSM_LOG_ERROR,
 				"__osm_sminfo_rcv_process_set_request: ERR 2F08: "
@@ -302,7 +302,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	}
 
 	/* the SubnSet(SMInfo) command is ok. Send a response. */
-	status = osm_resp_send(&sm->resp, p_madw, 0, payload);
+	status = osm_resp_send(sm, p_madw, 0, payload);
 	if (status != IB_SUCCESS)
 		osm_log(sm->p_log, OSM_LOG_ERROR,
 			"__osm_sminfo_rcv_process_set_request: ERR 2F09: "
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index 5c196e3..e4130cc 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -109,7 +109,6 @@ osm_state_mgr_init(IN osm_state_mgr_t * const p_mgr, IN osm_sm_t * sm)
 	p_mgr->p_link_mgr = &sm->link_mgr;
 	p_mgr->p_drop_mgr = &sm->drop_mgr;
 	p_mgr->p_mad_ctrl = &sm->mad_ctrl;
-	p_mgr->p_req = &sm->req;
 	p_mgr->p_stats = &sm->p_subn->p_osm->stats;
 	p_mgr->p_sm_state_mgr = &sm->sm_state_mgr;
 	p_mgr->state = OSM_SM_STATE_IDLE;
@@ -486,9 +485,7 @@ static void __osm_state_mgr_get_sw_info(IN cl_map_item_t * const p_object,
 	mad_context.si_context.set_method = FALSE;
 	mad_context.si_context.light_sweep = TRUE;
 
-	status = osm_req_get(p_mgr->p_req,
-			     p_dr_path,
-			     IB_MAD_ATTR_SWITCH_INFO, 0,
+	status = osm_req_get(p_mgr->sm, p_dr_path, IB_MAD_ATTR_SWITCH_INFO, 0,
 			     OSM_MSG_LIGHT_SWEEP_FAIL, &mad_context);
 
 	if (status != IB_SUCCESS) {
@@ -532,8 +529,7 @@ __osm_state_mgr_get_remote_port_info(IN osm_state_mgr_t * const p_mgr,
 
 	/* note that with some negative logic - if the query failed it means that
 	 * there is no point in going to heavy sweep */
-	status = osm_req_get(p_mgr->p_req,
-			     &rem_node_dr_path,
+	status = osm_req_get(p_mgr->sm, &rem_node_dr_path,
 			     IB_MAD_ATTR_PORT_INFO, 0, CL_DISP_MSGID_NONE,
 			     &mad_context);
 
@@ -595,7 +591,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_0(IN osm_state_mgr_t *
 		CL_PLOCK_RELEASE(p_mgr->p_lock);
 
 		osm_dr_path_init(&dr_path, h_bind, 0, path_array);
-		status = osm_req_get(p_mgr->p_req,
+		status = osm_req_get(p_mgr->sm,
 				     &dr_path, IB_MAD_ATTR_NODE_INFO, 0,
 				     CL_DISP_MSGID_NONE, NULL);
 
@@ -813,8 +809,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_state_mgr_t *
 		path_array[1] = port_num;
 
 		osm_dr_path_init(&hop_1_path, h_bind, 1, path_array);
-		status = osm_req_get(p_mgr->p_req,
-				     &hop_1_path,
+		status = osm_req_get(p_mgr->sm, &hop_1_path,
 				     IB_MAD_ATTR_NODE_INFO, 0,
 				     CL_DISP_MSGID_NONE, &context);
 
@@ -849,7 +844,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_state_mgr_t *
 				osm_dr_path_init(&hop_1_path, h_bind, 1,
 						 path_array);
 				status =
-				    osm_req_get(p_mgr->p_req, &hop_1_path,
+				    osm_req_get(p_mgr->sm, &hop_1_path,
 						IB_MAD_ATTR_NODE_INFO, 0,
 						CL_DISP_MSGID_NONE, &context);
 
@@ -1110,7 +1105,7 @@ __osm_state_mgr_send_handover(IN osm_state_mgr_t * const p_mgr,
 		p_smi->sm_key = 0;
 	}
 
-	status = osm_req_set(p_mgr->p_req,
+	status = osm_req_set(p_mgr->sm,
 			     osm_physp_get_dr_path_ptr(p_port->p_physp),
 			     payload, sizeof(payload),
 			     IB_MAD_ATTR_SM_INFO, IB_SMINFO_ATTR_MOD_HANDOVER,
diff --git a/opensm/opensm/osm_sw_info_rcv.c b/opensm/opensm/osm_sw_info_rcv.c
index d9bd21b..962f6c7 100644
--- a/opensm/opensm/osm_sw_info_rcv.c
+++ b/opensm/opensm/osm_sw_info_rcv.c
@@ -111,9 +111,7 @@ __osm_si_rcv_get_port_info(IN osm_sm_t * sm,
 			 p_smp->hop_count, p_smp->initial_path);
 
 	for (port_num = 0; port_num < num_ports; port_num++) {
-		status = osm_req_get(&sm->req,
-				     &dr_path,
-				     IB_MAD_ATTR_PORT_INFO,
+		status = osm_req_get(sm, &dr_path, IB_MAD_ATTR_PORT_INFO,
 				     cl_hton32(port_num),
 				     CL_DISP_MSGID_NONE, &context);
 		if (status != IB_SUCCESS) {
diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
index 196bca2..b7a8c40 100644
--- a/opensm/opensm/osm_trap_rcv.c
+++ b/opensm/opensm/osm_trap_rcv.c
@@ -393,7 +393,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 			"__osm_trap_rcv_process_request: ERR 3809: "
 			"Failed to find source physical port for trap\n");
 
-	status = osm_resp_send(&sm->resp, &tmp_madw, 0, payload);
+	status = osm_resp_send(sm, &tmp_madw, 0, payload);
 	if (status != IB_SUCCESS) {
 		osm_log(sm->p_log, OSM_LOG_ERROR,
 			"__osm_trap_rcv_process_request: ERR 3802: "
@@ -523,8 +523,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 						    active_transition = FALSE;
 
 						status =
-						    osm_req_set(&sm->p_subn->
-								p_osm->sm.req,
+						    osm_req_set(sm,
 								osm_physp_get_dr_path_ptr
 								(p_physp),
 								payload,
diff --git a/opensm/opensm/osm_ucast_mgr.c b/opensm/opensm/osm_ucast_mgr.c
index d7c045e..88e29e9 100644
--- a/opensm/opensm/osm_ucast_mgr.c
+++ b/opensm/opensm/osm_ucast_mgr.c
@@ -99,7 +99,6 @@ osm_ucast_mgr_init(IN osm_ucast_mgr_t * const p_mgr, IN osm_sm_t * sm)
 	p_mgr->p_log = sm->p_log;
 	p_mgr->p_subn = sm->p_subn;
 	p_mgr->p_lock = sm->p_lock;
-	p_mgr->p_req = &sm->req;
 
 	p_mgr->lft_buf = malloc(IB_LID_UCAST_END_HO + 1);
 	if (!p_mgr->lft_buf)
@@ -431,9 +430,7 @@ osm_ucast_mgr_set_fwd_table(IN osm_ucast_mgr_t * const p_mgr,
 		context.si_context.node_guid = osm_node_get_node_guid(p_node);
 		context.si_context.set_method = TRUE;
 
-		status = osm_req_set(p_mgr->p_req,
-				     p_path,
-				     (uint8_t *) & si,
+		status = osm_req_set(p_mgr->sm, p_path, (uint8_t *) & si,
 				     sizeof(si),
 				     IB_MAD_ATTR_SWITCH_INFO,
 				     0, CL_DISP_MSGID_NONE, &context);
@@ -469,8 +466,7 @@ osm_ucast_mgr_set_fwd_table(IN osm_ucast_mgr_t * const p_mgr,
 				"Writing FT block %u\n", block_id_ho);
 		}
 
-		status = osm_req_set(p_mgr->p_req,
-				     p_path,
+		status = osm_req_set(p_mgr->sm, p_path,
 				     p_mgr->lft_buf + block_id_ho * 64,
 				     sizeof(block),
 				     IB_MAD_ATTR_LIN_FWD_TBL,
diff --git a/opensm/opensm/osm_vl_arb_rcv.c b/opensm/opensm/osm_vl_arb_rcv.c
index 23b081a..a88bf70 100644
--- a/opensm/opensm/osm_vl_arb_rcv.c
+++ b/opensm/opensm/osm_vl_arb_rcv.c
@@ -53,7 +53,6 @@
 #include <iba/ib_types.h>
 #include <complib/cl_passivelock.h>
 #include <complib/cl_debug.h>
-#include <opensm/osm_req.h>
 #include <opensm/osm_madw.h>
 #include <opensm/osm_log.h>
 #include <opensm/osm_node.h>
-- 
1.5.3.4.206.g58ba4




More information about the general mailing list