From: Yuval Shaia Date: Sun, 5 Aug 2018 15:35:09 +0000 (+0300) Subject: hw/pvrdma: Clean CQE before use X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=eca0f2a6be86602a82edcd90ecd8f4a57b0c8007;p=qemu.git 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 Reviewed-by: Marcel Apfelbaum Message-Id: <20180805153518.2983-5-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum --- diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 99bb51111e..a8664f40c8 100644 --- a/hw/rdma/vmw/pvrdma_qp_ops.c +++ b/hw/rdma/vmw/pvrdma_qp_ops.c @@ -69,6 +69,7 @@ static int pvrdma_post_cqe(PVRDMADev *dev, uint32_t cq_handle, return -EINVAL; } + memset(cqe1, 0, sizeof(*cqe1)); cqe1->wr_id = cqe->wr_id; cqe1->qp = cqe->qp; cqe1->opcode = cqe->opcode;