From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0063.outbound.protection.outlook.com [104.47.40.63]) by dpdk.org (Postfix) with ESMTP id A02ED58CE for ; Fri, 16 Jun 2017 07:32:35 +0200 (CEST) Received: from MWHPR03CA0030.namprd03.prod.outlook.com (10.174.173.147) by BN1PR0301MB0593.namprd03.prod.outlook.com (10.160.170.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Fri, 16 Jun 2017 05:32:33 +0000 Received: from BN1AFFO11FD040.protection.gbl (2a01:111:f400:7c10::111) by MWHPR03CA0030.outlook.office365.com (2603:10b6:301:3b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Fri, 16 Jun 2017 05:32:32 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD040.mail.protection.outlook.com (10.58.52.251) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1157.12 via Frontend Transport; Fri, 16 Jun 2017 05:32:31 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v5G5WNF2001003; Thu, 15 Jun 2017 22:32:30 -0700 From: Shreyansh Jain To: CC: , Date: Fri, 16 Jun 2017 11:10:33 +0530 Message-ID: <1497591668-3320-4-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497591668-3320-1-git-send-email-shreyansh.jain@nxp.com> References: <1497591668-3320-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131420647521408907; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39410400002)(39850400002)(39400400002)(39380400002)(39840400002)(39450400003)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(50226002)(105606002)(106466001)(575784001)(498600001)(33646002)(5660300001)(2351001)(50986999)(53936002)(110136004)(189998001)(38730400002)(5003940100001)(86362001)(305945005)(104016004)(48376002)(50466002)(54906002)(8676002)(8656002)(2906002)(81166006)(77096006)(8936002)(356003)(85426001)(2950100002)(4326008)(36756003)(6916009)(47776003)(76176999)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0593; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD040; 1:kJPFWxKzbZQMzxyJin40lM+G3kkcNAMiSiO7Rp9MvpTWr9GliNogd7dioZbx3Xd0ZCXHX039y9fVkugvbiLTqfDiMZXLvBVxsVznasI62crcW3D7Yq2XUDPi5g6H9zwN9DdszwHtQZnrFnl2WLcZg/S34A9cXnz55jJ1FOWHYHHl7u8+oWkdiRZLP+NKJaW8HVyPwAAo5G8Rr6W5GRigOf0liSKqIxgQ8KaEFsxBqlgW709cnvritYxLcSG88YW4Ze+foxvY3rXRuIMcdDvf+PL/HsMD45Eoat9F4AVlqpcKsZBeLkUc6ETgzXk3pbuCOcHHate9ego4lIPSnbFV9kKjK1tyzuBBqPi4pTZCumAZMUeGH+JhbMOWOsIIiQsHNN2CTOPfkkmRpGjDrp243wLmn7uO5BtovxJVknB5IdYcjHnTi7vl2HF7yIQX0pSyq8OOl2YcrZoMGjmppSMBfomzzuNQ6nkVwv92huCdHZh3u+rlgjn0KDiSYI2m+9AY7SzyuH48I87c/zkSuMYWSklf3sPkXAw7kVWfYQ89I7qhMnqUKvVHpTveTOoSpICynx9f5Y/9K/LTT0nH7Wmc4siJ6vl2RJ9ryxh6lpmIsTrFpzx5P0JTEaECCqNkdAT/pEQzC7SkZqVn8SttB0+wa16F/OOt8N69ofrwjJVDH3CuRMGVJZCsRlBIvy3uxhkF/xyITG8WNoSWLeR8o9vT94klqlpLU/VHbVoDijjupWY= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PR0301MB0593: X-MS-Office365-Filtering-Correlation-Id: 30d9381a-2fa7-4294-f62a-08d4b479161e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BN1PR0301MB0593; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0593; 3:WaJQ7y2Aiwx22t74yL+docWN5k3PUEe4X8a5xV23ZZo6a/T8EHVvxPN7g22LbgVeGgfb07/zIEZKN0uSgeD2e5x532/MMkGyau1DDfHgdVGrlofCR1fzUiC0whl85aBaosuLJ9AZ9cJ0HOAxjKTABPyY+wLVz6bgJUxhKEkwH52CG/9Y2Eq3ifvu6GM9bJFv4D9tGIdmPigEtbFLDMUk1TLHUwZ8fMkUKDu41Nt4tpCjRr0zZjj57K4L4pGsE/hy34zvkRTzJA/vddzJgEOoEnItuv3iRfLgT0dpF7ft45gbA10xdTdOS7EumH4Tt65gmOHc1nCsL6JeUnKuH1O6cvk7OlO8a7TQ1ySNvILbJLs5M4kh0+NVTVx+uEP6utb3awU+vLMucIeoy02UFah9szO0wruwYnI2jFq4gDsWSNVSyoVad4mMVnjNfrVoMyuw; 25:Sazh45KJ8wjYPzo4O5mbAd5Clsn8V1ECXzotUr7r0yOMZXQFrQhcHKudKc/6IU7rKhznntZmgUqqlgGskVOzrfer41W4JojDchYxsWsI042PF5HMAPgcqzYE+jeFarZo0cQa/68QPIu1WRfEIAihGKP3kgpUlio/v9+eLDPV9H1e1ZIkXYxQEhG14j4ehNPt3Zx90+AQFnC7RhSqvj/fL/BFz1/oSn2cIDKLmj9dvgqxlQK9RbBJ8LeD77gILcDrymX2fTTCy4oBOjT87CrMnVAja8qJ7zGXpqqWmNw0mXQK7sXpcRe6QZVckfvL+90ZwuGxrNp525+JI9un3ccqKItuXfD3ykRJIIL6cosOAPw8Nrmv+/WAi4WH/NyujAilIm8AKaGzXs/GURwwWC/MxThqahLXI1HvrailcaCo/Mzj1kxFzMiRZE3k/d98JCnthxLwkOm93uFpjJUky7cfDBxkFR9B2WW/8VdVnO9MIAQ= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0593; 31:y9MFe/6yibysMPfao3o9a4eUgSMh5FOSL7h2yFw0bOLyGxE0rve7m+/4jfAx4oeaozxRgZRLvtGuL9Ozwkn8kZXLmke7ZdXwyOQQyPpL7DZBoQy3vjS5SdtnR429nnhprz5oqTmtHQ0LkEWzH1+t1YVG24VGnNa0UMg0uSjE/J8sKkkybDrT2zjMqyIN/UUE6u3ac1dFs0Md4ccfIwJY/A33CtvgvEZGxYLjJ+L8VV2KHLfZTV9OSWRKx5JMO4jZW2NqtXqyHYJREmTPH82GhQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(8121501046)(13018025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(20161123559100)(20161123556025)(20161123563025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN1PR0301MB0593; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN1PR0301MB0593; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0593; 4:Xu6nEueZOU6g23PRGPiCP+UMeUJDQ7ZiSzA7jpIF?= =?us-ascii?Q?PGHz/VkmPU0dCltGx9uN27i8TbgylcI/iTq0sVrWy+vJFJkiBTyFcb0M1RhJ?= =?us-ascii?Q?W7UI7o3Cv+2981BucjFtFotDk8xmgjxdqDAgu55oPNsb4/h6jtvVjgUT/JDy?= =?us-ascii?Q?YpVuBSKhLPWXAZk7yfI5wkihbkVpzaJm40Aca856krbXGXbWE31w+n5adm7S?= =?us-ascii?Q?362KvJlh8D0wO+e8Ydud9V1PeHd47q/7XUCl293akQQQlfXPlZJ/nWET78lG?= =?us-ascii?Q?0TAJ8NGv6Xvw25/pOoC8gbsw2G14SEhcmgNZxLAw0oIdC2xCbUYGkMarUYuo?= =?us-ascii?Q?NciEL0v3LmTtOmSZCTK+B5NO3MDNg5uH7ZxK3ctgJvCml423JVNVaV9WA/yP?= =?us-ascii?Q?mw7q0+UiEKobHehWf5X0QoWOFa12sETnvA07rsZghauNTpCY2uFD3YyNtL8k?= =?us-ascii?Q?iloy0pcG74y7luQZMTvmvnJJT5Gji4kn311S8+OYAGtQBU1RPQxZPwrs1W5I?= =?us-ascii?Q?X3kNwL/vJ1sLy/ZpImGkxwbCOlHIVYhKiNByuKnxlS3xagqnr8a7pRY9lTah?= =?us-ascii?Q?hF5XPiXLsfmNE7JK8SyQNa7IVzSygKNxeWBHv9YJLKi2/e4B7Cxup1pAr6X0?= =?us-ascii?Q?sHKbd6gA+S3BAk7n12lB48OnmBmGsEv4fCnwdgI9s6W71AOcddQNXG0ULjy7?= =?us-ascii?Q?YUR3zdl6Lpt0nx+rl0CYWQH9iDKWpXFvejrdzs9Q0i5Zn4oyu909P54TvVym?= =?us-ascii?Q?rhUUQQ3WrSuo2+lUuv3CnirgLvoTJtEHQA3hbBFmKc+RIihJYUocUqURjVK0?= =?us-ascii?Q?REmLtQsuVQMLBYuUM1iq95zuBx1KGbY3CJ+MKsrxdAUZkaSdd++HmU++x47t?= =?us-ascii?Q?Bm2dHIcOJTenqKOHJz87pgGKyO2kEKJcNGQUhhHhtlDT3cYZKc74L8idOPwE?= =?us-ascii?Q?iB3/E1TsXdwv1qW9qFLKRZqveefYRuy1+KDK43hWoDjy/fHvs8CcRfytPi6i?= =?us-ascii?Q?ZmpnSdeEJdnOeE2WewM/+uMdHoEQGGyw6SVTLnNSyfwaaHz1lJ7/A61jLYF3?= =?us-ascii?Q?3GgJXhug7uFDDZRgD8I0Sf04Vx5xplZ5FZwF6YBLxmEE2zBGeMCrsGN/nvCK?= =?us-ascii?Q?3oaeMkMVQVeDIJ4fz/T86k/Zpg3Mm0XXpW24m7ivXtbeH/GvC8c5ioicEngh?= =?us-ascii?Q?ks4KUebwyBLSEneEA9wWyT9/EvaUR/qENk9SdZ5AlkMkxbG5tsmoDgnbHWb9?= =?us-ascii?Q?dKjE5dekbxIdBedSzdSJWzx67wagE8PinuvYjORrL7NmnAYWiqdRGY7RThRH?= =?us-ascii?Q?xA=3D=3D?= X-Forefront-PRVS: 0340850FCD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0593; 23:ngR4V1emjr/G0aF6R5hD71O8y+gzDUrjDdUdZzS?= =?us-ascii?Q?t+6dPHyCrXqJem0HtfK0hm7b0W22uqTm223dHut5Ugxkp79IK1W75CHIFZ8E?= =?us-ascii?Q?6ayb5UzrxNIXvi+xYt/jikF1fpZATaCEeUqqArrO0zyafHCJ/oHtDno3KI3+?= =?us-ascii?Q?jA5NqBspvjfi0eoXHpKw4vT6UYYygQaiT4toxgipfviyelobZdR3PNf8aXF1?= =?us-ascii?Q?6WaGk7+yTiGPUL5L4f5J3UX/FDw8E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mvKVXgpdXY9OLDt1Ldzt0rZVW6iMWChl5HhgYiZM4t+Dv/qPtdjO7dqq+kAeJhLq5iiIWXViABzx1CtxCFqVjEnf04awwm2To6bOqjOYSnPTQ8w3w5XHD0HdRZ4ZzCAkxzyxTlgYXbGtL37c4zJd9l+Ba4Zu7O9rbDg1FKvvtyXeDhp4lx/vHcCGLIYPRv40Iwk0xh4aLEE5FSJFY056XBU5nluNmCfn22IlTfUgc2FGf2T7UHSGD7KTg==; 24:Hh6yNxwzyuIlMEEx6g/VHq3mEfACOib5wQ5nktWtWHQmZ5NICvLpDXrJY4EWLuI3kHDB+nAYNxaFp20VvLJkXsRJfaX4gDseP6tI9LeJR0E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0593; 7:aSoXMxbxKPTemhshgP0oea2iOHIDtk5p69B9avABV7wfETvuOdx4IH6L1DlqFaOUOWUlWu+BrmSN/TCay4oQxiwBzM3v2dGJj0RP11/hA23hVUwjs/ICPcHbBcHtpqqDTU5SMWTnwk/GThACsDjjefxMZtccTnmhSdXJO0nTk5BFvi8d27s3QL9OeQ0J1U/yqonQRqL9MQfprD3haV5HyhswBRvBF++8hqoq4DYMc1bfuCfm9y59WSK0yQqnSPcbqgY5hiAPO4TsrqXQ8gieji23L/qLfegZLMdG1Hi2DG8TqS4iDC9p9uK2kIor7XazgeKPBjP4oiqsullUVR23Aw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 05:32:31.9692 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0593 Subject: [dpdk-dev] [PATCH 03/38] bus/dpaa: introduce NXP DPAA Bus driver skeleton X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2017 05:32:37 -0000 Signed-off-by: Shreyansh Jain Signed-off-by: Hemant Agrawal --- MAINTAINERS | 5 + config/common_base | 3 + config/defconfig_arm64-dpaa-linuxapp-gcc | 9 ++ drivers/bus/Makefile | 3 + drivers/bus/dpaa/Makefile | 63 +++++++++++ drivers/bus/dpaa/dpaa_bus.c | 178 ++++++++++++++++++++++++++++++ drivers/bus/dpaa/rte_bus_dpaa_version.map | 7 ++ drivers/bus/dpaa/rte_dpaa_bus.h | 163 +++++++++++++++++++++++++++ drivers/bus/dpaa/rte_dpaa_logs.h | 92 +++++++++++++++ 9 files changed, 523 insertions(+) create mode 100644 drivers/bus/dpaa/Makefile create mode 100644 drivers/bus/dpaa/dpaa_bus.c create mode 100644 drivers/bus/dpaa/rte_bus_dpaa_version.map create mode 100644 drivers/bus/dpaa/rte_dpaa_bus.h create mode 100644 drivers/bus/dpaa/rte_dpaa_logs.h diff --git a/MAINTAINERS b/MAINTAINERS index f6095ef..803c2af 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -388,6 +388,11 @@ F: drivers/net/nfp/ F: doc/guides/nics/nfp.rst F: doc/guides/nics/features/nfp.ini +NXP dpaa +M: Hemant Agrawal +M: Shreyansh Jain +F: drivers/bus/dpaa/ + NXP dpaa2 M: Hemant Agrawal M: Shreyansh Jain diff --git a/config/common_base b/config/common_base index f6aafd1..56bd27c 100644 --- a/config/common_base +++ b/config/common_base @@ -301,6 +301,9 @@ CONFIG_RTE_LIBRTE_LIO_DEBUG_TX=n CONFIG_RTE_LIBRTE_LIO_DEBUG_MBOX=n CONFIG_RTE_LIBRTE_LIO_DEBUG_REGS=n +# NXP DPAA Bus +CONFIG_RTE_LIBRTE_DPAA_BUS=n + # # Compile NXP DPAA2 FSL-MC Bus # diff --git a/config/defconfig_arm64-dpaa-linuxapp-gcc b/config/defconfig_arm64-dpaa-linuxapp-gcc index 19ac998..a189ad2 100644 --- a/config/defconfig_arm64-dpaa-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa-linuxapp-gcc @@ -36,3 +36,12 @@ # NXP (Freescale) - Soc Architecture with FMAN, QMAN & BMAN support CONFIG_RTE_MACHINE="dpaa" CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72" + +# NXP DPAA Bus +CONFIG_RTE_LIBRTE_DPAA_BUS=y +CONFIG_RTE_LIBRTE_DPAA_DEBUG_BUS=n +CONFIG_RTE_LIBRTE_DPAA_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA_DEBUG_RX=n +CONFIG_RTE_LIBRTE_DPAA_DEBUG_TX=n + diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index 1e5b281..2dad392 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -33,6 +33,9 @@ include $(RTE_SDK)/mk/rte.vars.mk core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether +DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa +DEPDIRS-dpaa = $(core-libs) + DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc DEPDIRS-fslmc = $(core-libs) diff --git a/drivers/bus/dpaa/Makefile b/drivers/bus/dpaa/Makefile new file mode 100644 index 0000000..f44f3c4 --- /dev/null +++ b/drivers/bus/dpaa/Makefile @@ -0,0 +1,63 @@ +# BSD LICENSE +# +# Copyright 2016 NXP. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of NXP nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk +RTE_BUS_DPAA=$(RTE_SDK)/drivers/bus/dpaa + +# +# library name +# +LIB = librte_bus_dpaa.a + +ifeq ($(CONFIG_RTE_LIBRTE_DPAA_DEBUG_INIT),y) +CFLAGS += -O0 -g +CFLAGS += "-Wno-error" +else +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +endif + +CFLAGS += -I$(RTE_BUS_DPAA)/ +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include + +# versioning export map +EXPORT_MAP := rte_bus_dpaa_version.map + +LIBABIVER := 1 + +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += \ + dpaa_bus.c + + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c new file mode 100644 index 0000000..1c4627d --- /dev/null +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -0,0 +1,178 @@ +/*- + * BSD LICENSE + * + * Copyright 2017 NXP. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of NXP nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* System headers */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +struct rte_dpaa_bus rte_dpaa_bus; + + +static inline void +dpaa_add_to_device_list(struct rte_dpaa_device *dev) +{ + TAILQ_INSERT_TAIL(&rte_dpaa_bus.device_list, dev, next); +} + +static inline void +dpaa_remove_from_device_list(struct rte_dpaa_device *dev) +{ + TAILQ_INSERT_TAIL(&rte_dpaa_bus.device_list, dev, next); +} +static int +rte_dpaa_bus_scan(void) +{ + PMD_INIT_FUNC_TRACE(); + + return 0; +} + +/* register a dpaa bus based dpaa driver */ +void +rte_dpaa_driver_register(struct rte_dpaa_driver *driver) +{ + RTE_VERIFY(driver); + + PMD_INIT_FUNC_TRACE(); + + TAILQ_INSERT_TAIL(&rte_dpaa_bus.driver_list, driver, next); + /* Update Bus references */ + driver->dpaa_bus = &rte_dpaa_bus; +} + +/* un-register a dpaa bus based dpaa driver */ +void +rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver) +{ + struct rte_dpaa_bus *dpaa_bus; + + PMD_INIT_FUNC_TRACE(); + + dpaa_bus = driver->dpaa_bus; + + TAILQ_REMOVE(&dpaa_bus->driver_list, driver, next); + /* Update Bus references */ + driver->dpaa_bus = NULL; +} + +static int +rte_dpaa_device_match(struct rte_dpaa_driver *drv, + struct rte_dpaa_device *dev) +{ + int ret = -1; + + PMD_INIT_FUNC_TRACE(); + + if (!drv || !dev) { + PMD_DRV_LOG(DEBUG, "Invalid drv or dev received."); + return ret; + } + + if (drv->driver_type == dev->id.device_type) { + DPAA_BUS_LOG(INFO, "Device: %s matches for driver: %s", + dev->name, drv->driver.name); + ret = 0; /* Found a match */ + } + + return ret; +} + +static int +rte_dpaa_bus_probe(void) +{ + int ret = -1; + struct rte_dpaa_device *dev; + struct rte_dpaa_driver *drv; + + PMD_INIT_FUNC_TRACE(); + + /* For each registered driver, and device, call the driver->probe */ + TAILQ_FOREACH(dev, &rte_dpaa_bus.device_list, next) { + TAILQ_FOREACH(drv, &rte_dpaa_bus.driver_list, next) { + ret = rte_dpaa_device_match(drv, dev); + if (ret) + continue; + + if (!drv->probe) + continue; + + ret = drv->probe(drv, dev); + if (ret) + DPAA_BUS_LOG(ERR, "Unable to probe.\n"); + break; + } + } + return 0; +} + +struct rte_dpaa_bus rte_dpaa_bus = { + .bus = { + .scan = rte_dpaa_bus_scan, + .probe = rte_dpaa_bus_probe, + }, + .device_list = TAILQ_HEAD_INITIALIZER(rte_dpaa_bus.device_list), + .driver_list = TAILQ_HEAD_INITIALIZER(rte_dpaa_bus.driver_list), + .device_count = 0, +}; + +RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus); diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map new file mode 100644 index 0000000..8c1ea65 --- /dev/null +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -0,0 +1,7 @@ +DPDK_17.08 { + global: + + rte_dpaa_driver_register; + rte_dpaa_driver_unregister; + +}; diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h new file mode 100644 index 0000000..55e6793 --- /dev/null +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -0,0 +1,163 @@ +/*- + * BSD LICENSE + * + * Copyright 2017 NXP. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of NXP nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __RTE_DPAA_BUS_H__ +#define __RTE_DPAA_BUS_H__ + +#include +#include + +#define FSL_DPAA_BUS_NAME "FSL_DPAA_BUS" + +#define DEV_TO_DPAA_DEVICE(ptr) \ + container_of(ptr, struct rte_dpaa_device, device) + +struct rte_dpaa_device; +struct rte_dpaa_driver; + +/* DPAA Device and Driver lists for DPAA bus */ +TAILQ_HEAD(rte_dpaa_device_list, rte_dpaa_device); +TAILQ_HEAD(rte_dpaa_driver_list, rte_dpaa_driver); + +enum rte_dpaa_type { + FSL_DPAA_ETH = 1, + FSL_DPAA_CRYPTO, +}; + +struct rte_dpaa_bus { + struct rte_bus bus; + struct rte_dpaa_device_list device_list; + struct rte_dpaa_driver_list driver_list; + int device_count; +}; + +struct dpaa_device_id { + uint8_t fman_id; /**< Fman interface ID, for ETH type device */ + uint8_t mac_id; /**< Fman MAC interface ID, for ETH type device */ + uint16_t dev_id; /**< Device Identifier from DPDK */ + enum rte_dpaa_type device_type; /**< Ethernet or crypto type device */ +}; + +struct rte_dpaa_device { + TAILQ_ENTRY(rte_dpaa_device) next; + struct rte_device device; + struct rte_eth_dev *eth_dev; + struct rte_cryptodev *crypto_dev; + struct rte_dpaa_driver *driver; + struct dpaa_device_id id; + char name[RTE_ETH_NAME_MAX_LEN]; +}; + +typedef int (*rte_dpaa_probe_t)(struct rte_dpaa_driver *dpaa_drv, + struct rte_dpaa_device *dpaa_dev); +typedef int (*rte_dpaa_remove_t)(struct rte_dpaa_device *dpaa_dev); + +struct rte_dpaa_driver { + TAILQ_ENTRY(rte_dpaa_driver) next; + struct rte_driver driver; + struct rte_dpaa_bus *dpaa_bus; + enum rte_dpaa_type driver_type; + rte_dpaa_probe_t probe; + rte_dpaa_remove_t remove; +}; + +struct dpaa_portal { + uint32_t bman_idx; /**< BMAN Portal ID*/ + uint32_t qman_idx; /**< QMAN Portal ID*/ + uint64_t tid;/**< Parent Thread id for this portal */ +}; + +/* TODO - this is costly, need to write a fast coversion routine */ +static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr) +{ + const struct rte_memseg *memseg = rte_eal_get_physmem_layout(); + int i; + + for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr != NULL; i++) { + if (paddr >= memseg[i].phys_addr && paddr < + memseg[i].phys_addr + memseg[i].len) + return (uint8_t *)(memseg[i].addr) + + (paddr - memseg[i].phys_addr); + } + + return NULL; +} + +/** + * Register a DPAA driver. + * + * @param driver + * A pointer to a rte_dpaa_driver structure describing the driver + * to be registered. + */ +void rte_dpaa_driver_register(struct rte_dpaa_driver *driver); + +/** + * Unregister a DPAA driver. + * + * @param driver + * A pointer to a rte_dpaa_driver structure describing the driver + * to be unregistered. + */ +void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver); + +/** + * Initialize a DPAA portal + * + * @param arg + * Per thread ID + * + * @return + * 0 in case of success, error otherwise + */ +int rte_dpaa_portal_init(void *arg); + +/** + * Cleanup a DPAA Portal + */ +void dpaa_portal_finish(void *arg); + +/** Helper for DPAA device registration from driver (eth, crypto) instance */ +#define RTE_PMD_REGISTER_DPAA(nm, dpaa_drv) \ +RTE_INIT(dpaainitfn_ ##nm); \ +static void dpaainitfn_ ##nm(void) \ +{\ + (dpaa_drv).driver.name = RTE_STR(nm);\ + rte_dpaa_driver_register(&dpaa_drv); \ +} \ +RTE_PMD_EXPORT_NAME(nm, __COUNTER__) + +#ifdef __cplusplus +} +#endif + +#endif /* __RTE_DPAA_BUS_H__ */ diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h new file mode 100644 index 0000000..c33b0c2 --- /dev/null +++ b/drivers/bus/dpaa/rte_dpaa_logs.h @@ -0,0 +1,92 @@ +/*- + * BSD LICENSE + * + * Copyright 2017 NXP. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of NXP nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _DPAA_LOGS_H_ +#define _DPAA_LOGS_H_ + +#include + +#define DPAA_BUS_LOG(level, fmt, args...) \ + RTE_LOG(level, BUS, "%s(): " fmt "\n", __func__, ##args) + +#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS +#define DPAA_BUS_WARN(cond, fmt, args...) \ + do {\ + if (cond) \ + DPAA_BUS_LOG(DEBUG, "WARN: " fmt, ##args); \ + } while (0) +#else +#define DPAA_BUS_WARN(cond, fmt, args...) do { } while (0) +#endif + +#define PMD_INIT_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) + +#ifdef RTE_LIBRTE_DPAA_DEBUG_INIT +#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") +#else +#define PMD_INIT_FUNC_TRACE() do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA_DEBUG_RX +#define PMD_RX_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) +#else +#define PMD_RX_LOG(level, fmt, args...) do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA_DEBUG_TX +#define PMD_TX_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) +#else +#define PMD_TX_LOG(level, fmt, args...) do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA_DEBUG_TX_FREE +#define PMD_TX_FREE_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) +#else +#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER +#define PMD_DRV_LOG_RAW(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args) +#else +#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0) +#endif + +#define PMD_DRV_LOG(level, fmt, args...) \ + PMD_DRV_LOG_RAW(level, fmt "\n", ## args) + +#endif /* _DPAA_LOGS_H_ */ -- 2.7.4