From 164151c727f76a1906bd8a4b5eb3b8a870c8559e Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Mon, 9 Dec 2019 03:54:20 -0500 Subject: [PATCH] vhost: fix the compilation when enable VHOST_INTERNAL_LIB SPDK has swithed to DPDK rte_vhost library since 19.04 release, the internal rte_vhost library is not recommended any more, but we still would like to use it for vhost_nvme until we can switch to the new NVMe virtualization solution. Fix the compilation issue here, the internal SPDK rte_vhost library can still work well with vhost blk/scsi/nvme target for now. Change-Id: I665ccee3e652c318b414dcdc20aab6cdbf7fac3d Signed-off-by: Changpeng Liu Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477231 Reviewed-by: Vitaliy Mysak Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris Community-CI: SPDK CI Jenkins Tested-by: SPDK CI Jenkins --- lib/vhost/rte_vhost_compat.c | 4 ++-- lib/vhost/vhost_internal.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/vhost/rte_vhost_compat.c b/lib/vhost/rte_vhost_compat.c index 7ccc4355f..da5fc198d 100644 --- a/lib/vhost/rte_vhost_compat.c +++ b/lib/vhost/rte_vhost_compat.c @@ -142,8 +142,8 @@ const struct vhost_device_ops g_spdk_vhost_ops = { .new_connection = new_connection, .destroy_connection = destroy_connection, #ifdef SPDK_CONFIG_VHOST_INTERNAL_LIB - .get_config = get_config, - .set_config = set_config, + .get_config = vhost_get_config_cb, + .set_config = vhost_set_config_cb, .vhost_nvme_admin_passthrough = vhost_nvme_admin_passthrough, .vhost_nvme_set_cq_call = vhost_nvme_set_cq_call, .vhost_nvme_get_cap = vhost_nvme_get_cap, diff --git a/lib/vhost/vhost_internal.h b/lib/vhost/vhost_internal.h index 387194414..6d15249bb 100644 --- a/lib/vhost/vhost_internal.h +++ b/lib/vhost/vhost_internal.h @@ -311,9 +311,9 @@ int vhost_stop_device_cb(int vid); int vhost_destroy_connection_cb(int vid); #ifdef SPDK_CONFIG_VHOST_INTERNAL_LIB -int vhost_get_config_cb(int vid, uint8_t *config, uint32_t len) +int vhost_get_config_cb(int vid, uint8_t *config, uint32_t len); int vhost_set_config_cb(int vid, uint8_t *config, uint32_t offset, - uint32_t size, uint32_t flags) + uint32_t size, uint32_t flags); #endif /*