Commit | Line | Data |
---|---|---|
c0c050c5 MC |
1 | /* Broadcom NetXtreme-C/E network driver. |
2 | * | |
11f15ed3 | 3 | * Copyright (c) 2014-2016 Broadcom Corporation |
746df139 | 4 | * Copyright (c) 2016-2018 Broadcom Limited |
c0c050c5 MC |
5 | * |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation. | |
9 | */ | |
10 | ||
11 | #ifndef BNXT_SRIOV_H | |
12 | #define BNXT_SRIOV_H | |
13 | ||
59895f59 MC |
14 | #define BNXT_FWD_RESP_SIZE_ERR(n) \ |
15 | ((offsetof(struct hwrm_fwd_resp_input, encap_resp) + n) > \ | |
16 | sizeof(struct hwrm_fwd_resp_input)) | |
17 | ||
18 | #define BNXT_EXEC_FWD_RESP_SIZE_ERR(n) \ | |
19 | ((offsetof(struct hwrm_exec_fwd_resp_input, encap_request) + n) >\ | |
20 | offsetof(struct hwrm_exec_fwd_resp_input, encap_resp_target_id)) | |
21 | ||
22 | #define BNXT_REJ_FWD_RESP_SIZE_ERR(n) \ | |
23 | ((offsetof(struct hwrm_reject_fwd_resp_input, encap_request) + n) >\ | |
24 | offsetof(struct hwrm_reject_fwd_resp_input, encap_resp_target_id)) | |
25 | ||
86c3380d MC |
26 | #define BNXT_VF_MIN_RSS_CTX 1 |
27 | #define BNXT_VF_MAX_RSS_CTX 1 | |
28 | #define BNXT_VF_MIN_L2_CTX 1 | |
29 | #define BNXT_VF_MAX_L2_CTX 4 | |
30 | ||
c0c050c5 MC |
31 | int bnxt_get_vf_config(struct net_device *, int, struct ifla_vf_info *); |
32 | int bnxt_set_vf_mac(struct net_device *, int, u8 *); | |
79aab093 | 33 | int bnxt_set_vf_vlan(struct net_device *, int, u16, u8, __be16); |
c0c050c5 MC |
34 | int bnxt_set_vf_bw(struct net_device *, int, int, int); |
35 | int bnxt_set_vf_link_state(struct net_device *, int, int); | |
36 | int bnxt_set_vf_spoofchk(struct net_device *, int, bool); | |
dd85fc0a | 37 | bool bnxt_is_trusted_vf(struct bnxt *bp, struct bnxt_vf_info *vf); |
746df139 | 38 | int bnxt_set_vf_trust(struct net_device *dev, int vf_id, bool trust); |
c0c050c5 | 39 | int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs); |
2cd86968 | 40 | int bnxt_cfg_hw_sriov(struct bnxt *bp, int *num_vfs, bool reset); |
c0c050c5 MC |
41 | void bnxt_sriov_disable(struct bnxt *); |
42 | void bnxt_hwrm_exec_fwd_req(struct bnxt *); | |
379a80a1 | 43 | void bnxt_update_vf_mac(struct bnxt *); |
28ea334b | 44 | int bnxt_approve_mac(struct bnxt *, u8 *, bool); |
c0c050c5 | 45 | #endif |