Shradha Shah | 7fa8d54 | 2015-05-06 00:55:13 +0100 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | * Driver for Solarflare network controllers and boards |
| 3 | * Copyright 2015 Solarflare Communications Inc. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 as published |
| 7 | * by the Free Software Foundation, incorporated herein by reference. |
| 8 | */ |
| 9 | |
| 10 | #ifndef EF10_SRIOV_H |
| 11 | #define EF10_SRIOV_H |
| 12 | |
| 13 | #include "net_driver.h" |
| 14 | |
Shradha Shah | 3c5eb87 | 2015-05-06 00:58:31 +0100 | [diff] [blame^] | 15 | /** |
| 16 | * struct ef10_vf - PF's store of VF data |
| 17 | * @vport_id: vport ID for the VF |
| 18 | * @vport_assigned: record whether the vport is currently assigned to the VF |
| 19 | * @mac: MAC address for the VF, zero when address is removed from the vport |
| 20 | */ |
| 21 | struct ef10_vf { |
| 22 | unsigned int vport_id; |
| 23 | unsigned int vport_assigned; |
| 24 | u8 mac[ETH_ALEN]; |
| 25 | }; |
| 26 | |
Shradha Shah | 7fa8d54 | 2015-05-06 00:55:13 +0100 | [diff] [blame] | 27 | static inline bool efx_ef10_sriov_wanted(struct efx_nic *efx) |
| 28 | { |
| 29 | return false; |
| 30 | } |
| 31 | |
Shradha Shah | 834e23d | 2015-05-06 00:55:58 +0100 | [diff] [blame] | 32 | int efx_ef10_sriov_configure(struct efx_nic *efx, int num_vfs); |
Shradha Shah | 02246a7 | 2015-05-06 00:58:14 +0100 | [diff] [blame] | 33 | int efx_ef10_sriov_init(struct efx_nic *efx); |
Shradha Shah | 7fa8d54 | 2015-05-06 00:55:13 +0100 | [diff] [blame] | 34 | static inline void efx_ef10_sriov_mac_address_changed(struct efx_nic *efx) {} |
| 35 | static inline void efx_ef10_sriov_reset(struct efx_nic *efx) {} |
Shradha Shah | 02246a7 | 2015-05-06 00:58:14 +0100 | [diff] [blame] | 36 | void efx_ef10_sriov_fini(struct efx_nic *efx); |
Shradha Shah | 7fa8d54 | 2015-05-06 00:55:13 +0100 | [diff] [blame] | 37 | static inline void efx_ef10_sriov_flr(struct efx_nic *efx, unsigned vf_i) {} |
| 38 | |
| 39 | static inline int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf, |
| 40 | u8 *mac) |
| 41 | { |
| 42 | return -EOPNOTSUPP; |
| 43 | } |
| 44 | |
| 45 | static inline int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf, |
| 46 | u16 vlan, u8 qos) |
| 47 | { |
| 48 | return -EOPNOTSUPP; |
| 49 | } |
| 50 | |
| 51 | static inline int efx_ef10_sriov_set_vf_spoofchk(struct efx_nic *efx, int vf, |
| 52 | bool spoofchk) |
| 53 | { |
| 54 | return -EOPNOTSUPP; |
| 55 | } |
| 56 | |
| 57 | static inline int efx_ef10_sriov_get_vf_config(struct efx_nic *efx, int vf, |
| 58 | struct ifla_vf_info *ivf) |
| 59 | { |
| 60 | return -EOPNOTSUPP; |
| 61 | } |
| 62 | |
Daniel Pieczko | 6d8aaaf | 2015-05-06 00:57:34 +0100 | [diff] [blame] | 63 | int efx_ef10_vswitching_probe(struct efx_nic *efx); |
| 64 | int efx_ef10_vswitching_restore(struct efx_nic *efx); |
| 65 | void efx_ef10_vswitching_remove(struct efx_nic *efx); |
| 66 | |
Shradha Shah | 7fa8d54 | 2015-05-06 00:55:13 +0100 | [diff] [blame] | 67 | #endif /* EF10_SRIOV_H */ |