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 7BA16A0C44; Wed, 9 Jun 2021 01:04:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED03E41100; Wed, 9 Jun 2021 01:04:09 +0200 (CEST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mails.dpdk.org (Postfix) with ESMTP id 0995641101 for ; Wed, 9 Jun 2021 01:04:08 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id r16so10011148ljk.9 for ; Tue, 08 Jun 2021 16:04:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RVtEdLUGuELWCxrtcuazQZ1rm58cksCIU1JUzdrIzXA=; b=myqZ2lbFlArGId9ZtovSSPnRC0eAd8OS3+HSLNVuoCnBKvVsD25uhamQPVjpA+Qevy KLSwtw20aH3ex4mtgayNrRxcdPAWHDRtnAocId96vPqx/amZ2GPQaCMVnR25yd6/GLTA JMmw1v/5eImUXYD2HiL5JHvrR9h3i7f78Tqek4cx+6jBC9KklItyfZx89a91J+gx5NgF H+5YcuqcHIXJpG0vc9fmxR6DjcOxgDQOxTlQulAAADmVYEovq/GaZalHL7X4pFFQM8w1 p/5rY8NFIlezKee/8rAvHYZdKh5OWsArsD/X5f2V+5zaTyB6YdAYky5BCXp4kZny/eR/ zaEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RVtEdLUGuELWCxrtcuazQZ1rm58cksCIU1JUzdrIzXA=; b=Ojn5Au46m38EZwkl6ye8i5Qyl3ay38RKWY1IK+mtUGM3f9F7C29eU5Bw4MxXf6ostE sdOzORVAhwKsrJtph04+O9mCyjthZRHO3eRbMAN+7ykZfnOga2qVY5bk7SYpdqB2deSo 9MoAe9R6xKv7bekkbE7rXqhhfwhXvWUPTIbk9OC2vnTw3/8za/ufCZVrTEq8NYXVBniS SUbiCEcJHcWrOoaGWD9p3Oh0AhWhIik84Uj/GKicwTI7n4MzAyvvE5BkeASXHhGQJqKA 2Ntvk/PibeYyU3Nfw6hjiY2iveHWF8mrxC1FncSVP0EW033eTfmX8Um3CYRcT+x+0NPO fmng== X-Gm-Message-State: AOAM530wpF5WciUrDwSM7b1oeAtzmKMcZbiGRha8BXEM2I3PSY6a4XyX q+4+p7E4COxvYnNNsz46abo= X-Google-Smtp-Source: ABdhPJxtBLn7OPADTTfrhSnAbC0IUKicxG1IOKPPNTaP/k5UCIW6NBAR15vsT1+5QJ/j1Ahp//jffw== X-Received: by 2002:a2e:9951:: with SMTP id r17mr6443211ljj.496.1623193447656; Tue, 08 Jun 2021 16:04:07 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id i21sm127724ljb.10.2021.06.08.16.04.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 16:04:07 -0700 (PDT) Date: Wed, 9 Jun 2021 02:04:05 +0300 From: Dmitry Kozlyuk To: Narcisa Ana Maria Vasile Cc: dev@dpdk.org, thomas@monjalon.net, 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: <20210609020405.29590281@sovereign> In-Reply-To: <1622850274-6946-6-git-send-email-navasile@linux.microsoft.com> References: <1622849908-5710-1-git-send-email-navasile@linux.microsoft.com> <1622850274-6946-1-git-send-email-navasile@linux.microsoft.com> <1622850274-6946-6-git-send-email-navasile@linux.microsoft.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v9 05/10] eal: implement thread priority management 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" 2021-06-04 16:44 (UTC-0700), Narcisa Ana Maria Vasile: > From: Narcisa Vasile [...] > diff --git a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c > index 9e74a538c2..6dc3d575c0 100644 > --- a/lib/eal/windows/rte_thread.c > +++ b/lib/eal/windows/rte_thread.c > @@ -202,6 +202,98 @@ rte_thread_get_affinity_by_id(rte_thread_t thread_id, > return ret; > } > > +static HANDLE > +get_process_handle_from_thread_handle(HANDLE thread_handle) > +{ > + DWORD process_id = 0; > + > + process_id = GetProcessIdOfThread(thread_handle); > + if (process_id == 0) { > + RTE_LOG_WIN32_ERR("GetProcessIdOfThread()"); > + return NULL; > + } > + > + return OpenProcess(PROCESS_SET_INFORMATION, FALSE, process_id); > +} > + It is assumed all DPDK threads are created in current process, existing code uses GetCurrentProcess(), so this can be dropped.