1
2
3
4
5
6
7#ifndef EF10_SRIOV_H
8#define EF10_SRIOV_H
9
10#include "net_driver.h"
11
12
13
14
15
16
17
18
19
20
21struct ef10_vf {
22 struct efx_nic *efx;
23 struct pci_dev *pci_dev;
24 unsigned int vport_id;
25 unsigned int vport_assigned;
26 u8 mac[ETH_ALEN];
27 u16 vlan;
28#define EFX_EF10_NO_VLAN 0
29};
30
31static inline bool efx_ef10_sriov_wanted(struct efx_nic *efx)
32{
33 return false;
34}
35
36int efx_ef10_sriov_configure(struct efx_nic *efx, int num_vfs);
37int efx_ef10_sriov_init(struct efx_nic *efx);
38static inline void efx_ef10_sriov_reset(struct efx_nic *efx) {}
39void efx_ef10_sriov_fini(struct efx_nic *efx);
40static inline void efx_ef10_sriov_flr(struct efx_nic *efx, unsigned vf_i) {}
41
42int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf, u8 *mac);
43
44int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i,
45 u16 vlan, u8 qos);
46
47int efx_ef10_sriov_set_vf_spoofchk(struct efx_nic *efx, int vf,
48 bool spoofchk);
49
50int efx_ef10_sriov_get_vf_config(struct efx_nic *efx, int vf_i,
51 struct ifla_vf_info *ivf);
52
53int efx_ef10_sriov_set_vf_link_state(struct efx_nic *efx, int vf_i,
54 int link_state);
55
56int efx_ef10_vswitching_probe_pf(struct efx_nic *efx);
57int efx_ef10_vswitching_probe_vf(struct efx_nic *efx);
58int efx_ef10_vswitching_restore_pf(struct efx_nic *efx);
59int efx_ef10_vswitching_restore_vf(struct efx_nic *efx);
60void efx_ef10_vswitching_remove_pf(struct efx_nic *efx);
61void efx_ef10_vswitching_remove_vf(struct efx_nic *efx);
62int efx_ef10_vport_add_mac(struct efx_nic *efx,
63 unsigned int port_id, u8 *mac);
64int efx_ef10_vport_del_mac(struct efx_nic *efx,
65 unsigned int port_id, u8 *mac);
66int efx_ef10_vadaptor_alloc(struct efx_nic *efx, unsigned int port_id);
67int efx_ef10_vadaptor_query(struct efx_nic *efx, unsigned int port_id,
68 u32 *port_flags, u32 *vadaptor_flags,
69 unsigned int *vlan_tags);
70int efx_ef10_vadaptor_free(struct efx_nic *efx, unsigned int port_id);
71
72#endif
73