src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
static void
ulp_rte_l2_proto_type_update(struct ulp_rte_parser_params *param,
			     uint16_t type, uint32_t in_flag)
{
	if (type == tfp_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_IPV4);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L3, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_IPV4);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L3, 1);
		}
	} else if (type == tfp_cpu_to_be_16(RTE_ETHER_TYPE_IPV6))  {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_IPV6);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L3, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_IPV6);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L3, 1);
		}
	}
}
/* Function to handle the update of proto header based on field values */
Function to handle the update of proto header based on field values
Function to handle the update of proto header based on field values
static void
ulp_rte_l2_proto_type_update(struct ulp_rte_parser_params *param,
			     uint16_t type, uint32_t in_flag)
{
	if (type == tfp_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_IPV4);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L3, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_IPV4);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L3, 1);
		}
	} else if (type == tfp_cpu_to_be_16(RTE_ETHER_TYPE_IPV6))  {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_IPV6);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L3, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_IPV6);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L3, 1);
		}
	}
}
static void ulp_rte_l2_proto_type_update ( struct ulp_rte_parser_params * param , uint16_t type , uint32_t in_flag ) { if ( type == tfp_cpu_to_be_16 ( RTE_ETHER_TYPE_IPV4 ) ) { if ( in_flag ) { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_I_IPV4 ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_I_L3 , 1 ) ; } else { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_O_IPV4 ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_O_L3 , 1 ) ; } } else if ( type == tfp_cpu_to_be_16 ( RTE_ETHER_TYPE_IPV6 ) ) { if ( in_flag ) { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_I_IPV6 ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_I_L3 , 1 ) ; } else { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_O_IPV6 ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_O_L3 , 1 ) ; } } }
Function to handle the update of proto header based on field values
Function to handle the update of proto header based on field values