From: David Marchand <david.marchand@redhat.com>
To: Sunil Kumar Kori <skori@marvell.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
Gaetan Rivet <grive@u256.net>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v5 1/1] bus/pci: optimise scanning with whitelist/blacklist
Date: Mon, 11 May 2020 16:59:00 +0200 [thread overview]
Message-ID: <CAJFAV8xgit3DmDw7p3TH67j91+ErNv_T3zRzh62+sW0jozRaow@mail.gmail.com> (raw)
In-Reply-To: <20200502074205.29080-1-skori@marvell.com>
On Sat, May 2, 2020 at 9:42 AM Sunil Kumar Kori <skori@marvell.com> wrote:
>
> rte_bus_scan API scans all the available PCI devices irrespective of white
> or black listing parameters then further devices are probed based on white
> or black listing parameters. So unnecessary CPU cycles are wasted during
> rte_pci_scan.
>
> For Octeontx2 platform with core frequency 2.4 Ghz, rte_bus_scan consumes
> around 26ms to scan around 90 PCI devices but all may not be used by the
> application. So for the application which uses 2 NICs, rte_bus_scan
> consumes few microseconds and rest time is saved with this patch.
>
> Patch restricts devices to be scanned as per below mentioned conditions:
> - All devices will be scanned if no parameters are passed.
> - Only white listed devices will be scanned if white list is available.
> - All devices, except black listed, will be scanned if black list is
> available.
>
> Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Gaetan Rivet <grive@u256.net>
> diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
> index a205d4d9f..3a9da7322 100644
> --- a/drivers/bus/pci/private.h
> +++ b/drivers/bus/pci/private.h
> @@ -42,6 +42,17 @@ int rte_pci_scan(void);
> void
> pci_name_set(struct rte_pci_device *dev);
>
> +/**
> + * Validate whether a device with given pci address should be ignored or not.
PCI address
> + *
> + * @param pci_addr
> + * PCI address of device to be validated
> + * @return
> + * 1: if device is to be ignored,
> + * 0: if device is to be scanned,
On Sat, May 2, 2020 at 9:42 AM Sunil Kumar Kori <skori@marvell.com> wrote:
> diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
> index a205d4d9f..3a9da7322 100644
> --- a/drivers/bus/pci/private.h
> +++ b/drivers/bus/pci/private.h
> @@ -42,6 +42,17 @@ int rte_pci_scan(void);
> void
> pci_name_set(struct rte_pci_device *dev);
>
> +/**
> + * Validate whether a device with given pci address should be ignored or not.
> + *
> + * @param pci_addr
> + * PCI address of device to be validated
> + * @return
> + * 1: if device is to be ignored,
> + * 0: if device is to be scanned,
true/false
> + */
> +bool rte_pci_ignore_device(const struct rte_pci_addr *pci_addr);
> +
> /**
> * Add a PCI device to the PCI Bus (append to PCI Device list). This function
> * also updates the bus references of the PCI Device (and the generic device
Applied, thanks.
--
David Marchand
prev parent reply other threads:[~2020-05-11 14:59 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 7:55 [dpdk-dev] [PATCH] bus/pci: restricted bus scanning to allowed devices Sunil Kumar Kori
2019-12-16 16:13 ` Stephen Hemminger
2019-12-17 11:00 ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2020-01-21 8:39 ` Sunil Kumar Kori
[not found] ` <MN2PR18MB327936807460D9F2AE4894F3B40F0@MN2PR18MB3279.namprd18.prod.outlook.com>
2020-02-27 8:30 ` Sunil Kumar Kori
2020-03-09 6:06 ` Sunil Kumar Kori
2020-04-06 9:32 ` Sunil Kumar Kori
2020-04-06 13:21 ` David Marchand
2020-04-07 9:21 ` Sunil Kumar Kori
2020-04-07 9:28 ` [dpdk-dev] [PATCH v2 1/1] bus/pci: optimise scanning with whitelist/blacklist Sunil Kumar Kori
2020-04-17 8:30 ` Sunil Kumar Kori
2020-04-17 8:44 ` David Marchand
2020-04-17 11:15 ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2020-04-17 13:25 ` David Marchand
2020-04-17 15:12 ` Sunil Kumar Kori
2020-04-17 15:35 ` David Marchand
2020-04-17 16:00 ` Sunil Kumar Kori
2020-04-20 6:59 ` Sunil Kumar Kori
2020-04-20 6:55 ` [dpdk-dev] [PATCH v3 " Sunil Kumar Kori
2020-04-21 15:18 ` Gaëtan Rivet
2020-04-22 6:17 ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2020-04-22 9:38 ` Gaëtan Rivet
2020-04-23 7:47 ` Sunil Kumar Kori
2020-04-27 18:43 ` [dpdk-dev] " Gaëtan Rivet
2020-04-28 13:52 ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2020-05-01 11:39 ` [dpdk-dev] [PATCH v4 " Sunil Kumar Kori
2020-05-01 12:40 ` Sunil Kumar Kori
2020-05-01 21:00 ` Gaëtan Rivet
2020-05-02 7:20 ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2020-05-02 7:42 ` [dpdk-dev] [PATCH v5 " Sunil Kumar Kori
2020-05-02 11:27 ` Gaëtan Rivet
2020-05-04 14:17 ` David Marchand
2020-05-05 5:57 ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2020-05-06 12:54 ` [dpdk-dev] " David Marchand
2020-05-11 14:59 ` David Marchand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJFAV8xgit3DmDw7p3TH67j91+ErNv_T3zRzh62+sW0jozRaow@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=grive@u256.net \
--cc=jerinj@marvell.com \
--cc=skori@marvell.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).