Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_pf_iov.h
/****************************************************************************** | /****************************************************************************** | ||||
Copyright (c) 2013-2015, Intel Corporation | Copyright (c) 2013-2017, Intel Corporation | ||||
All rights reserved. | All rights reserved. | ||||
Redistribution and use in source and binary forms, with or without | Redistribution and use in source and binary forms, with or without | ||||
modification, are permitted provided that the following conditions are met: | modification, are permitted provided that the following conditions are met: | ||||
1. Redistributions of source code must retain the above copyright notice, | 1. Redistributions of source code must retain the above copyright notice, | ||||
this list of conditions and the following disclaimer. | this list of conditions and the following disclaimer. | ||||
Show All 25 Lines | |||||
#define _IXL_PF_IOV_H_ | #define _IXL_PF_IOV_H_ | ||||
#include "ixl_pf.h" | #include "ixl_pf.h" | ||||
#include <sys/nv.h> | #include <sys/nv.h> | ||||
#include <sys/iov_schema.h> | #include <sys/iov_schema.h> | ||||
#include <dev/pci/pci_iov.h> | #include <dev/pci/pci_iov.h> | ||||
#define IXL_GLOBAL_VF_NUM(hw, vf) \ | |||||
(vf->vf_num + hw->func_caps.vf_base_id) | |||||
/* Public functions */ | /* Public functions */ | ||||
/* | /* | ||||
* These three are DEVMETHODs required for SR-IOV PF support. | * These three are DEVMETHODs required for SR-IOV PF support. | ||||
*/ | */ | ||||
int ixl_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *params); | int ixl_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *params); | ||||
void ixl_iov_uninit(device_t dev); | void ixl_iov_uninit(device_t dev); | ||||
int ixl_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *params); | int ixl_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *params); | ||||
/* | /* | ||||
* The standard PF driver needs to call these during normal execution when | * The standard PF driver needs to call these during normal execution when | ||||
* SR-IOV mode is active. | * SR-IOV mode is active. | ||||
*/ | */ | ||||
void ixl_initialize_sriov(struct ixl_pf *pf); | 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_vf_msg(struct ixl_pf *pf, struct i40e_arq_event_info *event); | ||||
void ixl_handle_vflr(void *arg, int pending); | void ixl_handle_vflr(void *arg, int pending); | ||||
void ixl_broadcast_link_state(struct ixl_pf *pf); | |||||
#endif /* _IXL_PF_IOV_H_ */ | #endif /* _IXL_PF_IOV_H_ */ |