xref: /linux/drivers/net/ethernet/intel/ice/ice_vf_lib_private.h (revision bce9af1b030bf59d51bbabf909a3ef164787e44e)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2018-2021, Intel Corporation. */
3 
4 #ifndef _ICE_VF_LIB_PRIVATE_H_
5 #define _ICE_VF_LIB_PRIVATE_H_
6 
7 #include "ice_vf_lib.h"
8 
9 /* This header file is for exposing functions in ice_vf_lib.c to other files
10  * which are also conditionally compiled depending on CONFIG_PCI_IOV.
11  * Functions which may be used by other files should be exposed as part of
12  * ice_vf_lib.h
13  *
14  * Functions in this file are exposed only when CONFIG_PCI_IOV is enabled, and
15  * thus this header must not be included by .c files which may be compiled
16  * with CONFIG_PCI_IOV disabled.
17  *
18  * To avoid this, only include this header file directly within .c files that
19  * are conditionally enabled in the "ice-$(CONFIG_PCI_IOV)" block.
20  */
21 
22 #ifndef CONFIG_PCI_IOV
23 #warning "Only include ice_vf_lib_private.h in CONFIG_PCI_IOV virtualization files"
24 #endif
25 
26 void ice_initialize_vf_entry(struct ice_vf *vf);
27 void ice_dis_vf_qs(struct ice_vf *vf);
28 int ice_check_vf_init(struct ice_vf *vf);
29 enum virtchnl_status_code ice_err_to_virt_err(int err);
30 struct ice_port_info *ice_vf_get_port_info(struct ice_vf *vf);
31 int ice_vsi_apply_spoofchk(struct ice_vsi *vsi, bool enable);
32 bool ice_is_vf_trusted(struct ice_vf *vf);
33 bool ice_vf_has_no_qs_ena(struct ice_vf *vf);
34 bool ice_is_vf_link_up(struct ice_vf *vf);
35 void ice_vf_ctrl_invalidate_vsi(struct ice_vf *vf);
36 void ice_vf_ctrl_vsi_release(struct ice_vf *vf);
37 struct ice_vsi *ice_vf_ctrl_vsi_setup(struct ice_vf *vf);
38 int ice_vf_init_host_cfg(struct ice_vf *vf, struct ice_vsi *vsi);
39 void ice_vf_invalidate_vsi(struct ice_vf *vf);
40 void ice_vf_vsi_release(struct ice_vf *vf);
41 
42 #endif /* _ICE_VF_LIB_PRIVATE_H_ */
43