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