]>
Commit | Line | Data |
---|---|---|
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 | |
97 | ||
7c673cae FG |
98 | # The Split virtual block device slices block devices into multiple smaller bdevs. |
99 | [Split] | |
100 | # Syntax: | |
101 | # Split <bdev> <count> [<size_in_megabytes>] | |
102 | # | |
103 | # Split Nvme1n1 into two equally-sized portions, Nvme1n1p0 and Nvme1n1p1 | |
104 | #Split Nvme1n1 2 | |
105 | ||
106 | # Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7, | |
107 | # leaving the rest of the device inaccessible | |
108 | #Split Malloc2 8 1 | |
109 | ||
110 | # Vhost scsi controller configuration | |
111 | # Users should change the VhostScsi section(s) below to match the desired | |
112 | # vhost configuration. | |
113 | # Name is minimum required | |
114 | [VhostScsi0] | |
115 | # Define name for controller | |
116 | Name vhost.0 | |
117 | # Assign devices from backend | |
118 | # Use the first malloc device | |
11fdf7f2 | 119 | Target 0 Malloc0 |
7c673cae | 120 | # Use the first AIO device |
11fdf7f2 | 121 | #Target 1 AIO0 |
7c673cae | 122 | # Use the frist Nvme device |
11fdf7f2 | 123 | #Target 2 Nvme0n1 |
7c673cae | 124 | # Use the third partition from second Nvme device |
11fdf7f2 | 125 | #Target 3 Nvme1n1p2 |
7c673cae FG |
126 | |
127 | # Start the poller for this vhost controller on one of the cores in | |
128 | # this cpumask. By default, it not specified, will use any core in the | |
129 | # SPDK process. | |
130 | #Cpumask 0x1 | |
131 | ||
132 | #[VhostScsi1] | |
133 | # Name vhost.1 | |
11fdf7f2 | 134 | # Target 0 AIO1 |
7c673cae | 135 | # Cpumask 0x1 |
11fdf7f2 TL |
136 | |
137 | #[VhostBlk0] | |
138 | # Define name for controller | |
139 | #Name vhost.2 | |
140 | # Use first partition from the second Malloc device | |
141 | #Dev Malloc2p0 | |
142 | # Put controller in read-only mode | |
143 | #ReadOnly no | |
144 | # Start the poller for this vhost controller on one of the cores in | |
145 | # this cpumask. By default, it not specified, will use any core in the | |
146 | # SPDK process. | |
147 | #Cpumask 0x1 | |
148 | ||
149 | #[VhostNvme0] | |
150 | # Define name for controller | |
151 | #Name vhost.0 | |
152 | #NumberOfQueues 2 | |
153 | # Use first partition from the first NVMe device | |
154 | #Namespace Nvme0n1p0 | |
155 | # Use first partition from the first NVMe device | |
156 | #Namespace Nvme0n1p1 | |
157 | ||
158 | # Start the poller for this vhost controller on one of the cores in | |
159 | # this cpumask. By default, it not specified, will use any core in the | |
160 | # SPDK process. | |
161 | #Cpumask 0x1 |