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:
parent
a0484cad21
commit
3052a742e3
@ -46,6 +46,11 @@ SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc
|
|||||||
|
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
SPDK_LIB_LIST += event_nbd nbd
|
SPDK_LIB_LIST += event_nbd nbd
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_VHOST),y)
|
||||||
|
SPDK_LIB_LIST += vhost rte_vhost event_vhost
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \
|
LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \
|
||||||
|
@ -36,15 +36,31 @@
|
|||||||
#include "spdk/env.h"
|
#include "spdk/env.h"
|
||||||
#include "spdk/event.h"
|
#include "spdk/event.h"
|
||||||
#include "spdk/log.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
|
static void
|
||||||
spdk_tgt_usage(void)
|
spdk_tgt_usage(void)
|
||||||
{
|
{
|
||||||
|
#ifdef SPDK_CONFIG_VHOST
|
||||||
|
printf(" -S dir directory where to create vhost sockets (default: pwd)\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_tgt_parse_arg(int ch, char *arg)
|
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
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user