This seems like totally the wrong place to fix this. If you look, all the callers to __complete_send_mad ASSERT that p_mad_wr is valid. Invoking a completion with a work request ID of 0 may be valid for the recipient - if there's no MAD, then no MAD was sent (this is a send completion afterall.) In this case, a failure to allocate the sent MAD should result in a failure to send. I'm surprised things didn't blow up before getting this far.
-Fab From: [email protected] [mailto:[email protected]] On Behalf Of Tzachi Dar Sent: Tuesday, August 31, 2010 6:50 AM To: [email protected] Subject: [ofw] patch: [IBBUS] Handling a situation when __complete_send_mad receives NULL instead of p_mad_wr parameter may occur during Verifier low-mem simulation run. Mlnx - 4990 signed off by:xalex Index: B:/users/tzachid/projinf9/trunk/core/al/kernel/al_smi.c =================================================================== --- B:/users/tzachid/projinf9/trunk/core/al/kernel/al_smi.c (revision 4989) +++ B:/users/tzachid/projinf9/trunk/core/al/kernel/al_smi.c (revision 4990) @@ -893,7 +893,10 @@ /* Construct a send work completion. */ cl_memclr( &wc, sizeof( ib_wc_t ) ); - wc.wr_id = p_mad_wr->send_wr.wr_id; + if (p_mad_wr) { + // Handling the special race where p_mad_wr that comes from spl_qp can be NULL + wc.wr_id = p_mad_wr->send_wr.wr_id; + } wc.wc_type = IB_WC_SEND; wc.status = wc_status;
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
