From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0064.outbound.protection.outlook.com [104.47.33.64]) by dpdk.org (Postfix) with ESMTP id 3E2A81B814 for ; Tue, 24 Oct 2017 16:18:40 +0200 (CEST) Received: from CY4PR03CA0078.namprd03.prod.outlook.com (10.171.242.147) by BN6PR03MB2689.namprd03.prod.outlook.com (10.173.144.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 24 Oct 2017 14:18:39 +0000 Received: from BY2FFO11OLC008.protection.gbl (2a01:111:f400:7c0c::152) by CY4PR03CA0078.outlook.office365.com (2603:10b6:910:4d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.178.6 via Frontend Transport; Tue, 24 Oct 2017 14:18:38 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.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 BY2FFO11OLC008.mail.protection.outlook.com (10.1.14.255) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.156.4 via Frontend Transport; Tue, 24 Oct 2017 14:18: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 v9OEIVHS029613; Tue, 24 Oct 2017 07:18:32 -0700 From: Akhil Goyal To: CC: , , , , , , , , , , , , Date: Tue, 24 Oct 2017 19:45:34 +0530 Message-ID: <20171024141545.30837-1-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171014221734.15511-1-akhil.goyal@nxp.com> References: <20171014221734.15511-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131533283183290798; (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)(39860400002)(376002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(53936002)(1076002)(15650500001)(316002)(2420400007)(6306002)(53376002)(50986999)(4326008)(106466001)(2351001)(68736007)(76176999)(105606002)(2906002)(97736004)(50226002)(47776003)(104016004)(10710500007)(6916009)(2950100002)(85426001)(54906003)(5003940100001)(81166006)(33646002)(7416002)(81156014)(8676002)(8936002)(356003)(86362001)(8656005)(5660300001)(36756003)(16586007)(966005)(48376002)(305945005)(50466002)(8656005)(189998001)(7110500001)(498600001)(77096006); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2689; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC008; 1:dWZtVU0BYqB4aiKkPG3DoFTO9iMBJPYdgDY9XdUBrl6GvPGEvZDq2Q+x5APKaA/dRPs5zJJmVF885Ii+S0Yb+C7RujJiofGv8OWnJH4bqRn+5mQMGMx38bUAvbCVnHCR MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7a4d4eb6-826c-41b7-8851-08d51aea1ebc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:BN6PR03MB2689; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2689; 3:SPR3KE6KymXAM4Yga/HcCDC24B5O2HUhSKdBDc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NHQPv8dKoHu8HsyMkVoNw/LDs9jNobZEdjKwzxmZPsIpMzvPpDXjUizU/1+CklbDgCx25fRq8f2PbEPBYq9s0qVmVHvkUHVcFQGPjMEYr5seeGf1VXgVlYlt8f/nmGLWW+VfHSv+Jjvkg+iFl+F/9Rdtr70Yjb5rUlAGnzKJj1SGIDTBDuH9s5krVCXKmKq2Y8ZWHa7nnmtuTbuzDn1eKc1R/EE= X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3231020)(3002001)(6055026)(6096035)(20161123561025)(20161123565025)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123556025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2689; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2689; X-Forefront-PRVS: 047001DADA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2689; 23:X01QRtn+GsjxzVMROeGaT0ebnsh5QiA9T9AS/vkKy?= =?us-ascii?Q?iXzItc+Eq8N/SNVPkoMVeaBN01MPrIHeFBpwIFFsw97vVrXN4LXkWHxN3MPA?= =?us-ascii?Q?CCO+qcJNBNoDjDLZ/48dLegbBU29Hnvm+zzoRm370ihu/MjWHa6Ff6mnX2YC?= =?us-ascii?Q?4CL6bPHNxpF8nDBPSmCPRghwia4Snddx8aN2vuHtW+b/huo05oObpJQsKMod?= =?us-ascii?Q?xRVkoWhO801yzDplIDMB+ttHCf1Yom6q4X7RMeaAa5jHsVYfR1tAME+e0Vjd?= =?us-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YV3Nj0B/tBuuGUeDLKYE5GIUsfzWv5uifIKBMpMAXo2fyNEwXn8kFaZyH4F4wcZSN82X3DSlc8f5GjOp1LaWqLY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2017 14:18:38.0794 (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: BN6PR03MB2689 Subject: [dpdk-dev] [PATCH v5 00/11] 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, 24 Oct 2017 14:18:40 -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_v5 changes in v5: 1. Incorporated comments from Shahaf, Konstantin and Thomas 2. Rebased over latest crypto-next tree(which is rebased over master) + Aviad's v3 of ipsec-secgw fixes. changes in v4: 1. Incorporated comments from Konstantin. 2. rebased over master 3. rebased over ipsec patches sent by Aviad http://dpdk.org/ml/archives/dev/2017-October/079192.html 4. resolved multi process limitation 5. minor updates in documentation and drivers changes in v3: 1. fixed compilation for FreeBSD 2. Incorporated comments from Pablo, John, Shahaf 3. Updated drivers for dpaa2_sec and ixgbe for some minor fixes 4. patch titles updated 5. fixed return type of rte_cryptodev_get_sec_id 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. anti-replay support 5. SA time out support 6. Support Multi process use case 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: 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 (3): net: add ESP header to generic flow steering mbuf: add security crypto flags and mbuf fields ethdev: add rte flow action for crypto Declan Doherty (1): ethdev: support security APIs Radu Nicolau (1): net/ixgbe: enable inline ipsec MAINTAINERS | 5 + config/common_base | 5 + doc/api/doxy-api-index.md | 2 + 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 | 84 ++- doc/guides/prog_guide/rte_security.rst | 564 +++++++++++++++++++ doc/guides/rel_notes/release_17_11.rst | 1 + doc/guides/sample_app_ug/ipsec_secgw.rst | 52 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 422 +++++++++++++- drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 62 +++ drivers/net/ixgbe/Makefile | 2 +- drivers/net/ixgbe/base/ixgbe_osdep.h | 8 + drivers/net/ixgbe/ixgbe_ethdev.c | 11 + drivers/net/ixgbe/ixgbe_ethdev.h | 6 +- drivers/net/ixgbe/ixgbe_flow.c | 47 ++ drivers/net/ixgbe/ixgbe_ipsec.c | 737 +++++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_ipsec.h | 151 +++++ drivers/net/ixgbe/ixgbe_rxtx.c | 59 +- drivers/net/ixgbe/ixgbe_rxtx.h | 11 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 57 ++ examples/ipsec-secgw/esp.c | 120 ++-- examples/ipsec-secgw/esp.h | 10 - examples/ipsec-secgw/ipsec-secgw.c | 5 + examples/ipsec-secgw/ipsec.c | 308 +++++++++-- 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 | 1 + lib/librte_ether/rte_ethdev.c | 7 + lib/librte_ether/rte_ethdev.h | 8 + lib/librte_ether/rte_ethdev_version.map | 1 + lib/librte_ether/rte_flow.h | 65 +++ lib/librte_mbuf/rte_mbuf.c | 6 + lib/librte_mbuf/rte_mbuf.h | 35 +- 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 | 149 +++++ lib/librte_security/rte_security.h | 528 ++++++++++++++++++ lib/librte_security/rte_security_driver.h | 155 ++++++ lib/librte_security/rte_security_version.map | 13 + mk/rte.app.mk | 1 + 51 files changed, 3882 insertions(+), 158 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