s_buf = (ipoib_send_NB_SG*) (PVOID) p_item; // TODO: Check this casting\r
ASSERT(s_buf->p_port == p_port);\r
ASSERT(s_buf->p_nbl);\r
- IPOIB_DEC_NET_BUFFER_LIST_REF_COUNT(s_buf->p_nbl);\r
- \r
- \r
- __send_complete_net_buffer(s_buf, NDIS_STATUS_RESET_IN_PROGRESS,send_complete_flags,TRUE);\r
\r
+ \r
+ //__send_complete_net_buffer(s_buf, NDIS_STATUS_RESET_IN_PROGRESS,send_complete_flags,TRUE);\r
+ __send_complete_net_buffer(s_buf, NDIS_STATUS_FAILURE,send_complete_flags,TRUE);\r
}\r
\r
\r
\r
cl_obj_unlock( &p_port->obj );\r
\r
- \r
+ IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_SEND,\r
+ ("QP state isnt RTS, exiting from port_send\n"));\r
NET_BUFFER_LIST_STATUS(p_net_buffer_list) = NDIS_STATUS_FAILURE;\r
ipoib_inc_send_stat( p_port->p_adapter, IP_STAT_DROPPED, 0 );\r
\r
("Processing send completion for NBL=0x%p .\n", s_buf->p_nbl ));\r
\r
\r
- //Free SGL element allocated by NDIS\r
- NdisMFreeNetBufferSGList(\r
- s_buf->p_port->p_adapter->NdisMiniportDmaHandle,\r
- s_buf->p_sgl,\r
- s_buf->p_curr_nb);\r
- \r
- if( s_buf->p_send_buf )\r
- {\r
- cl_perf_start( FreeSendBuf );\r
- NdisFreeToNPagedLookasideList( &s_buf->p_port->buf_mgr.send_buf_list,\r
- s_buf->p_send_buf );\r
- cl_perf_stop( &p_port->p_adapter->perf, FreeSendBuf );\r
- } \r
\r
- /* Dereference the enpoint used for the transfer. */\r
- if( s_buf->p_endpt ) {\r
- ipoib_endpt_deref( s_buf->p_endpt );\r
- }\r
-\r
\r
// No need to delete p_sg_buf at this state, we will destroy the whole list at the end of the execution\r
//NET_BUFFER_LIST_NEXT_NBL(p_desc->p_netbuf_list) = NULL;\r
NdisMSendNetBufferListsCompleteX( s_buf->p_port->p_adapter->h_adapter,\r
s_buf->p_nbl, compl_flags );\r
}\r
+ } else {\r
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_SEND,\r
+ ("BAD BAD BAD COUNTER=%d for NBL=0x%p .\n", s_buf->p_nbl, IPOIB_GET_NET_BUFFER_LIST_REF_COUNT(s_buf->p_nbl) ));\r
}\r
\r
+ \r
+ //Free SGL element allocated by NDIS\r
+ NdisMFreeNetBufferSGList(\r
+ s_buf->p_port->p_adapter->NdisMiniportDmaHandle,\r
+ s_buf->p_sgl,\r
+ s_buf->p_curr_nb);\r
+ \r
+ if( s_buf->p_send_buf )\r
+ {\r
+ cl_perf_start( FreeSendBuf );\r
+ NdisFreeToNPagedLookasideList( &s_buf->p_port->buf_mgr.send_buf_list,\r
+ s_buf->p_send_buf );\r
+ cl_perf_stop( &p_port->p_adapter->perf, FreeSendBuf );\r
+ } \r
+ \r
+ /* Dereference the enpoint used for the transfer. */\r
+ if( s_buf->p_endpt ) {\r
+ ipoib_endpt_deref( s_buf->p_endpt );\r
+ }\r
#if 0 \r
if (status == NDIS_STATUS_SUCCESS) {\r
//++g_ipoib_send_SG_real;\r
#if DBG\r
// This function is only used to monitor send failures\r
extern ULONG g_NBL_complete;\r
+extern ULONG g_NBL;\r
+\r
static inline VOID NdisMSendNetBufferListsCompleteX(\r
IN NDIS_HANDLE MiniportAdapterHandle,\r
IN PNET_BUFFER_LIST NetBufferLists,\r
) \r
{\r
ASSERT(NET_BUFFER_LIST_NEXT_NBL(NetBufferLists) == NULL);\r
+ \r
if (NET_BUFFER_LIST_STATUS(NetBufferLists) != NDIS_STATUS_SUCCESS) {\r
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ALL,\r
("NBL completed with error %d to NDIS\n", NET_BUFFER_LIST_STATUS(NetBufferLists)));\r
}\r
+ \r
++g_NBL_complete;\r
+ IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_SEND,\r
+ ("Completing NBL=%x, g_NBL=%d, g_NBL_completed=%d \n", NetBufferLists, g_NBL, g_NBL_complete) );\r
NdisMSendNetBufferListsComplete(MiniportAdapterHandle,NetBufferLists,SendCompleteFlags);\r
}\r
#else\r