Commit e7734156 authored by Bob Pearson's avatar Bob Pearson Committed by Jason Gunthorpe

RDMA/rxe: Replace paylen by payload

In finish_packet() in rxe_req.c a variable was incorrectly called paylen
instead of payload. Elsewhere in the rxe source payload is always used for
the RoCE payload length and paylen is always used for the UDP payload
length. This will cause unnecessary confusion.

Replace paylen by payload in finish_packet().

Link: https://lore.kernel.org/r/20220420172316.5465-1-rpearsonhpe@gmail.comSigned-off-by: default avatarBob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent ff815a89
...@@ -435,7 +435,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp, ...@@ -435,7 +435,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
static int finish_packet(struct rxe_qp *qp, struct rxe_av *av, static int finish_packet(struct rxe_qp *qp, struct rxe_av *av,
struct rxe_send_wqe *wqe, struct rxe_pkt_info *pkt, struct rxe_send_wqe *wqe, struct rxe_pkt_info *pkt,
struct sk_buff *skb, u32 paylen) struct sk_buff *skb, u32 payload)
{ {
int err; int err;
...@@ -447,19 +447,19 @@ static int finish_packet(struct rxe_qp *qp, struct rxe_av *av, ...@@ -447,19 +447,19 @@ static int finish_packet(struct rxe_qp *qp, struct rxe_av *av,
if (wqe->wr.send_flags & IB_SEND_INLINE) { if (wqe->wr.send_flags & IB_SEND_INLINE) {
u8 *tmp = &wqe->dma.inline_data[wqe->dma.sge_offset]; u8 *tmp = &wqe->dma.inline_data[wqe->dma.sge_offset];
memcpy(payload_addr(pkt), tmp, paylen); memcpy(payload_addr(pkt), tmp, payload);
wqe->dma.resid -= paylen; wqe->dma.resid -= payload;
wqe->dma.sge_offset += paylen; wqe->dma.sge_offset += payload;
} else { } else {
err = copy_data(qp->pd, 0, &wqe->dma, err = copy_data(qp->pd, 0, &wqe->dma,
payload_addr(pkt), paylen, payload_addr(pkt), payload,
RXE_FROM_MR_OBJ); RXE_FROM_MR_OBJ);
if (err) if (err)
return err; return err;
} }
if (bth_pad(pkt)) { if (bth_pad(pkt)) {
u8 *pad = payload_addr(pkt) + paylen; u8 *pad = payload_addr(pkt) + payload;
memset(pad, 0, bth_pad(pkt)); memset(pad, 0, bth_pad(pkt));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment