src/dpdk/drivers/net/e1000/igb_ethdev.c
void
igb_remove_flex_filter(struct rte_eth_dev *dev,
			struct e1000_flex_filter *filter)
{
	struct e1000_filter_info *filter_info =
		E1000_DEV_PRIVATE_TO_FILTER_INFO(dev->data->dev_private);
	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
	uint32_t wufc, i;
	uint32_t reg_off;

	wufc = E1000_READ_REG(hw, E1000_WUFC);
	if (filter->index < E1000_MAX_FHFT)
		reg_off = E1000_FHFT(filter->index);
	else
		reg_off = E1000_FHFT_EXT(filter->index - E1000_MAX_FHFT);

	for (i = 0; i < E1000_FHFT_SIZE_IN_DWD; i++)
		E1000_WRITE_REG(hw, reg_off + i * sizeof(uint32_t), 0);

	E1000_WRITE_REG(hw, E1000_WUFC, wufc &
		(~(E1000_WUFC_FLX0 << filter->index)));

	filter_info->flex_mask &= ~(1 << filter->index);
	TAILQ_REMOVE(&filter_info->flex_list, filter, entries);
	rte_free(filter);
}
/* remove a flex byte filter
 * @param
 * dev: Pointer to struct rte_eth_dev.
 * filter: the pointer of the filter will be removed.
 */
remove a flex byte filter
@param
dev: Pointer to struct rte_eth_dev.
filter: the pointer of the filter will be removed.
remove a flex byte filter @param dev : Pointer to struct rte_eth_dev . filter : the pointer of the filter will be removed .
void
igb_remove_flex_filter(struct rte_eth_dev *dev,
			struct e1000_flex_filter *filter)
{
	struct e1000_filter_info *filter_info =
		E1000_DEV_PRIVATE_TO_FILTER_INFO(dev->data->dev_private);
	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
	uint32_t wufc, i;
	uint32_t reg_off;
	wufc = E1000_READ_REG(hw, E1000_WUFC);
	if (filter->index < E1000_MAX_FHFT)
		reg_off = E1000_FHFT(filter->index);
	else
		reg_off = E1000_FHFT_EXT(filter->index - E1000_MAX_FHFT);
	for (i = 0; i < E1000_FHFT_SIZE_IN_DWD; i++)
		E1000_WRITE_REG(hw, reg_off + i * sizeof(uint32_t), 0);
	E1000_WRITE_REG(hw, E1000_WUFC, wufc &
		(~(E1000_WUFC_FLX0 << filter->index)));
	filter_info->flex_mask &= ~(1 << filter->index);
	TAILQ_REMOVE(&filter_info->flex_list, filter, entries);
	rte_free(filter);
}
void igb_remove_flex_filter ( struct rte_eth_dev * dev , struct e1000_flex_filter * filter ) { struct e1000_filter_info * filter_info = E1000_DEV_PRIVATE_TO_FILTER_INFO ( dev -> data -> dev_private ) ; struct e1000_hw * hw = E1000_DEV_PRIVATE_TO_HW ( dev -> data -> dev_private ) ; uint32_t wufc , i ; uint32_t reg_off ; wufc = E1000_READ_REG ( hw , E1000_WUFC ) ; if ( filter -> index < E1000_MAX_FHFT ) reg_off = E1000_FHFT ( filter -> index ) ; else reg_off = E1000_FHFT_EXT ( filter -> index - E1000_MAX_FHFT ) ; for ( i = 0 ; i < E1000_FHFT_SIZE_IN_DWD ; i ++ ) E1000_WRITE_REG ( hw , reg_off + i * sizeof ( uint32_t ) , 0 ) ; E1000_WRITE_REG ( hw , E1000_WUFC , wufc & ( ~ ( E1000_WUFC_FLX0 << filter -> index ) ) ) ; filter_info -> flex_mask &= ~ ( 1 << filter -> index ) ; TAILQ_REMOVE ( & filter_info -> flex_list , filter , entries ) ; rte_free ( filter ) ; }
remove a flex byte filter
 @param
 dev: Pointer to struct rte_eth_dev.
remove a flex byte filter @param dev : Pointer to struct rte_eth_dev .