0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BNXT_SRIOV_H
0012 #define BNXT_SRIOV_H
0013
0014 #define BNXT_FWD_RESP_SIZE_ERR(n) \
0015 ((offsetof(struct hwrm_fwd_resp_input, encap_resp) + n) > \
0016 sizeof(struct hwrm_fwd_resp_input))
0017
0018 #define BNXT_EXEC_FWD_RESP_SIZE_ERR(n) \
0019 ((offsetof(struct hwrm_exec_fwd_resp_input, encap_request) + n) >\
0020 offsetof(struct hwrm_exec_fwd_resp_input, encap_resp_target_id))
0021
0022 #define BNXT_REJ_FWD_RESP_SIZE_ERR(n) \
0023 ((offsetof(struct hwrm_reject_fwd_resp_input, encap_request) + n) >\
0024 offsetof(struct hwrm_reject_fwd_resp_input, encap_resp_target_id))
0025
0026 #define BNXT_VF_MIN_RSS_CTX 1
0027 #define BNXT_VF_MAX_RSS_CTX 1
0028 #define BNXT_VF_MIN_L2_CTX 1
0029 #define BNXT_VF_MAX_L2_CTX 4
0030
0031 int bnxt_get_vf_config(struct net_device *, int, struct ifla_vf_info *);
0032 int bnxt_set_vf_mac(struct net_device *, int, u8 *);
0033 int bnxt_set_vf_vlan(struct net_device *, int, u16, u8, __be16);
0034 int bnxt_set_vf_bw(struct net_device *, int, int, int);
0035 int bnxt_set_vf_link_state(struct net_device *, int, int);
0036 int bnxt_set_vf_spoofchk(struct net_device *, int, bool);
0037 bool bnxt_is_trusted_vf(struct bnxt *bp, struct bnxt_vf_info *vf);
0038 int bnxt_set_vf_trust(struct net_device *dev, int vf_id, bool trust);
0039 int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs);
0040 int bnxt_cfg_hw_sriov(struct bnxt *bp, int *num_vfs, bool reset);
0041 void bnxt_sriov_disable(struct bnxt *);
0042 void bnxt_hwrm_exec_fwd_req(struct bnxt *);
0043 void bnxt_update_vf_mac(struct bnxt *);
0044 int bnxt_approve_mac(struct bnxt *, const u8 *, bool);
0045 #endif