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 1ADB6A04B5; Thu, 10 Sep 2020 01:21:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F2CA1BE0C; Thu, 10 Sep 2020 01:21:24 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by dpdk.org (Postfix) with ESMTP id 487E12BA8 for ; Thu, 10 Sep 2020 01:21:22 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1059) id 8814920942B9; Wed, 9 Sep 2020 16:21:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8814920942B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1599693681; bh=UgJumQtPB1MVL1HkKx4UWDwNS0z0nPRKozTxVhlcgwE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jNXSlyl4uGK4SDjhEODSfXMOhehs/2E94jPhxj5ylOREAc5c4oy7xWSE0ywMOjXjh /pMagMDMmT7dekDS5C2e9iaAu0X3w3P5CsJpToa4EDyXAO9RRKoNHPJb8NB3/bqd9E M1NcBZBlKmdWOY2Fju/mohB4ZMNoYYwCReb8v2TQ= Date: Wed, 9 Sep 2020 16:21:21 -0700 From: Narcisa Ana Maria Vasile To: Tal Shnaiderman Cc: dev@dpdk.org, thomas@monjalon.net, pallavi.kadam@intel.com, dmitry.kozliuk@gmail.com, ranjit.menon@intel.com, harini.ramakrishnan@microsoft.com Message-ID: <20200909232121.GB13311@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20200825114316.10712-1-talshn@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825114316.10712-1-talshn@nvidia.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [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" On Tue, Aug 25, 2020 at 02:43:16PM +0300, Tal Shnaiderman wrote: > 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; > -- Is this needed to avoid collision of devices with the same B:D:F?