diff --git a/lib/vhost/rte_vhost/vhost_user.c b/lib/vhost/rte_vhost/vhost_user.c index 80a6e4f0e..2acf08849 100644 --- a/lib/vhost/rte_vhost/vhost_user.c +++ b/lib/vhost/rte_vhost/vhost_user.c @@ -1193,10 +1193,6 @@ vhost_user_msg_handler(int vid, int fd) if (cmd[0] == 0x06) { memcpy(msg.payload.nvme.buf, &buf, 4096); msg.size += 4096; - } else if (cmd[0] == 0x09 || cmd[0] == 0x0a) { - memcpy(&msg.payload.nvme.buf, &buf, 4); - msg.size += 4096; - } send_vhost_message(fd, &msg); break; diff --git a/lib/vhost/vhost_nvme.c b/lib/vhost/vhost_nvme.c index dd3447298..aa953a23f 100644 --- a/lib/vhost/vhost_nvme.c +++ b/lib/vhost/vhost_nvme.c @@ -814,7 +814,6 @@ spdk_vhost_nvme_admin_passthrough(int vid, void *cmd, void *cqe, void *buf) int ret = 0; struct spdk_vhost_nvme_dev *nvme; uint32_t cq_head, sq_tail; - uint32_t dw0; nvme = spdk_vhost_nvme_get_by_name(vid); if (!nvme) { @@ -857,8 +856,7 @@ spdk_vhost_nvme_admin_passthrough(int vid, void *cmd, void *cqe, void *buf) if (req->cdw10 == SPDK_NVME_FEAT_NUMBER_OF_QUEUES) { cpl->status.sc = 0; cpl->status.sct = 0; - dw0 = (nvme->num_io_queues - 1) | ((nvme->num_io_queues - 1) << 16); - memcpy(buf, &dw0, 4); + cpl->cdw0 = (nvme->num_io_queues - 1) | ((nvme->num_io_queues - 1) << 16); } else { cpl->status.sc = SPDK_NVME_SC_INVALID_FIELD; cpl->status.sct = SPDK_NVME_SCT_GENERIC;