All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: <david.marchand@6wind.com>, <dev@dpdk.org>
Subject: Re: [PATCH v5 04/12] eal: integrate bus scan and probe with EAL
Date: Mon, 9 Jan 2017 12:05:53 +0530	[thread overview]
Message-ID: <277ffd19-d6f5-d7b8-abfd-70870cfd4a35@nxp.com> (raw)
In-Reply-To: <1912570.qtcMvjyK2L@xps13>

On Friday 06 January 2017 07:16 PM, Thomas Monjalon wrote:
> 2017-01-06 17:30, Shreyansh Jain:
>> On Friday 06 January 2017 04:08 PM, Shreyansh Jain wrote:
>>> On Wednesday 04 January 2017 03:16 AM, Thomas Monjalon wrote:
>>>> 2016-12-26 18:53, Shreyansh Jain:
>>>>> --- a/lib/librte_eal/linuxapp/eal/eal.c
>>>>> +++ b/lib/librte_eal/linuxapp/eal/eal.c
>>>>> @@ -844,6 +845,9 @@ rte_eal_init(int argc, char **argv)
>>>>>         if (rte_eal_intr_init() < 0)
>>>>>                 rte_panic("Cannot init interrupt-handling thread\n");
>>>>>
>>>>> +       if (rte_eal_bus_scan())
>>>>> +               rte_panic("Cannot scan the buses for devices\n");
>>>>
>>>> Yes, definitely. Just one scan functions which scan registered bus.
>>>>
>>>>> @@ -884,6 +888,9 @@ rte_eal_init(int argc, char **argv)
>>>>>         if (rte_eal_pci_probe())
>>>>>                 rte_panic("Cannot probe PCI\n");
>>>>>
>>>>> +       if (rte_eal_bus_probe())
>>>>> +               rte_panic("Cannot probe devices\n");
>>>>> +
>>>>>         if (rte_eal_dev_init() < 0)
>>>>>                 rte_panic("Cannot init pmd devices\n");
>>>>
>>>> What is the benefit of initializing (probe) a device outside of the scan?
>>>> Currently, it is done in two steps, so you are keeping the same
>>>> behaviour.
>>>
>>> Yes, only for compatibility to existing model of two-step process.
>>> Ideally, only a single step is enough (init->probe).
>>>
>>> During the discussion in [1] also this point was raised - at that time
>>> for VDEV and applicability to PCI.
>>>
>>> [1] http://dpdk.org/ml/archives/dev/2016-December/051306.html
>>>
>>> If you want, I can merge these two. I postponed it because 1) it is an
>>> independent change and should really impact bus and 2) I was not sure
>>> of dependency of init *before* pthread_create for all workers.
>>
>> I forgot _not_ in above - rephrasing:
>>
>> If you want, I can merge these two. I postponed it because 1) it is an
>> independent change and should _not_ really impact bus and 2) I was not
>> sure of dependency of init *before* pthread_create for all workers.
>
> I'm OK with your approach.
>
>>>> I imagine a model where the scan function decide to initialize the
>>>> device and can require some help from a callback to make this decision.
>>>> So the whitelist/blacklist policy can be implemented with callbacks at
>>>> the scan level and possibly the responsibility of the application.
>>>> Note that the callback model would be a change for a next release.
>>>
>>> Agree. But, that is not really part of Bus patches - isn't it? Or, you
>>> want to change that with this series?
>
> No it is not the scope of this series.
> Please could you add it in the cover letter as a next step?

Yes, I will add to cover letter as Pending Item.

> Thanks
>

  reply	other threads:[~2017-01-09  6:32 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-04 10:11 [PATCH 00/13] Introducing EAL Bus-Device-Driver Model Shreyansh Jain
2016-12-04 10:11 ` [PATCH 01/13] eal: define container_of macro Shreyansh Jain
2016-12-04 10:11 ` [PATCH 02/13] eal/bus: introduce bus abstraction Shreyansh Jain
2016-12-04 10:11 ` [PATCH 03/13] test: add basic bus infrastructure tests Shreyansh Jain
2016-12-04 10:11 ` [PATCH 04/13] eal/bus: add scan and match support Shreyansh Jain
2016-12-04 10:11 ` [PATCH 05/13] eal/bus: add support for inserting a device on a bus Shreyansh Jain
2016-12-04 10:11 ` [PATCH 06/13] eal: integrate bus scan and probe with EAL Shreyansh Jain
2016-12-04 10:11 ` [PATCH 07/13] pci: replace probe and remove handlers with rte_driver Shreyansh Jain
2016-12-08 17:50   ` Ferruh Yigit
2016-12-09  4:59     ` Shreyansh Jain
2016-12-04 10:11 ` [PATCH 08/13] eal: enable probe and remove from bus infrastructure Shreyansh Jain
2016-12-06 10:45   ` Shreyansh Jain
2016-12-04 10:11 ` [PATCH 09/13] pci: split match and probe function Shreyansh Jain
2016-12-04 10:11 ` [PATCH 10/13] eal/pci: generalize args of PCI scan/match towards RTE device/driver Shreyansh Jain
2016-12-04 10:11 ` [PATCH 11/13] pci: Pass rte_pci_addr to functions instead of separate args Shreyansh Jain
2016-12-04 10:11 ` [PATCH 12/13] eal: enable PCI bus Shreyansh Jain
2016-12-04 10:11 ` [PATCH 13/13] eal/pci: remove PCI probe and init calls Shreyansh Jain
2016-12-06 20:52 ` [PATCH 00/13] Introducing EAL Bus-Device-Driver Model David Marchand
2016-12-07  9:55   ` Shreyansh Jain
2016-12-07 12:17     ` David Marchand
2016-12-07 13:10       ` Shreyansh Jain
2016-12-07 13:24         ` Thomas Monjalon
2016-12-08  5:04           ` Shreyansh Jain
2016-12-08  7:21             ` Thomas Monjalon
2016-12-08  7:53               ` Shreyansh Jain
2016-12-12 14:35         ` Jianbo Liu
2016-12-13  6:56           ` Shreyansh Jain
2016-12-13 13:37 ` [PATCH v2 00/12] " Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 01/12] eal: define container_of macro Shreyansh Jain
2016-12-13 22:24     ` Jan Blunck
2016-12-14  5:12       ` Shreyansh Jain
2016-12-16  8:14         ` Jan Blunck
2016-12-16  9:23           ` Adrien Mazarguil
2016-12-16 10:47             ` Jan Blunck
2016-12-16 11:21               ` Adrien Mazarguil
2016-12-16 11:54                 ` Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 02/12] eal/bus: introduce bus abstraction Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 03/12] test: add basic bus infrastructure tests Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 04/12] eal/bus: add scan, match and insert support Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 05/12] eal: integrate bus scan and probe with EAL Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 06/12] eal: add probe and remove support for rte_driver Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 07/12] eal: enable probe from bus infrastructure Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 08/12] pci: split match and probe function Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 09/12] eal/pci: generalize args of PCI scan/match towards RTE device/driver Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 10/12] pci: Pass rte_pci_addr to functions instead of separate args Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 11/12] eal: enable PCI bus Shreyansh Jain
2016-12-13 13:37   ` [PATCH v2 12/12] drivers: update PMDs to use rte_driver probe and remove Shreyansh Jain
2016-12-13 13:52     ` Andrew Rybchenko
2016-12-13 15:07       ` Ferruh Yigit
2016-12-14  5:14         ` Shreyansh Jain
2016-12-14  5:11       ` Shreyansh Jain
2016-12-14  9:49     ` Shreyansh Jain
2016-12-15 21:36       ` Jan Blunck
2016-12-26  9:14         ` Shreyansh Jain
2016-12-16 13:10   ` [PATCH v3 00/12] Introducing EAL Bus-Device-Driver Model Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 01/12] eal: define container_of macro Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 02/12] eal/bus: introduce bus abstraction Shreyansh Jain
2016-12-20 12:37       ` Hemant Agrawal
2016-12-20 13:17       ` Jan Blunck
2016-12-20 13:51         ` Shreyansh Jain
2016-12-20 17:11         ` Stephen Hemminger
2016-12-21  7:11           ` Shreyansh Jain
2016-12-21 15:38           ` Jan Blunck
2016-12-21 23:33             ` Stephen Hemminger
2016-12-22  5:12               ` Shreyansh Jain
2016-12-22  5:52                 ` Shreyansh Jain
2016-12-25 17:39         ` Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 03/12] test: add basic bus infrastructure tests Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 04/12] eal/bus: add scan, match and insert support Shreyansh Jain
2016-12-16 13:25       ` Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 05/12] eal: integrate bus scan and probe with EAL Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 06/12] eal: add probe and remove support for rte_driver Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 07/12] eal: enable probe from bus infrastructure Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 08/12] pci: split match and probe function Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 09/12] eal/pci: generalize args of PCI scan/match towards RTE device/driver Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 10/12] pci: Pass rte_pci_addr to functions instead of separate args Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 11/12] eal: enable PCI bus and PCI test framework Shreyansh Jain
2016-12-16 13:20       ` Shreyansh Jain
2016-12-16 13:10     ` [PATCH v3 12/12] drivers: update PMDs to use rte_driver probe and remove Shreyansh Jain
2016-12-26 12:50     ` [PATCH v4 00/12] Introducing EAL Bus-Device-Driver Model Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 01/12] eal/bus: introduce bus abstraction Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 02/12] test: add basic bus infrastructure tests Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 03/12] eal/bus: add scan, match and insert support Shreyansh Jain
2016-12-26 13:27         ` Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 04/12] eal: integrate bus scan and probe with EAL Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 05/12] eal: add probe and remove support for rte_driver Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 06/12] eal: enable probe from bus infrastructure Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 07/12] pci: split match and probe function Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 08/12] eal/pci: generalize args of PCI scan/match towards RTE device/driver Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 09/12] pci: Pass rte_pci_addr to functions instead of separate args Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 10/12] eal: enable PCI bus and PCI test framework Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 11/12] drivers: update PMDs to use rte_driver probe and remove Shreyansh Jain
2016-12-26 12:50       ` [PATCH v4 12/12] eal/bus: add bus iteration macros Shreyansh Jain
2016-12-26 13:23       ` [PATCH v5 00/12] Introducing EAL Bus-Device-Driver Model Shreyansh Jain
2016-12-26 13:23         ` [PATCH v5 01/12] eal/bus: introduce bus abstraction Shreyansh Jain
2017-01-03 21:52           ` Thomas Monjalon
2017-01-06 10:31             ` Shreyansh Jain
2017-01-06 14:55               ` Thomas Monjalon
2017-01-09  6:24                 ` Shreyansh Jain
2017-01-09 15:22           ` Ferruh Yigit
2017-01-10  4:07             ` Shreyansh Jain
2016-12-26 13:23         ` [PATCH v5 02/12] test: add basic bus infrastructure tests Shreyansh Jain
2016-12-26 13:23         ` [PATCH v5 03/12] eal/bus: add scan, match and insert support Shreyansh Jain
2016-12-26 13:23         ` [PATCH v5 04/12] eal: integrate bus scan and probe with EAL Shreyansh Jain
2017-01-03 21:46           ` Thomas Monjalon
2017-01-06 10:38             ` Shreyansh Jain
2017-01-06 12:00               ` Shreyansh Jain
2017-01-06 13:46                 ` Thomas Monjalon
2017-01-09  6:35                   ` Shreyansh Jain [this message]
2017-01-08 12:21           ` Rosen, Rami
2017-01-09  6:34             ` Shreyansh Jain
2016-12-26 13:23         ` [PATCH v5 05/12] eal: add probe and remove support for rte_driver Shreyansh Jain
2017-01-03 22:05           ` Thomas Monjalon
2017-01-06 11:44             ` Shreyansh Jain
2017-01-06 15:26               ` Thomas Monjalon
2017-01-09  6:28                 ` Shreyansh Jain
2016-12-26 13:23         ` [PATCH v5 06/12] eal: enable probe from bus infrastructure Shreyansh Jain
2016-12-26 13:24         ` [PATCH v5 07/12] pci: split match and probe function Shreyansh Jain
2017-01-03 22:08           ` Thomas Monjalon
2016-12-26 13:24         ` [PATCH v5 08/12] eal/pci: generalize args of PCI scan/match towards RTE device/driver Shreyansh Jain
2017-01-03 22:13           ` Thomas Monjalon
2017-01-06 12:03             ` Shreyansh Jain
2016-12-26 13:24         ` [PATCH v5 09/12] pci: Pass rte_pci_addr to functions instead of separate args Shreyansh Jain
2016-12-26 13:24         ` [PATCH v5 10/12] eal: enable PCI bus and PCI test framework Shreyansh Jain
2016-12-26 13:24         ` [PATCH v5 11/12] drivers: update PMDs to use rte_driver probe and remove Shreyansh Jain
2017-01-09 15:19           ` Ferruh Yigit
2017-01-09 16:18             ` Ferruh Yigit
2017-01-10  4:09               ` Shreyansh Jain
2016-12-26 13:24         ` [PATCH v5 12/12] eal/bus: add bus iteration macros Shreyansh Jain
2017-01-03 22:15           ` Thomas Monjalon
2017-01-03 22:22         ` [PATCH v5 00/12] Introducing EAL Bus-Device-Driver Model Thomas Monjalon
2017-01-06  6:27           ` Shreyansh Jain

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=277ffd19-d6f5-d7b8-abfd-70870cfd4a35@nxp.com \
    --to=shreyansh.jain@nxp.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.