vhost/nvme: remove unused get/set features data buffer

Currently Get/Set features vhost messages use 4096 data buffer, but
it does need this buffer for real usage scenario.

Change-Id: If84f795209d771670449283cef3143f3019baee0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/409613
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Changpeng Liu 2018-05-01 22:43:19 -04:00 committed by Daniel Verkamp
parent 2cd9f3959d
commit 24db7333d1
2 changed files with 1 additions and 7 deletions

View File

@ -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;

View File

@ -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;