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

	switch (tbl->cond_opcode) {
	case BNXT_ULP_COND_OPCODE_NOP:
		rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET:
		if (tbl->cond_operand < BNXT_ULP_CF_IDX_LAST &&
		    ULP_COMP_FLD_IDX_RD(parms, tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_ACTION_BIT_IS_SET:
		if (ULP_BITMAP_ISSET(parms->act_bitmap->bits,
				     tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_HDR_BIT_IS_SET:
		if (ULP_BITMAP_ISSET(parms->hdr_bitmap->bits,
				     tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_COMP_FIELD_NOT_SET:
		if (tbl->cond_operand < BNXT_ULP_CF_IDX_LAST &&
		    !ULP_COMP_FLD_IDX_RD(parms, tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_ACTION_BIT_NOT_SET:
		if (!ULP_BITMAP_ISSET(parms->act_bitmap->bits,
				      tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_HDR_BIT_NOT_SET:
		if (!ULP_BITMAP_ISSET(parms->hdr_bitmap->bits,
				      tbl->cond_operand))
			rc = 0;
		break;
	default:
		BNXT_TF_DBG(ERR,
			    "Invalid arg in mapper tbl for cond opcode\n");
		break;
	}
	return rc;
}
/*
 * Function to process the conditional 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 conditional 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 conditional 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_cond_opcode_process(struct bnxt_ulp_mapper_parms *parms,
				   struct bnxt_ulp_mapper_tbl_info *tbl)
{
	int32_t rc = 1;
	switch (tbl->cond_opcode) {
	case BNXT_ULP_COND_OPCODE_NOP:
		rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET:
		if (tbl->cond_operand < BNXT_ULP_CF_IDX_LAST &&
		    ULP_COMP_FLD_IDX_RD(parms, tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_ACTION_BIT_IS_SET:
		if (ULP_BITMAP_ISSET(parms->act_bitmap->bits,
				     tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_HDR_BIT_IS_SET:
		if (ULP_BITMAP_ISSET(parms->hdr_bitmap->bits,
				     tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_COMP_FIELD_NOT_SET:
		if (tbl->cond_operand < BNXT_ULP_CF_IDX_LAST &&
		    !ULP_COMP_FLD_IDX_RD(parms, tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_ACTION_BIT_NOT_SET:
		if (!ULP_BITMAP_ISSET(parms->act_bitmap->bits,
				      tbl->cond_operand))
			rc = 0;
		break;
	case BNXT_ULP_COND_OPCODE_HDR_BIT_NOT_SET:
		if (!ULP_BITMAP_ISSET(parms->hdr_bitmap->bits,
				      tbl->cond_operand))
			rc = 0;
		break;
	default:
		BNXT_TF_DBG(ERR,
			    "Invalid arg in mapper tbl for cond opcode\n");
		break;
	}
	return rc;
}
static int32_t ulp_mapper_tbl_cond_opcode_process ( struct bnxt_ulp_mapper_parms * parms , struct bnxt_ulp_mapper_tbl_info * tbl ) { int32_t rc = 1 ; switch ( tbl -> cond_opcode ) { case BNXT_ULP_COND_OPCODE_NOP : rc = 0 ; break ; case BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET : if ( tbl -> cond_operand < BNXT_ULP_CF_IDX_LAST && ULP_COMP_FLD_IDX_RD ( parms , tbl -> cond_operand ) ) rc = 0 ; break ; case BNXT_ULP_COND_OPCODE_ACTION_BIT_IS_SET : if ( ULP_BITMAP_ISSET ( parms -> act_bitmap -> bits , tbl -> cond_operand ) ) rc = 0 ; break ; case BNXT_ULP_COND_OPCODE_HDR_BIT_IS_SET : if ( ULP_BITMAP_ISSET ( parms -> hdr_bitmap -> bits , tbl -> cond_operand ) ) rc = 0 ; break ; case BNXT_ULP_COND_OPCODE_COMP_FIELD_NOT_SET : if ( tbl -> cond_operand < BNXT_ULP_CF_IDX_LAST && ! ULP_COMP_FLD_IDX_RD ( parms , tbl -> cond_operand ) ) rc = 0 ; break ; case BNXT_ULP_COND_OPCODE_ACTION_BIT_NOT_SET : if ( ! ULP_BITMAP_ISSET ( parms -> act_bitmap -> bits , tbl -> cond_operand ) ) rc = 0 ; break ; case BNXT_ULP_COND_OPCODE_HDR_BIT_NOT_SET : if ( ! ULP_BITMAP_ISSET ( parms -> hdr_bitmap -> bits , tbl -> cond_operand ) ) rc = 0 ; break ; default : BNXT_TF_DBG ( ERR , " \n " ) ; break ; } return rc ; }
Function to process the conditional opcode of the mapper table.
Function to process the conditional opcode of the mapper table .