From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0083.outbound.protection.outlook.com [104.47.33.83]) by dpdk.org (Postfix) with ESMTP id 52041D202 for ; Fri, 24 Mar 2017 22:58:41 +0100 (CET) Received: from BN3PR03CA0111.namprd03.prod.outlook.com (10.174.66.29) by BN3PR03MB2257.namprd03.prod.outlook.com (10.166.74.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 24 Mar 2017 21:58:39 +0000 Received: from BY2FFO11OLC012.protection.gbl (2a01:111:f400:7c0c::114) by BN3PR03CA0111.outlook.office365.com (2603:10b6:400:4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Fri, 24 Mar 2017 21:58:39 +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 BY2FFO11OLC012.mail.protection.outlook.com (10.1.15.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Fri, 24 Mar 2017 21:58:38 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v2OLwRmf007000; Fri, 24 Mar 2017 14:58:35 -0700 From: To: CC: , , , , , , Akhil Goyal Date: Sat, 25 Mar 2017 03:27:43 +0530 Message-ID: <20170324215754.21751-3-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170324215754.21751-1-akhil.goyal@nxp.com> References: <20170303194935.30831-1-akhil.goyal@nxp.com> <20170324215754.21751-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131348663192520408; (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)(39400400002)(39850400002)(39450400003)(39840400002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(189998001)(76176999)(86152003)(50986999)(2876002)(5890100001)(54906002)(38730400002)(2906002)(53936002)(110136004)(48376002)(47776003)(77096006)(8656002)(104016004)(4326008)(86362001)(2351001)(36756003)(50466002)(105606002)(33646002)(5660300001)(85426001)(1076002)(8936002)(106466001)(305945005)(81166006)(50226002)(6916009)(6666003)(5003940100001)(356003)(2950100002)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2257; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC012; 1:uJQgDSysyReGFfafKqba7rV3vZIvMLGeyHMjt//tr/mQSQ7QbxR9AroRPNMJqgMtWnt+yzCAObn4eXFkPKCu6F67NmGqSg8LZFISG1iQ4ZvB84kq/KSX7W+UenahEOFNs1aZO1HhHM4EwPxhyKRiyWBPjH8MTAsBmetjokwbCElWhzpyieR6DwnYUbg6tbQJ02U6UlGeDlHuWa/YQX0KYSiKhEAy1t8R8PV25vqg8ovn2cSIN/efWEDy8APHHo8wjZiJpihPMgk2wYCk/YW0cHXwRg6fH1MwvZ1sm4257p7dPeJjF02/nnKLmgpe7TODDB8eaG1kw8Bv33pI06JkE8iwwdDMmNZZOJKEiMaz1K7jEMTMF9cN26tWIEd1MEhxAq02iVti4JlcpNwrnSlOHCM3Nz5CDhyyooxg6AOU85qqpot7UhZsn87xvntMP6YH4e0nHslWHlLOhGBP0MsoUgjCGzVLA5H1Yn0mIjsrtuphIYGj3sxaqdm/JyZ5+2Adltvd37ScDHNuFvgtAeWH1/ow5S8MlhGWAthMtEhSQVjFjvCxOMUoGpFbLv76yBaHnC1Dv3ppy189/gTxFHIOFvApEz3IqKFaWfBncJOaPDQ1XKYhKWc4+idNwk6ddYZchz3K9Mi1dyxuA5jmYcB9/LmQn3oLJH2lJ8C7jG5FhtXengD+fqel1MlaRwEAVelU0Sm5LU75sCJQaoYXWlOmfTJhXFUW1MfVael2GfjzfzJo/X4qXFLvvumveolvw5RZ MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b8266037-96c9-46fd-9a93-08d47300edb1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN3PR03MB2257; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2257; 3:A9zohiA8xdJI/982HOwVZiox4yLbm+maLPjVNFnCC8QoF2F8DoFFO/Ih17MxXkvRLyTnzPsiSXxYt3AIvIiFQNwdP9++HNA1BbfGbMVsTqi8DKh+BSfdgwPP/M44o1jCqAxqHX0xSklh1v4lkGJ0HW51Uxpq6CgA9CL35Kr74LYYKqsLLE80Os5Q10jIuUOFdDX0SxGQITOOSjwUQV1qff91Mu+4x0jzGfnb2ONn74rt/PVmdgvZAeDubwrY98Gt/vnmPPvAgG3KjXG4ZEJH56eDxelt/NX+HTT48E4FjJfLpEXd2oC8cMIrv2ynkOVlRLzVhxHnzYWqGpKGgcLVf6DbOLC1/Zv8F33QZqO/3fB1k3lMctwu3JMUzF5PhqRQ; 25:/1OVhVhitHqYAttY9js+QQL4wGU/hADADRp38jfScfAjDbJJaeI1tHb3kcEUU+cXiix9vYF8cmVDK+HDw8dIbOrycoATVvvQWFfpwNKJ3tv/Ao6Wm65WM5UqsW8agBYdJkgrQ77hjgMrXt6vfpYW9Z902tEtsrWHmBXsvU9hwpGMxt51T1KPptpsRPe52xqt1SVc9DHrOlBncHXGkUPfa1hpYkIwNfdknO6dZq0Wo55I8hzJUjz5W586luQrLhIBquz8lqUYudwm3gCc4yPLmozHs5Ddu5DaIsiWaFaJagxHxF9zeyB2uMx+0cU6z+M0FiNCqpk00F6VtdfKWdzkB1OSnNmSX74GCPSvnc3CRsLLQmNnf4gXEZgeNCMgt896pQpv7fzm1Ps3insOoH6IEpycrYjHb3HJM/lwB39arwRwUXrvt5WS4qgp/le26ni3WwMbVYy73C78LZZnFtkPFg== X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2257; 31:plJUxdGFVhwC+7v6Tks1mI2we08icj6IOysVj8kbOcIFQQKdroXCYafeMkg/550+qvdIgFgQPsKVt+10fuog+tJqBED2x9g/FnUey575nAqCpVRGtNxYL4ddXPPqDSPgbeLxCnk/5MROTv/SmKMu9iCxvsxsuqx5OJivKJZ2ERqgBtI4f9/2FU4mea1he5MKmPqG9HkZWtVyCNg76rZWRCgAAAL8HAcsMFL3pFDH+jpttHPteFYUKwQEgfvi/oMc/+QWkaTR4uzoZivuvAnmYA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(5005006)(13017025)(13015025)(13023025)(13018025)(13024025)(10201501046)(3002001)(6055026)(6096035)(20161123559025)(20161123561025)(20161123556025)(20161123565025)(20161123563025); SRVR:BN3PR03MB2257; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR03MB2257; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2257; 4:Z1OEuzs53PI2no0u72cuGVI1IF71IOFKXU+fESeIYtI7HU0P83nQW05wQIvgCHuN1G9hoyTbkKiJT0LxuowD2lQFLjd1WebSXOKuY9iZS9fNNqnf+TLHIigJcK+I4pH+0ePq8m9qpeSHKbKmK22R4XW5yOovDoyNzply3LOl+MSelymITA2alEyakjHg+N/y/6JytC8fM2SIb6G0inNn1l6FqmZ4Jj11uZcaWtctGvLuAbrkaynFte3hH7I1FTm6RpgDD3L/aQx7WQqMoOmFNaVgoG/uvkZxuPBtobbgV6E5jU5L93YXtX4ECwHnxkSRyFis7ggFZBjArtFw158o+QmOEpHjdsJIqHkPGMyEMOINHBVFYn+J+ENuCAeF1LAuc4RhlweUyOhq4O3PDK6dggBW+zmANaS63QkGKyhFaWrUwAlfMfkJUir29cbFBPnLwI8ahJr7peS5KwOhImiWBSKXW+oOcgFiLKNosAxnpJXgoyIIy/1deC/4GpZdrthrjEm3IdDi5ESBbRNjC7HAtm5gY/Dsq12oxteq+EIdexVdOlNzfpDi1wb2OCYujk4Cy6q39FtRgDRYBI8V+5OYb0vBvmz7Vvwe+BLtIQs2SRf3vKxj9Y3yBAGry0bRJxGIX9gWZOtNbPqID/OljYlMxQyuUwq72MmS/bZSGJrfu2LsKInTlWHbRHfuAXY3CS8IIXMJDfxjhQEDuSasWFTWzHfWS4LgeN4gst+U0UG6r7p2tnRktLXQVuYbNNysbhB4BetAJZ5CiPr/7A2nRcznSA== X-Forefront-PRVS: 0256C18696 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2257; 23:XDTF+x83kG/ipp/SgJh5EwRkV/BAxPeOYrHMt43H2?= =?us-ascii?Q?C7PYdHHsKOxwU/ic/qCPySDCG0lvZ6M5SxukKG8Lpo3CriEWHfcQ6JJJ6zgj?= =?us-ascii?Q?ljezWJJfWkC86zdw6Mofko+Rf4hZrIItpjEzn2kAmoNibqez47e2GJl0vNjv?= =?us-ascii?Q?AUbqMc8RWDuua+C+8EsEWrQ27i0Yjz0ykQdhsgd3RCOqeG7sesaeWiDJjiPo?= =?us-ascii?Q?6LzD7ZnORbMKmsMdspeXGbNTgGc4pkvWnPuVYSjGykvUn4PXztJoxwQjv6RA?= =?us-ascii?Q?Zznll5Mo2kcXEg0x+zhTW1e/l9QLOL0IqeMAqM2UHEGywq72EDtxNYVQ1UpI?= =?us-ascii?Q?PS4wjCa6qnUn+8YG+MiJDmYd82lylZNWjcYxvB1Vgvl9TZ1CxLlovLOe2KIq?= =?us-ascii?Q?cDVi2Jko6kYQ0Sf4rUu35enU4p6Ij0+llVcJAKRnOkiIYV8FGER5vdJ6U8e5?= =?us-ascii?Q?hbCDhnN8S+i52+bbg8dqJIZGpFJWtfXQmbT4EWFy8Av2ZAvFR5OzBOvdSP4Y?= =?us-ascii?Q?KhUqVV5nRuP6zov+iwVXVM1hXUqrgGs72jidmI/0Ujcgmnck9CxQW3FKeSXy?= =?us-ascii?Q?/YBoeGFTBBxgNGnESGAldHphQtyci0Vxns3dhDTeKyR2EsbVk0Zl+ldr9vJc?= =?us-ascii?Q?dndjz/VKCK875TX90ueh3AMwCPhCB8YE/uRp+znGPtFcMAhjjPvbajsj65Db?= =?us-ascii?Q?DXKYXs8/fIz/nsS7Ibs0CSldEfrBG+4HMaSqt0K1IRjH1ZXj7MTZ4EF5xawS?= =?us-ascii?Q?8ePXplPWTG6QFfrS01lCHOEH2yOtAyvVTJXYAxysmJScxV/PuWt1L24ozCXv?= =?us-ascii?Q?CdvtPzlscW0f5dG6WmY05ptw22j6SsSbjmJ2yUzrC84pecr28YCNY/Lw5wu4?= =?us-ascii?Q?fLprGF3tLDsFIqzppb9UNw3o5R1oPw7fFqIXoFPXZ1e8w6qu8XN8eJE51txm?= =?us-ascii?Q?hToUaUhkq/xo30NNUt9UzI4lWO7ausWuEalSROE30bXrIUx+0zR+vJnbPpei?= =?us-ascii?Q?9BvUSYtwkkXevaLBxwlQ+y2CZMwN/zZYP91ikBwJCaYaJ/W0CcFbDfLEVABx?= =?us-ascii?Q?hTuVjDOAsHIKYMLtKGUJwxOkUQSPpfZZ7mRIxCVJfSF1pNExAQuSD5CgkHqn?= =?us-ascii?Q?od1sahaSe1utaase1TGAqpxOOFsQSW2RBzFVB4JiF8n3hyEKhMNnnr0q1tRK?= =?us-ascii?Q?9PmD+IXFEA50pP0YRALxnV+ZPAgK3ocR2I9rv34MEEf5wrETA66XOyogDcKX?= =?us-ascii?Q?TTdtYkkoek7Tbqu4lCy+TZCCxxhUcRs3UWH9kAIZ3GvTcDlYzz0IhMIgy2oc?= =?us-ascii?B?UT09?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2257; 6:mfy74HwB3RyrF+aDtI4dZu+JkXHeyelbb4REvMWX/yMTI9yNq2uOKiiGrKX77mj9CgZCeAmFkGgZHZxQ8hcLvopjtuUjIG20NHH8OCErWVWSnRhjuQc5DVBnacnrECb32IL4dawIAH4alvRmCim06EmoMRTZZ1mpk9BgOsYjA8PdtItT80ZWNI0/stQrZUf0/0awF85rEtKka65mWeuN6+AYSQ6SVaZg++OXj0rQhgmK8axlMdL2cgeoB6U8gvmGeLLg5+fLWgJbmiwSuIEGzNlideMl/KvOP4sXjbLMfXA7iWWlhH1KNM37WGzgN+vcEk070wFKqBXg+9Mt5oDiqf0hxXUecyJYiLFka8L27fDMul05bgcTpmUAt9zauji5L8MGZEg5KV5bONCNkQpqAtF7D8j1OKs35VOg188s3e0=; 5:JvTIY6yHejPajuVNibikHsGVLald4vaQJaP58l7yPpHD4neeKL6RJpaRLgHjLOTOla9cNonqp3cH9Nb9ERedEZP60aI4YFr5v5oKldwc3SY65KHyeccIuum01Nuf8ijWuGhzW2JaE46gNp1e91vcwdg5sfEiqsP+d4v2IHzvRqvNmp/NU+7luQxuU/bf2lTp; 24:wksDCcsXEarDQHSs+6EIc9e2jqyG5HJqj1P2IvNLAQBmOVoq50uL22amD511swI+N3ipLgIqO09ReodNQvkWVJN46eMVJvQCP7LouRebPBw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2257; 7:iTuKb9I0bm1wXWt2O/PcBaz5vuS1neL7hl/RMWz637CT6cA+xpTEsx1kB6MS4ngil9L6qEuPGIxfB7jylyWDRAfEEmYsC31sKR+yQNM6Iq5aZkHX02FUG2Ri6P2N94XKadJJRFgMv4VI5njkDeyj4qh3gjb/Kk4+z5xytInhgsoz4sKJhmOqPbOsfvFq/dGJi5/ugf8t0x+ujEJKz1FRYl91hQHUFDhKI2THuKr7YBNAYUNUyupez5x5D9d0AHmMO/J1KHn5pAGaPbaDXmPBn1Nvy772sUp7eQxhqcQVlRha4fowH6vanmqXl5ahTP2PXqkrCA31u6DX/VdqZh3+hQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 21:58:38.9244 (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: BN3PR03MB2257 Subject: [dpdk-dev] [PATCH v6 02/13] crypto/dpaa2_sec: add dpaa2 sec poll mode driver 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, 24 Mar 2017 21:58:41 -0000 From: Akhil Goyal Signed-off-by: Hemant Agrawal Signed-off-by: Akhil Goyal --- config/common_base | 8 + config/defconfig_arm64-dpaa2-linuxapp-gcc | 12 ++ drivers/bus/Makefile | 4 + drivers/bus/fslmc/Makefile | 4 + drivers/crypto/Makefile | 1 + drivers/crypto/dpaa2_sec/Makefile | 80 ++++++++ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 194 ++++++++++++++++++ drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h | 70 +++++++ drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 225 +++++++++++++++++++++ .../crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map | 4 + drivers/mempool/Makefile | 4 + drivers/mempool/dpaa2/Makefile | 4 + mk/rte.app.mk | 5 + 13 files changed, 615 insertions(+) create mode 100644 drivers/crypto/dpaa2_sec/Makefile create mode 100644 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c create mode 100644 drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h create mode 100644 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h create mode 100644 drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map diff --git a/config/common_base b/config/common_base index 4c3674e..93d860f 100644 --- a/config/common_base +++ b/config/common_base @@ -470,6 +470,14 @@ CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER_DEBUG=n CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y # +#Compile NXP DPAA2 crypto sec driver for CAAM HW +# +CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX=n + +# # Compile librte_ring # CONFIG_RTE_LIBRTE_RING=y diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc index 6b3f3cc..1c4cc8c 100644 --- a/config/defconfig_arm64-dpaa2-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc @@ -65,3 +65,15 @@ CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n + +#Compile NXP DPAA2 crypto sec driver for CAAM HW +CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=y +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX=n + +# +# Number of sessions to create in the session memory pool +# on a single DPAA2 SEC device. +# +CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048 diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index 70fbe79..5cfa184 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -35,6 +35,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_PMD),y) CONFIG_RTE_LIBRTE_FSLMC_BUS = $(CONFIG_RTE_LIBRTE_DPAA2_PMD) endif +ifneq ($(CONFIG_RTE_LIBRTE_FSLMC_BUS),y) +CONFIG_RTE_LIBRTE_FSLMC_BUS = $(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) +endif + DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/bus/fslmc/Makefile b/drivers/bus/fslmc/Makefile index 564d663..2dea6ee 100644 --- a/drivers/bus/fslmc/Makefile +++ b/drivers/bus/fslmc/Makefile @@ -40,6 +40,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_PMD),y) CONFIG_RTE_LIBRTE_FSLMC_BUS = $(CONFIG_RTE_LIBRTE_DPAA2_PMD) endif +ifneq ($(CONFIG_RTE_LIBRTE_FSLMC_BUS),y) +CONFIG_RTE_LIBRTE_FSLMC_BUS = $(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) +endif + ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT),y) CFLAGS += -O0 -g CFLAGS += "-Wno-error" diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile index a5a246b..0a3fd37 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile @@ -41,5 +41,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += snow3g DIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += kasumi DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += zuc DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null +DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += dpaa2_sec include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile new file mode 100644 index 0000000..7429401 --- /dev/null +++ b/drivers/crypto/dpaa2_sec/Makefile @@ -0,0 +1,80 @@ +# BSD LICENSE +# +# Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. +# Copyright (c) 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 Freescale Semiconductor, Inc 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 + +# +# library name +# +LIB = librte_pmd_dpaa2_sec.a + +# build flags +ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT),y) +CFLAGS += -O0 -g +CFLAGS += "-Wno-error" +else +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +endif +CFLAGS += -D _GNU_SOURCE + +CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/ +CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/ +CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/qbman/include +CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/mc +CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/portal +CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa2/ +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal + +# versioning export map +EXPORT_MAP := rte_pmd_dpaa2_sec_version.map + +# library version +LIBABIVER := 1 + +# external library include paths +CFLAGS += -Iinclude +#LDLIBS += -lcrypto + +# library source files +SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += dpaa2_sec_dpseci.c + +# library dependencies +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += lib/librte_eal +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += lib/librte_mempool lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += lib/librte_cryptodev +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += drivers/bus/fslmc +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += drivers/mempool/dpaa2 + +LDLIBS += -lrte_bus_fslmc +LDLIBS += -lrte_mempool_dpaa2 + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c new file mode 100644 index 0000000..378df4a --- /dev/null +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -0,0 +1,194 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. + * Copyright (c) 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 Freescale Semiconductor, Inc 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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dpaa2_sec_priv.h" +#include "dpaa2_sec_logs.h" + +#define FSL_VENDOR_ID 0x1957 +#define FSL_DEVICE_ID 0x410 +#define FSL_SUBSYSTEM_SEC 1 +#define FSL_MC_DPSECI_DEVID 3 + +static int +dpaa2_sec_uninit(__attribute__((unused)) + const struct rte_cryptodev_driver *crypto_drv, + struct rte_cryptodev *dev) +{ + if (dev->data->name == NULL) + return -EINVAL; + + PMD_INIT_LOG(INFO, "Closing DPAA2_SEC device %s on numa socket %u\n", + dev->data->name, rte_socket_id()); + + return 0; +} + +static int +dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) +{ + struct dpaa2_sec_dev_private *internals; + struct rte_device *dev = cryptodev->device; + struct rte_dpaa2_device *dpaa2_dev; + + PMD_INIT_FUNC_TRACE(); + dpaa2_dev = container_of(dev, struct rte_dpaa2_device, device); + if (dpaa2_dev == NULL) { + PMD_INIT_LOG(ERR, "dpaa2_device not found\n"); + return -1; + } + + cryptodev->dev_type = RTE_CRYPTODEV_DPAA2_SEC_PMD; + + cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | + RTE_CRYPTODEV_FF_HW_ACCELERATED | + RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING; + + internals = cryptodev->data->dev_private; + internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS; + + /* + * For secondary processes, we don't initialise any further as primary + * has already done this work. Only check we don't need a different + * RX function + */ + if (rte_eal_process_type() != RTE_PROC_PRIMARY) { + PMD_INIT_LOG(DEBUG, "Device already init by primary process"); + return 0; + } + + PMD_INIT_LOG(DEBUG, "driver %s: created\n", cryptodev->data->name); + return 0; +} + +static int +cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv, + struct rte_dpaa2_device *dpaa2_dev) +{ + struct rte_cryptodev *cryptodev; + char cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN]; + + int retval; + + sprintf(cryptodev_name, "dpsec-%d", dpaa2_dev->object_id); + + cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id()); + if (cryptodev == NULL) + return -ENOMEM; + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + cryptodev->data->dev_private = rte_zmalloc_socket( + "cryptodev private structure", + sizeof(struct dpaa2_sec_dev_private), + RTE_CACHE_LINE_SIZE, + rte_socket_id()); + + if (cryptodev->data->dev_private == NULL) + rte_panic("Cannot allocate memzone for private " + "device data"); + } + + dpaa2_dev->cryptodev = cryptodev; + cryptodev->device = &dpaa2_dev->device; + cryptodev->driver = (struct rte_cryptodev_driver *)dpaa2_drv; + + /* init user callbacks */ + TAILQ_INIT(&(cryptodev->link_intr_cbs)); + + /* Invoke PMD device initialization function */ + retval = dpaa2_sec_dev_init(cryptodev); + if (retval == 0) + return 0; + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + rte_free(cryptodev->data->dev_private); + + cryptodev->attached = RTE_CRYPTODEV_DETACHED; + + return -ENXIO; +} + +static int +cryptodev_dpaa2_sec_remove(struct rte_dpaa2_device *dpaa2_dev) +{ + struct rte_cryptodev *cryptodev; + int ret; + + cryptodev = dpaa2_dev->cryptodev; + if (cryptodev == NULL) + return -ENODEV; + + ret = dpaa2_sec_uninit(NULL, cryptodev); + if (ret) + return ret; + + /* free crypto device */ + rte_cryptodev_pmd_release_device(cryptodev); + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + rte_free(cryptodev->data->dev_private); + + cryptodev->device = NULL; + cryptodev->driver = NULL; + cryptodev->data = NULL; + + return 0; +} + +static struct rte_dpaa2_driver rte_dpaa2_sec_driver = { + .drv_type = DPAA2_MC_DPSECI_DEVID, + .driver = { + .name = "DPAA2 SEC PMD" + }, + .probe = cryptodev_dpaa2_sec_probe, + .remove = cryptodev_dpaa2_sec_remove, +}; + +RTE_PMD_REGISTER_DPAA2(dpaa2_sec_pmd, rte_dpaa2_sec_driver); diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h new file mode 100644 index 0000000..03d4c70 --- /dev/null +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h @@ -0,0 +1,70 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. + * Copyright (c) 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 Freescale Semiconductor, Inc 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 _DPAA2_SEC_LOGS_H_ +#define _DPAA2_SEC_LOGS_H_ + +#define PMD_INIT_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) + +#ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT +#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") +#else +#define PMD_INIT_FUNC_TRACE() do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA2_SEC_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_DPAA2_SEC_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_DPAA2_SEC_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 /* _DPAA2_SEC_LOGS_H_ */ diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h new file mode 100644 index 0000000..6ecfb01 --- /dev/null +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h @@ -0,0 +1,225 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. + * Copyright (c) 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 Freescale Semiconductor, Inc 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_DPAA2_SEC_PMD_PRIVATE_H_ +#define _RTE_DPAA2_SEC_PMD_PRIVATE_H_ + +/** private data structure for each DPAA2_SEC device */ +struct dpaa2_sec_dev_private { + void *mc_portal; /**< MC Portal for configuring this device */ + void *hw; /**< Hardware handle for this device.Used by NADK framework */ + int32_t hw_id; /**< An unique ID of this device instance */ + int32_t vfio_fd; /**< File descriptor received via VFIO */ + uint16_t token; /**< Token required by DPxxx objects */ + unsigned int max_nb_queue_pairs; + /**< Max number of queue pairs supported by device */ + unsigned int max_nb_sessions; + /**< Max number of sessions supported by device */ +}; + +struct dpaa2_sec_qp { + struct dpaa2_queue rx_vq; + struct dpaa2_queue tx_vq; +}; + +static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { + { /* MD5 HMAC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_MD5_HMAC, + .block_size = 64, + .key_size = { + .min = 64, + .max = 64, + .increment = 0 + }, + .digest_size = { + .min = 16, + .max = 16, + .increment = 0 + }, + .aad_size = { 0 } + }, } + }, } + }, + { /* SHA1 HMAC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_SHA1_HMAC, + .block_size = 64, + .key_size = { + .min = 64, + .max = 64, + .increment = 0 + }, + .digest_size = { + .min = 20, + .max = 20, + .increment = 0 + }, + .aad_size = { 0 } + }, } + }, } + }, + { /* SHA224 HMAC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_SHA224_HMAC, + .block_size = 64, + .key_size = { + .min = 64, + .max = 64, + .increment = 0 + }, + .digest_size = { + .min = 28, + .max = 28, + .increment = 0 + }, + .aad_size = { 0 } + }, } + }, } + }, + { /* SHA256 HMAC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_SHA256_HMAC, + .block_size = 64, + .key_size = { + .min = 64, + .max = 64, + .increment = 0 + }, + .digest_size = { + .min = 32, + .max = 32, + .increment = 0 + }, + .aad_size = { 0 } + }, } + }, } + }, + { /* SHA384 HMAC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_SHA384_HMAC, + .block_size = 128, + .key_size = { + .min = 128, + .max = 128, + .increment = 0 + }, + .digest_size = { + .min = 48, + .max = 48, + .increment = 0 + }, + .aad_size = { 0 } + }, } + }, } + }, + { /* SHA512 HMAC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_SHA512_HMAC, + .block_size = 128, + .key_size = { + .min = 128, + .max = 128, + .increment = 0 + }, + .digest_size = { + .min = 64, + .max = 64, + .increment = 0 + }, + .aad_size = { 0 } + }, } + }, } + }, + { /* AES CBC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_AES_CBC, + .block_size = 16, + .key_size = { + .min = 16, + .max = 32, + .increment = 8 + }, + .iv_size = { + .min = 16, + .max = 16, + .increment = 0 + } + }, } + }, } + }, + { /* 3DES CBC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_3DES_CBC, + .block_size = 8, + .key_size = { + .min = 16, + .max = 24, + .increment = 8 + }, + .iv_size = { + .min = 8, + .max = 8, + .increment = 0 + } + }, } + }, } + }, + + RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() +}; +#endif /* _RTE_DPAA2_SEC_PMD_PRIVATE_H_ */ diff --git a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map new file mode 100644 index 0000000..8591cc0 --- /dev/null +++ b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map @@ -0,0 +1,4 @@ +DPDK_17.05 { + + local: *; +}; diff --git a/drivers/mempool/Makefile b/drivers/mempool/Makefile index fb19049..ba67f96 100644 --- a/drivers/mempool/Makefile +++ b/drivers/mempool/Makefile @@ -35,6 +35,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_PMD),y) CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL = $(CONFIG_RTE_LIBRTE_DPAA2_PMD) endif +ifneq ($(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL),y) +CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL = $(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) +endif + DIRS-$(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL) += dpaa2 include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/mempool/dpaa2/Makefile b/drivers/mempool/dpaa2/Makefile index cc5f068..6fef6fe 100644 --- a/drivers/mempool/dpaa2/Makefile +++ b/drivers/mempool/dpaa2/Makefile @@ -40,6 +40,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_PMD),y) CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL = $(CONFIG_RTE_LIBRTE_DPAA2_PMD) endif +ifneq ($(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL),y) +CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL = $(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) +endif + ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT),y) CFLAGS += -O0 -g CFLAGS += "-Wno-error" diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 79320e6..da5211e 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -149,6 +149,11 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += -L$(LIBSSO_ZUC_PATH)/build -lsso _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += -lrte_pmd_armv8 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += -L$(ARMV8_CRYPTO_LIB_PATH) -larmv8_crypto _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += -lrte_pmd_crypto_scheduler +ifeq ($(CONFIG_RTE_LIBRTE_FSLMC_BUS),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += -lrte_pmd_dpaa2_sec +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += -lrte_mempool_dpaa2 +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += -lrte_bus_fslmc +endif # CONFIG_RTE_LIBRTE_FSLMC_BUS endif # CONFIG_RTE_LIBRTE_CRYPTODEV ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_PMD),y) -- 2.9.3