From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0069.outbound.protection.outlook.com [104.47.33.69]) by dpdk.org (Postfix) with ESMTP id 451441B37E for ; Tue, 3 Oct 2017 15:16:51 +0200 (CEST) Received: from BN6PR03CA0018.namprd03.prod.outlook.com (10.168.230.156) by DM5PR03MB2697.namprd03.prod.outlook.com (10.168.197.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 3 Oct 2017 13:16:49 +0000 Received: from BN1BFFO11FD011.protection.gbl (2a01:111:f400:7c10::1:114) by BN6PR03CA0018.outlook.office365.com (2603:10b6:404:23::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11 via Frontend Transport; Tue, 3 Oct 2017 13:16:49 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1BFFO11FD011.mail.protection.outlook.com (10.58.144.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.56.11 via Frontend Transport; Tue, 3 Oct 2017 13:16:49 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v93DGfTB030592; Tue, 3 Oct 2017 06:16:42 -0700 From: Akhil Goyal To: CC: , , , , , , , , , , Date: Tue, 3 Oct 2017 18:44:01 +0530 Message-ID: <20171003131413.23846-1-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170914082651.26232-1-akhil.goyal@nxp.com> References: <20170914082651.26232-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131515102098713570; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(7966004)(336005)(346002)(39380400002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(5003940100001)(5660300001)(6306002)(48376002)(2420400007)(15650500001)(36756003)(97736004)(498600001)(85426001)(1076002)(76176999)(104016004)(50466002)(966005)(86362001)(4326008)(16586007)(54906003)(50986999)(6916009)(305945005)(50226002)(2906002)(53376002)(316002)(6666003)(2950100002)(53936002)(10710500007)(68736007)(7110500001)(81156014)(8676002)(47776003)(81166006)(77096006)(7416002)(189998001)(8656003)(69596002)(8936002)(33646002)(106466001)(356003)(105606002)(2351001)(50929005)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2697; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD011; 1:cvL4th5sbRtNloTyN0AsWuB8nNO5KBEagVTAGikfHIye9FEqPZqUcNHYmHdLz9CwXTCH+UOnrupaERdfA/XG4M8y1SalsHEoA26MwD6CaVk4ZzzDqPNwQEapl9XGg4Vw MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95b4f280-7a56-4c44-0a81-08d50a6101a6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:DM5PR03MB2697; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2697; 3:NA66lYWMbgZ2S+YgM1aV26KT79EzSvJNquKmE8metUlYuglCDLJLObYQTaCLpFXitzRQpVk903jZakm1/AXtlULwFaxFOQQyKxtIaeo7+8JwJjU/t8e/t3B5X6A2jIJEw6PhyQ52BH9gmCS9OXLJcw8xHFzCc1KK7Adg+ibUPUoAZlRnZeDhSNJtS+CdLgd+wbLoUcwTIS1dh71e2PumInZThj0IzFKmDJWd5fWh0hswRcdIyi+1Qfhzu58FL0FoGLwP9xb25yBR5BHqDgNg07x6BJScLb3a/lopkGLeLc97Qa543gTIzKlecum12V9AWzDs2vir3RRTPdwWwbf+2Q==; 25:sMBpWwPXnFeC53uOQJMQZmVtrIQDfhrZ2ZtmSeIWNmaElfaJcSuv18amIvTxltTKsaEGm4Rqk3g50OOkS7Va00hQESkDjOskzmLs2CNdt3c9j76G+UGV0WlSqVg13W9NKpzbfd6h5zmgykMea4/++vat2y2wL/6JL+xvIo8JrjgFiC/yKRLCRz1v45fWI2Arw86oQw4f4m5ub8yUGwrCedUu7pGKbEqeVoHkH93btu7B4I9YjcBmi5bY9bjMTLkwCoteDEzTO1bTP0irrs2m6FA6yZ62zXm4XQcWeTg1/YcV7eDJslPZFBlVUF6wHzBoZmfDLzlsAhILcFXjRmcMhQ==; 31:o3taa+0MiwSbIB68iyRxhzilDPkhuQCclF1fwT4clxjZVBPs+VMoJ6ReDBkt1Hm0XEKEPdglXXAaCQ8Nt2Iv5HX9LezTGHf41UDGNZ4seuLXATg8PqvlCqdyUDLmC6UWzxHFIkUI1x/5sl/r98+6n2LuNIGIqYSJILr+tTB1TIwNIvfMpKIjRvAnmhfUbtOLk91NTf9SJIOqaJ1g4UeXlYh2SL3uydEtNiE2zrWPUAo= X-MS-TrafficTypeDiagnostic: DM5PR03MB2697: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(66839620246622); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(2002001)(6096035)(20161123561025)(20161123563025)(20161123559100)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123556025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2697; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2697; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2697; 4:DxSIVHdN+81ovrzi3FfL+hWAncVeyXfNBkMapsH5j5n6bimUzYLky+Hr0sGSTW5WuPg4bkeDHXuRCve9g4DKwANWdAl9TvvDgtYCF8yvC93an+LskEMbt1FAWqUF/MvMNEc3rMwKdRQiYdcS8UQ5vlVkn3nJYIsHi1vw6lXka+1SBGSD/VBcvQAD8E8RfhuP7mgS+plthSB0g1rT7IIRHSVnLUiEDTUXMoLaMgHhbu86EDmeoHu+X+Q03WbBRvmxvInN36DVbkYrLxvpiqDmC4MvDUWmvClvXjyFJGNU2NQE/Fxyo/kx1jGN1nqBfwuQ3RcInGgNWVaRfgvoy7/oYg== X-Forefront-PRVS: 044968D9E1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2697; 23:s6qkyE7dWjT7GC2yCyJ7yjzNwjHDgXOWf/nrD6PvD?= =?us-ascii?Q?q3Xf/JHIJDniMck++eR2OBg5wnxT7i55lO1F2AjzYfjuJNozlxOmEeTfSsUb?= =?us-ascii?Q?rmD1QLflYUoRVyL6V6HgkKMoZob224sOfQYA3Nnl9jRzmbJmiNCYLrAoa6vq?= =?us-ascii?Q?xhQkwdnOfCGx3xlTGpjJbkCRV5XNz+PJQ7clgeXreHZvLydCbx0xdJ66cCCJ?= =?us-ascii?Q?Y8ZYjK/P8wDJIf+Am6Q70vectrJKcL3T+xRB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EfajmhNm6emKDGmJ3xhWlpgO0vn7T36TbXH5Q1YURDtJH2ZbNvyk/cRe+K2nE9WLksU=; 7:desl+iyu44spVXZOEkO6KPbLNeH5TlYYtq37vRhYHwjJB73Jx9oVzTKnO1xbrmUeW9vb9Gx8hpqBceh6q+Av7pN3lOchzmjM5kSj4XJHf4d6oQFLEukB6jKqKASyMi2MivRIvVuT/Jcqyh2fUdFv27GaohjT2l/YivoaAwMzXFPsWYkLgNjgnDiotW57s1JGKjfnUhgrHueWkRaqFiQcB0HilBhEbQLyEmgSYiF7uzM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2017 13:16:49.5749 (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: DM5PR03MB2697 Subject: [dpdk-dev] [PATCH v2 00/12] introduce security offload library 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: Tue, 03 Oct 2017 13:16:51 -0000 This patchset introduce the rte_security library in DPDK. This also includes the sample implementation of drivers and changes in ipsec gateway application to demonstrate its usage. rte_security library is implemented on the idea proposed earlier [1],[2],[3] to support IPsec Inline and look aside crypto offload. Though the current focus is only on IPsec protocol, but the library is not limited to IPsec, it can be extended to other security protocols e.g. MACSEC, PDCP or DTLS. In this library, crypto/ethernet devices can register itself to the security library to support security offload. The library support 3 modes of operation 1. full protocol offload using crypto devices. (RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL) 2. inline ipsec using ethernet devices to perform crypto operations (RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) 3. full protocol offload using ethernet devices. (RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL) The details for each mode is documented in the patchset in doc/guides/prog_guide/rte_security.rst The modification in the application ipsec-secgw is also doocumented in doc/guides/sample_app_ug/ipsec_secgw.rst This patchset is also available at: git://dpdk.org/draft/dpdk-draft-ipsec branch: integration changes in v2: 1. update documentation for rte_flow. 2. fixed API to unregister device to security library. 3. incorporated most of the comments from Jerin. 4. updated rte_security documentation as per the review comments from John. 5. Certain application updates for some cases. 6. updated changes in mbuf as per the comments from Olivier. Future enhancements: 1. for full protocol offload - error handling and notification cases 2. add more security protocols 3. test application support 4. handling of multi process case. 5. anti-replay support 6. SA time out support Reference: [1] http://dpdk.org/ml/archives/dev/2017-July/070793.html [2] http://dpdk.org/ml/archives/dev/2017-July/071893.html [3] http://dpdk.org/ml/archives/dev/2017-August/072900.html Akhil Goyal (6): lib/rte_security: add security library doc: add details of rte security cryptodev: extend cryptodev to support security APIs mk: add rte security into build system crypto/dpaa2_sec: add support for protocol offload ipsec examples/ipsec-secgw: add support for security offload Boris Pismenny (4): lib/librte_net: add ESP header to generic flow steering lib/librte_mbuf: add security crypto flags and mbuf fields ethdev: add rte flow action for crypto doc: add details of rte_flow security actions Declan Doherty (1): ethdev: extend ethdev to support security APIs Radu Nicolau (1): net/ixgbe: enable inline ipsec MAINTAINERS | 6 + config/common_base | 7 + doc/api/doxy-api-index.md | 4 +- doc/api/doxy-api.conf | 1 + doc/guides/cryptodevs/features/default.ini | 1 + doc/guides/cryptodevs/features/dpaa2_sec.ini | 1 + doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/rte_flow.rst | 83 ++- doc/guides/prog_guide/rte_security.rst | 553 +++++++++++++++++++ doc/guides/sample_app_ug/ipsec_secgw.rst | 52 +- drivers/crypto/Makefile | 2 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 404 +++++++++++++- drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 62 +++ drivers/net/Makefile | 2 +- drivers/net/ixgbe/Makefile | 4 +- drivers/net/ixgbe/ixgbe_ethdev.c | 18 + drivers/net/ixgbe/ixgbe_ethdev.h | 10 +- drivers/net/ixgbe/ixgbe_flow.c | 46 ++ drivers/net/ixgbe/ixgbe_ipsec.c | 728 +++++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_ipsec.h | 147 +++++ drivers/net/ixgbe/ixgbe_rxtx.c | 63 ++- drivers/net/ixgbe/ixgbe_rxtx.h | 4 + drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 44 ++ examples/ipsec-secgw/esp.c | 102 ++-- examples/ipsec-secgw/esp.h | 10 - examples/ipsec-secgw/ipsec-secgw.c | 5 + examples/ipsec-secgw/ipsec.c | 279 ++++++++-- examples/ipsec-secgw/ipsec.h | 32 +- examples/ipsec-secgw/sa.c | 151 +++-- lib/Makefile | 5 + lib/librte_cryptodev/rte_crypto.h | 3 +- lib/librte_cryptodev/rte_crypto_sym.h | 2 + lib/librte_cryptodev/rte_cryptodev.c | 10 + lib/librte_cryptodev/rte_cryptodev.h | 8 +- lib/librte_cryptodev/rte_cryptodev_version.map | 7 + lib/librte_ether/rte_ethdev.c | 11 + lib/librte_ether/rte_ethdev.h | 19 +- lib/librte_ether/rte_ethdev_version.map | 7 + lib/librte_ether/rte_flow.h | 64 +++ lib/librte_mbuf/rte_mbuf.c | 6 + lib/librte_mbuf/rte_mbuf.h | 33 +- lib/librte_mbuf/rte_mbuf_ptype.c | 1 + lib/librte_mbuf/rte_mbuf_ptype.h | 11 + lib/librte_net/Makefile | 2 +- lib/librte_net/rte_esp.h | 60 ++ lib/librte_security/Makefile | 53 ++ lib/librte_security/rte_security.c | 275 ++++++++++ lib/librte_security/rte_security.h | 495 +++++++++++++++++ lib/librte_security/rte_security_driver.h | 182 +++++++ lib/librte_security/rte_security_version.map | 13 + mk/rte.app.mk | 1 + 51 files changed, 3933 insertions(+), 157 deletions(-) create mode 100644 doc/guides/prog_guide/rte_security.rst create mode 100644 drivers/net/ixgbe/ixgbe_ipsec.c create mode 100644 drivers/net/ixgbe/ixgbe_ipsec.h create mode 100644 lib/librte_net/rte_esp.h create mode 100644 lib/librte_security/Makefile create mode 100644 lib/librte_security/rte_security.c create mode 100644 lib/librte_security/rte_security.h create mode 100644 lib/librte_security/rte_security_driver.h create mode 100644 lib/librte_security/rte_security_version.map -- 2.9.3