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 5D66FA0096 for ; Thu, 9 May 2019 22:14:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 344824C77; Thu, 9 May 2019 22:14:12 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60040.outbound.protection.outlook.com [40.107.6.40]) by dpdk.org (Postfix) with ESMTP id E24B144C3; Thu, 9 May 2019 22:14:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MV6aWOHm0pZiKMa+PaAE+alkIl9pJgmPH5xYWOTaIaI=; b=d8AA6UMG6GTTXLqO2kAlpfld6r2kjy1HnaF0uiQYg+alKTMLbO3MxDF24bdIySrCbyUV9rwj/IQCd6rETX+c1yg1f7AvKMsLRTuL3r+9LParLKz1OyG0+65S5T0p9nltlZLIFb9d0wd5kXyp8gvJL68H1nIVc4SvGyqsb6qvCJM= Received: from AM0PR08MB3379.eurprd08.prod.outlook.com (20.177.109.142) by AM0PR08MB3380.eurprd08.prod.outlook.com (20.177.111.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Thu, 9 May 2019 20:14:10 +0000 Received: from AM0PR08MB3379.eurprd08.prod.outlook.com ([fe80::b5af:c4b5:376e:ab19]) by AM0PR08MB3379.eurprd08.prod.outlook.com ([fe80::b5af:c4b5:376e:ab19%7]) with mapi id 15.20.1856.012; Thu, 9 May 2019 20:14:09 +0000 From: Dharmik Thakkar To: "Wang, Yipeng1" CC: "Gobriel, Sameh" , "Richardson, Bruce" , "De Lara Guarch, Pablo" , "dev@dpdk.org" , Honnappa Nagarahalli , "zhongdahulinfan@163.com" , "stable@dpdk.org" , nd Thread-Topic: [PATCH v4 1/3] hash: fix position bug in 'free key with position' Thread-Index: AQHVBottn/LXLfjjpk6YR4JCNbbiYqZjLWAAgAANDoA= Date: Thu, 9 May 2019 20:14:09 +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: 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=Dharmik.Thakkar@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 11fa98e6-d8eb-41e7-b959-08d6d4bae58e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR08MB3380; x-ms-traffictypediagnostic: AM0PR08MB3380: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 003245E729 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(136003)(376002)(39860400002)(366004)(189003)(199004)(13464003)(4326008)(2906002)(14454004)(5660300002)(54906003)(6916009)(33656002)(6246003)(305945005)(6486002)(102836004)(53936002)(83716004)(71200400001)(86362001)(53546011)(71190400001)(91956017)(76116006)(68736007)(66066001)(73956011)(26005)(99286004)(2616005)(6512007)(66476007)(66946007)(64756008)(66556008)(6506007)(66446008)(82746002)(478600001)(6436002)(36756003)(72206003)(486006)(11346002)(81166006)(476003)(229853002)(8936002)(446003)(7736002)(8676002)(81156014)(186003)(316002)(76176011)(25786009)(3846002)(256004)(6116002)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3380; H:AM0PR08MB3379.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: T2ZDjn6qnP8qwxOZGhMvr5VyWE/ShLQsLL2BRQuz3/hbN1E2VCDknOv1EeIBaszGxD6eBNcj65q5umcLrlzxuWj2VEyUx/QUMKPNvOB94WmCykFHIt7epwZXXIoMKxr3Ki+L+xzDx2h76iSrz5kMeFyEebtoneCKx++VKZQobtOphdihhqcPPPiCOTuQ35FPBsTCtnbI2t/z8LjF6k8Q5p0r9OtFnXmpwXjb8+3VK8wjQ5BmpB9kod5TrDew8htKV9uz5ndXLBMMKRi7jqB1Dn436NAMn2va7ZfjTBVd5u0KbJy6NIbJH6ljJLlYnztXHZ1YWyzBv6i3h/1QsZCDM/U/Ks4dMjCB9xOJ6rCYdBFWgbkzIsN5PfXaXEFv7nzTnuQUTsJ0C6L5zN7ccGeK/Y/cWeJIXklzLbNPc6LgDxQ= Content-Type: text/plain; charset="UTF-8" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11fa98e6-d8eb-41e7-b959-08d6d4bae58e X-MS-Exchange-CrossTenant-originalarrivaltime: 09 May 2019 20:14:09.9305 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3380 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: <20190509201409.A5JffFeoKiLxrgyrtB0ODeUA2zr3_OgIrsRLOiIU81w@z> > On May 9, 2019, at 2:27 PM, Wang, Yipeng1 wrote: >=20 >=20 >=20 >> -----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;= Dharmik Thakkar ; >> stable@dpdk.org >> Subject: [PATCH v4 1/3] hash: fix position bug in 'free key with positio= n' >>=20 >> 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. >>=20 >> This patch fixes incorrect position returned to the ring of free_slots. >>=20 >> Bugzilla ID: 261 >> Fixes: 9d033dac7d7c ("hash: support no free on delete") >> Cc: honnappa.nagarahalli@arm.com >> Cc: stable@dpdk.org >>=20 >> 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(-) >>=20 >> diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuc= koo_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)), -EIN= VAL); >> + /* Key index where key is stored, adding the first dummy index*/ > [Wang, Yipeng] Minor issue, missing a space at the end. Is there a need to update the version? >=20 > Acked-by: Yipeng Wang Thank you!