Hi Hal,

We are encountering problems in umad_send with large sized mads. I
will send a different mail regarding this issue to the group. 
This patch adds the mad size to the error message when umad_send
failed.

Thanks,
Yael

Signed-off-by:  Yael Kalka <[EMAIL PROTECTED]>

Index: libvendor/osm_vendor_ibumad.c
===================================================================
--- libvendor/osm_vendor_ibumad.c       (revision 4069)
+++ libvendor/osm_vendor_ibumad.c       (working copy)
@@ -1010,6 +1010,7 @@ osm_vendor_send(
        ib_sa_mad_t* const p_sa = (ib_sa_mad_t *)p_mad;
        int ret = -1;
        int is_rmpp = 0;
+   uint32_t sent_mad_size;
 #ifndef VENDOR_RMPP_SUPPORT
        uint32_t paylen = 0;
 #endif
@@ -1067,20 +1068,23 @@ osm_vendor_send(
        if (resp_expected)
                put_madw(p_vend, p_madw, &p_mad->trans_id);
 
-       if ((ret = umad_send(p_bind->port_id, p_bind->agent_id, p_vw->umad,
 #ifdef VENDOR_RMPP_SUPPORT
-                            p_madw->mad_size,
+      sent_mad_size = p_madw->mad_size;
 #else
-                            is_rmpp ? p_madw->mad_size - IB_SA_MAD_HDR_SIZE :
+      sent_mad_size = is_rmpp ? p_madw->mad_size - IB_SA_MAD_HDR_SIZE :
                                       p_madw->mad_size,
 #endif
+      
+       if ((ret = umad_send(p_bind->port_id, p_bind->agent_id, p_vw->umad,
+                            sent_mad_size,
                             resp_expected ? p_vend->timeout : 0,
                             p_vend->max_retries)) < 0) {
                if (resp_expected)
                        get_madw(p_vend, &p_mad->trans_id);     /* remove from 
aging table */
                osm_log(p_vend->p_log, OSM_LOG_ERROR,
                        "osm_vendor_send: ERR 5430: "
-                       "Send p_madw = %p failed %d (%m)\n", p_madw, ret);
+                       "Send p_madw = %p of size %d failed %d (%m)\n", 
+                       p_madw, sent_mad_size, ret);
                p_madw->status = IB_ERROR;
                cl_spinlock_acquire( &p_vend->cb_lock );
                (*p_bind->send_err_callback)(p_bind->client_context, p_madw);   
/* cb frees madw */

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to