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 5FA9FA0561; Wed, 3 Mar 2021 11:37:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8957C40683; Wed, 3 Mar 2021 11:37:21 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id B7AAA4067B for ; Wed, 3 Mar 2021 11:37:19 +0100 (CET) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 03 Mar 2021 02:37:18 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 03 Mar 2021 02:37:18 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 03 Mar 2021 02:37:18 -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 10:37:17 +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 10:37:07 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) 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 10:37:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CsKHZ4pTdy2iLBqISILJqDLt07f8ExC7jCP6nhfEtShU81tILridfXazWoplpyU2TVpmGemXYZrzS62zahAHecvxuR9ZSe8ti6+81iQYFu+v31x9/w6rCUhB0MMcsA5pXqIIyuY76wtdV01YZxlkgfxw0RkGp4s2cHozhskqG1SqORuq/cI991wBAT+q7oxbvQ04kh0TGqU9NNedyKCZ3tbZwtzucQFgArZbv1d9qs8jZFXeskxmV2MeRPTLsVsizHUdzvKD3lC+g0CmeqCjvOzdRT4YQLZYpX7sdNw8BOi/tv93G1jKBrTG14DKsHXl/uK+xushKLC7F3eqWZ417A== 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=SyyPhv+8KkYf4xHYEj2asIkS/7eR6Au5Fx7wW9qOy5M=; b=A5nzQc31F65wpVFPpKvcU5SG7IxSPVkGK7DSByO/RR59CIv+LCqd+u4lZdKKPD1M5GoExe3PW+TkUYVAH1Tc+YNF+PtHWKb2PpphvLSmcGQaFRBuFjsAUEWLAv5brkf1hSQc1TB931PUWRG0VmMJhSTgBsOgNYS6L4T/Bmux2GtLBehlI2Gzb3G9ha3lpT/3iAI3LbUSweORxiBvC6YW5m8h21XNYojBdFsJzRU9/VmkhzRn9rchQXZNKA8RlR7VwjBEHPvRBuDAGDaiHIng1VCrhFa6R/oVOnoKTa7EJHx5JZiuoTEl45gfcP2RwdkGJ8NakoqL8FJX6p2/4rlVeg== 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 DM5PR1201MB0265.namprd12.prod.outlook.com (2603:10b6:4:58::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Wed, 3 Mar 2021 10:37:04 +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 10:37:04 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , "pallavi.kadam@intel.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "david.marchand@redhat.com" , "anatoly.burakov@intel.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+zLjs0NwbhxapyDFZA Date: Wed, 3 Mar 2021 10:37:04 +0000 Message-ID: References: <20210302152658.9136-1-talshn@nvidia.com> <20210302152658.9136-2-talshn@nvidia.com> <20210302200912.63b57033@sovereign> In-Reply-To: <20210302200912.63b57033@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: 9f6c469f-f93d-48ed-07f6-08d8de30498e x-ms-traffictypediagnostic: DM5PR1201MB0265: 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: Xq2pFyYXdKD/wltYoNYzmaHKrR886wB/w3dHnaznL34KgiWFOb8PtUYlghFB+3C/o4bPekfsaQeZO6Aa6PwvSDygwSphFwYpN/ZsJqdMCgkgInimZQ2cdvRyL+luSvPAEsUzUGIdCnw1kLGAjuzlb/KhQUvpXXN3pS42odKf7AiBUmPrbMmX2o3MBF4AtqMDNVwpgya3XDK41iNYTjnM2vqItcEO8t2kQLfDfAHExCtZI3HjrfEkHecKxnNM7IjgFuCzrFHg/a7iidVEAlJb+ZH/d6Ka9P++FZaupcW3yR1V622D8c6XFQiT6O0AG5pgjsfzTHGA2YQNMGea146GKKWd9pF+cS7z0QiapjZeYYbAYxtj90QhP6K6vfQbtXy2cR2ZmgeNYVD1ILT4MgNsIPzpraMtYyCusJY+jhVfObmVsvo+Wsa+bABwVfTLzzK9NOSizwxMB3N6D/Wxg7kb/ebGAoB/Ti9BK7LN6dHnfEqTygYYx+3wxttOuB1gylRF0npQtB30GnDxpVdri+qDNw== 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)(366004)(376002)(39860400002)(396003)(136003)(346002)(6916009)(83380400001)(55016002)(316002)(54906003)(9686003)(2906002)(66946007)(66446008)(64756008)(66556008)(66476007)(76116006)(26005)(186003)(71200400001)(52536014)(5660300002)(7416002)(4326008)(86362001)(8676002)(33656002)(478600001)(8936002)(7696005)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?FGlWLiv/mSDHYhnptYmDnp0FG+17vFF0miUAo/XvpY8ji/mVud/ClcX2N1Ra?= =?us-ascii?Q?zLSH16/AI7vOEEz/8nmZmLNunjJhmCOlgRa+1grykU2SHDl5EQWO8yHBQz12?= =?us-ascii?Q?+dOnNN1Sth8yKRCoXbYdZdcc324Sg/4CjgxSGL4KIDgkh6Osjo7DbIhPTpb8?= =?us-ascii?Q?q8+5Syz7ZawNi9oE6pDdJCk2ZMt3by8gZIHefgSg7mCTZ+N6hKFpeIeiB1/V?= =?us-ascii?Q?+pyYyCdhBd3DVpzKh6r6MXG7F/BdbZ2A5SeDi/jHo6spn9OwFPdlGmQ53EOR?= =?us-ascii?Q?5a8CnPbOCP9YxsGo5qrcEr1amrc0vK39si2QNmXcde9cuGVzW3w3fTgGHON8?= =?us-asc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sS0oJ+2oWWvGh+nNmqU1A?= =?us-ascii?Q?Yd/kdjx0KcFgmIksW70WekM0ckCXnuRugE8CrGSf6NI6MO+P8GaaeBnJ2eSt?= =?us-ascii?Q?nds=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: 9f6c469f-f93d-48ed-07f6-08d8de30498e X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2021 10:37:04.5447 (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: NGOfsHcmNFQUQ+gLu8nKrn1N4bM1GLD7+ilL0Vdole6hoDYtqT+JMgfHjmo5yspTwYZKSlHEJg87uj8M7TPKXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0265 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614767838; bh=SyyPhv+8KkYf4xHYEj2asIkS/7eR6Au5Fx7wW9qOy5M=; 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=ge/OFjmavo5Y2o17WHNy6QB4+zRfdi2Ew8SUN+JqW6IZz9ylVkZ4xoegfPbCzNxg+ Fv+QlIzacsvurF0d/uk3nhWazOwVOi5fqthq/fVCOCNHVOnlysTixllQ57mNlurI8k WCEzfu6+1/ARf1M3iDQHzI/won8XhU3BCOIzP8jX9IsNjJ6b8q+jyQu+K8ppUdMrLl Eyhn/IBYbQ87zfAHPWJsYeCurjV+c6loVjDdEZBOWtJVweO4t6rnVTgUHUkC7z1wtY RxrHsz3UYXynos+vfIayLvNf6ad5zJDch8114+tqg+7u3AEH5UO7quCOgIlZkZxa4L gToYrn4HnyYUA== 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-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(-) >=20 > 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 returnin= g > some suitable stable values. OS-specific error info can be logged at debu= g > 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 co= de 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?