1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28#ifndef _IXGBE_SRIOV_H_
29#define _IXGBE_SRIOV_H_
30
31void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter);
32void ixgbe_msg_task(struct ixgbe_adapter *adapter);
33int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask);
34void ixgbe_disable_tx_rx(struct ixgbe_adapter *adapter);
35void ixgbe_ping_all_vfs(struct ixgbe_adapter *adapter);
36int ixgbe_ndo_set_vf_mac(struct net_device *netdev, int queue, u8 *mac);
37int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int queue, u16 vlan,
38 u8 qos);
39int ixgbe_ndo_set_vf_bw(struct net_device *netdev, int vf, int tx_rate);
40int ixgbe_ndo_set_vf_spoofchk(struct net_device *netdev, int vf, bool setting);
41int ixgbe_ndo_get_vf_config(struct net_device *netdev,
42 int vf, struct ifla_vf_info *ivi);
43void ixgbe_check_vf_rate_limit(struct ixgbe_adapter *adapter);
44int ixgbe_disable_sriov(struct ixgbe_adapter *adapter);
45#ifdef CONFIG_PCI_IOV
46void ixgbe_enable_sriov(struct ixgbe_adapter *adapter);
47#endif
48int ixgbe_pci_sriov_configure(struct pci_dev *dev, int num_vfs);
49
50static inline void ixgbe_set_vmvir(struct ixgbe_adapter *adapter,
51 u16 vid, u16 qos, u32 vf)
52{
53 struct ixgbe_hw *hw = &adapter->hw;
54 u32 vmvir = vid | (qos << VLAN_PRIO_SHIFT) | IXGBE_VMVIR_VLANA_DEFAULT;
55
56 IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf), vmvir);
57}
58
59#endif
60
61