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

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

/* ethtool support for ixgbe */

#include <linux/interrupt.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/vmalloc.h>
#include <linux/highmem.h>
#include <linux/uaccess.h>

#include "ixgbe.h"
#include "ixgbe_phy.h"


enum {};

struct ixgbe_stats {};

#define IXGBE_STAT(m)
#define IXGBE_NETDEV_STAT(m)

static const struct ixgbe_stats ixgbe_gstrings_stats[] =;

/* ixgbe allocates num_tx_queues and num_rx_queues symmetrically so
 * we set the num_rx_queues to evaluate to num_tx_queues. This is
 * used because we do not have a good way to get the max number of
 * rx queues with CONFIG_RPS disabled.
 */
#define IXGBE_NUM_RX_QUEUES

#define IXGBE_QUEUE_STATS_LEN
#define IXGBE_GLOBAL_STATS_LEN
#define IXGBE_PB_STATS_LEN
#define IXGBE_STATS_LEN

static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] =;
#define IXGBE_TEST_LEN

static const char ixgbe_priv_flags_strings[][ETH_GSTRING_LEN] =;

#define IXGBE_PRIV_FLAGS_STR_LEN

#define ixgbe_isbackplane(type)

static void ixgbe_set_supported_10gtypes(struct ixgbe_hw *hw,
					 struct ethtool_link_ksettings *cmd)
{}

static void ixgbe_set_advertising_10gtypes(struct ixgbe_hw *hw,
					   struct ethtool_link_ksettings *cmd)
{}

static int ixgbe_get_link_ksettings(struct net_device *netdev,
				    struct ethtool_link_ksettings *cmd)
{}

static int ixgbe_set_link_ksettings(struct net_device *netdev,
				    const struct ethtool_link_ksettings *cmd)
{}

static void ixgbe_get_pause_stats(struct net_device *netdev,
				  struct ethtool_pause_stats *stats)
{}

static void ixgbe_get_pauseparam(struct net_device *netdev,
				 struct ethtool_pauseparam *pause)
{}

static int ixgbe_set_pauseparam(struct net_device *netdev,
				struct ethtool_pauseparam *pause)
{}

static u32 ixgbe_get_msglevel(struct net_device *netdev)
{}

static void ixgbe_set_msglevel(struct net_device *netdev, u32 data)
{}

static int ixgbe_get_regs_len(struct net_device *netdev)
{}

#define IXGBE_GET_STAT(_A_, _R_)

static void ixgbe_get_regs(struct net_device *netdev,
			   struct ethtool_regs *regs, void *p)
{}

static int ixgbe_get_eeprom_len(struct net_device *netdev)
{}

static int ixgbe_get_eeprom(struct net_device *netdev,
			    struct ethtool_eeprom *eeprom, u8 *bytes)
{}

static int ixgbe_set_eeprom(struct net_device *netdev,
			    struct ethtool_eeprom *eeprom, u8 *bytes)
{}

static void ixgbe_get_drvinfo(struct net_device *netdev,
			      struct ethtool_drvinfo *drvinfo)
{}

static u32 ixgbe_get_max_rxd(struct ixgbe_adapter *adapter)
{}

static u32 ixgbe_get_max_txd(struct ixgbe_adapter *adapter)
{}

static void ixgbe_get_ringparam(struct net_device *netdev,
				struct ethtool_ringparam *ring,
				struct kernel_ethtool_ringparam *kernel_ring,
				struct netlink_ext_ack *extack)
{}

static int ixgbe_set_ringparam(struct net_device *netdev,
			       struct ethtool_ringparam *ring,
			       struct kernel_ethtool_ringparam *kernel_ring,
			       struct netlink_ext_ack *extack)
{}

static int ixgbe_get_sset_count(struct net_device *netdev, int sset)
{}

static void ixgbe_get_ethtool_stats(struct net_device *netdev,
				    struct ethtool_stats *stats, u64 *data)
{}

static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
			      u8 *data)
{}

static int ixgbe_link_test(struct ixgbe_adapter *adapter, u64 *data)
{}

/* ethtool register test data */
struct ixgbe_reg_test {};

/* In the hardware, registers are laid out either singly, in arrays
 * spaced 0x40 bytes apart, or in contiguous tables.  We assume
 * most tests take place on arrays or single registers (handled
 * as a single-element array) and special-case the tables.
 * Table tests are always pattern tests.
 *
 * We also make provision for some required setup steps by specifying
 * registers to be written without any read-back testing.
 */

#define PATTERN_TEST
#define SET_READ_TEST
#define WRITE_NO_TEST
#define TABLE32_TEST
#define TABLE64_TEST_LO
#define TABLE64_TEST_HI

/* default 82599 register test */
static const struct ixgbe_reg_test reg_test_82599[] =;

/* default 82598 register test */
static const struct ixgbe_reg_test reg_test_82598[] =;

static bool reg_pattern_test(struct ixgbe_adapter *adapter, u64 *data, int reg,
			     u32 mask, u32 write)
{}

static bool reg_set_and_check(struct ixgbe_adapter *adapter, u64 *data, int reg,
			      u32 mask, u32 write)
{}

static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data)
{}

static int ixgbe_eeprom_test(struct ixgbe_adapter *adapter, u64 *data)
{}

static irqreturn_t ixgbe_test_intr(int irq, void *data)
{}

static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data)
{}

static void ixgbe_free_desc_rings(struct ixgbe_adapter *adapter)
{}

static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter)
{}

static int ixgbe_setup_loopback_test(struct ixgbe_adapter *adapter)
{}

static void ixgbe_loopback_cleanup(struct ixgbe_adapter *adapter)
{}

static void ixgbe_create_lbtest_frame(struct sk_buff *skb,
				      unsigned int frame_size)
{}

static bool ixgbe_check_lbtest_frame(struct ixgbe_rx_buffer *rx_buffer,
				     unsigned int frame_size)
{}

static u16 ixgbe_clean_test_rings(struct ixgbe_ring *rx_ring,
				  struct ixgbe_ring *tx_ring,
				  unsigned int size)
{}

static int ixgbe_run_loopback_test(struct ixgbe_adapter *adapter)
{}

static int ixgbe_loopback_test(struct ixgbe_adapter *adapter, u64 *data)
{}

static void ixgbe_diag_test(struct net_device *netdev,
			    struct ethtool_test *eth_test, u64 *data)
{}

static int ixgbe_wol_exclusion(struct ixgbe_adapter *adapter,
			       struct ethtool_wolinfo *wol)
{}

static void ixgbe_get_wol(struct net_device *netdev,
			  struct ethtool_wolinfo *wol)
{}

static int ixgbe_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
{}

static int ixgbe_nway_reset(struct net_device *netdev)
{}

static int ixgbe_set_phys_id(struct net_device *netdev,
			     enum ethtool_phys_id_state state)
{}

static int ixgbe_get_coalesce(struct net_device *netdev,
			      struct ethtool_coalesce *ec,
			      struct kernel_ethtool_coalesce *kernel_coal,
			      struct netlink_ext_ack *extack)
{}

/*
 * this function must be called before setting the new value of
 * rx_itr_setting
 */
static bool ixgbe_update_rsc(struct ixgbe_adapter *adapter)
{}

static int ixgbe_set_coalesce(struct net_device *netdev,
			      struct ethtool_coalesce *ec,
			      struct kernel_ethtool_coalesce *kernel_coal,
			      struct netlink_ext_ack *extack)
{}

static int ixgbe_get_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
					struct ethtool_rxnfc *cmd)
{}

static int ixgbe_get_ethtool_fdir_all(struct ixgbe_adapter *adapter,
				      struct ethtool_rxnfc *cmd,
				      u32 *rule_locs)
{}

static int ixgbe_get_rss_hash_opts(struct ixgbe_adapter *adapter,
				   struct ethtool_rxnfc *cmd)
{}

static int ixgbe_rss_indir_tbl_max(struct ixgbe_adapter *adapter)
{}

static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
			   u32 *rule_locs)
{}

int ixgbe_update_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
				    struct ixgbe_fdir_filter *input,
				    u16 sw_idx)
{}

static int ixgbe_flowspec_to_flow_type(struct ethtool_rx_flow_spec *fsp,
				       u8 *flow_type)
{}

static int ixgbe_add_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
					struct ethtool_rxnfc *cmd)
{}

static int ixgbe_del_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
					struct ethtool_rxnfc *cmd)
{}

#define UDP_RSS_FLAGS
static int ixgbe_set_rss_hash_opt(struct ixgbe_adapter *adapter,
				  struct ethtool_rxnfc *nfc)
{}

static int ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
{}

static u32 ixgbe_get_rxfh_key_size(struct net_device *netdev)
{}

static u32 ixgbe_rss_indir_size(struct net_device *netdev)
{}

static void ixgbe_get_reta(struct ixgbe_adapter *adapter, u32 *indir)
{}

static int ixgbe_get_rxfh(struct net_device *netdev,
			  struct ethtool_rxfh_param *rxfh)
{}

static int ixgbe_set_rxfh(struct net_device *netdev,
			  struct ethtool_rxfh_param *rxfh,
			  struct netlink_ext_ack *extack)
{}

static int ixgbe_get_ts_info(struct net_device *dev,
			     struct kernel_ethtool_ts_info *info)
{}

static unsigned int ixgbe_max_channels(struct ixgbe_adapter *adapter)
{}

static void ixgbe_get_channels(struct net_device *dev,
			       struct ethtool_channels *ch)
{}

static int ixgbe_set_channels(struct net_device *dev,
			      struct ethtool_channels *ch)
{}

static int ixgbe_get_module_info(struct net_device *dev,
				       struct ethtool_modinfo *modinfo)
{}

static int ixgbe_get_module_eeprom(struct net_device *dev,
					 struct ethtool_eeprom *ee,
					 u8 *data)
{}

static const struct {} ixgbe_ls_map[] =;

static const struct {} ixgbe_lp_map[] =;

static int
ixgbe_get_eee_fw(struct ixgbe_adapter *adapter, struct ethtool_keee *edata)
{}

static int ixgbe_get_eee(struct net_device *netdev, struct ethtool_keee *edata)
{}

static int ixgbe_set_eee(struct net_device *netdev, struct ethtool_keee *edata)
{}

static u32 ixgbe_get_priv_flags(struct net_device *netdev)
{}

static int ixgbe_set_priv_flags(struct net_device *netdev, u32 priv_flags)
{}

static const struct ethtool_ops ixgbe_ethtool_ops =;

void ixgbe_set_ethtool_ops(struct net_device *netdev)
{}