[openib-general] [PATCH] ib_mad: In completion handler, when status != success call send done handler

Hal Rosenstock halr at voltaire.com
Mon Oct 25 19:42:55 PDT 2004


ib_mad: In completion handler, when status != success call send done
handler so that if a request fails we'll complete it.  eg if a consumer
uses a bad L_Key for a send request, the send will complete (and if the
consumer ever does ib_unregister_mad_agent it will not hang waiting for
the send to finish).

Index: ib_mad.c
===================================================================
--- ib_mad.c	(revision 1070)
+++ ib_mad.c	(working copy)
@@ -1168,6 +1168,7 @@
 		if (wc.status != IB_WC_SUCCESS) {
 			printk(KERN_ERR PFX "Completion error %d WRID 0x%Lx\n",
                                        wc.status, (unsigned long long)
wc.wr_id);
+			ib_mad_send_done_handler(port_priv, &wc);
 		} else {
 			printk(KERN_DEBUG PFX "Completion opcode 0x%x WRID 0x%Lx\n",
 			       wc.opcode, (unsigned long long) wc.wr_id);






More information about the general mailing list