1b3c03556SRyan Stone.\" 2b3c03556SRyan Stone.\" Copyright (c) 2014 Sandvine Inc. 3b3c03556SRyan Stone.\" All rights reserved. 4b3c03556SRyan Stone.\" 5b3c03556SRyan Stone.\" Redistribution and use in source and binary forms, with or without 6b3c03556SRyan Stone.\" modification, are permitted provided that the following conditions 7b3c03556SRyan Stone.\" are met: 8b3c03556SRyan Stone.\" 1. Redistributions of source code must retain the above copyright 9b3c03556SRyan Stone.\" notice, this list of conditions and the following disclaimer. 10b3c03556SRyan Stone.\" 2. Redistributions in binary form must reproduce the above copyright 11b3c03556SRyan Stone.\" notice, this list of conditions and the following disclaimer in the 12b3c03556SRyan Stone.\" documentation and/or other materials provided with the distribution. 13b3c03556SRyan Stone.\" 14b3c03556SRyan Stone.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15b3c03556SRyan Stone.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16b3c03556SRyan Stone.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17b3c03556SRyan Stone.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18b3c03556SRyan Stone.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19b3c03556SRyan Stone.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20b3c03556SRyan Stone.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21b3c03556SRyan Stone.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22b3c03556SRyan Stone.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23b3c03556SRyan Stone.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24b3c03556SRyan Stone.\" SUCH DAMAGE. 25b3c03556SRyan Stone.\" 26b3c03556SRyan Stone.\" $FreeBSD$ 27b3c03556SRyan Stone.\" 2832100375SGordon Bergling.Dd May 29, 2020 29b3c03556SRyan Stone.Dt IOVCTL.CONF 5 30b3c03556SRyan Stone.Os 31b3c03556SRyan Stone.Sh NAME 32b3c03556SRyan Stone.Nm iovctl.conf 33b3c03556SRyan Stone.Nd IOVCTL configuration file 34b3c03556SRyan Stone.Sh DESCRIPTION 35b3c03556SRyan StoneThe 36b3c03556SRyan Stone.Nm 37b3c03556SRyan Stonefile is the configuration file for the 38b3c03556SRyan Stone.Xr iovctl 8 39b3c03556SRyan Stoneprogram. 40b3c03556SRyan StoneThis file specifies configuration parameters for a single Physical Function 41b3c03556SRyan Stone.Pq PF 42b3c03556SRyan Stonedevice. 43b3c03556SRyan StoneTo configure SR-IOV on multiple PF devices, use one configuration file for each 44b3c03556SRyan StonePF. 45b3c03556SRyan StoneThe locations of all 4632100375SGordon Bergling.Xr iovctl 8 47b3c03556SRyan Stoneconfiguration files are specified in 48b3c03556SRyan Stone.Xr rc.conf 5 . 49b3c03556SRyan Stone.Pp 50b3c03556SRyan StoneThe 51b3c03556SRyan Stone.Nm 52b3c03556SRyan Stonefile uses UCL format. 53b3c03556SRyan StoneUCL syntax is documented at the official UCL website: 54*3422ca83SGordon Bergling.Lk http://github.com/vstakhov/libucl . 55b3c03556SRyan Stone.Pp 56b3c03556SRyan StoneThere are three types of sections in the 57b3c03556SRyan Stone.Nm 58b3c03556SRyan Stonefile. 59b3c03556SRyan StoneA section is a key at the top level of the file with a list as its value. 60b3c03556SRyan StoneThe list may contain the keys specified in the 61b3c03556SRyan Stone.Sx OPTIONS 62b3c03556SRyan Stonesection of this manual page. 63b3c03556SRyan StoneIndividual PF driver implementations may specify additional device-specific 64b3c03556SRyan Stoneconfiguration keys that they will accept. 65b3c03556SRyan StoneThe order in which sections appear in 66b3c03556SRyan Stone.Nm 67b3c03556SRyan Stoneis ignored. 68b3c03556SRyan StoneNo two sections may have the same key. 69b3c03556SRyan StoneFor example, two sections for VF-1 must not be defined. 70b3c03556SRyan Stone.Pp 71b3c03556SRyan StoneThe first section type is the PF section. 72b3c03556SRyan StoneThis section always has the key "PF"; therefore, only one such section may be 73b3c03556SRyan Stonedefined. 74b3c03556SRyan StoneThis section defines configuration parameters that apply to the PF as a whole. 75b3c03556SRyan Stone.Pp 76b3c03556SRyan StoneThe second section type is the VF section. 77b3c03556SRyan StoneThis section has the key "VF-" followed by a VF index. 78b3c03556SRyan StoneVF indices start at 0 and always increment by 1. 79b3c03556SRyan StoneValid VF indices are in the range of 0 to 80fe3ff217SPatrick Kelsey.Pq num_vfs - 1 . 81b3c03556SRyan StoneThe VF index must be given as a decimal integer with no leading zeros. 82b3c03556SRyan StoneThis section defines configuration parameters that apply to a single VF. 83b3c03556SRyan Stone.Pp 84b3c03556SRyan StoneThe third section type is the default section. 85b3c03556SRyan StoneThis section always has the key "DEFAULT"; therefore, only one such section may 86b3c03556SRyan Stonebe specified. 87b3c03556SRyan StoneThis section defines default configuration parameters that apply to all VFs. 88b3c03556SRyan StoneAll configuration keys that are valid to be applied to a VF are valid in this 89b3c03556SRyan Stonesection. 90b3c03556SRyan StoneAn individual VF section may override a default specified in this section by 91b3c03556SRyan Stoneproviding a different value for the configuration parameter. 92b3c03556SRyan StoneNote that the default section applies to ALL VFs. 93b3c03556SRyan StoneThe default section must appear before any VF sections. 949f8dca7dSRyan StoneThe default section may appear before or after the PF section. 95b3c03556SRyan Stone.Pp 96b3c03556SRyan StoneThe following option types are supported: 97b3c03556SRyan Stone.Bl -tag -width indent 98b3c03556SRyan Stone.It boolean 99b3c03556SRyan StoneAccepts a boolean value of true or false. 100b3c03556SRyan Stone.It mac-addr 101b3c03556SRyan StoneAccepts a unicast MAC address specified as a string of the form 102b3c03556SRyan Stonexx:xx:xx:xx:xx:xx, where xx is one or two hexadecimal digits. 103b3c03556SRyan Stone.It string 104b3c03556SRyan StoneAccepts any string value. 105b3c03556SRyan Stone.It uint8_t 1062ccda62fSPatrick KelseyAccepts any integer in the range 0 to 255, inclusive. 107b3c03556SRyan Stone.It uint16_t 1082ccda62fSPatrick KelseyAccepts any integer in the range 0 to 65535, inclusive. 109b3c03556SRyan Stone.It uint32_t 1102ccda62fSPatrick KelseyAccepts any integer in the range 0 to 111fe3ff217SPatrick Kelsey.Pq 2**32 - 1 , 1122ccda62fSPatrick Kelseyinclusive. 113b3c03556SRyan Stone.It uint64_t 1142ccda62fSPatrick KelseyAccepts any integer in the range 0 to 115fe3ff217SPatrick Kelsey.Pq 2**64 - 1 , 1162ccda62fSPatrick Kelseyinclusive. 117b3c03556SRyan Stone.El 118b3c03556SRyan Stone.Sh OPTIONS 119b3c03556SRyan StoneThe following parameters are accepted by all PF drivers: 120b3c03556SRyan Stone.Bl -tag -width indent 121b3c03556SRyan Stone.It device Pq string 122b3c03556SRyan StoneThis parameter specifies the name of the PF device. 123b3c03556SRyan StoneThis parameter is required to be specified. 124b3c03556SRyan Stone.It num_vfs Pq uint16_t 125b3c03556SRyan StoneThis parameter specifies the number of VF children to create. 126b3c03556SRyan StoneThis parameter may not be zero. 127b3c03556SRyan StoneThe maximum value of this parameter is device-specific. 128b3c03556SRyan Stone.El 129b3c03556SRyan Stone.Pp 130b3c03556SRyan StoneThe following parameters are accepted by all VFs: 131b3c03556SRyan Stone.Bl -tag -width indent 132b3c03556SRyan Stone.It passthrough Pq boolean 133b3c03556SRyan StoneThis parameter controls whether the VF is reserved for the use of the 134b3c03556SRyan Stone.Xr bhyve 8 135b3c03556SRyan Stonehypervisor as a PCI passthrough device. 136b3c03556SRyan StoneIf this parameter is set to true, then the VF will be reserved as a PCI 137b3c03556SRyan Stonepassthrough device and it will not be accessible from the host OS. 138b3c03556SRyan StoneThe default value of this parameter is false. 139b3c03556SRyan Stone.El 140b3c03556SRyan Stone.Pp 141b3c03556SRyan StoneSee the PF driver manual page for configuration parameters specific to 142b3c03556SRyan Stoneparticular hardware. 143b3c03556SRyan Stone.Sh EXAMPLES 144b3c03556SRyan StoneThis sample file will create 3 VFs as children of the ix0 device. 145b3c03556SRyan StoneVF-1 and VF-2 are set as 146b3c03556SRyan Stone.Xr bhyve 8 147b3c03556SRyan Stonepassthrough devices through the use of the default section. 148b3c03556SRyan StoneVF-0 is not configured as a passthrough device as it explicitly overrides the 149b3c03556SRyan Stonedefault. 150b3c03556SRyan StoneVF-0 also sets a device-specific parameter named mac-addr. 15195236448SJoel Dahl.Bd -literal -offset ident 152b3c03556SRyan StonePF { 153b3c03556SRyan Stone device : "ix0"; 154b3c03556SRyan Stone num_vfs : 3; 155b3c03556SRyan Stone} 156b3c03556SRyan Stone 157b3c03556SRyan StoneDEFAULT { 158b3c03556SRyan Stone passthrough : true; 159b3c03556SRyan Stone} 160b3c03556SRyan Stone 161b3c03556SRyan StoneVF-0 { 162b3c03556SRyan Stone mac-addr : "02:56:48:7e:d9:f7"; 163b3c03556SRyan Stone passthrough : false; 164b3c03556SRyan Stone} 165b3c03556SRyan Stone.Ed 166b3c03556SRyan Stone.Sh SEE ALSO 16795236448SJoel Dahl.Xr rc.conf 5 , 16895236448SJoel Dahl.Xr iovctl 8 169b3c03556SRyan Stone.Sh AUTHORS 170b3c03556SRyan StoneThis manual page was written by 171b3c03556SRyan Stone.An Ryan Stone Aq Mt rstone@FreeBSD.org . 172