From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A80743B01; Mon, 12 Feb 2024 14:48:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7682D4067E; Mon, 12 Feb 2024 14:47:57 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 03E4040633 for ; Mon, 12 Feb 2024 14:47:55 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41C1xwSk031411; Mon, 12 Feb 2024 05:47:55 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=2rZ2ZazzdK6+rQW38Dwul7hFO2MWgYh7cBuxany2obA=; b=QrO CtMTuWm7QCOcxl4F3Ee0MUeb7FXjxs+PYgG8TAoGTiBXUk59b9K5/MCFk9QImg/4 sO7b3y764I+jvuEC5Spej8G7vivewzWb7WSkBiclyCxUt+mUcqLrseZgdv47m578 abFrSpOgT4ISQT7gwbKn6W1sDjaHLMXJIcOvl1di7Eg3ie3aYJeTBrvPO1zKmA3W qnUitKQ7fVKSD7G6qxq9XjP3qggOMxAd/6k+TpohkBGDDxufymhfDZ308IabgZTg Cu+YgoI/OSHjJMq7yc83sgcQfqJYXxkMfLWbz2bp584+V84iF0msN7YLohw5Sy7g 1tQ+fZiUETEfhQ79p6A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3w69hkc8b7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 12 Feb 2024 05:47:54 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 12 Feb 2024 05:47:52 -0800 Received: from hyd1399.caveonetworks.com.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 12 Feb 2024 05:47:51 -0800 From: Nagadheeraj Rottela To: , , CC: , Nagadheeraj Rottela Subject: [PATCH v2 1/7] crypto/nitrox: move nitrox common code to common folder Date: Mon, 12 Feb 2024 19:17:37 +0530 Message-ID: <20240212134743.15153-2-rnagadheeraj@marvell.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240212134743.15153-1-rnagadheeraj@marvell.com> References: <20240212134743.15153-1-rnagadheeraj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: T0by0GiEsyj5JkJokOCj4JCW-jqq-C8S X-Proofpoint-GUID: T0by0GiEsyj5JkJokOCj4JCW-jqq-C8S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-12_10,2024-02-12_03,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org - The common code will be shared by both crypto and compress Nitrox PMD's. Signed-off-by: Nagadheeraj Rottela --- MAINTAINERS | 1 + drivers/common/nitrox/meson.build | 35 +++++++++++++++++++ .../{crypto => common}/nitrox/nitrox_csr.h | 0 .../{crypto => common}/nitrox/nitrox_device.c | 14 ++++++++ .../{crypto => common}/nitrox/nitrox_device.h | 0 .../{crypto => common}/nitrox/nitrox_hal.c | 0 .../{crypto => common}/nitrox/nitrox_hal.h | 0 .../{crypto => common}/nitrox/nitrox_logs.c | 0 .../{crypto => common}/nitrox/nitrox_logs.h | 0 drivers/{crypto => common}/nitrox/nitrox_qp.c | 0 drivers/{crypto => common}/nitrox/nitrox_qp.h | 0 drivers/crypto/meson.build | 1 - drivers/crypto/nitrox/meson.build | 18 ---------- drivers/meson.build | 1 + 14 files changed, 51 insertions(+), 19 deletions(-) create mode 100644 drivers/common/nitrox/meson.build rename drivers/{crypto => common}/nitrox/nitrox_csr.h (100%) rename drivers/{crypto => common}/nitrox/nitrox_device.c (92%) rename drivers/{crypto => common}/nitrox/nitrox_device.h (100%) rename drivers/{crypto => common}/nitrox/nitrox_hal.c (100%) rename drivers/{crypto => common}/nitrox/nitrox_hal.h (100%) rename drivers/{crypto => common}/nitrox/nitrox_logs.c (100%) rename drivers/{crypto => common}/nitrox/nitrox_logs.h (100%) rename drivers/{crypto => common}/nitrox/nitrox_qp.c (100%) rename drivers/{crypto => common}/nitrox/nitrox_qp.h (100%) delete mode 100644 drivers/crypto/nitrox/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index 5fb3a73f84..22cdaae979 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1136,6 +1136,7 @@ Marvell Nitrox M: Nagadheeraj Rottela M: Srikanth Jampala F: drivers/crypto/nitrox/ +F: drivers/common/nitrox/ F: doc/guides/cryptodevs/nitrox.rst F: doc/guides/cryptodevs/features/nitrox.ini diff --git a/drivers/common/nitrox/meson.build b/drivers/common/nitrox/meson.build new file mode 100644 index 0000000000..9b1b7bd03b --- /dev/null +++ b/drivers/common/nitrox/meson.build @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2024 Marvell. + +if not is_linux + build = false + reason = 'only supported on Linux' +endif + +nitrox_crypto = true +nitrox_crypto_path = 'crypto/nitrox' +nitrox_crypto_relpath = '../../' + nitrox_crypto_path + +if disable_drivers.contains(nitrox_crypto_path) + nitrox_crypto = false +endif + +deps += ['bus_pci', 'cryptodev'] +sources = files( + 'nitrox_device.c', + 'nitrox_hal.c', + 'nitrox_logs.c', + 'nitrox_qp.c', +) +includes += include_directories( + nitrox_crypto_relpath, +) + +if nitrox_crypto + foreach f: ['nitrox_sym.c', + 'nitrox_sym_capabilities.c', + 'nitrox_sym_reqmgr.c', + ] + sources += files(join_paths(nitrox_crypto_relpath, f)) + endforeach +endif diff --git a/drivers/crypto/nitrox/nitrox_csr.h b/drivers/common/nitrox/nitrox_csr.h similarity index 100% rename from drivers/crypto/nitrox/nitrox_csr.h rename to drivers/common/nitrox/nitrox_csr.h diff --git a/drivers/crypto/nitrox/nitrox_device.c b/drivers/common/nitrox/nitrox_device.c similarity index 92% rename from drivers/crypto/nitrox/nitrox_device.c rename to drivers/common/nitrox/nitrox_device.c index 5b319dd681..b2f638ec8a 100644 --- a/drivers/crypto/nitrox/nitrox_device.c +++ b/drivers/common/nitrox/nitrox_device.c @@ -120,5 +120,19 @@ static struct rte_pci_driver nitrox_pmd = { .remove = nitrox_pci_remove, }; +__rte_weak int +nitrox_sym_pmd_create(struct nitrox_device *ndev) +{ + RTE_SET_USED(ndev); + return 0; +} + +__rte_weak int +nitrox_sym_pmd_destroy(struct nitrox_device *ndev) +{ + RTE_SET_USED(ndev); + return 0; +} + RTE_PMD_REGISTER_PCI(nitrox, nitrox_pmd); RTE_PMD_REGISTER_PCI_TABLE(nitrox, pci_id_nitrox_map); diff --git a/drivers/crypto/nitrox/nitrox_device.h b/drivers/common/nitrox/nitrox_device.h similarity index 100% rename from drivers/crypto/nitrox/nitrox_device.h rename to drivers/common/nitrox/nitrox_device.h diff --git a/drivers/crypto/nitrox/nitrox_hal.c b/drivers/common/nitrox/nitrox_hal.c similarity index 100% rename from drivers/crypto/nitrox/nitrox_hal.c rename to drivers/common/nitrox/nitrox_hal.c diff --git a/drivers/crypto/nitrox/nitrox_hal.h b/drivers/common/nitrox/nitrox_hal.h similarity index 100% rename from drivers/crypto/nitrox/nitrox_hal.h rename to drivers/common/nitrox/nitrox_hal.h diff --git a/drivers/crypto/nitrox/nitrox_logs.c b/drivers/common/nitrox/nitrox_logs.c similarity index 100% rename from drivers/crypto/nitrox/nitrox_logs.c rename to drivers/common/nitrox/nitrox_logs.c diff --git a/drivers/crypto/nitrox/nitrox_logs.h b/drivers/common/nitrox/nitrox_logs.h similarity index 100% rename from drivers/crypto/nitrox/nitrox_logs.h rename to drivers/common/nitrox/nitrox_logs.h diff --git a/drivers/crypto/nitrox/nitrox_qp.c b/drivers/common/nitrox/nitrox_qp.c similarity index 100% rename from drivers/crypto/nitrox/nitrox_qp.c rename to drivers/common/nitrox/nitrox_qp.c diff --git a/drivers/crypto/nitrox/nitrox_qp.h b/drivers/common/nitrox/nitrox_qp.h similarity index 100% rename from drivers/crypto/nitrox/nitrox_qp.h rename to drivers/common/nitrox/nitrox_qp.h diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build index ee5377deff..3167b1ab85 100644 --- a/drivers/crypto/meson.build +++ b/drivers/crypto/meson.build @@ -13,7 +13,6 @@ drivers = [ 'ipsec_mb', 'mlx5', 'mvsam', - 'nitrox', 'null', 'octeontx', 'openssl', diff --git a/drivers/crypto/nitrox/meson.build b/drivers/crypto/nitrox/meson.build deleted file mode 100644 index 2cc47c4626..0000000000 --- a/drivers/crypto/nitrox/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(C) 2019 Marvell International Ltd. - -if not is_linux - build = false - reason = 'only supported on Linux' -endif - -deps += ['bus_pci'] -sources = files( - 'nitrox_device.c', - 'nitrox_hal.c', - 'nitrox_logs.c', - 'nitrox_sym.c', - 'nitrox_sym_capabilities.c', - 'nitrox_sym_reqmgr.c', - 'nitrox_qp.c', -) diff --git a/drivers/meson.build b/drivers/meson.build index f2be71bc05..9fd66e3264 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -14,6 +14,7 @@ subdirs = [ 'common/cnxk', # depends on bus. 'common/mlx5', # depends on bus. 'common/nfp', # depends on bus. + 'common/nitrox', # depends on bus. 'common/qat', # depends on bus. 'common/sfc_efx', # depends on bus. 'mempool', # depends on common and bus. -- 2.42.0