FreeBSD kernel CXGBE device code
cudbg_wtp.c File Reference
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include "common/common.h"
#include "common/t4_regs.h"
#include "cudbg.h"
#include "cudbg_lib_common.h"
#include "cudbg_entity.h"
Include dependency graph for cudbg_wtp.c:

Go to the source code of this file.

Data Structures

struct  sge_debug_reg_data
 

Macros

#define TP_MIB_SIZE   0x5e
 

Functions

 __FBSDID ("$FreeBSD$")
 
int collect_wtp_data (struct cudbg_init *pdbg_init, struct cudbg_buffer *dbg_buff, struct cudbg_error *cudbg_err)
 
static u32 read_sge_debug_data (struct cudbg_init *pdbg_init, u32 *sge_dbg_reg)
 
static u32 read_tp_mib_data (struct cudbg_init *pdbg_init, struct tp_mib_data **ppTp_Mib)
 
static int t5_wtp_data (struct cudbg_init *pdbg_init, struct cudbg_buffer *dbg_buff, struct cudbg_error *cudbg_err)
 
static int t6_wtp_data (struct cudbg_init *pdbg_init, struct cudbg_buffer *dbg_buff, struct cudbg_error *cudbg_err)
 

Variables

struct tp_mib_type tp_mib []
 

Macro Definition Documentation

◆ TP_MIB_SIZE

#define TP_MIB_SIZE   0x5e

Definition at line 43 of file cudbg_wtp.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ collect_wtp_data()

int collect_wtp_data ( struct cudbg_init pdbg_init,
struct cudbg_buffer dbg_buff,
struct cudbg_error cudbg_err 
)

Definition at line 1297 of file cudbg_wtp.c.

References cudbg_init::adap, is_t5(), is_t6(), t5_wtp_data(), and t6_wtp_data().

Here is the call graph for this function:

◆ read_sge_debug_data()

static u32 read_sge_debug_data ( struct cudbg_init pdbg_init,
u32 sge_dbg_reg 
)
static

Definition at line 259 of file cudbg_wtp.c.

References A_SGE_DEBUG_DATA_HIGH, A_SGE_DEBUG_DATA_LOW, A_SGE_DEBUG_INDEX, cudbg_init::adap, HTONL_NIBBLE, t4_read_reg(), and t4_write_reg().

Referenced by t5_wtp_data(), and t6_wtp_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_tp_mib_data()

static u32 read_tp_mib_data ( struct cudbg_init pdbg_init,
struct tp_mib_data **  ppTp_Mib 
)
static

Definition at line 277 of file cudbg_wtp.c.

References cudbg_init::adap, t4_tp_mib_read(), tp_mib, and TP_MIB_SIZE.

Referenced by t5_wtp_data(), and t6_wtp_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t5_wtp_data()

static int t5_wtp_data ( struct cudbg_init pdbg_init,
struct cudbg_buffer dbg_buff,
struct cudbg_error cudbg_err 
)
static

Definition at line 292 of file cudbg_wtp.c.

References A_LE_DB_REQ_RSP_CNT, A_MAC_PORT_AFRAMESRECEIVEDOK, A_MAC_PORT_AFRAMESTRANSMITTEDOK, A_MAC_PORT_PKT_COUNT, A_MPS_PORT_STAT_LB_PORT_DROP_FRAMES, A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L, A_MPS_PORT_STAT_RX_PORT_LEN_ERROR_L, A_MPS_PORT_STAT_RX_PORT_LESS_64B_L, A_MPS_PORT_STAT_RX_PORT_MTU_CRC_ERROR_L, A_MPS_PORT_STAT_RX_PORT_MTU_ERROR_L, A_MPS_PORT_STAT_RX_PORT_SYM_ERROR_L, A_MPS_PORT_STAT_TX_PORT_DROP_L, A_MPS_RX_CLS_DROP_CNT0, A_MPS_RX_SE_CNT_IN0, A_MPS_RX_SE_CNT_OUT01, A_MPS_STAT_RX_BG_0_LB_DROP_FRAME_L, A_MPS_STAT_RX_BG_0_LB_TRUNC_FRAME_L, A_MPS_STAT_RX_BG_0_MAC_DROP_FRAME_L, A_MPS_STAT_RX_BG_0_MAC_TRUNC_FRAME_L, A_MPS_TX_SE_CNT_MAC01, A_MPS_TX_SE_CNT_TP01, A_PCIE_CMDR_REQ_CNT, A_PCIE_CMDR_RSP_CNT, A_PCIE_DMAI_CNT, A_PCIE_DMAR_REQ_CNT, A_PCIE_DMAR_RSP_EOP_CNT, A_PCIE_DMAR_RSP_SOP_CNT, A_PCIE_DMAW_EOP_CNT, A_PCIE_DMAW_SOP_CNT, A_PCIE_T5_DMA_STAT2, A_PCIE_T5_DMA_STAT3, A_SGE_DEBUG_DATA_HIGH_INDEX_1, A_SGE_DEBUG_DATA_HIGH_INDEX_3, A_SGE_DEBUG_DATA_HIGH_INDEX_6, A_SGE_DEBUG_DATA_HIGH_INDEX_7, A_SGE_DEBUG_DATA_HIGH_INDEX_9, A_TP_DBG_CSIDE_RX0, A_TP_DBG_CSIDE_TX0, A_TP_DBG_ESIDE_PKT0, A_ULP_RX_SE_CNT_CH0, A_ULP_TX_SE_CNT_CH0, cudbg_init::adap, wtp_data::_xgm_mps::cls_drop, compress_buff(), wtp_data::core_pcie_cmd_rsp, wtp_data::core_pcie_dma_rsp, wtp_data::csw_sge, cudbg_buffer::data, sge_debug_reg_data::debug_CIM_EOP0_cnt, sge_debug_reg_data::debug_CIM_EOP1_cnt, sge_debug_reg_data::debug_CIM_SOP0_cnt, sge_debug_reg_data::debug_CIM_SOP1_cnt, sge_debug_reg_data::debug_CPLSW_TP_Rx_EOP0_cnt, sge_debug_reg_data::debug_CPLSW_TP_Rx_EOP1_cnt, sge_debug_reg_data::debug_CPLSW_TP_Rx_SOP0_cnt, sge_debug_reg_data::debug_CPLSW_TP_Rx_SOP1_cnt, sge_debug_reg_data::debug_PC_Req_EOP0_cnt, sge_debug_reg_data::debug_PC_Req_EOP1_cnt, sge_debug_reg_data::debug_PC_Req_SOP0_cnt, sge_debug_reg_data::debug_PC_Req_SOP1_cnt, sge_debug_reg_data::debug_PC_Rsp_EOP0_cnt, sge_debug_reg_data::debug_PC_Rsp_EOP1_cnt, sge_debug_reg_data::debug_PC_Rsp_SOP0_cnt, sge_debug_reg_data::debug_PC_Rsp_SOP1_cnt, sge_debug_reg_data::debug_PD_Req_EOP0_cnt, sge_debug_reg_data::debug_PD_Req_EOP1_cnt, sge_debug_reg_data::debug_PD_Req_EOP2_cnt, sge_debug_reg_data::debug_PD_Req_EOP3_cnt, sge_debug_reg_data::debug_PD_Req_Int0_cnt, sge_debug_reg_data::debug_PD_Req_Int1_cnt, sge_debug_reg_data::debug_PD_Req_Int2_cnt, sge_debug_reg_data::debug_PD_Req_Int3_cnt, sge_debug_reg_data::debug_PD_Req_Rd0_cnt, sge_debug_reg_data::debug_PD_Req_Rd1_cnt, sge_debug_reg_data::debug_PD_Req_Rd2_cnt, sge_debug_reg_data::debug_PD_Req_Rd3_cnt, sge_debug_reg_data::debug_PD_Req_SOP0_cnt, sge_debug_reg_data::debug_PD_Req_SOP1_cnt, sge_debug_reg_data::debug_PD_Req_SOP2_cnt, sge_debug_reg_data::debug_PD_Req_SOP3_cnt, sge_debug_reg_data::debug_PD_Rsp_EOP0_cnt, sge_debug_reg_data::debug_PD_Rsp_EOP1_cnt, sge_debug_reg_data::debug_PD_Rsp_EOP2_cnt, sge_debug_reg_data::debug_PD_Rsp_EOP3_cnt, sge_debug_reg_data::debug_PD_Rsp_SOP0_cnt, sge_debug_reg_data::debug_PD_Rsp_SOP1_cnt, sge_debug_reg_data::debug_PD_Rsp_SOP2_cnt, sge_debug_reg_data::debug_PD_Rsp_SOP3_cnt, sge_debug_reg_data::debug_T_Rx_EOP0_cnt, sge_debug_reg_data::debug_T_Rx_EOP1_cnt, sge_debug_reg_data::debug_T_Rx_SOP0_cnt, sge_debug_reg_data::debug_T_Rx_SOP1_cnt, sge_debug_reg_data::debug_U_Tx_EOP0_cnt, sge_debug_reg_data::debug_U_Tx_EOP1_cnt, sge_debug_reg_data::debug_U_Tx_EOP2_cnt, sge_debug_reg_data::debug_U_Tx_EOP3_cnt, sge_debug_reg_data::debug_U_Tx_SOP0_cnt, sge_debug_reg_data::debug_U_Tx_SOP1_cnt, sge_debug_reg_data::debug_U_Tx_SOP2_cnt, sge_debug_reg_data::debug_U_Tx_SOP3_cnt, sge_debug_reg_data::debug_UD_Rx_EOP0_cnt, sge_debug_reg_data::debug_UD_Rx_EOP1_cnt, sge_debug_reg_data::debug_UD_Rx_EOP2_cnt, sge_debug_reg_data::debug_UD_Rx_EOP3_cnt, sge_debug_reg_data::debug_UD_Rx_SOP0_cnt, sge_debug_reg_data::debug_UD_Rx_SOP1_cnt, sge_debug_reg_data::debug_UD_Rx_SOP2_cnt, sge_debug_reg_data::debug_UD_Rx_SOP3_cnt, wtp_data::_xgm_mps::drop, wtp_type_3::drops, wtp_type_0::eop, wtp_type_1::eop, wtp_type_2::eop, wtp_type_3::eop, wtp_data::_xgm_mps::eop, wtp_data::_xgm_mps::err, get_scratch_buff(), wtp_data::le_db_rsp_cnt, wtp_data::mac_porrx_aframestra_ok, wtp_data::mac_porrx_pkt_count, wtp_data::mac_portx_aframestra_ok, wtp_data::mac_portx_pkt_count, wtp_data::mps_tp, wtp_data::mps_tpeside, wtp_data::mps_xgm, cudbg_buffer::offset, wtp_data::pcie_cmd_stat2, wtp_data::pcie_cmd_stat3, wtp_data::pcie_core_cmd_req, wtp_data::pcie_core_dma_req, wtp_data::pcie_core_dmai, wtp_data::pcie_core_dmaw, wtp_data::pcie_dma1_stat2, wtp_data::pcie_dma1_stat2_core, wtp_data::pcie_sge_cmd_rsp, wtp_data::pcie_sge_dma_rsp, wtp_data::pcie_t5_dma_stat3, wtp_data::pmrx_ulprx, read_sge_debug_data(), read_tp_mib_data(), release_scratch_buff(), wtp_data::rx_xgm_xgm, wtp_data::sge_cim, wtp_data::sge_debug_data_high_index_3, wtp_data::sge_debug_data_high_index_6, wtp_data::sge_debug_data_high_indx1, wtp_data::sge_debug_data_high_indx7, wtp_data::sge_debug_data_high_indx9, wtp_data::sge_pcie, wtp_data::sge_pcie_cmd_req, wtp_data::sge_pcie_dma_req, wtp_data::sge_pcie_ints, wtp_data::sge_utx, wtp_data::sge_work_req_pkt, wtp_type_0::sop, wtp_type_1::sop, wtp_type_2::sop, wtp_type_3::sop, wtp_data::_xgm_mps::sop, t4_read_reg(), t4_tp_pio_read(), T5_PORT0_REG, T5_PORT_STRIDE, wtp_data::tp_csw, wtp_data::tp_dbg_eside_pktx, tp_mib_data::TP_MIB_FCOE_DROP_0, tp_mib_data::TP_MIB_FCOE_DROP_1, tp_mib_data::TP_MIB_FCOE_DROP_2, tp_mib_data::TP_MIB_FCOE_DROP_3, tp_mib_data::TP_MIB_OFD_ARP_DROP, tp_mib_data::TP_MIB_OFD_CHN_DROP_0, tp_mib_data::TP_MIB_OFD_CHN_DROP_1, tp_mib_data::TP_MIB_OFD_CHN_DROP_2, tp_mib_data::TP_MIB_OFD_CHN_DROP_3, tp_mib_data::TP_MIB_OFD_DFR_DROP, tp_mib_data::TP_MIB_OFD_VLN_DROP_0, tp_mib_data::TP_MIB_OFD_VLN_DROP_1, tp_mib_data::TP_MIB_OFD_VLN_DROP_2, tp_mib_data::TP_MIB_OFD_VLN_DROP_3, tp_mib_data::TP_MIB_TNL_CNG_DROP_0, tp_mib_data::TP_MIB_TNL_CNG_DROP_1, tp_mib_data::TP_MIB_TNL_CNG_DROP_2, tp_mib_data::TP_MIB_TNL_CNG_DROP_3, tp_mib_data::TP_MIB_TNL_DROP_0, tp_mib_data::TP_MIB_TNL_DROP_1, tp_mib_data::TP_MIB_TNL_DROP_2, tp_mib_data::TP_MIB_TNL_DROP_3, tp_mib_data::TP_MIB_USM_DROP, wtp_data::tp_mps, wtp_data::tpcside_csw, wtp_data::tpcside_pm, wtp_data::tpcside_rxarb, wtp_data::tpcside_rxcpl, wtp_data::tpcside_rxpld, wtp_data::tpcside_txcpl, wtp_data::tpcside_uturn, wtp_data::tpeside_mps, wtp_data::tpeside_pld, wtp_data::tpeside_pm, wtp_data::tx_xgm_xgm, wtp_data::ulp_se_cnt_chx, wtp_data::ulprx_tpcside, wtp_data::utx_sge_dma_req, wtp_data::utx_tp, wtp_data::utx_tpcside, wtp_data::utx_tpcside_tx, tp_mib_type::value, wtp_data::wire_xgm, write_compression_hdr(), wtp_data::xgm_mps, and wtp_data::xgm_wire.

Referenced by collect_wtp_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t6_wtp_data()

static int t6_wtp_data ( struct cudbg_init pdbg_init,
struct cudbg_buffer dbg_buff,
struct cudbg_error cudbg_err 
)
static

Definition at line 934 of file cudbg_wtp.c.

References A_LE_DB_REQ_RSP_CNT, A_MPS_PORT_STAT_LB_PORT_DROP_FRAMES, A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L, A_MPS_PORT_STAT_RX_PORT_LEN_ERROR_L, A_MPS_PORT_STAT_RX_PORT_LESS_64B_L, A_MPS_PORT_STAT_RX_PORT_MTU_CRC_ERROR_L, A_MPS_PORT_STAT_RX_PORT_MTU_ERROR_L, A_MPS_PORT_STAT_RX_PORT_SYM_ERROR_L, A_MPS_RX_CLS_DROP_CNT0, A_MPS_RX_SE_CNT_IN0, A_MPS_RX_SE_CNT_OUT01, A_MPS_STAT_RX_BG_0_LB_DROP_FRAME_L, A_MPS_STAT_RX_BG_0_LB_TRUNC_FRAME_L, A_MPS_STAT_RX_BG_0_MAC_DROP_FRAME_L, A_MPS_STAT_RX_BG_0_MAC_TRUNC_FRAME_L, A_MPS_TX_SE_CNT_MAC01, A_MPS_TX_SE_CNT_TP01, A_PCIE_T5_CMD_STAT2, A_PCIE_T5_CMD_STAT3, A_PCIE_T5_DMA_STAT2, A_PCIE_T5_DMA_STAT3, A_SGE_DEBUG_DATA_HIGH_INDEX_1, A_SGE_DEBUG_DATA_HIGH_INDEX_7, A_SGE_DEBUG_DATA_HIGH_INDEX_9, A_TP_DBG_CSIDE_RX0, A_TP_DBG_CSIDE_TX0, A_TP_DBG_ESIDE_PKT0, A_ULP_RX_SE_CNT_CH0, A_ULP_TX_SE_CNT_CH0, cudbg_init::adap, wtp_data::_xgm_mps::cls_drop, compress_buff(), cudbg_buffer::data, sge_debug_reg_data::debug_CIM_EOP0_cnt, sge_debug_reg_data::debug_CIM_EOP1_cnt, sge_debug_reg_data::debug_CIM_SOP0_cnt, sge_debug_reg_data::debug_CIM_SOP1_cnt, sge_debug_reg_data::debug_PC_Rsp_EOP0_cnt, sge_debug_reg_data::debug_PC_Rsp_SOP0_cnt, sge_debug_reg_data::debug_PC_Rsp_SOP1_cnt, sge_debug_reg_data::debug_PD_Req_Int0_cnt, sge_debug_reg_data::debug_PD_Req_Int1_cnt, sge_debug_reg_data::debug_PD_Req_Int2_cnt, sge_debug_reg_data::debug_PD_Req_Int3_cnt, wtp_data::_xgm_mps::drop, wtp_type_3::drops, wtp_type_0::eop, wtp_type_1::eop, wtp_type_2::eop, wtp_type_3::eop, wtp_data::_xgm_mps::eop, wtp_data::_xgm_mps::err, get_scratch_buff(), wtp_data::le_db_rsp_cnt, wtp_data::mac_porrx_aframestra_ok, wtp_data::mac_porrx_etherstatspkts, wtp_data::mac_porrx_pkt_count, wtp_data::mac_portx_aframestra_ok, wtp_data::mac_portx_etherstatspkts, wtp_data::mac_portx_pkt_count, wtp_data::mps_tp, wtp_data::mps_xgm, cudbg_buffer::offset, wtp_data::pcie_cmd_stat2, wtp_data::pcie_cmd_stat3, wtp_data::pcie_dma1_stat2, wtp_data::pcie_dma1_stat2_core, wtp_data::pcie_sge_cmd_rsp, wtp_data::pcie_t5_dma_stat3, wtp_data::pmrx_ulprx, read_sge_debug_data(), read_tp_mib_data(), release_scratch_buff(), wtp_data::sge_cim, wtp_data::sge_debug_data_high_indx1, wtp_data::sge_debug_data_high_indx7, wtp_data::sge_debug_data_high_indx9, wtp_data::sge_pcie_cmd_req, wtp_data::sge_pcie_ints, wtp_data::sge_work_req_pkt, wtp_type_0::sop, wtp_type_1::sop, wtp_type_2::sop, wtp_type_3::sop, wtp_data::_xgm_mps::sop, t4_read_reg(), t4_tp_pio_read(), T5_PORT0_REG, T5_PORT_STRIDE, wtp_data::tp_dbg_eside_pktx, tp_mib_data::TP_MIB_FCOE_DROP_0, tp_mib_data::TP_MIB_FCOE_DROP_1, tp_mib_data::TP_MIB_OFD_CHN_DROP_0, tp_mib_data::TP_MIB_OFD_CHN_DROP_1, tp_mib_data::TP_MIB_OFD_VLN_DROP_0, tp_mib_data::TP_MIB_OFD_VLN_DROP_1, tp_mib_data::TP_MIB_TNL_CNG_DROP_0, tp_mib_data::TP_MIB_TNL_CNG_DROP_1, tp_mib_data::TP_MIB_USM_DROP, wtp_data::tp_mps, wtp_data::tpcside_rxarb, wtp_data::tpeside_mps, wtp_data::ulp_se_cnt_chx, wtp_data::ulprx_tpcside, wtp_data::utx_tpcside, wtp_data::utx_tpcside_tx, tp_mib_type::value, write_compression_hdr(), and wtp_data::xgm_mps.

Referenced by collect_wtp_data().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ tp_mib

struct tp_mib_type tp_mib[]

Definition at line 162 of file cudbg_wtp.c.

Referenced by read_tp_mib_data().