1*f3bb9251SJohn Baldwin#- 2*f3bb9251SJohn Baldwin# Copyright (c) 2013-2015 Sandvine Inc. 3*f3bb9251SJohn Baldwin# All rights reserved. 4*f3bb9251SJohn Baldwin# 5*f3bb9251SJohn Baldwin# Redistribution and use in source and binary forms, with or without 6*f3bb9251SJohn Baldwin# modification, are permitted provided that the following conditions 7*f3bb9251SJohn Baldwin# are met: 8*f3bb9251SJohn Baldwin# 1. Redistributions of source code must retain the above copyright 9*f3bb9251SJohn Baldwin# notice, this list of conditions and the following disclaimer. 10*f3bb9251SJohn Baldwin# 2. Redistributions in binary form must reproduce the above copyright 11*f3bb9251SJohn Baldwin# notice, this list of conditions and the following disclaimer in the 12*f3bb9251SJohn Baldwin# documentation and/or other materials provided with the distribution. 13*f3bb9251SJohn Baldwin# 14*f3bb9251SJohn Baldwin# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15*f3bb9251SJohn Baldwin# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16*f3bb9251SJohn Baldwin# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*f3bb9251SJohn Baldwin# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18*f3bb9251SJohn Baldwin# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*f3bb9251SJohn Baldwin# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*f3bb9251SJohn Baldwin# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*f3bb9251SJohn Baldwin# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22*f3bb9251SJohn Baldwin# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23*f3bb9251SJohn Baldwin# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24*f3bb9251SJohn Baldwin# SUCH DAMAGE. 25*f3bb9251SJohn Baldwin# 26*f3bb9251SJohn Baldwin# 27*f3bb9251SJohn Baldwin 28*f3bb9251SJohn Baldwin#include <sys/bus.h> 29*f3bb9251SJohn Baldwin 30*f3bb9251SJohn BaldwinINTERFACE pci_iov; 31*f3bb9251SJohn Baldwin 32*f3bb9251SJohn BaldwinHEADER { 33*f3bb9251SJohn Baldwin struct nvlist; 34*f3bb9251SJohn Baldwin} 35*f3bb9251SJohn Baldwin 36*f3bb9251SJohn Baldwin 37*f3bb9251SJohn BaldwinMETHOD int init { 38*f3bb9251SJohn Baldwin device_t dev; 39*f3bb9251SJohn Baldwin uint16_t num_vfs; 40*f3bb9251SJohn Baldwin const struct nvlist *config; 41*f3bb9251SJohn Baldwin}; 42*f3bb9251SJohn Baldwin 43*f3bb9251SJohn BaldwinMETHOD void uninit { 44*f3bb9251SJohn Baldwin device_t dev; 45*f3bb9251SJohn Baldwin}; 46*f3bb9251SJohn Baldwin 47*f3bb9251SJohn BaldwinMETHOD int add_vf { 48*f3bb9251SJohn Baldwin device_t dev; 49*f3bb9251SJohn Baldwin uint16_t vfnum; 50*f3bb9251SJohn Baldwin const struct nvlist *config; 51*f3bb9251SJohn Baldwin}; 52