|
@@ -73,9 +73,6 @@ static void req_retry(struct rxe_qp *qp)
|
|
|
int npsn;
|
|
|
int first = 1;
|
|
|
|
|
|
- wqe = queue_head(qp->sq.queue);
|
|
|
- npsn = (qp->comp.psn - wqe->first_psn) & BTH_PSN_MASK;
|
|
|
-
|
|
|
qp->req.wqe_index = consumer_index(qp->sq.queue);
|
|
|
qp->req.psn = qp->comp.psn;
|
|
|
qp->req.opcode = -1;
|
|
@@ -107,11 +104,17 @@ static void req_retry(struct rxe_qp *qp)
|
|
|
if (first) {
|
|
|
first = 0;
|
|
|
|
|
|
- if (mask & WR_WRITE_OR_SEND_MASK)
|
|
|
+ if (mask & WR_WRITE_OR_SEND_MASK) {
|
|
|
+ npsn = (qp->comp.psn - wqe->first_psn) &
|
|
|
+ BTH_PSN_MASK;
|
|
|
retry_first_write_send(qp, wqe, mask, npsn);
|
|
|
+ }
|
|
|
|
|
|
- if (mask & WR_READ_MASK)
|
|
|
+ if (mask & WR_READ_MASK) {
|
|
|
+ npsn = (wqe->dma.length - wqe->dma.resid) /
|
|
|
+ qp->mtu;
|
|
|
wqe->iova += npsn * qp->mtu;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
wqe->state = wqe_state_posted;
|
|
@@ -435,7 +438,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
|
|
|
if (pkt->mask & RXE_RETH_MASK) {
|
|
|
reth_set_rkey(pkt, ibwr->wr.rdma.rkey);
|
|
|
reth_set_va(pkt, wqe->iova);
|
|
|
- reth_set_len(pkt, wqe->dma.length);
|
|
|
+ reth_set_len(pkt, wqe->dma.resid);
|
|
|
}
|
|
|
|
|
|
if (pkt->mask & RXE_IMMDT_MASK)
|