mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 09:44:18 +08:00
IB/ipath: Fix RDMA write with immediate copy of last packet
When the last packet of a RDMA write with immediate is received, the next receive work queue entry ID should be used to generate a completion entry. The code was incorrectly resetting part of the state used to copy the last packet. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
332edc2f7f
commit
a8b56f296d
@ -156,7 +156,7 @@ bail:
|
|||||||
/**
|
/**
|
||||||
* ipath_get_rwqe - copy the next RWQE into the QP's RWQE
|
* ipath_get_rwqe - copy the next RWQE into the QP's RWQE
|
||||||
* @qp: the QP
|
* @qp: the QP
|
||||||
* @wr_id_only: update wr_id only, not SGEs
|
* @wr_id_only: update qp->r_wr_id only, not qp->r_sge
|
||||||
*
|
*
|
||||||
* Return 0 if no RWQE is available, otherwise return 1.
|
* Return 0 if no RWQE is available, otherwise return 1.
|
||||||
*
|
*
|
||||||
@ -173,8 +173,6 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
|
|||||||
u32 tail;
|
u32 tail;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
qp->r_sge.sg_list = qp->r_sg_list;
|
|
||||||
|
|
||||||
if (qp->ibqp.srq) {
|
if (qp->ibqp.srq) {
|
||||||
srq = to_isrq(qp->ibqp.srq);
|
srq = to_isrq(qp->ibqp.srq);
|
||||||
handler = srq->ibsrq.event_handler;
|
handler = srq->ibsrq.event_handler;
|
||||||
@ -206,8 +204,10 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
|
|||||||
wqe = get_rwqe_ptr(rq, tail);
|
wqe = get_rwqe_ptr(rq, tail);
|
||||||
if (++tail >= rq->size)
|
if (++tail >= rq->size)
|
||||||
tail = 0;
|
tail = 0;
|
||||||
} while (!wr_id_only && !ipath_init_sge(qp, wqe, &qp->r_len,
|
if (wr_id_only)
|
||||||
&qp->r_sge));
|
break;
|
||||||
|
qp->r_sge.sg_list = qp->r_sg_list;
|
||||||
|
} while (!ipath_init_sge(qp, wqe, &qp->r_len, &qp->r_sge));
|
||||||
qp->r_wr_id = wqe->wr_id;
|
qp->r_wr_id = wqe->wr_id;
|
||||||
wq->tail = tail;
|
wq->tail = tail;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user