[openib-general] [PATCH] RMPP: Fix length in first segment of multipacket sends

Hal Rosenstock halr at voltaire.com
Sun Aug 28 18:05:24 PDT 2005


RMPP: Fix length in first segment of multipacket sends
(This is a compliance issue but does not affect at least OpenIB to
OpenIB RMPP transfers).

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

Index: mad_rmpp.c
===================================================================
--- mad_rmpp.c  (revision 3197)
+++ mad_rmpp.c  (working copy)
@@ -593,7 +593,8 @@
                rmpp_mad->rmpp_hdr.paylen_newwin =
                        cpu_to_be32(mad_send_wr->total_seg *
                                    (sizeof(struct ib_rmpp_mad) -
-                                      offsetof(struct ib_rmpp_mad, data)));
+                                      offsetof(struct ib_rmpp_mad, data)) -
+                                   mad_send_wr->pad);
                mad_send_wr->sg_list[0].length = sizeof(struct ib_rmpp_mad);
        } else {
                mad_send_wr->send_wr.num_sge = 2;





More information about the general mailing list