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 AAC2BA00BE; Sat, 13 Jun 2020 00:09:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 10E3A1BEB3; Sat, 13 Jun 2020 00:09:16 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id 38D511BE9E for ; Sat, 13 Jun 2020 00:09:14 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id D860C5801D8; Fri, 12 Jun 2020 18:09:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 12 Jun 2020 18:09:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= XVjntao7lqd2/A1ZAoQMfpkv5DoYOhsngdT4iPt0d5Y=; b=qUK+iA1e40zCOEbU +AmGSqoN3DLfVH+akVJ7Zesnw4K0N2D037knTcuvVAEQoYqv27AyRHOkQIWDFD39 qouJwlHF+LHoSDKj1fLU718Kxm7MRE8F/q+J5QmkIkpeh7Rhcuw87ggKOocOV7tq 31sCgvWUZ4MHl+bL9T0PLX1MzNSX609vqVMe+VlFjymlQ1dXcwzYe4TQlzxUskN2 EPzPtXp0/yJoknAlmArigrJHccOKwpdsNd+KVZ90BD3Ed4jfQfMcuPxrJYsVjJ52 Qfs9UJJRoIvJbzn9AP6OwMyN/HCgkvqE3MI1E6nUUNsMdvrgbk6o61XYx3B84mmr JAeSjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=XVjntao7lqd2/A1ZAoQMfpkv5DoYOhsngdT4iPt0d 5Y=; b=cjP+p0q16C/Q7NEoAKCxxANLQ7yLEnwjigj84QxkG2eQzmhtJRTzdWPK2 dbX/jr4mck9xSkFwr6BGEQbVgciTOqrdXUdzYz1FCMU0yphV0LbEt+eUgRObovs6 mw0qB7DpWmw6PgOvBmIGEE9T/LsSiot9WhW1xXs04dVu3221l2jxuLaPIWeVeb7X gGV34fEl0+tFMuN1SvJT5H82kfHEEhE3JMmt2/96ili2r12tMQYXEzt+k8j2tEwD UY4qZz/Q13V82jQ2uQ16m76TvuY73q5+QYMSkuhCmFr2nogRcgG/iFtdwhKB+MIj OkmDUtKi9iNIvnwSLhYDoquu8fwGA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeivddgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 813733280059; Fri, 12 Jun 2020 18:09:12 -0400 (EDT) From: Thomas Monjalon To: Dmitry Kozlyuk Cc: dev@dpdk.org, Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , Ranjit Menon , david.marchand@redhat.com, bruce.richardson@intel.com Date: Sat, 13 Jun 2020 00:09:11 +0200 Message-ID: <1959380.I26SdQ0s1g@thomas> In-Reply-To: <20200610142730.31376-10-dmitry.kozliuk@gmail.com> References: <20200608074153.29611-1-dmitry.kozliuk@gmail.com> <20200610142730.31376-1-dmitry.kozliuk@gmail.com> <20200610142730.31376-10-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 09/11] eal/windows: improve CPU and NUMA node detection 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" 10/06/2020 16:27, Dmitry Kozlyuk: > 1. Map CPU cores to their respective NUMA nodes as reported by system. > 2. Support systems with more than 64 cores (multiple processor groups). > 3. Fix magic constants, styling issues, and compiler warnings. > 4. Add EAL private function to map DPDK socket ID to NUMA node number. > > Fixes: 53ffd9f080fc ("eal/windows: add minimum viable code") > > Signed-off-by: Dmitry Kozlyuk > --- > +eal_create_cpu_map(void) > + SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *infos, *info; > + DWORD infos_size; > + bool full = false; > + > + infos_size = 0; > + if (!GetLogicalProcessorInformationEx( > + RelationNumaNode, NULL, &infos_size)) { > + DWORD error = GetLastError(); > + if (error != ERROR_INSUFFICIENT_BUFFER) { > + rte_panic("cannot get NUMA node info size, error %lu", > + GetLastError()); > + } > + } > + > + infos = malloc(infos_size); > + if (infos == NULL) { > + rte_panic("cannot allocate memory for NUMA node information"); > + return; > + } > + > + if (!GetLogicalProcessorInformationEx( > + RelationNumaNode, infos, &infos_size)) { > + rte_panic("cannot get NUMA node information, error %lu", > + GetLastError()); > + } rte_panic addition is forbidden in the libraries. An application may want to manage the error and shutdown the DPDK part gracefully. Please can you try to return an error to rte_eal_init()?