429f3471d88e7baa934758b985eb19ca064fa148
[dpdk.git] / drivers / net / i40e / i40e_pf.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2017 Intel Corporation
3  */
4
5 #ifndef _I40E_PF_H_
6 #define _I40E_PF_H_
7
8 /* Default setting on number of VSIs that VF can contain */
9 #define I40E_DEFAULT_VF_VSI_NUM 1
10
11 struct virtchnl_vlan_offload_info {
12         uint16_t vsi_id;
13         uint8_t enable_vlan_strip;
14         uint8_t reserved;
15 };
16
17 /*
18  * Macro to calculate the memory size for configuring VSI queues
19  * via virtual channel.
20  */
21 #define I40E_VIRTCHNL_CONFIG_VSI_QUEUES_SIZE(x, n) \
22         (sizeof(*(x)) + sizeof((x)->qpair[0]) * (n))
23
24 int i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset);
25 void i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
26                                 uint16_t abs_vf_id, uint32_t opcode,
27                                 uint32_t retval,
28                                 uint8_t *msg, uint16_t msglen);
29 int i40e_pf_host_init(struct rte_eth_dev *dev);
30 int i40e_pf_host_uninit(struct rte_eth_dev *dev);
31 void i40e_notify_vf_link_status(struct rte_eth_dev *dev,
32                                 struct i40e_pf_vf *vf);
33
34 #endif /* _I40E_PF_H_ */