From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 0DCCF20F for ; Wed, 28 Dec 2016 08:20:19 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 27 Dec 2016 23:20:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,421,1477983600"; d="scan'208";a="1105125605" Received: from dpdk19.sh.intel.com (HELO dpdk19) ([10.239.129.113]) by fmsmga002.fm.intel.com with ESMTP; 27 Dec 2016 23:20:17 -0800 Date: Wed, 28 Dec 2016 15:14:55 +0800 From: Tiwei Bie To: "Xing, Beilei" Cc: "Wu, Jingjing" , "Zhang, Helin" , "dev@dpdk.org" Message-ID: <20161228071455.GB85898@dpdk19> References: <1480679625-4157-1-git-send-email-beilei.xing@intel.com> <1482819984-14120-1-git-send-email-beilei.xing@intel.com> <1482819984-14120-4-git-send-email-beilei.xing@intel.com> <20161228033847.GB13841@dpdk19> <94479800C636CB44BD422CB454846E013158BFAF@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <94479800C636CB44BD422CB454846E013158BFAF@SHSMSX101.ccr.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH v2 03/17] net/i40e: store 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: Wed, 28 Dec 2016 07:20:20 -0000 On Wed, Dec 28, 2016 at 03:10:39PM +0800, Xing, Beilei wrote: > > > > -----Original Message----- > > From: Bie, Tiwei > > Sent: Wednesday, December 28, 2016 11:39 AM > > To: Xing, Beilei > > Cc: Wu, Jingjing ; Zhang, Helin > > ; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v2 03/17] net/i40e: store flow director filter > > > > On Tue, Dec 27, 2016 at 02:26:10PM +0800, Beilei Xing wrote: > > > Currently there's no flow director filter stored in SW. This patch > > > stores flow director filters in SW with cuckoo hash, also adds > > > protection if a flow director filter has been added. > > > > > > Signed-off-by: Beilei Xing > > > --- > > > drivers/net/i40e/i40e_ethdev.c | 48 +++++++++++++++++++++ > > > drivers/net/i40e/i40e_ethdev.h | 12 ++++++ > > > drivers/net/i40e/i40e_fdir.c | 98 > > ++++++++++++++++++++++++++++++++++++++++++ > > > 3 files changed, 158 insertions(+) > > > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > > b/drivers/net/i40e/i40e_ethdev.c index c012d5d..427ebdc 100644 > > > --- a/drivers/net/i40e/i40e_ethdev.c > > > +++ b/drivers/net/i40e/i40e_ethdev.c > > [...] > > > @@ -1342,6 +1379,17 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev) > > > rte_free(p_tunnel); > > > } > > > > > > + /* Remove all flow director rules and hash */ > > > + if (fdir_info->hash_map) > > > + rte_free(fdir_info->hash_map); > > > + if (fdir_info->hash_table) > > > + rte_hash_free(fdir_info->hash_table); > > > + > > > + while ((p_fdir = TAILQ_FIRST(&fdir_info->fdir_list))) { > > > > There is a redundant pair of parentheses, or you should compare with NULL. > > I think the another parentheses is used to compare with NULL. In fact there's similar using in PMD. > The outer parentheses are redundant unless you compare it with NULL explicitly. Any way, you could just follow the existing coding style. Best regards, Tiwei Bie