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 0D00CA054A; Thu, 18 Feb 2021 19:54:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EF3840040; Thu, 18 Feb 2021 19:54:00 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id C61D94003D for ; Thu, 18 Feb 2021 19:53:57 +0100 (CET) IronPort-SDR: qH1jqTai3ypbt6xdQFA3Lr6/QSSBrekjN9NOwpw/yjogm0/3aRjL2WmQa0hhopm8WNukAlGG3+ 6eHyR1qWblPg== X-IronPort-AV: E=McAfee;i="6000,8403,9899"; a="162759290" X-IronPort-AV: E=Sophos;i="5.81,187,1610438400"; d="scan'208";a="162759290" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2021 10:53:55 -0800 IronPort-SDR: aXZ8kADCsJ2UNxquuY5s5l05bY72at7sY6TqvmA9m+3G8n2rHeErDHXUIFtCT/ttASpAWzipK7 ynrnKJmhnYhQ== X-IronPort-AV: E=Sophos;i="5.81,187,1610438400"; d="scan'208";a="364932661" Received: from rmenon-desk.amr.corp.intel.com (HELO [10.166.30.253]) ([10.166.30.253]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2021 10:53:54 -0800 To: Khoa To , dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, pallavi.kadam@intel.com References: <1613626805-9313-1-git-send-email-khot@linux.microsoft.com> <1613673602-6291-1-git-send-email-khot@linux.microsoft.com> From: Ranjit Menon Message-ID: <2da301ca-f163-97a7-692d-2cfeecf819bd@intel.com> Date: Thu, 18 Feb 2021 10:53:54 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <1613673602-6291-1-git-send-email-khot@linux.microsoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2] bus/pci/windows: support for PCI scan allowed and blocked lists 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" Hi Khoa, On 2/18/2021 10:40 AM, Khoa To wrote: > EAL -a and -b options are used to specify which PCI devices are > explicitly allowed or blocked during PCI bus scan. This evaluation > is missing in the Windows implementation of rte_pci_scan. > This patch provides this missing functionality, so that apps can specify > which NetUIO devices to ignore during PCI bus scan. > > Signed-off-by: Khoa To > --- > > v2: > * Truncate commit description lines to 75 charaters or less > > > drivers/bus/pci/windows/pci.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c > index f66258452..0bba05eb4 100644 > --- a/drivers/bus/pci/windows/pci.c > +++ b/drivers/bus/pci/windows/pci.c > @@ -396,6 +396,7 @@ rte_pci_scan(void) > DWORD device_index = 0, found_device = 0; > HDEVINFO dev_info; > SP_DEVINFO_DATA device_info_data; > + struct rte_pci_addr addr; > > /* for debug purposes, PCI can be disabled */ > if (!rte_eal_has_pci()) > @@ -420,6 +421,13 @@ rte_pci_scan(void) > &GUID_DEVCLASS_NET) || > IsEqualGUID(&(device_info_data.ClassGuid), > &GUID_DEVCLASS_NETUIO)) { > + > + if (get_device_pci_address(dev_info, &device_info_data, &addr) != 0) > + continue; > + > + if (rte_pci_ignore_device(&addr)) > + continue; > + > ret = pci_scan_one(dev_info, &device_info_data); > if (ret == ERROR_SUCCESS) > found_device++; I think this change can be made inside the pci_scan_one() function where we already call get_device_pci_address(). ranjit m.