From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 060924CE6 for ; Tue, 3 Jan 2017 04:11:47 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 02 Jan 2017 19:11:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,451,1477983600"; d="scan'208";a="1107134915" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by fmsmga002.fm.intel.com with ESMTP; 02 Jan 2017 19:11:46 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.52]) by KMSMSX151.gar.corp.intel.com ([169.254.10.189]) with mapi id 14.03.0248.002; Tue, 3 Jan 2017 11:11:44 +0800 From: "Zhao1, Wei" To: "Xing, Beilei" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH v2 16/18] net/ixgbe: create consistent filter Thread-Index: AQHSYnKYX3S22U2SCk+56FpyHtF+eaElgGGAgACYhLA= Date: Tue, 3 Jan 2017 03:11:41 +0000 Message-ID: References: <1483084390-53159-1-git-send-email-wei.zhao1@intel.com> <1483084390-53159-17-git-send-email-wei.zhao1@intel.com> <94479800C636CB44BD422CB454846E013158D005@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <94479800C636CB44BD422CB454846E013158D005@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] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 16/18] net/ixgbe: create consistent 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:11:48 -0000 Hi,beilei > -----Original Message----- > From: Xing, Beilei > Sent: Tuesday, January 3, 2017 10:04 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: Zhao1, Wei ; Lu, Wenzhuo > > Subject: RE: [dpdk-dev] [PATCH v2 16/18] net/ixgbe: create consistent fil= ter >=20 >=20 >=20 > > -----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, Wenzhuo > > > > Subject: [dpdk-dev] [PATCH v2 16/18] net/ixgbe: create consistent > > filter > > > > This patch adds a function to create the flow directory filter. > > > > Signed-off-by: Wei Zhao > > Signed-off-by: Wenzhuo Lu > > > > --- > > > > v2: > > --add new error set function > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 240 > > ++++++++++++++++++++++++++++++++++++++- > > drivers/net/ixgbe/ixgbe_ethdev.h | 5 + > > 2 files changed, 244 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index c98aa0d..1c857fc 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -468,6 +468,11 @@ ixgbe_flow_validate(__rte_unused struct > > rte_eth_dev *dev, > > const struct rte_flow_item pattern[], > > const struct rte_flow_action actions[], > > struct rte_flow_error *error); > > +static struct rte_flow *ixgbe_flow_create(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); > > static int ixgbe_flow_flush(struct rte_eth_dev *dev, > > struct rte_flow_error *error); > > /* > > @@ -850,11 +855,55 @@ static const struct rte_ixgbe_xstats_name_off > > rte_ixgbevf_stats_strings[] =3D { > > sizeof(rte_ixgbevf_stats_strings[0])) > > static const struct rte_flow_ops ixgbe_flow_ops =3D { > > ixgbe_flow_validate, > > - NULL, > > + ixgbe_flow_create, > > NULL, > > ixgbe_flow_flush, > > NULL, > > }; > > +/* ntuple filter list structure */ > > +struct ixgbe_ntuple_filter_ele { > > + TAILQ_ENTRY(ixgbe_ntuple_filter_ele) entries; > > + struct rte_eth_ntuple_filter filter_info; }; > > +/* ethertype filter list structure */ struct > > +ixgbe_ethertype_filter_ele { > > + TAILQ_ENTRY(ixgbe_ethertype_filter_ele) entries; > > + struct rte_eth_ethertype_filter filter_info; }; > > +/* syn filter list structure */ > > +struct ixgbe_eth_syn_filter_ele { > > + TAILQ_ENTRY(ixgbe_eth_syn_filter_ele) entries; > > + struct rte_eth_syn_filter filter_info; }; > > +/* fdir filter list structure */ > > +struct ixgbe_fdir_rule_ele { > > + TAILQ_ENTRY(ixgbe_fdir_rule_ele) entries; > > + struct ixgbe_fdir_rule filter_info; > > +}; > > +/* l2_tunnel filter list structure */ struct > > +ixgbe_eth_l2_tunnel_conf_ele { > > + TAILQ_ENTRY(ixgbe_eth_l2_tunnel_conf_ele) entries; > > + struct rte_eth_l2_tunnel_conf filter_info; }; > > +/* ixgbe_flow memory list structure */ >=20 > Why need to define these structures? There has been structures to store t= he > filter before, isn't it? >=20 These list are created to store flow parameters, which is required by rte l= ayer. =20 > > +struct ixgbe_flow_mem { > > + TAILQ_ENTRY(ixgbe_flow_mem) entries; > > + struct ixgbe_flow *flow; > > +}; > > + > > +TAILQ_HEAD(ixgbe_ntuple_filter_list, ixgbe_ntuple_filter_ele); struct > > +ixgbe_ntuple_filter_list filter_ntuple_list; > > +TAILQ_HEAD(ixgbe_ethertype_filter_list, ixgbe_ethertype_filter_ele); > > +struct ixgbe_ethertype_filter_list filter_ethertype_list; > > +TAILQ_HEAD(ixgbe_syn_filter_list, ixgbe_eth_syn_filter_ele); struct > > +ixgbe_syn_filter_list filter_syn_list; > > +TAILQ_HEAD(ixgbe_fdir_rule_filter_list, ixgbe_fdir_rule_ele); struct > > +ixgbe_fdir_rule_filter_list filter_fdir_list; > > +TAILQ_HEAD(ixgbe_l2_tunnel_filter_list, > > +ixgbe_eth_l2_tunnel_conf_ele); struct ixgbe_l2_tunnel_filter_list > > +filter_l2_tunnel_list; TAILQ_HEAD(ixgbe_flow_mem_list, > > +ixgbe_flow_mem); struct ixgbe_flow_mem_list ixgbe_flow_list; > > + > > /** > > * Atomically reads the link status information from global > > * structure rte_eth_dev. > > @@ -1380,6 +1429,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev > *eth_dev) > > > > /* initialize l2 tunnel filter list & hash */ > > ixgbe_l2_tn_filter_init(eth_dev); > > + > > + TAILQ_INIT(&filter_ntuple_list); > > + TAILQ_INIT(&filter_ethertype_list); > > + TAILQ_INIT(&filter_syn_list); > > + TAILQ_INIT(&filter_fdir_list); > > + TAILQ_INIT(&filter_l2_tunnel_list); > > + TAILQ_INIT(&ixgbe_flow_list); > > + > > return 0; > > } > >