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 B7809A04A5; Tue, 16 Jun 2020 21:59:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FF7C1BFA5; Tue, 16 Jun 2020 21:59:04 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60040.outbound.protection.outlook.com [40.107.6.40]) by dpdk.org (Postfix) with ESMTP id 9E6661BFA1 for ; Tue, 16 Jun 2020 21:59:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDPYuXeXcuVBvUL/87e9t2rOUo491eMjbDgDr493lmvSprzixCFxTEOPQv/JWM5IuPAwjEpbCEcSzHnbAU1gR2U9Mwf8s7sC4qu7KPHi+fddXTEpceoIxm+cW8vC/DZJGC6QJBInHaqbuFJvVDiHiehWvBGI74G5LvN62/ux4us5RTM+8+PBMJSm0Iv6kS7yPaC6eC7xs3oMHIXIlKvTsNOSN0HP9BqhN59QGQO2nSHf7me7XAZbNUIc5xsrbcNuXybwNbbqYEyHKb/aLUFW0VEW/y9kLZzqIv0/HZfj0/iIDwxhFoDUNeKuKqx4kQEbpUqXJBM0ygQ9VycRZwEPBA== 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=MGEeZ0j0MzeeC99jB63TawPwzVyuSCa/PUaVf48/cXc=; b=ni7boyNNbpySCnv6wEVBywFpsCF/29SHJch+pURg+8VY/cekU+NPGc87VOXyCW4M9nczZQQFhVRZWxypA7t/ZhE/mXkOIJdm9NHP4E3qt5sGqk1VC9tpxFLyEyR6nMSZCB3k9ejDB/d5DOtuP0KxCQsFu+YO34MXPAj3O5t29dQFxLdZ6lLqngDNBakEJUnafRU2hMNDGCYLe5vN97LsUeq7W6FH0vTT7QeWenMoyGj7nvTwUo4o6DbaRx+Gx+x0vYJA6CiU2mFHtkr8aKJ9OFQ/JQbYVMxwvQAL0IiYiotx57dTmYeAC5yNc6jawWa/zIqbTc95sOoXHV87ByTb1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MGEeZ0j0MzeeC99jB63TawPwzVyuSCa/PUaVf48/cXc=; b=c/4SV+7iq8sARkwKR06burKzzGzqtBoCs7LscfVCDhXJkFhAR5cLPEclgVN43Ryhgp+YHmxR5ix4R/QsM/B1RjV7Z4xHcUyCLl/HlwmTduUj834SA9tzMNTDG159TLzRpc3Qxz7qbOLeYliyUd9H2v/3znhEIjpVns9X6WvYT6c= Received: from VI1PR05MB6128.eurprd05.prod.outlook.com (2603:10a6:803:ec::26) by VI1PR05MB6192.eurprd05.prod.outlook.com (2603:10a6:803:d7::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.24; Tue, 16 Jun 2020 19:59:01 +0000 Received: from VI1PR05MB6128.eurprd05.prod.outlook.com ([fe80::e98d:c6c9:be41:86e1]) by VI1PR05MB6128.eurprd05.prod.outlook.com ([fe80::e98d:c6c9:be41:86e1%3]) with mapi id 15.20.3088.029; Tue, 16 Jun 2020 19:59:01 +0000 From: Tasnim Bashar To: Thomas Monjalon , "dmitry.kozliuk@gmail.com" CC: "dev@dpdk.org" , "harini.ramakrishnan@microsoft.com" , "pallavi.kadam@intel.com" , "ranjit.menon@intel.com" , "ocardona@microsoft.com" , "navasile@linux.microsoft.com" , Tal Shnaiderman , Fady Bader , Ophir Munk Thread-Topic: [dpdk-dev] [PATCH v3] eal/windows: fix invalid thread handle Thread-Index: AQHWOIG0Frjhw4BpeUSqtQMYBkbQ0KjZaXUAgAJAcfCAAAqhgIAAB9jA Date: Tue, 16 Jun 2020 19:59:00 +0000 Message-ID: References: <20200522001112.48932-1-tbashar@mellanox.com> <1716943.Gv3JEJsLzV@thomas> <199043081.H7jX1ncZh2@thomas> In-Reply-To: <199043081.H7jX1ncZh2@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [2601:600:8680:3880:9d7f:8ce4:10ca:cdb4] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a6740280-acef-4894-48bb-08d8122fb6af x-ms-traffictypediagnostic: VI1PR05MB6192: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 04362AC73B x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vGi8B6c/HsxWM4wqXu6zQA/DnMSIUFNxXmNElsM30kw1cANpfJw/5GAl5Jvi/JG9n94oA2Oj4yf+f+wuvWK/Vef6lm0laSEb14WRY+f4I0hO21JqtGV3on03jHsR7ymW1lXKoWGWqUysgFFL9+UkamJueFJuW//Bm0neIlEs9bkJzDgeBgFAi+D3AS7Lt11FvMfigFqC683GzDphFDsq7tmn6+sjXLLoKpRSAv+E3hZ61erIyFsicg7ZamHtiqbxeQfyYwINdApTKRb0qVfOjAmdPX6VDL+Vcq+PojXJJD//9X6Ank+G9SYcZi/dwFQl x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB6128.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(4326008)(71200400001)(33656002)(83380400001)(8676002)(54906003)(8936002)(66946007)(45080400002)(66476007)(76116006)(110136005)(66446008)(66556008)(9686003)(64756008)(498600001)(52536014)(86362001)(55016002)(2906002)(107886003)(6506007)(53546011)(7696005)(5660300002)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 5cVcNwDRPZosvqPnKjcrOWOzn1GWn4wg1FQCt+0jC4M5S6xYqrfTpHA+iF4elslxQRsvEEIG88FBfZh9V98W0f7koXP715UdLCch8IAKEEuJBcFGSZOYm/69uj9CukiJBlTb156uUYwrelkWm94p1jYVmYzw1xLc7g1Cr7KAK1utejeGmXpaKVV2ROw/XPX+9zwU4YgPfzhiaufVQYN2crF593wMeWtY2hjNJaFRbXNFi4evxmPFF2Q0m2oi+YZfBnC6S2gprwFI1dPSrrjEijYepN4VrQYr6qIGy/XN8UcoNEao7DT7E7DVdyhzIe0C+19V/DWx3592ckB0JlyKz+BMH/FkHeV1wESx2+zQXTRwyVHjotdEy1eNY3Q5ArGj5ShO1Vq3ipc9GGE4PuZkX/C31SPoErC5RLnV+xZTPObLf7rSny3nTBvenTRb+MXu2LcthXNSOqftF0c0MOUF+E1XzYTjio4CeDzLLhbcIJNWBIjjN8PmxMJSC+V+U9qcH12Sa0r8vteSNgRQECrecDyxFIcpH13skh6NHHvDRhBPYN86FeHyAO5lGXchNUV8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6740280-acef-4894-48bb-08d8122fb6af X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2020 19:59:00.9629 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /u2EVy+X4jrys6XvqSPoQBD2zcndWd6CSGZEBBVu9TgtQ/3Kebvgs/dozEpA10JX3p/7+h48/CY68u2U2HPRrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6192 Subject: Re: [dpdk-dev] [PATCH v3] eal/windows: fix invalid thread handle 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" > From: Thomas Monjalon > Sent: Tuesday, June 16, 2020 12:17 PM > To: dmitry.kozliuk@gmail.com; Tasnim Bashar > Cc: dev@dpdk.org; harini.ramakrishnan@microsoft.com; > pallavi.kadam@intel.com; ranjit.menon@intel.com; ocardona@microsoft.com; > navasile@linux.microsoft.com; Tal Shnaiderman ; Fady > Bader ; Ophir Munk > Subject: Re: [dpdk-dev] [PATCH v3] eal/windows: fix invalid thread handle >=20 > 16/06/2020 20:53, Tasnim Bashar: > > > From: Thomas Monjalon > > > 02/06/2020 04:00, Tasnim Bashar: > > > > Casting thread ID to handle is not accurate way to get thread handl= e. > > > > Need to use OpenThread function to get thread handle from thread ID= . > > > > > > > > pthread_setaffinity_np and pthread_getaffinity_np functions for > > > > Windows are affected because of it. > > > > > > > > Signed-off-by: Tasnim Bashar > > > > --- > > > > v3: WA to remove warning(-Wmaybe-uninitialized) > > > > > > The -Wmaybe-uninitialized warning was there before this patch. > > > Shouldn't it be a separate patch before this one? > > > > The warning appeared only on this patch, so we don't need to separate > > it >=20 > I can see the warning on the main repo when cross-compiling with MinGW on > Linux. I didn't test with cross compilation. In that case we can separate the warn= ing fix from this patch.=20 >=20 > [...] > > > > + memset(cpuset, 0, sizeof(rte_cpuset_t)); > > > > > > Shouldn't we use RTE_CPU_ZERO instead of memset? > > > > If we use CPU_ZERO or CPU_SET, we still get the same warning! >=20 > That's strange. Does it mean CPU_ZERO is broken in > lib/librte_eal/windows/include/sched.h ? > I don't see any issues in CPU_ZERO. I thinks the issue with compiler interpretation. I also notice if we check the cpuset is null or not, also removes the warni= ng. But the strange thing is, it removes the warning only if we check like this= -> if(!cpuset) If we check like this -> if(cpuset !=3D NULL), we still get the warning=20