[openib-general] [PATCH] Opensm - asserts before OSM_LOG_ENTER
Yael Kalka
yael at mellanox.co.il
Wed Feb 1 05:21:00 PST 2006
Hi Hal,
When trying to compile the windows stack with some late updates, I've
encountered an issue with the addition/change of place of asserts to
before the OSM_LOG_ENTER. Since OSM_LOG_ENTER declares a variable,
then these asserts cause failure due to declaration in the middle of
the function.
These asserts are all on the reciever object or the manager object, so
I don't think they are really necessary.
The Following patch removes these asserts.
Thanks,
Yael
Signed-off-by: Yael Kalka <yael at mellanox.co.il>
Index: opensm/osm_pkey_rcv.c
===================================================================
--- opensm/osm_pkey_rcv.c (revision 5246)
+++ opensm/osm_pkey_rcv.c (working copy)
@@ -71,8 +71,6 @@ void
osm_pkey_rcv_destroy(
IN osm_pkey_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_pkey_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -125,8 +123,6 @@ osm_pkey_rcv_process(
uint8_t port_num;
uint16_t block_num;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_pkey_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_sm_state_mgr.c
===================================================================
--- opensm/osm_sm_state_mgr.c (revision 5246)
+++ opensm/osm_sm_state_mgr.c (working copy)
@@ -406,8 +406,6 @@ void
osm_sm_state_mgr_destroy(
IN osm_sm_state_mgr_t * const p_sm_mgr )
{
- CL_ASSERT( p_sm_mgr );
-
OSM_LOG_ENTER( p_sm_mgr->p_log, osm_sm_state_mgr_destroy );
cl_spinlock_destroy( &p_sm_mgr->state_lock );
@@ -500,8 +498,6 @@ osm_sm_state_mgr_process(
{
ib_api_status_t status = IB_SUCCESS;
- CL_ASSERT( p_sm_mgr );
-
OSM_LOG_ENTER( p_sm_mgr->p_log, osm_sm_state_mgr_process );
/*
@@ -760,8 +756,6 @@ osm_sm_state_mgr_check_legality(
{
ib_api_status_t status = IB_SUCCESS;
- CL_ASSERT( p_sm_mgr );
-
OSM_LOG_ENTER( p_sm_mgr->p_log, osm_sm_state_mgr_check_legality );
/*
Index: opensm/osm_state_mgr.c
===================================================================
--- opensm/osm_state_mgr.c (revision 5246)
+++ opensm/osm_state_mgr.c (working copy)
@@ -86,8 +86,6 @@ void
osm_state_mgr_destroy(
IN osm_state_mgr_t * const p_mgr )
{
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_state_mgr_destroy );
/* destroy the locks */
@@ -1884,8 +1882,6 @@ osm_state_mgr_process(
ib_api_status_t status;
osm_remote_sm_t *p_remote_sm;
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_state_mgr_process );
/* if we are exiting do nothing */
Index: opensm/osm_sa_guidinfo_record.c
===================================================================
--- opensm/osm_sa_guidinfo_record.c (revision 5246)
+++ opensm/osm_sa_guidinfo_record.c (working copy)
@@ -433,8 +433,6 @@ osm_gir_rcv_process(
ib_api_status_t status;
osm_physp_t* p_req_physp;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_gir_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_sa_vlarb_record.c
===================================================================
--- opensm/osm_sa_vlarb_record.c (revision 5246)
+++ opensm/osm_sa_vlarb_record.c (working copy)
@@ -348,8 +348,6 @@ osm_vlarb_rec_rcv_process(
ib_net64_t comp_mask;
osm_physp_t* p_req_physp;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_vlarb_rec_rcv_process );
/* update the requestor physical port. */
Index: opensm/osm_sa_lft_record.c
===================================================================
--- opensm/osm_sa_lft_record.c (revision 5246)
+++ opensm/osm_sa_lft_record.c (working copy)
@@ -329,8 +329,6 @@ osm_lftr_rcv_process(
ib_api_status_t status;
osm_physp_t* p_req_physp;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_lftr_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_sa_portinfo_record.c
===================================================================
--- opensm/osm_sa_portinfo_record.c (revision 5246)
+++ opensm/osm_sa_portinfo_record.c (working copy)
@@ -600,8 +600,6 @@ osm_pir_rcv_process(
osm_physp_t* p_req_physp;
boolean_t trusted_req = TRUE;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_pir_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_req.c
===================================================================
--- opensm/osm_req.c (revision 5246)
+++ opensm/osm_req.c (working copy)
@@ -131,8 +131,6 @@ osm_req_get(
ib_api_status_t status = IB_SUCCESS;
ib_net64_t tid;
- CL_ASSERT( p_req );
-
OSM_LOG_ENTER( p_req->p_log, osm_req_get );
CL_ASSERT( p_path );
@@ -222,8 +220,6 @@ osm_req_set(
ib_api_status_t status = IB_SUCCESS;
ib_net64_t tid;
- CL_ASSERT( p_req );
-
OSM_LOG_ENTER( p_req->p_log, osm_req_set );
CL_ASSERT( p_path );
Index: opensm/osm_sa_pkey_record.c
===================================================================
--- opensm/osm_sa_pkey_record.c (revision 5246)
+++ opensm/osm_sa_pkey_record.c (working copy)
@@ -344,8 +344,6 @@ osm_pkey_rec_rcv_process(
ib_net64_t comp_mask;
osm_physp_t* p_req_physp;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_pkey_rec_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_lin_fwd_rcv.c
===================================================================
--- opensm/osm_lin_fwd_rcv.c (revision 5246)
+++ opensm/osm_lin_fwd_rcv.c (working copy)
@@ -75,8 +75,6 @@ void
osm_lft_rcv_destroy(
IN osm_lft_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_lft_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -121,8 +119,6 @@ osm_lft_rcv_process(
ib_net64_t node_guid;
ib_api_status_t status;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_lft_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_sa_slvl_record.c
===================================================================
--- opensm/osm_sa_slvl_record.c (revision 5246)
+++ opensm/osm_sa_slvl_record.c (working copy)
@@ -324,8 +324,6 @@ osm_slvl_rec_rcv_process(
ib_net64_t comp_mask;
osm_physp_t* p_req_physp;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_slvl_rec_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_sminfo_rcv.c
===================================================================
--- opensm/osm_sminfo_rcv.c (revision 5246)
+++ opensm/osm_sminfo_rcv.c (working copy)
@@ -80,8 +80,6 @@ void
osm_sminfo_rcv_destroy(
IN osm_sminfo_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_sminfo_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
Index: opensm/osm_node_info_rcv.c
===================================================================
--- opensm/osm_node_info_rcv.c (revision 5246)
+++ opensm/osm_node_info_rcv.c (working copy)
@@ -981,8 +981,6 @@ void
osm_ni_rcv_destroy(
IN osm_ni_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_ni_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -1028,8 +1026,6 @@ osm_ni_rcv_process(
osm_node_t *p_node;
boolean_t process_new_flag = FALSE;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_ni_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_mcast_mgr.c
===================================================================
--- opensm/osm_mcast_mgr.c (revision 5246)
+++ opensm/osm_mcast_mgr.c (working copy)
@@ -394,8 +394,6 @@ void
osm_mcast_mgr_destroy(
IN osm_mcast_mgr_t* const p_mgr )
{
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_mcast_mgr_destroy );
OSM_LOG_EXIT( p_mgr->p_log );
@@ -449,8 +447,6 @@ __osm_mcast_mgr_set_tbl(
ib_net16_t block[IB_MCAST_BLOCK_SIZE];
osm_signal_t signal = OSM_SIGNAL_DONE;
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, __osm_mcast_mgr_set_tbl );
CL_ASSERT( p_sw );
Index: opensm/osm_sa_sminfo_record.c
===================================================================
--- opensm/osm_sa_sminfo_record.c (revision 5246)
+++ opensm/osm_sa_sminfo_record.c (working copy)
@@ -89,8 +89,6 @@ void
osm_smir_rcv_destroy(
IN osm_smir_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_smir_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -142,8 +140,6 @@ osm_smir_rcv_process(
ib_net64_t local_guid;
osm_port_t* local_port;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_smir_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_trap_rcv.c
===================================================================
--- opensm/osm_trap_rcv.c (revision 5246)
+++ opensm/osm_trap_rcv.c (working copy)
@@ -189,8 +189,6 @@ void
osm_trap_rcv_destroy(
IN osm_trap_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_trap_rcv_destroy );
cl_event_wheel_destroy( &p_rcv->trap_aging_tracker );
Index: opensm/osm_ucast_mgr.c
===================================================================
--- opensm/osm_ucast_mgr.c (revision 5246)
+++ opensm/osm_ucast_mgr.c (working copy)
@@ -90,8 +90,6 @@ void
osm_ucast_mgr_destroy(
IN osm_ucast_mgr_t* const p_mgr )
{
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_ucast_mgr_destroy );
OSM_LOG_EXIT( p_mgr->p_log );
@@ -785,8 +783,6 @@ __osm_ucast_mgr_set_table(
uint32_t block_id_ho = 0;
uint8_t block[IB_SMP_DATA_SIZE];
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, __osm_ucast_mgr_set_table );
CL_ASSERT( p_sw );
Index: opensm/osm_sa_node_record.c
===================================================================
--- opensm/osm_sa_node_record.c (revision 5246)
+++ opensm/osm_sa_node_record.c (working copy)
@@ -435,8 +435,6 @@ osm_nr_rcv_process(
ib_api_status_t status;
osm_physp_t* p_req_physp;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_nr_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_sw_info_rcv.c
===================================================================
--- opensm/osm_sw_info_rcv.c (revision 5246)
+++ opensm/osm_sw_info_rcv.c (working copy)
@@ -363,8 +363,6 @@ __osm_si_rcv_process_new(
ib_smp_t *p_smp;
cl_qmap_t *p_sw_guid_tbl;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, __osm_si_rcv_process_new );
CL_ASSERT( p_madw );
@@ -582,8 +580,6 @@ void
osm_si_rcv_destroy(
IN osm_si_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_si_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -631,8 +627,6 @@ osm_si_rcv_process(
ib_net64_t node_guid;
osm_si_context_t *p_context;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_si_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_mcast_fwd_rcv.c
===================================================================
--- opensm/osm_mcast_fwd_rcv.c (revision 5246)
+++ opensm/osm_mcast_fwd_rcv.c (working copy)
@@ -77,8 +77,6 @@ void
osm_mft_rcv_destroy(
IN osm_mft_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_mft_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -124,8 +122,6 @@ osm_mft_rcv_process(
ib_net64_t node_guid;
ib_api_status_t status;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_mft_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_slvl_map_rcv.c
===================================================================
--- opensm/osm_slvl_map_rcv.c (revision 5246)
+++ opensm/osm_slvl_map_rcv.c (working copy)
@@ -83,8 +83,6 @@ void
osm_slvl_rcv_destroy(
IN osm_slvl_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_slvl_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -136,8 +134,6 @@ osm_slvl_rcv_process(
ib_net64_t node_guid;
uint8_t out_port_num, in_port_num;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_slvl_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_node_desc_rcv.c
===================================================================
--- opensm/osm_node_desc_rcv.c (revision 5246)
+++ opensm/osm_node_desc_rcv.c (working copy)
@@ -109,8 +109,6 @@ void
osm_nd_rcv_destroy(
IN osm_nd_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_nd_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -152,8 +150,6 @@ osm_nd_rcv_process(
osm_node_t *p_node;
ib_net64_t node_guid;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_nd_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_sa_mcmember_record.c
===================================================================
--- opensm/osm_sa_mcmember_record.c (revision 5246)
+++ opensm/osm_sa_mcmember_record.c (working copy)
@@ -109,8 +109,6 @@ void
osm_mcmr_rcv_destroy(
IN osm_mcmr_recv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_mcmr_rcv_destroy );
cl_qlock_pool_destroy( &p_rcv->pool );
@@ -1967,8 +1965,6 @@ osm_mcmr_query_mgrp(IN osm_mcmr_recv_t*
osm_physp_t* p_req_physp;
boolean_t trusted_req = TRUE;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_mcmr_query_mgrp );
CL_ASSERT( p_madw );
@@ -2173,8 +2169,6 @@ osm_mcmr_rcv_process(
ib_member_rec_t *p_recvd_mcmember_rec;
boolean_t valid;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_mcmr_rcv_process );
CL_ASSERT( p_madw );
Index: opensm/osm_drop_mgr.c
===================================================================
--- opensm/osm_drop_mgr.c (revision 5246)
+++ opensm/osm_drop_mgr.c (working copy)
@@ -81,8 +81,6 @@ void
osm_drop_mgr_destroy(
IN osm_drop_mgr_t* const p_mgr )
{
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_drop_mgr_destroy );
OSM_LOG_EXIT( p_mgr->p_log );
@@ -597,8 +595,6 @@ osm_drop_mgr_process(
uint8_t port_num;
osm_physp_t *p_physp;
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_drop_mgr_process );
p_node_guid_tbl = &p_mgr->p_subn->node_guid_tbl;
Index: opensm/osm_lid_mgr.c
===================================================================
--- opensm/osm_lid_mgr.c (revision 5246)
+++ opensm/osm_lid_mgr.c (working copy)
@@ -1312,8 +1312,6 @@ osm_lid_mgr_process_subnet(
osm_physp_t *p_physp;
int lid_changed;
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_lid_mgr_process_subnet );
CL_PLOCK_EXCL_ACQUIRE( p_mgr->p_lock );
Index: opensm/osm_pkey_mgr.c
===================================================================
--- opensm/osm_pkey_mgr.c (revision 5246)
+++ opensm/osm_pkey_mgr.c (working copy)
@@ -73,8 +73,6 @@ void
osm_pkey_mgr_destroy(
IN osm_pkey_mgr_t * const p_mgr )
{
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_pkey_mgr_destroy );
OSM_LOG_EXIT( p_mgr->p_log );
@@ -238,8 +236,6 @@ osm_pkey_mgr_process(
osm_physp_t *p_physp;
osm_signal_t result = OSM_SIGNAL_DONE;
- CL_ASSERT( p_mgr );
-
OSM_LOG_ENTER( p_mgr->p_log, osm_pkey_mgr_process );
p_node_guid_tbl = &p_mgr->p_subn->node_guid_tbl;
Index: opensm/osm_vl_arb_rcv.c
===================================================================
--- opensm/osm_vl_arb_rcv.c (revision 5246)
+++ opensm/osm_vl_arb_rcv.c (working copy)
@@ -83,8 +83,6 @@ void
osm_vla_rcv_destroy(
IN osm_vla_rcv_t* const p_rcv )
{
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_vla_rcv_destroy );
OSM_LOG_EXIT( p_rcv->p_log );
@@ -136,8 +134,6 @@ osm_vla_rcv_process(
ib_net64_t node_guid;
uint8_t port_num, block_num;
- CL_ASSERT( p_rcv );
-
OSM_LOG_ENTER( p_rcv->p_log, osm_vla_rcv_process );
CL_ASSERT( p_madw );
More information about the general
mailing list