src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
int32_t
bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[],
			      struct ulp_rte_parser_params *params)
{
	const struct rte_flow_action *action_item = actions;
	struct bnxt_ulp_rte_act_info *hdr_info;

	/* Parse all the items in the pattern */
	while (action_item && action_item->type != RTE_FLOW_ACTION_TYPE_END) {
		/* get the header information from the flow_hdr_info table */
		hdr_info = &ulp_act_info[action_item->type];
		if (hdr_info->act_type ==
		    BNXT_ULP_ACT_TYPE_NOT_SUPPORTED) {
			BNXT_TF_DBG(ERR,
				    "Truflow parser does not support act %u\n",
				    action_item->type);
			return BNXT_TF_RC_ERROR;
		} else if (hdr_info->act_type ==
		    BNXT_ULP_ACT_TYPE_SUPPORTED) {
			/* call the registered callback handler */
			if (hdr_info->proto_act_func) {
				if (hdr_info->proto_act_func(action_item,
							     params) !=
				    BNXT_TF_RC_SUCCESS) {
					return BNXT_TF_RC_ERROR;
				}
			}
		}
		action_item++;
	}
	/* update the implied port details */
	ulp_rte_parser_implicit_act_port_process(params);
	return BNXT_TF_RC_SUCCESS;
}
/*
 * Function to handle the parsing of RTE Flows and placing
 * the RTE flow actions into the ulp structures.
 */
Function to handle the parsing of RTE Flows and placing
the RTE flow actions into the ulp structures.
Function to handle the parsing of RTE Flows and placing the RTE flow actions into the ulp structures .
int32_t
bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[],
			      struct ulp_rte_parser_params *params)
{
	const struct rte_flow_action *action_item = actions;
	struct bnxt_ulp_rte_act_info *hdr_info;
	while (action_item && action_item->type != RTE_FLOW_ACTION_TYPE_END) {
		hdr_info = &ulp_act_info[action_item->type];
		if (hdr_info->act_type ==
		    BNXT_ULP_ACT_TYPE_NOT_SUPPORTED) {
			BNXT_TF_DBG(ERR,
				    "Truflow parser does not support act %u\n",
				    action_item->type);
			return BNXT_TF_RC_ERROR;
		} else if (hdr_info->act_type ==
		    BNXT_ULP_ACT_TYPE_SUPPORTED) {
			if (hdr_info->proto_act_func) {
				if (hdr_info->proto_act_func(action_item,
							     params) !=
				    BNXT_TF_RC_SUCCESS) {
					return BNXT_TF_RC_ERROR;
				}
			}
		}
		action_item++;
	}
	ulp_rte_parser_implicit_act_port_process(params);
	return BNXT_TF_RC_SUCCESS;
}
int32_t bnxt_ulp_rte_parser_act_parse ( const struct rte_flow_action actions [ ] , struct ulp_rte_parser_params * params ) { const struct rte_flow_action * action_item = actions ; struct bnxt_ulp_rte_act_info * hdr_info ; while ( action_item && action_item -> type != RTE_FLOW_ACTION_TYPE_END ) { hdr_info = & ulp_act_info [ action_item -> type ] ; if ( hdr_info -> act_type == BNXT_ULP_ACT_TYPE_NOT_SUPPORTED ) { BNXT_TF_DBG ( ERR , " \n " , action_item -> type ) ; return BNXT_TF_RC_ERROR ; } else if ( hdr_info -> act_type == BNXT_ULP_ACT_TYPE_SUPPORTED ) { if ( hdr_info -> proto_act_func ) { if ( hdr_info -> proto_act_func ( action_item , params ) != BNXT_TF_RC_SUCCESS ) { return BNXT_TF_RC_ERROR ; } } } action_item ++ ; } ulp_rte_parser_implicit_act_port_process ( params ) ; return BNXT_TF_RC_SUCCESS ; }
Function to handle the parsing of RTE Flows and placing
 the RTE flow actions into the ulp structures.
Function to handle the parsing of RTE Flows and placing the RTE flow actions into the ulp structures .
/* Parse all the items in the pattern */ /* get the header information from the flow_hdr_info table */ /* call the registered callback handler */ /* update the implied port details */