In order to make IPoIB-CM patches clear, remove #if 0 code. Correct spelling Identify Port in Error.
signed-off-by: stan smith <[email protected]> --- A/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp Fri Jan 07 12:02:12 2011 +++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp Fri Jan 07 10:59:19 2011 @@ -2,6 +2,7 @@ * Copyright (c) 2005 SilverStorm Technologies. All rights reserved. * Copyright (c) 2006 Mellanox Technologies. All rights reserved. * Portions Copyright (c) 2008 Microsoft Corporation. All rights reserved. + * Portions Copyright (c) 2011 Intel Corporation. All rights reserved. * * This software is available to you under the OpenIB.org BSD license * below: @@ -888,12 +889,6 @@ cl_status = cl_obj_init( &p_port->obj, CL_DESTROY_SYNC, __port_destroying, __port_cleanup, __port_free ); -#if 0 - cl_atomic_inc( &p_port->ref[ref_init] ); - IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ, - ("ref type %d ref_cnt %d\n", ref_init, p_port->obj.ref_cnt) ); -#endif - if( cl_status != CL_SUCCESS ) { IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, @@ -959,15 +954,6 @@ __endpt_mgr_remove_all( p_port ); -#if 0 - if( p_port->p_adapter->params.cm_enabled ) - { - endpt_cm_buf_mgr_destroy( p_port ); - ipoib_port_srq_destroy( p_port ); - p_port->endpt_mgr.thread_is_done = 1; - cl_event_signal( &p_port->endpt_mgr.event ); - } -#endif cl_spinlock_acquire(&p_port->send_lock); ipoib_port_resume( p_port, FALSE ); cl_spinlock_release(&p_port->send_lock); @@ -3429,7 +3415,7 @@ break; case CSUM_ENABLED: /* Get the checksums directly from packet information. - * In this case, no one of cheksum's cat get false value + * In this case, no one checksum can get false value * If hardware checksum failed or wasn't calculated, NDIS will recalculate * it again */ @@ -6089,7 +6075,8 @@ if( p_port->state != IB_QPS_RTS ) { IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_SEND, - ("Invalid port state =%d - Flush pending list\n", p_port->state) ); + ("Port[%d] Invalid state %d - Flush pending list\n", + p_port->port_num, p_port->state) ); b_good_port_state = FALSE; } cl_obj_unlock( &p_port->obj ); @@ -6307,138 +6294,16 @@ cl_fmap_init( &p_port->endpt_mgr.gid_endpts, __gid_cmp ); } -//TODO Restore CM -#if 0 -static void -__endpt_cm_mgr_thread( -IN void* p_context ); -#endif - static ib_api_status_t __endpt_mgr_init( IN ipoib_port_t* const p_port ) { IPOIB_ENTER( IPOIB_DBG_INIT ); -#if 0 - if( p_port->p_adapter->params.cm_enabled ) - { - cl_fmap_init( &p_port->endpt_mgr.conn_endpts, __gid_cmp ); - - NdisInitializeListHead( &p_port->endpt_mgr.pending_conns ); - NdisAllocateSpinLock( &p_port->endpt_mgr.conn_lock ); - cl_event_init( &p_port->endpt_mgr.event, FALSE ); - - NdisInitializeListHead( &p_port->endpt_mgr.remove_conns ); - NdisAllocateSpinLock( &p_port->endpt_mgr.remove_lock ); - - cl_thread_init( &p_port->endpt_mgr.h_thread, - __endpt_cm_mgr_thread, - ( const void *)p_port, - "CmEndPtMgr" ); - } -#endif UNUSED_PARAM(p_port); IPOIB_EXIT( IPOIB_DBG_INIT ); return IB_SUCCESS; } -//TODO CM Restore -#if 0 -static void -__endpt_cm_mgr_thread( -IN void* p_context ) -{ - ib_api_status_t ib_status; - LIST_ENTRY *p_item; - ipoib_endpt_t *p_endpt; - ipoib_port_t *p_port =( ipoib_port_t *)p_context; - - IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, - ("Starting Port [%d] Endpt CM thread \n", p_port->port_num ) ); - - while( !p_port->endpt_mgr.thread_is_done ) - { - cl_event_wait_on( &p_port->endpt_mgr.event, EVENT_NO_TIMEOUT, FALSE ); - - while( ( p_item = NdisInterlockedRemoveHeadList( - &p_port->endpt_mgr.pending_conns, - &p_port->endpt_mgr.conn_lock) ) != NULL ) - { - - p_endpt = PARENT_STRUCT( p_item, ipoib_endpt_t, list_item ); - if( p_port->endpt_mgr.thread_is_done ) - { - endpt_cm_set_state( p_endpt, IPOIB_CM_DISCONNECTED ); - continue; - } - - IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, - ("Endpt[%p] CONNECT REQ to MAC %02x:%02x:%02x:%02x:%02x:%02x\n", - p_endpt, - p_endpt->mac.addr[0], p_endpt->mac.addr[1], - p_endpt->mac.addr[2], p_endpt->mac.addr[3], - p_endpt->mac.addr[4], p_endpt->mac.addr[5] ) ); - - if( !p_endpt->conn.h_send_qp ) - { - ib_status = endpt_cm_create_qp( p_endpt, - &p_endpt->conn.h_send_qp ); - if( ib_status != IB_SUCCESS ) - { - IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, - ("Endpt %p CM create QP failed status %#x\n", - p_endpt, ib_status ) ); - } - else - { - ib_status = ipoib_endpt_connect( p_endpt ); - if( ib_status != IB_SUCCESS && ib_status != IB_PENDING ) - { - IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, - ("Endpt %p conn REQ failed status %#x\n", - p_endpt, ib_status ) ); - } - } - if( ib_status != IB_SUCCESS && ib_status != IB_PENDING ) - { - endpt_cm_set_state( p_endpt, IPOIB_CM_DESTROY ); - endpt_cm_flush_recv( p_port, p_endpt ); - endpt_cm_set_state( p_endpt, IPOIB_CM_DISCONNECTED ); - } - } - - }//while( p_item != NULL ) - - while( ( p_item = NdisInterlockedRemoveHeadList( - &p_port->endpt_mgr.remove_conns, - &p_port->endpt_mgr.remove_lock ) ) != NULL ) - { - p_endpt = PARENT_STRUCT( p_item, ipoib_endpt_t, list_item ); - - endpt_cm_set_state( p_endpt, IPOIB_CM_DESTROY ); - - IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_INIT, - ("\nDESTROYING Endpt[%p] MAC %02x:%02x:%02x:%02x:%02x:%02x\n", - p_endpt, - p_endpt->mac.addr[0], p_endpt->mac.addr[1], - p_endpt->mac.addr[2], p_endpt->mac.addr[3], - p_endpt->mac.addr[4], p_endpt->mac.addr[5] ) ); - endpt_cm_flush_recv( p_port, p_endpt ); - endpt_cm_set_state( p_endpt, IPOIB_CM_DISCONNECTED ); - cl_obj_destroy( &p_endpt->obj ); - } - } - - p_port->endpt_mgr.thread_is_done++; - - NdisFreeSpinLock( &p_port->endpt_mgr.remove_lock ); - NdisFreeSpinLock( &p_port->endpt_mgr.conn_lock ); - - IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, - (" Port [%d] Endpt_mgr thread is done\n", p_port->port_num ) ); -} -#endif - static void __endpt_mgr_destroy( IN ipoib_port_t* const p_port ) @@ -6448,12 +6313,6 @@ CL_ASSERT( cl_is_qmap_empty( &p_port->endpt_mgr.lid_endpts ) ); CL_ASSERT( cl_is_fmap_empty( &p_port->endpt_mgr.gid_endpts ) ); UNUSED_PARAM(p_port); -#if 0 - if( p_port->p_adapter->params.cm_enabled ) - { - CL_ASSERT( cl_is_fmap_empty( &p_port->endpt_mgr.conn_endpts ) ); - } -#endif IPOIB_EXIT( IPOIB_DBG_INIT ); }
ipoib_port.cpp.patch1
Description: ipoib_port.cpp.patch1
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
