blob: 8b67163e2f81bef1fef00ee33740c48a45a5a4c6 [file] [log] [blame]
Shradha Shah7fa8d542015-05-06 00:55:13 +01001/****************************************************************************
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 Shah3c5eb872015-05-06 00:58:31 +010015/**
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 */
21struct ef10_vf {
22 unsigned int vport_id;
23 unsigned int vport_assigned;
24 u8 mac[ETH_ALEN];
25};
26
Shradha Shah7fa8d542015-05-06 00:55:13 +010027static inline bool efx_ef10_sriov_wanted(struct efx_nic *efx)
28{
29 return false;
30}
31
Shradha Shah834e23d2015-05-06 00:55:58 +010032int efx_ef10_sriov_configure(struct efx_nic *efx, int num_vfs);
Shradha Shah02246a72015-05-06 00:58:14 +010033int efx_ef10_sriov_init(struct efx_nic *efx);
Shradha Shahcfc77c22015-05-20 11:09:30 +010034static inline int efx_ef10_sriov_mac_address_changed(struct efx_nic *efx)
35{
36 return -EOPNOTSUPP;
37}
Shradha Shah7fa8d542015-05-06 00:55:13 +010038static inline void efx_ef10_sriov_reset(struct efx_nic *efx) {}
Shradha Shah02246a72015-05-06 00:58:14 +010039void efx_ef10_sriov_fini(struct efx_nic *efx);
Shradha Shah7fa8d542015-05-06 00:55:13 +010040static inline void efx_ef10_sriov_flr(struct efx_nic *efx, unsigned vf_i) {}
41
42static inline int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf,
43 u8 *mac)
44{
45 return -EOPNOTSUPP;
46}
47
48static inline int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf,
49 u16 vlan, u8 qos)
50{
51 return -EOPNOTSUPP;
52}
53
54static inline int efx_ef10_sriov_set_vf_spoofchk(struct efx_nic *efx, int vf,
55 bool spoofchk)
56{
57 return -EOPNOTSUPP;
58}
59
60static inline int efx_ef10_sriov_get_vf_config(struct efx_nic *efx, int vf,
61 struct ifla_vf_info *ivf)
62{
63 return -EOPNOTSUPP;
64}
65
Shradha Shah7b8c7b52015-05-06 00:58:54 +010066int efx_ef10_vswitching_probe_pf(struct efx_nic *efx);
67int efx_ef10_vswitching_probe_vf(struct efx_nic *efx);
68int efx_ef10_vswitching_restore_pf(struct efx_nic *efx);
69int efx_ef10_vswitching_restore_vf(struct efx_nic *efx);
70void efx_ef10_vswitching_remove_pf(struct efx_nic *efx);
71void efx_ef10_vswitching_remove_vf(struct efx_nic *efx);
Daniel Pieczko6d8aaaf2015-05-06 00:57:34 +010072
Shradha Shah7fa8d542015-05-06 00:55:13 +010073#endif /* EF10_SRIOV_H */