From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 879A4A0546; Tue, 6 Apr 2021 23:56:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14A50406A2; Tue, 6 Apr 2021 23:56:22 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2048.outbound.protection.outlook.com [40.107.20.48]) by mails.dpdk.org (Postfix) with ESMTP id 12FDA4067C for ; Tue, 6 Apr 2021 23:56:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g5tF6Wg42DITiC39XNMqO9L/5ewyxP8ArOWgZtXfn+Y=; b=+Mbqpd2Jp0GSFXF0JuD95M92u377sPJ6yyurjZCSOaY5KtGx5bisZE+kQIdH4c9a3Qihaido60gL7xOMHFNq8abvuD9TXwi6tOk5+XTSS676Lx+jECVCBYJmkD/UZy4mJQcd4LwinJIDIi1J2ZDYvWZqnM4LdkWhck+N/F0jPf4= Received: from AM6PR0202CA0047.eurprd02.prod.outlook.com (2603:10a6:20b:3a::24) by AM6PR08MB3144.eurprd08.prod.outlook.com (2603:10a6:209:48::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16; Tue, 6 Apr 2021 21:56:18 +0000 Received: from VE1EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:3a:cafe::5b) by AM6PR0202CA0047.outlook.office365.com (2603:10a6:20b:3a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16 via Frontend Transport; Tue, 6 Apr 2021 21:56:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT059.mail.protection.outlook.com (10.152.19.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29 via Frontend Transport; Tue, 6 Apr 2021 21:56:18 +0000 Received: ("Tessian outbound b610e7b4d771:v90"); Tue, 06 Apr 2021 21:56:17 +0000 X-CR-MTA-TID: 64aa7808 Received: from b8620aa12128.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E7882B4F-A483-4B9B-B585-C71F4F185A9E.1; Tue, 06 Apr 2021 21:56:06 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b8620aa12128.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 06 Apr 2021 21:56:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ANOOaLaGaHbV29YCWUErTbXZ4w8x18sffw6/3lFrEHqGu/SNUARj2rss7HZXsTpFqWEXTXYwf537bpcttDk2YUmEPpwx8Ol87dVJ2fIebLHRN3vMYULiae2d3md77VQb2VYF1nxdgD+YvvRATO8k1cjefsD2miZ7ar81ucxMVKphi2/PN8gF/Xb8NnVYPiFd5MAh4ZLxkBcNdevhKjwWTS6PNQCYAUeYwBBjc1XcUXb+L8HyeEpGOgDjOzkEqdOBvXuA4S8BNYWmuM36lEdlG7VuSQEN66+V5rhQFd0ybfbDaHxkhALoeCSdbNw3KDDPMICOb/Qua/5HVNP0QqGd0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g5tF6Wg42DITiC39XNMqO9L/5ewyxP8ArOWgZtXfn+Y=; b=NagkJ10RHxBCRNPE5h4k6BJwa73kGRZLbgnzMLKumXYS3desAYPPOFhub1ydADubQEi8C4GJBhGJFj1IBUgLS4sLKjMf4yeBBzQSSzu/f48J8mATE0zKPEkbBnE0DK3T+PDClfS9kofedn3jyVRS/hGPhPTIQBCcZqFcnt/EH5VficAWpN824NApKTrKehObDl51CXraEm3xTEfACrjiTLGbho76ugBcviotgM0rKvgBtfkoJ5P+OdDedf9IQIXGTzPw4tZ0yz3Oh2pZOnNN7dzF1qiWrwaKMl568Hs1NiQVJ6kbQaE3RJb+zCsJoiZW2p211AVdsZGY5pjkrG8ffw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g5tF6Wg42DITiC39XNMqO9L/5ewyxP8ArOWgZtXfn+Y=; b=+Mbqpd2Jp0GSFXF0JuD95M92u377sPJ6yyurjZCSOaY5KtGx5bisZE+kQIdH4c9a3Qihaido60gL7xOMHFNq8abvuD9TXwi6tOk5+XTSS676Lx+jECVCBYJmkD/UZy4mJQcd4LwinJIDIi1J2ZDYvWZqnM4LdkWhck+N/F0jPf4= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB6PR0801MB1702.eurprd08.prod.outlook.com (2603:10a6:4:2f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Tue, 6 Apr 2021 21:56:05 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::2994:a01e:2de:f94e]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::2994:a01e:2de:f94e%7]) with mapi id 15.20.3999.032; Tue, 6 Apr 2021 21:56:05 +0000 From: Honnappa Nagarahalli To: Stephen Hemminger , "dev@dpdk.org" CC: nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v5] pflock: implementation of phase-fair reader writer locks Thread-Index: AQHXJ2GG2XKR7s8xTUyUALzZkKTdpqqoDslQ Date: Tue, 6 Apr 2021 21:56:05 +0000 Message-ID: References: <20210212013838.312623-1-sthemmin@microsoft.com> <20210402014247.196702-1-stephen@networkplumber.org> In-Reply-To: <20210402014247.196702-1-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 4AFD15AE26E80640BA2E675E57B9903A.0 x-checkrecipientchecked: true Authentication-Results-Original: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=arm.com; x-originating-ip: [70.113.13.105] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 80594a1a-b783-4428-33fc-08d8f946ce94 x-ms-traffictypediagnostic: DB6PR0801MB1702:|AM6PR08MB3144: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:5236;OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: BOyCJKOtxS4eHqn5fB2IhLEi9PG8kdatImz6sBoKmJ4wNP+19yFftTF9wOwSXQZ6uq1QqKAoTwV0LAAwr7z9zqIueghNqwhuTR7wSpAXCEy1A9EVy+CoVQofSlrc/QTwShIMLo73viIEQcIV+9hNMw+cgHOx0uFgsEVD85kv7GtSvisVeuaF+Iblp23NTmr2JH3ue4d96zGfiJRZp/T2NFIpHuTalFBomxj+Dy3MFUi4Ldrzz2tGVClvxxnlkAoqOrHnrW+IRKo0rAaqmnVANVVD3jrwl9i4W03NoCGVpqcPkOmrNzxMDBicSuZYLP13B8rpKnttSowX4KaBHEFn3W5g3P+gfkvQDNdBu2HAONbvLJVvd7QvBCTT9ROKlAu+F5PpuPG+Bx/Ph3COn9YFh1aiatmdwN4Ux40KhQpSDPu/8w2gLKF0SPwrYshMLG2hV2iR8+Qcu5yKuBBgODX2IBRFEEA6d2SNjuF+6p5Kv38NcmizJGM09bJGnCuZADZqmc5szlecZwMW9lFlcAh85NubbpcTA3SIcKA60b87r/QopE/b8Ovi8SECtnugj0+uZUDIX0oOKLLa98WFsaB2xXDEZlXS/ylmq8+42L+AG55LjxEWtAhUT+B6PGKJRaMsvxA8sM+uGy70xVrhfGqn9bgSGXqmEtVPZh8oJbJ/sDHORfrB+n8/sgmIbqC4rTVGvjuTgTsYQ+PgzeQ8AvE9PQ/E0JQcGaOPuSHrkIyO4hwYgqdabYfB3Qa/9h3jcC++ X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(39860400002)(346002)(376002)(366004)(45080400002)(66476007)(71200400001)(110136005)(186003)(478600001)(33656002)(6506007)(66946007)(86362001)(4326008)(966005)(7696005)(2906002)(76116006)(66446008)(55016002)(316002)(26005)(83380400001)(38100700001)(9686003)(66556008)(8936002)(8676002)(54906003)(52536014)(5660300002)(64756008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?76x+trk5pb43k1rr/L2J6r427Q1Yd4ar4YwjCITs/5YzpdV4NN8j+Lqmyhz8?= =?us-ascii?Q?bm+f8ZqpxxxMt7Yaoy4y5k4t783cX4nMdT+FwQL4+jZIe48dDbQL6o+mS0cv?= =?us-ascii?Q?6BhtUYQ69pyq2iI14TVINl6OR0pN/49/q53vm+Q/RfGTV1UqV8Xg/qZ6H138?= =?us-ascii?Q?4qCtS94gQC0r1XU9zBELDBFrTV5n40BcdHd/NJliRk4bOVfATcZcwWfmK0tf?= =?us-ascii?Q?2iuA+JUDrGUEirqyBge+rXg9/QJSa1o8f2nEkR8HC44r9nrJp6ysUtAd5YC+?= =?us-ascii?Q?VqdZ2TVJ9ic/wzZ4bAEmC98E1p5eVbTbv84UXcZvpCgxKhuy6tqLZ5cdu1ZP?= =?us-ascii?Q?yi9yymBSl7PLbiWDkinS0N+aek3gtZOTY1QdG7wySJxG0EfhwSn0UKMiiAa5?= =?us-ascii?Q?SiFf7o0W1LuEROeNcLf7dTH3WwEtnHHFpsa43VwUhfGklkP0ldkpkExL7ref?= =?us-ascii?Q?s2qHHkkC5csS/yfCFMLLyDBlj9N33wk49W44rICyVBVhDa1Ynpis89udgRMk?= =?us-ascii?Q?A9fFGJjJ000OWlYHt9NKU7dZsxL+eIRr9JFvndNuSSP1/WyadXA1cdxEjmwi?= =?us-ascii?Q?YS9DRsZVU3fMqIRjveeQmoF8rWSkXJyBLuOpD3JiRp+xHnW6qt406nP324+s?= =?us-ascii?Q?vYqZL557p2BJk3TjLHzwg+tm+dRgwEcGjCg3BstjKH2seq2Prkcu6UH/lQLW?= =?us-ascii?Q?pAylGwqVQT+eFWbe00bg0neUAucbesAVr42iRNc20dJ7q1zqQhRvx7/I0UvW?= =?us-ascii?Q?X+A6qBV3nPnk03aCjR3yrY3dZcU2wDtnb2ROX2IZQbldguBU3t1LazDEYsQn?= =?us-ascii?Q?yEc4M0z7pqSnV3cwm+NwABHALQfrSJfgoAMt3BOP0MShGOt7WWu0H8jdr/RS?= =?us-ascii?Q?/eKpnfD73fSJhdUfEp+SLFH6jJMtWlgBAK3TOo/eGpbQHoJLqRXUXoX8Qo9u?= =?us-ascii?Q?fIMBw1BbhnTuiERpQ962BZ56ZM/MkTHLc8HB1xqf4BTPY4NrkAR1942BM1zR?= =?us-ascii?Q?Xw7xXAdCyXt6pbADzWXYDq+vWjVW5q2SoEqRPx7JhgG9PC7YjczjRi8ZIz/b?= =?us-ascii?Q?7kzMNYcYxDqzU25AEJUz35hXTzdG6eYtEnBZulwBlqBKA8n0DTq3ceRXOSw2?= =?us-ascii?Q?d5zqBk6ftULqnymWU72olsedP2keNKVDJgb4o1EBEEP9vl8vSYZGw8bV82V7?= =?us-ascii?Q?dBOctWU6vKVzSsSTNEyjplMjfBEyE86nm/xqCwg4d5FLExpdymnr29CQB3jW?= =?us-ascii?Q?I6YydLird5Jwz2u/9UKu1O100lsSGxbSASAMpI2DIhZ51qsMkZLbjNIMrsxx?= =?us-ascii?Q?6OhwvNhXzBb04nHizBfZZHFm?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1702 Original-Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none; networkplumber.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 30cfc072-011a-4e25-1e4d-08d8f946c6f0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W4oeox/SyIKrcRtgIDwaKSkRUvDkeu/Y/dSKeSfP6FY/FggTL6TyHWRfUGZvHCVVqpEbV9FF0EsvAiJwvJ92o7CIYODdGkmgnVKrwHNHmUD6TMjfws+iuPcgx7ndCKcp2e7QZLVaRJI+HoklhmS8fZykBlYMYQo/L7Lf1GIWaLfLUcRa6GW1mAD2X3wPztgMz+vxGwE37KhHVRHiJUXQwJNMUFiX8mVDz9xsv4L6AipTbwvtsAelLBN/6EmZ2aarOh8Z56tOh7xA0KThkCOJPmvVMUQpBEw+4+ZrODpeeqJ7/3Oo6NRnkvdkjHw+mG67Ct67oOum8X8patOqfZqMys62dhTsaDUdZn+00fBlZ7mw9Y9Dpcflw1BBTYF7ZLVabBOk3kLEOl4LTu6yM4JPLphWs2NiCt7Fi2PmAUxagVZzjfa8E8M11odcAsfkd30ZeWHWjrU+DlbOJ1QCqj2HA8Syfy1lO9YY8Z237DVrs5DKPNz3yrM7q+zGTUed4uWS225axEdV6a2f1g9T4HAA4VzA9qwVZwW7slV8jOrOXPMOoufkZx9VoHGAQbj2q+mSa7Zb8MDa0TIq9eD4vM7uf0+5MEHGlDruh2NbquPj0kdGyBS3KqlOGDzFpfPS+tT141Z/x7H8Dl2jIqNcjlSP9LyKEhT/V3PAWRlHyk4WRdyaF5oRVmtpO2AdeogxCVa1XCmkJOWdnz3og59iUjZ04s81NuahssbM+j3kKm0Rwy8= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(39860400002)(136003)(346002)(376002)(46966006)(36840700001)(45080400002)(36860700001)(70586007)(70206006)(81166007)(7696005)(86362001)(26005)(4326008)(83380400001)(186003)(52536014)(8676002)(336012)(6506007)(316002)(110136005)(54906003)(55016002)(966005)(9686003)(47076005)(82310400003)(5660300002)(478600001)(33656002)(2906002)(8936002)(356005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2021 21:56:18.0471 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 80594a1a-b783-4428-33fc-08d8f946ce94 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3144 Subject: Re: [dpdk-dev] [PATCH v5] pflock: implementation of phase-fair reader writer locks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" >=20 > This is a new type of reader-writer lock that provides better fairness > guarantees which better suited for typical DPDK applications. > A pflock has two ticket pools, one for readers and one for writers. >=20 > Phase fair reader writer locks ensure that neither reader nor writer will= be > starved. Neither reader or writer are preferred, they execute in alternat= ing > phases. All operations of the same type (reader or writer) that acquire t= he > lock are handled in FIFO order. Write operations are exclusive, and mult= iple > read operations can be run together (until a write arrives). >=20 > A similar implementation is in Concurrency Kit package in FreeBSD. > For more information see: > "Reader-Writer Synchronization for Shared-Memory Multiprocessor > Real-Time Systems", > http://www.cs.unc.edu/~anderson/papers/ecrts09b.pdf >=20 > Signed-off-by: Stephen Hemminger Looks good. Acked-by: Honnappa Nagarahalli One question below > --- > v5 - cleanup typos in the lock code comments > minor revision to unit test. > Note: the unit test is intentionally the same as other locking tests= . >=20 > app/test/meson.build | 2 + > app/test/test_pflock.c | 197 +++++++++++++++++++ > lib/librte_eal/arm/include/meson.build | 1 + > lib/librte_eal/arm/include/rte_pflock.h | 18 ++ > lib/librte_eal/include/generic/rte_pflock.h | 205 ++++++++++++++++++++ > lib/librte_eal/ppc/include/meson.build | 1 + > lib/librte_eal/ppc/include/rte_pflock.h | 17 ++ > lib/librte_eal/x86/include/meson.build | 1 + > lib/librte_eal/x86/include/rte_pflock.h | 18 ++ > 9 files changed, 460 insertions(+) > create mode 100644 app/test/test_pflock.c create mode 100644 > lib/librte_eal/arm/include/rte_pflock.h > create mode 100644 lib/librte_eal/include/generic/rte_pflock.h > create mode 100644 lib/librte_eal/ppc/include/rte_pflock.h > create mode 100644 lib/librte_eal/x86/include/rte_pflock.h >=20 > diff --git a/app/test/test_pflock.c b/app/test/test_pflock.c new file mod= e > 100644 index 000000000000..6922bbc2f813 > --- /dev/null > +++ b/app/test/test_pflock.c > @@ -0,0 +1,197 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2021 Microsoft Corporation */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "test.h" > + > + > +/* > + * - There is a global pflock and a table of pflocks (one per lcore). > + * > + * - The test function takes all of these locks and launches the > + * ``test_pflock_per_core()`` function on each core (except the main). > + * > + * - The function takes the global write lock, display something, > + * then releases the global lock. > + * - Then, it takes the per-lcore write lock, display something, and > + * releases the per-core lock. > + * - Finally, a read lock is taken during 100 ms, then released. > + * > + * - The main function unlocks the per-lcore locks sequentially and > + * waits between each lock. This triggers the display of a message > + * for each core, in the correct order. > + * > + * Then, it tries to take the global write lock and display the last > + * message. The autotest script checks that the message order is corre= ct. How does the autotest script does this? > + */ > +static int > +test_pflock(void) > +{ > + int i; > + > + rte_pflock_init(&sl); > + for (i =3D 0; i < RTE_MAX_LCORE; i++) > + rte_pflock_init(&sl_tab[i]); > + > + rte_pflock_write_lock(&sl); > + > + RTE_LCORE_FOREACH_WORKER(i) { > + rte_pflock_write_lock(&sl_tab[i]); > + rte_eal_remote_launch(test_pflock_per_core, NULL, i); > + } > + > + rte_pflock_write_unlock(&sl); > + > + RTE_LCORE_FOREACH_WORKER(i) { > + rte_pflock_write_unlock(&sl_tab[i]); > + rte_delay_ms(100); > + } > + > + rte_pflock_write_lock(&sl); > + /* this message should be the last message of test */ > + printf("Global write lock taken on main core %u\n", rte_lcore_id()); > + rte_pflock_write_unlock(&sl); > + > + rte_eal_mp_wait_lcore(); > + > + if (test_pflock_perf() < 0) > + return -1; > + > + return 0; > +} > + > +REGISTER_TEST_COMMAND(pflock_autotest, test_pflock);