From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0128.outbound.protection.outlook.com [104.47.40.128]) by dpdk.org (Postfix) with ESMTP id 0D4F228F3 for ; Thu, 24 May 2018 20:35:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DNNuhewPAOMv54zpifdVklAga6CvGl6DGxX+EjfrPqI=; b=ZtFAfn3QlZwC8xcawvar7wx4/M0GVrM/woQAj6Cql4zVsbcAzdzFUyL/iR72EclyzZCYgEpFX9zPARBb2mTLDMbbh//yyFIEx/MLKCMXXYwx0jQzvRhj2JQdxuOdFTtyLiF7ceXahrpK1AbG89r9ZioZl5nKpJsMKNbcho4lNm8= Received: from DM6PR07MB4890.namprd07.prod.outlook.com (20.176.81.31) by DM6PR07MB4972.namprd07.prod.outlook.com (20.176.106.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.797.11; Thu, 24 May 2018 18:35:17 +0000 Received: from DM6PR07MB4890.namprd07.prod.outlook.com ([fe80::c147:1163:1821:1097]) by DM6PR07MB4890.namprd07.prod.outlook.com ([fe80::c147:1163:1821:1097%6]) with mapi id 15.20.0797.011; Thu, 24 May 2018 18:35:17 +0000 From: "Guvva, Vijaya" To: "Wang, Yipeng1" , "De Lara Guarch, Pablo" , "Richardson, Bruce" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value Thread-Index: AdPzjgIUsMpKc/tsS8SUqPgFtOAbOQ== Date: Thu, 24 May 2018 18:35:17 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Vijaya.Guvva@cavium.com; x-originating-ip: [50.233.148.156] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM6PR07MB4972; 7:C6qMZ/lMbYYlrgNMhC93Lm5q4b6uOwG/0k+aosFVIU4njIR8+HtcFT6TNFZmjsP3Np1pDGlGp2nmiLQe+iFXAqcTpIGbvmq+llYjzkYolguwEPgsCt+UN/8pB/JrucV2CQg1tZlW0JtLhgyr4aST7fEO1xZbG2HdG0tQwWBpCA32QgHxSFYJkL/OXi80cc1wbuZLnR5nTyMMdMEmOqWlByO673xPO8WkBGVtzjaZaqp/nvo+O//IDmu/1Z3Soy5G x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4972; x-ms-traffictypediagnostic: DM6PR07MB4972: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB4972; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4972; x-forefront-prvs: 0682FC00E8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019001)(6009001)(428001)(377454003)(164054003)(51704005)(52604005)(54534003)(13464003)(199002)(189002)(20776003)(69226001)(63696002)(74876001)(74706001)(33656001)(77096001)(76786001)(76796001)(81542001)(54356001)(93136001)(76176001)(92566001)(46102001)(64706001)(76576001)(81342001)(92726001)(77982001)(59766001)(56816005)(80022001)(66066001)(76482001)(74316001)(90146001)(65816001)(87936001)(56776001)(54316002)(74366001)(44376005)(87266001)(2656002)(224303002)(224313003)(4396001)(47976001)(50986001)(95666003)(49866001)(47736001)(51856001)(85306002)(79102001)(85852003)(83072002)(21056001)(97336001)(94946001)(93516002)(95416001)(94316002)(86362001)(97186001)(80976001)(81686001)(83322001)(19580405001)(81816001)(31966008)(74662001)(19580395003)(53806001)(74502001)(47446002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR07MB4972; H:DM6PR07MB4890.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: iEI5xLC6l0ZmYZL87BTRyj6vuSXNJpqadTCRvRo+V2bW5lrBILMVbOAa8yxRbqvFi7SlH1X2pdY6PSCOqlPTq/s0X07P7dVXaSCG3odnj6JCnwR1UAN0JqibrfAsLWCBQO7yh3752RPYwrrIM0n7rWcSHaBdzUz8VPKj5L2EQTmbiUvBA9cLDoaoOuG+QYu2 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d521cf2a-ed93-4fe3-32c2-08d5c1a518ea X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: d521cf2a-ed93-4fe3-32c2-08d5c1a518ea X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2018 18:35:17.4049 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4972 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 18:35:19 -0000 Hi Yipeng, Sure, It will be great help if you can include these changes in the patches= you are proposing with the necessary locks. Thanks, Vijay=20 -----Original Message----- From: Wang, Yipeng1 =20 Sent: Thursday, May 24, 2018 10:47 AM To: De Lara Guarch, Pablo ; Guvva, Vijaya <= Vijaya.Guvva@cavium.com>; Richardson, Bruce Cc: dev@dpdk.org Subject: RE: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return = stored value 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,=20 >Pablo >Sent: Thursday, May 17, 2018 1:06 AM >To: Vijaya Mohan Guvva ; Richardson, Bruce=20 > >Cc: dev@dpdk.org >Subject: Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to=20 >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,=20 >> Pablo >> Cc: dev@dpdk.org; Vijaya Mohan Guvva >> Subject: [PATCH V2] librte_hash: new hash del abi to return stored=20 >> 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=20 >changelog (V1, V2 notes) after the three dashes. > >> V2: >> Adding another new interface rte_hash_del_key_data to delete key from=20 >> hash table and return stored data. >> >> V1: >> Add a new key delete interface rte_hash_del_key_with_hash_data to=20 >> delete the key from hash and return the value stored. This is useful=20 >> for hash users to free the data stored in the table after key delete=20 >> 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=20 >(you might need to wait until 18.05 is released, so you can use the 18.08 = tag).