]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/etc/spdk/vhost.conf.in
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / etc / spdk / vhost.conf.in
CommitLineData
7c673cae
FG
1# SPDK vhost configuration file
2#
3# Please write all parameters using ASCII.
4# The parameter must be quoted if it includes whitespace.
5
6# Configuration syntax:
7# Leading whitespace is ignored.
8# Lines starting with '#' are comments.
9# Lines ending with '\' are concatenated with the next line.
10# Bracketed ([]) names define sections
11
12[Global]
13 # Instance ID for multi-process support
14 # Default: 0
15 #InstanceID 0
16
11fdf7f2
TL
17 # Disable PCI access. PCI is enabled by default. Setting this
18 # option will hide any PCI device from all SPDK modules, making
19 # SPDK act as if they don't exist.
20 #NoPci Yes
7c673cae
FG
21
22 # Tracepoint group mask for spdk trace buffers
23 # Default: 0x0 (all tracepoint groups disabled)
11fdf7f2 24 # Set to 0xFFFF to enable all tracepoint groups.
7c673cae
FG
25 #TpointGroupMask 0x0
26
11fdf7f2
TL
27# Users may activate entries in this section to override default values for
28# global parameters in the block device (bdev) subsystem.
29[Bdev]
30 # Number of spdk_bdev_io structures allocated in the global bdev subsystem pool.
31 #BdevIoPoolSize 65536
7c673cae 32
11fdf7f2
TL
33 # Maximum number of spdk_bdev_io structures to cache per thread.
34 #BdevIoCacheSize 256
7c673cae
FG
35
36# Users may not want to use offload even it is available.
11fdf7f2
TL
37# Users can use offload by specifying "Enable Yes" in this section
38# if it is available.
7c673cae
FG
39# Users may use the whitelist to initialize specified devices, IDS
40# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
41[Ioat]
11fdf7f2 42 Enable No
7c673cae
FG
43 #Whitelist 00:04.0
44 #Whitelist 00:04.1
45
46# Users must change this section to match the /dev/sdX devices to be
47# exported as vhost scsi drives. The devices are accessed using Linux AIO.
48[AIO]
11fdf7f2
TL
49 #AIO /dev/sdb AIO0
50 #AIO /dev/sdc AIO1
51
52# PMDK libpmemblk-based block device
53[Pmem]
54 # Syntax:
55 # Blk <pmemblk pool file name> <bdev name>
56 Blk /path/to/pmem-pool Pmem0
7c673cae
FG
57
58# Users may change this section to create a different number or size of
59# malloc LUNs.
11fdf7f2
TL
60# If the system has hardware DMA engine, it can use an IOAT
61# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy
62# by specifying "Enable Yes" in [Ioat] section.
63# Offload is disabled by default even it is available.
7c673cae
FG
64[Malloc]
65 # Number of Malloc targets
66 NumberOfLuns 3
67 # Malloc targets are 128M
68 LunSizeInMB 128
69 # Block size. Default is 512 bytes.
70 BlockSize 4096
71
72# NVMe configuration options
73[Nvme]
74 # NVMe Device Whitelist
75 # Users may specify which NVMe devices to claim by their transport id.
76 # See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format.
77 # The second argument is the assigned name, which can be referenced from
78 # other sections in the configuration file. For NVMe devices, a namespace
79 # is automatically appended to each name in the format <YourName>nY, where
80 # Y is the NSID (starts at 1).
81 TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
82 TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
83
84 # The number of attempts per I/O when an I/O fails. Do not include
85 # this key to get the default behavior.
86 RetryCount 4
11fdf7f2
TL
87 # Timeout for each command, in microseconds. If 0, don't track timeouts.
88 TimeoutUsec 0
7c673cae
FG
89 # Action to take on command time out. Only valid when Timeout is greater
90 # than 0. This may be 'Reset' to reset the controller, 'Abort' to abort
91 # the command, or 'None' to just print a message but do nothing.
92 # Admin command timeouts will always result in a reset.
93 ActionOnTimeout None
94 # Set how often the admin queue is polled for asynchronous events.
95 # Units in microseconds.
96 AdminPollRate 100000
9f95a23c
TL
97 # Set how often I/O queues are polled from completions.
98 # Units in microseconds.
99 IOPollRate 0
7c673cae 100
7c673cae
FG
101# The Split virtual block device slices block devices into multiple smaller bdevs.
102[Split]
103 # Syntax:
104 # Split <bdev> <count> [<size_in_megabytes>]
105 #
106 # Split Nvme1n1 into two equally-sized portions, Nvme1n1p0 and Nvme1n1p1
107 #Split Nvme1n1 2
108
109 # Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7,
110 # leaving the rest of the device inaccessible
111 #Split Malloc2 8 1
112
9f95a23c
TL
113# The RAID virtual block device based on pre-configured block device.
114[RAID1]
115 # Unique name of this RAID device.
116 Name Raid0
117 # RAID level, only raid level 0 is supported.
118 RaidLevel 0
119 # Strip size in KB.
120 StripSize 64
121 # Number of pre-configured bdevs.
122 NumDevices 2
123 # Pre-configured bdevs name with Nvme.
124 #Devices Nvme0n1 Nvme1n1
125 # Pre-configured bdevs name with Malloc.
126 Devices Malloc1 Malloc2
127 # Pre-configured bdevs name with AIO.
128 #Devices AIO0 AIO1
129
7c673cae
FG
130# Vhost scsi controller configuration
131# Users should change the VhostScsi section(s) below to match the desired
132# vhost configuration.
133# Name is minimum required
134[VhostScsi0]
135 # Define name for controller
136 Name vhost.0
137 # Assign devices from backend
138 # Use the first malloc device
11fdf7f2 139 Target 0 Malloc0
7c673cae 140 # Use the first AIO device
11fdf7f2 141 #Target 1 AIO0
7c673cae 142 # Use the frist Nvme device
11fdf7f2 143 #Target 2 Nvme0n1
7c673cae 144 # Use the third partition from second Nvme device
11fdf7f2 145 #Target 3 Nvme1n1p2
7c673cae
FG
146
147 # Start the poller for this vhost controller on one of the cores in
148 # this cpumask. By default, it not specified, will use any core in the
149 # SPDK process.
150 #Cpumask 0x1
151
152#[VhostScsi1]
153# Name vhost.1
11fdf7f2 154# Target 0 AIO1
7c673cae 155# Cpumask 0x1
11fdf7f2
TL
156
157#[VhostBlk0]
158 # Define name for controller
159 #Name vhost.2
160 # Use first partition from the second Malloc device
161 #Dev Malloc2p0
162 # Put controller in read-only mode
163 #ReadOnly no
164 # Start the poller for this vhost controller on one of the cores in
165 # this cpumask. By default, it not specified, will use any core in the
166 # SPDK process.
167 #Cpumask 0x1
168
9f95a23c
TL
169#[VhostBlk1]
170 # Define name for controller
171 #Name vhost.2
172 # Use device which named Raid0
173 #Dev Raid0
174
11fdf7f2
TL
175#[VhostNvme0]
176 # Define name for controller
177 #Name vhost.0
178 #NumberOfQueues 2
179 # Use first partition from the first NVMe device
180 #Namespace Nvme0n1p0
181 # Use first partition from the first NVMe device
182 #Namespace Nvme0n1p1
183
184 # Start the poller for this vhost controller on one of the cores in
185 # this cpumask. By default, it not specified, will use any core in the
186 # SPDK process.
187 #Cpumask 0x1