src/dpdk/drivers/net/ixgbe/ixgbe_fdir.c
int
ixgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)
{
	struct ixgbe_hw_fdir_info *fdir_info =
		IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
	struct ixgbe_fdir_filter *fdir_filter;
	struct ixgbe_fdir_filter *filter_flag;
	int ret = 0;

	/* flush flow director */
	rte_hash_reset(fdir_info->hash_handle);
	memset(fdir_info->hash_map, 0,
	       sizeof(struct ixgbe_fdir_filter *) * IXGBE_MAX_FDIR_FILTER_NUM);
	filter_flag = TAILQ_FIRST(&fdir_info->fdir_list);
	while ((fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list))) {
		TAILQ_REMOVE(&fdir_info->fdir_list,
			     fdir_filter,
			     entries);
		rte_free(fdir_filter);
	}

	if (filter_flag != NULL)
		ret = ixgbe_fdir_flush(dev);

	return ret;
}
/* remove all the flow director filters */
remove all the flow director filters
remove all the flow director filters
int
ixgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)
{
	struct ixgbe_hw_fdir_info *fdir_info =
		IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
	struct ixgbe_fdir_filter *fdir_filter;
	struct ixgbe_fdir_filter *filter_flag;
	int ret = 0;
	rte_hash_reset(fdir_info->hash_handle);
	memset(fdir_info->hash_map, 0,
	       sizeof(struct ixgbe_fdir_filter *) * IXGBE_MAX_FDIR_FILTER_NUM);
	filter_flag = TAILQ_FIRST(&fdir_info->fdir_list);
	while ((fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list))) {
		TAILQ_REMOVE(&fdir_info->fdir_list,
			     fdir_filter,
			     entries);
		rte_free(fdir_filter);
	}
	if (filter_flag != NULL)
		ret = ixgbe_fdir_flush(dev);
	return ret;
}
int ixgbe_clear_all_fdir_filter ( struct rte_eth_dev * dev ) { struct ixgbe_hw_fdir_info * fdir_info = IXGBE_DEV_PRIVATE_TO_FDIR_INFO ( dev -> data -> dev_private ) ; struct ixgbe_fdir_filter * fdir_filter ; struct ixgbe_fdir_filter * filter_flag ; int ret = 0 ; rte_hash_reset ( fdir_info -> hash_handle ) ; memset ( fdir_info -> hash_map , 0 , sizeof ( struct ixgbe_fdir_filter * ) * IXGBE_MAX_FDIR_FILTER_NUM ) ; filter_flag = TAILQ_FIRST ( & fdir_info -> fdir_list ) ; while ( ( fdir_filter = TAILQ_FIRST ( & fdir_info -> fdir_list ) ) ) { TAILQ_REMOVE ( & fdir_info -> fdir_list , fdir_filter , entries ) ; rte_free ( fdir_filter ) ; } if ( filter_flag != NULL ) ret = ixgbe_fdir_flush ( dev ) ; return ret ; }
remove all the flow director filters
remove all the flow director filters
/* flush flow director */