[dpdk-dev] [PATCH v2 15/18] net/ixgbe: parse flow director filter

Xing, Beilei beilei.xing at intel.com
Mon Jan 2 16:24:05 CET 2017


> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Wei Zhao
> Sent: Friday, December 30, 2016 3:53 PM
> To: dev at dpdk.org
> Cc: Zhao1, Wei <wei.zhao1 at intel.com>; Lu, Wenzhuo <wenzhuo.lu at intel.com>
> Subject: [dpdk-dev] [PATCH v2 15/18] net/ixgbe: parse flow director filter
> 
> check if the rule is a flow director rule, and get the flow director info.
> 
> Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> 
> ---
> 
> v2:add new error set function
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 1467
> +++++++++++++++++++++++++++++++++-----
>  drivers/net/ixgbe/ixgbe_ethdev.h |   16 +
>  drivers/net/ixgbe/ixgbe_fdir.c   |  247 ++++---
>  lib/librte_ether/rte_flow.h      |   23 +
>  4 files changed, 1495 insertions(+), 258 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 0a5ac4f..c98aa0d 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -438,6 +438,31 @@ ixgbe_validate_l2_tn_filter(struct rte_eth_dev *dev,
>  			struct rte_eth_l2_tunnel_conf *rule,
>  			struct rte_flow_error *error);
>  static int
> +ixgbe_validate_fdir_filter(struct rte_eth_dev *dev,
> +			const struct rte_flow_attr *attr,
> +			const struct rte_flow_item pattern[],
> +			const struct rte_flow_action actions[],
> +			struct ixgbe_fdir_rule *rule,
> +			struct rte_flow_error *error);
> +static int
> +ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr,
> +		const struct rte_flow_item pattern[],
> +		const struct rte_flow_action actions[],
> +		struct ixgbe_fdir_rule *rule,
> +		struct rte_flow_error *error);
> +static int
> +ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
> +		const struct rte_flow_item pattern[],
> +		const struct rte_flow_action actions[],
> +		struct ixgbe_fdir_rule *rule,
> +		struct rte_flow_error *error);
> +static int
> +ixgbe_parse_fdir_filter(const struct rte_flow_attr *attr,
> +		const struct rte_flow_item pattern[],
> +		const struct rte_flow_action actions[],
> +		struct ixgbe_fdir_rule *rule,
> +		struct rte_flow_error *error);
> +static int
>  ixgbe_flow_validate(__rte_unused struct rte_eth_dev *dev,
>  		const struct rte_flow_attr *attr,
>  		const struct rte_flow_item pattern[],
> @@ -1475,6 +1500,8 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev
> *eth_dev)
>  			     "Failed to allocate memory for fdir hash map!");
>  		return -ENOMEM;
>  	}
> +	fdir_info->mask_added = FALSE;
> +
>  	return 0;
>  }
> 
> @@ -8951,117 +8978,22 @@ ixgbe_parse_syn_filter(const struct
> rte_flow_attr *attr,
>  	return 0;
>  }
> 
> -/**
> - * Parse the rule to see if it is a L2 tunnel rule.
> - * And get the L2 tunnel filter info BTW.
> - * Only support E-tag now.
> - */
> +/* Parse to get the attr and action info of flow director rule. */
>  static int
> -cons_parse_l2_tn_filter(const struct rte_flow_attr *attr,
> -			const struct rte_flow_item pattern[],
> -			const struct rte_flow_action actions[],
> -			struct rte_eth_l2_tunnel_conf *filter,
> -			struct rte_flow_error *error)

Why do u remove functions added in patch 14/18? If the functions don't be needed, how about changing patch 14/18?


More information about the dev mailing list