src/dpdk/drivers/net/mvpp2/mrvl_flow.c
static inline enum pp2_cls_tbl_type
mrvl_engine_type(const struct rte_flow *flow)
{
	int i, size = 0;

	for (i = 0; i < flow->rule.num_fields; i++)
		size += flow->rule.fields[i].size;

	/*
	 * For maskable engine type the key size must be up to 8 bytes.
	 * For keys with size bigger than 8 bytes, engine type must
	 * be set to exact match.
	 */
	if (size > 8)
		return PP2_CLS_TBL_EXACT_MATCH;

	return PP2_CLS_TBL_MASKABLE;
}
/**
 * Get engine type for the given flow.
 *
 * @param field Pointer to the flow.
 * @returns The type of the engine.
 */
Get engine type for the given flow.
@param field Pointer to the flow.
@returns The type of the engine.
Get engine type for the given flow . @param field Pointer to the flow . @returns The type of the engine .
static inline enum pp2_cls_tbl_type
mrvl_engine_type(const struct rte_flow *flow)
{
	int i, size = 0;
	for (i = 0; i < flow->rule.num_fields; i++)
		size += flow->rule.fields[i].size;
	if (size > 8)
		return PP2_CLS_TBL_EXACT_MATCH;
	return PP2_CLS_TBL_MASKABLE;
}
static inline enum pp2_cls_tbl_type mrvl_engine_type ( const struct rte_flow * flow ) { int i , size = 0 ; for ( i = 0 ; i < flow -> rule . num_fields ; i ++ ) size += flow -> rule . fields [ i ] . size ; if ( size > 8 ) return PP2_CLS_TBL_EXACT_MATCH ; return PP2_CLS_TBL_MASKABLE ; }
Get engine type for the given flow.
Get engine type for the given flow .
/*
	 * For maskable engine type the key size must be up to 8 bytes.
	 * For keys with size bigger than 8 bytes, engine type must
	 * be set to exact match.
	 */