From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 448112C8 for ; Thu, 24 May 2018 19:47:24 +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 orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2018 10:47:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,436,1520924400"; d="scan'208";a="58223959" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga001.fm.intel.com with ESMTP; 24 May 2018 10:47:22 -0700 Received: from orsmsx154.amr.corp.intel.com (10.22.226.12) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 24 May 2018 10:47:22 -0700 Received: from orsmsx105.amr.corp.intel.com ([169.254.2.107]) by ORSMSX154.amr.corp.intel.com ([169.254.11.44]) with mapi id 14.03.0319.002; Thu, 24 May 2018 10:47:21 -0700 From: "Wang, Yipeng1" To: "De Lara Guarch, Pablo" , "Vijaya Mohan Guvva" , "Richardson, Bruce" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value Thread-Index: AQHT7X439vrbwy1Ftki9oLlsZE7S7KQzj2ZAgAui5HA= Date: Thu, 24 May 2018 17:47:21 +0000 Message-ID: References: <1526520393-19295-1-git-send-email-vguvva@caviumnetworks.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.200.100 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGNiMTRmZDYtZjZlNS00NjdiLWJkMDItYzk1MTk4OWU5NTI2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkF5cE9GNWR3c3ZnRXQ2UXNQR0lLTWIwN0w0QytiSEF0RE9EekVRZ3oxd3c9In0= x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value 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, 24 May 2018 17:47:25 -0000 Hi, Vijaya,=20 Thanks for contributing the new API. We actually have a patch to support read-write concurrency for rte_hash com= ing in a couple of weeks. The new del function you proposed may need to be= protected under the new concurrency scheme as well. If you like, we could = collaborate together to fit your del function under the new concurrency sup= port.=20 Thanks Yipeng >-----Original Message----- >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo >Sent: Thursday, May 17, 2018 1:06 AM >To: Vijaya Mohan Guvva ; Richardson, Bruce >Cc: dev@dpdk.org >Subject: Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return= stored value > >Hi Vijaya, > >> -----Original Message----- >> From: Vijaya Mohan Guvva [mailto:vguvva@caviumnetworks.com] >> Sent: Thursday, May 17, 2018 2:27 AM >> To: Richardson, Bruce ; De Lara Guarch, Pabl= o >> >> Cc: dev@dpdk.org; Vijaya Mohan Guvva >> Subject: [PATCH V2] librte_hash: new hash del abi to return stored value >> > >You are actually adding new API, not ABI, so I would reword the commit mes= sage. > >"hash: add API to return stored value at deletion" maybe? > >I would add some information in the commit message and move the changelog = (V1, V2 notes) >after the three dashes. > >> V2: >> Adding another new interface rte_hash_del_key_data to delete key from ha= sh >> table and return stored data. >> >> V1: >> Add a new key delete interface rte_hash_del_key_with_hash_data to delete= the >> key from hash and return the value stored. This is useful for hash users= to free >> the data stored in the table after key delete and to avoid maintaining a= user data >> array in the dpdk application. >> >> Signed-off-by: Vijaya Mohan Guvva >> --- >> lib/librte_hash/rte_cuckoo_hash.c | 30 +++++++++++++++++++++++--- >> lib/librte_hash/rte_hash.h | 45 >> +++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 72 insertions(+), 3 deletions(-) > >... > >> +int32_t >> +rte_hash_del_key_with_hash_data(const struct rte_hash *h, const void *k= ey, >> + hash_sig_t sig, void **data); >> + >> +/** >> * Remove a key from an existing hash table. >> * This operation is not multi-thread safe >> * and should only be called from one thread. >> -- >> 1.8.3.1 > >You need to update the version.map file to add the two new functions >(you might need to wait until 18.05 is released, so you can use the 18.08 = tag).