From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0080.outbound.protection.outlook.com [104.47.37.80]) by dpdk.org (Postfix) with ESMTP id 7D3E51B2FE for ; Sun, 15 Oct 2017 00:20:22 +0200 (CEST) Received: from BN3PR03CA0115.namprd03.prod.outlook.com (10.174.66.33) by DM5PR03MB2699.namprd03.prod.outlook.com (10.168.197.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sat, 14 Oct 2017 22:20:20 +0000 Received: from BL2FFO11FD054.protection.gbl (2a01:111:f400:7c09::169) by BN3PR03CA0115.outlook.office365.com (2603:10b6:400:4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Sat, 14 Oct 2017 22:20:20 +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 BL2FFO11FD054.mail.protection.outlook.com (10.173.161.182) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Sat, 14 Oct 2017 22:20:20 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9EMKCMJ018714; Sat, 14 Oct 2017 15:20:13 -0700 From: Akhil Goyal To: CC: , , , , , , , , , , , , Date: Sun, 15 Oct 2017 03:47:22 +0530 Message-ID: <20171014221734.15511-1-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171006181151.4758-1-akhil.goyal@nxp.com> References: <20171006181151.4758-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131524932205202261; (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)(376002)(39860400002)(346002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(6916009)(2950100002)(81156014)(54906003)(53936002)(2351001)(97736004)(966005)(4326008)(356003)(6666003)(85426001)(5660300001)(104016004)(7416002)(86362001)(106466001)(1076002)(77096006)(47776003)(498600001)(2906002)(10710500007)(53376002)(305945005)(15650500001)(8656003)(8936002)(105606002)(81166006)(69596002)(2420400007)(50226002)(316002)(33646002)(76176999)(50986999)(8676002)(48376002)(189998001)(7110500001)(68736007)(6306002)(5003940100001)(16586007)(50466002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2699; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD054; 1:U6dXhPRnv7YpJZK/1XaXBt/olLIFH8AdKuZkgwnA9MxPYszZCxHtzQhSGe6Nzqu6KsHb6baIrynMT59at2fh7rarwpPYAEd74T32CZiRHepzJn8PJulNAKrd3DM05qZy MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 35d23b23-d70b-4f32-0897-08d51351c1a5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:DM5PR03MB2699; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 3:Qbx1ySzOBTbhIoyhqPH0GzM8St8dvceLH80JVnBHgK7A97xdO2IqIKuiUFP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1I2t2SiaDV0KZgvPXUEXPn3En/PHNnkIqWXCTwwUVWC4Lr4K2oEiPpSSFPkHAkKf8eqQlPRDswfW8ATLTQdoQSdTXeKGRfesnWbd4lceXMfcGWh9wOfx98wlMuwmozJtRTIbURa4WYfQJjjhbNBIS6ipW/az18vvS4lcw9GM9VL7xMo= 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)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(20161123563025)(20161123556025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2699; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2699; X-Forefront-PRVS: 046060344D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2699; 23:EkAc7TCxPVFq/kPxdFxL8StZCTW5j7Wj2I+LwfvdL?= =?us-ascii?Q?augllFWcx04/Gk7qd1RkkDycO6de9FUX3xuoO+DdSsiChjB8e98gHQ+ft77W?= =?us-ascii?Q?smVIilUDWnCZf1FHFLmsjp48FLzJcI5+DOPMeWXHPQUyrBvVsNUgreqKDvz+?= =?us-ascii?Q?QivAtWVi9Pyex0vQBZsoVda5M4Zb2RMu8tBpd2KrAIAyS7pxi/i46q18yNlV?= =?us-ascii?Q?JVKV8o6gc+KdkmDrBPGVP1/N+e0gaJ25nyT0WIkzKhuLQgr3pjb9JoVbUzXf?= =?us-ascii?Q?k4MEFaygz7dtwcqpOA5vfwwlqfY3cZkStue6ID9Q0IQR/8gF6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aLSblFlUnqAPFRoZ6KiS/bH6LI957Sjf+mPBM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2017 22:20:20.2550 (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: DM5PR03MB2699 Subject: [dpdk-dev] [PATCH v4 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: Sat, 14 Oct 2017 22:20:23 -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_v4 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 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 *** BLURB HERE *** 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 (4): net: add ESP header to generic flow steering 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: support security APIs Radu Nicolau (1): net/ixgbe: enable inline ipsec MAINTAINERS | 6 + config/common_base | 6 + doc/api/doxy-api-index.md | 6 +- 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 | 559 +++++++++++++++++++ doc/guides/sample_app_ug/ipsec_secgw.rst | 52 +- drivers/crypto/Makefile | 2 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 420 +++++++++++++- drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 62 +++ drivers/net/Makefile | 2 +- drivers/net/ixgbe/Makefile | 2 +- drivers/net/ixgbe/base/ixgbe_osdep.h | 8 + drivers/net/ixgbe/ixgbe_ethdev.c | 19 + drivers/net/ixgbe/ixgbe_ethdev.h | 6 +- drivers/net/ixgbe/ixgbe_flow.c | 47 ++ drivers/net/ixgbe/ixgbe_ipsec.c | 744 +++++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_ipsec.h | 147 +++++ drivers/net/ixgbe/ixgbe_rxtx.c | 53 +- drivers/net/ixgbe/ixgbe_rxtx.h | 11 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 50 +- 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 | 7 + lib/librte_cryptodev/rte_cryptodev_version.map | 1 + lib/librte_ether/rte_ethdev.c | 11 + lib/librte_ether/rte_ethdev.h | 18 +- lib/librte_ether/rte_ethdev_version.map | 1 + lib/librte_ether/rte_flow.h | 64 +++ 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 | 535 ++++++++++++++++++ lib/librte_security/rte_security_driver.h | 155 ++++++ lib/librte_security/rte_security_version.map | 13 + mk/rte.app.mk | 1 + 52 files changed, 3893 insertions(+), 166 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