src/dpdk/drivers/net/qede/qede_debug.c
static bool qed_grc_is_mem_included(struct ecore_hwfn *p_hwfn,
				    enum block_id block_id, u8 mem_group_id)
{
	const struct dbg_block *block;
	u8 i;

	block = get_dbg_block(p_hwfn, block_id);

	/* If the block is associated with a Storm, check Storm match */
	if (block->associated_storm_letter) {
		enum dbg_storms associated_storm_id =
		    qed_get_id_from_letter(block->associated_storm_letter);

		if (associated_storm_id == MAX_DBG_STORMS ||
		    !qed_grc_is_storm_included(p_hwfn, associated_storm_id))
			return false;
	}

	for (i = 0; i < NUM_BIG_RAM_TYPES; i++) {
		struct big_ram_defs *big_ram = &s_big_ram_defs[i];

		if (mem_group_id == big_ram->mem_group_id ||
		    mem_group_id == big_ram->ram_mem_group_id)
			return qed_grc_is_included(p_hwfn, big_ram->grc_param);
	}

	switch (mem_group_id) {
	case MEM_GROUP_PXP_ILT:
	case MEM_GROUP_PXP_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PXP);
	case MEM_GROUP_RAM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_RAM);
	case MEM_GROUP_PBUF:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PBUF);
	case MEM_GROUP_CAU_MEM:
	case MEM_GROUP_CAU_SB:
	case MEM_GROUP_CAU_PI:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CAU);
	case MEM_GROUP_CAU_MEM_EXT:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CAU_EXT);
	case MEM_GROUP_QM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_QM);
	case MEM_GROUP_CFC_MEM:
	case MEM_GROUP_CONN_CFC_MEM:
	case MEM_GROUP_TASK_CFC_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CFC) ||
		       qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM_CTX);
	case MEM_GROUP_DORQ_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DORQ);
	case MEM_GROUP_IGU_MEM:
	case MEM_GROUP_IGU_MSIX:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IGU);
	case MEM_GROUP_MULD_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MULD);
	case MEM_GROUP_PRS_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PRS);
	case MEM_GROUP_DMAE_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DMAE);
	case MEM_GROUP_TM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_TM);
	case MEM_GROUP_SDM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_SDM);
	case MEM_GROUP_TDIF_CTX:
	case MEM_GROUP_RDIF_CTX:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DIF);
	case MEM_GROUP_CM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM);
	case MEM_GROUP_IOR:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IOR);
	default:
		return true;
	}
}
/* Returns true if the specified memory should be included in the dump, false
 * otherwise.
 */
Returns true if the specified memory should be included in the dump, false
otherwise.
Returns true if the specified memory should be included in the dump false otherwise .
static bool qed_grc_is_mem_included(struct ecore_hwfn *p_hwfn,
				    enum block_id block_id, u8 mem_group_id)
{
	const struct dbg_block *block;
	u8 i;
	block = get_dbg_block(p_hwfn, block_id);
	if (block->associated_storm_letter) {
		enum dbg_storms associated_storm_id =
		    qed_get_id_from_letter(block->associated_storm_letter);
		if (associated_storm_id == MAX_DBG_STORMS ||
		    !qed_grc_is_storm_included(p_hwfn, associated_storm_id))
			return false;
	}
	for (i = 0; i < NUM_BIG_RAM_TYPES; i++) {
		struct big_ram_defs *big_ram = &s_big_ram_defs[i];
		if (mem_group_id == big_ram->mem_group_id ||
		    mem_group_id == big_ram->ram_mem_group_id)
			return qed_grc_is_included(p_hwfn, big_ram->grc_param);
	}
	switch (mem_group_id) {
	case MEM_GROUP_PXP_ILT:
	case MEM_GROUP_PXP_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PXP);
	case MEM_GROUP_RAM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_RAM);
	case MEM_GROUP_PBUF:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PBUF);
	case MEM_GROUP_CAU_MEM:
	case MEM_GROUP_CAU_SB:
	case MEM_GROUP_CAU_PI:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CAU);
	case MEM_GROUP_CAU_MEM_EXT:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CAU_EXT);
	case MEM_GROUP_QM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_QM);
	case MEM_GROUP_CFC_MEM:
	case MEM_GROUP_CONN_CFC_MEM:
	case MEM_GROUP_TASK_CFC_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CFC) ||
		       qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM_CTX);
	case MEM_GROUP_DORQ_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DORQ);
	case MEM_GROUP_IGU_MEM:
	case MEM_GROUP_IGU_MSIX:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IGU);
	case MEM_GROUP_MULD_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MULD);
	case MEM_GROUP_PRS_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PRS);
	case MEM_GROUP_DMAE_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DMAE);
	case MEM_GROUP_TM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_TM);
	case MEM_GROUP_SDM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_SDM);
	case MEM_GROUP_TDIF_CTX:
	case MEM_GROUP_RDIF_CTX:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DIF);
	case MEM_GROUP_CM_MEM:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM);
	case MEM_GROUP_IOR:
		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IOR);
	default:
		return true;
	}
}
static bool qed_grc_is_mem_included ( struct ecore_hwfn * p_hwfn , enum block_id block_id , u8 mem_group_id ) { const struct dbg_block * block ; u8 i ; block = get_dbg_block ( p_hwfn , block_id ) ; if ( block -> associated_storm_letter ) { enum dbg_storms associated_storm_id = qed_get_id_from_letter ( block -> associated_storm_letter ) ; if ( associated_storm_id == MAX_DBG_STORMS || ! qed_grc_is_storm_included ( p_hwfn , associated_storm_id ) ) return false ; } for ( i = 0 ; i < NUM_BIG_RAM_TYPES ; i ++ ) { struct big_ram_defs * big_ram = & s_big_ram_defs [ i ] ; if ( mem_group_id == big_ram -> mem_group_id || mem_group_id == big_ram -> ram_mem_group_id ) return qed_grc_is_included ( p_hwfn , big_ram -> grc_param ) ; } switch ( mem_group_id ) { case MEM_GROUP_PXP_ILT : case MEM_GROUP_PXP_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_PXP ) ; case MEM_GROUP_RAM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_RAM ) ; case MEM_GROUP_PBUF : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_PBUF ) ; case MEM_GROUP_CAU_MEM : case MEM_GROUP_CAU_SB : case MEM_GROUP_CAU_PI : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_CAU ) ; case MEM_GROUP_CAU_MEM_EXT : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_CAU_EXT ) ; case MEM_GROUP_QM_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_QM ) ; case MEM_GROUP_CFC_MEM : case MEM_GROUP_CONN_CFC_MEM : case MEM_GROUP_TASK_CFC_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_CFC ) || qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_CM_CTX ) ; case MEM_GROUP_DORQ_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_DORQ ) ; case MEM_GROUP_IGU_MEM : case MEM_GROUP_IGU_MSIX : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_IGU ) ; case MEM_GROUP_MULD_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_MULD ) ; case MEM_GROUP_PRS_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_PRS ) ; case MEM_GROUP_DMAE_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_DMAE ) ; case MEM_GROUP_TM_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_TM ) ; case MEM_GROUP_SDM_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_SDM ) ; case MEM_GROUP_TDIF_CTX : case MEM_GROUP_RDIF_CTX : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_DIF ) ; case MEM_GROUP_CM_MEM : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_CM ) ; case MEM_GROUP_IOR : return qed_grc_is_included ( p_hwfn , DBG_GRC_PARAM_DUMP_IOR ) ; default : return true ; } }
Returns true if the specified memory should be included in the dump, false
 otherwise.
Returns true if the specified memory should be included in the dump false otherwise .
/* If the block is associated with a Storm, check Storm match */