#include <linux/types.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/vmalloc.h>
#include <linux/string.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/ipv6.h>
#include <linux/if_bridge.h>
#ifdef NETIF_F_HW_VLAN_CTAG_TX
#include <linux/if_vlan.h>
#endif
#include "ixgbe.h"
#include "ixgbe_type.h"
#include "ixgbe_sriov.h"
#ifdef CONFIG_PCI_IOV
static inline void ixgbe_alloc_vf_macvlans(struct ixgbe_adapter *adapter,
unsigned int num_vfs)
{ … }
static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
unsigned int num_vfs)
{ … }
static void ixgbe_get_vfs(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_enable_sriov(struct ixgbe_adapter *adapter, unsigned int max_vfs)
{ … }
#endif
int ixgbe_disable_sriov(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_pci_sriov_enable(struct pci_dev *dev, int num_vfs)
{ … }
static int ixgbe_pci_sriov_disable(struct pci_dev *dev)
{ … }
int ixgbe_pci_sriov_configure(struct pci_dev *dev, int num_vfs)
{ … }
static int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
#ifdef CONFIG_PCI_IOV
void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter)
{ … }
#endif
static int ixgbe_set_vf_vlan(struct ixgbe_adapter *adapter, int add, int vid,
u32 vf)
{ … }
static int ixgbe_set_vf_lpe(struct ixgbe_adapter *adapter, u32 max_frame, u32 vf)
{ … }
static void ixgbe_set_vmolr(struct ixgbe_hw *hw, u32 vf, bool aupe)
{ … }
static void ixgbe_clear_vmvir(struct ixgbe_adapter *adapter, u32 vf)
{ … }
static void ixgbe_clear_vf_vlans(struct ixgbe_adapter *adapter, u32 vf)
{ … }
static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,
int vf, int index, unsigned char *mac_addr)
{ … }
static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
{ … }
static void ixgbe_vf_clear_mbx(struct ixgbe_adapter *adapter, u32 vf)
{ … }
static int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter,
int vf, unsigned char *mac_addr)
{ … }
int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask)
{ … }
static inline void ixgbe_write_qde(struct ixgbe_adapter *adapter, u32 vf,
u32 qde)
{ … }
static void ixgbe_set_vf_rx_tx(struct ixgbe_adapter *adapter, int vf)
{ … }
static int ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)
{ … }
static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_set_vf_vlan_msg(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_set_vf_macvlan_msg(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_negotiate_vf_api(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_get_vf_queues(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_get_vf_reta(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_get_vf_rss_key(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_update_vf_xcast_mode(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_get_vf_link_state(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{ … }
static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
{ … }
static void ixgbe_rcv_ack_from_vf(struct ixgbe_adapter *adapter, u32 vf)
{ … }
void ixgbe_msg_task(struct ixgbe_adapter *adapter)
{ … }
static inline void ixgbe_ping_vf(struct ixgbe_adapter *adapter, int vf)
{ … }
void ixgbe_ping_all_vfs(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_set_all_vfs(struct ixgbe_adapter *adapter)
{ … }
int ixgbe_ndo_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
{ … }
static int ixgbe_enable_port_vlan(struct ixgbe_adapter *adapter, int vf,
u16 vlan, u8 qos)
{ … }
static int ixgbe_disable_port_vlan(struct ixgbe_adapter *adapter, int vf)
{ … }
int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan,
u8 qos, __be16 vlan_proto)
{ … }
int ixgbe_link_mbps(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_set_vf_rate_limit(struct ixgbe_adapter *adapter, int vf)
{ … }
void ixgbe_check_vf_rate_limit(struct ixgbe_adapter *adapter)
{ … }
int ixgbe_ndo_set_vf_bw(struct net_device *netdev, int vf, int min_tx_rate,
int max_tx_rate)
{ … }
int ixgbe_ndo_set_vf_spoofchk(struct net_device *netdev, int vf, bool setting)
{ … }
void ixgbe_set_vf_link_state(struct ixgbe_adapter *adapter, int vf, int state)
{ … }
int ixgbe_ndo_set_vf_link_state(struct net_device *netdev, int vf, int state)
{ … }
int ixgbe_ndo_set_vf_rss_query_en(struct net_device *netdev, int vf,
bool setting)
{ … }
int ixgbe_ndo_set_vf_trust(struct net_device *netdev, int vf, bool setting)
{ … }
int ixgbe_ndo_get_vf_config(struct net_device *netdev,
int vf, struct ifla_vf_info *ivi)
{ … }