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 E0D46A00C5; Sun, 26 Apr 2020 20:42:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8A7F1C12C; Sun, 26 Apr 2020 20:42:01 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 364BA1C0B9 for ; Sun, 26 Apr 2020 20:42:00 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id u11so16532865iow.4 for ; Sun, 26 Apr 2020 11:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iO189S+p8/BSJ+jhwhSUsEHB5xqQs0ud9JH59I4jCNs=; b=lneAQ14sQ87am0ifrZeTHLnRK9srAYYVRHCVCrunWzXThpqZlRAOB48Jmw1wGt51zm u/WvPp2VTs3nNJwNhIX4T7N9R5da4EgxUdOzE3N0tSSTO7KokLZmUe6La0JVSs6KAtv1 tffhogxfqYzGo2IsM2eLvnDnIW7xCg74/KYo2iXe74C1n8dcot+v3LrszhFCfwAkhCe/ kp0p7x8PV9ndxq5TSzbevgnZKY/Rp4WkfNP0nsV/zSXAeD9fej3oq81jWpWHKd0A+t/F vxHSKTNCZ/3/l+E+4FSOAUkexbQ6mfTkd3jpBldX3r6d2k9hhIDd3KS9DwZdHUOgvbdT OJTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iO189S+p8/BSJ+jhwhSUsEHB5xqQs0ud9JH59I4jCNs=; b=YDx5kA8WJeTcpG2f8qRQbdJTLwIs72dm23IyOHYoD6RZ+NhZvF26mo/7Bt8dsc+xJw 5wbGd3vNfmYsvnBJIn719bQ7Cq4tg2pxXLoT4EvPsjd/wRNzmCuVPTqCVsgQsv6lwXNj 0QBcJ2k8Z11BzmyOrz2HvkLt3TEkvuuCyXbKwpiR9yeXkwfSDWZu2FAgS0axNNVnIYrJ neprAOXav9nLRKPebd0venoMyYwyd7c0Ukje9TXeFGVwM2s2zJ3+lJzvIb+oVgTuASLq m5aSleQT8zNUwzj1L9JWasgkP6BIOmP0I3YASSkeW/RGzC7kx5X1177TOLcQwAclNS/t sHng== X-Gm-Message-State: AGi0PuaWowWX2XvaZuTWR68fGyJL/zZrXYu6O5JygwsnJuzBJW7ZTrJk DKR/wTJRE4gaKDXerwRMv6Zv2E6FWFAfYIfLa98= X-Google-Smtp-Source: APiQypIn9hsMxCWFxUc8NVL0r+KZoDYwHy9eJHfa0j+oNRLivnjMC7NIlUAINugTr6Dp2temBZaR9O2NLZWrjrYt0xA= X-Received: by 2002:a05:6638:2a2:: with SMTP id d2mr17757269jaq.104.1587926518307; Sun, 26 Apr 2020 11:41:58 -0700 (PDT) MIME-Version: 1.0 References: <20200426173811.49788-1-jerinj@marvell.com> <3102527.CAdn2TfLgq@thomas> In-Reply-To: <3102527.CAdn2TfLgq@thomas> From: Jerin Jacob Date: Mon, 27 Apr 2020 00:11:43 +0530 Message-ID: To: Thomas Monjalon Cc: Jerin Jacob , dpdk-dev , Maxime Coquelin , Zhihong Wang , "Ye, Xiaolong" , David Marchand , Harman Kalra Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] bus/pci: optimize pci device probe 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 Sun, Apr 26, 2020 at 11:38 PM Thomas Monjalon wrote: > > 26/04/2020 19:38, jerinj@marvell.com: > > From: Jerin Jacob > > > > If the PCI device is not attached to any driver then there is no > > point in probing it. As an optimization, skip the PCI device probe if > > the PCI device driver of type RTE_KDRV_NONE. > > > > Signed-off-by: Jerin Jacob > > --- > > Notes: > > ------ > > - virtio drivers does special treatment based on RTE_KDRV_UNKNOWN, That is > > the reason allowing RTE_KDRV_UNKNOWN in this patch. > > - virio devices uses RTE_KDRV_UNKNOWN for some special meaning, IMO, if it would > > be better, if > > a) Introduce the KDRV for virio > > b) If the PCIe device of driver type NONE or UNKNOWN then not even add in pci > > list > > in the scan, It will improve the boot time by avoiding operation on > > unwanted device like sorting the PCI devices, scanning it, probe it, managing > > it etc. > > mlx4/mlx4 uses RTE_KDRV_UNKNOWN. OK. > > > - Initial problem reported at http://patches.dpdk.org/patch/64999/ as > > boot time printf clutter on octeontx2 devices with a lot PCI devices which are > > of type RTE_KDRV_NONE. > > Add a logtype for PCI driver and adjust log level accordingly > to your preferences. > > > @@ -271,6 +271,8 @@ pci_probe_all_drivers(struct rte_pci_device *dev) > > FOREACH_DRIVER_ON_PCIBUS(dr) { > > + if (dev->kdrv == RTE_KDRV_NONE) > > + continue; > > rc = rte_pci_probe_one_driver(dr, dev); > > Nack I understand mlx4/mlx5 is using RTE_KDRV_UNKNOWN, Here we are skipping the RTE_KDRV_NONE, What is the use case for probing the devices with RTE_KDRV_NONE? > >