src/dpdk/drivers/net/bnxt/bnxt_hwrm.c
int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
{
	int rc = 0;
	uint32_t flags;
	struct hwrm_vnic_qcaps_input req = {.req_type = 0 };
	struct hwrm_vnic_qcaps_output *resp = bp->hwrm_cmd_resp_addr;

	HWRM_PREP(&req, HWRM_VNIC_QCAPS, BNXT_USE_CHIMP_MB);

	req.target_id = rte_cpu_to_le_16(0xffff);

	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);

	HWRM_CHECK_RESULT();

	flags = rte_le_to_cpu_32(resp->flags);

	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP) {
		bp->vnic_cap_flags |= BNXT_VNIC_CAP_COS_CLASSIFY;
		PMD_DRV_LOG(INFO, "CoS assignment capability enabled\n");
	}

	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
		bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS;

	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP)
		bp->vnic_cap_flags |= BNXT_VNIC_CAP_RX_CMPL_V2;

	bp->max_tpa_v2 = rte_le_to_cpu_16(resp->max_aggs_supported);

	HWRM_UNLOCK();

	return rc;
}
/* VNIC cap covers capability of all VNICs. So no need to pass vnic_id */
VNIC cap covers capability of all VNICs. So no need to pass vnic_id
VNIC cap covers capability of all VNICs . So no need to pass vnic_id
int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
{
	int rc = 0;
	uint32_t flags;
	struct hwrm_vnic_qcaps_input req = {.req_type = 0 };
	struct hwrm_vnic_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
	HWRM_PREP(&req, HWRM_VNIC_QCAPS, BNXT_USE_CHIMP_MB);
	req.target_id = rte_cpu_to_le_16(0xffff);
	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
	HWRM_CHECK_RESULT();
	flags = rte_le_to_cpu_32(resp->flags);
	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP) {
		bp->vnic_cap_flags |= BNXT_VNIC_CAP_COS_CLASSIFY;
		PMD_DRV_LOG(INFO, "CoS assignment capability enabled\n");
	}
	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
		bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS;
	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP)
		bp->vnic_cap_flags |= BNXT_VNIC_CAP_RX_CMPL_V2;
	bp->max_tpa_v2 = rte_le_to_cpu_16(resp->max_aggs_supported);
	HWRM_UNLOCK();
	return rc;
}
int bnxt_hwrm_vnic_qcaps ( struct bnxt * bp ) { int rc = 0 ; uint32_t flags ; struct hwrm_vnic_qcaps_input req = { . req_type = 0 } ; struct hwrm_vnic_qcaps_output * resp = bp -> hwrm_cmd_resp_addr ; HWRM_PREP ( & req , HWRM_VNIC_QCAPS , BNXT_USE_CHIMP_MB ) ; req . target_id = rte_cpu_to_le_16 ( 0xffff ) ; rc = bnxt_hwrm_send_message ( bp , & req , sizeof ( req ) , BNXT_USE_CHIMP_MB ) ; HWRM_CHECK_RESULT ( ) ; flags = rte_le_to_cpu_32 ( resp -> flags ) ; if ( flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP ) { bp -> vnic_cap_flags |= BNXT_VNIC_CAP_COS_CLASSIFY ; PMD_DRV_LOG ( INFO , " \n " ) ; } if ( flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP ) bp -> vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS ; if ( flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP ) bp -> vnic_cap_flags |= BNXT_VNIC_CAP_RX_CMPL_V2 ; bp -> max_tpa_v2 = rte_le_to_cpu_16 ( resp -> max_aggs_supported ) ; HWRM_UNLOCK ( ) ; return rc ; }
VNIC cap covers capability of all VNICs.
VNIC cap covers capability of all VNICs .