#include <linux/module.h>
#include <linux/netdevice.h>
#include "net_driver.h"
#include "mcdi.h"
#include "nic.h"
#include "selftest.h"
#include "rx_common.h"
#include "ethtool_common.h"
#include "mcdi_port_common.h"
struct efx_sw_stat_desc { … };
#define EFX_ETHTOOL_STAT(stat_name, source_name, field, field_type, \
get_stat_function) …
static u64 efx_get_uint_stat(void *field)
{ … }
static u64 efx_get_atomic_stat(void *field)
{ … }
#define EFX_ETHTOOL_ATOMIC_NIC_ERROR_STAT(field) …
#define EFX_ETHTOOL_UINT_CHANNEL_STAT(field) …
#define EFX_ETHTOOL_UINT_CHANNEL_STAT_NO_N(field) …
#define EFX_ETHTOOL_UINT_TXQ_STAT(field) …
static const struct efx_sw_stat_desc efx_sw_stat_desc[] = …;
#define EFX_ETHTOOL_SW_STAT_COUNT …
void efx_ethtool_get_drvinfo(struct net_device *net_dev,
struct ethtool_drvinfo *info)
{ … }
u32 efx_ethtool_get_msglevel(struct net_device *net_dev)
{ … }
void efx_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable)
{ … }
void efx_ethtool_self_test(struct net_device *net_dev,
struct ethtool_test *test, u64 *data)
{ … }
void efx_ethtool_get_pauseparam(struct net_device *net_dev,
struct ethtool_pauseparam *pause)
{ … }
int efx_ethtool_set_pauseparam(struct net_device *net_dev,
struct ethtool_pauseparam *pause)
{ … }
static void efx_fill_test(unsigned int test_index, u8 *strings, u64 *data,
int *test, const char *unit_format, int unit_id,
const char *test_format, const char *test_id)
{ … }
#define EFX_CHANNEL_NAME(_channel) …
#define EFX_TX_QUEUE_NAME(_tx_queue) …
#define EFX_LOOPBACK_NAME(_mode, _counter) …
static int efx_fill_loopback_test(struct efx_nic *efx,
struct efx_loopback_self_tests *lb_tests,
enum efx_loopback_mode mode,
unsigned int test_index,
u8 *strings, u64 *data)
{ … }
int efx_ethtool_fill_self_tests(struct efx_nic *efx,
struct efx_self_tests *tests,
u8 *strings, u64 *data)
{ … }
static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
{ … }
int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set)
{ … }
void efx_ethtool_get_strings(struct net_device *net_dev,
u32 string_set, u8 *strings)
{ … }
void efx_ethtool_get_stats(struct net_device *net_dev,
struct ethtool_stats *stats,
u64 *data)
{ … }
int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
struct ethtool_link_ksettings *cmd)
{ … }
int efx_ethtool_set_link_ksettings(struct net_device *net_dev,
const struct ethtool_link_ksettings *cmd)
{ … }
int efx_ethtool_get_fecparam(struct net_device *net_dev,
struct ethtool_fecparam *fecparam)
{ … }
int efx_ethtool_set_fecparam(struct net_device *net_dev,
struct ethtool_fecparam *fecparam)
{ … }
static const u8 mac_addr_ig_mask[ETH_ALEN] __aligned(2) = …;
#define IP4_ADDR_FULL_MASK …
#define IP_PROTO_FULL_MASK …
#define PORT_FULL_MASK …
#define ETHER_TYPE_FULL_MASK …
static inline void ip6_fill_mask(__be32 *mask)
{ … }
static int efx_ethtool_get_class_rule(struct efx_nic *efx,
struct ethtool_rx_flow_spec *rule,
u32 *rss_context)
{ … }
int efx_ethtool_get_rxnfc(struct net_device *net_dev,
struct ethtool_rxnfc *info, u32 *rule_locs)
{ … }
static inline bool ip6_mask_is_full(__be32 mask[4])
{ … }
static inline bool ip6_mask_is_empty(__be32 mask[4])
{ … }
static int efx_ethtool_set_class_rule(struct efx_nic *efx,
struct ethtool_rx_flow_spec *rule,
u32 rss_context)
{ … }
int efx_ethtool_set_rxnfc(struct net_device *net_dev,
struct ethtool_rxnfc *info)
{ … }
u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev)
{ … }
u32 efx_ethtool_get_rxfh_key_size(struct net_device *net_dev)
{ … }
int efx_ethtool_get_rxfh(struct net_device *net_dev,
struct ethtool_rxfh_param *rxfh)
{ … }
int efx_ethtool_modify_rxfh_context(struct net_device *net_dev,
struct ethtool_rxfh_context *ctx,
const struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
int efx_ethtool_create_rxfh_context(struct net_device *net_dev,
struct ethtool_rxfh_context *ctx,
const struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
int efx_ethtool_remove_rxfh_context(struct net_device *net_dev,
struct ethtool_rxfh_context *ctx,
u32 rss_context,
struct netlink_ext_ack *extack)
{ … }
int efx_ethtool_set_rxfh(struct net_device *net_dev,
struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
int efx_ethtool_reset(struct net_device *net_dev, u32 *flags)
{ … }
int efx_ethtool_get_module_eeprom(struct net_device *net_dev,
struct ethtool_eeprom *ee,
u8 *data)
{ … }
int efx_ethtool_get_module_info(struct net_device *net_dev,
struct ethtool_modinfo *modinfo)
{ … }