src/dpdk/drivers/net/hns3/hns3_flow.c
static int
hns3_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
{
	struct hns3_adapter *hns = dev->data->dev_private;
	int ret;

	/* FDIR is available only in PF driver */
	if (!hns->is_vf) {
		ret = hns3_clear_all_fdir_filter(hns);
		if (ret) {
			rte_flow_error_set(error, ret,
					   RTE_FLOW_ERROR_TYPE_HANDLE,
					   NULL, "Failed to flush rule");
			return ret;
		}
		hns3_counter_flush(dev);
	}

	ret = hns3_clear_rss_filter(dev);
	if (ret) {
		rte_flow_error_set(error, ret, RTE_FLOW_ERROR_TYPE_HANDLE,
				   NULL, "Failed to flush rss filter");
		return ret;
	}

	hns3_filterlist_flush(dev);

	return 0;
}
/*  Destroy all flow rules associated with a port on hns3. */
Destroy all flow rules associated with a port on hns3.
Destroy all flow rules associated with a port on hns3 .
static int
hns3_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
{
	struct hns3_adapter *hns = dev->data->dev_private;
	int ret;
	if (!hns->is_vf) {
		ret = hns3_clear_all_fdir_filter(hns);
		if (ret) {
			rte_flow_error_set(error, ret,
					   RTE_FLOW_ERROR_TYPE_HANDLE,
					   NULL, "Failed to flush rule");
			return ret;
		}
		hns3_counter_flush(dev);
	}
	ret = hns3_clear_rss_filter(dev);
	if (ret) {
		rte_flow_error_set(error, ret, RTE_FLOW_ERROR_TYPE_HANDLE,
				   NULL, "Failed to flush rss filter");
		return ret;
	}
	hns3_filterlist_flush(dev);
	return 0;
}
static int hns3_flow_flush ( struct rte_eth_dev * dev , struct rte_flow_error * error ) { struct hns3_adapter * hns = dev -> data -> dev_private ; int ret ; if ( ! hns -> is_vf ) { ret = hns3_clear_all_fdir_filter ( hns ) ; if ( ret ) { rte_flow_error_set ( error , ret , RTE_FLOW_ERROR_TYPE_HANDLE , NULL , " " ) ; return ret ; } hns3_counter_flush ( dev ) ; } ret = hns3_clear_rss_filter ( dev ) ; if ( ret ) { rte_flow_error_set ( error , ret , RTE_FLOW_ERROR_TYPE_HANDLE , NULL , " " ) ; return ret ; } hns3_filterlist_flush ( dev ) ; return 0 ; }
Destroy all flow rules associated with a port on hns3.
Destroy all flow rules associated with a port on hns3 .
/* FDIR is available only in PF driver */