[dpdk-dev,v8,11/12] eal: Consolidate pci_map/unmap_device() of linuxapp and bsdapp

Message ID 559C8E32.3070808@igel.co.jp (mailing list archive)
State Changes Requested, archived
Headers

Commit Message

Tetsuya Mukawa July 8, 2015, 2:42 a.m. UTC
  On 2015/07/07 17:06, David Marchand wrote:
> On Mon, Jul 6, 2015 at 8:24 AM, Tetsuya Mukawa <mukawa@igel.co.jp
> <mailto:mukawa@igel.co.jp>> wrote:
>
>     From: "Tetsuya.Mukawa" <mukawa@igel.co.jp <mailto:mukawa@igel.co.jp>>
>
>     The patch consolidates below functions, and implemented in common
>     eal code.
>      - pci_map_device()
>      - pci_unmap_device()
>
>     Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp
>     <mailto:mukawa@igel.co.jp>>
>     ---
>      lib/librte_eal/bsdapp/eal/eal_pci.c     |  3 ++
>      lib/librte_eal/common/eal_common_pci.c  | 57
>     +++++++++++++++++++++++++++++++++
>      lib/librte_eal/common/eal_private.h     | 19 +++++++++++
>      lib/librte_eal/common/include/rte_pci.h |  1 +
>      lib/librte_eal/linuxapp/eal/eal_pci.c   | 53
>     ------------------------------
>      lib/librte_ether/rte_ethdev.c           |  2 ++
>      6 files changed, 82 insertions(+), 53 deletions(-)
>
>     diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c
>     b/lib/librte_eal/bsdapp/eal/eal_pci.c
>     index f85fc1e..a27dca3 100644
>     --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
>     +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
>     @@ -240,6 +240,9 @@ pci_scan_one(int dev_pci_fd, struct pci_conf
>     *conf)
>             /* FreeBSD has no NUMA support (yet) */
>             dev->numa_node = 0;
>
>     +       /* FreeBSD has only one pass through driver */
>     +       dev->kdrv = RTE_KDRV_NIC_UIO;
>     +
>
>
> Do we need a new define for this ?
>
> I know this is not really part of this patchset, but this kdrv should
> just disappear.

Could I make sure this?
It seems 'struct rte_pci_device' still has kdrv member, also my patch
defines RTE_KDRV_NIC_UIO like below.


Tetsuya

>
>
> -- 
> David Marchand
  

Comments

Thomas Monjalon July 8, 2015, 8:27 a.m. UTC | #1
2015-07-08 11:42, Tetsuya Mukawa:
> On 2015/07/07 17:06, David Marchand wrote:
> > On Mon, Jul 6, 2015 at 8:24 AM, Tetsuya Mukawa <mukawa@igel.co.jp
> >     +       /* FreeBSD has only one pass through driver */
> >     +       dev->kdrv = RTE_KDRV_NIC_UIO;
> >     +
> >
> > Do we need a new define for this ?
> >
> > I know this is not really part of this patchset, but this kdrv should
> > just disappear.
> 
> Do you mean kdrv member will disappear in next DPDK release?

No, it is not (yet) planned to be removed.
But David thinks it shouldn't be part of the public API.
So, as David said, this comment is not really related to your patch.
It may be addressed separately.
Please Tetsuya, go ahead with the v9.
Thanks
  
Tetsuya Mukawa July 8, 2015, 8:50 a.m. UTC | #2
On 2015/07/08 17:27, Thomas Monjalon wrote:
> 2015-07-08 11:42, Tetsuya Mukawa:
>> On 2015/07/07 17:06, David Marchand wrote:
>>> On Mon, Jul 6, 2015 at 8:24 AM, Tetsuya Mukawa <mukawa@igel.co.jp
>>>     +       /* FreeBSD has only one pass through driver */
>>>     +       dev->kdrv = RTE_KDRV_NIC_UIO;
>>>     +
>>>
>>> Do we need a new define for this ?
>>>
>>> I know this is not really part of this patchset, but this kdrv should
>>> just disappear.
>> Do you mean kdrv member will disappear in next DPDK release?
> No, it is not (yet) planned to be removed.
> But David thinks it shouldn't be part of the public API.
> So, as David said, this comment is not really related to your patch.
> It may be addressed separately.
> Please Tetsuya, go ahead with the v9.
> Thanks

Thanks, I've got it.

Tetsuya
  

Patch

--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -149,6 +149,7 @@  enum rte_kernel_driver {
 	RTE_KDRV_IGB_UIO,
 	RTE_KDRV_VFIO,
 	RTE_KDRV_UIO_GENERIC,
+	RTE_KDRV_NIC_UIO,
 };

Do you mean kdrv member will disappear in next DPDK release?