src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
static void
ulp_rte_l3_proto_type_update(struct ulp_rte_parser_params *param,
			     uint8_t proto, uint32_t in_flag)
{
	if (proto == IPPROTO_UDP) {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_UDP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L4, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_UDP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L4, 1);
		}
	} else if (proto == IPPROTO_TCP) {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_TCP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L4, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_TCP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L4, 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_l3_proto_type_update(struct ulp_rte_parser_params *param,
			     uint8_t proto, uint32_t in_flag)
{
	if (proto == IPPROTO_UDP) {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_UDP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L4, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_UDP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L4, 1);
		}
	} else if (proto == IPPROTO_TCP) {
		if (in_flag) {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_I_TCP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_I_L4, 1);
		} else {
			ULP_BITMAP_SET(param->hdr_fp_bit.bits,
				       BNXT_ULP_HDR_BIT_O_TCP);
			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_O_L4, 1);
		}
	}
}
static void ulp_rte_l3_proto_type_update ( struct ulp_rte_parser_params * param , uint8_t proto , uint32_t in_flag ) { if ( proto == IPPROTO_UDP ) { if ( in_flag ) { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_I_UDP ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_I_L4 , 1 ) ; } else { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_O_UDP ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_O_L4 , 1 ) ; } } else if ( proto == IPPROTO_TCP ) { if ( in_flag ) { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_I_TCP ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_I_L4 , 1 ) ; } else { ULP_BITMAP_SET ( param -> hdr_fp_bit . bits , BNXT_ULP_HDR_BIT_O_TCP ) ; ULP_COMP_FLD_IDX_WR ( param , BNXT_ULP_CF_IDX_O_L4 , 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