Commit 8165bf71 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

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: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444711


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent e59ac513
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -139,3 +139,9 @@ CONFIG_CUSTOMOCF=n

# Build ISA-L library
CONFIG_ISAL=y

# Build with IO_URING support
CONFIG_URING=n

# Path to custom built IO_URING library
CONFIG_URING_PATH=
+23 −0
Original line number Diff line number Diff line
@@ -77,6 +77,9 @@ function usage()
	echo "                           No path required."
	echo " ftl                       Required to build FTL module."
	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 "Environment variables:"
	echo ""
@@ -314,6 +317,18 @@ for i in "$@"; do
		--without-isal)
			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
			;;
@@ -491,6 +506,14 @@ elif [[ "${CONFIG[PGO_USE]}" = "y" ]]; then
	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
# check to see if all keys in CONFIG array have its reflection in CONFIG file.
+10 −0
Original line number Diff line number Diff line
@@ -41,6 +41,16 @@ SYS_LIBS += -laio
CFLAGS += -DHAVE_LIBAIO
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_EXAMPLE)