From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5C3BA5587 for ; Tue, 2 Oct 2018 03:58:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Oct 2018 18:58:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,329,1534834800"; d="scan'208";a="95194454" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 01 Oct 2018 18:56:32 -0700 Received: from fmsmsx151.amr.corp.intel.com ([169.254.7.87]) by FMSMSX103.amr.corp.intel.com ([169.254.2.16]) with mapi id 14.03.0319.002; Mon, 1 Oct 2018 18:56:32 -0700 From: "Wang, Yipeng1" To: Honnappa Nagarahalli , "Richardson, Bruce" CC: "dev@dpdk.org" , "michel@digirati.com.br" , "Gobriel, Sameh" , nd Thread-Topic: [PATCH v2 5/7] hash: add extendable bucket feature Thread-Index: AQHUUgpSs/Eh6+azy0Oe76JhXbgpcqUAKviwgAZPqxCABG+ycIAAV2Qg Date: Tue, 2 Oct 2018 01:56:31 +0000 Message-ID: References: <1536253745-133104-1-git-send-email-yipeng1.wang@intel.com> <1537550255-252066-1-git-send-email-yipeng1.wang@intel.com> <1537550255-252066-6-git-send-email-yipeng1.wang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODQ1OTBhODQtYmQzZS00MDJlLTk3NjAtMThhNWZkZWUxNTk5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSm01bUJ1UUdEdTY1dzUrTk1QemtwWlBUTnpWdHBNV3VFM2VjanFhM05Pd0hxSEE5eWd0Q2pUODBoaG5meU9neiJ9 x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 5/7] hash: add extendable bucket feature 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, 02 Oct 2018 01:58:50 -0000 >-----Original Message----- >From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com] >> >> +for (i =3D 1; i <=3D num_buckets; i++) >> >Since, the bucket index 0 is reserved, should be 'i < num_buckets' >> [Wang, Yipeng] So the bucket array is from 0 to num_buckets - 1, and th= e >> index Is from 1 to num_buckets. So I guess reserving 0 means reserving t= he >> index 0 but not reduce the usable bucket count. >> So I guess we still need to enqueue index of 1 to num_buckets into the f= ree >> Bucket ring for use? >I understand it now. I mis-read the 'similar to the key-data slot' comment= . I see that the changes are correct. >Minor comment, I am not particular: I think it makes sense to change it to= the same logic followed for key-data slot. i.e. allocate an >extra bucket. [Wang, Yipeng] hmm, I think key-data slot doing similar thing that allocate= s same number of slots. As I re-read the code, maybe the current code allocate one more than needed= ? > >> > >> >> rte_free(h->key_store); >> >> rte_free(h->buckets); >> >Add rte_free(h->buckets_ext); >> [Wang, Yipeng] Done in V3, thanks! >> > >> >> +for (i =3D 1; i < h->num_buckets + 1; i++) >Minor comment: >If we are not changing the logic, I suggest we change the for loop as foll= ows (like it is done earlier) >for (i =3D 1; i <=3D h->num_buckets; i++) > [Wang, Yipeng] Thanks, I did in V5.