\r
static void __port_mcast_garbage_dpc(KDPC *p_gc_dpc,void *context,void *s_arg1, void *s_arg2);\r
static void __port_do_mcast_garbage(ipoib_port_t* const p_port );\r
+\r
+\r
+static void __recv_cb_dpc(KDPC *p_gc_dpc,void *context,void *s_arg1, void *s_arg2);\r
+\r
+\r
/******************************************************************************\r
*\r
* Declarations\r
p_adapter->p_ifc->get_err_str( status )) );\r
return status;\r
}\r
+\r
+ KeInitializeDpc(&p_port->recv_dpc,(PKDEFERRED_ROUTINE)__recv_cb_dpc,p_port);\r
+\r
+\r
/* Initialize multicast garbage collector timer and DPC object */\r
KeInitializeDpc(&p_port->gc_dpc,(PKDEFERRED_ROUTINE)__port_mcast_garbage_dpc,p_port);\r
KeInitializeTimerEx(&p_port->gc_timer,SynchronizationTimer);\r
IPOIB_EXIT( IPOIB_DBG_RECV );\r
}\r
\r
+static void __recv_cb_dpc(KDPC *p_gc_dpc,void *context,void * s_arg1 , void * s_arg2)\r
+{\r
+\r
+ ipoib_port_t *p_port = context;\r
+\r
+ UNREFERENCED_PARAMETER(p_gc_dpc);\r
+ UNREFERENCED_PARAMETER(s_arg1);\r
+ UNREFERENCED_PARAMETER(s_arg2);\r
+\r
+\r
+ __recv_cb(NULL, p_port);\r
+ ipoib_port_deref( p_port, ref_recv_cb );\r
+\r
+\r
+}\r
+\r
\r
static void\r
__recv_cb(\r
recv_cnt += __recv_mgr_filter( p_port, p_wc, &done_list, &bad_list );\r
cl_perf_stop( &p_port->p_adapter->perf, FilterRecv );\r
\r
- } while( !p_free );\r
+ } while( (!p_free) && (recv_cnt < 128));\r
\r
/* We're done looking at the endpoint map, release the reference. */\r
cl_atomic_dec( &p_port->endpt_rdr );\r
} while( pkt_cnt );\r
cl_spinlock_release( &p_port->recv_lock );\r
\r
- /*\r
- * Rearm after filtering to prevent contention on the enpoint maps\r
- * and eliminate the possibility of having a call to\r
- * __endpt_mgr_insert find a duplicate.\r
- */\r
- cl_perf_start( RearmRecv );\r
- status = p_port->p_adapter->p_ifc->rearm_cq(\r
- p_port->ib_mgr.h_recv_cq, FALSE );\r
- cl_perf_stop( &p_port->p_adapter->perf, RearmRecv );\r
- CL_ASSERT( status == IB_SUCCESS );\r
+ if (p_free ) {\r
+ /*\r
+ * Rearm after filtering to prevent contention on the enpoint maps\r
+ * and eliminate the possibility of having a call to\r
+ * __endpt_mgr_insert find a duplicate.\r
+ */\r
+ cl_perf_start( RearmRecv );\r
+ status = p_port->p_adapter->p_ifc->rearm_cq(\r
+ p_port->ib_mgr.h_recv_cq, FALSE );\r
+ cl_perf_stop( &p_port->p_adapter->perf, RearmRecv );\r
+ CL_ASSERT( status == IB_SUCCESS );\r
\r
- ipoib_port_deref( p_port, ref_recv_cb );\r
+ ipoib_port_deref( p_port, ref_recv_cb );\r
+ } else {\r
+ // Please note the reference is still up\r
+ KeInsertQueueDpc(&p_port->recv_dpc, NULL, NULL);\r
+ }\r
\r
cl_perf_stop( &p_port->p_adapter->perf, RecvCb );\r
\r