16fc22440Sliuzhongzhu /* SPDX-License-Identifier: GPL-2.0+ */ 26fc22440Sliuzhongzhu /* Copyright (c) 2018-2019 Hisilicon Limited. */ 36fc22440Sliuzhongzhu 46fc22440Sliuzhongzhu #ifndef __HCLGE_DEBUGFS_H 56fc22440Sliuzhongzhu #define __HCLGE_DEBUGFS_H 66fc22440Sliuzhongzhu 7a582b78dSZhongzhu Liu #include <linux/etherdevice.h> 8a582b78dSZhongzhu Liu #include "hclge_cmd.h" 9a582b78dSZhongzhu Liu 107737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_TBL_MAX 64 117737f1fbSliuzhongzhu 127737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_VLAN_MASK_B BIT(0) 137737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_MAC_MASK_B BIT(1) 147737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_ETHER_MASK_B BIT(2) 157737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_E_TYPE_B BIT(11) 167737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_DROP_B BIT(13) 177737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_VLAN_TAG 0x0FFF 187737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_PF_ID 0x0007 197737f1fbSliuzhongzhu #define HCLGE_DBG_MNG_VF_ID 0x00FF 207737f1fbSliuzhongzhu 2127cf979aSliuzhongzhu /* Get DFX BD number offset */ 2227cf979aSliuzhongzhu #define HCLGE_DBG_DFX_BIOS_OFFSET 1 2327cf979aSliuzhongzhu #define HCLGE_DBG_DFX_SSU_0_OFFSET 2 2427cf979aSliuzhongzhu #define HCLGE_DBG_DFX_SSU_1_OFFSET 3 2527cf979aSliuzhongzhu #define HCLGE_DBG_DFX_IGU_OFFSET 4 2627cf979aSliuzhongzhu #define HCLGE_DBG_DFX_RPU_0_OFFSET 5 2727cf979aSliuzhongzhu 2827cf979aSliuzhongzhu #define HCLGE_DBG_DFX_RPU_1_OFFSET 6 2927cf979aSliuzhongzhu #define HCLGE_DBG_DFX_NCSI_OFFSET 7 3027cf979aSliuzhongzhu #define HCLGE_DBG_DFX_RTC_OFFSET 8 3127cf979aSliuzhongzhu #define HCLGE_DBG_DFX_PPP_OFFSET 9 3227cf979aSliuzhongzhu #define HCLGE_DBG_DFX_RCB_OFFSET 10 3327cf979aSliuzhongzhu #define HCLGE_DBG_DFX_TQP_OFFSET 11 3427cf979aSliuzhongzhu 3527cf979aSliuzhongzhu #define HCLGE_DBG_DFX_SSU_2_OFFSET 12 3627cf979aSliuzhongzhu 376fc22440Sliuzhongzhu struct hclge_qos_pri_map_cmd { 386fc22440Sliuzhongzhu u8 pri0_tc : 4, 396fc22440Sliuzhongzhu pri1_tc : 4; 406fc22440Sliuzhongzhu u8 pri2_tc : 4, 416fc22440Sliuzhongzhu pri3_tc : 4; 426fc22440Sliuzhongzhu u8 pri4_tc : 4, 436fc22440Sliuzhongzhu pri5_tc : 4; 446fc22440Sliuzhongzhu u8 pri6_tc : 4, 456fc22440Sliuzhongzhu pri7_tc : 4; 466fc22440Sliuzhongzhu u8 vlan_pri : 4, 476fc22440Sliuzhongzhu rev : 4; 486fc22440Sliuzhongzhu }; 496fc22440Sliuzhongzhu 50c0ebebb9Sliuzhongzhu struct hclge_dbg_bitmap_cmd { 51c0ebebb9Sliuzhongzhu union { 52c0ebebb9Sliuzhongzhu u8 bitmap; 53c0ebebb9Sliuzhongzhu struct { 54c0ebebb9Sliuzhongzhu u8 bit0 : 1, 55c0ebebb9Sliuzhongzhu bit1 : 1, 56c0ebebb9Sliuzhongzhu bit2 : 1, 57c0ebebb9Sliuzhongzhu bit3 : 1, 58c0ebebb9Sliuzhongzhu bit4 : 1, 59c0ebebb9Sliuzhongzhu bit5 : 1, 60c0ebebb9Sliuzhongzhu bit6 : 1, 61c0ebebb9Sliuzhongzhu bit7 : 1; 62c0ebebb9Sliuzhongzhu }; 63c0ebebb9Sliuzhongzhu }; 64c0ebebb9Sliuzhongzhu }; 65c0ebebb9Sliuzhongzhu 66a582b78dSZhongzhu Liu struct hclge_dbg_reg_common_msg { 67a582b78dSZhongzhu Liu int msg_num; 68a582b78dSZhongzhu Liu int offset; 69a582b78dSZhongzhu Liu enum hclge_opcode_type cmd; 70a582b78dSZhongzhu Liu }; 71a582b78dSZhongzhu Liu 72b5a0b70dSHao Chen struct hclge_dbg_tcam_msg { 73b5a0b70dSHao Chen u8 stage; 74b5a0b70dSHao Chen u32 loc; 75b5a0b70dSHao Chen }; 76b5a0b70dSHao Chen 776f92bfd7SHuazhong Tan #define HCLGE_DBG_MAX_DFX_MSG_LEN 60 7827cf979aSliuzhongzhu struct hclge_dbg_dfx_message { 7927cf979aSliuzhongzhu int flag; 806f92bfd7SHuazhong Tan char message[HCLGE_DBG_MAX_DFX_MSG_LEN]; 8127cf979aSliuzhongzhu }; 8227cf979aSliuzhongzhu 83a582b78dSZhongzhu Liu #define HCLGE_DBG_MAC_REG_TYPE_LEN 32 84a582b78dSZhongzhu Liu struct hclge_dbg_reg_type_info { 85d96b0e59SYufeng Mo enum hnae3_dbg_cmd cmd; 86e4b91468SRikard Falkeborn const struct hclge_dbg_dfx_message *dfx_msg; 87a582b78dSZhongzhu Liu struct hclge_dbg_reg_common_msg reg_msg; 88a582b78dSZhongzhu Liu }; 89a582b78dSZhongzhu Liu 905e69ea7eSYufeng Mo struct hclge_dbg_func { 915e69ea7eSYufeng Mo enum hnae3_dbg_cmd cmd; 925e69ea7eSYufeng Mo int (*dbg_dump)(struct hclge_dev *hdev, char *buf, int len); 93d96b0e59SYufeng Mo int (*dbg_dump_reg)(struct hclge_dev *hdev, enum hnae3_dbg_cmd cmd, 94d96b0e59SYufeng Mo char *buf, int len); 955e69ea7eSYufeng Mo }; 965e69ea7eSYufeng Mo 97*e6fe5e16SJie Wang struct hclge_dbg_status_dfx_info { 98*e6fe5e16SJie Wang u32 offset; 99*e6fe5e16SJie Wang char message[HCLGE_DBG_MAX_DFX_MSG_LEN]; 100*e6fe5e16SJie Wang }; 101*e6fe5e16SJie Wang 102e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_bios_common_reg[] = { 10327cf979aSliuzhongzhu {false, "Reserved"}, 10427cf979aSliuzhongzhu {true, "BP_CPU_STATE"}, 10527cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_NIC_0"}, 10627cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_NIC_1"}, 10727cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_NIC_2"}, 10827cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_NIC_3"}, 10927cf979aSliuzhongzhu 11027cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_ROC_0"}, 11127cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_ROC_1"}, 11227cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_ROC_2"}, 11327cf979aSliuzhongzhu {true, "DFX_MSIX_INFO_ROC_3"}, 11427cf979aSliuzhongzhu {false, "Reserved"}, 11527cf979aSliuzhongzhu {false, "Reserved"}, 11627cf979aSliuzhongzhu }; 11727cf979aSliuzhongzhu 118e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_ssu_reg_0[] = { 11927cf979aSliuzhongzhu {false, "Reserved"}, 12027cf979aSliuzhongzhu {true, "SSU_ETS_PORT_STATUS"}, 12127cf979aSliuzhongzhu {true, "SSU_ETS_TCG_STATUS"}, 12227cf979aSliuzhongzhu {false, "Reserved"}, 12327cf979aSliuzhongzhu {false, "Reserved"}, 12427cf979aSliuzhongzhu {true, "SSU_BP_STATUS_0"}, 12527cf979aSliuzhongzhu 12627cf979aSliuzhongzhu {true, "SSU_BP_STATUS_1"}, 12727cf979aSliuzhongzhu {true, "SSU_BP_STATUS_2"}, 12827cf979aSliuzhongzhu {true, "SSU_BP_STATUS_3"}, 12927cf979aSliuzhongzhu {true, "SSU_BP_STATUS_4"}, 13027cf979aSliuzhongzhu {true, "SSU_BP_STATUS_5"}, 13127cf979aSliuzhongzhu {true, "SSU_MAC_TX_PFC_IND"}, 13227cf979aSliuzhongzhu 13327cf979aSliuzhongzhu {true, "MAC_SSU_RX_PFC_IND"}, 13427cf979aSliuzhongzhu {true, "BTMP_AGEING_ST_B0"}, 13527cf979aSliuzhongzhu {true, "BTMP_AGEING_ST_B1"}, 13627cf979aSliuzhongzhu {true, "BTMP_AGEING_ST_B2"}, 13727cf979aSliuzhongzhu {false, "Reserved"}, 13827cf979aSliuzhongzhu {false, "Reserved"}, 13927cf979aSliuzhongzhu 14027cf979aSliuzhongzhu {true, "FULL_DROP_NUM"}, 14127cf979aSliuzhongzhu {true, "PART_DROP_NUM"}, 14227cf979aSliuzhongzhu {true, "PPP_KEY_DROP_NUM"}, 14327cf979aSliuzhongzhu {true, "PPP_RLT_DROP_NUM"}, 14427cf979aSliuzhongzhu {true, "LO_PRI_UNICAST_RLT_DROP_NUM"}, 14527cf979aSliuzhongzhu {true, "HI_PRI_MULTICAST_RLT_DROP_NUM"}, 14627cf979aSliuzhongzhu 14727cf979aSliuzhongzhu {true, "LO_PRI_MULTICAST_RLT_DROP_NUM"}, 14827cf979aSliuzhongzhu {true, "NCSI_PACKET_CURR_BUFFER_CNT"}, 14927cf979aSliuzhongzhu {true, "BTMP_AGEING_RLS_CNT_BANK0"}, 15027cf979aSliuzhongzhu {true, "BTMP_AGEING_RLS_CNT_BANK1"}, 15127cf979aSliuzhongzhu {true, "BTMP_AGEING_RLS_CNT_BANK2"}, 15227cf979aSliuzhongzhu {true, "SSU_MB_RD_RLT_DROP_CNT"}, 15327cf979aSliuzhongzhu 15427cf979aSliuzhongzhu {true, "SSU_PPP_MAC_KEY_NUM_L"}, 15527cf979aSliuzhongzhu {true, "SSU_PPP_MAC_KEY_NUM_H"}, 15627cf979aSliuzhongzhu {true, "SSU_PPP_HOST_KEY_NUM_L"}, 15727cf979aSliuzhongzhu {true, "SSU_PPP_HOST_KEY_NUM_H"}, 15827cf979aSliuzhongzhu {true, "PPP_SSU_MAC_RLT_NUM_L"}, 15927cf979aSliuzhongzhu {true, "PPP_SSU_MAC_RLT_NUM_H"}, 16027cf979aSliuzhongzhu 16127cf979aSliuzhongzhu {true, "PPP_SSU_HOST_RLT_NUM_L"}, 16227cf979aSliuzhongzhu {true, "PPP_SSU_HOST_RLT_NUM_H"}, 16327cf979aSliuzhongzhu {true, "NCSI_RX_PACKET_IN_CNT_L"}, 16427cf979aSliuzhongzhu {true, "NCSI_RX_PACKET_IN_CNT_H"}, 16527cf979aSliuzhongzhu {true, "NCSI_TX_PACKET_OUT_CNT_L"}, 16627cf979aSliuzhongzhu {true, "NCSI_TX_PACKET_OUT_CNT_H"}, 16727cf979aSliuzhongzhu 16827cf979aSliuzhongzhu {true, "SSU_KEY_DROP_NUM"}, 16927cf979aSliuzhongzhu {true, "MB_UNCOPY_NUM"}, 17027cf979aSliuzhongzhu {true, "RX_OQ_DROP_PKT_CNT"}, 17127cf979aSliuzhongzhu {true, "TX_OQ_DROP_PKT_CNT"}, 17227cf979aSliuzhongzhu {true, "BANK_UNBALANCE_DROP_CNT"}, 17327cf979aSliuzhongzhu {true, "BANK_UNBALANCE_RX_DROP_CNT"}, 17427cf979aSliuzhongzhu 17527cf979aSliuzhongzhu {true, "NIC_L2_ERR_DROP_PKT_CNT"}, 17627cf979aSliuzhongzhu {true, "ROC_L2_ERR_DROP_PKT_CNT"}, 17727cf979aSliuzhongzhu {true, "NIC_L2_ERR_DROP_PKT_CNT_RX"}, 17827cf979aSliuzhongzhu {true, "ROC_L2_ERR_DROP_PKT_CNT_RX"}, 17927cf979aSliuzhongzhu {true, "RX_OQ_GLB_DROP_PKT_CNT"}, 18027cf979aSliuzhongzhu {false, "Reserved"}, 18127cf979aSliuzhongzhu 18227cf979aSliuzhongzhu {true, "LO_PRI_UNICAST_CUR_CNT"}, 18327cf979aSliuzhongzhu {true, "HI_PRI_MULTICAST_CUR_CNT"}, 18427cf979aSliuzhongzhu {true, "LO_PRI_MULTICAST_CUR_CNT"}, 18527cf979aSliuzhongzhu {false, "Reserved"}, 18627cf979aSliuzhongzhu {false, "Reserved"}, 18727cf979aSliuzhongzhu {false, "Reserved"}, 18827cf979aSliuzhongzhu }; 18927cf979aSliuzhongzhu 190e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_ssu_reg_1[] = { 19127cf979aSliuzhongzhu {true, "prt_id"}, 19227cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_0"}, 19327cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_1"}, 19427cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_2"}, 19527cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_3"}, 19627cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_4"}, 19727cf979aSliuzhongzhu 19827cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_5"}, 19927cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_6"}, 20027cf979aSliuzhongzhu {true, "PACKET_TC_CURR_BUFFER_CNT_7"}, 20127cf979aSliuzhongzhu {true, "PACKET_CURR_BUFFER_CNT"}, 20227cf979aSliuzhongzhu {false, "Reserved"}, 20327cf979aSliuzhongzhu {false, "Reserved"}, 20427cf979aSliuzhongzhu 20527cf979aSliuzhongzhu {true, "RX_PACKET_IN_CNT_L"}, 20627cf979aSliuzhongzhu {true, "RX_PACKET_IN_CNT_H"}, 20727cf979aSliuzhongzhu {true, "RX_PACKET_OUT_CNT_L"}, 20827cf979aSliuzhongzhu {true, "RX_PACKET_OUT_CNT_H"}, 20927cf979aSliuzhongzhu {true, "TX_PACKET_IN_CNT_L"}, 21027cf979aSliuzhongzhu {true, "TX_PACKET_IN_CNT_H"}, 21127cf979aSliuzhongzhu 21227cf979aSliuzhongzhu {true, "TX_PACKET_OUT_CNT_L"}, 21327cf979aSliuzhongzhu {true, "TX_PACKET_OUT_CNT_H"}, 21427cf979aSliuzhongzhu {true, "ROC_RX_PACKET_IN_CNT_L"}, 21527cf979aSliuzhongzhu {true, "ROC_RX_PACKET_IN_CNT_H"}, 21627cf979aSliuzhongzhu {true, "ROC_TX_PACKET_OUT_CNT_L"}, 21727cf979aSliuzhongzhu {true, "ROC_TX_PACKET_OUT_CNT_H"}, 21827cf979aSliuzhongzhu 21927cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_0_L"}, 22027cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_0_H"}, 22127cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_1_L"}, 22227cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_1_H"}, 22327cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_2_L"}, 22427cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_2_H"}, 22527cf979aSliuzhongzhu 22627cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_3_L"}, 22727cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_3_H"}, 22827cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_4_L"}, 22927cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_4_H"}, 23027cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_5_L"}, 23127cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_5_H"}, 23227cf979aSliuzhongzhu 23327cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_6_L"}, 23427cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_6_H"}, 23527cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_7_L"}, 23627cf979aSliuzhongzhu {true, "RX_PACKET_TC_IN_CNT_7_H"}, 23727cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_0_L"}, 23827cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_0_H"}, 23927cf979aSliuzhongzhu 24027cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_1_L"}, 24127cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_1_H"}, 24227cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_2_L"}, 24327cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_2_H"}, 24427cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_3_L"}, 24527cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_3_H"}, 24627cf979aSliuzhongzhu 24727cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_4_L"}, 24827cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_4_H"}, 24927cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_5_L"}, 25027cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_5_H"}, 25127cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_6_L"}, 25227cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_6_H"}, 25327cf979aSliuzhongzhu 25427cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_7_L"}, 25527cf979aSliuzhongzhu {true, "RX_PACKET_TC_OUT_CNT_7_H"}, 25627cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_0_L"}, 25727cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_0_H"}, 25827cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_1_L"}, 25927cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_1_H"}, 26027cf979aSliuzhongzhu 26127cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_2_L"}, 26227cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_2_H"}, 26327cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_3_L"}, 26427cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_3_H"}, 26527cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_4_L"}, 26627cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_4_H"}, 26727cf979aSliuzhongzhu 26827cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_5_L"}, 26927cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_5_H"}, 27027cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_6_L"}, 27127cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_6_H"}, 27227cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_7_L"}, 27327cf979aSliuzhongzhu {true, "TX_PACKET_TC_IN_CNT_7_H"}, 27427cf979aSliuzhongzhu 27527cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_0_L"}, 27627cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_0_H"}, 27727cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_1_L"}, 27827cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_1_H"}, 27927cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_2_L"}, 28027cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_2_H"}, 28127cf979aSliuzhongzhu 28227cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_3_L"}, 28327cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_3_H"}, 28427cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_4_L"}, 28527cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_4_H"}, 28627cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_5_L"}, 28727cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_5_H"}, 28827cf979aSliuzhongzhu 28927cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_6_L"}, 29027cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_6_H"}, 29127cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_7_L"}, 29227cf979aSliuzhongzhu {true, "TX_PACKET_TC_OUT_CNT_7_H"}, 29327cf979aSliuzhongzhu {false, "Reserved"}, 29427cf979aSliuzhongzhu {false, "Reserved"}, 29527cf979aSliuzhongzhu }; 29627cf979aSliuzhongzhu 297e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_ssu_reg_2[] = { 29827cf979aSliuzhongzhu {true, "OQ_INDEX"}, 29927cf979aSliuzhongzhu {true, "QUEUE_CNT"}, 30027cf979aSliuzhongzhu {false, "Reserved"}, 30127cf979aSliuzhongzhu {false, "Reserved"}, 30227cf979aSliuzhongzhu {false, "Reserved"}, 30327cf979aSliuzhongzhu {false, "Reserved"}, 30427cf979aSliuzhongzhu }; 30527cf979aSliuzhongzhu 306e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_igu_egu_reg[] = { 30727cf979aSliuzhongzhu {true, "prt_id"}, 30827cf979aSliuzhongzhu {true, "IGU_RX_ERR_PKT"}, 30927cf979aSliuzhongzhu {true, "IGU_RX_NO_SOF_PKT"}, 31027cf979aSliuzhongzhu {true, "EGU_TX_1588_SHORT_PKT"}, 31127cf979aSliuzhongzhu {true, "EGU_TX_1588_PKT"}, 31227cf979aSliuzhongzhu {true, "EGU_TX_ERR_PKT"}, 31327cf979aSliuzhongzhu 31427cf979aSliuzhongzhu {true, "IGU_RX_OUT_L2_PKT"}, 31527cf979aSliuzhongzhu {true, "IGU_RX_OUT_L3_PKT"}, 31627cf979aSliuzhongzhu {true, "IGU_RX_OUT_L4_PKT"}, 31727cf979aSliuzhongzhu {true, "IGU_RX_IN_L2_PKT"}, 31827cf979aSliuzhongzhu {true, "IGU_RX_IN_L3_PKT"}, 31927cf979aSliuzhongzhu {true, "IGU_RX_IN_L4_PKT"}, 32027cf979aSliuzhongzhu 32127cf979aSliuzhongzhu {true, "IGU_RX_EL3E_PKT"}, 32227cf979aSliuzhongzhu {true, "IGU_RX_EL4E_PKT"}, 32327cf979aSliuzhongzhu {true, "IGU_RX_L3E_PKT"}, 32427cf979aSliuzhongzhu {true, "IGU_RX_L4E_PKT"}, 32527cf979aSliuzhongzhu {true, "IGU_RX_ROCEE_PKT"}, 32627cf979aSliuzhongzhu {true, "IGU_RX_OUT_UDP0_PKT"}, 32727cf979aSliuzhongzhu 32827cf979aSliuzhongzhu {true, "IGU_RX_IN_UDP0_PKT"}, 3298488e3c6SJie Wang {true, "IGU_MC_CAR_DROP_PKT_L"}, 3308488e3c6SJie Wang {true, "IGU_MC_CAR_DROP_PKT_H"}, 3318488e3c6SJie Wang {true, "IGU_BC_CAR_DROP_PKT_L"}, 3328488e3c6SJie Wang {true, "IGU_BC_CAR_DROP_PKT_H"}, 33327cf979aSliuzhongzhu {false, "Reserved"}, 33427cf979aSliuzhongzhu 33527cf979aSliuzhongzhu {true, "IGU_RX_OVERSIZE_PKT_L"}, 33627cf979aSliuzhongzhu {true, "IGU_RX_OVERSIZE_PKT_H"}, 33727cf979aSliuzhongzhu {true, "IGU_RX_UNDERSIZE_PKT_L"}, 33827cf979aSliuzhongzhu {true, "IGU_RX_UNDERSIZE_PKT_H"}, 33927cf979aSliuzhongzhu {true, "IGU_RX_OUT_ALL_PKT_L"}, 34027cf979aSliuzhongzhu {true, "IGU_RX_OUT_ALL_PKT_H"}, 34127cf979aSliuzhongzhu 34227cf979aSliuzhongzhu {true, "IGU_TX_OUT_ALL_PKT_L"}, 34327cf979aSliuzhongzhu {true, "IGU_TX_OUT_ALL_PKT_H"}, 34427cf979aSliuzhongzhu {true, "IGU_RX_UNI_PKT_L"}, 34527cf979aSliuzhongzhu {true, "IGU_RX_UNI_PKT_H"}, 34627cf979aSliuzhongzhu {true, "IGU_RX_MULTI_PKT_L"}, 34727cf979aSliuzhongzhu {true, "IGU_RX_MULTI_PKT_H"}, 34827cf979aSliuzhongzhu 34927cf979aSliuzhongzhu {true, "IGU_RX_BROAD_PKT_L"}, 35027cf979aSliuzhongzhu {true, "IGU_RX_BROAD_PKT_H"}, 35127cf979aSliuzhongzhu {true, "EGU_TX_OUT_ALL_PKT_L"}, 35227cf979aSliuzhongzhu {true, "EGU_TX_OUT_ALL_PKT_H"}, 35327cf979aSliuzhongzhu {true, "EGU_TX_UNI_PKT_L"}, 35427cf979aSliuzhongzhu {true, "EGU_TX_UNI_PKT_H"}, 35527cf979aSliuzhongzhu 35627cf979aSliuzhongzhu {true, "EGU_TX_MULTI_PKT_L"}, 35727cf979aSliuzhongzhu {true, "EGU_TX_MULTI_PKT_H"}, 35827cf979aSliuzhongzhu {true, "EGU_TX_BROAD_PKT_L"}, 35927cf979aSliuzhongzhu {true, "EGU_TX_BROAD_PKT_H"}, 36027cf979aSliuzhongzhu {true, "IGU_TX_KEY_NUM_L"}, 36127cf979aSliuzhongzhu {true, "IGU_TX_KEY_NUM_H"}, 36227cf979aSliuzhongzhu 36327cf979aSliuzhongzhu {true, "IGU_RX_NON_TUN_PKT_L"}, 36427cf979aSliuzhongzhu {true, "IGU_RX_NON_TUN_PKT_H"}, 36527cf979aSliuzhongzhu {true, "IGU_RX_TUN_PKT_L"}, 36627cf979aSliuzhongzhu {true, "IGU_RX_TUN_PKT_H"}, 36727cf979aSliuzhongzhu {false, "Reserved"}, 36827cf979aSliuzhongzhu {false, "Reserved"}, 36927cf979aSliuzhongzhu }; 37027cf979aSliuzhongzhu 371e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_rpu_reg_0[] = { 37227cf979aSliuzhongzhu {true, "tc_queue_num"}, 37327cf979aSliuzhongzhu {true, "FSM_DFX_ST0"}, 37427cf979aSliuzhongzhu {true, "FSM_DFX_ST1"}, 37527cf979aSliuzhongzhu {true, "RPU_RX_PKT_DROP_CNT"}, 37627cf979aSliuzhongzhu {true, "BUF_WAIT_TIMEOUT"}, 37727cf979aSliuzhongzhu {true, "BUF_WAIT_TIMEOUT_QID"}, 37827cf979aSliuzhongzhu }; 37927cf979aSliuzhongzhu 380e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_rpu_reg_1[] = { 38127cf979aSliuzhongzhu {false, "Reserved"}, 38227cf979aSliuzhongzhu {true, "FIFO_DFX_ST0"}, 38327cf979aSliuzhongzhu {true, "FIFO_DFX_ST1"}, 38427cf979aSliuzhongzhu {true, "FIFO_DFX_ST2"}, 38527cf979aSliuzhongzhu {true, "FIFO_DFX_ST3"}, 38627cf979aSliuzhongzhu {true, "FIFO_DFX_ST4"}, 38727cf979aSliuzhongzhu 38827cf979aSliuzhongzhu {true, "FIFO_DFX_ST5"}, 38927cf979aSliuzhongzhu {false, "Reserved"}, 39027cf979aSliuzhongzhu {false, "Reserved"}, 39127cf979aSliuzhongzhu {false, "Reserved"}, 39227cf979aSliuzhongzhu {false, "Reserved"}, 39327cf979aSliuzhongzhu {false, "Reserved"}, 39427cf979aSliuzhongzhu }; 39527cf979aSliuzhongzhu 396e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_ncsi_reg[] = { 39727cf979aSliuzhongzhu {false, "Reserved"}, 39827cf979aSliuzhongzhu {true, "NCSI_EGU_TX_FIFO_STS"}, 39927cf979aSliuzhongzhu {true, "NCSI_PAUSE_STATUS"}, 40027cf979aSliuzhongzhu {true, "NCSI_RX_CTRL_DMAC_ERR_CNT"}, 40127cf979aSliuzhongzhu {true, "NCSI_RX_CTRL_SMAC_ERR_CNT"}, 40227cf979aSliuzhongzhu {true, "NCSI_RX_CTRL_CKS_ERR_CNT"}, 40327cf979aSliuzhongzhu 40427cf979aSliuzhongzhu {true, "NCSI_RX_CTRL_PKT_CNT"}, 40527cf979aSliuzhongzhu {true, "NCSI_RX_PT_DMAC_ERR_CNT"}, 40627cf979aSliuzhongzhu {true, "NCSI_RX_PT_SMAC_ERR_CNT"}, 40727cf979aSliuzhongzhu {true, "NCSI_RX_PT_PKT_CNT"}, 40827cf979aSliuzhongzhu {true, "NCSI_RX_FCS_ERR_CNT"}, 40927cf979aSliuzhongzhu {true, "NCSI_TX_CTRL_DMAC_ERR_CNT"}, 41027cf979aSliuzhongzhu 41127cf979aSliuzhongzhu {true, "NCSI_TX_CTRL_SMAC_ERR_CNT"}, 41227cf979aSliuzhongzhu {true, "NCSI_TX_CTRL_PKT_CNT"}, 41327cf979aSliuzhongzhu {true, "NCSI_TX_PT_DMAC_ERR_CNT"}, 41427cf979aSliuzhongzhu {true, "NCSI_TX_PT_SMAC_ERR_CNT"}, 41527cf979aSliuzhongzhu {true, "NCSI_TX_PT_PKT_CNT"}, 41627cf979aSliuzhongzhu {true, "NCSI_TX_PT_PKT_TRUNC_CNT"}, 41727cf979aSliuzhongzhu 41827cf979aSliuzhongzhu {true, "NCSI_TX_PT_PKT_ERR_CNT"}, 41927cf979aSliuzhongzhu {true, "NCSI_TX_CTRL_PKT_ERR_CNT"}, 42027cf979aSliuzhongzhu {true, "NCSI_RX_CTRL_PKT_TRUNC_CNT"}, 42127cf979aSliuzhongzhu {true, "NCSI_RX_CTRL_PKT_CFLIT_CNT"}, 42227cf979aSliuzhongzhu {false, "Reserved"}, 42327cf979aSliuzhongzhu {false, "Reserved"}, 42427cf979aSliuzhongzhu 42527cf979aSliuzhongzhu {true, "NCSI_MAC_RX_OCTETS_OK"}, 42627cf979aSliuzhongzhu {true, "NCSI_MAC_RX_OCTETS_BAD"}, 42727cf979aSliuzhongzhu {true, "NCSI_MAC_RX_UC_PKTS"}, 42827cf979aSliuzhongzhu {true, "NCSI_MAC_RX_MC_PKTS"}, 42927cf979aSliuzhongzhu {true, "NCSI_MAC_RX_BC_PKTS"}, 43027cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PKTS_64OCTETS"}, 43127cf979aSliuzhongzhu 43227cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PKTS_65TO127OCTETS"}, 43327cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PKTS_128TO255OCTETS"}, 43427cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PKTS_255TO511OCTETS"}, 43527cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PKTS_512TO1023OCTETS"}, 43627cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PKTS_1024TO1518OCTETS"}, 43727cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PKTS_1519TOMAXOCTETS"}, 43827cf979aSliuzhongzhu 43927cf979aSliuzhongzhu {true, "NCSI_MAC_RX_FCS_ERRORS"}, 44027cf979aSliuzhongzhu {true, "NCSI_MAC_RX_LONG_ERRORS"}, 44127cf979aSliuzhongzhu {true, "NCSI_MAC_RX_JABBER_ERRORS"}, 44227cf979aSliuzhongzhu {true, "NCSI_MAC_RX_RUNT_ERR_CNT"}, 44327cf979aSliuzhongzhu {true, "NCSI_MAC_RX_SHORT_ERR_CNT"}, 44427cf979aSliuzhongzhu {true, "NCSI_MAC_RX_FILT_PKT_CNT"}, 44527cf979aSliuzhongzhu 44627cf979aSliuzhongzhu {true, "NCSI_MAC_RX_OCTETS_TOTAL_FILT"}, 44727cf979aSliuzhongzhu {true, "NCSI_MAC_TX_OCTETS_OK"}, 44827cf979aSliuzhongzhu {true, "NCSI_MAC_TX_OCTETS_BAD"}, 44927cf979aSliuzhongzhu {true, "NCSI_MAC_TX_UC_PKTS"}, 45027cf979aSliuzhongzhu {true, "NCSI_MAC_TX_MC_PKTS"}, 45127cf979aSliuzhongzhu {true, "NCSI_MAC_TX_BC_PKTS"}, 45227cf979aSliuzhongzhu 45327cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PKTS_64OCTETS"}, 45427cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PKTS_65TO127OCTETS"}, 45527cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PKTS_128TO255OCTETS"}, 45627cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PKTS_256TO511OCTETS"}, 45727cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PKTS_512TO1023OCTETS"}, 45827cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PKTS_1024TO1518OCTETS"}, 45927cf979aSliuzhongzhu 46027cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PKTS_1519TOMAXOCTETS"}, 46127cf979aSliuzhongzhu {true, "NCSI_MAC_TX_UNDERRUN"}, 46227cf979aSliuzhongzhu {true, "NCSI_MAC_TX_CRC_ERROR"}, 46327cf979aSliuzhongzhu {true, "NCSI_MAC_TX_PAUSE_FRAMES"}, 46427cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PAD_PKTS"}, 46527cf979aSliuzhongzhu {true, "NCSI_MAC_RX_PAUSE_FRAMES"}, 46627cf979aSliuzhongzhu }; 46727cf979aSliuzhongzhu 468e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_rtc_reg[] = { 46927cf979aSliuzhongzhu {false, "Reserved"}, 47027cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_0"}, 47127cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_1"}, 47227cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_2"}, 47327cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_3"}, 47427cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_4"}, 47527cf979aSliuzhongzhu 47627cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_5"}, 47727cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_6"}, 47827cf979aSliuzhongzhu {true, "LGE_IGU_AFIFO_DFX_7"}, 47927cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_0"}, 48027cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_1"}, 48127cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_2"}, 48227cf979aSliuzhongzhu 48327cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_3"}, 48427cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_4"}, 48527cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_5"}, 48627cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_6"}, 48727cf979aSliuzhongzhu {true, "LGE_EGU_AFIFO_DFX_7"}, 48827cf979aSliuzhongzhu {true, "CGE_IGU_AFIFO_DFX_0"}, 48927cf979aSliuzhongzhu 49027cf979aSliuzhongzhu {true, "CGE_IGU_AFIFO_DFX_1"}, 49127cf979aSliuzhongzhu {true, "CGE_EGU_AFIFO_DFX_0"}, 49227cf979aSliuzhongzhu {true, "CGE_EGU_AFIFO_DFX_1"}, 49327cf979aSliuzhongzhu {false, "Reserved"}, 49427cf979aSliuzhongzhu {false, "Reserved"}, 49527cf979aSliuzhongzhu {false, "Reserved"}, 49627cf979aSliuzhongzhu }; 49727cf979aSliuzhongzhu 498e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_ppp_reg[] = { 49927cf979aSliuzhongzhu {false, "Reserved"}, 50027cf979aSliuzhongzhu {true, "DROP_FROM_PRT_PKT_CNT"}, 50127cf979aSliuzhongzhu {true, "DROP_FROM_HOST_PKT_CNT"}, 50227cf979aSliuzhongzhu {true, "DROP_TX_VLAN_PROC_CNT"}, 50327cf979aSliuzhongzhu {true, "DROP_MNG_CNT"}, 50427cf979aSliuzhongzhu {true, "DROP_FD_CNT"}, 50527cf979aSliuzhongzhu 50627cf979aSliuzhongzhu {true, "DROP_NO_DST_CNT"}, 50727cf979aSliuzhongzhu {true, "DROP_MC_MBID_FULL_CNT"}, 50827cf979aSliuzhongzhu {true, "DROP_SC_FILTERED"}, 50927cf979aSliuzhongzhu {true, "PPP_MC_DROP_PKT_CNT"}, 51027cf979aSliuzhongzhu {true, "DROP_PT_CNT"}, 51127cf979aSliuzhongzhu {true, "DROP_MAC_ANTI_SPOOF_CNT"}, 51227cf979aSliuzhongzhu 51327cf979aSliuzhongzhu {true, "DROP_IG_VFV_CNT"}, 51427cf979aSliuzhongzhu {true, "DROP_IG_PRTV_CNT"}, 51527cf979aSliuzhongzhu {true, "DROP_CNM_PFC_PAUSE_CNT"}, 51627cf979aSliuzhongzhu {true, "DROP_TORUS_TC_CNT"}, 51727cf979aSliuzhongzhu {true, "DROP_TORUS_LPBK_CNT"}, 51827cf979aSliuzhongzhu {true, "PPP_HFS_STS"}, 51927cf979aSliuzhongzhu 52027cf979aSliuzhongzhu {true, "PPP_MC_RSLT_STS"}, 52127cf979aSliuzhongzhu {true, "PPP_P3U_STS"}, 52227cf979aSliuzhongzhu {true, "PPP_RSLT_DESCR_STS"}, 52327cf979aSliuzhongzhu {true, "PPP_UMV_STS_0"}, 52427cf979aSliuzhongzhu {true, "PPP_UMV_STS_1"}, 52527cf979aSliuzhongzhu {true, "PPP_VFV_STS"}, 52627cf979aSliuzhongzhu 52727cf979aSliuzhongzhu {true, "PPP_GRO_KEY_CNT"}, 52827cf979aSliuzhongzhu {true, "PPP_GRO_INFO_CNT"}, 52927cf979aSliuzhongzhu {true, "PPP_GRO_DROP_CNT"}, 53027cf979aSliuzhongzhu {true, "PPP_GRO_OUT_CNT"}, 53127cf979aSliuzhongzhu {true, "PPP_GRO_KEY_MATCH_DATA_CNT"}, 53227cf979aSliuzhongzhu {true, "PPP_GRO_KEY_MATCH_TCAM_CNT"}, 53327cf979aSliuzhongzhu 53427cf979aSliuzhongzhu {true, "PPP_GRO_INFO_MATCH_CNT"}, 53527cf979aSliuzhongzhu {true, "PPP_GRO_FREE_ENTRY_CNT"}, 53627cf979aSliuzhongzhu {true, "PPP_GRO_INNER_DFX_SIGNAL"}, 53727cf979aSliuzhongzhu {false, "Reserved"}, 53827cf979aSliuzhongzhu {false, "Reserved"}, 53927cf979aSliuzhongzhu {false, "Reserved"}, 54027cf979aSliuzhongzhu 54127cf979aSliuzhongzhu {true, "GET_RX_PKT_CNT_L"}, 54227cf979aSliuzhongzhu {true, "GET_RX_PKT_CNT_H"}, 54327cf979aSliuzhongzhu {true, "GET_TX_PKT_CNT_L"}, 54427cf979aSliuzhongzhu {true, "GET_TX_PKT_CNT_H"}, 54527cf979aSliuzhongzhu {true, "SEND_UC_PRT2HOST_PKT_CNT_L"}, 54627cf979aSliuzhongzhu {true, "SEND_UC_PRT2HOST_PKT_CNT_H"}, 54727cf979aSliuzhongzhu 54827cf979aSliuzhongzhu {true, "SEND_UC_PRT2PRT_PKT_CNT_L"}, 54927cf979aSliuzhongzhu {true, "SEND_UC_PRT2PRT_PKT_CNT_H"}, 55027cf979aSliuzhongzhu {true, "SEND_UC_HOST2HOST_PKT_CNT_L"}, 55127cf979aSliuzhongzhu {true, "SEND_UC_HOST2HOST_PKT_CNT_H"}, 55227cf979aSliuzhongzhu {true, "SEND_UC_HOST2PRT_PKT_CNT_L"}, 55327cf979aSliuzhongzhu {true, "SEND_UC_HOST2PRT_PKT_CNT_H"}, 55427cf979aSliuzhongzhu 55527cf979aSliuzhongzhu {true, "SEND_MC_FROM_PRT_CNT_L"}, 55627cf979aSliuzhongzhu {true, "SEND_MC_FROM_PRT_CNT_H"}, 55727cf979aSliuzhongzhu {true, "SEND_MC_FROM_HOST_CNT_L"}, 55827cf979aSliuzhongzhu {true, "SEND_MC_FROM_HOST_CNT_H"}, 55927cf979aSliuzhongzhu {true, "SSU_MC_RD_CNT_L"}, 56027cf979aSliuzhongzhu {true, "SSU_MC_RD_CNT_H"}, 56127cf979aSliuzhongzhu 56227cf979aSliuzhongzhu {true, "SSU_MC_DROP_CNT_L"}, 56327cf979aSliuzhongzhu {true, "SSU_MC_DROP_CNT_H"}, 56427cf979aSliuzhongzhu {true, "SSU_MC_RD_PKT_CNT_L"}, 56527cf979aSliuzhongzhu {true, "SSU_MC_RD_PKT_CNT_H"}, 56627cf979aSliuzhongzhu {true, "PPP_MC_2HOST_PKT_CNT_L"}, 56727cf979aSliuzhongzhu {true, "PPP_MC_2HOST_PKT_CNT_H"}, 56827cf979aSliuzhongzhu 56927cf979aSliuzhongzhu {true, "PPP_MC_2PRT_PKT_CNT_L"}, 57027cf979aSliuzhongzhu {true, "PPP_MC_2PRT_PKT_CNT_H"}, 57127cf979aSliuzhongzhu {true, "NTSNOS_PKT_CNT_L"}, 57227cf979aSliuzhongzhu {true, "NTSNOS_PKT_CNT_H"}, 57327cf979aSliuzhongzhu {true, "NTUP_PKT_CNT_L"}, 57427cf979aSliuzhongzhu {true, "NTUP_PKT_CNT_H"}, 57527cf979aSliuzhongzhu 57627cf979aSliuzhongzhu {true, "NTLCL_PKT_CNT_L"}, 57727cf979aSliuzhongzhu {true, "NTLCL_PKT_CNT_H"}, 57827cf979aSliuzhongzhu {true, "NTTGT_PKT_CNT_L"}, 57927cf979aSliuzhongzhu {true, "NTTGT_PKT_CNT_H"}, 58027cf979aSliuzhongzhu {true, "RTNS_PKT_CNT_L"}, 58127cf979aSliuzhongzhu {true, "RTNS_PKT_CNT_H"}, 58227cf979aSliuzhongzhu 58327cf979aSliuzhongzhu {true, "RTLPBK_PKT_CNT_L"}, 58427cf979aSliuzhongzhu {true, "RTLPBK_PKT_CNT_H"}, 58527cf979aSliuzhongzhu {true, "NR_PKT_CNT_L"}, 58627cf979aSliuzhongzhu {true, "NR_PKT_CNT_H"}, 58727cf979aSliuzhongzhu {true, "RR_PKT_CNT_L"}, 58827cf979aSliuzhongzhu {true, "RR_PKT_CNT_H"}, 58927cf979aSliuzhongzhu 59027cf979aSliuzhongzhu {true, "MNG_TBL_HIT_CNT_L"}, 59127cf979aSliuzhongzhu {true, "MNG_TBL_HIT_CNT_H"}, 59227cf979aSliuzhongzhu {true, "FD_TBL_HIT_CNT_L"}, 59327cf979aSliuzhongzhu {true, "FD_TBL_HIT_CNT_H"}, 59427cf979aSliuzhongzhu {true, "FD_LKUP_CNT_L"}, 59527cf979aSliuzhongzhu {true, "FD_LKUP_CNT_H"}, 59627cf979aSliuzhongzhu 59727cf979aSliuzhongzhu {true, "BC_HIT_CNT_L"}, 59827cf979aSliuzhongzhu {true, "BC_HIT_CNT_H"}, 59927cf979aSliuzhongzhu {true, "UM_TBL_UC_HIT_CNT_L"}, 60027cf979aSliuzhongzhu {true, "UM_TBL_UC_HIT_CNT_H"}, 60127cf979aSliuzhongzhu {true, "UM_TBL_MC_HIT_CNT_L"}, 60227cf979aSliuzhongzhu {true, "UM_TBL_MC_HIT_CNT_H"}, 60327cf979aSliuzhongzhu 60427cf979aSliuzhongzhu {true, "UM_TBL_VMDQ1_HIT_CNT_L"}, 60527cf979aSliuzhongzhu {true, "UM_TBL_VMDQ1_HIT_CNT_H"}, 60627cf979aSliuzhongzhu {true, "MTA_TBL_HIT_CNT_L"}, 60727cf979aSliuzhongzhu {true, "MTA_TBL_HIT_CNT_H"}, 60827cf979aSliuzhongzhu {true, "FWD_BONDING_HIT_CNT_L"}, 60927cf979aSliuzhongzhu {true, "FWD_BONDING_HIT_CNT_H"}, 61027cf979aSliuzhongzhu 61127cf979aSliuzhongzhu {true, "PROMIS_TBL_HIT_CNT_L"}, 61227cf979aSliuzhongzhu {true, "PROMIS_TBL_HIT_CNT_H"}, 61327cf979aSliuzhongzhu {true, "GET_TUNL_PKT_CNT_L"}, 61427cf979aSliuzhongzhu {true, "GET_TUNL_PKT_CNT_H"}, 61527cf979aSliuzhongzhu {true, "GET_BMC_PKT_CNT_L"}, 61627cf979aSliuzhongzhu {true, "GET_BMC_PKT_CNT_H"}, 61727cf979aSliuzhongzhu 61827cf979aSliuzhongzhu {true, "SEND_UC_PRT2BMC_PKT_CNT_L"}, 61927cf979aSliuzhongzhu {true, "SEND_UC_PRT2BMC_PKT_CNT_H"}, 62027cf979aSliuzhongzhu {true, "SEND_UC_HOST2BMC_PKT_CNT_L"}, 62127cf979aSliuzhongzhu {true, "SEND_UC_HOST2BMC_PKT_CNT_H"}, 62227cf979aSliuzhongzhu {true, "SEND_UC_BMC2HOST_PKT_CNT_L"}, 62327cf979aSliuzhongzhu {true, "SEND_UC_BMC2HOST_PKT_CNT_H"}, 62427cf979aSliuzhongzhu 62527cf979aSliuzhongzhu {true, "SEND_UC_BMC2PRT_PKT_CNT_L"}, 62627cf979aSliuzhongzhu {true, "SEND_UC_BMC2PRT_PKT_CNT_H"}, 62727cf979aSliuzhongzhu {true, "PPP_MC_2BMC_PKT_CNT_L"}, 62827cf979aSliuzhongzhu {true, "PPP_MC_2BMC_PKT_CNT_H"}, 62927cf979aSliuzhongzhu {true, "VLAN_MIRR_CNT_L"}, 63027cf979aSliuzhongzhu {true, "VLAN_MIRR_CNT_H"}, 63127cf979aSliuzhongzhu 63227cf979aSliuzhongzhu {true, "IG_MIRR_CNT_L"}, 63327cf979aSliuzhongzhu {true, "IG_MIRR_CNT_H"}, 63427cf979aSliuzhongzhu {true, "EG_MIRR_CNT_L"}, 63527cf979aSliuzhongzhu {true, "EG_MIRR_CNT_H"}, 63627cf979aSliuzhongzhu {true, "RX_DEFAULT_HOST_HIT_CNT_L"}, 63727cf979aSliuzhongzhu {true, "RX_DEFAULT_HOST_HIT_CNT_H"}, 63827cf979aSliuzhongzhu 63927cf979aSliuzhongzhu {true, "LAN_PAIR_CNT_L"}, 64027cf979aSliuzhongzhu {true, "LAN_PAIR_CNT_H"}, 64127cf979aSliuzhongzhu {true, "UM_TBL_MC_HIT_PKT_CNT_L"}, 64227cf979aSliuzhongzhu {true, "UM_TBL_MC_HIT_PKT_CNT_H"}, 64327cf979aSliuzhongzhu {true, "MTA_TBL_HIT_PKT_CNT_L"}, 64427cf979aSliuzhongzhu {true, "MTA_TBL_HIT_PKT_CNT_H"}, 64527cf979aSliuzhongzhu 64627cf979aSliuzhongzhu {true, "PROMIS_TBL_HIT_PKT_CNT_L"}, 64727cf979aSliuzhongzhu {true, "PROMIS_TBL_HIT_PKT_CNT_H"}, 64827cf979aSliuzhongzhu {false, "Reserved"}, 64927cf979aSliuzhongzhu {false, "Reserved"}, 65027cf979aSliuzhongzhu {false, "Reserved"}, 65127cf979aSliuzhongzhu {false, "Reserved"}, 65227cf979aSliuzhongzhu }; 65327cf979aSliuzhongzhu 654e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_rcb_reg[] = { 65527cf979aSliuzhongzhu {false, "Reserved"}, 65627cf979aSliuzhongzhu {true, "FSM_DFX_ST0"}, 65727cf979aSliuzhongzhu {true, "FSM_DFX_ST1"}, 65827cf979aSliuzhongzhu {true, "FSM_DFX_ST2"}, 65927cf979aSliuzhongzhu {true, "FIFO_DFX_ST0"}, 66027cf979aSliuzhongzhu {true, "FIFO_DFX_ST1"}, 66127cf979aSliuzhongzhu 66227cf979aSliuzhongzhu {true, "FIFO_DFX_ST2"}, 66327cf979aSliuzhongzhu {true, "FIFO_DFX_ST3"}, 66427cf979aSliuzhongzhu {true, "FIFO_DFX_ST4"}, 66527cf979aSliuzhongzhu {true, "FIFO_DFX_ST5"}, 66627cf979aSliuzhongzhu {true, "FIFO_DFX_ST6"}, 66727cf979aSliuzhongzhu {true, "FIFO_DFX_ST7"}, 66827cf979aSliuzhongzhu 66927cf979aSliuzhongzhu {true, "FIFO_DFX_ST8"}, 67027cf979aSliuzhongzhu {true, "FIFO_DFX_ST9"}, 67127cf979aSliuzhongzhu {true, "FIFO_DFX_ST10"}, 67227cf979aSliuzhongzhu {true, "FIFO_DFX_ST11"}, 67327cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_0"}, 67427cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_1"}, 67527cf979aSliuzhongzhu 67627cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_2"}, 67727cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_3"}, 67827cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_4"}, 67927cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_5"}, 68027cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_6"}, 68127cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_7"}, 68227cf979aSliuzhongzhu 68327cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_8"}, 68427cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_9"}, 68527cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_10"}, 68627cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_11"}, 68727cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_12"}, 68827cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_13"}, 68927cf979aSliuzhongzhu 69027cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_14"}, 69127cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_15"}, 69227cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_16"}, 69327cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_17"}, 69427cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_18"}, 69527cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_19"}, 69627cf979aSliuzhongzhu 69727cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_20"}, 69827cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_21"}, 69927cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_22"}, 70027cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_23"}, 70127cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_24"}, 70227cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_25"}, 70327cf979aSliuzhongzhu 70427cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_26"}, 70527cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_27"}, 70627cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_28"}, 70727cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_29"}, 70827cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_30"}, 70927cf979aSliuzhongzhu {true, "Q_CREDIT_VLD_31"}, 71027cf979aSliuzhongzhu 71127cf979aSliuzhongzhu {true, "GRO_BD_SERR_CNT"}, 71227cf979aSliuzhongzhu {true, "GRO_CONTEXT_SERR_CNT"}, 71327cf979aSliuzhongzhu {true, "RX_STASH_CFG_SERR_CNT"}, 71427cf979aSliuzhongzhu {true, "AXI_RD_FBD_SERR_CNT"}, 71527cf979aSliuzhongzhu {true, "GRO_BD_MERR_CNT"}, 71627cf979aSliuzhongzhu {true, "GRO_CONTEXT_MERR_CNT"}, 71727cf979aSliuzhongzhu 71827cf979aSliuzhongzhu {true, "RX_STASH_CFG_MERR_CNT"}, 71927cf979aSliuzhongzhu {true, "AXI_RD_FBD_MERR_CNT"}, 72027cf979aSliuzhongzhu {false, "Reserved"}, 72127cf979aSliuzhongzhu {false, "Reserved"}, 72227cf979aSliuzhongzhu {false, "Reserved"}, 72327cf979aSliuzhongzhu {false, "Reserved"}, 72427cf979aSliuzhongzhu }; 72527cf979aSliuzhongzhu 726e4b91468SRikard Falkeborn static const struct hclge_dbg_dfx_message hclge_dbg_tqp_reg[] = { 72727cf979aSliuzhongzhu {true, "q_num"}, 72827cf979aSliuzhongzhu {true, "RCB_CFG_RX_RING_TAIL"}, 72927cf979aSliuzhongzhu {true, "RCB_CFG_RX_RING_HEAD"}, 73027cf979aSliuzhongzhu {true, "RCB_CFG_RX_RING_FBDNUM"}, 73127cf979aSliuzhongzhu {true, "RCB_CFG_RX_RING_OFFSET"}, 73227cf979aSliuzhongzhu {true, "RCB_CFG_RX_RING_FBDOFFSET"}, 73327cf979aSliuzhongzhu 73427cf979aSliuzhongzhu {true, "RCB_CFG_RX_RING_PKTNUM_RECORD"}, 73527cf979aSliuzhongzhu {true, "RCB_CFG_TX_RING_TAIL"}, 73627cf979aSliuzhongzhu {true, "RCB_CFG_TX_RING_HEAD"}, 73727cf979aSliuzhongzhu {true, "RCB_CFG_TX_RING_FBDNUM"}, 73827cf979aSliuzhongzhu {true, "RCB_CFG_TX_RING_OFFSET"}, 73927cf979aSliuzhongzhu {true, "RCB_CFG_TX_RING_EBDNUM"}, 74027cf979aSliuzhongzhu }; 74127cf979aSliuzhongzhu 7421556ea91SHuazhong Tan #define HCLGE_DBG_INFO_LEN 256 7430ca821daSJian Shen #define HCLGE_DBG_VLAN_FLTR_INFO_LEN 256 7440ca821daSJian Shen #define HCLGE_DBG_VLAN_OFFLOAD_INFO_LEN 512 7451556ea91SHuazhong Tan #define HCLGE_DBG_ID_LEN 16 7461556ea91SHuazhong Tan #define HCLGE_DBG_ITEM_NAME_LEN 32 7471556ea91SHuazhong Tan #define HCLGE_DBG_DATA_STR_LEN 32 748cad7c215SGuangbin Huang #define HCLGE_DBG_TM_INFO_LEN 256 749cad7c215SGuangbin Huang 750058c3be9SYufeng Mo #define HCLGE_BILLION_NANO_SECONDS 1000000000 751058c3be9SYufeng Mo 7521556ea91SHuazhong Tan struct hclge_dbg_item { 7531556ea91SHuazhong Tan char name[HCLGE_DBG_ITEM_NAME_LEN]; 7541556ea91SHuazhong Tan u16 interval; /* blank numbers after the item */ 7551556ea91SHuazhong Tan }; 7561556ea91SHuazhong Tan 7570ca821daSJian Shen struct hclge_dbg_vlan_cfg { 7580ca821daSJian Shen u16 pvid; 7590ca821daSJian Shen u8 accept_tag1; 7600ca821daSJian Shen u8 accept_tag2; 7610ca821daSJian Shen u8 accept_untag1; 7620ca821daSJian Shen u8 accept_untag2; 7630ca821daSJian Shen u8 insert_tag1; 7640ca821daSJian Shen u8 insert_tag2; 7650ca821daSJian Shen u8 shift_tag; 7660ca821daSJian Shen u8 strip_tag1; 7670ca821daSJian Shen u8 strip_tag2; 7680ca821daSJian Shen u8 drop_tag1; 7690ca821daSJian Shen u8 drop_tag2; 7700ca821daSJian Shen u8 pri_only1; 7710ca821daSJian Shen u8 pri_only2; 7720ca821daSJian Shen }; 7730ca821daSJian Shen 7746fc22440Sliuzhongzhu #endif 775