src/dpdk/drivers/net/i40e/i40e_ethdev.c
enum i40e_filter_pctype
i40e_flowtype_to_pctype(const struct i40e_adapter *adapter, uint16_t flow_type)
{
	int i;
	uint64_t pctype_mask;

	if (flow_type < I40E_FLOW_TYPE_MAX) {
		pctype_mask = adapter->pctypes_tbl[flow_type];
		for (i = I40E_FILTER_PCTYPE_MAX - 1; i > 0; i--) {
			if (pctype_mask & (1ULL << i))
				return (enum i40e_filter_pctype)i;
		}
	}
	return I40E_FILTER_PCTYPE_INVALID;
}
/*
 * For X722 it is possible to have multiple pctypes mapped to the same flowtype
 * however this function will return only one highest pctype index,
 * which is not quite correct. This is known problem of i40e driver
 * and needs to be fixed later.
 */
For X722 it is possible to have multiple pctypes mapped to the same flowtype
however this function will return only one highest pctype index,
which is not quite correct. This is known problem of i40e driver
and needs to be fixed later.
For X722 it is possible to have multiple pctypes mapped to the same flowtype however this function will return only one highest pctype index which is not quite correct . This is known problem of i40e driver and needs to be fixed later .
enum i40e_filter_pctype
i40e_flowtype_to_pctype(const struct i40e_adapter *adapter, uint16_t flow_type)
{
	int i;
	uint64_t pctype_mask;
	if (flow_type < I40E_FLOW_TYPE_MAX) {
		pctype_mask = adapter->pctypes_tbl[flow_type];
		for (i = I40E_FILTER_PCTYPE_MAX - 1; i > 0; i--) {
			if (pctype_mask & (1ULL << i))
				return (enum i40e_filter_pctype)i;
		}
	}
	return I40E_FILTER_PCTYPE_INVALID;
}
enum i40e_filter_pctype i40e_flowtype_to_pctype ( const struct i40e_adapter * adapter , uint16_t flow_type ) { int i ; uint64_t pctype_mask ; if ( flow_type < I40E_FLOW_TYPE_MAX ) { pctype_mask = adapter -> pctypes_tbl [ flow_type ] ; for ( i = I40E_FILTER_PCTYPE_MAX - 1 ; i > 0 ; i -- ) { if ( pctype_mask & ( 1ULL << i ) ) return ( enum i40e_filter_pctype ) i ; } } return I40E_FILTER_PCTYPE_INVALID ; }
For X722 it is possible to have multiple pctypes mapped to the same flowtype
 however this function will return only one highest pctype index,
 which is not quite correct.
For X722 it is possible to have multiple pctypes mapped to the same flowtype however this function will return only one highest pctype index which is not quite correct .