src/dpdk/drivers/net/igc/igc_flow.c
static int
igc_disable_flow(struct rte_eth_dev *dev, struct rte_flow *flow)
{
	int ret = 0;

	switch (flow->filter_type) {
	case IGC_FILTER_TYPE_ETHERTYPE:
		ret = igc_del_ethertype_filter(dev,
			(struct igc_ethertype_filter *)&flow->filter);
		break;
	case IGC_FILTER_TYPE_NTUPLE:
		ret = igc_del_ntuple_filter(dev,
				(struct igc_ntuple_filter *)&flow->filter);
		break;
	case IGC_FILTER_TYPE_SYN:
		igc_clear_syn_filter(dev);
		break;
	case IGC_FILTER_TYPE_HASH:
		ret = igc_del_rss_filter(dev);
		break;
	default:
		PMD_DRV_LOG(ERR, "Filter type (%d) not supported",
				flow->filter_type);
		ret = -EINVAL;
	}

	return ret;
}
/**
 * Disable a valid flow, the flow must be not NULL and
 * chained in the device flow list.
 **/
Disable a valid flow, the flow must be not NULL and
chained in the device flow list.
Disable a valid flow the flow must be not NULL and chained in the device flow list .
static int
igc_disable_flow(struct rte_eth_dev *dev, struct rte_flow *flow)
{
	int ret = 0;
	switch (flow->filter_type) {
	case IGC_FILTER_TYPE_ETHERTYPE:
		ret = igc_del_ethertype_filter(dev,
			(struct igc_ethertype_filter *)&flow->filter);
		break;
	case IGC_FILTER_TYPE_NTUPLE:
		ret = igc_del_ntuple_filter(dev,
				(struct igc_ntuple_filter *)&flow->filter);
		break;
	case IGC_FILTER_TYPE_SYN:
		igc_clear_syn_filter(dev);
		break;
	case IGC_FILTER_TYPE_HASH:
		ret = igc_del_rss_filter(dev);
		break;
	default:
		PMD_DRV_LOG(ERR, "Filter type (%d) not supported",
				flow->filter_type);
		ret = -EINVAL;
	}
	return ret;
}
static int igc_disable_flow ( struct rte_eth_dev * dev , struct rte_flow * flow ) { int ret = 0 ; switch ( flow -> filter_type ) { case IGC_FILTER_TYPE_ETHERTYPE : ret = igc_del_ethertype_filter ( dev , ( struct igc_ethertype_filter * ) & flow -> filter ) ; break ; case IGC_FILTER_TYPE_NTUPLE : ret = igc_del_ntuple_filter ( dev , ( struct igc_ntuple_filter * ) & flow -> filter ) ; break ; case IGC_FILTER_TYPE_SYN : igc_clear_syn_filter ( dev ) ; break ; case IGC_FILTER_TYPE_HASH : ret = igc_del_rss_filter ( dev ) ; break ; default : PMD_DRV_LOG ( ERR , " " , flow -> filter_type ) ; ret = - EINVAL ; } return ret ; }
Disable a valid flow, the flow must be not NULL and
 chained in the device flow list.
Disable a valid flow the flow must be not NULL and chained in the device flow list .