#define pr_fmt(fmt) …
#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/if_vlan.h>
#include <linux/uaccess.h>
#include "ixgbevf.h"
enum { … };
struct ixgbe_stats { … };
#define IXGBEVF_STAT(_name, _stat) …
#define IXGBEVF_NETDEV_STAT(_net_stat) …
static struct ixgbe_stats ixgbevf_gstrings_stats[] = …;
#define IXGBEVF_QUEUE_STATS_LEN …
#define IXGBEVF_GLOBAL_STATS_LEN …
#define IXGBEVF_STATS_LEN …
static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = …;
#define IXGBEVF_TEST_LEN …
static const char ixgbevf_priv_flags_strings[][ETH_GSTRING_LEN] = …;
#define IXGBEVF_PRIV_FLAGS_STR_LEN …
static int ixgbevf_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *cmd)
{ … }
static u32 ixgbevf_get_msglevel(struct net_device *netdev)
{ … }
static void ixgbevf_set_msglevel(struct net_device *netdev, u32 data)
{ … }
static int ixgbevf_get_regs_len(struct net_device *netdev)
{ … }
static void ixgbevf_get_regs(struct net_device *netdev,
struct ethtool_regs *regs,
void *p)
{ … }
static void ixgbevf_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *drvinfo)
{ … }
static void ixgbevf_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int ixgbevf_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
{ … }
static int ixgbevf_get_sset_count(struct net_device *netdev, int stringset)
{ … }
static void ixgbevf_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, u64 *data)
{ … }
static void ixgbevf_get_strings(struct net_device *netdev, u32 stringset,
u8 *data)
{ … }
static int ixgbevf_link_test(struct ixgbevf_adapter *adapter, u64 *data)
{ … }
struct ixgbevf_reg_test { … };
#define PATTERN_TEST …
#define SET_READ_TEST …
#define WRITE_NO_TEST …
#define TABLE32_TEST …
#define TABLE64_TEST_LO …
#define TABLE64_TEST_HI …
static const struct ixgbevf_reg_test reg_test_vf[] = …;
static const u32 register_test_patterns[] = …;
static bool reg_pattern_test(struct ixgbevf_adapter *adapter, u64 *data,
int reg, u32 mask, u32 write)
{ … }
static bool reg_set_and_check(struct ixgbevf_adapter *adapter, u64 *data,
int reg, u32 mask, u32 write)
{ … }
static int ixgbevf_reg_test(struct ixgbevf_adapter *adapter, u64 *data)
{ … }
static void ixgbevf_diag_test(struct net_device *netdev,
struct ethtool_test *eth_test, u64 *data)
{ … }
static int ixgbevf_nway_reset(struct net_device *netdev)
{ … }
static int ixgbevf_get_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int ixgbevf_set_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int ixgbevf_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
u32 *rules __always_unused)
{ … }
static u32 ixgbevf_get_rxfh_indir_size(struct net_device *netdev)
{ … }
static u32 ixgbevf_get_rxfh_key_size(struct net_device *netdev)
{ … }
static int ixgbevf_get_rxfh(struct net_device *netdev,
struct ethtool_rxfh_param *rxfh)
{ … }
static u32 ixgbevf_get_priv_flags(struct net_device *netdev)
{ … }
static int ixgbevf_set_priv_flags(struct net_device *netdev, u32 priv_flags)
{ … }
static const struct ethtool_ops ixgbevf_ethtool_ops = …;
void ixgbevf_set_ethtool_ops(struct net_device *netdev)
{ … }