From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9848729C7 for ; Tue, 3 Jan 2017 03:04:23 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 02 Jan 2017 18:04:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,451,1477983600"; d="scan'208";a="1089139391" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 02 Jan 2017 18:04:22 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 2 Jan 2017 18:04:21 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 2 Jan 2017 18:04:21 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Tue, 3 Jan 2017 10:04:19 +0800 From: "Xing, Beilei" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH v2 16/18] net/ixgbe: create consistent filter Thread-Index: AQHSYnMQNjxhnzbfYUaEiGrf2/7hn6EmBctQ Date: Tue, 3 Jan 2017 02:04:19 +0000 Message-ID: <94479800C636CB44BD422CB454846E013158D005@SHSMSX101.ccr.corp.intel.com> References: <1483084390-53159-1-git-send-email-wei.zhao1@intel.com> <1483084390-53159-17-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1483084390-53159-17-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] 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 02:04:25 -0000 > -----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 >=20 > This patch adds a function to create the flow directory filter. >=20 > Signed-off-by: Wei Zhao > Signed-off-by: Wenzhuo Lu >=20 > --- >=20 > 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(-) >=20 > 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 */ Why need to define these structures? There has been structures to store the= filter before, isn't it? > +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) >=20 > /* 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; > } >=20