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 C076742412; Thu, 19 Jan 2023 00:44:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A35340223; Thu, 19 Jan 2023 00:44:36 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id F1BDF400D6 for ; Thu, 19 Jan 2023 00:44:34 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 18D0320DFDB9; Wed, 18 Jan 2023 15:44:34 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 18D0320DFDB9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1674085474; bh=M1tSmWdVM450UA0qqwvlHlHJgP2dJpcMTfE4BlIzrfQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g+OBdTWYywuxLMcgMGHD6ON7UOOtOXgdlrENB+P07hCbNjrWlLfbqvbLlsRi9O8wl wyoZPuLcHNNWQ/D/TeanK2+mxsZTCdoNy8n36hyji/Q+Xnp9IHlF3Y9JW/r+UYTvJA mbBtt8G/FWjjNMA7mNpmZp9qBjBe6G7+qdYlkiTA= Date: Wed, 18 Jan 2023 15:44:34 -0800 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com, jerinjacobk@gmail.com, mb@smartsharesystems.com Subject: Re: [PATCH v6 1/5] eal: add thread set name API operating on rte thread Message-ID: <20230118234434.GA5692@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com> <1674071646-6854-1-git-send-email-roretzla@linux.microsoft.com> <1674071646-6854-2-git-send-email-roretzla@linux.microsoft.com> <20230118151312.5659939c@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230118151312.5659939c@hermes.local> User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Wed, Jan 18, 2023 at 03:13:12PM -0800, Stephen Hemminger wrote: > On Wed, 18 Jan 2023 11:54:02 -0800 > Tyler Retzlaff wrote: > > > + if (name != NULL) > > + rte_thread_set_name((rte_thread_t){(uintptr_t)*thread}, name) > > Do we really need so many casts here? Looks like the wrong type was passed > in the first place? we do until this code is converted to use rte_thread_create. the pthread_t needs to be casted to the uintptr_t (implementation detail of rte_thread_t) and rte_thread_t is required by rte_thread_set_name.