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 ABBBBA0C4C for ; Mon, 27 Sep 2021 20:15:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 934DF410E2; Mon, 27 Sep 2021 20:15:35 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5C50E40E3C; Mon, 27 Sep 2021 20:15:33 +0200 (CEST) X-IPAS-Result: =?us-ascii?q?A2EYAwAACVJh/x0Y/QpaHgE8DAILgW6EZLFrgXwLAQEBA?= =?us-ascii?q?QEBAQEBCUEEAQGEfYJKJjQJDgECBAEBAQEDAgMBAQEBAQEDAQEBBQEBAQEBA?= =?us-ascii?q?QUCAQEBAQKBIIUvRoI1IoQiCwFGgVGCcbYiMoEBiBWBY4E6iQ6FLoFVRIEVg?= =?us-ascii?q?2iEDIEGhTAEiUkBexOXaowAnHUtB4MwgTEGC50FGjGnCAG3O4RHgWGCFTMaI?= =?us-ascii?q?4M5URkPnRBUOAIGCwEBAwmPT4JGAQE?= IronPort-PHdr: A9a23:sxEvsRX0/hDSNJhEXb+6f7EDZWHV8KzBVTF92vMcY1JmTK2v8tzYM VDF4r011RmVB92dsq0UwLOO7ejJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T 4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglWmDaxe65+I Re1oAneq8UanYpvIbstxxXUpXdFZ/5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohV bBXAygoPG4z5M3wqBnMVhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu4 7ttRRT1jioMKjw3/3zNisFojKxVvg+vqRJ8zYDTb46bO+Fzcr/ecN4AWW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yj+Tuu2iLhBVGO660T+m0RK6U4D66vRLS7dbPqwTbJLwYm8O49mFcksYJ HygevVcRC9wVpAgltjxXDFFKBFDAr9n8YT/MGrksvzQkxH4KSrjlqAG4EEeZeX0+85ZJFpr2 tVAcGtLYBXFhuSqzbb9Qe5p7ighBJCzetlC4Tc6kXeDXJ7KQriaK0nOzcdR2DM5mMEIHv/Sb s8xaDxzYRCGaBpKUrsSIMhnxbnx1yiuKlW0rnqsufM0vzKL4DYpjpT0Ld7nSPGABppayxPwS mXuuj6R7gshHMeDwDCB/1qgnuPM2yThV+o6GLCm3vJyjF7VwXYcYCD6TnO1pOK8hUfmA4kZJ UlS+ywyoKx0/0uuJjXgYyCFTLe/lkZ0c7Jt/ycStGlhFoK8D96lO1U5 IronPort-HdrOrdr: A9a23:Zy84ZaxM8Ws1d2rysHGhKrPwO71zdoMgy1knxilNoNJuHPBw8P re+MjzuiWVtN98Yh0dcLO7Scy9qA3nhP1ICOAqVN/OYOCMggqVxe9ZgrcKhAeKJ8T5zIRgPN 9bAspDNOE= X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="211619991" X-IronPort-AV: E=Sophos;i="5.85,327,1624345200"; d="scan'208";a="211619991" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2021 11:15:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,327,1624345200"; d="scan'208";a="553423519" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.111]) by FMSMGA003.fm.intel.com with ESMTP; 27 Sep 2021 11:15:30 -0700 From: Pallavi Kadam To: dev@dpdk.org Cc: stable@dpdk.org, thomas@monjalon.net, talshn@nvidia.com, dmitry.kozliuk@gmail.com, ranjit.menon@intel.com, Narcisa.Vasile@microsoft.com, Vipin.Varghese@intel.com, pallavi.kadam@intel.com Date: Mon, 27 Sep 2021 11:43:22 -0700 Message-Id: <20210927184322.1455-1-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] bus/pci: fix unknown NUMA node value on Windows X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Based on the rte_eth_dev_socket_id() documentation, set the default numa_node to -1. When the API is unsuccessful, set numa_node to 0. This change more correctly resembles the Linux code. Fixes: bf7cf1f947bd ("bus/pci: fix unknown NUMA node value on Windows") Cc: stable@dpdk.org Reported-by: Vipin Varghese Signed-off-by: Pallavi Kadam --- drivers/bus/pci/windows/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c index 343ef6f33b..644c452c76 100644 --- a/drivers/bus/pci/windows/pci.c +++ b/drivers/bus/pci/windows/pci.c @@ -237,6 +237,7 @@ get_device_resource_info(HDEVINFO dev_info, } /* Get NUMA node using DEVPKEY_Device_Numa_Node */ + dev->device.numa_node = SOCKET_ID_ANY; res = SetupDiGetDevicePropertyW(dev_info, dev_info_data, &DEVPKEY_Device_Numa_Node, &property_type, (BYTE *)&numa_node, sizeof(numa_node), NULL, 0); @@ -244,7 +245,7 @@ get_device_resource_info(HDEVINFO dev_info, DWORD error = GetLastError(); if (error == ERROR_NOT_FOUND) { /* On older CPUs, NUMA is not bound to PCIe locality. */ - dev->device.numa_node = SOCKET_ID_ANY; + dev->device.numa_node = 0; return ERROR_SUCCESS; } RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW" -- 2.31.1.windows.1