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 6156BA0561; Wed, 3 Mar 2021 12:54:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 446F340684; Wed, 3 Mar 2021 12:54:07 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id B04DD40683 for ; Wed, 3 Mar 2021 12:54:05 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 03 Mar 2021 03:54:04 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Wed, 03 Mar 2021 03:54:04 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Wed, 03 Mar 2021 03:54:04 -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; Wed, 3 Mar 2021 11:54:03 +0000 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 3 Mar 2021 11:53:48 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.108) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 3 Mar 2021 11:53:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M5l4dsVeHDSksVwIk/yhmol+tEkzV9DOZ2PQA8ki2aNo/ByP1uCUIMkrJ8kCoWLcgH0DT3ayQM0OFqq0vEU9ELdjkRMCfeA2ZjhsZCyRNSuVOSJ2Vlu5k/+L1QmvVvTa8ZfP9lC/SvOjIcsEdh7xh4tSQvhB/SHeJs0Dp3O11fOwFfMJANrFsGw05RJS/Lgh3EXaOq4cdff97R3zmXQ03Zju78z7iddlCPrVSbp2pHwZZBTGYlcRO4AgHiG/V/Q4xJ3lF8Z4Ym1At3f0WP0jaccKZcSx+rvtj8ivUY7E3/asEUxFTWosCKD6I7my201GW66kyr0vWIxXGIWH70aG9w== 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=p1Ibh5Dfcc+Cpm4nfEbvnUoAN45iJ4bSD0mkKqnYliY=; b=GYbqh3Myx7x0tmVRWDv6BAwMsguTJK+hvXnS96vSTATCnorCj/fq4vRdbj6BL6LFuR8zEgJOE8hS/AiAdzKCgPIe8tHl2qnhPXjk/q4tQ/5sRQrGWCTHgajybmSNgbwM+tzk7C35fIoc7Qj1WUAAlwX5Xip7LcMaO26vfVNK+qVfvkQZqB35QtZv5KspdVn1uZFqhju4qkPFsYe/Kf7PqHdwRgIpFL+eyqQO5t4nJHmZmw3JHZeOh/ZrpbTrpFEockYodwuLSnYTkOcB2qfLik/IgaKFMBf8aCowyh29JQwPoIv9C2w8AuKl0OhysegWiT0PZjXoWJJG2aBXftaxeg== 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 DM6PR12MB3756.namprd12.prod.outlook.com (2603:10b6:5:1c3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.33; Wed, 3 Mar 2021 11:53:45 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d%5]) with mapi id 15.20.3912.017; Wed, 3 Mar 2021 11:53:45 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk , "anatoly.burakov@intel.com" CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , "pallavi.kadam@intel.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "david.marchand@redhat.com" , "vladimir.medvedkin@intel.com" , "mb@smartsharesystems.com" Thread-Topic: [PATCH v2 1/2] eal: error number enhancement for thread TLS API Thread-Index: AQHXD4chcX3F+JdMCE+zLjs0NwbhxapyDFZAgAAQLwCAAArgcA== Date: Wed, 3 Mar 2021 11:53:45 +0000 Message-ID: References: <20210302152658.9136-1-talshn@nvidia.com> <20210302152658.9136-2-talshn@nvidia.com> <20210302200912.63b57033@sovereign> <20210303141016.5e9071dd@sovereign> In-Reply-To: <20210303141016.5e9071dd@sovereign> 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.48.30] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a47bd69f-991d-41d7-b847-08d8de3afff5 x-ms-traffictypediagnostic: DM6PR12MB3756: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vMqAFiWE+G8U84E/F0EmJe3VSNqEwo+ZpO8m3SxkUpewqBsG65z0BCKv78kJRItZMHlfe1mBnVrBIWz3oNW0iP4A//BXUjanVljuvMN3Z/YK2d9N1twDPDl4Fkm5u/k7AVurqDvdKnVsgPlEKEM4E/yHxLnVloVehWCIgv1mX0q7kK8dgc2kbHsr0Bx8PZ5qZn24zlzVDooHy/cAVsvNtljJ44AEk4mUBaiK6TegBqL/CtQ9CO7WgHx8rgnIE6DGoHT9mTw9yXJCVsv2O6Lt4Ej3pi5+T32dKGI2SYWvgLLyj+2dYJYp5Me/pmv0/DrmqRUwYSPNPY9pKWKpVxiuqpUCz+rIQUYxLAvTbZCUqOgGGYZ6zWHpXYBY1NWNRG2vPRhpkEEwsbNirwfiJuwEJDlnOgJH432lz/MiF1wtkorAUnX90TLP5eoWkY0x+7X6ni9/M/4I/ZLuTJYJc1UFDJoEPeXwtNe2oTNs+wf5g6aaHnMfZH2SAnyaXCkPRUWVRpkLkoKWmYOUtUH8YtZKzg== 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)(366004)(136003)(39860400002)(396003)(376002)(5660300002)(110136005)(83380400001)(7416002)(2906002)(7696005)(64756008)(55016002)(9686003)(66476007)(478600001)(66946007)(8676002)(316002)(66446008)(26005)(71200400001)(54906003)(52536014)(66556008)(186003)(86362001)(76116006)(4326008)(33656002)(8936002)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?BvMvFgrJK+1Pvui3sS5RDobCrMIWqLBhHTl+e67nWjsChBsrvrcxi01bXAG4?= =?us-ascii?Q?oTn70uMDwTkd7omwUZiXjgHbatk7cNSRHacaJ5xG2BMnCQwD7tXU0XEGH8H1?= =?us-ascii?Q?SfGjuxYizv9qENWFjKtlQ3khAxl+tIZCJuQD4WWFotjNe3O63YBHGWkdd8dh?= =?us-ascii?Q?r73zyycp0ZSPHzB2n2Ao9ufaBdo82WjfLRM7KX0yssH234wHHywMP+XWlAaV?= =?us-ascii?Q?l45U7xKG4H6fcF+mfC0dZqWkPZfUHdV5qxt/itNguO6AsH8zkksnLEA3BOBM?= =?us-ascii?Q?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6T9mTNx2Kd/S5y8?= =?us-ascii?Q?06oufIyKMyN1T3Aji8L+aUbcUMsjB+Kr6VvWYZxcxq1S+QdI0vaSdZ1nNrk1?= =?us-ascii?Q?LnTxlU4pw26utUToE93kG0crh86RtTaCVbw9TjWQIRHGwTiA1Kp9dJJat89x?= =?us-ascii?Q?Po4=3D?= 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: a47bd69f-991d-41d7-b847-08d8de3afff5 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2021 11:53:45.5308 (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: SwMTjbkuarl861GF6vl7OFUfgyIrG9G8WsEtuQYddFA6aYSP4txSBBSN2Pq6hGkENpdGbfh7WHp+IAtvBlFuRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3756 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614772444; bh=p1Ibh5Dfcc+Cpm4nfEbvnUoAN45iJ4bSD0mkKqnYliY=; 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-ld-processed: 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=kovarsxC+zlXUsh36UCOo9Zx2qjg7nNlP0ra5uJGCnwmhC3QuFCPeEZhCGICe8cAA +ibdQBvEP3M/lnZFziiQ/6+m80AFazLczefc+uKYKrTyQZ3e8cz873FYmuRIB8NqII suQfytdt1r5mHkOTdnp5U/Mup/D1ZTzpP2T+kQhmTS+YeZxMvFO5gDbe49yO6gqyAT /Ja1gY1G5bK8MM9Pk/r8Bsr5GGOPfBadxrCcZbQUzO9Hu3rBzJyXdDcf0CrAImrhE4 +wWp+iC5tcgzT2QA45/u7lOViOLHPSGi+5oRtWEsHACk6OeyGcz8BlOWpv0wo60MBA jbfrrwp2ZpPfA== Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: error number enhancement for thread TLS 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: Re: [PATCH v2 1/2] eal: error number enhancement for thread TLS > API >=20 > External email: Use caution opening links or attachments >=20 >=20 > 2021-03-03 10:37, Tal Shnaiderman: > > > Subject: Re: [PATCH v2 1/2] eal: error number enhancement for thread > > > TLS API > > > > > > External email: Use caution opening links or attachments > > > > > > > > > 2021-03-02 17:26, Tal Shnaiderman: > > > > add error number reporting to rte_errno in all functions in the > > > > rte_thread_tls_* API. > > > > > > > > Suggested-by: Anatoly Burakov > > > > Signed-off-by: Tal Shnaiderman > > > > --- > > > > lib/librte_eal/include/rte_thread.h | 6 +++--- > > > > lib/librte_eal/unix/rte_thread.c | 6 ++++++ > > > > lib/librte_eal/windows/rte_thread.c | 8 +++++++- > > > > 3 files changed, 16 insertions(+), 4 deletions(-) > > > > > > Using OS error codes for rte_errno isn't the right thing to do: this > > > way callers cannot write a portable check of rte_thread_*() result. > > > Consider returning some suitable stable values. OS-specific error > > > info can be logged at debug level, as it is already is some places. > > > > In Linux the error codes return are not OS specific (namely EAGAIN, > ENOMEM and EINVAL). > > > > The problem is that documentation on Windows doesn't publish which > error code can be returned from GetLastError() for the TLS functions. > > > > Or do we want to use the same errno for both OSs in case the functions = fail > regardless to the failure reason? >=20 > Yes, so that callers know which codes to check against regardless of the = OS. This is different from Anatoly's original suggestion that values would be p= otentially different on different OS's. Anatoly, is the approach suggested by Dmitry fine with you?