projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a421c81
)
hw/pvrdma: Fix zero-initialization of resp in {query/modify}_qp
author
Kamal Heib
<kamalheib1@gmail.com>
Thu, 14 Mar 2019 15:30:31 +0000
(17:30 +0200)
committer
Marcel Apfelbaum
<marcel.apfelbaum@gmail.com>
Sat, 16 Mar 2019 13:52:44 +0000
(15:52 +0200)
Make sure to zero-initialize only the pvrdma_cmd_query_qp_resp and not
the whole pvrdma_cmd_resp for query_qp, in modify_qp the resp isn't used
so remove it.
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Message-Id: <
20190314153031
.7197-5-kamalheib1@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/rdma/vmw/pvrdma_cmd.c
patch
|
blob
|
history
diff --git
a/hw/rdma/vmw/pvrdma_cmd.c
b/hw/rdma/vmw/pvrdma_cmd.c
index b682e919d5551931b41500517b0e602d2461a1e0..be8c2b61c9bedcfc7e699324267cb8835ee1e3ac 100644
(file)
--- a/
hw/rdma/vmw/pvrdma_cmd.c
+++ b/
hw/rdma/vmw/pvrdma_cmd.c
@@
-488,8
+488,6
@@
static int modify_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
struct pvrdma_cmd_modify_qp *cmd = &req->modify_qp;
int rc;
- memset(rsp, 0, sizeof(*rsp));
-
/* No need to verify sgid_index since it is u8 */
rc = rdma_rm_modify_qp(&dev->rdma_dev_res, &dev->backend_dev,
@@
-512,7
+510,7
@@
static int query_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
struct ibv_qp_init_attr init_attr;
int rc;
- memset(r
sp, 0, sizeof(*r
sp));
+ memset(r
esp, 0, sizeof(*re
sp));
rc = rdma_rm_query_qp(&dev->rdma_dev_res, &dev->backend_dev, cmd->qp_handle,
(struct ibv_qp_attr *)&resp->attrs, cmd->attr_mask,