From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0056.outbound.protection.outlook.com [104.47.40.56]) by dpdk.org (Postfix) with ESMTP id 83194532E for ; Mon, 10 Apr 2017 14:31:29 +0200 (CEST) Received: from BN6PR03CA0009.namprd03.prod.outlook.com (10.168.230.147) by BLUPR03MB277.namprd03.prod.outlook.com (10.255.213.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Mon, 10 Apr 2017 12:31:27 +0000 Received: from BL2FFO11FD010.protection.gbl (2a01:111:f400:7c09::183) by BN6PR03CA0009.outlook.office365.com (2603:10b6:404:23::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17 via Frontend Transport; Mon, 10 Apr 2017 12:31:27 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD010.mail.protection.outlook.com (10.173.161.16) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1019.14 via Frontend Transport; Mon, 10 Apr 2017 12:31:26 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v3ACVCIN014402; Mon, 10 Apr 2017 05:31:20 -0700 From: To: CC: , , , , , , Akhil Goyal Date: Mon, 10 Apr 2017 18:00:57 +0530 Message-ID: <20170410123108.26305-3-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170410123108.26305-1-akhil.goyal@nxp.com> References: <20170324215754.21751-1-akhil.goyal@nxp.com> <20170410123108.26305-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131363010869502529; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39850400002)(39400400002)(39380400002)(39860400002)(39840400002)(39450400003)(39410400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(2876002)(104016004)(5003940100001)(76176999)(69596002)(50226002)(1076002)(8676002)(36756003)(8936002)(110136004)(189998001)(81156014)(81166006)(4326008)(2906002)(47776003)(38730400002)(50986999)(305945005)(8656002)(85426001)(6666003)(2950100002)(5890100001)(6916009)(53936002)(5660300001)(2351001)(48376002)(106466001)(33646002)(50466002)(356003)(105606002)(86362001)(575784001)(86152003)(54906002)(77096006); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB277; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD010; 1:yNRQ2bQWChzGEmIVtLDPwOijm3HQolJKUyqGliVnZlFEjn5w+4hMlKiNhXbGO1u9L04AcP08s6gs7H5ifgKrJtz+HQYPLXeYHKHRvcX/zKHwfNBIgXfiDvoZC74hJCmVL6uUKV1dRzWzLjDxCbfYr/FR7IaSk0AFe3ROSyjVcCbdkYMmW78P1xytyvfABIzKEnQNm9UI1tTwnJpBNBxDs9aq1Qa0qxSKLBZiUvFB0zEI54ox9h81u52uyeYm0cKguGbGWmSnMYTsMxbx6N32wxZiydJjnrcVWN6LM+Z8iN78eMW1ZNWzA9NM4zEHZRnkjbYgWKRd2G/CvnGAdk9Q9fL5r8FEtGq5LrvQzufeo2yre2w2b6FO2dn6RGvLk0L7PhXo/gSrCJFT2sd/VMoXwlrdNj4yBc/8VnKQ2tJgjoH+lx80SSgovYmVtdb58LGrG3j9Zd5XDRRe7u4L6rnrHyAFseWcmHzXMTb+9D81aP+wooKVsEoG25l71dz+RoePWRLoCRJ4Ws6qa71GzOkZBei9n0C5pj4h48SyKELoNoCvysmPnBxpV/0ltxv1e7RJQebjc21Z076lRpt2gpbpSSucdwerg+I9V5y2EV1nPzKMrbjGnxgToSgJ2LLz2FWy0DTK55ylPSUHC7d9RDC2RTyjqqBKH9sTUJ6JZoKkcUIIgNl3efaEcgpEwNBWOnilyb7548Tzp87X8zmCgA3fK1vUwzVHMgYG8A4B5nrR/5M4i//sb0raIKPaGI7gZkt0WPI/swMZZXbInhJTBgBhjg== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: af869a48-80bd-4e36-a241-08d4800d81f7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BLUPR03MB277; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 3:5jn/cATzxUxNKnLaDIpLuawANEnUJXkJDuvDU29lGM+yzstdTm0+TzxoQ9uGDfCXpkF0zN1rKUoFulrDcuwQoG1yP8KmB+i50Jm/lEcSd6BLVizRoF9PO+MHWFJg/EPeJGTW2V9NT1D4IW2jXeRErSSgpRR1msE3P9ZDrX5D4zJLC4DdjxzPTKruPKN9It6TZD0WsyswidW2gCJVHIwE30smgIHWsLT1pcXPJGr+9QRskV7vk/kn36cUn2x2aGkKhkjyjletfn2YN8mNfFOyhtPykAl/End5jzjPMX7EJi/bD9sTO+WnMXlOjO8elTuvmkaYOQRe5tNttE+eiYH2D3Yv315+uH6vdkX5HnR/6DsAvlMtEDKXZgSYK8DFeyhauQx+DdqPTuhI2bvr9aK9L8olY4BEELcjJ+LWzjd2OSphFJxwytl72+F7bWB9Gwal; 25:iOLMNF+/HYY7Nby6Y4ewSE5Ck07uuZeFCD11L9dpnucQ7T0t4c247CAn5JRwT7iWkgiMLBnR5H55Yd5mHxk21493sbeCgXI4F6jP7/r2L+Wf9FKjQTi/zCzko08w1f7cWCX5RucWL/6edCWINfJdRLXDewFfzfc83x9JGbnbaT7NntG4xsv0xEvT5VWHJMgcvdxmQuKjl+Rypw8gl/iXW6M6Vw+cFej2jJWdXl9lMoC2ttNTh4+4btGYLQOs2ft34ddDcjTFqEvwk/pfuzpGQjCjsLAUc4fBPsIUG3vebE60Jb14C09APmsz6XVOPZKMJ+Lh/4hevkHPvlHMsZXv5EVM06po6Do2M11w8DqucvtSBKRLfM/CiD0Y6/vX4IHNMiKVh5frvZrVyZubQ8/lM5Ait58o4uLV9mm+pdeuMNkHROjdxJ9zxQvZHCBGWj7VynqEHOq2ormsVOBc8vtbfQ== X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 31:YmHtg2toL7MUGlYHL0rfkolQN4NI2pMadvm7r+OKSVXT03Y5R2sYGr82IZsFm9ZJ6q6b02bQCkc4YonQVyjW5r0GgTX5Ph+oyZYgv7FOEAXTibydN0ilypkHdOYJilRTnCli2ZO5+pVfklKl5k1wZ3nYF/HQEKy9UkTQubsO0rW0ZDi37PA86RPufIQ5k0NkUMizWq+/GpOEkHuQB8HU4PG8llGZ2pt8yZpBS2SNgcsDY5KGPwdNsDIb1Ep2r9hHvxW8aJwOkPlmrIp2+FoCAOAzKuSM3VFIXQEkm5xEdU0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13017025)(13018025)(13024025)(13023025)(8121501046)(13015025)(5005006)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703161259075)(20161123556025)(20161123565025)(20161123563025); SRVR:BLUPR03MB277; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB277; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 4:8l35WCvlDI6fP8YcdIdkpkmKxur+jADS1C5V6QZ8PKiGBKWwLuop69/C35nME69IzKIEId2blwUEKninsgtQ07MyO2IgDCZU1jBG/XGjCpcP3jRt6KNHMrIcFucRYvYl+MgsP1/R1UpSXXUrVRrTw4Z3f2zY8qrT6mDVmoRYV07W8UKcQWQPr3S/9iuLuPKer+0S2hD+LZy8I5pdT0Gb/3/XkgCprIDCfdi7BraU4peP+jvOd7tN/iGjl/f4NeyndhrmHn3iwElOqWe47iSKzA+HpMwunaWsRJztN294mlHU0XGvVGPsxM8Lda25cp1+hR9Cj5CeTl9Fh6D+v4ILSicVA4/mp006CtUSue51onHOeSuhSmY34UuOEmdTUi4nKSzI7qjdQYKqm6XJUb+lLHEPlbMmlZPVdDOzDJa4OQsIqNfexUicXhRIG1/OaJAzMhcbSuexGtHndk3tKq0I/scA1i3nW2j0+Nog36XsnSujfTaHpNpmIWEbQmUiJSuwIgPWdCE2hASdlLU27fKjhTnx+5Z+XXGw5QedjACBEmkQL7Ei6bv0+JCXBsPX4ffmm4hkIuPlxZ7uQt1BfvXQF6QNlEi/mUnMf8cq1O218V/Ayz31upQKVKCyNB7SXhJYOEVtFnGfnkjmysnD0PEzh066YDxKLMgr2NPjziPBklgxHbHHsb8eZ6r8s2zDyvgYeFJhVL1286ia0+FJIj6v9TNDJT/Jq11RUnDhILu0Ir68vuiuMyYi3mUJii+feRG5QYx9wCqWk6C8hyQXw16gj/JDB7hsdUI+rca7QUVPSrzTwlhG53uhiV4d8wf4Yjtc1z40b81CIJAxIba8/j2OuQrPELb4mmEahb0SU1twOdhHBn3JiR+2Q64hCTVVbxrCWcbJOh2uY7suJlqstLIeceGzy73Nc8hYtyCvLXWPEfo= X-Forefront-PRVS: 027367F73D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB277; 23:aB0JzJkx05kQoxfNJmTbLU6JPDQ1uVUqoj9FB4VDMG?= =?us-ascii?Q?kssiG6FDynGSlh0x7xKQbY2V6zc0bpat2f42BiKZn1xpO6r+4SHul5Xy1cy2?= =?us-ascii?Q?/XSmoAsTdgYq2IjrsY92sIZh8NiTZr87ETujUNSNVGmTr9YHPnVYdWaoQGn8?= =?us-ascii?Q?k8cLzvyKMUjF3Tto9iiVdNh1DI4hBPwIlqyeNJCjtY9qH7ifhJtlEpG6c+4f?= =?us-ascii?Q?4laTG2gMWKNrW+BVZJJzWJXK84lX4Lw37rcyZS9st6Qyz3cFU+3AjF/khcgl?= =?us-ascii?Q?svzGlHKj7auxY0CC/S33G7Vyryb0vKxei+lgELpkgbEgibumTm/tqtyAIoa0?= =?us-ascii?Q?FGFtTrpOj2qZi+f4M0gmsj/kxnGbxV73E83xKviwLAXNtIqdLxe6OfFgSLuG?= =?us-ascii?Q?0Ny59F6L2p+NzLKi4cFvYcxyjQo31uO3MtuysfTCEEn7fVzszcAjwGgmYUO1?= =?us-ascii?Q?wG2RIFlt+QReg1hMkL19m8prDuYTQR19KSXpQBo1hEln2mZeI0kJ1h/348LA?= =?us-ascii?Q?PT6YzMRr2FDkRdVfzBjNV7MUkVYZUF2uANHStDhbdzWelYS9Pm3VJOlI63Vp?= =?us-ascii?Q?TqCspo30cQU5cgXRfq8hGbdOuYyT7LJaarwUsuSoC2KJCjQs9Oc0WEV1Jjdc?= =?us-ascii?Q?abfY2kdhCH4TXrMU50ckgo9SwXTITGcSKO6vnUEV1pWIhHOpO0ILi+XcVVco?= =?us-ascii?Q?Gu11/YE+xjwNnOW2CutKxJuGrIxOPwHYfAHsBWg4T8VIBBSX7wdak2fOpvEB?= =?us-ascii?Q?QljRltVsRIUysTOKooRGEECfLZMgVnO5gmwZpKJotnbde2UcKHGttAFJ0YRt?= =?us-ascii?Q?seuOkOpzmD4IOjL0XSdgljxlyQ7hVdBU0DPVQ0p6PlJnaJyip4CXAOQ6NEfn?= =?us-ascii?Q?Hlqqpv1JAXfvYp4IEyg5/R5FD99adguWJ75r2L0q2A8gRBsuNEefFnFDBJ1u?= =?us-ascii?Q?m1quvyP8mO7Z+973kIK8vU8uSwwauyi2ZfIDrYUAcBw5DY2cCCBVSqkXsWxu?= =?us-ascii?Q?+Th/ZJeF47d4ULr8TLAXnYVNvyQsex/Uw2zmdHT6LDPCvYNrymk2y3lRAl3r?= =?us-ascii?Q?cslvQ/biphOQYv5ZTPdDcRVYiMuSkkiYZyh7r+IGCJGMMCE7drII91hrohJ0?= =?us-ascii?Q?aywtmLv6ppjbjw6Av1u0Dk2Ohw3vGCFRv+3d2vjbNXSYw0nXwYgmcqPukbA7?= =?us-ascii?Q?2OojirsvItGbpgf/ROfD0r0/TJEIYnmfyxHQ5RKlmV4Z5DnZqtGcnA2uz7Te?= =?us-ascii?Q?Wv/kVEDM3cpivP4d2Aap1q4sgPsHvlS/yvfqB59pPdNW0j4v2oVBTB664hR7?= =?us-ascii?Q?tf2S9G5/VxRbQw3cDBGYiV02j8h5x5f36J/pprCX8Nmk/WuAuwIDcSSSAhIo?= =?us-ascii?Q?AGexEGkQCZNuZtC0hk9YofwFs=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 6:qcJd0XN5v7wTYhqqC/aYbTRccPQ5XKsE9dY7PoXP3YrMo/eHZSPB6joBmO0LazbrA70xbAq3+T250OdxkOLOXy8bP2iM1OvToMt2Rhy8bIc3R9Iai9eMwswUclBWIzR/62XOi06tkEPTo52HHcG4qGFQIimppTYFN9otOmcmt9fN5oFuM7eTV1zN+0mSCnPC9eRR2mHQayOP4iQuMTnXYWoQszzLCy5bwJEe7iDaAWRr2Tg3kZaPZ69HgX9hjDkuiD7UpO5ay2QzbHcvI9wdVnrLi1KrkGZuzcZjio8EwloBIdKzEGTN4D/P6ZrfaZrahdwjcwqKyo5OqD4rM8ba+Lv+Oh0zcXTgU9DlxW9XhOW24rgPtxBo2gne5HIZQsYgMspH2bXZ8ExbHGebK/HmCW7QWt+3T/OcUJcHVKnw0UV5lTWGZj9H6ZodgPWQ6mK9Axu2wSKDaDiRpvek68kXeg==; 5:VTT4QwyCrTQOTZ1ehYi3gqoj1FmEEiaZboGgBV6FgMEhKPWjcxi/2tNQbZSZeSu80yLUaKprPXYusFGU0Y6LHFl2OY9AJtQ+VcROtJoESW0zbNVq8LtEfWGtUtzM6s9xp5BYi9hQ6areQ4bGteLhjeI6ToXBu/Zgmo1XqDEc7cD5gYbqmul8n1E0LhL8CaMm; 24:SNTVkNUjgRvRnEwSQ688Wt9Ocg+NAOjF8ilg/GBM6HCaw7Bie7cs31LTAXuyxMhk3P68Z8jS7NcPVcHgSXRVNYmC1WPAuDNLLHga5HmG7zA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 7:AMb4t/NmCPvx0gKb4LIdXKUVUBmtCZI1uv9cPpe+7jJScMJjkgluBBa3nLjxApWcz/lPDl7wCsc3p3AVAVDOLxJ2RlEF86fUDzXWWao8LQ7qF9u1v/nvYjeZHTFuS9RZmkPbQK1MtAeoId0dkO3cRrUVBrScyxxyCKdiMKHpNytKw6Uf4/NELe9QWELX0/rgUfj0AAoWag8jrKpRb0Ygs0I04g+b8Qxbtpw2HYPVSYHuYaxK6WWjaBsBT4F8RbO1tiupJFT9zN0sCNKAewoNzA+6NmgxAYVioRx6SSJUjHg+StMl2b3zSAj1rtoKIUhGAlwqrflue3bAPqBK9iVLVg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2017 12:31:26.7162 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB277 Subject: [dpdk-dev] [PATCH v7 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: Mon, 10 Apr 2017 12:31:30 -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/Makefile | 1 + drivers/bus/Makefile | 4 + drivers/bus/fslmc/Makefile | 4 + drivers/crypto/Makefile | 2 + 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 + 14 files changed, 617 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 c177201..54d99cc 100644 --- a/config/common_base +++ b/config/common_base @@ -514,6 +514,14 @@ CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n # +#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/Makefile b/drivers/Makefile index a7d0fc5..a04a01f 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -37,6 +37,7 @@ DEPDIRS-mempool := bus DIRS-y += net DEPDIRS-net := bus mempool DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto +DEPDIRS-crypto := mempool DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index d3a3768..3f59fd1 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -41,6 +41,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL),y) CONFIG_RTE_LIBRTE_FSLMC_BUS = $(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL) 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 DEPDIRS-fslmc = ${core-libs} diff --git a/drivers/bus/fslmc/Makefile b/drivers/bus/fslmc/Makefile index a9828ed..1151a21 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 652c554..7a719b9 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile @@ -53,5 +53,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += zuc DEPDIRS-zuc = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null DEPDIRS-null = $(core-libs) +DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += dpaa2_sec +DEPDIRS-dpaa2_sec = $(core-libs) 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 a51ef9a..23ff95c 100644 --- a/drivers/mempool/Makefile +++ b/drivers/mempool/Makefile @@ -37,6 +37,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 DEPDIRS-dpaa2 = $(core-libs) DIRS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING) += ring diff --git a/drivers/mempool/dpaa2/Makefile b/drivers/mempool/dpaa2/Makefile index 3af3ac8..6449f08 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 8f8189f..ee7001c 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -158,6 +158,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_EVENTDEV),y) -- 2.9.3