From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id CDAA729C7 for ; Tue, 3 Jan 2017 04:05:23 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 02 Jan 2017 19:05:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,451,1477983600"; d="scan'208,217";a="208970317" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga004.fm.intel.com with ESMTP; 02 Jan 2017 19:05:11 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.52]) by KMSMSX153.gar.corp.intel.com ([172.21.73.88]) with mapi id 14.03.0248.002; Tue, 3 Jan 2017 11:05:08 +0800 From: "Zhao1, Wei" To: "Xing, Beilei" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH v2 15/18] net/ixgbe: parse flow director filter Thread-Index: AQHSYnKIKZCzm2Gns02oT+gI5OTeTKEkzYCAgAFICXA= Date: Tue, 3 Jan 2017 03:05:07 +0000 Message-ID: References: <1483084390-53159-1-git-send-email-wei.zhao1@intel.com> <1483084390-53159-16-git-send-email-wei.zhao1@intel.com> <94479800C636CB44BD422CB454846E013158CF29@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <94479800C636CB44BD422CB454846E013158CF29@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.20.205] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 15/18] net/ixgbe: parse flow director filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 03:05:24 -0000 Hi, beilei > -----Original Message----- > From: Xing, Beilei > Sent: Monday, January 2, 2017 11:24 PM > To: Zhao1, Wei ; dev@dpdk.org > Cc: Zhao1, Wei ; Lu, Wenzhuo > > Subject: RE: [dpdk-dev] [PATCH v2 15/18] net/ixgbe: parse flow director f= ilter > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao > > Sent: Friday, December 30, 2016 3:53 PM > > To: dev@dpdk.org > > Cc: Zhao1, Wei >; Lu, W= enzhuo > > > > > 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 in= fo. > > > > Signed-off-by: Wei Zhao > > > Signed-off-by: Wenzhuo Lu > > > > > --- > > > > 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 patte= rn[], > > + const struct rte_flow_action act= ions[], > > + 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 memor= y for fdir hash map!"); > > return -ENOMEM; > > } > > + fdir_info->mask_added =3D 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 patt= ern[], > > - const struct rte_flow_action ac= tions[], > > - 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, pa= th 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 pa= ttern[], + const struct rte_flow_action = actions[], + struct rte_eth_l2_tunnel_conf= *filter, + struct rte_flow_error *error)