From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 735101E2F for ; Tue, 10 Jan 2017 06:30:49 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 09 Jan 2017 21:30:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,342,1477983600"; d="scan'208";a="1092075653" Received: from kmsmsx155.gar.corp.intel.com ([172.21.73.106]) by fmsmga001.fm.intel.com with ESMTP; 09 Jan 2017 21:30:47 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.52]) by KMSMSX155.gar.corp.intel.com ([169.254.15.241]) with mapi id 14.03.0248.002; Tue, 10 Jan 2017 13:30:46 +0800 From: "Zhao1, Wei" To: "Yigit, Ferruh" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH v2 02/18] net/ixgbe: store flow director filter Thread-Index: AQHSYnJv2IjTp9/KsU+ptm0s91k2+aErKaSAgAYWmbA= Date: Tue, 10 Jan 2017 05:30:45 +0000 Message-ID: References: <1483084390-53159-1-git-send-email-wei.zhao1@intel.com> <1483084390-53159-3-git-send-email-wei.zhao1@intel.com> <0505090d-e126-12d5-75e6-2a0498cec4bf@intel.com> In-Reply-To: <0505090d-e126-12d5-75e6-2a0498cec4bf@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 02/18] net/ixgbe: 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: Tue, 10 Jan 2017 05:30:49 -0000 Hi, yigit > -----Original Message----- > From: Yigit, Ferruh > Sent: Saturday, January 7, 2017 12:31 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: Lu, Wenzhuo > Subject: Re: [dpdk-dev] [PATCH v2 02/18] net/ixgbe: store flow director f= ilter >=20 > On 12/30/2016 7:52 AM, Wei Zhao wrote: > > Add support for storing flow director filter in SW. > > > > Signed-off-by: Wenzhuo Lu > > Signed-off-by: Wei Zhao > > --- > > > > v2: > > --add a fdir initialization function in device start process > > --- > <...> > > @@ -1276,6 +1278,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) > > > > /* initialize SYN filter */ > > filter_info->syn_info =3D 0; > > + /* initialize flow director filter list & hash */ > > + ixgbe_fdir_filter_init(eth_dev); > > + > > return 0; > > } > > > > @@ -1284,6 +1289,9 @@ eth_ixgbe_dev_uninit(struct rte_eth_dev > > *eth_dev) { > > struct rte_pci_device *pci_dev; > > struct ixgbe_hw *hw; > > + struct ixgbe_hw_fdir_info *fdir_info =3D > > + IXGBE_DEV_PRIVATE_TO_FDIR_INFO(eth_dev->data- > >dev_private); > > + struct ixgbe_fdir_filter *fdir_filter; > > > > PMD_INIT_FUNC_TRACE(); > > > > @@ -1317,9 +1325,56 @@ eth_ixgbe_dev_uninit(struct rte_eth_dev > *eth_dev) > > rte_free(eth_dev->data->hash_mac_addrs); > > eth_dev->data->hash_mac_addrs =3D NULL; > > > > + /* remove all the fdir filters & hash */ > > + if (fdir_info->hash_map) > > + rte_free(fdir_info->hash_map); > > + if (fdir_info->hash_handle) > > + rte_hash_free(fdir_info->hash_handle); > > + > > + while ((fdir_filter =3D TAILQ_FIRST(&fdir_info->fdir_list))) { > > + TAILQ_REMOVE(&fdir_info->fdir_list, > > + fdir_filter, > > + entries); > > + rte_free(fdir_filter); > > + } > > + >=20 > What do you think extracting these into a function as done in init() ? >=20 > <...> Ok , I will do as your suggestion.