linux/drivers/net/netdevsim/hwstats.c

// SPDX-License-Identifier: GPL-2.0

#include <linux/debugfs.h>

#include "netdevsim.h"

#define NSIM_DEV_HWSTATS_TRAFFIC_MS

static struct list_head *
nsim_dev_hwstats_get_list_head(struct nsim_dev_hwstats *hwstats,
			       enum netdev_offload_xstats_type type)
{}

static void nsim_dev_hwstats_traffic_bump(struct nsim_dev_hwstats *hwstats,
					  enum netdev_offload_xstats_type type)
{}

static void nsim_dev_hwstats_traffic_work(struct work_struct *work)
{}

static struct nsim_dev_hwstats_netdev *
nsim_dev_hwslist_find_hwsdev(struct list_head *hwsdev_list,
			     int ifindex)
{}

static int nsim_dev_hwsdev_enable(struct nsim_dev_hwstats_netdev *hwsdev,
				  struct netlink_ext_ack *extack)
{}

static void nsim_dev_hwsdev_disable(struct nsim_dev_hwstats_netdev *hwsdev)
{}

static int
nsim_dev_hwsdev_report_delta(struct nsim_dev_hwstats_netdev *hwsdev,
			     struct netdev_notifier_offload_xstats_info *info)
{}

static void
nsim_dev_hwsdev_report_used(struct nsim_dev_hwstats_netdev *hwsdev,
			    struct netdev_notifier_offload_xstats_info *info)
{}

static int nsim_dev_hwstats_event_off_xstats(struct nsim_dev_hwstats *hwstats,
					     struct net_device *dev,
					     unsigned long event, void *ptr)
{}

static void nsim_dev_hwsdev_fini(struct nsim_dev_hwstats_netdev *hwsdev)
{}

static void
__nsim_dev_hwstats_event_unregister(struct nsim_dev_hwstats *hwstats,
				    struct net_device *dev,
				    enum netdev_offload_xstats_type type)
{}

static void nsim_dev_hwstats_event_unregister(struct nsim_dev_hwstats *hwstats,
					      struct net_device *dev)
{}

static int nsim_dev_hwstats_event(struct nsim_dev_hwstats *hwstats,
				  struct net_device *dev,
				  unsigned long event, void *ptr)
{}

static int nsim_dev_netdevice_event(struct notifier_block *nb,
				    unsigned long event, void *ptr)
{}

static int
nsim_dev_hwstats_enable_ifindex(struct nsim_dev_hwstats *hwstats,
				int ifindex,
				enum netdev_offload_xstats_type type,
				struct list_head *hwsdev_list)
{}

static int
nsim_dev_hwstats_disable_ifindex(struct nsim_dev_hwstats *hwstats,
				 int ifindex,
				 enum netdev_offload_xstats_type type,
				 struct list_head *hwsdev_list)
{}

static int
nsim_dev_hwstats_fail_ifindex(struct nsim_dev_hwstats *hwstats,
			      int ifindex,
			      enum netdev_offload_xstats_type type,
			      struct list_head *hwsdev_list)
{}

enum nsim_dev_hwstats_do {};

struct nsim_dev_hwstats_fops {};

static ssize_t
nsim_dev_hwstats_do_write(struct file *file,
			  const char __user *data,
			  size_t count, loff_t *ppos)
{}

#define NSIM_DEV_HWSTATS_FOPS

static const struct nsim_dev_hwstats_fops nsim_dev_hwstats_l3_disable_fops =;

static const struct nsim_dev_hwstats_fops nsim_dev_hwstats_l3_enable_fops =;

static const struct nsim_dev_hwstats_fops nsim_dev_hwstats_l3_fail_fops =;

#undef NSIM_DEV_HWSTATS_FOPS

int nsim_dev_hwstats_init(struct nsim_dev *nsim_dev)
{}

static void nsim_dev_hwsdev_list_wipe(struct nsim_dev_hwstats *hwstats,
				      enum netdev_offload_xstats_type type)
{}

void nsim_dev_hwstats_exit(struct nsim_dev *nsim_dev)
{}