diff options
author | Hal Rosenstock <halr@voltaire.com> | 2005-09-07 11:03:41 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-09-07 11:03:41 -0700 |
commit | b5dcbf47e10e568273213a4410daa27c11cdba3a (patch) | |
tree | 02024477eaa9b845d973865d6cdebaa0229677f0 /drivers/infiniband | |
parent | 30a7e8ef13b2ff0db7b15af9afdd12b93783f01e (diff) |
[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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/mad_rmpp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index 43fd805e0265..2bd8b1cc57c4 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c @@ -593,7 +593,8 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr) 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; @@ -602,6 +603,7 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr) mad_send_wr->sg_list[1].length = sizeof(struct ib_rmpp_mad) - mad_send_wr->data_offset; mad_send_wr->sg_list[1].lkey = mad_send_wr->sg_list[0].lkey; + rmpp_mad->rmpp_hdr.paylen_newwin = 0; } if (mad_send_wr->seg_num == mad_send_wr->total_seg) { |