From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0087.outbound.protection.outlook.com [104.47.37.87]) by dpdk.org (Postfix) with ESMTP id F23F31B269 for ; Fri, 6 Oct 2017 20:15:14 +0200 (CEST) Received: from DM5PR03CA0053.namprd03.prod.outlook.com (10.174.189.170) by CY4PR03MB2694.namprd03.prod.outlook.com (10.173.43.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 6 Oct 2017 18:15:13 +0000 Received: from BL2FFO11FD019.protection.gbl (2a01:111:f400:7c09::139) by DM5PR03CA0053.outlook.office365.com (2603:10b6:4:3b::42) 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; Fri, 6 Oct 2017 18:15:13 +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 BL2FFO11FD019.mail.protection.outlook.com (10.173.161.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Fri, 6 Oct 2017 18:15:12 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v96IERof027297; Fri, 6 Oct 2017 11:15:07 -0700 From: Akhil Goyal To: CC: , , , , , , , , , , , , Date: Fri, 6 Oct 2017 23:41:46 +0530 Message-ID: <20171006181151.4758-8-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171006181151.4758-1-akhil.goyal@nxp.com> References: <20171003131413.23846-1-akhil.goyal@nxp.com> <20171006181151.4758-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131517873130901013; (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)(7966004)(346002)(39380400002)(376002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(189998001)(6666003)(33646002)(5003940100001)(2950100002)(6916009)(8656003)(97736004)(47776003)(50986999)(36756003)(50226002)(4326008)(86362001)(69596002)(8936002)(8676002)(305945005)(81156014)(316002)(81166006)(68736007)(5660300001)(105606002)(106466001)(48376002)(53936002)(1076002)(76176999)(50466002)(2906002)(7416002)(104016004)(54906003)(2351001)(85426001)(77096006)(16586007)(498600001)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2694; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD019; 1:x05QVlQdgcqRmgfK/9Ix50m7VkK6z88S7PNxxeN7Elt4kn9KvEkEKU0JC1/FbtOa3h87tSDWQxb4HRa/S3N6FGioAyg9V+AQoRpRBpWiqKsz4Mdd8C1zwWhLiooG2/sw MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d4b96b6-2dda-4a6e-acb4-08d50ce63009 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2694; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2694; 3:1u1zBbXVLiUft8CSC6MMQS1W3eRovBFJeZTyplCSnB2tyFtkIKfDdNdTAlmq4A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NOJxXhg1XglYk5tUhIdEtYbnRA/Nc5n4dI2yWRI2NTi4ORL27U35ngA1BK6eeae4mqlSz5DfvWFC49qR3QJoRcyINXR1TC83jnVRfwBT9jF2y8cTI6i2NiAPHRR+n/LDIn1TXpCGgG6kcS6Kc8P4+gxx0LzYFrQp5wE3Yj/kcKkHXa97Ck99lU= 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)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123559100)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123556025)(20161123561025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2694; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2694; X-Forefront-PRVS: 0452022BE1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2694; 23:s+16XCIrjlFOZ581rbCYhlIWSiff2AHBQ4V7dOduO?= =?us-ascii?Q?AAQiYkmW+xoBOwCZ2w+gZ84VbVpFMkebFnBtJPjev+g+Maspglq02S9O68Je?= =?us-ascii?Q?0r7KSUE19yyuXue8jlwjqH5OvacdW7e9TBj0Nwyljhs5eBuPyEzELrqGWqPi?= =?us-ascii?Q?t/UjlvyND7xne+n7gQ+IW1EVnraDwQZK78vS2Zo6PJB413WMOr2N517eTEqq?= =?us-ascii?Q?F+PrL5CSUVxO4S5U9GP6vlxgrQNL/jMxu6i/WTIBbFrKcZCnVlixtnpm0mNl?= =?us-ascii?Q?s1+02uDCXlX7zBaznEFRKHgRw3zz24AFTufHgcxmdnkEs8NACYmTEiZkCtTR?= =?us-ascii?Q?2bhhqRYT044XBL20BefPJPKukK1duw5D2Mu/xbixKVS5dXd26RCPh9lLqS4c?= =?us-ascii?Q?/4Indyhcfkemn4o8B03oGRDxOomqXcSlF/+thiIAIR2hcXkSnF17sOYW28vB?= =?us-ascii?Q?UfFXBKc2b2qM6lbdHGqj/d2QwOvh3+4QXOw8b/u2p4mOydlZSy/8DQqmhu5+?= =?us-ascii?Q?wIZopCwdHvRhwFC8r2QzstyG5osrMea7rWrl30Mx1BOMfUlgtc9dx4jk6xt4?= =?us-ascii?Q?YtpWYq2DcEWf0TSnchyic157YkRiM1SODoMrcLrdRlknIZ3qFTWd6HzNACFH?= =?us-ascii?Q?uOOx4B3UeRLqjRfYa2WPitRWQefnm+etORazqs9sEn6YPL9DmptIVIYsqm2n?= =?us-ascii?Q?itvq4nZ/JrlnrXHClLYpE32aITFL9LL/JiQI+JWwSEQxRt0l9OlznCND27ve?= =?us-ascii?Q?oScPBS2MOlRqNQIyNMcci04OGl4SH4xela4zY76do13SNq6i9B/QrhpSbZc4?= =?us-ascii?Q?kGZgGUkpQavY6n1rEymqtjd9SVEn0UHpRv3QTVfm7fDw22PNM0SMfJDx5Job?= =?us-ascii?Q?Yh90grQmFoUUIVLW6fY09mGCurFGpMGwfHEAJZJQ3FTqm2Y/951gvuGILXR2?= =?us-ascii?Q?B3Dgnyso2pkwWKJWg7J7ooM1aICmkwpP71FvBIS6aLET+hXK3jFDaSTMYLYh?= =?us-ascii?Q?H5cW9/6C6+XzdjhFziM4N64cNaLXiKUMXO3n5gTax6ilijfg4sVQywI4AeqI?= =?us-ascii?Q?A0TB3TOejFItebzL0DDieqXULJhMYzEzlyXuhskVfTroLKjLXj1LZQjqbcmM?= =?us-ascii?Q?QlqQ0E2YFuT/4IwRMqsu/0MNlg+c3OqWCx5ihYbqZsiGs+hxv9yI7JqY5tya?= =?us-ascii?Q?ugNaCvYtZun2qYCj9zhnoW44TQ9rDL4GwDgK4JiKBJ1r13jSd4HOera+Zjue?= =?us-ascii?Q?SwPUqZQVkBvXLwjpgk=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2694; 6:bmGHXRpzida3aRgvwdPb34n5Gn01WZenQ8ET7le78sB/udNVrG4mLDriLTqTgJg4D8Zrf7mR2lplYyuD/2He3YPb+Xmb1m4PCZ7CoOuXSlWVHLRDLQSdfPli5LPEMN33A9dq2j/jxr66EEWofkpxhDIgDUfg7mEs7BTCAYIHAJCc5v6AOLYHS7Np4v4h1Zogd1CVzhQ12NgvNwskwswM+31eNu+g2vsiqZXkZ6uHhRxLlVVVlazNW3tfG+cijf51jcjyfMt9v1vbopW0INk70Axi5zn9W6KICxMCpujiOkQvse+TDFs3V0UNeXvY+2G8UHyohWA6zrr9YH2M23XMYw==; 5:aMlg8bpEIptJDGLkcVODjO68oF0MfpP0ybl6p7qPmwQQGXCm5V9ltZ2GYX7oPWQmB7hw3B9dW1G/+J3nO5PZ1L3NYHFmSNXftU4x1yrEb1hVIXqQ5VpyOVwYLdNeA6u3uTdCz1LgQKXmYrsivgXIWA==; 24:8+2pXPOkuWd5o5IjKdsCnpwiBtuP79uMqSnFVR5yBEgvMefKb6TsboFuLNVjZ+qJKj7LlGzQ5tF2jkTWWo6wDukIIX8m4EaQdNd9nQZ1m5M=; 7:ACQtpPFq9d/gCDhXTIWau/a7tDERkZaOgwhStPvseIX8iLdTEUgGFAMI5d30Tyh1yHHhQZVRW1YEj02JISIzA7YlmCOYltg2aweAOquwLaSxgZjk11fibzGRLx/vz3LZhuioyDVMOhgVE9CKkxur1+0CT57UXehnbD/zC/FHzs1m4P6k8mgdS1Thkkgce/xscDw6OYcOHRvimRYHkzjPzOZZveFCPXX6HJ6GGLnMsZs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2017 18:15:12.8404 (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: CY4PR03MB2694 Subject: [dpdk-dev] [PATCH v3 07/12] ethdev: add rte flow action for crypto 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, 06 Oct 2017 18:15:15 -0000 From: Boris Pismenny The crypto action is specified by an application to request crypto offload for a flow. Signed-off-by: Boris Pismenny Signed-off-by: Aviad Yehezkel --- lib/librte_ether/rte_flow.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index ea08af6..48d4fca 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -941,6 +941,13 @@ enum rte_flow_action_type { * See struct rte_flow_action_vf. */ RTE_FLOW_ACTION_TYPE_VF, + /** + * Redirects packets to security engine of current device for security + * processing as specified by security session. + * + * See struct rte_flow_action_security. + */ + RTE_FLOW_ACTION_TYPE_SECURITY }; /** @@ -1034,6 +1041,37 @@ struct rte_flow_action_vf { }; /** + * RTE_FLOW_ACTION_TYPE_SECURITY + * + * Perform the security action on flows matched by the pattern items + * according to the configuration of the security session. + * + * This action modifies the payload of matched flows. For INLINE_CRYPTO, the + * security protocol headers and IV are fully provided by the application as + * specified in the flow pattern. The payload of matching packets is + * encrypted on egress, and decrypted and authenticated on ingress. + * For INLINE_PROTOCOL, the security protocol is fully offloaded to HW, + * providing full encapsulation and decapsulation of packets in security + * protocols. The flow pattern specifies both the outer security header fields + * and the inner packet fields. The security session specified in the action + * must match the pattern parameters. + * + * The security session specified in the action must be created on the same + * port as the flow action that is being specified. + * + * The ingress/egress flow attribute should match that specified in the + * security session if the security session supports the definition of the + * direction. + * + * Multiple flows can be configured to use the same security session. + * + * Non-terminating by default. + */ +struct rte_flow_action_security { + void *security_session; /**< Pointer to security session structure. */ +}; + +/** * Definition of a single action. * * A list of actions is terminated by a END action. -- 2.9.3