src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
int32_t
ulp_rte_port_id_hdr_handler(const struct rte_flow_item *item,
			    struct ulp_rte_parser_params *params)
{
	const struct rte_flow_item_port_id *port_spec = item->spec;
	const struct rte_flow_item_port_id *port_mask = item->mask;
	uint16_t mask = 0;
	int32_t rc = BNXT_TF_RC_PARSE_ERR;
	uint32_t ifindex;

	if (!port_spec) {
		BNXT_TF_DBG(ERR, "ParseErr:Port id is not valid\n");
		return rc;
	}
	if (!port_mask) {
		BNXT_TF_DBG(ERR, "ParseErr:Phy Port mask is not valid\n");
		return rc;
	}
	mask = port_mask->id;

	/* perform the conversion from dpdk port to bnxt ifindex */
	if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
					      port_spec->id,
					      &ifindex)) {
		BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
		return rc;
	}
	/* Update the SVIF details */
	return ulp_rte_parser_svif_set(params, ifindex, mask);
}
/* Function to handle the parsing of RTE Flow item port id  Header. */
Function to handle the parsing of RTE Flow item port id  Header.
Function to handle the parsing of RTE Flow item port id Header .
int32_t
ulp_rte_port_id_hdr_handler(const struct rte_flow_item *item,
			    struct ulp_rte_parser_params *params)
{
	const struct rte_flow_item_port_id *port_spec = item->spec;
	const struct rte_flow_item_port_id *port_mask = item->mask;
	uint16_t mask = 0;
	int32_t rc = BNXT_TF_RC_PARSE_ERR;
	uint32_t ifindex;
	if (!port_spec) {
		BNXT_TF_DBG(ERR, "ParseErr:Port id is not valid\n");
		return rc;
	}
	if (!port_mask) {
		BNXT_TF_DBG(ERR, "ParseErr:Phy Port mask is not valid\n");
		return rc;
	}
	mask = port_mask->id;
	if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
					      port_spec->id,
					      &ifindex)) {
		BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
		return rc;
	}
	return ulp_rte_parser_svif_set(params, ifindex, mask);
}
int32_t ulp_rte_port_id_hdr_handler ( const struct rte_flow_item * item , struct ulp_rte_parser_params * params ) { const struct rte_flow_item_port_id * port_spec = item -> spec ; const struct rte_flow_item_port_id * port_mask = item -> mask ; uint16_t mask = 0 ; int32_t rc = BNXT_TF_RC_PARSE_ERR ; uint32_t ifindex ; if ( ! port_spec ) { BNXT_TF_DBG ( ERR , " \n " ) ; return rc ; } if ( ! port_mask ) { BNXT_TF_DBG ( ERR , " \n " ) ; return rc ; } mask = port_mask -> id ; if ( ulp_port_db_dev_port_to_ulp_index ( params -> ulp_ctx , port_spec -> id , & ifindex ) ) { BNXT_TF_DBG ( ERR , " \n " ) ; return rc ; } return ulp_rte_parser_svif_set ( params , ifindex , mask ) ; }
Function to handle the parsing of RTE Flow item port id  Header.
Function to handle the parsing of RTE Flow item port id Header .
/* perform the conversion from dpdk port to bnxt ifindex */ /* Update the SVIF details */