1109aba47SJacob Keller /* SPDX-License-Identifier: GPL-2.0 */
2109aba47SJacob Keller /* Copyright (C) 2018-2021, Intel Corporation. */
3109aba47SJacob Keller 
4109aba47SJacob Keller #ifndef _ICE_VF_LIB_PRIVATE_H_
5109aba47SJacob Keller #define _ICE_VF_LIB_PRIVATE_H_
6109aba47SJacob Keller 
7109aba47SJacob Keller #include "ice_vf_lib.h"
8109aba47SJacob Keller 
9109aba47SJacob Keller /* This header file is for exposing functions in ice_vf_lib.c to other files
10109aba47SJacob Keller  * which are also conditionally compiled depending on CONFIG_PCI_IOV.
11109aba47SJacob Keller  * Functions which may be used by other files should be exposed as part of
12109aba47SJacob Keller  * ice_vf_lib.h
13109aba47SJacob Keller  *
14109aba47SJacob Keller  * Functions in this file are exposed only when CONFIG_PCI_IOV is enabled, and
15109aba47SJacob Keller  * thus this header must not be included by .c files which may be compiled
16109aba47SJacob Keller  * with CONFIG_PCI_IOV disabled.
17109aba47SJacob Keller  *
18109aba47SJacob Keller  * To avoid this, only include this header file directly within .c files that
19109aba47SJacob Keller  * are conditionally enabled in the "ice-$(CONFIG_PCI_IOV)" block.
20109aba47SJacob Keller  */
21109aba47SJacob Keller 
22109aba47SJacob Keller #ifndef CONFIG_PCI_IOV
23109aba47SJacob Keller #warning "Only include ice_vf_lib_private.h in CONFIG_PCI_IOV virtualization files"
24109aba47SJacob Keller #endif
25109aba47SJacob Keller 
26b5dcff1fSJacob Keller void ice_initialize_vf_entry(struct ice_vf *vf);
27109aba47SJacob Keller void ice_dis_vf_qs(struct ice_vf *vf);
285a57ee83SJacob Keller int ice_check_vf_init(struct ice_vf *vf);
29e384cf35SMd Fahad Iqbal Polash enum virtchnl_status_code ice_err_to_virt_err(int err);
30109aba47SJacob Keller struct ice_port_info *ice_vf_get_port_info(struct ice_vf *vf);
31109aba47SJacob Keller int ice_vsi_apply_spoofchk(struct ice_vsi *vsi, bool enable);
32109aba47SJacob Keller bool ice_is_vf_trusted(struct ice_vf *vf);
33109aba47SJacob Keller bool ice_vf_has_no_qs_ena(struct ice_vf *vf);
34109aba47SJacob Keller bool ice_is_vf_link_up(struct ice_vf *vf);
35109aba47SJacob Keller void ice_vf_ctrl_invalidate_vsi(struct ice_vf *vf);
36109aba47SJacob Keller void ice_vf_ctrl_vsi_release(struct ice_vf *vf);
37109aba47SJacob Keller struct ice_vsi *ice_vf_ctrl_vsi_setup(struct ice_vf *vf);
38*b1b56942SJacob Keller int ice_vf_init_host_cfg(struct ice_vf *vf, struct ice_vsi *vsi);
39109aba47SJacob Keller void ice_vf_invalidate_vsi(struct ice_vf *vf);
401efee073SJacob Keller void ice_vf_vsi_release(struct ice_vf *vf);
41109aba47SJacob Keller 
42109aba47SJacob Keller #endif /* _ICE_VF_LIB_PRIVATE_H_ */
43