src/dpdk/drivers/net/qede/base/ecore_dcbx.c
static enum _ecore_status_t
ecore_dcbx_process_mib_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
{
	struct dcbx_app_priority_feature *p_app;
	struct dcbx_app_priority_entry *p_tbl;
	struct ecore_dcbx_results data;
	struct dcbx_ets_feature *p_ets;
	struct ecore_hw_info *p_info;
	u32 pri_tc_tbl, flags;
	u8 dcbx_version;
	int num_entries;
	enum _ecore_status_t rc = ECORE_SUCCESS;

	flags = p_hwfn->p_dcbx_info->operational.flags;
	dcbx_version = GET_MFW_FIELD(flags, DCBX_CONFIG_VERSION);

	p_app = &p_hwfn->p_dcbx_info->operational.features.app;
	p_tbl = p_app->app_pri_tbl;

	p_ets = &p_hwfn->p_dcbx_info->operational.features.ets;
	pri_tc_tbl = p_ets->pri_tc_tbl[0];

	p_info = &p_hwfn->hw_info;
	num_entries = GET_MFW_FIELD(p_app->flags, DCBX_APP_NUM_ENTRIES);

	OSAL_MEMSET(&data, 0, sizeof(struct ecore_dcbx_results));
	rc = ecore_dcbx_process_tlv(p_hwfn, p_ptt, &data, p_tbl, pri_tc_tbl,
				    num_entries, dcbx_version);
	if (rc != ECORE_SUCCESS)
		return rc;

	p_info->num_active_tc = GET_MFW_FIELD(p_ets->flags, DCBX_ETS_MAX_TCS);
	p_hwfn->qm_info.ooo_tc = GET_MFW_FIELD(p_ets->flags, DCBX_OOO_TC);
	data.pf_id = p_hwfn->rel_pf_id;
	data.dcbx_enabled = !!dcbx_version;

	ecore_dcbx_dp_protocol(p_hwfn, &data);

	OSAL_MEMCPY(&p_hwfn->p_dcbx_info->results, &data,
		    sizeof(struct ecore_dcbx_results));

	return ECORE_SUCCESS;
}
/* Parse app TLV's to update TC information in hw_info structure for
 * reconfiguring QM. Get protocol specific data for PF update ramrod command.
 */
Parse app TLV's to update TC information in hw_info structure for
reconfiguring QM. Get protocol specific data for PF update ramrod command.
Parse app TLV ' s to update TC information in hw_info structure for reconfiguring QM . Get protocol specific data for PF update ramrod command .
static enum _ecore_status_t
ecore_dcbx_process_mib_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
{
	struct dcbx_app_priority_feature *p_app;
	struct dcbx_app_priority_entry *p_tbl;
	struct ecore_dcbx_results data;
	struct dcbx_ets_feature *p_ets;
	struct ecore_hw_info *p_info;
	u32 pri_tc_tbl, flags;
	u8 dcbx_version;
	int num_entries;
	enum _ecore_status_t rc = ECORE_SUCCESS;
	flags = p_hwfn->p_dcbx_info->operational.flags;
	dcbx_version = GET_MFW_FIELD(flags, DCBX_CONFIG_VERSION);
	p_app = &p_hwfn->p_dcbx_info->operational.features.app;
	p_tbl = p_app->app_pri_tbl;
	p_ets = &p_hwfn->p_dcbx_info->operational.features.ets;
	pri_tc_tbl = p_ets->pri_tc_tbl[0];
	p_info = &p_hwfn->hw_info;
	num_entries = GET_MFW_FIELD(p_app->flags, DCBX_APP_NUM_ENTRIES);
	OSAL_MEMSET(&data, 0, sizeof(struct ecore_dcbx_results));
	rc = ecore_dcbx_process_tlv(p_hwfn, p_ptt, &data, p_tbl, pri_tc_tbl,
				    num_entries, dcbx_version);
	if (rc != ECORE_SUCCESS)
		return rc;
	p_info->num_active_tc = GET_MFW_FIELD(p_ets->flags, DCBX_ETS_MAX_TCS);
	p_hwfn->qm_info.ooo_tc = GET_MFW_FIELD(p_ets->flags, DCBX_OOO_TC);
	data.pf_id = p_hwfn->rel_pf_id;
	data.dcbx_enabled = !!dcbx_version;
	ecore_dcbx_dp_protocol(p_hwfn, &data);
	OSAL_MEMCPY(&p_hwfn->p_dcbx_info->results, &data,
		    sizeof(struct ecore_dcbx_results));
	return ECORE_SUCCESS;
}
static enum _ecore_status_t ecore_dcbx_process_mib_info ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt ) { struct dcbx_app_priority_feature * p_app ; struct dcbx_app_priority_entry * p_tbl ; struct ecore_dcbx_results data ; struct dcbx_ets_feature * p_ets ; struct ecore_hw_info * p_info ; u32 pri_tc_tbl , flags ; u8 dcbx_version ; int num_entries ; enum _ecore_status_t rc = ECORE_SUCCESS ; flags = p_hwfn -> p_dcbx_info -> operational . flags ; dcbx_version = GET_MFW_FIELD ( flags , DCBX_CONFIG_VERSION ) ; p_app = & p_hwfn -> p_dcbx_info -> operational . features . app ; p_tbl = p_app -> app_pri_tbl ; p_ets = & p_hwfn -> p_dcbx_info -> operational . features . ets ; pri_tc_tbl = p_ets -> pri_tc_tbl [ 0 ] ; p_info = & p_hwfn -> hw_info ; num_entries = GET_MFW_FIELD ( p_app -> flags , DCBX_APP_NUM_ENTRIES ) ; OSAL_MEMSET ( & data , 0 , sizeof ( struct ecore_dcbx_results ) ) ; rc = ecore_dcbx_process_tlv ( p_hwfn , p_ptt , & data , p_tbl , pri_tc_tbl , num_entries , dcbx_version ) ; if ( rc != ECORE_SUCCESS ) return rc ; p_info -> num_active_tc = GET_MFW_FIELD ( p_ets -> flags , DCBX_ETS_MAX_TCS ) ; p_hwfn -> qm_info . ooo_tc = GET_MFW_FIELD ( p_ets -> flags , DCBX_OOO_TC ) ; data . pf_id = p_hwfn -> rel_pf_id ; data . dcbx_enabled = ! ! dcbx_version ; ecore_dcbx_dp_protocol ( p_hwfn , & data ) ; OSAL_MEMCPY ( & p_hwfn -> p_dcbx_info -> results , & data , sizeof ( struct ecore_dcbx_results ) ) ; return ECORE_SUCCESS ; }
Parse app TLV's to update TC information in hw_info structure for
 reconfiguring QM.
Parse app TLV ' s to update TC information in hw_info structure for reconfiguring QM .