From: ftillier Date: Tue, 27 Sep 2005 00:57:44 +0000 (+0000) Subject: [WSD] Rework connection establishment/tear down X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6b714dae637128276af681017babdc5facd2b265;p=~shefty%2Frdma-win.git [WSD] Rework connection establishment/tear down - Split IBSPAccept into two functions, one to check if connection should be accepted, the other to actually accept the connection. - Moved MRA into CF_DEFER case in IBSPAccept. - Fixed IBSPAccept error case flow to properly cleanup. - Moved allocation of incoming connection request to listen case only. - Don't wait for RTU in IBSPAccept, continue optimistically assuming we'll get the RTU. If we get a REJ, we'll tear down the socket and report an error. - Close the switch socket from within IBSPAccept (or IBSPSocket for duplication) before destroying the QP to prevent the QP destroy callback from invoking the upcall to destroy the socket. - Reduce lock contention and thrashing during socket cleanup/disconnection. Signed-off-by: Fab Tillier (ftillier@silverstorm.com) git-svn-id: svn://openib.tc.cornell.edu/gen1@97 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/ulp/wsd/user/ib_cm.c b/trunk/ulp/wsd/user/ib_cm.c index 08e1f5a6..7c28c0b0 100644 --- a/trunk/ulp/wsd/user/ib_cm.c +++ b/trunk/ulp/wsd/user/ib_cm.c @@ -110,28 +110,12 @@ cm_req_callback( struct ibsp_socket_info *socket_info = (struct ibsp_socket_info * __ptr64)p_cm_req_rec->context; struct listen_incoming *incoming; - ib_cm_mra_t mra; IBSP_ENTER( IBSP_DBG_CM ); CL_ASSERT( socket_info ); CL_ASSERT( p_cm_req_rec->p_req_pdata ); - incoming = HeapAlloc( g_ibsp.heap, 0, sizeof(struct listen_incoming) ); - if( !incoming ) - { - /* Low on memory. */ - IBSP_ERROR( ("HeapAlloc failed, rejecting\n") ); - ib_reject( p_cm_req_rec->h_cm_req, IB_REJ_INSUF_RESOURCES ); - IBSP_EXIT( IBSP_DBG_CM ); - return; - } - - incoming->cm_req_received = *p_cm_req_rec; - cl_memcpy( &incoming->params, p_cm_req_rec->p_req_pdata, - sizeof(struct cm_req_params) ); - incoming->cm_req_received.p_req_pdata = (const uint8_t*)&incoming->params; - cl_spinlock_acquire( &socket_info->mutex ); switch( socket_info->socket_state ) @@ -143,20 +127,28 @@ cm_req_callback( /* Already too many connection requests are queued */ IBSP_TRACE1( IBSP_DBG_CM, ("already too many incoming connections, rejecting\n") ); - HeapFree( g_ibsp.heap, 0, incoming ); ib_reject( p_cm_req_rec->h_cm_req, IB_REJ_USER_DEFINED ); break; } + incoming = HeapAlloc( g_ibsp.heap, 0, sizeof(struct listen_incoming) ); + if( !incoming ) + { + /* Low on memory. */ + IBSP_ERROR( ("HeapAlloc failed, rejecting\n") ); + ib_reject( p_cm_req_rec->h_cm_req, IB_REJ_INSUF_RESOURCES ); + IBSP_EXIT( IBSP_DBG_CM ); + return; + } + + incoming->cm_req_received = *p_cm_req_rec; + cl_memcpy( &incoming->params, p_cm_req_rec->p_req_pdata, + sizeof(struct cm_req_params) ); + incoming->cm_req_received.p_req_pdata = (const uint8_t*)&incoming->params; + /* Add to the waiting list */ cl_qlist_insert_tail( &socket_info->listen.list, &incoming->item ); - /* Send MRA */ - mra.mra_length = 0; - mra.p_mra_pdata = NULL; - mra.svc_timeout = 0x15; - ib_cm_mra( p_cm_req_rec->h_cm_req, &mra ); - ibsp_post_select_event( socket_info, FD_ACCEPT, 0 ); break; @@ -164,23 +156,12 @@ cm_req_callback( { int ret; - HeapFree( g_ibsp.heap, 0, incoming ); - wait_cq_drain( socket_info ); /* Non-blocking cancel since we're in CM callback context */ ib_cm_cancel( socket_info->listen.handle, NULL ); socket_info->listen.handle = NULL; -#if 0 - cl_spinlock_release( &socket_info->mutex ); - IBSP_ERROR_EXIT( ("rejecting\n") ); - ib_reject( p_cm_req_rec->h_cm_req, IB_REJ_USER_DEFINED ); - ibsp_dup_overlap_abort( socket_info ); - return; -#endif - - ret = ib_accept( socket_info, p_cm_req_rec ); if( ret ) { @@ -200,7 +181,6 @@ cm_req_callback( default: IBSP_ERROR( ("socket is not listening anymore\n") ); - HeapFree( g_ibsp.heap, 0, incoming ); /* We're closing down - let some other listen match. */ ib_reject( p_cm_req_rec->h_cm_req, IB_REJ_INVALID_SID ); break; @@ -310,12 +290,7 @@ cm_rtu_callback( cl_spinlock_acquire( &socket_info->mutex ); - if( socket_info->socket_state == IBSP_ACCEPT ) - { - IBSP_CHANGE_SOCKET_STATE( socket_info, IBSP_CONNECTED ); - SetEvent( socket_info->h_event ); - } - else if( socket_info->socket_state == IBSP_DUPLICATING_REMOTE ) + if( socket_info->socket_state == IBSP_DUPLICATING_REMOTE ) { struct _recv_wr *wr; ib_api_status_t status; @@ -397,7 +372,7 @@ cm_rtu_callback( socket_info->qp_error = 0; IBSP_CHANGE_SOCKET_STATE( socket_info, IBSP_CONNECTED ); } - else + else if( socket_info->socket_state != IBSP_CONNECTED ) { /* The Socket might be closing */ IBSP_ERROR( @@ -411,6 +386,26 @@ cm_rtu_callback( } +/* Force the QP to error state to flush posted work requests. */ +static inline void +__flush_qp( + IN struct ibsp_socket_info *p_socket ) +{ + ib_qp_mod_t qp_mod; + ib_api_status_t status; + + memset( &qp_mod, 0, sizeof(qp_mod) ); + qp_mod.req_state = IB_QPS_ERROR; + status = ib_modify_qp( p_socket->qp, &qp_mod ); + if( status != IB_SUCCESS ) + { + IBSP_ERROR( ("ib_modify_qp returned %s\n", ib_get_err_str( status )) ); + p_socket->send_cnt = 0; + p_socket->recv_cnt = 0; + } +} + + /* * A user-specified callback that is invoked after receiving a connection * rejection message (REJ). @@ -442,12 +437,17 @@ cm_rej_callback( ibsp_post_select_event( socket_info, FD_CONNECT, WSAECONNREFUSED ); break; - case IBSP_ACCEPT: - /* Remove from connection map. */ - ibsp_conn_remove( socket_info ); + case IBSP_CONNECTED: + /* + * DISCONNECTED is a terminal state. We'll remove the connection + * when the socket gets destroyed. + */ + IBSP_CHANGE_SOCKET_STATE( socket_info, IBSP_DISCONNECTED ); - IBSP_CHANGE_SOCKET_STATE( socket_info, IBSP_CREATE ); - /* Fall through. */ + socket_info->qp_error = WSAECONNABORTED; + + __flush_qp( socket_info ); + break; case IBSP_DUPLICATING_NEW: /* Leave in that state. IBSPSocket will eventually return @@ -541,8 +541,10 @@ cm_dreq_callback( default: /* Right now, treat anything as a normal disconnect. */ IBSP_CHANGE_SOCKET_STATE( socket_info, IBSP_DISCONNECTED ); - /* We changed the state - remove from connection map. */ - ibsp_conn_remove( socket_info ); + /* + * DISCONNECTED is a terminal state. We'll remove the connection + * when the socket gets destroyed. + */ socket_info->qp_error = WSAECONNRESET; } @@ -934,7 +936,6 @@ ib_disconnect( { ib_api_status_t status; ib_cm_dreq_t cm_dreq; - ib_qp_mod_t qp_mod; IBSP_ENTER( IBSP_DBG_CM ); @@ -967,16 +968,8 @@ ib_disconnect( * interrupt transfers. */ - /* Force the QP to error state to flush posted receives. */ - memset( &qp_mod, 0, sizeof(qp_mod) ); - qp_mod.req_state = IB_QPS_ERROR; - status = ib_modify_qp( socket_info->qp, &qp_mod ); - if( status != IB_SUCCESS ) - { - IBSP_ERROR( ("ib_modify_qp returned %s\n", ib_get_err_str( status )) ); - socket_info->send_cnt = 0; - socket_info->recv_cnt = 0; - } + /* Move the QP to error to flush any work requests. */ + __flush_qp( socket_info ); IBSP_EXIT( IBSP_DBG_CM ); } diff --git a/trunk/ulp/wsd/user/ibsp_iblow.c b/trunk/ulp/wsd/user/ibsp_iblow.c index 1acd0638..0091137a 100644 --- a/trunk/ulp/wsd/user/ibsp_iblow.c +++ b/trunk/ulp/wsd/user/ibsp_iblow.c @@ -1094,40 +1094,34 @@ shutdown_and_destroy_socket_info( ib_listen_cancel( socket_info ); } + cl_spinlock_acquire( &g_ibsp.socket_info_mutex ); + cl_qlist_remove_item( &g_ibsp.socket_info_list, &socket_info->item ); + switch( old_state ) { case IBSP_CREATE: - /* Nothing to do. */ - break; - - case IBSP_CONNECT: - ibsp_conn_remove( socket_info ); - break; - - case IBSP_ACCEPT: - ibsp_conn_remove( socket_info ); - break; - case IBSP_LISTEN: + /* Nothing to do. */ break; case IBSP_CONNECTED: { struct disconnect_reason reason; - /* We changed the state - remove from connection map. */ - ibsp_conn_remove( socket_info ); - memset( &reason, 0, sizeof(reason) ); reason.type = DISC_SHUTDOWN; ib_disconnect( socket_info, &reason ); } - break; + /* Fall through. */ + case IBSP_CONNECT: case IBSP_DISCONNECTED: - /* Nothing to do. */ + /* We changed the state - remove from connection map. */ + CL_ASSERT( socket_info->conn_item.p_map ); + cl_rbmap_remove_item( &g_ibsp.conn_map, &socket_info->conn_item ); break; } + cl_spinlock_release( &g_ibsp.socket_info_mutex ); /* Flush all completions. */ if( socket_info->dup_cnt ) diff --git a/trunk/ulp/wsd/user/ibspdll.c b/trunk/ulp/wsd/user/ibspdll.c index e7bf41b8..23a14d9d 100644 --- a/trunk/ulp/wsd/user/ibspdll.c +++ b/trunk/ulp/wsd/user/ibspdll.c @@ -221,6 +221,94 @@ DllMain( } +static SOCKET +accept_socket( + IN struct ibsp_socket_info *p_socket, + IN struct listen_incoming *p_incoming, + IN struct ibsp_port *p_port, + OUT LPINT lpErrno ) +{ + struct ibsp_socket_info *new_socket_info; + int ret; + + IBSP_ENTER( IBSP_DBG_CONN ); + + /* Create a new socket here */ + new_socket_info = create_socket_info( lpErrno ); + if( !new_socket_info ) + { + ib_reject( + p_incoming->cm_req_received.h_cm_req, IB_REJ_INSUF_RESOURCES ); + + IBSP_ERROR_EXIT( ("create_socket_info failed (%d)\n", *lpErrno) ); + return INVALID_SOCKET; + } + + /* Time to allocate our IB QP */ + new_socket_info->port = p_port; + *lpErrno = ib_create_socket( new_socket_info ); + if( *lpErrno ) + { + deref_socket_info( new_socket_info ); + + ib_reject( + p_incoming->cm_req_received.h_cm_req, IB_REJ_INSUF_QP ); + + IBSP_ERROR_EXIT( ("ib_create_socket failed (%d)\n", *lpErrno) ); + return INVALID_SOCKET; + } + + /* Store the IP address and port number in the socket context */ + new_socket_info->local_addr = p_incoming->params.dest; + + /* Copy the socket context info from parent socket context */ + new_socket_info->socket_options = p_socket->socket_options; + + IBSP_TRACE( IBSP_DBG_CONN, + ("The socket address of connecting entity is\n") ); + DebugPrintSockAddr( IBSP_DBG_CONN, gdbg_lvl, &p_incoming->params.source ); + + new_socket_info->peer_addr = p_incoming->params.source; + + cl_spinlock_acquire( &new_socket_info->mutex ); + /* Update the state of the socket context */ + IBSP_CHANGE_SOCKET_STATE( new_socket_info, IBSP_CONNECTED ); + + *lpErrno = ib_accept( new_socket_info, &p_incoming->cm_req_received ); + if( *lpErrno ) + { + IBSP_CHANGE_SOCKET_STATE( new_socket_info, IBSP_CREATE ); + cl_spinlock_release( &new_socket_info->mutex ); + + if( *lpErrno == WSAEADDRINUSE ) + { + /* Be nice and reject that connection. */ + ib_reject( p_incoming->cm_req_received.h_cm_req, IB_REJ_INSUF_QP ); + } + + g_ibsp.up_call_table.lpWPUCloseSocketHandle( + new_socket_info->switch_socket, &ret ); + new_socket_info->switch_socket = INVALID_SOCKET; + STAT_DEC( wpusocket_num ); + + ib_destroy_socket( new_socket_info ); + deref_socket_info( new_socket_info ); + return INVALID_SOCKET; + } + + cl_spinlock_acquire( &g_ibsp.socket_info_mutex ); + cl_qlist_insert_tail( + &g_ibsp.socket_info_list, &new_socket_info->item ); + cl_spinlock_release( &g_ibsp.socket_info_mutex ); + + cl_spinlock_release( &new_socket_info->mutex ); + + IBSP_TRACE_EXIT( IBSP_DBG_CONN, + ("returns new socket (0x%p)\n", new_socket_info) ); + return (SOCKET)new_socket_info; +} + + /* Function: IBSPAccept * * Description: @@ -240,12 +328,11 @@ IBSPAccept( OUT LPINT lpErrno ) { struct ibsp_socket_info *socket_info = (struct ibsp_socket_info *)s; - struct ibsp_socket_info *new_socket_info; - int ret; WSABUF caller_id; WSABUF callee_id; struct listen_incoming *incoming; struct ibsp_port *port; + ib_cm_mra_t mra; IBSP_ENTER( IBSP_DBG_CONN ); @@ -290,17 +377,23 @@ IBSPAccept( IBSP_TRACE( IBSP_DBG_CONN, ("IBSPAccept: Found pending connection on this socket\n") ); - incoming = PARENT_STRUCT(cl_qlist_head( &socket_info->listen.list ), + incoming = PARENT_STRUCT(cl_qlist_remove_head( &socket_info->listen.list ), struct listen_incoming, item); + + /* Signal the event again if there are more connection requests. */ + if( cl_qlist_count( &socket_info->listen.list ) ) + ibsp_post_select_event( socket_info, FD_ACCEPT, 0 ); + cl_spinlock_release( &socket_info->mutex ); + port = socket_info->port; /* Find the destination IP address */ - if( port == NULL ) + if( !port ) { /* The socket was bound to INADDR_ANY. We must find the correct port * for the new socket. */ port = get_port_from_ip_address( incoming->params.dest.sin_addr ); - if( port == NULL ) + if( !port ) { IBSP_ERROR( ("incoming destination IP address not local (%s)\n", @@ -318,10 +411,6 @@ IBSPAccept( ib_gid_get_guid( &incoming->cm_req_received.primary_path.sgid )) ); reject: - /* The request is invalid. Remove it from the list and reject it. */ - cl_qlist_remove_item( &socket_info->listen.list, &incoming->item ); - cl_spinlock_release( &socket_info->mutex ); - ib_reject( incoming->cm_req_received.h_cm_req, IB_REJ_INSUF_QP ); HeapFree( g_ibsp.heap, 0, incoming ); @@ -352,15 +441,16 @@ reject: incoming->params.dest.sin_family) ); /* Call the conditional function */ - ret = lpfnCondition( &caller_id, NULL, NULL, NULL, - &callee_id, NULL, NULL, dwCallbackData ); - - switch( ret ) + switch( lpfnCondition( &caller_id, NULL, NULL, NULL, + &callee_id, NULL, NULL, dwCallbackData ) ) { - case CF_REJECT: - cl_qlist_remove_item( &socket_info->listen.list, &incoming->item ); - cl_spinlock_release( &socket_info->mutex ); + default: + /* Should never happen */ + IBSP_ERROR( + ("Conditional routine returned undocumented code\n") ); + /* Fall through. */ + case CF_REJECT: IBSP_TRACE1( IBSP_DBG_CONN, ("Conditional routine returned CF_REJECT\n") ); @@ -372,182 +462,40 @@ reject: return INVALID_SOCKET; case CF_DEFER: + /* Send MRA */ + mra.mra_length = 0; + mra.p_mra_pdata = NULL; + mra.svc_timeout = 0x15; + ib_cm_mra( incoming->cm_req_received.h_cm_req, &mra ); + + /* Put the item back at the head of the list. */ + cl_spinlock_acquire( &socket_info->mutex ); + cl_qlist_insert_head( &socket_info->listen.list, &incoming->item ); cl_spinlock_release( &socket_info->mutex ); IBSP_TRACE1( IBSP_DBG_CONN, ("Conditional routine returned CF_DEFER\n") ); - /* TODO: Send MRA */ + *lpErrno = WSATRY_AGAIN; IBSP_EXIT( IBSP_DBG_CONN ); return INVALID_SOCKET; case CF_ACCEPT: break; - - default: - /* Should never happen */ - cl_spinlock_release( &socket_info->mutex ); - IBSP_ERROR( - ("Conditional routine returned undocumented code (%d)\n", ret) ); - CL_ASSERT( 0 ); - *lpErrno = WSAECONNREFUSED; - IBSP_EXIT( IBSP_DBG_CONN ); - return INVALID_SOCKET; } - /* Create a new socket here */ - new_socket_info = create_socket_info( lpErrno ); - if( !new_socket_info ) + s = accept_socket( socket_info, incoming, port, lpErrno ); + if( s != INVALID_SOCKET ) { - cl_spinlock_release( &socket_info->mutex ); - - IBSP_ERROR_EXIT( ("create_socket_info failed (%d)\n", *lpErrno) ); - return INVALID_SOCKET; + /* Store the client socket address information */ + memcpy( addr, &incoming->params.source, sizeof(struct sockaddr_in) ); + *addrlen = sizeof(struct sockaddr_in); } - /* Time to allocate our IB QP */ - new_socket_info->port = port; - *lpErrno = ib_create_socket( new_socket_info ); - if( *lpErrno ) - { - cl_spinlock_release( &socket_info->mutex ); - deref_socket_info( new_socket_info ); - - IBSP_ERROR_EXIT( ("ib_create socket failed with %d\n", *lpErrno) ); - return INVALID_SOCKET; - } - - /* Store the IP address and port number in the socket context */ - new_socket_info->local_addr = incoming->params.dest; - - cl_qlist_remove_item( &socket_info->listen.list, &incoming->item ); - /* Signal the event again if there are more connection requests. */ - if( cl_qlist_count( &socket_info->listen.list ) ) - ibsp_post_select_event( socket_info, FD_ACCEPT, 0 ); - - cl_spinlock_release( &socket_info->mutex ); - - /* Copy the socket context info from parent socket context */ - new_socket_info->socket_options = socket_info->socket_options; - - /* Store the client socket address information */ - memcpy( addr, &incoming->params.source, sizeof(struct sockaddr_in) ); - *addrlen = sizeof(struct sockaddr_in); - - IBSP_TRACE( IBSP_DBG_CONN, - ("The socket address of connecting entity is\n") ); - DebugPrintSockAddr( IBSP_DBG_CONN, gdbg_lvl, &incoming->params.source ); - - new_socket_info->peer_addr = incoming->params.source; - - new_socket_info->h_event = CreateEvent( NULL, FALSE, FALSE, NULL ); - - cl_spinlock_acquire( &new_socket_info->mutex ); - /* Update the state of the socket context */ - IBSP_CHANGE_SOCKET_STATE( new_socket_info, IBSP_ACCEPT ); - - ret = ib_accept( new_socket_info, &incoming->cm_req_received ); - if( ret ) - { - IBSP_CHANGE_SOCKET_STATE( new_socket_info, IBSP_CREATE ); - cl_spinlock_release( &new_socket_info->mutex ); - - if( g_ibsp.up_call_table.lpWPUCloseSocketHandle( - new_socket_info->switch_socket, &ret ) == SOCKET_ERROR ) - { - IBSP_ERROR( ("WPUCloseSocketHandle failed: %d\n", ret) ); - } - else - { - STAT_DEC( wpusocket_num ); - } - new_socket_info->switch_socket = INVALID_SOCKET; - - CloseHandle( new_socket_info->h_event ); - - ib_destroy_socket( new_socket_info ); - - deref_socket_info( new_socket_info ); - - /* Be nice and reject that connection. */ - ib_reject( incoming->cm_req_received.h_cm_req, IB_REJ_INSUF_QP ); - - HeapFree( g_ibsp.heap, 0, incoming ); - *lpErrno = ret; - - IBSP_ERROR_EXIT( ("ib_accept failed (%d)\n", ret) ); - - return INVALID_SOCKET; - } - else - { - cl_spinlock_release( &new_socket_info->mutex ); - HeapFree( g_ibsp.heap, 0, incoming ); - - if( WaitForSingleObject( new_socket_info->h_event, INFINITE ) == WAIT_OBJECT_0 ) - { - CloseHandle( new_socket_info->h_event ); - new_socket_info->h_event = NULL; - - cl_spinlock_acquire( &new_socket_info->mutex ); + HeapFree( g_ibsp.heap, 0, incoming ); - if( new_socket_info->socket_state == IBSP_CONNECTED ) - { - cl_spinlock_acquire( &g_ibsp.socket_info_mutex ); - cl_qlist_insert_tail( &g_ibsp.socket_info_list, &new_socket_info->item ); - cl_spinlock_release( &g_ibsp.socket_info_mutex ); - - cl_spinlock_release( &new_socket_info->mutex ); - } - else - { - IBSP_ERROR( - ("ib_accept failed - socket state is %s\n", - IBSP_SOCKET_STATE_STR( new_socket_info->socket_state )) ); - - cl_spinlock_release( &new_socket_info->mutex ); - - /* The accept failed (by a REJ for instance). */ - - /* Free the socket descriptor */ - if( g_ibsp.up_call_table.lpWPUCloseSocketHandle( - new_socket_info->switch_socket, lpErrno ) == SOCKET_ERROR ) - { - IBSP_ERROR( - ("WPUCloseSocketHandle failed: %d\n", *lpErrno) ); - } - else - { - STAT_DEC( wpusocket_num ); - } - new_socket_info->switch_socket = INVALID_SOCKET; - - ib_destroy_socket( new_socket_info ); - deref_socket_info( new_socket_info ); - - *lpErrno = WSAEACCES; - - new_socket_info = (struct ibsp_socket_info *)INVALID_SOCKET; - } - - IBSP_TRACE_EXIT( IBSP_DBG_CONN, - ("returns new SocketID (0x%x)\n", new_socket_info) ); - - return (SOCKET) new_socket_info; - } - else - { - CloseHandle( new_socket_info->h_event ); - new_socket_info->h_event = NULL; - - IBSP_ERROR_EXIT( ("wait for ib_accept failed\n") ); - - *lpErrno = WSAEACCES; - return INVALID_SOCKET; - } - } - - /* Unreachable */ + IBSP_EXIT( IBSP_DBG_CONN ); + return s; } @@ -691,10 +639,6 @@ IBSPCloseSocket( cl_atomic_inc( &g_ibsp.CloseSocket_count ); #endif - cl_spinlock_acquire( &g_ibsp.socket_info_mutex ); - cl_qlist_remove_item( &g_ibsp.socket_info_list, &socket_info->item ); - cl_spinlock_release( &g_ibsp.socket_info_mutex ); - shutdown_and_destroy_socket_info( socket_info ); IBSP_EXIT( IBSP_DBG_CONN ); @@ -2111,20 +2055,6 @@ IBSPSocket( socket_info, lpProtocolInfo->dwProviderReserved ); if( *lpErrno ) { - int error; - - if( g_ibsp.up_call_table.lpWPUCloseSocketHandle( - socket_info->switch_socket, &error ) == SOCKET_ERROR ) - { - IBSP_ERROR( ("WPUCloseSocketHandle failed: %d\n", error) ); - } - else - { - STAT_DEC( wpusocket_num ); - } - - socket_info->switch_socket = INVALID_SOCKET; - deref_socket_info( socket_info ); IBSP_ERROR( ("setup_duplicate_socket failed with %d\n", *lpErrno) ); diff --git a/trunk/ulp/wsd/user/ibspstruct.h b/trunk/ulp/wsd/user/ibspstruct.h index 45dc6ddb..ceb4ce88 100644 --- a/trunk/ulp/wsd/user/ibspstruct.h +++ b/trunk/ulp/wsd/user/ibspstruct.h @@ -42,7 +42,6 @@ enum ibsp_socket_state IBSP_BIND, IBSP_CONNECT, IBSP_LISTEN, - IBSP_ACCEPT, IBSP_CONNECTED, IBSP_DUPLICATING_OLD, /* duplicating socket on the original controlling process */ IBSP_DUPLICATING_NEW, /* duplicating socket on the new controlling process */ diff --git a/trunk/ulp/wsd/user/misc.c b/trunk/ulp/wsd/user/misc.c index 5c7da135..1bf45987 100644 --- a/trunk/ulp/wsd/user/misc.c +++ b/trunk/ulp/wsd/user/misc.c @@ -36,7 +36,6 @@ char *ibsp_socket_state_str[IBSP_NUM_STATES] = { "IBSP_BIND", "IBSP_CONNECT", "IBSP_LISTEN", - "IBSP_ACCEPT", "IBSP_CONNECTED", "IBSP_DUPLICATING_OLD", "IBSP_DUPLICATING_NEW",