[openib-general] [PATCH] user_mad: In send_handler, only queue_packet on timeout if not response

Hal Rosenstock halr at voltaire.com
Tue Jun 28 12:13:00 PDT 2005


user_mad: In send_handler, only queue_packet on timeout if not response

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: user_mad.c
===================================================================
--- user_mad.c  (revision 2731)
+++ user_mad.c  (working copy)
@@ -146,12 +146,14 @@
        ib_free_send_mad(packet->msg);
 
        if (send_wc->status == IB_WC_RESP_TIMEOUT_ERR) {
-               packet->mad.hdr.status = ETIMEDOUT;
-
-               if (!queue_packet(file, agent, packet))
-                       return;
-       }
-
+               /* Only if not response */
+               if (!((packet->msg->mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) ||
+                     (packet->msg->mad->mad_hdr.method & IB_MGMT_METHOD_RESP))) {
+                       packet->mad.hdr.status = ETIMEDOUT;
+                       if (!queue_packet(file, agent, packet))
+                               return;
+                       }
+               }
        kfree(packet);
 }
 





More information about the general mailing list