linux_dsm_epyc7002/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.h
Ioana Radulescu 091a19ea6e dpaa2-eth: add debugfs statistics
Export detailed driver counters through debugfs.

Statistics already available in ethtool are presented in a
structured manner. Includes per-core, per-FQ and per-channel statistics.

Also transition from module_fsl_mc_driver to explicit module_init/exit
in order to create the debugfs directory besides registering the driver.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-19 10:28:43 -08:00

32 lines
853 B
C

/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
/* Copyright 2015 Freescale Semiconductor Inc.
* Copyright 2018-2019 NXP
*/
#ifndef DPAA2_ETH_DEBUGFS_H
#define DPAA2_ETH_DEBUGFS_H
#include <linux/dcache.h>
struct dpaa2_eth_priv;
struct dpaa2_debugfs {
struct dentry *dir;
struct dentry *fq_stats;
struct dentry *ch_stats;
struct dentry *cpu_stats;
};
#ifdef CONFIG_DEBUG_FS
void dpaa2_eth_dbg_init(void);
void dpaa2_eth_dbg_exit(void);
void dpaa2_dbg_add(struct dpaa2_eth_priv *priv);
void dpaa2_dbg_remove(struct dpaa2_eth_priv *priv);
#else
static inline void dpaa2_eth_dbg_init(void) {}
static inline void dpaa2_eth_dbg_exit(void) {}
static inline void dpaa2_dbg_add(struct dpaa2_eth_priv *priv) {}
static inline void dpaa2_dbg_remove(struct dpaa2_eth_priv *priv) {}
#endif /* CONFIG_DEBUG_FS */
#endif /* DPAA2_ETH_DEBUGFS_H */