From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79C9DA052A; Wed, 23 Dec 2020 12:44:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B5C1C9E8; Wed, 23 Dec 2020 12:44:48 +0100 (CET) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id 4A128C9E2 for ; Wed, 23 Dec 2020 12:44:46 +0100 (CET) Received: from HKMAIL102.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 23 Dec 2020 19:44:43 +0800 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 23 Dec 2020 11:44:35 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 23 Dec 2020 11:44:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WVKw0ltHNWcA+g4NBy10WhSyQflbeAcr4lv6XKZhVWV1EtFn0L3UPeF1LoMUTJUH7PidAgBoTiSkoXsek0TXaebPHy69xhnv2Bcq7uAFb9Bu476IYCWDuhNrhhU6JTTeG07WCupU5UCjgO+gPcUuxUqXNsgNb4Cx70573kKCPs7lGyigYRTjeGRAi5sVPFS0NUKwRfL3+MxzJ5cqQ9bwvLcBdC/dF9ZqYluGWM2OCqI9+rKzEe7zzla6xeTp3z4k7oE8iAHpDtM6rYitQHMg5wV8zlFMTSfj1HhDLGfphQGq+qABF2AlMTDUUH3liV/UFdeHnOwF8AER6Er/IFZmsw== 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=J78M+ffCd1vAGqTJqOUXQgs6T5t+hkbASyq4xJfHhGg=; b=bFoHz6X6BFZaCUsV7ub3LDJPI1fHZ6Axm0nkHuJ6HmYdZaKn9cp9bJ5xTQo3lb36bfE3fE5cbPxqdqADXhN629mtGt0+IFRuuKGUz0kKNtF0gmsScXrMzV+zITsJ4HyHa3SBjYVgesrNaiQDVP+siIkqlVdV6DEM6fCZbK+GxlP/ilCHt2AC5Vyh5uvNtnsB5hre6gwxVlnhqfE8x7A89JBOSgVuWqvkDzUVC+kLLiWo1UZt8N3mdPKIF6EWZQKyrf3j+E4UF3Azwsnk/UUwu90FoZjUvG8z3YWEUWer4Lz4H24Qa0ndeHnZAahFgvpSrEnS3jVblQ0X6XNahxiPmQ== 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 DM5PR12MB2565.namprd12.prod.outlook.com (2603:10b6:4:b8::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.33; Wed, 23 Dec 2020 11:44:32 +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.3676.033; Wed, 23 Dec 2020 11:44:32 +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" Thread-Topic: [PATCH v4] eal: add generic thread-local-storage functions Thread-Index: AQHW2MmEKTTaYuKqUkmswvsVBEhIdaoEj7iw Date: Wed, 23 Dec 2020 11:44:31 +0000 Message-ID: References: <20201217174913.14280-1-talshn@nvidia.com> <20201222073044.9084-1-talshn@nvidia.com> <20201223041801.5ea13a37@sovereign> In-Reply-To: <20201223041801.5ea13a37@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.141.17] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d359ec0b-d317-4f60-cf88-08d8a7381d1b x-ms-traffictypediagnostic: DM5PR12MB2565: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Oy/g05y7XhMkgkmOrcwNVLAXKmh1ORw07Ok2LTYDgdcWWmFBEZMX2sLP2OizGAa4faUXbjrgdZzxcbK+gksly4N/8XjchiGSeRd8JyJxkctWzICOMA3I4U1+7LvFdqCZ/mzLVyMc08axOpGlApI3zTkBs2dyU1TJV8TVKpeieGS4+2kQcVs/G+cDNJaToG5uqBCR3mKpGYjX+u9Njyh5et4HkmtGZfb1Yxnn34aXUfiKuz4Znz6mWeFMe/2i3DDaMtzD7x0pxx33TPexJ13Qxb4eqaPl5g8u/Uf7D6dEYs8TYhTSFCDqVRMNByy27dVkpudT2T/GhqBsEyA/z7dysSRNYj5pO8FujxWJ39rGnJm5XFzj/ejkBQtwnvipBvL9ePVChpnVkIgY2Ztls74jWqCOO3YVCuYaqckKDBSEfoS/PCVCz8MtTITPmWxjoZBk 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)(39860400002)(136003)(366004)(376002)(396003)(76116006)(8936002)(86362001)(478600001)(7696005)(33656002)(66556008)(5660300002)(6916009)(55016002)(9686003)(83380400001)(2906002)(6506007)(66446008)(26005)(8676002)(71200400001)(54906003)(316002)(64756008)(4326008)(52536014)(66476007)(66946007)(186003)(41533002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?OmHeT8q0ms5HdUZf5nx6uXGFSrGQmmpTkfjHxzbaOy6lHmnVHqnXDGSpo+si?= =?us-ascii?Q?4kwLOW20dfLvFCwXT9IhdCj0CBIYIioB5jVztbirmvI5Wx3j5n6W5w5vnKgs?= =?us-ascii?Q?auMPvq2KosiSo1GQT7GP32PQ1/wcGV57t2cHYx5u5IHi3oKhydvzei4zt6tB?= =?us-ascii?Q?Y1Q9Tmcyy1gCGPYvN9bxWTrxrzLI4xQOWTrqNSjPqKKC5scRu4oMW3R4evs6?= =?us-ascii?Q?LT5hicAOIv/vLRo3I9wiAlWwVpHy1JXfwwXMQf1b3okZZVStQ8v1zXY1BRy7?= =?us-ascii?Q?MhO/dAOHsFJQrGpQ4qVO8CHepvgN+gpCwnJF3lvw7Kr7E4USXjgBHVl3F2Ee?= =?us-ascii?Q?9yqZIUnKrJdt6JtCH0L7AXWYKa2XpPgGDTiIhQiV4cUz7J+xDRjTc0x5SMHC?= =?us-ascii?Q?/JUPLVuwh7Y6u+zpeplTInvQLF+JukI01h64ImNZdjYXugj+x3nWk4nVAuiZ?= =?us-ascii?Q?JnG1EUO9MOTkeJzlMUnL6d/H3GaUvB8xj2wnwlhi9RGdQUbYzL7mEaS/Ga9S?= =?us-ascii?Q?xZtp0hxlaX75j4jXO0/WVjXsyFWbW8ru62rI1UMoxhtFtHfYv/fwfmggPIrL?= =?us-ascii?Q?WFasl0vdc6J7hkQP8osMe5OtoSUS8wpzJlIjNrhVeg1ZW6Z0gTyZNwd2Qodr?= =?us-ascii?Q?LJi3k7hPqYhTNvgn+hFUZKaRQ/ur7Ia7n8OBvMT0Sw3FKbxVvipcZM8PpCG3?= =?us-ascii?Q?W0+3RNKzkEvcw3Reo8YheRwciC+lR1PEpgjHJIfhtYaRamMveOBwCGTcHqr4?= =?us-ascii?Q?Wz6x4BkauKHMpiiPdH3H4waldX8YbEwPV6n7h8BeZgjEQD2SDdjYnc6kQlqt?= =?us-ascii?Q?mTmSJMvaRQTIGo93vzgvNugHprskY24YvByCS8cd+X2+6VKGfT7QrUSfmR75?= =?us-ascii?Q?JbTTB3cQeHSZpaU5FcgUqYGCVTqGG4aIxmGRGp5ZgqTwvLem4V/t9vXV/USi?= =?us-ascii?Q?h5wXL0F7UbZmvZGWoRg3FM/kZJWfo/W3ejX8lz7QQEc=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: d359ec0b-d317-4f60-cf88-08d8a7381d1b X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2020 11:44:32.0244 (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: nqXVUkGLq30dmI5MB061OOjmEh6h8KImgjxmP4C6hu8GKI6HXZSF1NUQuuy9PZEeFkdf1bIC75z4p/laNzGklw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2565 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1608723883; bh=J78M+ffCd1vAGqTJqOUXQgs6T5t+hkbASyq4xJfHhGg=; h=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-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=l7qysFlnI15KZmWGu9ixn3VLi4AfRLXpCW4wu6YqY0AKOL0s8E9RxSdGJY+5Izr0M LfaP9eEHJQ0ga1/l9m31xNjoaX34FwItYoKf7VbKqCAOs1owOI6MX+G9vR6K4nqNeO y7JyfCagkcawXhJZCHk1KoMrpH4/DmF9nNej4bBHjGgF5vdqG3wywCyHMQdwrCdUeU H3o44bKN7S+eyvqXNphsQw3wN58xDGImgcX/mkkG/qoPzcaqFKKeuKTuw18q58HGfj VYbER6gNFlN0cj4xc6Sf9i2sy74FNd0ykR0mjxG0RGjtMq+2Eu+b8OMGLFKimNQ/im dNMvKoFod3V7Q== Subject: Re: [dpdk-dev] [PATCH v4] eal: add generic thread-local-storage functions 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > Subject: Re: [PATCH v4] eal: add generic thread-local-storage functions >=20 > External email: Use caution opening links or attachments >=20 >=20 > > [...] > > +int > > +rte_thread_tls_set_value(rte_tls_key key, const void *value) { > > + int err; > > + > > + if (!key) { > > + RTE_LOG(DEBUG, EAL, "invalid tls key passed to function.\= n"); > > + return -1; > > + } > > + err =3D pthread_setspecific(key->thread_index, value); > > + if (err) { > > + RTE_LOG(DEBUG, EAL, "pthread_setspecific failed: %s\n", > > + strerror(err)); > > + free(key); >=20 > Why free(key) here? Probably a typo. >=20 > > [...] > > +__rte_experimental > > +int > > +rte_thread_tls_create_key(rte_tls_key *key, void (*destructor)(void > > +*)); > > + > > +/** > > + * Function to delete a TLS data key visible to all threads in the > > +process > > + * rte_tls_key is the opaque pointer allocated by > rte_thread_tls_create_key. > > + * > > + * @param key > > + * The rte_tls_key will cantain the allocated key >=20 > cantain -> contain >=20 >=20 > > diff --git a/lib/librte_eal/windows/meson.build > > b/lib/librte_eal/windows/meson.build > > index 3b2faf29eb..1f1398dfe9 100644 > > --- a/lib/librte_eal/windows/meson.build > > +++ b/lib/librte_eal/windows/meson.build > > @@ -21,4 +21,10 @@ sources +=3D files( > > 'getopt.c', > > ) > > > > +if (dpdk_conf.has('use_external_pthread')) >=20 > Please describe the new option in meson_options.txt. > Maybe drop "external" from the name, what do you think? How about use_windows_pthread to be clear that it's unrelated to UNIX pthre= ads?