Hi, beilei
> -----Original Message----- > From: Xing, Beilei > Sent: Monday, January 2, 2017 11:24 PM > To: Zhao1, Wei <wei.zh...@intel.com>; dev@dpdk.org > Cc: Zhao1, Wei <wei.zh...@intel.com>; Lu, Wenzhuo > <wenzhuo...@intel.com> > Subject: RE: [dpdk-dev] [PATCH v2 15/18] net/ixgbe: parse flow director filter > > > > -----Original Message----- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Wei Zhao > > Sent: Friday, December 30, 2016 3:53 PM > > To: dev@dpdk.org<mailto:dev@dpdk.org> > > Cc: Zhao1, Wei <wei.zh...@intel.com<mailto:wei.zh...@intel.com>>; Lu, > > Wenzhuo > > <wenzhuo...@intel.com<mailto:wenzhuo...@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.zh...@intel.com<mailto:wei.zh...@intel.com>> > > Signed-off-by: Wenzhuo Lu > > <wenzhuo...@intel.com<mailto:wenzhuo...@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? This patch is generate in a very complicated way. If you go on reading this patch, you will find the following statement, path add the functions back itself latter So the git seem to generate a patch in a peculiar way. +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)