From 472c76070a947fae8d5a349a54901a8d68e1ffd2 Mon Sep 17 00:00:00 2001 From: leonidk Date: Wed, 9 Jul 2008 17:19:12 +0000 Subject: [PATCH] [ALL] Remove listen error callback The listen error callback is the vestigial tail of IBAL... At some point in the distant past, it served a function, though a dubious one at best given the implementation of the listen error callbacks in client code that all effectively generate some output but really ignore the event. This patch eliminates the listen error callback, its associated callback record, and all the no-op handlers in the various clients. Signed-off-by: Fab Tillier git-svn-id: svn://openib.tc.cornell.edu/gen1@1363 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/core/al/al_cm_qp.c | 9 +--- trunk/inc/iba/ib_al.h | 69 +----------------------- trunk/inc/kernel/iba/ib_al_ifc.h | 1 - trunk/tests/alts/cmtests.c | 17 +----- trunk/tests/cmtest/user/cmtest_main.c | 13 ----- trunk/ulp/dapl/dapl/ibal/dapl_ibal_cm.c | 10 ---- trunk/ulp/dapl2/dapl/ibal/dapl_ibal_cm.c | 11 ---- trunk/ulp/wsd/user/ib_cm.c | 24 +-------- 8 files changed, 6 insertions(+), 148 deletions(-) diff --git a/trunk/core/al/al_cm_qp.c b/trunk/core/al/al_cm_qp.c index 2107ee72..0966cb16 100644 --- a/trunk/core/al/al_cm_qp.c +++ b/trunk/core/al/al_cm_qp.c @@ -1811,7 +1811,6 @@ static ib_api_status_t __cep_listen( IN const ib_al_handle_t h_al, IN const ib_cm_listen_t* const p_cm_listen, - IN const ib_pfn_listen_err_cb_t pfn_listen_err_cb, IN const void* const listen_context, OUT ib_listen_handle_t* const ph_cm_listen ) { @@ -1821,8 +1820,6 @@ __cep_listen( AL_ENTER( AL_DBG_CM ); - UNUSED_PARAM( pfn_listen_err_cb ); - /* Allocate the listen object. */ p_listen = (al_listen_t*)cl_zalloc( sizeof(al_listen_t) ); if( !p_listen ) @@ -1900,7 +1897,6 @@ ib_api_status_t ib_cm_listen( IN const ib_al_handle_t h_al, IN const ib_cm_listen_t* const p_cm_listen, - IN const ib_pfn_listen_err_cb_t pfn_listen_err_cb, IN const void* const listen_context, OUT ib_listen_handle_t* const ph_cm_listen ) { @@ -1913,14 +1909,13 @@ ib_cm_listen( AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_AL_HANDLE\n") ); return IB_INVALID_AL_HANDLE; } - if( !p_cm_listen || !pfn_listen_err_cb || !ph_cm_listen ) + if( !p_cm_listen || !ph_cm_listen ) { AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n") ); return IB_INVALID_PARAMETER; } - status = __cep_listen(h_al, p_cm_listen, pfn_listen_err_cb, listen_context, - ph_cm_listen ); + status = __cep_listen(h_al, p_cm_listen, listen_context, ph_cm_listen ); AL_EXIT( AL_DBG_CM ); return status; diff --git a/trunk/inc/iba/ib_al.h b/trunk/inc/iba/ib_al.h index c25ef119..72a8b4fa 100644 --- a/trunk/inc/iba/ib_al.h +++ b/trunk/inc/iba/ib_al.h @@ -5835,68 +5835,6 @@ typedef struct _ib_cm_drep *****/ -/****s* Access Layer/ib_listen_err_rec_t -* NAME -* ib_listen_err_rec_t -* -* DESCRIPTION -* Information returned to the user when an error occurs on a listen request. -* -* SYNOPSIS -*/ -typedef struct _ib_listen_err_rec -{ - TO_LONG_PTR(void* , listen_context) ; - ib_api_status_t reason; -TO_LONG_PTR( ib_listen_handle_t , h_cm_listen) ; - -} ib_listen_err_rec_t; -/* -* FIELDS -* listen_context -* User-defined context information associated with the listen request -* through the ib_cm_listen call. -* -* reason -* A status that identifies the reason for error being reported. -* -* h_cm_listen -* The handle for the listen request. This handle will match the handle -* returned by ib_cm_listen call. It is provided in case an error event -* occurs before a client's call to ib_cm_listen can return. -* -* SEE ALSO -* ib_pfn_listen_err_cb_t, ib_api_status_t -*****/ - - -/****f* Access Layer/ib_pfn_listen_err_cb_t -* NAME -* ib_pfn_listen_err_cb_t -* -* DESCRIPTION -* A user-specified callback that is invoked after an error has occurred on -* a listen request. -* -* SYNOPSIS -*/ -typedef void -(AL_API * FUNC_PTR64 ib_pfn_listen_err_cb_t)( - IN ib_listen_err_rec_t *p_listen_err_rec ); -/* -* PARAMETERS -* p_listen_err_rec -* [in] Error information returned to the user, indicating the reason -* for the error and associated context information. -* -* NOTES -* This callback is invoked within a system thread context in the kernel. -* -* SEE ALSO -* p_listen_err_rec -*****/ - - /****f* Access Layer/ib_cm_listen * NAME * ib_cm_listen @@ -5911,7 +5849,6 @@ AL_EXPORT ib_api_status_t AL_API ib_cm_listen( IN const ib_al_handle_t h_al, IN const ib_cm_listen_t* const p_cm_listen, - IN const ib_pfn_listen_err_cb_t pfn_listen_err_cb, IN const void* const listen_context, OUT ib_listen_handle_t* const ph_cm_listen ); /* @@ -5923,10 +5860,6 @@ ib_cm_listen( * [in] Information used to direct the listen request to match incoming * connection requests. * -* pfn_listen_err_cb -* [in] User-specified error callback routine to invoke if an error -* occurs while listening. -* * listen_context * User-specified context information that is returned as a part of all * connection requests through the pfn_cm_req_cb routine. The context is @@ -5983,7 +5916,7 @@ ib_cm_listen( * thread. * * SEE ALSO -* ib_cm_listen_t, ib_pfn_listen_err_cb_t +* ib_cm_listen_t *****/ diff --git a/trunk/inc/kernel/iba/ib_al_ifc.h b/trunk/inc/kernel/iba/ib_al_ifc.h index b4e6eae5..dc615bfb 100644 --- a/trunk/inc/kernel/iba/ib_al_ifc.h +++ b/trunk/inc/kernel/iba/ib_al_ifc.h @@ -419,7 +419,6 @@ typedef ib_api_status_t (*ib_pfn_cm_listen_t)( IN const ib_al_handle_t h_al, IN const ib_cm_listen_t* const p_cm_listen, - IN const ib_pfn_listen_err_cb_t listen_err_cb, IN const void* const listen_context, OUT ib_listen_handle_t* const ph_cm_listen ); diff --git a/trunk/tests/alts/cmtests.c b/trunk/tests/alts/cmtests.c index cde0f42b..80fa0f58 100644 --- a/trunk/tests/alts/cmtests.c +++ b/trunk/tests/alts/cmtests.c @@ -1972,17 +1972,6 @@ alts_cm_mra_cb( ALTS_EXIT( ALTS_DBG_VERBOSE); } -void -alts_cm_err_cb( - IN ib_listen_err_rec_t *p_err_rec ) -{ - ALTS_ENTER( ALTS_DBG_VERBOSE ); - - UNUSED_PARAM( p_err_rec ); - - ALTS_EXIT( ALTS_DBG_VERBOSE); -} - void alts_cm_rtu_cb( @@ -2210,8 +2199,7 @@ alts_cm_client_server( p_listen->pkey = p_ca_obj->p_dest_port_attr->p_pkey_table[0]; p_listen->pfn_cm_req_cb = alts_cm_req_cb; - ib_status = ib_cm_listen(h_al, p_listen, alts_cm_err_cb, - p_ca_obj, &p_ca_obj->h_cm_listen ); + ib_status = ib_cm_listen(h_al, p_listen, p_ca_obj, &p_ca_obj->h_cm_listen ); if(ib_status != IB_SUCCESS) { ALTS_PRINT( ALTS_DBG_ERROR, @@ -2225,8 +2213,7 @@ alts_cm_client_server( p_listen->svc_id = 2; p_ca_obj->handoff_svc_id = 2; - ib_status = ib_cm_listen(h_al, p_listen, alts_cm_err_cb, - p_ca_obj, &p_ca_obj->h_cm_listen_handoff ); + ib_status = ib_cm_listen(h_al, p_listen, p_ca_obj, &p_ca_obj->h_cm_listen_handoff ); if(ib_status != IB_SUCCESS) { ALTS_PRINT( ALTS_DBG_ERROR, diff --git a/trunk/tests/cmtest/user/cmtest_main.c b/trunk/tests/cmtest/user/cmtest_main.c index 3d7fbf5c..0ce9f102 100644 --- a/trunk/tests/cmtest/user/cmtest_main.c +++ b/trunk/tests/cmtest/user/cmtest_main.c @@ -674,18 +674,6 @@ __ca_async_event_cb( -static void AL_API -__cm_listen_err_cb( - IN ib_listen_err_rec_t *p_listen_err_rec ) -{ - CL_ENTER( CMT_DBG_VERBOSE, cmt_dbg_lvl ); - if( !p_listen_err_rec ) - printf( "%s NULL p_listen_err_rec\n", __FUNCTION__ ); - CL_EXIT( CMT_DBG_VERBOSE, cmt_dbg_lvl ); -} - - - static void AL_API __cancel_listen_cb( IN void *context ) @@ -1520,7 +1508,6 @@ __listen() status = ib_cm_listen( g_root.h_al, &cm_listen, - __cm_listen_err_cb, &g_root, &g_root.h_listen ); if( status != IB_SUCCESS ) diff --git a/trunk/ulp/dapl/dapl/ibal/dapl_ibal_cm.c b/trunk/ulp/dapl/dapl/ibal/dapl_ibal_cm.c index d05e3b53..93c4b7a1 100644 --- a/trunk/ulp/dapl/dapl/ibal/dapl_ibal_cm.c +++ b/trunk/ulp/dapl/dapl/ibal/dapl_ibal_cm.c @@ -590,15 +590,6 @@ dapli_ib_sa_query_cb ( } } - -static void -dapli_ibal_listen_err_cb ( - IN ib_listen_err_rec_t *p_listen_err_rec ) -{ - UNUSED_PARAM( p_listen_err_rec ); - dapl_dbg_log (DAPL_DBG_TYPE_CM, "--> DiLEcb: CM callback listen error\n"); -} - static void dapli_ib_cm_apr_cb ( IN ib_cm_apr_rec_t *p_cm_apr_rec ) @@ -1480,7 +1471,6 @@ dapls_ib_setup_conn_listener ( ib_status = ib_cm_listen ( dapl_ibal_root.h_al, &cm_listen, - dapli_ibal_listen_err_cb, (void *) sp_ptr, &sp_ptr->cm_srvc_handle); diff --git a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_cm.c b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_cm.c index 0998421b..fdfe3623 100644 --- a/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_cm.c +++ b/trunk/ulp/dapl2/dapl/ibal/dapl_ibal_cm.c @@ -78,16 +78,6 @@ dapli_ib_cm_event_str(ib_cm_events_t e) } -static void -dapli_ibal_listen_err_cb ( - IN ib_listen_err_rec_t *p_listen_err_rec ) -{ - UNUSED_PARAM( p_listen_err_rec ); - - dapl_dbg_log (DAPL_DBG_TYPE_CM, "--> %s: CM callback listen error\n", - "DiLEcb"); -} - static void dapli_ib_cm_apr_cb ( IN ib_cm_apr_rec_t *p_cm_apr_rec ) @@ -1174,7 +1164,6 @@ dapls_ib_setup_conn_listener ( ib_status = ib_cm_listen ( dapl_ibal_root.h_al, &cm_listen, - dapli_ibal_listen_err_cb, (void *) sp_ptr, &sp_ptr->cm_srvc_handle ); diff --git a/trunk/ulp/wsd/user/ib_cm.c b/trunk/ulp/wsd/user/ib_cm.c index 3b38c59d..d883e841 100644 --- a/trunk/ulp/wsd/user/ib_cm.c +++ b/trunk/ulp/wsd/user/ib_cm.c @@ -43,7 +43,6 @@ static void AL_API cm_rtu_callback(IN ib_cm_rtu_rec_t * p_cm_rtu_rec); static void AL_API cm_rej_callback(IN ib_cm_rej_rec_t * p_cm_rej_rec); static void AL_API cm_mra_callback(IN ib_cm_mra_rec_t * p_cm_mra_rec); static void AL_API cm_dreq_callback(IN ib_cm_dreq_rec_t * p_cm_dreq_rec); -static void AL_API listen_err_callback(IN ib_listen_err_rec_t * p_listen_err_rec); static void AL_API cm_apr_callback(IN ib_cm_apr_rec_t * p_cm_apr_rec); @@ -582,27 +581,6 @@ cm_drep_callback( } -/* - * A user-specified callback that is invoked after an error has occurred on - * a listen request. - */ -static void AL_API -listen_err_callback( - IN ib_listen_err_rec_t *p_listen_err_rec ) -{ - /* TODO */ - IBSP_ENTER( IBSP_DBG_CM ); - - UNUSED_PARAM( p_listen_err_rec ); - - IBSP_ERROR( ("not implemented") ); - - CL_ASSERT( 0 ); - - IBSP_EXIT( IBSP_DBG_CM ); -} - - /* * A user-specified callback that is invoked after receiving a load * alternate path response message. @@ -688,7 +666,7 @@ ib_listen( param.qp_type = IB_QPT_RELIABLE_CONN; - status = ib_cm_listen( g_ibsp.al_handle, ¶m, listen_err_callback, socket_info, /* context */ + status = ib_cm_listen( g_ibsp.al_handle, ¶m, socket_info, /* context */ &socket_info->listen.handle ); if( status != IB_SUCCESS ) -- 2.46.0