From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C898B49E0; Thu, 9 May 2019 21:27:28 +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 orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 12:27:27 -0700 X-ExtLoop1: 1 Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga001.fm.intel.com with ESMTP; 09 May 2019 12:27:27 -0700 Received: from orsmsx104.amr.corp.intel.com ([169.254.4.183]) by ORSMSX110.amr.corp.intel.com ([169.254.10.28]) with mapi id 14.03.0415.000; Thu, 9 May 2019 12:27:26 -0700 From: "Wang, Yipeng1" To: Dharmik Thakkar , "Gobriel, Sameh" , "Richardson, Bruce" , "De Lara Guarch, Pablo" CC: "dev@dpdk.org" , "honnappa.nagarahalli@arm.com" , "zhongdahulinfan@163.com" , "stable@dpdk.org" Thread-Topic: [PATCH v4 1/3] hash: fix position bug in 'free key with position' Thread-Index: AQHVBot2eaKKIaZyjkGi9SIKIroiIaZjLOqw Date: Thu, 9 May 2019 19:27:26 +0000 Message-ID: References: <20190509133924.7153-1-dharmik.thakkar@arm.com> <20190509171907.14693-1-dharmik.thakkar@arm.com> <20190509171907.14693-2-dharmik.thakkar@arm.com> In-Reply-To: <20190509171907.14693-2-dharmik.thakkar@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTA2N2YzYzctZTU5ZC00YjdlLTk0MjQtZWU3MDk2ZGQyYzI0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNVpGRGJ2SkdubDBKV0VFXC9ZZzhreXJBVExhQXNHdWV5WStCTm1EXC81YkdMXC82Z3U3OER6T0hyYmQySWtyU1MzdCJ9 x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 1/3] hash: fix position bug in 'free key with position' 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: Thu, 09 May 2019 19:27:29 -0000 >-----Original Message----- >From: Dharmik Thakkar [mailto:dharmik.thakkar@arm.com] >Sent: Thursday, May 9, 2019 10:19 AM >To: Wang, Yipeng1 ; Gobriel, Sameh ; Richardson, Bruce >; De Lara Guarch, Pablo >Cc: dev@dpdk.org; honnappa.nagarahalli@arm.com; zhongdahulinfan@163.com; D= harmik Thakkar ; >stable@dpdk.org >Subject: [PATCH v4 1/3] hash: fix position bug in 'free key with position' > >Currently, in rte_hash_free_key_with_position(), the position returned >to the ring of free_slots leads to an unexpected conflict with a key >already in use. > >This patch fixes incorrect position returned to the ring of free_slots. > >Bugzilla ID: 261 >Fixes: 9d033dac7d7c ("hash: support no free on delete") >Cc: honnappa.nagarahalli@arm.com >Cc: stable@dpdk.org > >Reported-by: Linfan >Suggested-by: Linfan >Signed-off-by: Dharmik Thakkar >--- > lib/librte_hash/rte_cuckoo_hash.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cucko= o_hash.c >index 261267b7fd3d..5029f9f61fae 100644 >--- a/lib/librte_hash/rte_cuckoo_hash.c >+++ b/lib/librte_hash/rte_cuckoo_hash.c >@@ -1587,14 +1587,17 @@ int __rte_experimental > rte_hash_free_key_with_position(const struct rte_hash *h, > const int32_t position) > { >- RETURN_IF_TRUE(((h =3D=3D NULL) || (position =3D=3D EMPTY_SLOT)), -EINVA= L); >+ /* Key index where key is stored, adding the first dummy index*/ [Wang, Yipeng] Minor issue, missing a space at the end. Acked-by: Yipeng Wang From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 11866A0096 for ; Thu, 9 May 2019 21:27:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D9EF04C95; Thu, 9 May 2019 21:27:30 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C898B49E0; Thu, 9 May 2019 21:27:28 +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 orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 12:27:27 -0700 X-ExtLoop1: 1 Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga001.fm.intel.com with ESMTP; 09 May 2019 12:27:27 -0700 Received: from orsmsx104.amr.corp.intel.com ([169.254.4.183]) by ORSMSX110.amr.corp.intel.com ([169.254.10.28]) with mapi id 14.03.0415.000; Thu, 9 May 2019 12:27:26 -0700 From: "Wang, Yipeng1" To: Dharmik Thakkar , "Gobriel, Sameh" , "Richardson, Bruce" , "De Lara Guarch, Pablo" CC: "dev@dpdk.org" , "honnappa.nagarahalli@arm.com" , "zhongdahulinfan@163.com" , "stable@dpdk.org" Thread-Topic: [PATCH v4 1/3] hash: fix position bug in 'free key with position' Thread-Index: AQHVBot2eaKKIaZyjkGi9SIKIroiIaZjLOqw Date: Thu, 9 May 2019 19:27:26 +0000 Message-ID: References: <20190509133924.7153-1-dharmik.thakkar@arm.com> <20190509171907.14693-1-dharmik.thakkar@arm.com> <20190509171907.14693-2-dharmik.thakkar@arm.com> In-Reply-To: <20190509171907.14693-2-dharmik.thakkar@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTA2N2YzYzctZTU5ZC00YjdlLTk0MjQtZWU3MDk2ZGQyYzI0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNVpGRGJ2SkdubDBKV0VFXC9ZZzhreXJBVExhQXNHdWV5WStCTm1EXC81YkdMXC82Z3U3OER6T0hyYmQySWtyU1MzdCJ9 x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 1/3] hash: fix position bug in 'free key with position' 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190509192726.giahgM2HBEkzmtRqSO0k1h9L2g-Y-VHwdXS6Mppswu8@z> >-----Original Message----- >From: Dharmik Thakkar [mailto:dharmik.thakkar@arm.com] >Sent: Thursday, May 9, 2019 10:19 AM >To: Wang, Yipeng1 ; Gobriel, Sameh ; Richardson, Bruce >; De Lara Guarch, Pablo >Cc: dev@dpdk.org; honnappa.nagarahalli@arm.com; zhongdahulinfan@163.com; D= harmik Thakkar ; >stable@dpdk.org >Subject: [PATCH v4 1/3] hash: fix position bug in 'free key with position' > >Currently, in rte_hash_free_key_with_position(), the position returned >to the ring of free_slots leads to an unexpected conflict with a key >already in use. > >This patch fixes incorrect position returned to the ring of free_slots. > >Bugzilla ID: 261 >Fixes: 9d033dac7d7c ("hash: support no free on delete") >Cc: honnappa.nagarahalli@arm.com >Cc: stable@dpdk.org > >Reported-by: Linfan >Suggested-by: Linfan >Signed-off-by: Dharmik Thakkar >--- > lib/librte_hash/rte_cuckoo_hash.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cucko= o_hash.c >index 261267b7fd3d..5029f9f61fae 100644 >--- a/lib/librte_hash/rte_cuckoo_hash.c >+++ b/lib/librte_hash/rte_cuckoo_hash.c >@@ -1587,14 +1587,17 @@ int __rte_experimental > rte_hash_free_key_with_position(const struct rte_hash *h, > const int32_t position) > { >- RETURN_IF_TRUE(((h =3D=3D NULL) || (position =3D=3D EMPTY_SLOT)), -EINVA= L); >+ /* Key index where key is stored, adding the first dummy index*/ [Wang, Yipeng] Minor issue, missing a space at the end. Acked-by: Yipeng Wang