Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_iw.h
- This file was copied from sys/dev/ixl/ixl_pf_iov.h.
Show All 26 Lines | /****************************************************************************** | ||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 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 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
POSSIBILITY OF SUCH DAMAGE. | POSSIBILITY OF SUCH DAMAGE. | ||||
******************************************************************************/ | ******************************************************************************/ | ||||
/*$FreeBSD$*/ | /*$FreeBSD$*/ | ||||
#ifndef _IXL_IW_H_ | |||||
#define _IXL_IW_H_ | |||||
#ifndef _IXL_PF_IOV_H_ | #define IXL_IW_MAX_USER_PRIORITY 8 | ||||
#define _IXL_PF_IOV_H_ | |||||
#include "ixl_pf.h" | |||||
#include <sys/nv.h> | struct ixl_iw_msix_mapping { | ||||
#include <sys/iov_schema.h> | u8 itr_indx; | ||||
#include <dev/pci/pci_iov.h> | int aeq_vector; | ||||
int ceq_cnt; | |||||
int *ceq_vector; | |||||
}; | |||||
/* Public functions */ | struct ixl_iw_msix { | ||||
int base; | |||||
int count; | |||||
}; | |||||
/* | struct ixl_iw_pf { | ||||
* These three are DEVMETHODs required for SR-IOV PF support. | void *handle; | ||||
*/ | struct ifnet *ifp; | ||||
int ixl_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *params); | device_t dev; | ||||
void ixl_iov_uninit(device_t dev); | struct resource *pci_mem; | ||||
int ixl_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *params); | u8 pf_id; | ||||
u16 mtu; | |||||
struct ixl_iw_msix iw_msix; | |||||
u16 qs_handle[IXL_IW_MAX_USER_PRIORITY]; | |||||
}; | |||||
/* | struct ixl_iw_ops { | ||||
* The standard PF driver needs to call these during normal execution when | int (*init)(struct ixl_iw_pf *pf_info); | ||||
* SR-IOV mode is active. | int (*stop)(struct ixl_iw_pf *pf_info); | ||||
*/ | }; | ||||
void ixl_initialize_sriov(struct ixl_pf *pf); | |||||
void ixl_handle_vf_msg(struct ixl_pf *pf, struct i40e_arq_event_info *event); | |||||
void ixl_handle_vflr(void *arg, int pending); | |||||
#endif /* _IXL_PF_IOV_H_ */ | int ixl_iw_pf_reset(void *pf_handle); | ||||
int ixl_iw_pf_msix_init(void *pf_handle, | |||||
struct ixl_iw_msix_mapping *msix_info); | |||||
int ixl_iw_register(struct ixl_iw_ops *iw_ops); | |||||
int ixl_iw_unregister(void); | |||||
#endif /* _IXL_IW_H_ */ |