hw/pvrdma: Clean CQE before use
Next CQE is fetched from CQ ring, clean it before usage as it still carries old CQE values. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <20180805153518.2983-5-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
This commit is contained in:
parent
ef846e026c
commit
eca0f2a6be
|
@ -69,6 +69,7 @@ static int pvrdma_post_cqe(PVRDMADev *dev, uint32_t cq_handle,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(cqe1, 0, sizeof(*cqe1));
|
||||||
cqe1->wr_id = cqe->wr_id;
|
cqe1->wr_id = cqe->wr_id;
|
||||||
cqe1->qp = cqe->qp;
|
cqe1->qp = cqe->qp;
|
||||||
cqe1->opcode = cqe->opcode;
|
cqe1->opcode = cqe->opcode;
|
||||||
|
|
Loading…
Reference in a new issue