xref: /OK3568_Linux_fs/kernel/include/linux/qed/qed_iov_if.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2*4882a593Smuzhiyun /* QLogic qed NIC Driver
3*4882a593Smuzhiyun  * Copyright (c) 2015-2017  QLogic Corporation
4*4882a593Smuzhiyun  * Copyright (c) 2019-2020 Marvell International Ltd.
5*4882a593Smuzhiyun  */
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifndef _QED_IOV_IF_H
8*4882a593Smuzhiyun #define _QED_IOV_IF_H
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #include <linux/qed/qed_if.h>
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun /* Structs used by PF to control and manipulate child VFs */
13*4882a593Smuzhiyun struct qed_iov_hv_ops {
14*4882a593Smuzhiyun 	int (*configure)(struct qed_dev *cdev, int num_vfs_param);
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun 	int (*set_mac) (struct qed_dev *cdev, u8 *mac, int vfid);
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun 	int (*set_vlan) (struct qed_dev *cdev, u16 vid, int vfid);
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun 	int (*get_config) (struct qed_dev *cdev, int vf_id,
21*4882a593Smuzhiyun 			   struct ifla_vf_info *ivi);
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun 	int (*set_link_state) (struct qed_dev *cdev, int vf_id,
24*4882a593Smuzhiyun 			       int link_state);
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun 	int (*set_spoof) (struct qed_dev *cdev, int vfid, bool val);
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun 	int (*set_rate) (struct qed_dev *cdev, int vfid,
29*4882a593Smuzhiyun 			 u32 min_rate, u32 max_rate);
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun 	int (*set_trust) (struct qed_dev *cdev, int vfid, bool trust);
32*4882a593Smuzhiyun };
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun #endif
35