src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
int32_t
ulp_rte_parser_implicit_match_port_process(struct ulp_rte_parser_params *params)
{
	uint16_t port_id = 0;
	uint16_t svif_mask = 0xFFFF;
	uint32_t ifindex;
	int32_t rc = BNXT_TF_RC_ERROR;

	if (ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_SVIF_FLAG) !=
	    BNXT_ULP_INVALID_SVIF_VAL)
		return BNXT_TF_RC_SUCCESS;

	/* SVIF not set. So get the port id */
	port_id = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_INCOMING_IF);

	if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
					      port_id,
					      &ifindex)) {
		BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
		return rc;
	}

	/* Update the SVIF details */
	rc = ulp_rte_parser_svif_set(params, ifindex, svif_mask);
	return rc;
}
/* Function to handle the parsing of the RTE port id */
Function to handle the parsing of the RTE port id
Function to handle the parsing of the RTE port id
int32_t
ulp_rte_parser_implicit_match_port_process(struct ulp_rte_parser_params *params)
{
	uint16_t port_id = 0;
	uint16_t svif_mask = 0xFFFF;
	uint32_t ifindex;
	int32_t rc = BNXT_TF_RC_ERROR;
	if (ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_SVIF_FLAG) !=
	    BNXT_ULP_INVALID_SVIF_VAL)
		return BNXT_TF_RC_SUCCESS;
	port_id = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_INCOMING_IF);
	if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
					      port_id,
					      &ifindex)) {
		BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
		return rc;
	}
	rc = ulp_rte_parser_svif_set(params, ifindex, svif_mask);
	return rc;
}
int32_t ulp_rte_parser_implicit_match_port_process ( struct ulp_rte_parser_params * params ) { uint16_t port_id = 0 ; uint16_t svif_mask = 0xFFFF ; uint32_t ifindex ; int32_t rc = BNXT_TF_RC_ERROR ; if ( ULP_COMP_FLD_IDX_RD ( params , BNXT_ULP_CF_IDX_SVIF_FLAG ) != BNXT_ULP_INVALID_SVIF_VAL ) return BNXT_TF_RC_SUCCESS ; port_id = ULP_COMP_FLD_IDX_RD ( params , BNXT_ULP_CF_IDX_INCOMING_IF ) ; if ( ulp_port_db_dev_port_to_ulp_index ( params -> ulp_ctx , port_id , & ifindex ) ) { BNXT_TF_DBG ( ERR , " \n " ) ; return rc ; } rc = ulp_rte_parser_svif_set ( params , ifindex , svif_mask ) ; return rc ; }
Function to handle the parsing of the RTE port id
Function to handle the parsing of the RTE port id
/* SVIF not set. So get the port id */ /* Update the SVIF details */