linux/drivers/net/ethernet/google/gve/gve_ethtool.c

// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Google virtual Ethernet (gve) driver
 *
 * Copyright (C) 2015-2024 Google LLC
 */

#include <linux/rtnetlink.h>
#include "gve.h"
#include "gve_adminq.h"
#include "gve_dqo.h"
#include "gve_utils.h"

static void gve_get_drvinfo(struct net_device *netdev,
			    struct ethtool_drvinfo *info)
{}

static void gve_set_msglevel(struct net_device *netdev, u32 value)
{}

static u32 gve_get_msglevel(struct net_device *netdev)
{}

/* For the following stats column string names, make sure the order
 * matches how it is filled in the code. For xdp_aborted, xdp_drop,
 * xdp_pass, xdp_tx, xdp_redirect, make sure it also matches the order
 * as declared in enum xdp_action inside file uapi/linux/bpf.h .
 */
static const char gve_gstrings_main_stats[][ETH_GSTRING_LEN] =;

static const char gve_gstrings_rx_stats[][ETH_GSTRING_LEN] =;

static const char gve_gstrings_tx_stats[][ETH_GSTRING_LEN] =;

static const char gve_gstrings_adminq_stats[][ETH_GSTRING_LEN] =;

static const char gve_gstrings_priv_flags[][ETH_GSTRING_LEN] =;

#define GVE_MAIN_STATS_LEN
#define GVE_ADMINQ_STATS_LEN
#define NUM_GVE_TX_CNTS
#define NUM_GVE_RX_CNTS
#define GVE_PRIV_FLAGS_STR_LEN

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

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

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

static void gve_get_channels(struct net_device *netdev,
			     struct ethtool_channels *cmd)
{}

static int gve_set_channels(struct net_device *netdev,
			    struct ethtool_channels *cmd)
{}

static void gve_get_ringparam(struct net_device *netdev,
			      struct ethtool_ringparam *cmd,
			      struct kernel_ethtool_ringparam *kernel_cmd,
			      struct netlink_ext_ack *extack)
{}

static int gve_adjust_ring_sizes(struct gve_priv *priv,
				 u16 new_tx_desc_cnt,
				 u16 new_rx_desc_cnt)
{}

static int gve_validate_req_ring_size(struct gve_priv *priv, u16 new_tx_desc_cnt,
				      u16 new_rx_desc_cnt)
{}

static int gve_set_ringparam(struct net_device *netdev,
			     struct ethtool_ringparam *cmd,
			     struct kernel_ethtool_ringparam *kernel_cmd,
			     struct netlink_ext_ack *extack)
{}

static int gve_user_reset(struct net_device *netdev, u32 *flags)
{}

static int gve_get_tunable(struct net_device *netdev,
			   const struct ethtool_tunable *etuna, void *value)
{}

static int gve_set_tunable(struct net_device *netdev,
			   const struct ethtool_tunable *etuna,
			   const void *value)
{}

static u32 gve_get_priv_flags(struct net_device *netdev)
{}

static int gve_set_priv_flags(struct net_device *netdev, u32 flags)
{}

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

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

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

static int gve_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd)
{}

static int gve_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd, u32 *rule_locs)
{}

const struct ethtool_ops gve_ethtool_ops =;