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 A1F49A04B1; Tue, 25 Aug 2020 13:43:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ED3311C12C; Tue, 25 Aug 2020 13:43:35 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 6C3661C126 for ; Tue, 25 Aug 2020 13:43:34 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from talshn@nvidia.com) with SMTP; 25 Aug 2020 14:43:29 +0300 Received: from nvidia.com (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 07PBhTDs027117; Tue, 25 Aug 2020 14:43:29 +0300 From: Tal Shnaiderman To: dev@dpdk.org Cc: thomas@monjalon.net, pallavi.kadam@intel.com, dmitry.kozliuk@gmail.com, ranjit.menon@intel.com, navasile@linux.microsoft.com, harini.ramakrishnan@microsoft.com Date: Tue, 25 Aug 2020 14:43:16 +0300 Message-Id: <20200825114316.10712-1-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 Subject: [dpdk-dev] [PATCH] bus/pci: support segment value as address domain on Windows 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" Set the domain value for rte_pci_addr probing on Windows to the value of the PCI segment returned by SPDRP_BUSNUMBER. Signed-off-by: Tal Shnaiderman --- drivers/bus/pci/windows/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c index 489aa7902a..a40acec609 100644 --- a/drivers/bus/pci/windows/pci.c +++ b/drivers/bus/pci/windows/pci.c @@ -195,8 +195,8 @@ get_device_pci_address(HDEVINFO dev_info, return -1; } - addr->domain = 0; - addr->bus = bus_num; + addr->domain = bus_num >> 8; + addr->bus = bus_num & 0xff; addr->devid = dev_and_func >> 16; addr->function = dev_and_func & 0xffff; return 0; -- 2.16.1.windows.4