From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 15B03A00BE;
	Mon, 27 Apr 2020 20:00:04 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id A5B3D1D448;
	Mon, 27 Apr 2020 20:00:02 +0200 (CEST)
Received: from mail-io1-f67.google.com (mail-io1-f67.google.com
 [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 7FDEA1D447
 for <dev@dpdk.org>; Mon, 27 Apr 2020 20:00:01 +0200 (CEST)
Received: by mail-io1-f67.google.com with SMTP id o127so19869445iof.0
 for <dev@dpdk.org>; Mon, 27 Apr 2020 11:00:01 -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=HuVW5BZwqUKxqSVs/1G8to4cYIFNhqrQSEZ784qy268=;
 b=NSWHUccpaClaIHbahUTI8gHZ7VgN2CxfFstMmcK5wb78Uf9gXljiR+7A/0kS9gMYjK
 AwYoMFI+qu2Tik21Ft5rGjcjDR4jnHRfIaBPoVD0fB8noeqAT1mSEizQXdjkRnsR5hEr
 PT8U51YziIV7PrEvRA4nvAq+r6dCh5jd3qeaUqh5GcWKE0LFFTGKiLRf8vHd5m9cLzn8
 G1d71Rfr2u6j2FZa2U8Xy3kqDNy54N54wWw4kasjCxlD/DfeP97kM2F8hDM9kBH8kcqF
 NAwtAYzRhfPVv3F3+pcGiqehfZIfBrcXVPkySAPiqHNfo0BsvhpE96tWKBggQGqL++q6
 hn4Q==
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=HuVW5BZwqUKxqSVs/1G8to4cYIFNhqrQSEZ784qy268=;
 b=KDhpSnQT2f3s/j15xwX8Oh6RpBVqC3hsY1pbAOxVqooMFlb/3NRFblW+XkEHDPESaV
 Rx9TnAUIuPHSy/aO4bKygEB4q4Njyx5joj5L7HBCiz3tYUs78geDGmccrfSROg2MhFx5
 j6NmiF1R0wdKWvXJVWx9DP2vuP08yEhOK3J4LnFV7DHPZnmjVOmN+zgkzr0lE/UVGthz
 efDC5PMysn1vpSRrjAH3fQW5JzokIkdv3s0g81X4XDYepuPLk00cvjm282L1jSVKTaGD
 kukLhzKznYOpLxKLdQAjPpheUGePwzWbhULg3/LlYxtPPnzvp2hnTw7OyHseZRUXGv5P
 DaHw==
X-Gm-Message-State: AGi0PuYwO1f7mL9GMhzJH1Py+Y7+BSMhHRdlLLK5BgdBD+6u1VNFEWpU
 0FyLPoCc4PfJdoHCTNzcSGiLRHU2tdYr5iYVEaw=
X-Google-Smtp-Source: APiQypKYeiAIbGOH1JJF6JvmWa/aTir3sCm5SAZOhM9LqF26bPululNZ24qCSIMzajs03E8yPXlYGAoXGXPjTR9nFRU=
X-Received: by 2002:a05:6602:2e0b:: with SMTP id
 o11mr21607033iow.94.1588010399070; 
 Mon, 27 Apr 2020 10:59:59 -0700 (PDT)
MIME-Version: 1.0
References: <20200426173811.49788-1-jerinj@marvell.com>
 <3102527.CAdn2TfLgq@thomas>
 <CALBAE1Mxc-gxud_0G2N9FoursFJwdD64fo1dx2UC-8VyEz77SQ@mail.gmail.com>
 <6277521.uz5P2jW1tq@thomas>
In-Reply-To: <6277521.uz5P2jW1tq@thomas>
From: Jerin Jacob <jerinjacobk@gmail.com>
Date: Mon, 27 Apr 2020 23:29:41 +0530
Message-ID: <CALBAE1NSxkdzgPeOS3fn=94H8pCShAOOssxaagfAnz7ZNBuH7g@mail.gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Jerin Jacob <jerinj@marvell.com>, dpdk-dev <dev@dpdk.org>, 
 Maxime Coquelin <maxime.coquelin@redhat.com>,
 Zhihong Wang <zhihong.wang@intel.com>, 
 "Ye, Xiaolong" <xiaolong.ye@intel.com>,
 David Marchand <david.marchand@redhat.com>, 
 Harman Kalra <hkalra@marvell.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Mon, Apr 27, 2020 at 1:36 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 26/04/2020 20:41, Jerin Jacob:
> > On Sun, Apr 26, 2020 at 11:38 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > >
> > > 26/04/2020 19:38, jerinj@marvell.com:
> > > > From: Jerin Jacob <jerinj@marvell.com>
> > > >
> > > > 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 <jerinj@marvell.com>
> > > > ---
> > > > 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?
>
> Maybe you are right. I don't remember the use case.
> I think I remember these virtio and vmxnet3 PMD were not using UIO:
>         http://git.dpdk.org/old/virtio-net-pmd/tree/virtio_user.c
>         http://git.dpdk.org/old/vmxnet3-usermap/tree/pmd/vmxnet3.c

Looks it is OLD stale drivers with DPDK 1.3 or something.

Currently, virtio is using, following drivers.

RTE_PMD_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map);
RTE_PMD_REGISTER_KMOD_DEP(net_virtio, "* igb_uio | uio_pci_generic | vfio-pci");

>
> We need to know which case is using following code:
>
>     case RTE_KDRV_NONE:
> #if defined(RTE_ARCH_X86)
>         ret = pci_ioport_map(dev, bar, p);
> #endif
>         break;

AFAIK, it does not affect the scanning. virtio maintainers?

> David, please could you refresh our memory?
>
>