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 81109A034F; Sun, 21 Feb 2021 09:58:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF4D622A25A; Sun, 21 Feb 2021 09:58:20 +0100 (CET) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mails.dpdk.org (Postfix) with ESMTP id BCA4E40696 for ; Sun, 21 Feb 2021 09:58:18 +0100 (CET) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 21 Feb 2021 00:58:17 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 21 Feb 2021 00:58:17 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 21 Feb 2021 00:58:17 -0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 21 Feb 2021 08:58:16 +0000 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 21 Feb 2021 08:58:04 +0000 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 21 Feb 2021 08:58:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EdT8fxFVZ3GwwN7RjWk6TH5TUHiXg+EjJwNbbb1yDvWRS7+RZtJOD75DIZH05EeN7UwFzFpk9KxbWcoHkOikydSHhVn+cNXuBbqjI8svVnGVhmFisbczSTs17fE5eCA3KLdrldq8+EeOUe0e19ZblBiWPeUy2KCD4eyJPLh5V8fy6RXKMrtpqE/Xm7qZcaptFF8rJdLYXuWYpmCM/IgXonS3On97kooKYQACTblKgkB7/StGX28v0BAVhxSnJeee/bun5w2tMFMwLKsGe8Qw0y81pXVpm3aqyosN0EoxYEtgdeNqbrA9d9GpMbATPrTgq5/sSWYbKE/i5mDIOz1aaA== 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=cd+WW9pCUlB9UpbgI+aH2jEHmLSiCne/Yd9LIiHoWI4=; b=ZVLnJPc8LxLIvQ3nZ2lyDaPWmrulu63xgUZDmMIyutobt2sN1cFLP7fQCVYQoLi/1DPqe5bfITCkhJ+UZIs4W/0K6bsG77MDLpSOZN+rIK6c68r+ovk3WZg2IpedcRvyQbUOJNEDkNrcdm6X1Tq/pYVUdowau1pkEYBRzbLmqWixzwwpX6fEVpnWXhbuKfELQD+ih1v8eXoDFW7jwXY8KTZeIW2wwTpdfkPt5uLvU2V3UwQEbqA+OWl0E8bxH6w+flsEPNUgCz7RbeYTKx+p8bc/G1qeKSp4y7N2ei8i1MUy29JME7BZ3X04s12ZOC4YAlDlZ6CXI0b+UDKGwoH1Gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3945.namprd12.prod.outlook.com (2603:10b6:5:1c2::27) by DM6PR12MB4169.namprd12.prod.outlook.com (2603:10b6:5:215::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Sun, 21 Feb 2021 08:58:02 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df%7]) with mapi id 15.20.3846.041; Sun, 21 Feb 2021 08:58:02 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk , "dev@dpdk.org" CC: Tyler Retzlaff , Nick Connolly , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Ray Kinsella , "Neil Horman" Thread-Topic: [dpdk-dev] [PATCH v2 3/7] eal: add sleep API Thread-Index: AQHXB/D4/kdFoBYEzUuVDTIGzeKl/6piTJhw Date: Sun, 21 Feb 2021 08:58:02 +0000 Message-ID: References: <20210220232910.772-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-4-dmitry.kozliuk@gmail.com> In-Reply-To: <20210221012831.14643-4-dmitry.kozliuk@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.56.206] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b004d0f0-0681-42c3-707d-08d8d646cba4 x-ms-traffictypediagnostic: DM6PR12MB4169: x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NNTFlS8oDjeIxjuA4xaYzEHE3mzYn7sKFBP5V8socqwSCXZqI1J7yTFfaRIWUSLidxBDKKX1qLIboKl6nqRLPPmuzwJVH9/mw3i2WeRNkRmIRLvHKORcbH2UkmpTCnWiUx1UJL35nU93tLollH/+R6wLLTEFtWd958F6o4HkKXgReqOKvogQ0MBsESp9YUQrHt2TcP5RbES5vvPomNufR/gd7e2EUZxFne+csEDwuakWHtpyEPdnplIY6Dr0rXchm2TOQqb9eIdgs7nxaenXM9Aq2yg5gE7oxufihvFl4qwhf+CvtEkknLtEb+mdcYXMl46X+sxZWchSMTZNIsCe1bFe+gIVbehvjBNd7bHETylz4QmboX6ru1AonYv+oWLXJGpN9siEsj8zrMPzopvy0DpXX8ITlaFb+4IHlBMdlywBKxYrw3tDFJoxnVOKm0ggtToEGoKqHYoRMD7eE7EPc+X9vBUXKFk1vLkQTzRV78qYBRm77L6+/KftbaVr26rCTt/qNO1TSpPLFmnEKx9BPQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3945.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(396003)(39860400002)(376002)(366004)(136003)(33656002)(86362001)(26005)(83380400001)(7696005)(316002)(110136005)(478600001)(76116006)(54906003)(55016002)(9686003)(71200400001)(66476007)(66446008)(66556008)(66946007)(8676002)(6506007)(64756008)(2906002)(4326008)(186003)(5660300002)(52536014)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ElvEoi37NSzO2Z0r3/j1k78XHHTf/zk/NeyQwGbgzvFWFhnbeM7SjjVzNuDB?= =?us-ascii?Q?XasQPOR+F0fSXjqj3kBcM7HBxaLx9DGYGzQLgkIN7HxuY9i4g6Z9Ma9yHsy+?= =?us-ascii?Q?Zk9fmHynbiXeH+/w6N24/T9S3+wQSqOTYQD31k//UiAffzS0fvX+ZYkoS/bQ?= =?us-ascii?Q?GKFA0HK6SPPs5SEk7j0lUjE8fYFAzjM3KlIaK3wVGpAOqwMBuALOPRWvEDs2?= =?us-ascii?Q?7mf4h7niUPdPeBQmzzMTLOuUrEcrVNjncKu9Qkb2HT7tCFrIx3OtwVFbuTEG?= =?us-ascii?Q?h5pVFfhb9OylIKkhCREcbEA7iVrbE0HOjMi6a3dH1hptr3ML1GZG96UK+1oJ?= =?us-ascii?Q?0tEEoDRsUgyPTTGOnjXk7QNUGoO+P4v1XtkHYFIGf3n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/e08gJg2G/O7QdI88V6VX0dl1YuGLw1X6a9gcW9?= =?us-ascii?Q?kMqhvdBxepZWAX4R5PRBxaUF?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3945.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b004d0f0-0681-42c3-707d-08d8d646cba4 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2021 08:58:02.4951 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0yTb2I7KQvaxBL0sFHatx8XzZle53ElXotO0EGRRaDcDhYSovpqNb2ZDZvJtjp4YDJ0jzzvtC5akszcM8MbxGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4169 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1613897897; bh=cd+WW9pCUlB9UpbgI+aH2jEHmLSiCne/Yd9LIiHoWI4=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs:x-header: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: x-ms-exchange-transport-forked:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=MYTLFDmhJZRX5MJGQvliNajnlpg0PI+zsohYyt8WRaevLEpctKVZqLAm6nmoXHaBu pgvOFrDOuztnvFSCPo+3NZTsJKLP5NUdvan/tc+xNiAHqAqe+G4QqQizdV7RYwOiwz kKbHM1jawdd7z0BsYeMsZfJNSay+4WA+xfqNzNczd3mh3lOENPMcj5N4xM2oBPUDvn 8POP6br9n9bhpCYjI6oeb+ySCqEqZ8zQN0aNlpTOFcxYwG8G23RimWgGmIKcv9kFUp ZwmaIhZc43cVlJAJL17cRwbmrVsYTYc3O+ve9HKRiSYDUyFPndO77IBPAL0GAOsltm WFBLRJ6ZKtGMg== Subject: Re: [dpdk-dev] [PATCH v2 3/7] eal: add sleep API 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" > Subject: [dpdk-dev] [PATCH v2 3/7] eal: add sleep API >=20 > External email: Use caution opening links or attachments >=20 >=20 > POSIX sleep(3) is missing from Windows. > Add generic rte_thread_sleep() to suspend current OS thread. >=20 > Signed-off-by: Dmitry Kozlyuk > --- > lib/librte_eal/common/eal_common_timer.c | 5 +++-- > lib/librte_eal/include/rte_thread.h | 11 +++++++++++ > lib/librte_eal/rte_eal_exports.def | 2 ++ > lib/librte_eal/unix/rte_thread.c | 10 +++++++++- > lib/librte_eal/version.map | 3 +++ > lib/librte_eal/windows/eal_thread.c | 9 ++++++++- > 6 files changed, 36 insertions(+), 4 deletions(-) >=20 [snip] > diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map inde= x > fce90a112..106864469 100644 > --- a/lib/librte_eal/version.map > +++ b/lib/librte_eal/version.map > @@ -412,6 +412,9 @@ EXPERIMENTAL { > rte_thread_tls_key_delete; > rte_thread_tls_value_get; > rte_thread_tls_value_set; > + > + # added in 21.05 Spaces, should be tab. > + rte_thread_sleep; > }; >=20 > INTERNAL { > diff --git a/lib/librte_eal/windows/eal_thread.c > b/lib/librte_eal/windows/eal_thread.c > index 908e726d1..957792301 100644 > --- a/lib/librte_eal/windows/eal_thread.c > +++ b/lib/librte_eal/windows/eal_thread.c > @@ -11,9 +11,10 @@ > #include > #include > #include > -#include > +#include >=20 > #include "eal_private.h" > +#include "eal_thread.h" > #include "eal_windows.h" >=20 > /* > @@ -154,3 +155,9 @@ rte_thread_setname(__rte_unused pthread_t id, > __rte_unused const char *name) > /* This is a stub, not the expected result */ > return 0; > } > + > +void > +rte_thread_sleep(unsigned int sec) > +{ > + return Sleep(MS_PER_S * sec); > +} > -- > 2.29.2