[dpdk-dev] [PATCH v2 07/17] net/i40e: add flow validate function

Wu, Jingjing jingjing.wu at intel.com
Wed Dec 28 03:52:14 CET 2016


> 
> +union i40e_filter_t {
> +	struct rte_eth_ethertype_filter ethertype_filter;
> +	struct rte_eth_fdir_filter fdir_filter;
> +	struct rte_eth_tunnel_filter_conf tunnel_filter; } cons_filter;
> +
> +typedef int (*parse_filter_t)(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,
> +			      union i40e_filter_t *filter);
You can use void* instead of define union i40e_filter_t.

> +struct i40e_valid_pattern {
> +	enum rte_flow_item_type *items;
What the item points to? Add few comments 
> +
> +	ret = parse_filter(dev, attr, items, actions, error, &cons_filter);

Will you use cons_filter later? If not, it looks like we don't need the argument at all.
> +
> +	rte_free(items);
> +
> +	return ret;
> +}
> --
> 2.5.5



More information about the dev mailing list