This sets the RMPP version number in the RMPP header if RMPP is present,
but not active.  The current code does not set the version if RMPP is
inactive.

Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>

---

Index: mad.c
===================================================================
--- mad.c       (revision 5098)
+++ mad.c       (working copy)
@@ -826,14 +826,16 @@ struct ib_mad_send_buf * ib_create_send_
        mad_send_wr->send_wr.wr.ud.remote_qkey = IB_QP_SET_QKEY;
        mad_send_wr->send_wr.wr.ud.pkey_index = pkey_index;
 
-       if (rmpp_active) {
+       if (mad_agent->rmpp_version) {
                struct ib_rmpp_mad *rmpp_mad = mad_send_wr->send_buf.mad;
-               rmpp_mad->rmpp_hdr.paylen_newwin = cpu_to_be32(hdr_len -
-                                                  IB_MGMT_RMPP_HDR + data_len);
                rmpp_mad->rmpp_hdr.rmpp_version = mad_agent->rmpp_version;
-               rmpp_mad->rmpp_hdr.rmpp_type = IB_MGMT_RMPP_TYPE_DATA;
-               ib_set_rmpp_flags(&rmpp_mad->rmpp_hdr,
-                                 IB_MGMT_RMPP_FLAG_ACTIVE);
+               if (rmpp_active) {
+                       rmpp_mad->rmpp_hdr.paylen_newwin =
+                               cpu_to_be32(hdr_len - IB_MGMT_RMPP_HDR + 
data_len);
+                       rmpp_mad->rmpp_hdr.rmpp_type = IB_MGMT_RMPP_TYPE_DATA;
+                       ib_set_rmpp_flags(&rmpp_mad->rmpp_hdr,
+                                         IB_MGMT_RMPP_FLAG_ACTIVE);
+               }
        }
 
        mad_send_wr->send_buf.mad_agent = mad_agent;



_______________________________________________
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