src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
static void
bnxt_ulp_rte_parser_direction_compute(struct ulp_rte_parser_params *params)
{
	enum bnxt_ulp_intf_type match_port_type;

	/* Get the match port type */
	match_port_type = ULP_COMP_FLD_IDX_RD(params,
					      BNXT_ULP_CF_IDX_MATCH_PORT_TYPE);

	/* If ingress flow and matchport is vf rep then dir is egress*/
	if ((params->dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS) &&
	    match_port_type == BNXT_ULP_INTF_TYPE_VF_REP) {
		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_DIRECTION,
				    BNXT_ULP_DIR_EGRESS);
	} else {
		/* Assign the input direction */
		if (params->dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS)
			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_DIRECTION,
					    BNXT_ULP_DIR_INGRESS);
		else
			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_DIRECTION,
					    BNXT_ULP_DIR_EGRESS);
	}
}
/*
 * Function to compute the flow direction based on the match port details
 */
Function to compute the flow direction based on the match port details
Function to compute the flow direction based on the match port details
static void
bnxt_ulp_rte_parser_direction_compute(struct ulp_rte_parser_params *params)
{
	enum bnxt_ulp_intf_type match_port_type;
	match_port_type = ULP_COMP_FLD_IDX_RD(params,
					      BNXT_ULP_CF_IDX_MATCH_PORT_TYPE);
	if ((params->dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS) &&
	    match_port_type == BNXT_ULP_INTF_TYPE_VF_REP) {
		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_DIRECTION,
				    BNXT_ULP_DIR_EGRESS);
	} else {
		if (params->dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS)
			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_DIRECTION,
					    BNXT_ULP_DIR_INGRESS);
		else
			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_DIRECTION,
					    BNXT_ULP_DIR_EGRESS);
	}
}
static void bnxt_ulp_rte_parser_direction_compute ( struct ulp_rte_parser_params * params ) { enum bnxt_ulp_intf_type match_port_type ; match_port_type = ULP_COMP_FLD_IDX_RD ( params , BNXT_ULP_CF_IDX_MATCH_PORT_TYPE ) ; if ( ( params -> dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS ) && match_port_type == BNXT_ULP_INTF_TYPE_VF_REP ) { ULP_COMP_FLD_IDX_WR ( params , BNXT_ULP_CF_IDX_DIRECTION , BNXT_ULP_DIR_EGRESS ) ; } else { if ( params -> dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS ) ULP_COMP_FLD_IDX_WR ( params , BNXT_ULP_CF_IDX_DIRECTION , BNXT_ULP_DIR_INGRESS ) ; else ULP_COMP_FLD_IDX_WR ( params , BNXT_ULP_CF_IDX_DIRECTION , BNXT_ULP_DIR_EGRESS ) ; } }
Function to compute the flow direction based on the match port details
Function to compute the flow direction based on the match port details
/* Get the match port type */ /* If ingress flow and matchport is vf rep then dir is egress*/ /* Assign the input direction */