Added initial source files and build files for ML cnxk driver. Signed-off-by: Srikanth Yalavarthi <syalavar...@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
diff --git a/MAINTAINERS b/MAINTAINERS index 97ce3042b4..8e9d6dc946 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1441,6 +1441,7 @@ Marvell ML CNXK M: Srikanth Yalavarthi <syalavar...@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'] -- 2.17.1