linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c

// SPDX-License-Identifier: GPL-2.0+
/* Copyright (c) 2018-2019 Hisilicon Limited. */

#include <linux/device.h>
#include <linux/sched/clock.h>

#include "hclge_debugfs.h"
#include "hclge_err.h"
#include "hclge_main.h"
#include "hclge_regs.h"
#include "hclge_tm.h"
#include "hnae3.h"

static const char * const state_str[] =;
static const char * const hclge_mac_state_str[] =;

static const char * const tc_map_mode_str[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_bios_common_reg[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_ssu_reg_0[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_ssu_reg_1[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_ssu_reg_2[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_igu_egu_reg[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_rpu_reg_0[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_rpu_reg_1[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_ncsi_reg[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_rtc_reg[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_ppp_reg[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_rcb_reg[] =;

static const struct hclge_dbg_dfx_message hclge_dbg_tqp_reg[] =;

static const struct hclge_dbg_reg_type_info hclge_dbg_reg_info[] =;

/* make sure: len(name) + interval >= maxlen(item data) + 2,
 * for example, name = "pkt_num"(len: 7), the prototype of item data is u32,
 * and print as "%u"(maxlen: 10), so the interval should be at least 5.
 */
static void hclge_dbg_fill_content(char *content, u16 len,
				   const struct hclge_dbg_item *items,
				   const char **result, u16 size)
{}

static char *hclge_dbg_get_func_id_str(char *buf, u8 id)
{}

static int hclge_dbg_get_dfx_bd_num(struct hclge_dev *hdev, int offset,
				    u32 *bd_num)
{}

int hclge_dbg_cmd_send(struct hclge_dev *hdev, struct hclge_desc *desc_src,
		       int index, int bd_num, enum hclge_opcode_type cmd)
{}

static int
hclge_dbg_dump_reg_tqp(struct hclge_dev *hdev,
		       const struct hclge_dbg_reg_type_info *reg_info,
		       char *buf, int len, int *pos)
{}

static int
hclge_dbg_dump_reg_common(struct hclge_dev *hdev,
			  const struct hclge_dbg_reg_type_info *reg_info,
			  char *buf, int len, int *pos)
{}

static const struct hclge_dbg_status_dfx_info hclge_dbg_mac_en_status[] =;

static int  hclge_dbg_dump_mac_enable_status(struct hclge_dev *hdev, char *buf,
					     int len, int *pos)
{}

static int hclge_dbg_dump_mac_frame_size(struct hclge_dev *hdev, char *buf,
					 int len, int *pos)
{}

static int hclge_dbg_dump_mac_speed_duplex(struct hclge_dev *hdev, char *buf,
					   int len, int *pos)
{}

static int hclge_dbg_dump_mac(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_dcb_qset(struct hclge_dev *hdev, char *buf, int len,
				   int *pos)
{}

static int hclge_dbg_dump_dcb_pri(struct hclge_dev *hdev, char *buf, int len,
				  int *pos)
{}

static int hclge_dbg_dump_dcb_pg(struct hclge_dev *hdev, char *buf, int len,
				 int *pos)
{}

static int hclge_dbg_dump_dcb_queue(struct hclge_dev *hdev, char *buf, int len,
				    int *pos)
{}

static int hclge_dbg_dump_dcb_port(struct hclge_dev *hdev, char *buf, int len,
				   int *pos)
{}

static int hclge_dbg_dump_dcb_tm(struct hclge_dev *hdev, char *buf, int len,
				 int *pos)
{}

static int hclge_dbg_dump_dcb(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_reg_cmd(struct hclge_dev *hdev,
				  enum hnae3_dbg_cmd cmd, char *buf, int len)
{}

static int hclge_dbg_dump_tc(struct hclge_dev *hdev, char *buf, int len)
{}

static const struct hclge_dbg_item tm_pg_items[] =;

static void hclge_dbg_fill_shaper_content(struct hclge_tm_shaper_para *para,
					  char **result, u8 *index)
{}

static int __hclge_dbg_dump_tm_pg(struct hclge_dev *hdev, char *data_str,
				  char *buf, int len)
{}

static int hclge_dbg_dump_tm_pg(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_tm_port(struct hclge_dev *hdev,  char *buf, int len)
{}

static int hclge_dbg_dump_tm_bp_qset_map(struct hclge_dev *hdev, u8 tc_id,
					 char *buf, int len)
{}

static int hclge_dbg_dump_tm_map(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_tm_nodes(struct hclge_dev *hdev, char *buf, int len)
{}

static const struct hclge_dbg_item tm_pri_items[] =;

static int hclge_dbg_dump_tm_pri(struct hclge_dev *hdev, char *buf, int len)
{}

static const struct hclge_dbg_item tm_qset_items[] =;

static int hclge_dbg_dump_tm_qset(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_qos_pause_cfg(struct hclge_dev *hdev, char *buf,
					int len)
{}

#define HCLGE_DBG_TC_MASK

static int hclge_dbg_dump_qos_pri_map(struct hclge_dev *hdev, char *buf,
				      int len)
{}

static int hclge_dbg_dump_qos_dscp_map(struct hclge_dev *hdev, char *buf,
				       int len)
{}

static int hclge_dbg_dump_tx_buf_cfg(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_rx_priv_buf_cfg(struct hclge_dev *hdev, char *buf,
					  int len)
{}

static int hclge_dbg_dump_rx_common_wl_cfg(struct hclge_dev *hdev, char *buf,
					   int len)
{}

static int hclge_dbg_dump_rx_global_pkt_cnt(struct hclge_dev *hdev, char *buf,
					    int len)
{}

static int hclge_dbg_dump_rx_priv_wl_buf_cfg(struct hclge_dev *hdev, char *buf,
					     int len)
{}

static int hclge_dbg_dump_rx_common_threshold_cfg(struct hclge_dev *hdev,
						  char *buf, int len)
{}

static int hclge_dbg_dump_qos_buf_cfg(struct hclge_dev *hdev, char *buf,
				      int len)
{}

static int hclge_dbg_dump_mng_table(struct hclge_dev *hdev, char *buf, int len)
{}

#define HCLGE_DBG_TCAM_BUF_SIZE

static int hclge_dbg_fd_tcam_read(struct hclge_dev *hdev, bool sel_x,
				  char *tcam_buf,
				  struct hclge_dbg_tcam_msg tcam_msg)
{}

static int hclge_dbg_get_rules_location(struct hclge_dev *hdev, u16 *rule_locs)
{}

static int hclge_dbg_dump_fd_tcam(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_fd_counter(struct hclge_dev *hdev, char *buf, int len)
{}

static const struct hclge_dbg_status_dfx_info hclge_dbg_rst_info[] =;

int hclge_dbg_dump_rst_info(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_serv_info(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_interrupt(struct hclge_dev *hdev, char *buf, int len)
{}

static void hclge_dbg_imp_info_data_print(struct hclge_desc *desc_src,
					  char *buf, int len, u32 bd_num)
{}

static int
hclge_dbg_get_imp_stats_info(struct hclge_dev *hdev, char *buf, int len)
{}

#define HCLGE_CMD_NCL_CONFIG_BD_NUM
#define HCLGE_MAX_NCL_CONFIG_LENGTH

static void hclge_ncl_config_data_print(struct hclge_desc *desc, int *index,
					char *buf, int len, int *pos)
{}

static int
hclge_dbg_dump_ncl_config(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_loopback(struct hclge_dev *hdev, char *buf, int len)
{}

/* hclge_dbg_dump_mac_tnl_status: print message about mac tnl interrupt
 * @hdev: pointer to struct hclge_dev
 */
static int
hclge_dbg_dump_mac_tnl_status(struct hclge_dev *hdev, char *buf, int len)
{}


static const struct hclge_dbg_item mac_list_items[] =;

static void hclge_dbg_dump_mac_list(struct hclge_dev *hdev, char *buf, int len,
				    bool is_unicast)
{}

static int hclge_dbg_dump_umv_info(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_get_vlan_rx_offload_cfg(struct hclge_dev *hdev, u8 vf_id,
					 struct hclge_dbg_vlan_cfg *vlan_cfg)
{}

static int hclge_get_vlan_tx_offload_cfg(struct hclge_dev *hdev, u8 vf_id,
					 struct hclge_dbg_vlan_cfg *vlan_cfg)
{}

static int hclge_get_vlan_filter_config_cmd(struct hclge_dev *hdev,
					    u8 vlan_type, u8 vf_id,
					    struct hclge_desc *desc)
{}

static int hclge_get_vlan_filter_state(struct hclge_dev *hdev, u8 vlan_type,
				       u8 vf_id, u8 *vlan_fe)
{}

static int hclge_get_port_vlan_filter_bypass_state(struct hclge_dev *hdev,
						   u8 vf_id, u8 *bypass_en)
{}

static const struct hclge_dbg_item vlan_filter_items[] =;

static const struct hclge_dbg_item vlan_offload_items[] =;

static int hclge_dbg_dump_vlan_filter_config(struct hclge_dev *hdev, char *buf,
					     int len, int *pos)
{}

static int hclge_dbg_dump_vlan_offload_config(struct hclge_dev *hdev, char *buf,
					      int len, int *pos)
{}

static int hclge_dbg_dump_vlan_config(struct hclge_dev *hdev, char *buf,
				      int len)
{}

static int hclge_dbg_dump_ptp_info(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_mac_uc(struct hclge_dev *hdev, char *buf, int len)
{}

static int hclge_dbg_dump_mac_mc(struct hclge_dev *hdev, char *buf, int len)
{}

static const struct hclge_dbg_func hclge_dbg_cmd_func[] =;

int hclge_dbg_read_cmd(struct hnae3_handle *handle, enum hnae3_dbg_cmd cmd,
		       char *buf, int len)
{}