linux/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 1999 - 2018 Intel Corporation. */

#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)
{}

/**
 * ixgbe_get_vfs - Find and take references to all vf devices
 * @adapter: Pointer to adapter struct
 */
static void ixgbe_get_vfs(struct ixgbe_adapter *adapter)
{}

/* Note this function is called when the user wants to enable SR-IOV
 * VFs using the now deprecated module parameter
 */
void ixgbe_enable_sriov(struct ixgbe_adapter *adapter, unsigned int max_vfs)
{}

#endif /* #ifdef CONFIG_PCI_IOV */
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)
{}

/**
 * ixgbe_set_vf_rx_tx - Set VF rx tx
 * @adapter: Pointer to adapter struct
 * @vf: VF identifier
 *
 * Set or reset correct transmit and receive for vf
 **/
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)
{}

/**
 * ixgbe_set_all_vfs - update vfs queues
 * @adapter: Pointer to adapter struct
 *
 * Update setting transmit and receive queues for all vfs
 **/
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)
{}

/**
 * ixgbe_set_vf_link_state - Set link state
 * @adapter: Pointer to adapter struct
 * @vf: VF identifier
 * @state: required link state
 *
 * Set a link force state on/off a single vf
 **/
void ixgbe_set_vf_link_state(struct ixgbe_adapter *adapter, int vf, int state)
{}

/**
 * ixgbe_ndo_set_vf_link_state - Set link state
 * @netdev: network interface device structure
 * @vf: VF identifier
 * @state: required link state
 *
 * Set the link state of a specified VF, regardless of physical link 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)
{}