From: aestrin Date: Mon, 15 Sep 2008 17:16:53 +0000 (+0000) Subject: [ipoib] cm merged functionality to the tip of the trunk. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0aef296e8da77a96a4f447fba31f7404b880e7a7;p=~shefty%2Frdma-win.git [ipoib] cm merged functionality to the tip of the trunk. - restored inline recv for UD. - added port pKey param to listening CEP - CA Attriutes cached for port to be used later for SRQ Recv queue depth limits. git-svn-id: svn://openib.tc.cornell.edu/gen1@1599 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/branches/ipoib_cm/kernel/SOURCES b/branches/ipoib_cm/kernel/SOURCES index f18da583..16ea75b5 100644 --- a/branches/ipoib_cm/kernel/SOURCES +++ b/branches/ipoib_cm/kernel/SOURCES @@ -29,7 +29,7 @@ SOURCES= ipoib_log.mc \ INCLUDES=..;..\..\..\inc;..\..\..\inc\kernel; C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS_WDM=1 \ - -DDEPRECATE_DDK_FUNCTIONS -DNDIS51_MINIPORT -DNEED_CL_OBJ -DBINARY_COMPATIBLE=0 + -DDEPRECATE_DDK_FUNCTIONS -DNDIS51_MINIPORT -DNEED_CL_OBJ -DBINARY_COMPATIBLE=0 -DPERF_TRACK_ON TARGETLIBS= \ $(TARGETPATH)\*\complib.lib \ diff --git a/branches/ipoib_cm/kernel/ipoib_adapter.h b/branches/ipoib_cm/kernel/ipoib_adapter.h index 7e80aaa6..70b5af37 100644 --- a/branches/ipoib_cm/kernel/ipoib_adapter.h +++ b/branches/ipoib_cm/kernel/ipoib_adapter.h @@ -60,15 +60,20 @@ /* * Macros */ - +typedef enum +{ + CSUM_DISABLED = 0, + CSUM_ENABLED, + CSUM_BYPASS +} csum_flag_t; typedef struct _ipoib_params { int32_t rq_depth; int32_t rq_low_watermark; int32_t sq_depth; - boolean_t send_chksum_offload; - boolean_t recv_chksum_offload; + csum_flag_t send_chksum_offload; + csum_flag_t recv_chksum_offload; uint32_t sa_timeout; uint32_t sa_retry_cnt; uint32_t recv_pool_ratio; diff --git a/branches/ipoib_cm/kernel/ipoib_cm.c b/branches/ipoib_cm/kernel/ipoib_cm.c index 5cc856c4..eab9dad4 100644 --- a/branches/ipoib_cm/kernel/ipoib_cm.c +++ b/branches/ipoib_cm/kernel/ipoib_cm.c @@ -211,18 +211,11 @@ endpt_cm_destroy_conn( IN ipoib_port_t* const p_port, IN ipoib_endpt_t* const p_endpt ) { - cm_state_t cm_state; IPOIB_ENTER( IPOIB_DBG_ENDPT ); if( !p_port || !p_endpt ) return; - cm_state = endpt_cm_set_state( p_endpt, IPOIB_CM_DESTROY ); - p_endpt->cm_flag = 0; - - IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT, - ("Destroy Connected Endpt State: %d\n", cm_state ) ); - cl_event_init( &p_endpt->remove_event, FALSE ); NdisInterlockedInsertTailList( &p_port->endpt_mgr.remove_conns, &p_endpt->list_item, &p_port->endpt_mgr.remove_lock ); @@ -365,7 +358,7 @@ ipoib_port_listen( cm_listen.ca_guid = p_port->p_adapter->guids.ca_guid; cm_listen.port_guid = p_port->p_adapter->guids.port_guid.guid; cm_listen.lid = IB_ALL_LIDS; - cm_listen.pkey = IB_ALL_PKEYS; // TODO: set pkey + cm_listen.pkey = p_port->p_adapter->guids.port_guid.pkey; cm_listen.pfn_cm_req_cb = __conn_req_cb; @@ -546,8 +539,16 @@ conn_exit: p_endpt->conn.h_qp = NULL; } } - //ipoib_port_resume( p_port ); - + cl_spinlock_acquire( &p_port->send_lock ); + if( cl_qlist_count( &p_port->send_mgr.pending_list ) ) + { + cl_spinlock_release( &p_port->send_lock ); + ipoib_port_resume( p_port ); + } + else + { + cl_spinlock_release( &p_port->send_lock ); + } IPOIB_EXIT( IPOIB_DBG_ENDPT ); return; diff --git a/branches/ipoib_cm/kernel/ipoib_driver.c b/branches/ipoib_cm/kernel/ipoib_driver.c index 128d6c9e..907e6e7a 100644 --- a/branches/ipoib_cm/kernel/ipoib_driver.c +++ b/branches/ipoib_cm/kernel/ipoib_driver.c @@ -269,6 +269,11 @@ void ipoib_shutdown( IN PVOID adapter_context ); +void +ipoib_cancel_xmit( + IN NDIS_HANDLE adapter_context, + IN PVOID cancel_id ); + static void ipoib_complete_query( IN ipoib_adapter_t* const p_adapter, @@ -364,7 +369,7 @@ DriverEntry( characteristics.ReturnPacketHandler = ipoib_return_packet; characteristics.SendPacketsHandler = ipoib_send_packets; - + characteristics.CancelSendPacketsHandler = ipoib_cancel_xmit; #ifdef NDIS51_MINIPORT characteristics.PnPEventNotifyHandler = ipoib_pnp_notify; characteristics.AdapterShutdownHandler = ipoib_shutdown; @@ -591,7 +596,12 @@ ipoib_get_adapter_params( // Adjusting the low watermark parameter p_adapter->params.rq_low_watermark = p_adapter->params.rq_depth / p_adapter->params.rq_low_watermark; - + + /* so far disable CM if LSO get active */ + if( p_adapter->params.cm_enabled ) + { + p_adapter->params.cm_enabled = !p_adapter->params.lso; + } p_adapter->params.cm_payload_mtu = min( MAX_CM_PAYLOAD_MTU, p_adapter->params.payload_mtu ); p_adapter->params.cm_xfer_block_size = @@ -780,7 +790,9 @@ ipoib_initialize( #if IPOIB_USE_DMA status = NdisMInitializeScatterGatherDma( h_adapter, TRUE, - max( p_adapter->params.xfer_block_size, p_adapter->params.cm_xfer_block_size ) ); + ( p_adapter->params.cm_enabled ? + p_adapter->params.cm_xfer_block_size: + p_adapter->params.xfer_block_size ) ); if( status != NDIS_STATUS_SUCCESS ) { ipoib_destroy_adapter( p_adapter ); @@ -971,7 +983,7 @@ ipoib_query_info( break; case OID_GEN_LINK_SPEED: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_LINK_SPEED\n", port_num) ); cl_obj_lock( &p_adapter->obj ); switch( p_adapter->state ) @@ -1096,7 +1108,7 @@ ipoib_query_info( break; case OID_GEN_MEDIA_CONNECT_STATUS: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_MEDIA_CONNECT_STATUS\n", port_num) ); cl_obj_lock( &p_adapter->obj ); switch( p_adapter->state ) @@ -1116,7 +1128,7 @@ ipoib_query_info( break; case IB_PNP_PORT_ACTIVE: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d returning NdisMediaStateConnected\n", port_num) ); info = NdisMediaStateConnected; break; @@ -1143,119 +1155,119 @@ ipoib_query_info( /* Required General Statistics */ case OID_GEN_XMIT_OK: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_XMIT_OK\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_SUCCESS, &oid_info ); break; case OID_GEN_RCV_OK: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_RCV_OK\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_SUCCESS, &oid_info ); break; case OID_GEN_XMIT_ERROR: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_XMIT_ERROR\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_ERROR, &oid_info ); break; case OID_GEN_RCV_ERROR: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_RCV_ERROR\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_ERROR, &oid_info ); break; case OID_GEN_RCV_NO_BUFFER: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_RCV_NO_BUFFER\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_DROPPED, &oid_info ); break; case OID_GEN_DIRECTED_BYTES_XMIT: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_DIRECTED_BYTES_XMIT\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_UCAST_BYTES, &oid_info ); break; case OID_GEN_DIRECTED_FRAMES_XMIT: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_DIRECTED_FRAMES_XMIT\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_UCAST_FRAMES, &oid_info ); break; case OID_GEN_MULTICAST_BYTES_XMIT: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_MULTICAST_BYTES_XMIT\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_MCAST_BYTES, &oid_info ); break; case OID_GEN_MULTICAST_FRAMES_XMIT: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_MULTICAST_FRAMES_XMIT\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_MCAST_FRAMES, &oid_info ); break; case OID_GEN_BROADCAST_BYTES_XMIT: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_BROADCAST_BYTES_XMIT\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_BCAST_BYTES, &oid_info ); break; case OID_GEN_BROADCAST_FRAMES_XMIT: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_BROADCAST_FRAMES_XMIT\n", port_num) ); src_buf = NULL; status = ipoib_get_send_stat( p_adapter, IP_STAT_BCAST_FRAMES, &oid_info ); break; case OID_GEN_DIRECTED_BYTES_RCV: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_DIRECTED_BYTES_RCV\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_UCAST_BYTES, &oid_info ); break; case OID_GEN_DIRECTED_FRAMES_RCV: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_DIRECTED_FRAMES_RCV\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_UCAST_FRAMES, &oid_info ); break; case OID_GEN_MULTICAST_BYTES_RCV: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_MULTICAST_BYTES_RCV\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_MCAST_BYTES, &oid_info ); break; case OID_GEN_MULTICAST_FRAMES_RCV: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_MULTICAST_FRAMES_RCV\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_MCAST_FRAMES, &oid_info ); break; case OID_GEN_BROADCAST_BYTES_RCV: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_BROADCAST_BYTES_RCV\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_BCAST_BYTES, &oid_info ); break; case OID_GEN_BROADCAST_FRAMES_RCV: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_GEN_BROADCAST_FRAMES_RCV\n", port_num) ); src_buf = NULL; status = ipoib_get_recv_stat( p_adapter, IP_STAT_BCAST_FRAMES, &oid_info ); @@ -1263,34 +1275,34 @@ ipoib_query_info( /* Required Ethernet operational characteristics */ case OID_802_3_PERMANENT_ADDRESS: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_802_3_PERMANENT_ADDRESS\n", port_num) ); src_buf = &p_adapter->mac; buf_len = sizeof(p_adapter->mac); break; case OID_802_3_CURRENT_ADDRESS: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_802_3_CURRENT_ADDRESS\n", port_num) ); src_buf = &p_adapter->params.conf_mac; buf_len = sizeof(p_adapter->params.conf_mac); break; case OID_802_3_MULTICAST_LIST: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_802_3_MULTICAST_LIST\n", port_num) ); src_buf = p_adapter->mcast_array; buf_len = p_adapter->mcast_array_size * sizeof(mac_addr_t); break; case OID_802_3_MAXIMUM_LIST_SIZE: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_802_3_MAXIMUM_LIST_SIZE\n", port_num) ); info = MAX_MCAST; break; case OID_802_3_MAC_OPTIONS: - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received query for OID_802_3_MAC_OPTIONS\n", port_num) ); info = 0; break; @@ -1331,7 +1343,7 @@ ipoib_query_info( case OID_802_3_XMIT_LATE_COLLISIONS: case OID_PNP_CAPABILITIES: status = NDIS_STATUS_NOT_SUPPORTED; - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received an unsupported oid of 0x%.8X!\n", port_num, oid) ); break; @@ -1344,7 +1356,7 @@ ipoib_query_info( #endif default: status = NDIS_STATUS_INVALID_OID; - IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE,IPOIB_DBG_OID, ("Port %d received an invalid oid of 0x%.8X!\n", port_num, oid) ); break; } @@ -2586,6 +2598,19 @@ ipoib_dereg_addrs( IPOIB_EXIT( IPOIB_DBG_OID ); } +void +ipoib_cancel_xmit( + IN NDIS_HANDLE adapter_context, + IN PVOID cancel_id ) +{ + ipoib_adapter_t* const p_adapter = + (ipoib_adapter_t* const )adapter_context; + + if( p_adapter && p_adapter->p_port ) + { + ipoib_port_cancel_xmit( p_adapter->p_port, cancel_id ); + } +} static void __ipoib_ats_reg_cb( diff --git a/branches/ipoib_cm/kernel/ipoib_endpoint.c b/branches/ipoib_cm/kernel/ipoib_endpoint.c index a184bf24..6fb94724 100644 --- a/branches/ipoib_cm/kernel/ipoib_endpoint.c +++ b/branches/ipoib_cm/kernel/ipoib_endpoint.c @@ -118,9 +118,9 @@ __cm_recv_desc_dtor( static NDIS_PACKET* __endpt_cm_get_ndis_pkt( IN ipoib_port_t* const p_port, - IN ipoib_recv_desc_t* const p_desc ); + IN ipoib_cm_desc_t* const p_desc ); -static inline ipoib_recv_desc_t* +static inline ipoib_cm_desc_t* __endpt_cm_buf_mgr_get_recv( IN endpt_buf_mgr_t * const p_buf_mgr ); @@ -288,13 +288,27 @@ __endpt_destroying( p_port->p_adapter->p_ifc->leave_mcast( p_endpt->h_mcast, ipoib_leave_mcast_cb ); } else if( p_port->p_adapter->params.cm_enabled ) - { - if( endpt_cm_get_state( p_endpt ) == IPOIB_CM_CONNECTED ) + { + cm_state_t cm_state; + cm_state = endpt_cm_set_state( p_endpt, IPOIB_CM_DESTROY ); + p_endpt->cm_flag = 0; + IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT, + ("Destroy Endpt CM state: %d\n", cm_state ) ); + switch( cm_state ) { - /* send DREQ */ - //endpt_cm_disconnect( p_port, p_endpt ); + case IPOIB_CM_CONNECTED: + /* DREQ will be sent in context of destroy_qp */ + case IPOIB_CM_CONNECT: + case IPOIB_CM_DREP_SENT: + case IPOIB_CM_STALE_CONN: + cl_obj_unlock( p_obj ); + endpt_cm_destroy_conn( p_port, p_endpt ); + cl_obj_lock( p_obj ); + case IPOIB_CM_DISCONNECTED: + default: + CL_ASSERT( p_endpt->conn.h_qp == NULL ); + break; } - endpt_cm_destroy_conn( p_port, p_endpt ); } cl_obj_unlock( p_obj ); @@ -586,7 +600,7 @@ endpt_cm_buf_mgr_init( p_port->cm_recv_mgr.rq_depth , 0, 0, - sizeof( ipoib_recv_desc_t ), + sizeof( ipoib_cm_desc_t ), __cm_recv_desc_ctor, __cm_recv_desc_dtor, p_port ); @@ -684,7 +698,7 @@ endpt_cm_buf_mgr_destroy( p_item = cl_qlist_remove_head( &p_port->cm_buf_mgr.posted_list ) ) { cl_qpool_put( &p_port->cm_buf_mgr.recv_pool, - &( PARENT_STRUCT( p_item, ipoib_recv_desc_t, list_item ))->item ); + &( PARENT_STRUCT( p_item, ipoib_cm_desc_t, list_item ))->item ); } } cl_qpool_destroy( &p_port->cm_buf_mgr.recv_pool ); @@ -698,7 +712,7 @@ __cm_recv_desc_ctor( IN void* context, OUT cl_pool_item_t** const pp_pool_item ) { - ipoib_recv_desc_t* p_desc; + ipoib_cm_desc_t* p_desc; ipoib_port_t* p_port; //IPOIB_ENTER( IPOIB_DBG_ALLOC ); @@ -706,13 +720,13 @@ __cm_recv_desc_ctor( CL_ASSERT( p_object ); CL_ASSERT( context ); - p_desc = (ipoib_recv_desc_t*)p_object; + p_desc = (ipoib_cm_desc_t*)p_object; p_port = (ipoib_port_t*)context; /* Allocate the receive buffer. */ p_desc->buf_size = p_port->p_adapter->params.cm_xfer_block_size; - p_desc->p_buf = (recv_buf_t*)ExAllocatePoolWithTag( + p_desc->p_buf = (uint8_t *)ExAllocatePoolWithTag( NonPagedPool, p_desc->buf_size, 'DOMC' ); if( p_desc->p_buf == NULL ) @@ -745,13 +759,13 @@ __cm_recv_desc_dtor( IN const cl_pool_item_t* const p_pool_item, IN void *context ) { - ipoib_recv_desc_t *p_desc; + ipoib_cm_desc_t *p_desc; //IPOIB_ENTER( IPOIB_DBG_ALLOC ); UNUSED_PARAM( context ); - p_desc = PARENT_STRUCT( p_pool_item, ipoib_recv_desc_t, item ); + p_desc = PARENT_STRUCT( p_pool_item, ipoib_cm_desc_t, item ); if( p_desc->p_buf ) ExFreePoolWithTag( p_desc->p_buf, 'DOMC' ); @@ -762,7 +776,7 @@ __cm_recv_desc_dtor( static NDIS_PACKET* __endpt_cm_get_ndis_pkt( IN ipoib_port_t* const p_port, - IN ipoib_recv_desc_t* const p_desc ) + IN ipoib_cm_desc_t* const p_desc ) { NDIS_STATUS status; NDIS_PACKET *p_packet; @@ -804,20 +818,16 @@ __endpt_cm_get_ndis_pkt( return p_packet; } -static inline ipoib_recv_desc_t* +static inline ipoib_cm_desc_t* __endpt_cm_buf_mgr_get_recv( IN endpt_buf_mgr_t * const p_buf_mgr ) { - ipoib_recv_desc_t *p_desc; - - //IPOIB_ENTER( IPOIB_DBG_RECV ); - - p_desc = (ipoib_recv_desc_t*)cl_qpool_get( &p_buf_mgr->recv_pool ); + ipoib_cm_desc_t *p_desc; + p_desc = (ipoib_cm_desc_t*)cl_qpool_get( &p_buf_mgr->recv_pool ); if( p_desc ) cl_qlist_insert_tail( &p_buf_mgr->posted_list, &p_desc->list_item ); - //IPOIB_EXIT( IPOIB_DBG_RECV ); return p_desc; } @@ -825,7 +835,7 @@ __endpt_cm_buf_mgr_get_recv( void endpt_cm_buf_mgr_put_recv( IN endpt_buf_mgr_t * const p_buf_mgr, - IN ipoib_recv_desc_t* const p_desc ) + IN ipoib_cm_desc_t* const p_desc ) { IPOIB_ENTER(IPOIB_DBG_RECV ); @@ -854,7 +864,7 @@ endpt_cm_recv_mgr_build_pkt_array( IN OUT uint32_t* p_bytes_recv ) { cl_list_item_t *p_item; - ipoib_recv_desc_t *p_desc; + ipoib_cm_desc_t *p_desc; uint32_t i = 0; NDIS_PACKET *p_packet; @@ -869,7 +879,7 @@ endpt_cm_recv_mgr_build_pkt_array( for( p_item; p_item != cl_qlist_end( p_done_list ); p_item = cl_qlist_remove_head( p_done_list ) ) { - p_desc = (ipoib_recv_desc_t*)p_item; + p_desc = (ipoib_cm_desc_t*)p_item; p_packet = __endpt_cm_get_ndis_pkt( p_port, p_desc ); if( !p_packet ) @@ -910,7 +920,7 @@ endpt_cm_flush_recv( ib_wc_t *p_free_wc; ib_wc_t *p_done_wc; ib_wc_t *p_wc; - ipoib_recv_desc_t *p_desc; + ipoib_cm_desc_t *p_desc; size_t i; IPOIB_ENTER( IPOIB_DBG_RECV ); @@ -945,7 +955,7 @@ endpt_cm_flush_recv( cl_spinlock_acquire( &p_port->recv_lock ); for( p_wc = p_done_wc; p_wc; p_wc = p_wc->p_next ) { - p_desc = (ipoib_recv_desc_t*)(uintn_t)p_wc->wr_id; + p_desc = (ipoib_cm_desc_t *)(uintn_t)p_wc->wr_id; endpt_cm_buf_mgr_put_recv( &p_port->cm_buf_mgr, p_desc ); p_port->cm_recv_mgr.depth--; } @@ -971,7 +981,7 @@ endpt_cm_recv_mgr_filter( OUT cl_qlist_t* const p_bad_list ) { ib_api_status_t ib_status; - ipoib_recv_desc_t *p_desc; + ipoib_cm_desc_t *p_desc; ib_wc_t *p_wc; ipoib_pkt_t *p_ipoib; eth_pkt_t *p_eth; @@ -984,7 +994,7 @@ endpt_cm_recv_mgr_filter( for( p_wc = p_done_wc_list, recv_cnt = 0; p_wc; p_wc = p_wc->p_next ) { - p_desc = (ipoib_recv_desc_t*)(uintn_t)p_wc->wr_id; + p_desc = (ipoib_cm_desc_t *)(uintn_t)p_wc->wr_id; recv_cnt++; if( p_wc->status != IB_WCS_SUCCESS ) { @@ -1073,9 +1083,9 @@ endpt_cm_post_recv( IN ipoib_port_t* const p_port ) { ib_api_status_t ib_status = IB_SUCCESS; - ipoib_recv_desc_t *p_head_desc = NULL; - ipoib_recv_desc_t *p_tail_desc = NULL; - ipoib_recv_desc_t *p_next_desc; + ipoib_cm_desc_t *p_head_desc = NULL; + ipoib_cm_desc_t *p_tail_desc = NULL; + ipoib_cm_desc_t *p_next_desc; ib_recv_wr_t *p_failed_wc = NULL; IPOIB_ENTER( IPOIB_DBG_RECV ); @@ -1122,7 +1132,7 @@ endpt_cm_post_recv( /* put descriptors back to the pool */ while( p_failed_wc ) { - p_head_desc = PARENT_STRUCT( p_failed_wc, ipoib_recv_desc_t, wr ); + p_head_desc = PARENT_STRUCT( p_failed_wc, ipoib_cm_desc_t, wr ); p_failed_wc = p_failed_wc->p_next; endpt_cm_buf_mgr_put_recv( &p_port->cm_buf_mgr, p_head_desc ); p_port->cm_recv_mgr.depth--; diff --git a/branches/ipoib_cm/kernel/ipoib_endpoint.h b/branches/ipoib_cm/kernel/ipoib_endpoint.h index 4c4f4d76..f759677a 100644 --- a/branches/ipoib_cm/kernel/ipoib_endpoint.h +++ b/branches/ipoib_cm/kernel/ipoib_endpoint.h @@ -70,7 +70,6 @@ typedef enum _cm_state { IPOIB_CM_CONNECT, IPOIB_CM_CONNECTED, IPOIB_CM_LISTEN, - IPOIB_CM_FAILED, IPOIB_CM_DREP_SENT, IPOIB_CM_DREQ_SENT, IPOIB_CM_STALE_CONN, diff --git a/branches/ipoib_cm/kernel/ipoib_port.c b/branches/ipoib_cm/kernel/ipoib_port.c index 599dbeb1..e1ecec3c 100644 --- a/branches/ipoib_cm/kernel/ipoib_port.c +++ b/branches/ipoib_cm/kernel/ipoib_port.c @@ -916,7 +916,17 @@ __ib_mgr_init( // disable further CM initialization p_port->p_adapter->params.cm_enabled = FALSE; } - + if (!p_port->p_ca_attrs->ipoib_csum ) + { + //checksum is not supported by device + //user must specify BYPASS to explicitly cancel checksum calculation + IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, + ("IPOIB CHKSUM IS NOT SUPPORTED BY HCA\n" ) ); + if (p_port->p_adapter->params.send_chksum_offload == CSUM_ENABLED) + p_port->p_adapter->params.send_chksum_offload = CSUM_DISABLED; + if (p_port->p_adapter->params.recv_chksum_offload == CSUM_ENABLED) + p_port->p_adapter->params.recv_chksum_offload = CSUM_DISABLED; + } /* Allocate the UD QP. */ cl_memclr( &qp_create, sizeof(qp_create) ); qp_create.qp_type = IB_QPT_UNRELIABLE_DGRM; @@ -1671,12 +1681,11 @@ ipoib_return_packet( /* Get the port and descriptor from the packet. */ p_port = IPOIB_PORT_FROM_PACKET( p_packet ); - - cl_spinlock_acquire( &p_port->recv_lock ); + p_desc = (ipoib_recv_desc_t *)IPOIB_RECV_FROM_PACKET( p_packet ); - /* Get descriptor from the packet. */ - p_desc = IPOIB_RECV_FROM_PACKET( p_packet ); + cl_spinlock_acquire( &p_port->recv_lock ); + /* Get descriptor from the packet. */ if( p_desc->type == PKT_TYPE_CM_UCAST ) { NDIS_BUFFER *p_buf; @@ -1688,7 +1697,7 @@ ipoib_return_packet( NdisDprFreePacketNonInterlocked( p_packet ); NdisFreeBuffer( p_buf ); - endpt_cm_buf_mgr_put_recv( &p_port->cm_buf_mgr, p_desc ); + endpt_cm_buf_mgr_put_recv( &p_port->cm_buf_mgr, (ipoib_cm_desc_t *)p_desc ); status = endpt_cm_post_recv( p_port ); if( status != IB_SUCCESS ) @@ -1887,7 +1896,7 @@ __recv_cb( while( shortage-- > 1 ) { __buf_mgr_put_recv( p_port, - IPOIB_RECV_FROM_PACKET( p_port->recv_mgr.recv_pkt_array[shortage] ), + (ipoib_recv_desc_t *)IPOIB_RECV_FROM_PACKET( p_port->recv_mgr.recv_pkt_array[shortage] ), p_port->recv_mgr.recv_pkt_array[shortage] ); } cl_spinlock_release( &p_port->recv_lock ); @@ -2041,7 +2050,7 @@ __recv_get_endpts( if( *pp_src && *pp_dst ) { - IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV, + IPOIB_PRINT(TRACE_LEVEL_VERBOSE, IPOIB_DBG_RECV, ("Recv:\n" "\tsrc MAC: %02X-%02X-%02X-%02X-%02X-%02X\n" "\tdst MAC: %02X-%02X-%02X-%02X-%02X-%02X\n", @@ -2099,7 +2108,7 @@ __recv_mgr_filter( } else { - IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV, + IPOIB_PRINT(TRACE_LEVEL_VERBOSE, IPOIB_DBG_RECV, ("Flushed completion %s\n", p_port->p_adapter->p_ifc->get_wc_status_str( p_wc->status )) ); ipoib_inc_recv_stat( p_port->p_adapter, IP_STAT_DROPPED, 0, 0 ); @@ -2134,7 +2143,7 @@ __recv_mgr_filter( } /* Successful completion. Get the receive information. */ - p_desc->ndis_csum.Value = (ULONG) p_wc->csum_ok; + p_desc->ndis_csum.Value = ( ( p_wc->recv.ud.recv_opt & IB_RECV_OPT_CSUM_MASK) >> 8 ); cl_perf_start( GetRecvEndpts ); __recv_get_endpts( p_port, p_desc, p_wc, &p_src, &p_dst ); cl_perf_stop( &p_port->p_adapter->perf, GetRecvEndpts ); @@ -2724,6 +2733,7 @@ __recv_mgr_prepare_pkt( NDIS_STATUS status; uint32_t pkt_filter; ip_stat_sel_t type; + NDIS_TCP_IP_CHECKSUM_PACKET_INFO chksum; PERF_DECLARE( GetNdisPkt ); IPOIB_ENTER( IPOIB_DBG_RECV ); @@ -2804,9 +2814,31 @@ __recv_mgr_prepare_pkt( return IB_INSUFFICIENT_RESOURCES; } - /* Get the checksums directly from packet information. */ - NDIS_PER_PACKET_INFO_FROM_PACKET( *pp_packet, TcpIpChecksumPacketInfo ) = - (PVOID) (uintn_t) (p_desc->ndis_csum.Value); + chksum.Value = 0; + switch( p_port->p_adapter->params.recv_chksum_offload ) + { + default: + CL_ASSERT( FALSE ); + case CSUM_DISABLED: + NDIS_PER_PACKET_INFO_FROM_PACKET( *pp_packet, TcpIpChecksumPacketInfo ) = + (void*)(uintn_t)chksum.Value; + break; + case CSUM_ENABLED: + /* Get the checksums directly from packet information. */ + /* In this case, no one of cheksum's cat get false value */ + /* If hardware checksum failed or wasn't calculated, NDIS will recalculate it again */ + NDIS_PER_PACKET_INFO_FROM_PACKET( *pp_packet, TcpIpChecksumPacketInfo ) = + (void*)(uintn_t)(p_desc->ndis_csum.Value); + break; + case CSUM_BYPASS: + /* Flag the checksums as having been calculated. */ + chksum.Receive.NdisPacketTcpChecksumSucceeded = TRUE; + chksum.Receive.NdisPacketUdpChecksumSucceeded = TRUE; + chksum.Receive.NdisPacketIpChecksumSucceeded = TRUE; + NDIS_PER_PACKET_INFO_FROM_PACKET( *pp_packet, TcpIpChecksumPacketInfo ) = + (void*)(uintn_t)chksum.Value; + break; + } ipoib_inc_recv_stat( p_port->p_adapter, type, p_desc->len, 1 ); IPOIB_EXIT( IPOIB_DBG_RECV ); @@ -3943,16 +3975,17 @@ __send_mgr_filter_arp( if( p_arp->op == ARP_OP_REQ ) { IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, - (" ARP REQUEST SEND to ENDPT[%p] set LCM %#x\n", + (" ARP REQUEST SEND to ENDPT[%p] CM flag %#x\n", p_desc->p_endpt, ipoib_addr_get_flags( &p_ib_arp->src_hw ) )); } else if( p_arp->op == ARP_OP_REP ) { IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, - ("ARP REPLY SEND to ENDPT[%p] state %d CM: %#x LCM: %#x\n", - p_desc->p_endpt, endpt_cm_get_state( p_desc->p_endpt ), - p_desc->p_endpt->cm_flag, - ipoib_addr_get_flags( &p_ib_arp->src_hw ) ) ); + ("ARP REPLY to ENDPT[%p] state %d CM flag: %#x MAC %02x:%02x:%02x:%02x:%02x:%02x\n", + p_desc->p_endpt, endpt_cm_get_state( p_desc->p_endpt ), p_desc->p_endpt->cm_flag, + p_desc->p_endpt->mac.addr[0], p_desc->p_endpt->mac.addr[1], + p_desc->p_endpt->mac.addr[2], p_desc->p_endpt->mac.addr[3], + p_desc->p_endpt->mac.addr[4], p_desc->p_endpt->mac.addr[5] ) ); } } @@ -3998,7 +4031,7 @@ __send_mgr_get_eth_hdr( return NDIS_STATUS_BUFFER_TOO_SHORT; } - IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SEND, + IPOIB_PRINT_EXIT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_SEND, ("Ethernet header:\n" "\tsrc MAC: %02X-%02X-%02X-%02X-%02X-%02X\n" "\tdst MAC: %02X-%02X-%02X-%02X-%02X-%02X\n" @@ -4173,7 +4206,7 @@ __build_send_desc( p_desc->wr.p_next = NULL; p_desc->wr.wr_id = (uintn_t)p_desc->p_pkt; - if(p_port->p_adapter->params.send_chksum_offload & + if(p_port->p_adapter->params.send_chksum_offload && (pChecksumPktInfo->Transmit.NdisPacketChecksumV4 || pChecksumPktInfo->Transmit.NdisPacketChecksumV6)) { // Set transimition checksum offloading @@ -4498,7 +4531,6 @@ ipoib_port_resume( break; } } - /* * Complete the send as if we sent it - WHQL tests don't like the * sends to fail. @@ -4512,15 +4544,14 @@ ipoib_port_resume( cl_perf_start( BuildSendDesc ); status = __build_send_desc( p_port, p_eth_hdr, p_buf, buf_len, &desc ); cl_perf_stop( &p_port->p_adapter->perf, BuildSendDesc ); - if( status == NDIS_STATUS_PENDING ) - { - /* ARP REPLY packet queued */ - if( &desc.p_endpt ) - ipoib_endpt_deref( desc.p_endpt ); - break; - } if( status != NDIS_STATUS_SUCCESS ) { + if( status == NDIS_STATUS_PENDING ) + { + /* ARP REPLY packet queued */ + ipoib_endpt_deref( desc.p_endpt ); + break; + } cl_perf_start( ProcessFailedSends ); __process_failed_send( p_port, &desc, status ); cl_perf_stop( &p_port->p_adapter->perf, ProcessFailedSends ); @@ -4773,7 +4804,7 @@ IN void* p_context ) 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_FAILED ); + endpt_cm_set_state( p_endpt, IPOIB_CM_DESTROY ); NdisInterlockedInsertTailList( &p_port->endpt_mgr.remove_conns, &p_endpt->list_item, &p_port->endpt_mgr.remove_lock ); @@ -4806,7 +4837,7 @@ IN void* p_context ) } if( ib_status != IB_SUCCESS && ib_status != IB_PENDING ) { - endpt_cm_set_state( p_endpt, IPOIB_CM_FAILED ); + endpt_cm_set_state( p_endpt, IPOIB_CM_DESTROY ); NdisInterlockedInsertTailList( &p_port->endpt_mgr.remove_conns, &p_endpt->list_item, &p_port->endpt_mgr.remove_lock ); @@ -5118,7 +5149,7 @@ __endpt_mgr_ref( cl_obj_lock( &p_port->obj ); - IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT, + IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_ENDPT, ("Look for :\t MAC: %02X-%02X-%02X-%02X-%02X-%02X\n", mac.addr[0], mac.addr[1], mac.addr[2], mac.addr[3], mac.addr[4], mac.addr[5]) ); @@ -5601,18 +5632,19 @@ __endpt_mgr_add_local( return status; } - status = endpt_cm_buf_mgr_init( p_port ); - if( status != IB_SUCCESS ) + if( p_port->p_adapter->params.cm_enabled ) { - IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, - ("CM Init buf mgr failed status %#x\n", status ) ); + status = endpt_cm_buf_mgr_init( p_port ); + if( status != IB_SUCCESS ) + { + IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, + ("CM Init buf mgr failed status %#x\n", status ) ); - endpt_cm_buf_mgr_destroy( p_port ); - ipoib_port_srq_destroy( p_port ); - p_port->p_adapter->params.cm_enabled = FALSE; - return status; + endpt_cm_buf_mgr_destroy( p_port ); + ipoib_port_srq_destroy( p_port ); + p_port->p_adapter->params.cm_enabled = FALSE; + } } - p_port->p_local_endpt = p_endpt; IPOIB_EXIT( IPOIB_DBG_INIT ); @@ -6037,22 +6069,6 @@ ipoib_port_down( return; } - while( p_port->recv_mgr.depth > 0 ) - { - __recv_cb( p_port->ib_mgr.h_recv_cq, (void *)p_port ); - } - - qp_mod.req_state = IB_QPS_RESET; - status = p_port->p_adapter->p_ifc->modify_qp( p_port->ib_mgr.h_qp, &qp_mod ); - if( status != IB_SUCCESS ) - { - IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, - ("ib_modify_qp to RESET state returned %s.\n", - p_port->p_adapter->p_ifc->get_err_str( status )) ); - p_port->p_adapter->hung = TRUE; - return; - } - KeResetEvent(&p_port->leave_mcast_event); /* Reset all endpoints so we don't flush our ARP cache. */ @@ -6820,3 +6836,47 @@ ipoib_recv_dhcp( return __recv_dhcp( p_port, p_ipoib, p_eth, p_src,p_dst ); } + +void +ipoib_port_cancel_xmit( + IN ipoib_port_t* const p_port, + IN PVOID cancel_id ) +{ + cl_list_item_t *p_item; + NDIS_PACKET* p_packet; + PVOID packet_id; + cl_qlist_t cancel_list; + + IPOIB_ENTER( IPOIB_DBG_SEND ); + + cl_qlist_init( &cancel_list ); + + cl_spinlock_acquire( &p_port->send_lock ); + + for( p_item = cl_qlist_head( &p_port->send_mgr.pending_list ); + p_item != cl_qlist_end( &p_port->send_mgr.pending_list ); + p_item = cl_qlist_next( p_item ) ) + { + p_packet = IPOIB_PACKET_FROM_LIST_ITEM( p_item ); + packet_id = NDIS_GET_PACKET_CANCEL_ID( p_packet ); + if( packet_id == cancel_id ) + { + cl_qlist_remove_item( &p_port->send_mgr.pending_list, p_item ); + NDIS_SET_PACKET_STATUS( p_packet, NDIS_STATUS_REQUEST_ABORTED ); + cl_qlist_insert_tail( &cancel_list, IPOIB_LIST_ITEM_FROM_PACKET( p_packet ) ); + } + } + cl_spinlock_release( &p_port->send_lock ); + + if( cl_qlist_count( &cancel_list ) ) + { + while( ( p_item = cl_qlist_remove_head( &cancel_list )) + != cl_qlist_end( &cancel_list )) + { + p_packet = IPOIB_PACKET_FROM_LIST_ITEM( p_item ); + NdisMSendComplete( p_port->p_adapter->h_adapter, + p_packet, NDIS_STATUS_REQUEST_ABORTED ); + } + } + IPOIB_EXIT( IPOIB_DBG_SEND ); +} diff --git a/branches/ipoib_cm/kernel/ipoib_port.h b/branches/ipoib_cm/kernel/ipoib_port.h index dfd56766..85fd6b53 100644 --- a/branches/ipoib_cm/kernel/ipoib_port.h +++ b/branches/ipoib_cm/kernel/ipoib_port.h @@ -49,7 +49,7 @@ /* * Define to place receive buffer inline in receive descriptor. */ -#define IPOIB_INLINE_RECV 0 +#define IPOIB_INLINE_RECV 1 /* * Invalid pkey index @@ -70,7 +70,7 @@ #define IPOIB_ENDPT_FROM_PACKET( P ) \ (((ipoib_endpt_t**)P->MiniportReservedEx)[1]) #define IPOIB_RECV_FROM_PACKET( P ) \ - (((ipoib_recv_desc_t**)P->MiniportReservedEx)[1]) + (((void **)P->MiniportReservedEx)[1]) #define IPOIB_SEND_FROM_PACKET( P ) \ (((send_buf_t**)P->MiniportReservedEx)[2]) #define IPOIB_PACKET_FROM_LIST_ITEM( I ) \ @@ -327,22 +327,34 @@ typedef enum _ipoib_pkt_type } ipoib_pkt_type_t; +typedef struct _ipoib_cm_desc +{ + cl_pool_item_t item; /* Must be first. */ + uint32_t len; + ipoib_pkt_type_t type; + ib_recv_wr_t wr; + ipoib_endpt_t* p_endpt; + ib_local_ds_t local_ds[2]; + cl_list_item_t list_item; + uint8_t *p_buf; + uint8_t *p_phys_buf; + uint32_t buf_size; + NDIS_TCP_IP_CHECKSUM_PACKET_INFO ndis_csum; + +} ipoib_cm_desc_t; typedef struct _ipoib_recv_desc { cl_pool_item_t item; /* Must be first. */ - cl_list_item_t list_item; uint32_t len; ipoib_pkt_type_t type; ib_recv_wr_t wr; - ipoib_endpt_t* p_endpt; ib_local_ds_t local_ds[2]; NDIS_TCP_IP_CHECKSUM_PACKET_INFO ndis_csum; #if IPOIB_INLINE_RECV recv_buf_t buf; #else recv_buf_t *p_buf; - uint32_t buf_size; #endif } ipoib_recv_desc_t; @@ -694,7 +706,7 @@ endpt_cm_buf_mgr_destroy( void endpt_cm_buf_mgr_put_recv( IN endpt_buf_mgr_t * const p_buf_mgr, - IN ipoib_recv_desc_t* const p_desc ); + IN ipoib_cm_desc_t* const p_desc ); void endpt_cm_buf_mgr_put_recv_list( @@ -734,4 +746,9 @@ ipoib_recv_dhcp( IN ipoib_endpt_t* const p_src, IN ipoib_endpt_t* const p_dst ); +void +ipoib_port_cancel_xmit( + IN ipoib_port_t* const p_port, + IN PVOID cancel_id ); + #endif /* _IPOIB_PORT_H_ */ diff --git a/branches/ipoib_cm/kernel/netipoib.inf b/branches/ipoib_cm/kernel/netipoib.inf index e1cc9f0d..b47f1818 100644 --- a/branches/ipoib_cm/kernel/netipoib.inf +++ b/branches/ipoib_cm/kernel/netipoib.inf @@ -88,17 +88,26 @@ HKR, Ndi\Params\SqDepth, Step, 0, "128" HKR, Ndi\Params\SendChksum, ParamDesc, 0, "Send Checksum Offload" HKR, Ndi\Params\SendChksum, Type, 0, "enum" -HKR, Ndi\Params\SendChksum, Default, 0, "0" +HKR, Ndi\Params\SendChksum, Default, 0, "1" HKR, Ndi\Params\SendChksum, Optional, 0, "0" HKR, Ndi\Params\SendChksum\enum, "0", 0, "Disabled" -HKR, Ndi\Params\SendChksum\enum, "1", 0, "Enabled" +HKR, Ndi\Params\SendChksum\enum, "1", 0, "Enabled (if supported by HW)" +HKR, Ndi\Params\SendChksum\enum, "2", 0, "Bypass" HKR, Ndi\Params\RecvChksum, ParamDesc, 0, "Recv Checksum Offload" HKR, Ndi\Params\RecvChksum, Type, 0, "enum" -HKR, Ndi\Params\RecvChksum, Default, 0, "0" +HKR, Ndi\Params\RecvChksum, Default, 0, "1" HKR, Ndi\Params\RecvChksum, Optional, 0, "0" HKR, Ndi\Params\RecvChksum\enum, "0", 0, "Disabled" -HKR, Ndi\Params\RecvChksum\enum, "1", 0, "Enabled" +HKR, Ndi\Params\RecvChksum\enum, "1", 0, "Enabled (if supported by HW)" +HKR, Ndi\Params\RecvChksum\enum, "2", 0, "Bypass" + +HKR, Ndi\Params\lso, ParamDesc, 0, "Large Send Offload" +HKR, Ndi\Params\lso, Type, 0, "enum" +HKR, Ndi\Params\lso, Default, 0, "0" +HKR, Ndi\Params\lso, Optional, 0, "0" +HKR, Ndi\Params\lso\enum, "0", 0, "Disabled" +HKR, Ndi\Params\lso\enum, "1", 0, "Enabled" HKR, Ndi\Params\SaTimeout, ParamDesc, 0, "SA Query Timeout (ms)" HKR, Ndi\Params\SaTimeout, Type, 0, "dword"