2017-03-02 14:12:20 +00:00
|
|
|
# SPDK vhost configuration file
|
|
|
|
#
|
|
|
|
# Please write all parameters using ASCII.
|
|
|
|
# The parameter must be quoted if it includes whitespace.
|
|
|
|
|
|
|
|
# Configuration syntax:
|
|
|
|
# Leading whitespace is ignored.
|
|
|
|
# Lines starting with '#' are comments.
|
|
|
|
# Lines ending with '\' are concatenated with the next line.
|
|
|
|
# Bracketed ([]) names define sections
|
|
|
|
|
|
|
|
[Global]
|
|
|
|
# Instance ID for multi-process support
|
|
|
|
# Default: 0
|
|
|
|
#InstanceID 0
|
|
|
|
|
|
|
|
# Users can restrict work items to only run on certain cores by
|
|
|
|
# specifying a ReactorMask. Default is to allow work items to run
|
|
|
|
# on core 0.
|
|
|
|
#ReactorMask 0xFFFF
|
|
|
|
|
|
|
|
# Tracepoint group mask for spdk trace buffers
|
|
|
|
# Default: 0x0 (all tracepoint groups disabled)
|
|
|
|
# Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
|
|
|
|
#TpointGroupMask 0x0
|
|
|
|
|
|
|
|
[Rpc]
|
|
|
|
# Defines whether SPDK vhost will enable configuration via RPC.
|
|
|
|
# Default is disabled. Note that the RPC interface is not
|
|
|
|
# authenticated, so users should be careful about enabling
|
|
|
|
# RPC in non-trusted environments.
|
|
|
|
Enable No
|
|
|
|
# Listen address for the RPC service.
|
|
|
|
# May be an IP address or an absolute path to a Unix socket.
|
|
|
|
Listen 127.0.0.1
|
|
|
|
|
|
|
|
# Users may not want to use offload even it is available.
|
|
|
|
# Users may use the whitelist to initialize specified devices, IDS
|
|
|
|
# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
|
|
|
|
[Ioat]
|
|
|
|
Disable Yes
|
|
|
|
#Whitelist 00:04.0
|
|
|
|
#Whitelist 00:04.1
|
|
|
|
|
|
|
|
# Users must change this section to match the /dev/sdX devices to be
|
|
|
|
# exported as vhost scsi drives. The devices are accessed using Linux AIO.
|
|
|
|
[AIO]
|
2017-05-20 06:23:55 +00:00
|
|
|
#AIO /dev/sdb AIO0
|
|
|
|
#AIO /dev/sdc AIO1
|
2017-03-02 14:12:20 +00:00
|
|
|
|
|
|
|
# Users may change this section to create a different number or size of
|
|
|
|
# malloc LUNs.
|
|
|
|
# If the system has hardware DMA engine, it will use an IOAT
|
|
|
|
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy.
|
|
|
|
# Of course, users can disable offload even it is available.
|
|
|
|
[Malloc]
|
|
|
|
# Number of Malloc targets
|
|
|
|
NumberOfLuns 3
|
|
|
|
# Malloc targets are 128M
|
|
|
|
LunSizeInMB 128
|
|
|
|
# Block size. Default is 512 bytes.
|
|
|
|
BlockSize 4096
|
|
|
|
|
|
|
|
# NVMe configuration options
|
|
|
|
[Nvme]
|
|
|
|
# NVMe Device Whitelist
|
2017-01-25 23:36:40 +00:00
|
|
|
# Users may specify which NVMe devices to claim by their transport id.
|
|
|
|
# See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format.
|
2017-03-01 20:35:59 +00:00
|
|
|
# The second argument is the assigned name, which can be referenced from
|
|
|
|
# other sections in the configuration file. For NVMe devices, a namespace
|
|
|
|
# is automatically appended to each name in the format <YourName>nY, where
|
|
|
|
# Y is the NSID (starts at 1).
|
|
|
|
TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
|
|
|
|
TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
|
2017-03-02 14:12:20 +00:00
|
|
|
|
|
|
|
# The number of attempts per I/O when an I/O fails. Do not include
|
|
|
|
# this key to get the default behavior.
|
2017-04-04 18:12:40 +00:00
|
|
|
RetryCount 4
|
2017-03-30 19:49:52 +00:00
|
|
|
# Timeout for each command, in seconds. If 0, don't track timeouts.
|
2017-04-04 18:12:40 +00:00
|
|
|
Timeout 0
|
2017-03-30 19:49:52 +00:00
|
|
|
# Action to take on command time out. Only valid when Timeout is greater
|
|
|
|
# than 0. This may be 'Reset' to reset the controller, 'Abort' to abort
|
|
|
|
# the command, or 'None' to just print a message but do nothing.
|
|
|
|
# Admin command timeouts will always result in a reset.
|
|
|
|
ActionOnTimeout None
|
2017-03-02 14:12:20 +00:00
|
|
|
# Set how often the admin queue is polled for asynchronous events.
|
|
|
|
# Units in microseconds.
|
|
|
|
AdminPollRate 100000
|
|
|
|
|
|
|
|
# The Split virtual block device slices block devices into multiple smaller bdevs.
|
|
|
|
[Split]
|
|
|
|
# Syntax:
|
|
|
|
# Split <bdev> <count> [<size_in_megabytes>]
|
|
|
|
#
|
|
|
|
# Split Nvme1n1 into two equally-sized portions, Nvme1n1p0 and Nvme1n1p1
|
|
|
|
#Split Nvme1n1 2
|
|
|
|
|
|
|
|
# Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7,
|
|
|
|
# leaving the rest of the device inaccessible
|
|
|
|
#Split Malloc2 8 1
|
|
|
|
|
|
|
|
# Vhost scsi controller configuration
|
|
|
|
# Users should change the VhostScsi section(s) below to match the desired
|
|
|
|
# vhost configuration.
|
|
|
|
# Name is minimum required
|
|
|
|
[VhostScsi0]
|
|
|
|
# Define name for controller
|
|
|
|
Name vhost.0
|
|
|
|
# Assign devices from backend
|
|
|
|
# Use the first malloc device
|
2017-02-22 10:29:07 +00:00
|
|
|
Dev 0 Malloc0
|
2017-03-02 14:12:20 +00:00
|
|
|
# Use the first AIO device
|
2017-02-22 10:29:07 +00:00
|
|
|
#Dev 1 AIO0
|
2017-03-02 14:12:20 +00:00
|
|
|
# Use the frist Nvme device
|
2017-02-22 10:29:07 +00:00
|
|
|
#Dev 2 Nvme0n1
|
2017-03-02 14:12:20 +00:00
|
|
|
# Use the third partition from second Nvme device
|
2017-02-22 10:29:07 +00:00
|
|
|
#Dev 3 Nvme1n1p2
|
2017-03-02 14:12:20 +00:00
|
|
|
|
|
|
|
# Start the poller for this vhost controller on one of the cores in
|
|
|
|
# this cpumask. By default, it not specified, will use any core in the
|
|
|
|
# SPDK process.
|
|
|
|
#Cpumask 0x1
|
|
|
|
|
|
|
|
#[VhostScsi1]
|
|
|
|
# Name vhost.1
|
2017-08-02 06:57:04 +00:00
|
|
|
# Dev 0 AIO1
|
2017-03-02 14:12:20 +00:00
|
|
|
# Cpumask 0x1
|
2017-05-24 14:48:22 +00:00
|
|
|
|
|
|
|
#[VhostBlk0]
|
|
|
|
# Define name for controller
|
|
|
|
#Name vhost.2
|
|
|
|
# Use first partition from the second Malloc device
|
|
|
|
#Dev Malloc2p0
|
2017-06-19 14:37:51 +00:00
|
|
|
# Put controller in read-only mode
|
|
|
|
#ReadOnly no
|
2017-05-24 14:48:22 +00:00
|
|
|
# Start the poller for this vhost controller on one of the cores in
|
|
|
|
# this cpumask. By default, it not specified, will use any core in the
|
|
|
|
# SPDK process.
|
|
|
|
#Cpumask 0x1
|