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 AD951A0547; Thu, 29 Apr 2021 18:00:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 659D2411E5; Thu, 29 Apr 2021 18:00:42 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E26EB410DD for ; Thu, 29 Apr 2021 18:00:40 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2F52B20B8000; Thu, 29 Apr 2021 09:00:40 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2F52B20B8000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1619712040; bh=5ivYxVKmaF+PXLdyev6PB4BQePtmia8Pve3k8QR5WQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EQN9FUwLWdEt0ByxeKng3Gr8WW1f3mD6eYqEi4ssgnSbzEJA+yvxTWIla5yr+vzQz U1uMtIGcYjX+ZrDywmAAflS32TxIyJjDXPcVV18t/wTBkqsbM/iNVFSMSsiFZy2U8Q wDbKXmoTCU+DKVuzkRLiQUWxCfWt2duw+JQATVUA= Date: Thu, 29 Apr 2021 09:00:40 -0700 From: Tyler Retzlaff To: "Kinsella, Ray" Cc: Thomas Monjalon , Narcisa Ana Maria Vasile , Dmitry Kozlyuk , dev@dpdk.org, khot@microsoft.com, navasile@microsoft.com, dmitrym@microsoft.com, roretzla@microsoft.com, talshn@nvidia.com, ocardona@microsoft.com, bruce.richardson@intel.com, david.marchand@redhat.com, pallavi.kadam@intel.com Message-ID: <20210429160040.GA21799@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1617057640-24301-2-git-send-email-navasile@linux.microsoft.com> <1617413948-10504-2-git-send-email-navasile@linux.microsoft.com> <20210429035029.349d3306@sovereign> <33056936.xYFp2keEGj@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [PATCH v6 01/10] eal: add thread id and simple thread functions 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" On Thu, Apr 29, 2021 at 01:05:05PM +0100, Kinsella, Ray wrote: > > > On 29/04/2021 08:44, Thomas Monjalon wrote: > > 29/04/2021 02:50, Dmitry Kozlyuk: > >> 2021-04-02 18:38 (UTC-0700), Narcisa Ana Maria Vasile: > >>> --- /dev/null > >>> +++ b/lib/librte_eal/windows/include/rte_windows_thread_types.h > >>> @@ -0,0 +1,12 @@ > >>> +/* SPDX-License-Identifier: BSD-3-Clause > >>> + * Copyright(c) 2021 Microsoft Corporation > >>> + */ > >>> + > >>> +#ifndef _RTE_THREAD_TYPES_H_ > >>> +#define _RTE_THREAD_TYPES_H_ > >>> + > >>> +#include > >>> + > >>> +typedef DWORD rte_thread_t; > >>> + > >>> +#endif /* _RTE_THREAD_TYPES_H_ */ > >> > >> pthread_t type in pthreads-win32 and winpthread is not 32 bit. > >> DPDK will have different ABI depending on a threading backend used. > >> Apps must know it at build time then. How do they discover it? > >> This is worth a warning in commit log and docs. > > > > Not sure this is an acceptable behaviour. > > In my opinion, ABI should not vary. > > +Cc Ray > > > > So pthread_t on Win32 should just map to the HANDLE datatype. > Which if memory serves is in fact a DWORD on Win32. > So I suspect that pthreads indirection is probably be just providing a circuitous route to end up in the same place, a HANDLE > > IMHO > To absolutely guarantee no ABI change, we ought to be passing back void * not rte_thread_t. agreed, the type should be opaque. but may i suggest uintptr_t instead since void * still leaks implementation detail.