[v5,02/39] ml/cnxk: add skeleton for ML cnxk driver

Message ID 20230207160719.1307-3-syalavarthi@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Implementation of ML CNXK driver |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Srikanth Yalavarthi Feb. 7, 2023, 4:06 p.m. UTC
  Added initial source files and build files for ML cnxk driver.

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 MAINTAINERS                            |  1 +
 doc/guides/rel_notes/release_23_03.rst |  7 +++++++
 drivers/meson.build                    |  1 +
 drivers/ml/cnxk/cn10k_ml_dev.c         |  8 ++++++++
 drivers/ml/cnxk/cn10k_ml_dev.h         |  8 ++++++++
 drivers/ml/cnxk/meson.build            | 26 ++++++++++++++++++++++++++
 drivers/ml/meson.build                 |  8 ++++++++
 7 files changed, 59 insertions(+)
 create mode 100644 drivers/ml/cnxk/cn10k_ml_dev.c
 create mode 100644 drivers/ml/cnxk/cn10k_ml_dev.h
 create mode 100644 drivers/ml/cnxk/meson.build
 create mode 100644 drivers/ml/meson.build
  

Comments

Thomas Monjalon March 9, 2023, 10:06 p.m. UTC | #1
07/02/2023 17:06, Srikanth Yalavarthi:
> --- a/doc/guides/rel_notes/release_23_03.rst
> +++ b/doc/guides/rel_notes/release_23_03.rst
> +* **Implementation of Marvell CNXK machine learning driver for .**

It seems a word is missing.
It  looks like you did a lot of work on the mldev series,
so some details are missing.

> +
> +  * Added ml/cnxk driver which provides support for machine learning inference
> +    operations on Marvell's CN10K series of SoC's.
> +  * Added ML ROC code for ml/cnxk driver to common/cnxk.
> +  * Added implementation with support for all rte_ml APIs.
  
Srikanth Yalavarthi March 10, 2023, 8:25 a.m. UTC | #2
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: 10 March 2023 03:36
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Anup Prabhu <aprabhu@marvell.com>; Prince Takkar
> <ptakkar@marvell.com>; Parijat Shukla <pshukla@marvell.com>; Srikanth
> Yalavarthi <syalavarthi@marvell.com>
> Subject: [EXT] Re: [PATCH v5 02/39] ml/cnxk: add skeleton for ML cnxk driver
> 
> External Email
> 
> ----------------------------------------------------------------------
> 07/02/2023 17:06, Srikanth Yalavarthi:
> > --- a/doc/guides/rel_notes/release_23_03.rst
> > +++ b/doc/guides/rel_notes/release_23_03.rst
> > +* **Implementation of Marvell CNXK machine learning driver for .**
> 
> It seems a word is missing.
> It  looks like you did a lot of work on the mldev series, so some details are
> missing.
> 


Done. Updated the release notes correctly in version 6 patch series.


> > +
> > +  * Added ml/cnxk driver which provides support for machine learning
> inference
> > +    operations on Marvell's CN10K series of SoC's.
> > +  * Added ML ROC code for ml/cnxk driver to common/cnxk.
> > +  * Added implementation with support for all rte_ml APIs.
> 
> 
>
  
Thomas Monjalon March 10, 2023, 9:28 a.m. UTC | #3
10/03/2023 09:25, Srikanth Yalavarthi:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 07/02/2023 17:06, Srikanth Yalavarthi:
> > > --- a/doc/guides/rel_notes/release_23_03.rst
> > > +++ b/doc/guides/rel_notes/release_23_03.rst
> > > +* **Implementation of Marvell CNXK machine learning driver for .**
> > 
> > It seems a word is missing.
> > It  looks like you did a lot of work on the mldev series, so some details are
> > missing.
> 
> Done. Updated the release notes correctly in version 6 patch series.

I am close to merge v5 already.
I don't want to restart all the testing process.
Did you do other changes in v6?
  
Srikanth Yalavarthi March 10, 2023, 9:31 a.m. UTC | #4
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: 10 March 2023 14:59
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Anup Prabhu <aprabhu@marvell.com>; Prince Takkar
> <ptakkar@marvell.com>; Parijat Shukla <pshukla@marvell.com>
> Subject: Re: [EXT] Re: [PATCH v5 02/39] ml/cnxk: add skeleton for ML cnxk
> driver
> 
> 10/03/2023 09:25, Srikanth Yalavarthi:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 07/02/2023 17:06, Srikanth Yalavarthi:
> > > > --- a/doc/guides/rel_notes/release_23_03.rst
> > > > +++ b/doc/guides/rel_notes/release_23_03.rst
> > > > +* **Implementation of Marvell CNXK machine learning driver for
> > > > +.**
> > >
> > > It seems a word is missing.
> > > It  looks like you did a lot of work on the mldev series, so some
> > > details are missing.
> >
> > Done. Updated the release notes correctly in version 6 patch series.
> 
> I am close to merge v5 already.
> I don't want to restart all the testing process.
> Did you do other changes in v6?

No additional changes other than release notes fix

>
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 97ce3042b4..8e9d6dc946 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1441,6 +1441,7 @@  Marvell ML CNXK
 M: Srikanth Yalavarthi <syalavarthi@marvell.com>
 F: drivers/common/cnxk/hw/ml.h
 F: drivers/common/cnxk/roc_ml*
+F: drivers/ml/cnxk/
 
 
 Packet processing
diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst
index 425323241e..09b0932cd9 100644
--- a/doc/guides/rel_notes/release_23_03.rst
+++ b/doc/guides/rel_notes/release_23_03.rst
@@ -100,6 +100,13 @@  New Features
   * Added functions to translate IO type and format to string.
   * Added functions to quantize and dequantize inference IO data.
 
+* **Implementation of Marvell CNXK machine learning driver for .**
+
+  * Added ml/cnxk driver which provides support for machine learning inference
+    operations on Marvell's CN10K series of SoC's.
+  * Added ML ROC code for ml/cnxk driver to common/cnxk.
+  * Added implementation with support for all rte_ml APIs.
+
 
 Removed Items
 -------------
diff --git a/drivers/meson.build b/drivers/meson.build
index c6d619200f..546a5f409d 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -14,6 +14,7 @@  subdirs = [
         'mempool',        # depends on common and bus.
         'dma',            # depends on common and bus.
         'net',            # depends on common, bus, mempool
+        'ml',             # depends on common, bus, mempool
         'raw',            # depends on common, bus, dma and net.
         'crypto',         # depends on common, bus and mempool (net in future).
         'compress',       # depends on common, bus, mempool.
diff --git a/drivers/ml/cnxk/cn10k_ml_dev.c b/drivers/ml/cnxk/cn10k_ml_dev.c
new file mode 100644
index 0000000000..cc96a7bdb3
--- /dev/null
+++ b/drivers/ml/cnxk/cn10k_ml_dev.c
@@ -0,0 +1,8 @@ 
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Marvell.
+ */
+
+#include <rte_mldev.h>
+#include <rte_mldev_pmd.h>
+
+#include "cn10k_ml_dev.h"
diff --git a/drivers/ml/cnxk/cn10k_ml_dev.h b/drivers/ml/cnxk/cn10k_ml_dev.h
new file mode 100644
index 0000000000..049ac13fcd
--- /dev/null
+++ b/drivers/ml/cnxk/cn10k_ml_dev.h
@@ -0,0 +1,8 @@ 
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Marvell.
+ */
+
+#ifndef _CN10K_ML_DEV_H_
+#define _CN10K_ML_DEV_H_
+
+#endif /* _CN10K_ML_DEV_H_ */
diff --git a/drivers/ml/cnxk/meson.build b/drivers/ml/cnxk/meson.build
new file mode 100644
index 0000000000..2ec6a88e3f
--- /dev/null
+++ b/drivers/ml/cnxk/meson.build
@@ -0,0 +1,26 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2022 Marvell.
+
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
+    build = false
+    reason = 'only supported on 64-bit Linux'
+    subdir_done()
+endif
+
+driver_sdk_headers = files(
+        'cn10k_ml_dev.h',
+)
+
+sources = files(
+        'cn10k_ml_dev.c',
+)
+
+deps += ['mldev', 'common_cnxk']
+
+if get_option('buildtype').contains('debug')
+        cflags += [ '-DCNXK_ML_DEV_DEBUG' ]
+else
+        cflags += [ '-UCNXK_ML_DEV_DEBUG' ]
+endif
+
+pmd_supports_disable_iova_as_pa = true
diff --git a/drivers/ml/meson.build b/drivers/ml/meson.build
new file mode 100644
index 0000000000..54bc394c47
--- /dev/null
+++ b/drivers/ml/meson.build
@@ -0,0 +1,8 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2022 Marvell.
+
+drivers = [
+        'cnxk',
+]
+
+std_deps = ['mldev']