src/dpdk/drivers/net/bnxt/tf_ulp/ulp_mapper.c
static int32_t
ulp_mapper_tbl_memtype_opcode_process(struct bnxt_ulp_mapper_parms *parms,
				      struct bnxt_ulp_mapper_tbl_info *tbl)
{
	enum bnxt_ulp_flow_mem_type mtype = BNXT_ULP_FLOW_MEM_TYPE_INT;
	int32_t rc = 1;

	bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype);

	switch (tbl->mem_type_opcode) {
	case BNXT_ULP_MEM_TYPE_OPCODE_EXECUTE_IF_INT:
		if (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT)
			rc = 0;
		break;
	case BNXT_ULP_MEM_TYPE_OPCODE_EXECUTE_IF_EXT:
		if (mtype == BNXT_ULP_FLOW_MEM_TYPE_EXT)
			rc = 0;
		break;
	case BNXT_ULP_MEM_TYPE_OPCODE_NOP:
		rc = 0;
		break;
	default:
		BNXT_TF_DBG(ERR,
			    "Invalid arg in mapper in memtype opcode\n");
		break;
	}
	return rc;
}
/*
 * Function to process the memtype opcode of the mapper table.
 * returns 1 to skip the table.
 * return 0 to continue processing the table.
 *
 * defaults to skip
 */
Function to process the memtype opcode of the mapper table.
returns 1 to skip the table.
return 0 to continue processing the table.

defaults to skip
Function to process the memtype opcode of the mapper table . returns 1 to skip the table . return 0 to continue processing the table . defaults to skip
static int32_t
ulp_mapper_tbl_memtype_opcode_process(struct bnxt_ulp_mapper_parms *parms,
				      struct bnxt_ulp_mapper_tbl_info *tbl)
{
	enum bnxt_ulp_flow_mem_type mtype = BNXT_ULP_FLOW_MEM_TYPE_INT;
	int32_t rc = 1;
	bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype);
	switch (tbl->mem_type_opcode) {
	case BNXT_ULP_MEM_TYPE_OPCODE_EXECUTE_IF_INT:
		if (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT)
			rc = 0;
		break;
	case BNXT_ULP_MEM_TYPE_OPCODE_EXECUTE_IF_EXT:
		if (mtype == BNXT_ULP_FLOW_MEM_TYPE_EXT)
			rc = 0;
		break;
	case BNXT_ULP_MEM_TYPE_OPCODE_NOP:
		rc = 0;
		break;
	default:
		BNXT_TF_DBG(ERR,
			    "Invalid arg in mapper in memtype opcode\n");
		break;
	}
	return rc;
}
static int32_t ulp_mapper_tbl_memtype_opcode_process ( struct bnxt_ulp_mapper_parms * parms , struct bnxt_ulp_mapper_tbl_info * tbl ) { enum bnxt_ulp_flow_mem_type mtype = BNXT_ULP_FLOW_MEM_TYPE_INT ; int32_t rc = 1 ; bnxt_ulp_cntxt_mem_type_get ( parms -> ulp_ctx , & mtype ) ; switch ( tbl -> mem_type_opcode ) { case BNXT_ULP_MEM_TYPE_OPCODE_EXECUTE_IF_INT : if ( mtype == BNXT_ULP_FLOW_MEM_TYPE_INT ) rc = 0 ; break ; case BNXT_ULP_MEM_TYPE_OPCODE_EXECUTE_IF_EXT : if ( mtype == BNXT_ULP_FLOW_MEM_TYPE_EXT ) rc = 0 ; break ; case BNXT_ULP_MEM_TYPE_OPCODE_NOP : rc = 0 ; break ; default : BNXT_TF_DBG ( ERR , " \n " ) ; break ; } return rc ; }
Function to process the memtype opcode of the mapper table.
Function to process the memtype opcode of the mapper table .