[v1,01/37] ml/cnxk: add skeleton for ML cnxk driver

Message ID 20221208200220.20267-2-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
ci/iol-testing warning apply patch failure
ci/loongarch-compilation warning apply patch failure

Commit Message

Srikanth Yalavarthi Dec. 8, 2022, 8:01 p.m. UTC
  Added initial source files and build files for ML cnxk driver.

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
Depends-on: patch-120600 ("common/cnxk: add ML headers and ROC code for cnxk")

 MAINTAINERS                    |  2 ++
 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 ++++++++
 6 files changed, 53 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

--
2.17.1
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 8cdb3e215d..ba4c97e802 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1442,6 +1442,8 @@  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/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..f04e78cce5
--- /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
+
+sources = files(
+        'cn10k_ml_dev.c',
+)
+
+headers = files(
+        'cn10k_ml_dev.h',
+)
+
+deps += ['mldev', 'common_ml', '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']