From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0050.outbound.protection.outlook.com [104.47.32.50]) by dpdk.org (Postfix) with ESMTP id 6EB7C1B3AE for ; Sun, 15 Oct 2017 00:21:06 +0200 (CEST) Received: from BN6PR03CA0008.namprd03.prod.outlook.com (10.168.230.146) by MWHPR03MB2703.namprd03.prod.outlook.com (10.168.207.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:21:04 +0000 Received: from BY2FFO11OLC007.protection.gbl (2a01:111:f400:7c0c::115) by BN6PR03CA0008.outlook.office365.com (2603:10b6:404:23::18) 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:21:04 +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 BY2FFO11OLC007.mail.protection.outlook.com (10.1.14.254) 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:21:03 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9EMKCMQ018714; Sat, 14 Oct 2017 15:20:57 -0700 From: Akhil Goyal To: CC: , , , , , , , , , , , , Date: Sun, 15 Oct 2017 03:47:29 +0530 Message-ID: <20171014221734.15511-8-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171014221734.15511-1-akhil.goyal@nxp.com> References: <20171006181151.4758-1-akhil.goyal@nxp.com> <20171014221734.15511-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131524932642441720; (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)(39380400002)(346002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(4326008)(316002)(68736007)(8656003)(54906003)(33646002)(2950100002)(85426001)(104016004)(6666003)(5003940100001)(7416002)(50226002)(189998001)(5660300001)(50466002)(86362001)(48376002)(53936002)(6916009)(16586007)(2351001)(81166006)(76176999)(81156014)(498600001)(106466001)(97736004)(8676002)(47776003)(105606002)(305945005)(1076002)(36756003)(8936002)(50986999)(77096006)(69596002)(2906002)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2703; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC007; 1:ydheSW+oSkPWli4g1F42wUNBh3NAJZylvoA+Z6bSlYUZN4q44ogqGj6pdiv6whYSNEqeSQYkZZzlgGJQ6irBNxfn1k3K2TM/kl7LkmxLJ3lw+53LdIHO+5LF0t1wW3Ge MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e3740a6-a186-4f07-f984-08d51351db9c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:MWHPR03MB2703; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2703; 3:1vfz3P5uieG8wIQe1cJ0v1cVb065XehXI48jj/gguV2frV34NrmYygd/x6BXGFtlXU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r/WzBIf6zTSz3g1+SW4yWYj04LEaR1jax0g59/1XCRl0oGUDOcO2V7MrUzKyeLJkfaxZ3UrCTAXxs7dvmLjKArW5065U7J8k8oQLIqAAcS+FndgTKrxXmGjMh8jvp8BqOvN+OkTbbg8uIxMP7h5os5r76Sdv1x/RqiX7Zlmo= 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)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(20161123565025)(20161123561025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2703; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2703; X-Forefront-PRVS: 046060344D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2703; 23:0EEiT2Xx4tlU9W+L33ojqDwx87k237pGfKst+BL+u?= =?us-ascii?Q?coH9YCMKtN29Gyn2acnUGa/WPQBQhjY2c+dQFy+d+MAxy0ye1+wrqVSGAGmQ?= =?us-ascii?Q?OrVAs99oPC1nIOX5nWHpInrOtbASvKksK12OxO0PYjJ5owkT6cmmGJW4Bap1?= =?us-ascii?Q?2vBvWpmgRqOTyH5BZnvZ2f+ERYQOJqRnWDGdfQMKmr8/lxTh97iFrKr3s1Uu?= =?us-ascii?Q?Pw1gveK9bF1muWMd0vDmtX77em7Sq4GEOaT7WG0JVXrPLXaSKdlRVDs4ORBJ?= =?us-ascii?Q?Puvo98/AjA7DPKm1WImEOzsQmN3J43pXPmS1aNT7eJv5Meki626IwH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W/fORr3FE6Vn/JgQirYn9PUQFCXIH+vSg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2703; 6:BE5d9Mrlu4ZG976AcqikGt0DBzXGjJD8BC7TGteHJ4axhZF4N3kihUlcTn8galCRZ1YnAhsA03+0TAw2RQjAm89KZSbResirMhZ874s7vFarX5jbf4G340gC53TbsrRT1l0hnWtFNbKms2Eef3SevYb9L09QxNg+o67lqRxmw/f9R7Sl1iXobTOd+vHBpbB9VuaK4pzqLiNIsiWi27y8tvepqwXiCLSw99WdEPUFnCeEah9KPotoCedEOUgms7aoh8kewPVex95Bb6rCBJ2dfVfH0B4o7zSHsa67pDXQduOe5mxSoMcyjvTUAXvx9LGVXtp80JsJUlPd3ThKdVF9NA==; 5:8V0vypTnBL6hzstd55Oevr8B+qF6uowWaYL0Hub8+fStV1bloGFzIwGS9pILjYsxQbC7jpECWBTClMkjJwAmC9x9jxVS6ghWz3u1MaCNCFFHGocmaZUtkZr5ZEpHd1Qel1Xd6PEZZT24roJFwYs0Hg==; 24:7C9nTB1UPYwwfWEPaiBEDF21ldv+cvmSmMEYttKPZBYROGLQpPFBTHrNbaCNPu27n1+5eoQZ8J6EIBiyplhQbsKUF67ZD0lJNT3D8eXeMRY=; 7:rEOI1uHD5ocyfWaIQALL1FV+FApFhyB5C/p+CvrlWN/gPInScN/EdQpOkGaw+M33zvcG81+BLshIlAyxwD8bVAW10wzbWFQaLwHQhCSVVkaFs7G1xxZ6XrhTK1fbJlYUJklj07a81SgS3n51XNDeymwgQmPbiIlFpqzIiSJeG8OtUHCzIylb/5jvo4O8H30TMCYnIygIn94PaD2TgXNhtDpODZtRzPD2YB5R4TB5ckI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2017 22:21:03.9321 (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: MWHPR03MB2703 Subject: [dpdk-dev] [PATCH v4 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: Sat, 14 Oct 2017 22:21:07 -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 7c89089..39f66c2 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -993,6 +993,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 }; /** @@ -1086,6 +1093,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