0001
0002
0003
0004
0005
0006
0007 #ifndef EF10_SRIOV_H
0008 #define EF10_SRIOV_H
0009
0010 #include "net_driver.h"
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 struct ef10_vf {
0022 struct efx_nic *efx;
0023 struct pci_dev *pci_dev;
0024 unsigned int vport_id;
0025 unsigned int vport_assigned;
0026 u8 mac[ETH_ALEN];
0027 u16 vlan;
0028 #define EFX_EF10_NO_VLAN 0
0029 };
0030
0031 static inline bool efx_ef10_sriov_wanted(struct efx_nic *efx)
0032 {
0033 return false;
0034 }
0035
0036 int efx_ef10_sriov_configure(struct efx_nic *efx, int num_vfs);
0037 int efx_ef10_sriov_init(struct efx_nic *efx);
0038 static inline void efx_ef10_sriov_reset(struct efx_nic *efx) {}
0039 void efx_ef10_sriov_fini(struct efx_nic *efx);
0040 static inline void efx_ef10_sriov_flr(struct efx_nic *efx, unsigned vf_i) {}
0041
0042 int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf, const u8 *mac);
0043
0044 int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i,
0045 u16 vlan, u8 qos);
0046
0047 int efx_ef10_sriov_set_vf_spoofchk(struct efx_nic *efx, int vf,
0048 bool spoofchk);
0049
0050 int efx_ef10_sriov_get_vf_config(struct efx_nic *efx, int vf_i,
0051 struct ifla_vf_info *ivf);
0052
0053 int efx_ef10_sriov_set_vf_link_state(struct efx_nic *efx, int vf_i,
0054 int link_state);
0055
0056 int efx_ef10_vswitching_probe_pf(struct efx_nic *efx);
0057 int efx_ef10_vswitching_probe_vf(struct efx_nic *efx);
0058 int efx_ef10_vswitching_restore_pf(struct efx_nic *efx);
0059 int efx_ef10_vswitching_restore_vf(struct efx_nic *efx);
0060 void efx_ef10_vswitching_remove_pf(struct efx_nic *efx);
0061 void efx_ef10_vswitching_remove_vf(struct efx_nic *efx);
0062 int efx_ef10_vport_add_mac(struct efx_nic *efx,
0063 unsigned int port_id, const u8 *mac);
0064 int efx_ef10_vport_del_mac(struct efx_nic *efx,
0065 unsigned int port_id, const u8 *mac);
0066 int efx_ef10_vadaptor_alloc(struct efx_nic *efx, unsigned int port_id);
0067 int efx_ef10_vadaptor_query(struct efx_nic *efx, unsigned int port_id,
0068 u32 *port_flags, u32 *vadaptor_flags,
0069 unsigned int *vlan_tags);
0070 int efx_ef10_vadaptor_free(struct efx_nic *efx, unsigned int port_id);
0071
0072 #endif