Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] IB: RMPP fixes

- Fix payload length of middle RMPP sent segments. Middle payload
lengths should be 0 on the send side.

(This is perhaps a compliance and should not be an interop issue as
middle payload lengths are supposed to be ignored on receive).

- 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@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Hal Rosenstock and committed by
Roland Dreier
b5dcbf47 30a7e8ef

+3 -1
+3 -1
drivers/infiniband/core/mad_rmpp.c
··· 593 593 rmpp_mad->rmpp_hdr.paylen_newwin = 594 594 cpu_to_be32(mad_send_wr->total_seg * 595 595 (sizeof(struct ib_rmpp_mad) - 596 - offsetof(struct ib_rmpp_mad, data))); 596 + offsetof(struct ib_rmpp_mad, data)) - 597 + mad_send_wr->pad); 597 598 mad_send_wr->sg_list[0].length = sizeof(struct ib_rmpp_mad); 598 599 } else { 599 600 mad_send_wr->send_wr.num_sge = 2; ··· 603 602 mad_send_wr->sg_list[1].length = sizeof(struct ib_rmpp_mad) - 604 603 mad_send_wr->data_offset; 605 604 mad_send_wr->sg_list[1].lkey = mad_send_wr->sg_list[0].lkey; 605 + rmpp_mad->rmpp_hdr.paylen_newwin = 0; 606 606 } 607 607 608 608 if (mad_send_wr->seg_num == mad_send_wr->total_seg) {