src/dpdk/drivers/net/bnxt/bnxt_hwrm.c
static int bnxt_update_max_resources_pf_only(struct bnxt *bp)
{
	struct hwrm_func_qcfg_input req = {0};
	struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
	int rc;

	/* Get the actual allocated values now */
	HWRM_PREP(&req, HWRM_FUNC_QCFG, BNXT_USE_CHIMP_MB);
	req.fid = rte_cpu_to_le_16(0xffff);
	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
	HWRM_CHECK_RESULT();

	bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->alloc_rsscos_ctx);
	bp->max_stat_ctx = rte_le_to_cpu_16(resp->alloc_stat_ctx);
	bp->max_cp_rings = rte_le_to_cpu_16(resp->alloc_cmpl_rings);
	bp->max_tx_rings = rte_le_to_cpu_16(resp->alloc_tx_rings);
	bp->max_rx_rings = rte_le_to_cpu_16(resp->alloc_rx_rings);
	bp->max_l2_ctx = rte_le_to_cpu_16(resp->alloc_l2_ctx);
	bp->max_ring_grps = rte_le_to_cpu_16(resp->alloc_hw_ring_grps);
	bp->max_vnics = rte_le_to_cpu_16(resp->alloc_vnics);

	HWRM_UNLOCK();

	return 0;
}
/* Update the PF resource values based on how many resources
 * got allocated to it.
 */
Update the PF resource values based on how many resources
got allocated to it.
Update the PF resource values based on how many resources got allocated to it .
static int bnxt_update_max_resources_pf_only(struct bnxt *bp)
{
	struct hwrm_func_qcfg_input req = {0};
	struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
	int rc;
	HWRM_PREP(&req, HWRM_FUNC_QCFG, BNXT_USE_CHIMP_MB);
	req.fid = rte_cpu_to_le_16(0xffff);
	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
	HWRM_CHECK_RESULT();
	bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->alloc_rsscos_ctx);
	bp->max_stat_ctx = rte_le_to_cpu_16(resp->alloc_stat_ctx);
	bp->max_cp_rings = rte_le_to_cpu_16(resp->alloc_cmpl_rings);
	bp->max_tx_rings = rte_le_to_cpu_16(resp->alloc_tx_rings);
	bp->max_rx_rings = rte_le_to_cpu_16(resp->alloc_rx_rings);
	bp->max_l2_ctx = rte_le_to_cpu_16(resp->alloc_l2_ctx);
	bp->max_ring_grps = rte_le_to_cpu_16(resp->alloc_hw_ring_grps);
	bp->max_vnics = rte_le_to_cpu_16(resp->alloc_vnics);
	HWRM_UNLOCK();
	return 0;
}
static int bnxt_update_max_resources_pf_only ( struct bnxt * bp ) { struct hwrm_func_qcfg_input req = { 0 } ; struct hwrm_func_qcfg_output * resp = bp -> hwrm_cmd_resp_addr ; int rc ; HWRM_PREP ( & req , HWRM_FUNC_QCFG , BNXT_USE_CHIMP_MB ) ; req . fid = rte_cpu_to_le_16 ( 0xffff ) ; rc = bnxt_hwrm_send_message ( bp , & req , sizeof ( req ) , BNXT_USE_CHIMP_MB ) ; HWRM_CHECK_RESULT ( ) ; bp -> max_rsscos_ctx = rte_le_to_cpu_16 ( resp -> alloc_rsscos_ctx ) ; bp -> max_stat_ctx = rte_le_to_cpu_16 ( resp -> alloc_stat_ctx ) ; bp -> max_cp_rings = rte_le_to_cpu_16 ( resp -> alloc_cmpl_rings ) ; bp -> max_tx_rings = rte_le_to_cpu_16 ( resp -> alloc_tx_rings ) ; bp -> max_rx_rings = rte_le_to_cpu_16 ( resp -> alloc_rx_rings ) ; bp -> max_l2_ctx = rte_le_to_cpu_16 ( resp -> alloc_l2_ctx ) ; bp -> max_ring_grps = rte_le_to_cpu_16 ( resp -> alloc_hw_ring_grps ) ; bp -> max_vnics = rte_le_to_cpu_16 ( resp -> alloc_vnics ) ; HWRM_UNLOCK ( ) ; return 0 ; }
Update the PF resource values based on how many resources
 got allocated to it.
Update the PF resource values based on how many resources got allocated to it .
/* Get the actual allocated values now */