linux/drivers/net/ethernet/sfc/siena/ethtool_common.c

// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
 * Driver for Solarflare network controllers and boards
 * Copyright 2019 Solarflare Communications Inc.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation, incorporated herein by reference.
 */
#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 {};

/* Initialiser for a struct efx_sw_stat_desc with type-checking */
#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_siena_ethtool_get_drvinfo(struct net_device *net_dev,
				   struct ethtool_drvinfo *info)
{}

u32 efx_siena_ethtool_get_msglevel(struct net_device *net_dev)
{}

void efx_siena_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable)
{}

void efx_siena_ethtool_get_pauseparam(struct net_device *net_dev,
				      struct ethtool_pauseparam *pause)
{}

int efx_siena_ethtool_set_pauseparam(struct net_device *net_dev,
				     struct ethtool_pauseparam *pause)
{}

/**
 * efx_fill_test - fill in an individual self-test entry
 * @test_index:		Index of the test
 * @strings:		Ethtool strings, or %NULL
 * @data:		Ethtool test results, or %NULL
 * @test:		Pointer to test result (used only if data != %NULL)
 * @unit_format:	Unit name format (e.g. "chan\%d")
 * @unit_id:		Unit id (e.g. 0 for "chan0")
 * @test_format:	Test name format (e.g. "loopback.\%s.tx.sent")
 * @test_id:		Test id (e.g. "PHYXS" for "loopback.PHYXS.tx_sent")
 *
 * Fill in an individual self-test entry.
 */
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)

/**
 * efx_fill_loopback_test - fill in a block of loopback self-test entries
 * @efx:		Efx NIC
 * @lb_tests:		Efx loopback self-test results structure
 * @mode:		Loopback test mode
 * @test_index:		Starting index of the test
 * @strings:		Ethtool strings, or %NULL
 * @data:		Ethtool test results, or %NULL
 *
 * Fill in a block of loopback self-test entries.  Return new test
 * index.
 */
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)
{}

/**
 * efx_ethtool_fill_self_tests - get self-test details
 * @efx:		Efx NIC
 * @tests:		Efx self-test results structure, or %NULL
 * @strings:		Ethtool strings, or %NULL
 * @data:		Ethtool test results, or %NULL
 *
 * Get self-test number of strings, strings, and/or test results.
 * Return number of strings (== number of test results).
 *
 * The reason for merging these three functions is to make sure that
 * they can never be inconsistent.
 */
static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
				       struct efx_self_tests *tests,
				       u8 *strings, u64 *data)
{}

void efx_siena_ethtool_self_test(struct net_device *net_dev,
				 struct ethtool_test *test, u64 *data)
{}

static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
{}

int efx_siena_ethtool_get_sset_count(struct net_device *net_dev, int string_set)
{}

void efx_siena_ethtool_get_strings(struct net_device *net_dev,
				   u32 string_set, u8 *strings)
{}

void efx_siena_ethtool_get_stats(struct net_device *net_dev,
				 struct ethtool_stats *stats,
				 u64 *data)
{}

/* This must be called with rtnl_lock held. */
int efx_siena_ethtool_get_link_ksettings(struct net_device *net_dev,
					 struct ethtool_link_ksettings *cmd)
{}

/* This must be called with rtnl_lock held. */
int
efx_siena_ethtool_set_link_ksettings(struct net_device *net_dev,
				     const struct ethtool_link_ksettings *cmd)
{}

int efx_siena_ethtool_get_fecparam(struct net_device *net_dev,
				   struct ethtool_fecparam *fecparam)
{}

int efx_siena_ethtool_set_fecparam(struct net_device *net_dev,
				   struct ethtool_fecparam *fecparam)
{}

/* MAC address mask including only I/G bit */
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_siena_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_siena_ethtool_set_rxnfc(struct net_device *net_dev,
				struct ethtool_rxnfc *info)
{}

u32 efx_siena_ethtool_get_rxfh_indir_size(struct net_device *net_dev)
{}

u32 efx_siena_ethtool_get_rxfh_key_size(struct net_device *net_dev)
{}

int efx_siena_ethtool_get_rxfh(struct net_device *net_dev,
			       struct ethtool_rxfh_param *rxfh)
{}

int efx_siena_ethtool_set_rxfh(struct net_device *net_dev,
			       struct ethtool_rxfh_param *rxfh,
			       struct netlink_ext_ack *extack)
{}

int efx_siena_ethtool_reset(struct net_device *net_dev, u32 *flags)
{}

int efx_siena_ethtool_get_module_eeprom(struct net_device *net_dev,
					struct ethtool_eeprom *ee,
					u8 *data)
{}

int efx_siena_ethtool_get_module_info(struct net_device *net_dev,
				      struct ethtool_modinfo *modinfo)
{}