aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/PCI_INIT_IOV.9
blob: 1c8c64e5fdbb816bd9a1759bddd7a5b4096be1f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.\"
.\" Copyright (c) 2014 Sandvine Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd May 24, 2014
.Dt PCI_INIT_IOV 9
.Os
.Sh NAME
.Nm PCI_INIT_IOV
.Nd enable SR-IOV on a PF device
.Sh SYNOPSIS
.In sys/bus.h
.In machine/stdarg.h
.In sys/nv.h
.In dev/pci/pcireg.h
.In dev/pci/pcivar.h
.Ft int
.Fn PCI_INIT_IOV "device_t dev" "uint16_t num_vfs" "const nvlist_t *pf_config"
.Sh DESCRIPTION
The
.Fn PCI_INIT_IOV
method is called by the PCI Single-Root I/O Virtualization (SR-IOV)
infrastucture when the user requests that SR-IOV be enabled on a Physical
Function (PF).
The number of Virtual Functions (VFs) that will be created is passed to this
method in the
.Fa num_vfs
argument.
.Pp
If the driver requested device-specific PF configuration parameters via a PF
schema in its call to
.Xr pci_iov_attach 9 ,
those parameters will be available in the
.Fa pf_config
argument.
All configuration parameters that were either set as required parameters or that
had a default value set in the PF schema are guaranteed to be present in
.Fa pf_config .
Configuration parameters that were neither set as required nor were given a
default value are optional and may or may not be present in
.Fa pf_config .
.Fa pf_config
will not contain any configuration parameters that were not specified in the PF
schema.
All configuration parameters will have the correct type and are in the range of
valid values specified in the schema.
.Pp
If this method returns successfully, then this method will not be called again
on the same device until after a call to
.Xr PCI_UNINIT_IOV .
.Sh RETURN VALUES
Returns 0 on success, otherwise an appropriate error is returned.
If this method returns an error then the SR-IOV configuration will be aborted
and no VFs will be created.
.Sh SEE ALSO
.Xr nv 9 ,
.Xr pci 9 ,
.Xr pci_iov_schema 9 ,
.Xr PCI_ADD_VF 9 ,
.Xr PCI_UNINIT_IOV 9
.Sh AUTHORS
This manual page was written by
.An Ryan Stone Aq Mt rstone@FreeBSD.org .