From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80040.outbound.protection.outlook.com [40.107.8.40]) by dpdk.org (Postfix) with ESMTP id D63DF69D4 for ; Fri, 26 Oct 2018 02:24:21 +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=KyBuNgDKz93k7Zsnh5CyjNbj1Cd4GV0w96vE/yy+k+U=; b=a45+RG+h0ij6Lmq6TeWDNoZ6WUEZx2O13MMBvHdMO5GXGTT3AwcDC0W4XJgN0EIfZRETWTz2Hm4LZHSzS9loxgwEHk+/Ot7E8VNjLlAo+ecMB5px9X8J1oL8jc10Bu+tGzhcDdYrjQkcbdMGSf3XEdPWtT6v2aQLatYRWyUaoMU= Received: from AM6PR08MB3672.eurprd08.prod.outlook.com (20.177.115.29) by AM6PR08MB3879.eurprd08.prod.outlook.com (20.178.90.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.19; Fri, 26 Oct 2018 00:24:20 +0000 Received: from AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::c1a0:51bf:cd33:2b27]) by AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::c1a0:51bf:cd33:2b27%5]) with mapi id 15.20.1250.032; Fri, 26 Oct 2018 00:24:20 +0000 From: Honnappa Nagarahalli To: Yipeng Wang , "bruce.richardson@intel.com" CC: "stephen@networkplumber.org" , "dev@dpdk.org" , "sameh.gobriel@intel.com" , nd Thread-Topic: [PATCH v2 1/4] hash: fix unnecessary pause Thread-Index: AQHUbAAhmTcGITKvmkWEmeIUNYE8BKUwSaJg Date: Fri, 26 Oct 2018 00:24:20 +0000 Message-ID: References: <1540404570-102126-1-git-send-email-yipeng1.wang@intel.com> <1540404570-102126-2-git-send-email-yipeng1.wang@intel.com> In-Reply-To: <1540404570-102126-2-git-send-email-yipeng1.wang@intel.com> 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=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR08MB3879; 6:wTUX6EusmiHSSbZCwniZ7W7ZE3pmBAQFLMhuvcnzblSoz7oUrbIEGBih43Yy2lT15uUCPFA/8eYGYnL5MTcJAoKq19pEzlEu94BTN8vMWI1Pb6pfe7JNTeZD0sSEfexy9TNQT17Zj7UcMl5IS8yQpijxuwBmsRjnEYaIOaG+cW6lKD/ejkqSMuOqEkQfqmH7831VbZHsJVAuYEpHnXtuLb05wVb7a+XQyA5dlGE26hjafeAD+eIbWa9bV9475ccv2+Eid/7/nOymQ0hLwQ1QJBCATmh5i6+cIW25/ON0cJEvuPadldJFDI49TbsajqQ2k+T4qRArPLkCoaXmoxHDw2Wt72zmCqqCg6W9b/zR8cgt8Ov5hRpW33tEiV4Mrm2cSJHCq97tu1MSzHLpRH+PEFFWUtBuFn2iJ2cCvsZwP5JKCnP6Tp9ZOl7icYiA+M1c/FtbcpD/5t/zr1WHneSUZg==; 5:I2fSOBoohaIUnEJEcuuVyRCnIFB6x9BaTAAhb2Jn0ynv5jPOGdUrxcZBI4LDZYSCVESkdiYlQ3FQRd/EmFXoh1q36k+kPC9CpY4LNf54+HgklG9/oHk8lGBh5kTrH7iofAjl4oHoH0v8X8nXdi+TLBKmrTH/qKM27xi/Y6iVV5E=; 7:PzniAgBl9Y53qd43U8miy+M+GTYixGOXwXuFwq3yoUR2tEpi/QCLjItmoPcwE4rLXr5noona7Jl4SlPRYjp/X21m5fcbTY4Rw8tmhyzu/YIw7xfWgHBUKXwoMLPmIUsL0QWXaZKe2qAAgLes5bBoVw== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b83e3c08-ad4e-44d1-efe3-08d63ad95fbf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM6PR08MB3879; x-ms-traffictypediagnostic: AM6PR08MB3879: nodisclaimer: True 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231355)(944501410)(52105095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:AM6PR08MB3879; BCL:0; PCL:0; RULEID:; SRVR:AM6PR08MB3879; x-forefront-prvs: 083751FCA6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39850400004)(376002)(396003)(366004)(136003)(199004)(189003)(14454004)(25786009)(54906003)(74316002)(76176011)(316002)(68736007)(7696005)(305945005)(478600001)(256004)(8936002)(11346002)(2501003)(97736004)(446003)(7736002)(53936002)(99286004)(110136005)(486006)(229853002)(2900100001)(2906002)(86362001)(8676002)(9686003)(81166006)(81156014)(72206003)(6116002)(66066001)(3846002)(5660300001)(71190400001)(5250100002)(6246003)(33656002)(6506007)(6436002)(186003)(26005)(71200400001)(4326008)(55016002)(476003)(102836004)(106356001)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3879; H:AM6PR08MB3672.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: fV+3Dlx5OnTvMoSPZHaag9vrTe3nGvW5j2c89tXnvxiYxu/xqkqFq08I7n3bNPgf4dMQEdNjK7A6nj0q9uhxPO/CjrALaIJlrBbSB6bALC4aWmvFBfiecDk2Wdd1gTv5rFZBas5vORg/nn++6vSMIseDljILzE5NiQfO3yBztoXZVNYqARRC3BFq1bw5RVVUPuyHAFryLM5k82PcDouU8oZRTv3tr3jpO54qPZigN6VtIxpNLCOsEjEhhF1N8A5xiX7GyvKR+ebEiMkZeo2EN7xHwg58nxAzzqGj2dNYleZVoQ3IrhqPkd2grTjqp8kGFSwNeQfpm3QvCsEOVkQuYNXr7FwdpxE8T+HymqaxHPY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: b83e3c08-ad4e-44d1-efe3-08d63ad95fbf X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2018 00:24:20.7919 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3879 Subject: Re: [dpdk-dev] [PATCH v2 1/4] hash: fix unnecessary pause 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: Fri, 26 Oct 2018 00:24:22 -0000 >=20 > There is a rte_pause in hash table reset function. > Since the loop is not a polling loop on shared data structure, the rte_pa= use > is not needed. >=20 > Fixes: b26473ff8f4a ("hash: add reset function") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yipeng Wang > --- > lib/librte_hash/rte_cuckoo_hash.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_hash/rte_cuckoo_hash.c > b/lib/librte_hash/rte_cuckoo_hash.c > index 0648a22..4a2647e 100644 > --- a/lib/librte_hash/rte_cuckoo_hash.c > +++ b/lib/librte_hash/rte_cuckoo_hash.c > @@ -574,14 +574,14 @@ rte_hash_reset(struct rte_hash *h) >=20 > /* clear the free ring */ > while (rte_ring_dequeue(h->free_slots, &ptr) =3D=3D 0) > - rte_pause(); > + continue; Minor comment: 'continue' can be removed. >=20 > /* clear free extendable bucket ring and memory */ > if (h->ext_table_support) { > memset(h->buckets_ext, 0, h->num_buckets * > sizeof(struct > rte_hash_bucket)); > while (rte_ring_dequeue(h->free_ext_bkts, &ptr) =3D=3D 0) > - rte_pause(); > + continue; > } >=20 > /* Repopulate the free slots ring. Entry zero is reserved for key > misses */ > -- > 2.7.4