app/spdk_tgt: add vhost to unified target

Change-Id: I23366906ac8169954331c0f1be75d406607f2f9e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403227
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Daniel Verkamp 2018-03-08 15:55:13 -07:00 committed by Jim Harris
parent a0484cad21
commit 3052a742e3
2 changed files with 21 additions and 0 deletions

View File

@ -46,6 +46,11 @@ SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc
ifeq ($(OS),Linux)
SPDK_LIB_LIST += event_nbd nbd
ifeq ($(CONFIG_VHOST),y)
SPDK_LIB_LIST += vhost rte_vhost event_vhost
endif
endif
LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \

View File

@ -36,15 +36,31 @@
#include "spdk/env.h"
#include "spdk/event.h"
#include "spdk/log.h"
#include "spdk/vhost.h"
/* TODO: this should be handled by configure */
#if defined(SPDK_CONFIG_VHOST) && !defined(__linux__)
#undef SPDK_CONFIG_VHOST
#endif
static void
spdk_tgt_usage(void)
{
#ifdef SPDK_CONFIG_VHOST
printf(" -S dir directory where to create vhost sockets (default: pwd)\n");
#endif
}
static void
spdk_tgt_parse_arg(int ch, char *arg)
{
switch (ch) {
#ifdef SPDK_CONFIG_VHOST
case 'S':
spdk_vhost_set_socket_path(arg);
break;
#endif
}
}
static void