aboutsummaryrefslogtreecommitdiff
path: root/hw/rdma/vmw
diff options
context:
space:
mode:
authorYuval Shaia <yuval.shaia@oracle.com>2018-08-05 18:35:09 +0300
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>2018-08-18 17:59:50 +0300
commiteca0f2a6be86602a82edcd90ecd8f4a57b0c8007 (patch)
tree9c12294f5e356e7a8990e50e5f0fc281af15c82a /hw/rdma/vmw
parentef846e026c30c39239500d0b91b26d4fecc1f1d0 (diff)
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>
Diffstat (limited to 'hw/rdma/vmw')
-rw-r--r--hw/rdma/vmw/pvrdma_qp_ops.c1
1 files changed, 1 insertions, 0 deletions
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;