#include <linux/debugfs.h>
#include <linux/device.h>
#include "hnae3.h"
#include "hns3_debugfs.h"
#include "hns3_enet.h"
static struct dentry *hns3_dbgfs_root;
static struct hns3_dbg_dentry_info hns3_dbg_dentry[] = …;
static int hns3_dbg_bd_file_init(struct hnae3_handle *handle, u32 cmd);
static int hns3_dbg_common_file_init(struct hnae3_handle *handle, u32 cmd);
static struct hns3_dbg_cmd_info hns3_dbg_cmd[] = …;
static struct hns3_dbg_cap_info hns3_dbg_cap[] = …;
static const struct hns3_dbg_item coal_info_items[] = …;
static const char * const dim_cqe_mode_str[] = …;
static const char * const dim_state_str[] = …;
static const char * const
dim_tune_stat_str[] = …;
static void hns3_dbg_fill_content(char *content, u16 len,
const struct hns3_dbg_item *items,
const char **result, u16 size)
{ … }
static void hns3_get_coal_info(struct hns3_enet_tqp_vector *tqp_vector,
char **result, int i, bool is_tx)
{ … }
static void hns3_dump_coal_info(struct hnae3_handle *h, char *buf, int len,
int *pos, bool is_tx)
{ … }
static int hns3_dbg_coal_info(struct hnae3_handle *h, char *buf, int len)
{ … }
static const struct hns3_dbg_item tx_spare_info_items[] = …;
static void hns3_dbg_tx_spare_info(struct hns3_enet_ring *ring, char *buf,
int len, u32 ring_num, int *pos)
{ … }
static const struct hns3_dbg_item rx_queue_info_items[] = …;
static void hns3_dump_rx_queue_info(struct hns3_enet_ring *ring,
struct hnae3_ae_dev *ae_dev, char **result,
u32 index)
{ … }
static int hns3_dbg_rx_queue_info(struct hnae3_handle *h,
char *buf, int len)
{ … }
static const struct hns3_dbg_item tx_queue_info_items[] = …;
static void hns3_dump_tx_queue_info(struct hns3_enet_ring *ring,
struct hnae3_ae_dev *ae_dev, char **result,
u32 index)
{ … }
static int hns3_dbg_tx_queue_info(struct hnae3_handle *h,
char *buf, int len)
{ … }
static const struct hns3_dbg_item queue_map_items[] = …;
static int hns3_dbg_queue_map(struct hnae3_handle *h, char *buf, int len)
{ … }
static const struct hns3_dbg_item rx_bd_info_items[] = …;
static void hns3_dump_rx_bd_info(struct hns3_nic_priv *priv,
struct hns3_desc *desc, char **result, int idx)
{ … }
static int hns3_dbg_rx_bd_info(struct hns3_dbg_data *d, char *buf, int len)
{ … }
static const struct hns3_dbg_item tx_bd_info_items[] = …;
static void hns3_dump_tx_bd_info(struct hns3_desc *desc, char **result, int idx)
{ … }
static int hns3_dbg_tx_bd_info(struct hns3_dbg_data *d, char *buf, int len)
{ … }
static void
hns3_dbg_dev_caps(struct hnae3_handle *h, char *buf, int len, int *pos)
{ … }
static void
hns3_dbg_dev_specs(struct hnae3_handle *h, char *buf, int len, int *pos)
{ … }
static int hns3_dbg_dev_info(struct hnae3_handle *h, char *buf, int len)
{ … }
static const struct hns3_dbg_item page_pool_info_items[] = …;
static void hns3_dump_page_pool_info(struct hns3_enet_ring *ring,
char **result, u32 index)
{ … }
static int
hns3_dbg_page_pool_info(struct hnae3_handle *h, char *buf, int len)
{ … }
static int hns3_dbg_get_cmd_index(struct hns3_dbg_data *dbg_data, u32 *index)
{ … }
static const struct hns3_dbg_func hns3_dbg_cmd_func[] = …;
static int hns3_dbg_read_cmd(struct hns3_dbg_data *dbg_data,
enum hnae3_dbg_cmd cmd, char *buf, int len)
{ … }
static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations hns3_dbg_fops = …;
static int hns3_dbg_bd_file_init(struct hnae3_handle *handle, u32 cmd)
{ … }
static int
hns3_dbg_common_file_init(struct hnae3_handle *handle, u32 cmd)
{ … }
int hns3_dbg_init(struct hnae3_handle *handle)
{ … }
void hns3_dbg_uninit(struct hnae3_handle *handle)
{ … }
void hns3_dbg_register_debugfs(const char *debugfs_dir_name)
{ … }
void hns3_dbg_unregister_debugfs(void)
{ … }