1dbf53eebf
This patch adds a library, application and test scripts for extending SPDK to present virtio-scsi controllers to QEMU-based VMs and process I/O submitted to devices attached to those controllers. This functionality is dependent on QEMU patches to enable vhost-scsi in userspace - those patches are currently working their way through the QEMU mailing list, but temporary patches to enable this functionality in QEMU will be made available shortly through the SPDK github repository. Signed-off-by: Jim Harris <james.r.harris@intel.com> Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com> Signed-off-by: Michal Kosciowski <michal.kosciowski@intel.com> Signed-off-by: Karol Latecki <karolx.latecki@intel.com> Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com> Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com> Change-Id: I138e4021f0ac4b1cd9a6e4041783cdf06e6f0efb
50 lines
1.1 KiB
Bash
Executable File
50 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
BASE_DIR=$(readlink -f $(dirname $0))
|
|
[[ -z "$TEST_DIR" ]] && TEST_DIR="$(cd $BASE_DIR/../../../../ && pwd)"
|
|
|
|
function usage()
|
|
{
|
|
[[ ! -z $2 ]] && ( echo "$2"; echo ""; )
|
|
echo "Shortcut script for running vhost app."
|
|
echo "Usage: $(basename $1) [-x] [-h|--help] [--clean-build] [--work-dir=PATH]"
|
|
echo "-h, --help print help and exit"
|
|
echo "-x Set -x for script debug"
|
|
echo " --gdb Run app under gdb"
|
|
echo " --gdbserver Run app under gdb-server"
|
|
echo " --work-dir=PATH Where to find source/project. [default=$TEST_DIR]"
|
|
|
|
exit 0
|
|
}
|
|
|
|
run_in_background=false
|
|
while getopts 'xh-:' optchar; do
|
|
case "$optchar" in
|
|
-)
|
|
case "$OPTARG" in
|
|
help) usage $0 ;;
|
|
gdb) VHOST_GDB="gdb --args" ;;
|
|
gdbserver) VHOST_GDB="gdbserver 127.0.0.1:12345"
|
|
;;
|
|
work-dir=*) TEST_DIR="${OPTARG#*=}" ;;
|
|
*) usage $0 echo "Invalid argument '$OPTARG'" ;;
|
|
esac
|
|
;;
|
|
h) usage $0 ;;
|
|
x) set -x ;;
|
|
*) usage $0 "Invalid argument '$optchar'" ;;
|
|
esac
|
|
done
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "Go away user come back as root"
|
|
exit 1
|
|
fi
|
|
|
|
echo "INFO: $0"
|
|
echo
|
|
|
|
. $BASE_DIR/common.sh
|
|
|
|
spdk_vhost_run
|