src/dpdk/drivers/net/hns3/hns3_flow.c
static int
hns3_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
		   const struct rte_flow_item pattern[],
		   const struct rte_flow_action actions[],
		   struct rte_flow_error *error)
{
	struct hns3_fdir_rule fdir_rule;
	int ret;

	ret = hns3_flow_args_check(attr, pattern, actions, error);
	if (ret)
		return ret;

	if (hns3_find_rss_general_action(pattern, actions))
		return hns3_parse_rss_filter(dev, actions, error);

	memset(&fdir_rule, 0, sizeof(struct hns3_fdir_rule));
	return hns3_parse_fdir_filter(dev, pattern, actions, &fdir_rule, error);
}
/*
 * Check if the flow rule is supported by hns3.
 * It only checkes the format. Don't guarantee the rule can be programmed into
 * the HW. Because there can be no enough room for the rule.
 */
Check if the flow rule is supported by hns3.
It only checkes the format. Don't guarantee the rule can be programmed into
the HW. Because there can be no enough room for the rule.
Check if the flow rule is supported by hns3 . It only checkes the format . Don ' t guarantee the rule can be programmed into the HW . Because there can be no enough room for the rule .
static int
hns3_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
		   const struct rte_flow_item pattern[],
		   const struct rte_flow_action actions[],
		   struct rte_flow_error *error)
{
	struct hns3_fdir_rule fdir_rule;
	int ret;
	ret = hns3_flow_args_check(attr, pattern, actions, error);
	if (ret)
		return ret;
	if (hns3_find_rss_general_action(pattern, actions))
		return hns3_parse_rss_filter(dev, actions, error);
	memset(&fdir_rule, 0, sizeof(struct hns3_fdir_rule));
	return hns3_parse_fdir_filter(dev, pattern, actions, &fdir_rule, error);
}
static int hns3_flow_validate ( struct rte_eth_dev * dev , const struct rte_flow_attr * attr , const struct rte_flow_item pattern [ ] , const struct rte_flow_action actions [ ] , struct rte_flow_error * error ) { struct hns3_fdir_rule fdir_rule ; int ret ; ret = hns3_flow_args_check ( attr , pattern , actions , error ) ; if ( ret ) return ret ; if ( hns3_find_rss_general_action ( pattern , actions ) ) return hns3_parse_rss_filter ( dev , actions , error ) ; memset ( & fdir_rule , 0 , sizeof ( struct hns3_fdir_rule ) ) ; return hns3_parse_fdir_filter ( dev , pattern , actions , & fdir_rule , error ) ; }
Check if the flow rule is supported by hns3.
Check if the flow rule is supported by hns3 .