build: Add support for linking to liburing
liburing is a wrapper around a new Linux kernel interface for submitting I/O using user space rings. This patch simply adds the ability to link the nvme perf tool to liburing, but doesn't implement any of the new functionality yet. Change-Id: Idb741c87b6d951c013af86e30eac18d3834dd4b7 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444711 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
e59ac513fb
commit
8165bf7125
6
CONFIG
6
CONFIG
@ -139,3 +139,9 @@ CONFIG_CUSTOMOCF=n
|
|||||||
|
|
||||||
# Build ISA-L library
|
# Build ISA-L library
|
||||||
CONFIG_ISAL=y
|
CONFIG_ISAL=y
|
||||||
|
|
||||||
|
# Build with IO_URING support
|
||||||
|
CONFIG_URING=n
|
||||||
|
|
||||||
|
# Path to custom built IO_URING library
|
||||||
|
CONFIG_URING_PATH=
|
||||||
|
23
configure
vendored
23
configure
vendored
@ -77,6 +77,9 @@ function usage()
|
|||||||
echo " No path required."
|
echo " No path required."
|
||||||
echo " ftl Required to build FTL module."
|
echo " ftl Required to build FTL module."
|
||||||
echo " No path required."
|
echo " No path required."
|
||||||
|
echo " uring Required to support I/O uring on Linux. If no argument, searches"
|
||||||
|
echo " the standard installation directory. If an argument is provided, it is"
|
||||||
|
echo " considered a directory containing liburing.a and io_uring.h."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Environment variables:"
|
echo "Environment variables:"
|
||||||
echo ""
|
echo ""
|
||||||
@ -314,6 +317,18 @@ for i in "$@"; do
|
|||||||
--without-isal)
|
--without-isal)
|
||||||
CONFIG[ISAL]=n
|
CONFIG[ISAL]=n
|
||||||
;;
|
;;
|
||||||
|
--with-uring=*)
|
||||||
|
CONFIG[URING]=y
|
||||||
|
CONFIG[URING_PATH]=$(readlink -f ${i#*=})
|
||||||
|
;;
|
||||||
|
--with-uring)
|
||||||
|
CONFIG[URING]=y
|
||||||
|
CONFIG[URING_PATH]=
|
||||||
|
;;
|
||||||
|
--without-uring)
|
||||||
|
CONFIG[URING]=n
|
||||||
|
CONFIG[URING_PATH]=
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
@ -491,6 +506,14 @@ elif [[ "${CONFIG[PGO_USE]}" = "y" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${CONFIG[URING]}" = "y" ]]; then
|
||||||
|
if [[ -n "${CONFIG[URING_PATH]}" ]]; then
|
||||||
|
if [ ! -d "${CONFIG[URING_PATH]}" ]; then
|
||||||
|
echo "${CONFIG[URING_PATH]}: directory not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# We are now ready to generate final configuration. But first do sanity
|
# We are now ready to generate final configuration. But first do sanity
|
||||||
# check to see if all keys in CONFIG array have its reflection in CONFIG file.
|
# check to see if all keys in CONFIG array have its reflection in CONFIG file.
|
||||||
|
@ -41,6 +41,16 @@ SYS_LIBS += -laio
|
|||||||
CFLAGS += -DHAVE_LIBAIO
|
CFLAGS += -DHAVE_LIBAIO
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_URING),y)
|
||||||
|
SYS_LIBS += -luring
|
||||||
|
CFLAGS += -DHAVE_URING
|
||||||
|
ifeq ($(strip $(CONFIG_URING_PATH)),)
|
||||||
|
else
|
||||||
|
CFLAGS += -I$(CONFIG_URING_PATH)
|
||||||
|
LDFLAGS += -L$(CONFIG_URING_PATH)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
install: $(APP)
|
install: $(APP)
|
||||||
$(INSTALL_EXAMPLE)
|
$(INSTALL_EXAMPLE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user