[v1,1/3] drivers: introduce vDPA class

Message ID 1577287161-10321-2-git-send-email-matan@mellanox.com (mailing list archive)
State Superseded, archived
Headers
Series Introduce new class for vDPA device drivers |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/Intel-compilation fail Compilation issues

Commit Message

Matan Azrad Dec. 25, 2019, 3:19 p.m. UTC
  The vDPA (vhost data path acceleration) drivers provide support for
the vDPA operations introduced by the rte_vhost library.

Any driver which provides the vDPA operations should be moved\added to
the vdpa class under drivers/vdpa/.

Create the general files for vDPA class in drivers and in documentation.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 doc/guides/index.rst          |  1 +
 doc/guides/vdpadevs/index.rst | 13 +++++++++++++
 drivers/Makefile              |  2 ++
 drivers/meson.build           |  1 +
 drivers/vdpa/Makefile         |  8 ++++++++
 drivers/vdpa/meson.build      |  8 ++++++++
 6 files changed, 33 insertions(+)
 create mode 100644 doc/guides/vdpadevs/index.rst
 create mode 100644 drivers/vdpa/Makefile
 create mode 100644 drivers/vdpa/meson.build
  

Comments

Maxime Coquelin Jan. 7, 2020, 5:32 p.m. UTC | #1
Hi Matan,

On 12/25/19 4:19 PM, Matan Azrad wrote:
> The vDPA (vhost data path acceleration) drivers provide support for
> the vDPA operations introduced by the rte_vhost library.
> 
> Any driver which provides the vDPA operations should be moved\added to
> the vdpa class under drivers/vdpa/.
> 
> Create the general files for vDPA class in drivers and in documentation.
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  doc/guides/index.rst          |  1 +
>  doc/guides/vdpadevs/index.rst | 13 +++++++++++++
>  drivers/Makefile              |  2 ++
>  drivers/meson.build           |  1 +
>  drivers/vdpa/Makefile         |  8 ++++++++
>  drivers/vdpa/meson.build      |  8 ++++++++
>  6 files changed, 33 insertions(+)
>  create mode 100644 doc/guides/vdpadevs/index.rst
>  create mode 100644 drivers/vdpa/Makefile
>  create mode 100644 drivers/vdpa/meson.build
> 

Looks good to me. Just wondering if we need a dedicated maintainer for
this new class of devices?

Other than that:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  
Thomas Monjalon Jan. 8, 2020, 9:28 p.m. UTC | #2
07/01/2020 18:32, Maxime Coquelin:
> Hi Matan,
> 
> On 12/25/19 4:19 PM, Matan Azrad wrote:
> > The vDPA (vhost data path acceleration) drivers provide support for
> > the vDPA operations introduced by the rte_vhost library.
> > 
> > Any driver which provides the vDPA operations should be moved\added to
> > the vdpa class under drivers/vdpa/.
> > 
> > Create the general files for vDPA class in drivers and in documentation.
> > 
> > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > ---
> >  doc/guides/index.rst          |  1 +
> >  doc/guides/vdpadevs/index.rst | 13 +++++++++++++
> >  drivers/Makefile              |  2 ++
> >  drivers/meson.build           |  1 +
> >  drivers/vdpa/Makefile         |  8 ++++++++
> >  drivers/vdpa/meson.build      |  8 ++++++++
> >  6 files changed, 33 insertions(+)
> >  create mode 100644 doc/guides/vdpadevs/index.rst
> >  create mode 100644 drivers/vdpa/Makefile
> >  create mode 100644 drivers/vdpa/meson.build
> > 
> 
> Looks good to me. Just wondering if we need a dedicated maintainer for
> this new class of devices?

We must create a new section in MAINTAINERS file for vDPA drivers.
Maxime, are you OK to merge those drivers in dpdk-next-virtio tree?
  
Maxime Coquelin Jan. 9, 2020, 8 a.m. UTC | #3
On 1/8/20 10:28 PM, Thomas Monjalon wrote:
> 07/01/2020 18:32, Maxime Coquelin:
>> Hi Matan,
>>
>> On 12/25/19 4:19 PM, Matan Azrad wrote:
>>> The vDPA (vhost data path acceleration) drivers provide support for
>>> the vDPA operations introduced by the rte_vhost library.
>>>
>>> Any driver which provides the vDPA operations should be moved\added to
>>> the vdpa class under drivers/vdpa/.
>>>
>>> Create the general files for vDPA class in drivers and in documentation.
>>>
>>> Signed-off-by: Matan Azrad <matan@mellanox.com>
>>> ---
>>>  doc/guides/index.rst          |  1 +
>>>  doc/guides/vdpadevs/index.rst | 13 +++++++++++++
>>>  drivers/Makefile              |  2 ++
>>>  drivers/meson.build           |  1 +
>>>  drivers/vdpa/Makefile         |  8 ++++++++
>>>  drivers/vdpa/meson.build      |  8 ++++++++
>>>  6 files changed, 33 insertions(+)
>>>  create mode 100644 doc/guides/vdpadevs/index.rst
>>>  create mode 100644 drivers/vdpa/Makefile
>>>  create mode 100644 drivers/vdpa/meson.build
>>>
>>
>> Looks good to me. Just wondering if we need a dedicated maintainer for
>> this new class of devices?
> 
> We must create a new section in MAINTAINERS file for vDPA drivers.
> Maxime, are you OK to merge those drivers in dpdk-next-virtio tree?

Sure, I can do that.

Maxime
  

Patch

diff --git a/doc/guides/index.rst b/doc/guides/index.rst
index 8a1601b..988c6ea 100644
--- a/doc/guides/index.rst
+++ b/doc/guides/index.rst
@@ -19,6 +19,7 @@  DPDK documentation
    bbdevs/index
    cryptodevs/index
    compressdevs/index
+   vdpadevs/index
    eventdevs/index
    rawdevs/index
    mempool/index
diff --git a/doc/guides/vdpadevs/index.rst b/doc/guides/vdpadevs/index.rst
new file mode 100644
index 0000000..d69dc91
--- /dev/null
+++ b/doc/guides/vdpadevs/index.rst
@@ -0,0 +1,13 @@ 
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright 2019 Mellanox Technologies, Ltd
+
+vDPA Device Drivers
+===================
+
+The following are a list of vDPA(vhost data path acceleration) device drivers,
+which can be used from an application through vhost API.
+
+.. toctree::
+    :maxdepth: 2
+    :numbered:
+
diff --git a/drivers/Makefile b/drivers/Makefile
index 7d5da5d..46374ca 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -18,6 +18,8 @@  DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += common/qat
 DEPDIRS-common/qat := bus mempool
 DIRS-$(CONFIG_RTE_LIBRTE_COMPRESSDEV) += compress
 DEPDIRS-compress := bus mempool
+DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vdpa
+DEPDIRS-vdpa := common bus mempool
 DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
 DEPDIRS-event := common bus mempool net
 DIRS-$(CONFIG_RTE_LIBRTE_RAWDEV) += raw
diff --git a/drivers/meson.build b/drivers/meson.build
index 32d68aa..d271667 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -13,6 +13,7 @@  dpdk_driver_classes = ['common',
 	       'raw',     # depends on common, bus and net.
 	       'crypto',  # depends on common, bus and mempool (net in future).
 	       'compress', # depends on common, bus, mempool.
+	       'vdpa',    # depends on common, bus and mempool.
 	       'event',   # depends on common, bus, mempool and net.
 	       'baseband'] # depends on common and bus.
 
diff --git a/drivers/vdpa/Makefile b/drivers/vdpa/Makefile
new file mode 100644
index 0000000..82a2b70
--- /dev/null
+++ b/drivers/vdpa/Makefile
@@ -0,0 +1,8 @@ 
+#   SPDX-License-Identifier: BSD-3-Clause
+#   Copyright 2019 Mellanox Technologies, Ltd
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# DIRS-$(<configuration>) += <directory>
+
+include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/vdpa/meson.build b/drivers/vdpa/meson.build
new file mode 100644
index 0000000..a839ff5
--- /dev/null
+++ b/drivers/vdpa/meson.build
@@ -0,0 +1,8 @@ 
+#   SPDX-License-Identifier: BSD-3-Clause
+#   Copyright 2019 Mellanox Technologies, Ltd
+
+drivers = []
+std_deps = ['bus_pci', 'kvargs']
+std_deps += ['vhost']
+config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
+driver_name_fmt = 'rte_pmd_@0@'