From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Jan Blunck <jblunck@infradead.org>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 05/15] pci: use scan_mode configuration
Date: Mon, 4 Sep 2017 17:22:43 +0100 [thread overview]
Message-ID: <7ed2cd21-0d2e-1010-6421-4b5f6aab87bd@intel.com> (raw)
In-Reply-To: <20170714211213.34436-6-jblunck@infradead.org>
On 7/14/2017 10:12 PM, Jan Blunck wrote:
> When scanning/probing devices the bus doesn't need to look at the
> devargs->type field: if the bus is in blacklist probing mode and there is
> no devargs found for the device it is white-listed. Therefore it is enough
> to let the bus check for the scan_mode.
>
> Signed-off-by: Jan Blunck <jblunck@infradead.org>
> ---
> lib/librte_eal/common/eal_common_pci.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
> index 72fcc35c2..fb0e29ac4 100644
> --- a/lib/librte_eal/common/eal_common_pci.c
> +++ b/lib/librte_eal/common/eal_common_pci.c
> @@ -197,8 +197,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
>
> /* no initialization when blacklisted, return without error */
> if (dev->device.devargs != NULL &&
> - dev->device.devargs->type ==
> - RTE_DEVTYPE_BLACKLISTED_PCI) {
> + rte_pci_bus.bus.conf.scan_mode == RTE_BUS_SCAN_BLACKLIST) {
If eal blacklist command issued (-b), even for one device, bus scan_mode
set to RTE_BUS_SCAN_BLACKLIST. Only devices provided with -b should be
blacklisted, all other devices in the bus should be probed.
If check done based on "scan_mode", this will blacklist all devices in
the bus, unless I am missing something.
I see this is to remove "devargs->type" but I don't think so this can be
replaced with "conf.scan_mode" check.
And while thinking about this, I wonder what "scan_mode" really mean?
and where it is used/useful?
> RTE_LOG(INFO, EAL, " Device is blacklisted, not"
> " initializing\n");
> return 1;
> @@ -404,8 +403,7 @@ rte_pci_probe(void)
> /* probe all or only whitelisted devices */
> if (probe_all)
> ret = pci_probe_all_drivers(dev);
> - else if (devargs != NULL &&
> - devargs->type == RTE_DEVTYPE_WHITELISTED_PCI)
> + else if (devargs != NULL)
if "probe_all" is not set, this means "scan_mode" is WHITELIST. And only
physical devices white-listed will have devargs, so this check looks OK,
but I believe this requires some comment, otherwise this is not clear.
Also why not check blacklist here?
> ret = pci_probe_all_drivers(dev);
> if (ret < 0) {
> RTE_LOG(ERR, EAL, "Requested device " PCI_PRI_FMT
>
next prev parent reply other threads:[~2017-09-04 16:22 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 23:24 [dpdk-dev] [PATCH 00/13] devargs fixes Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 01/13] Revert "devargs: make device types generic" Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 02/13] devargs: fix unittest Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 03/13] devargs: deprecate enum rte_devtype based functions Jan Blunck
2017-08-07 23:02 ` Thomas Monjalon
2017-07-11 23:25 ` [dpdk-dev] [PATCH 04/13] pci: use scan_mode configuration Jan Blunck
2017-07-13 17:59 ` Gaëtan Rivet
2017-07-13 19:42 ` Jan Blunck
2017-07-13 20:48 ` Thomas Monjalon
2017-07-11 23:25 ` [dpdk-dev] [PATCH 05/13] bus: add configuration interface for buses Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 06/13] devargs: use bus configuration interface to set scanning mode Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 07/13] devargs: add busname string field Jan Blunck
2017-07-13 13:17 ` Gaëtan Rivet
2017-07-11 23:25 ` [dpdk-dev] [PATCH 08/13] devargs: use busname Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 09/13] devargs: parse "bus=" argument Jan Blunck
2017-07-13 13:40 ` Gaëtan Rivet
2017-07-13 19:34 ` Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 10/13] pci: use busname Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 11/13] vdev: " Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 12/13] devargs: remove type field Jan Blunck
2017-07-11 23:25 ` [dpdk-dev] [PATCH 13/13] devargs: remove bus field Jan Blunck
2017-07-12 7:29 ` [dpdk-dev] [PATCH 00/13] devargs fixes Thomas Monjalon
2017-07-12 8:09 ` Jan Blunck
2017-07-12 8:50 ` Thomas Monjalon
2017-07-12 9:25 ` Jan Blunck
2017-07-14 21:11 ` [dpdk-dev] [PATCH v2 00/15] " Jan Blunck
2017-07-14 21:11 ` [dpdk-dev] [PATCH v2 01/15] Revert "devargs: make device types generic" Jan Blunck
2017-09-04 16:05 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 02/15] devargs: fix unittest Jan Blunck
2017-09-04 16:05 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 03/15] devargs: extend unittest Jan Blunck
2017-09-04 16:05 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 04/15] devargs: deprecate enum rte_devtype based functions Jan Blunck
2017-09-04 16:06 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 05/15] pci: use scan_mode configuration Jan Blunck
2017-09-04 16:22 ` Ferruh Yigit [this message]
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 06/15] bus: add configuration interface for buses Jan Blunck
2017-09-04 16:23 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 07/15] devargs: use bus configuration interface to set scanning mode Jan Blunck
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 08/15] devargs: use existing functions in rte_eal_devargs_parse() Jan Blunck
2017-09-04 16:24 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 09/15] devargs: add busname string field Jan Blunck
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 10/15] devargs: use busname Jan Blunck
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 11/15] pci: " Jan Blunck
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 12/15] vdev: " Jan Blunck
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 13/15] devargs: pass busname argument when parsing Jan Blunck
2017-07-15 14:48 ` Gaëtan Rivet
2017-09-04 16:28 ` Ferruh Yigit
2017-09-04 16:28 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 14/15] devargs: remove type field Jan Blunck
2017-09-04 16:29 ` Ferruh Yigit
2017-07-14 21:12 ` [dpdk-dev] [PATCH v2 15/15] devargs: remove bus field Jan Blunck
2017-07-15 18:20 ` [dpdk-dev] [PATCH v2 00/15] devargs fixes Thomas Monjalon
2017-09-04 16:04 ` Ferruh Yigit
2017-09-05 8:20 ` Gaëtan Rivet
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=7ed2cd21-0d2e-1010-6421-4b5f6aab87bd@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=jblunck@infradead.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).