From patchwork Tue Oct 3 13:14:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 29542 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CBF51B3B8; Tue, 3 Oct 2017 15:17:26 +0200 (CEST) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0058.outbound.protection.outlook.com [104.47.32.58]) by dpdk.org (Postfix) with ESMTP id 10E531B3B8 for ; Tue, 3 Oct 2017 15:17:24 +0200 (CEST) Received: from DM5PR03CA0026.namprd03.prod.outlook.com (10.174.189.143) by BN3PR03MB2355.namprd03.prod.outlook.com (10.166.74.150) 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:17:23 +0000 Received: from BN1AFFO11FD013.protection.gbl (2a01:111:f400:7c10::197) by DM5PR03CA0026.outlook.office365.com (2603:10b6:4:3b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Tue, 3 Oct 2017 13:17:23 +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 BN1AFFO11FD013.mail.protection.outlook.com (10.58.52.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Tue, 3 Oct 2017 13:17:22 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v93DGfTI030592; Tue, 3 Oct 2017 06:17:17 -0700 From: Akhil Goyal To: CC: , , , , , , , , , , Date: Tue, 3 Oct 2017 18:44:08 +0530 Message-ID: <20171003131413.23846-8-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171003131413.23846-1-akhil.goyal@nxp.com> References: <20170914082651.26232-1-akhil.goyal@nxp.com> <20171003131413.23846-1-akhil.goyal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131515102430295213; (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)(39380400002)(346002)(39860400002)(376002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(104016004)(47776003)(69596002)(97736004)(50986999)(8936002)(85426001)(8676002)(76176999)(6666003)(81166006)(81156014)(356003)(2950100002)(1076002)(305945005)(6916009)(77096006)(189998001)(105606002)(2351001)(498600001)(50226002)(54906003)(36756003)(8656003)(86362001)(33646002)(106466001)(2906002)(68736007)(7416002)(4326008)(5660300001)(48376002)(5003940100001)(50466002)(316002)(53936002)(16586007); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2355; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD013; 1:83DY/6FrUIiNAWTe1YWXE6gCmSvIds0kA2aIgbr/6bMkL5I0cX4wVnqieQfjTBu4bbFPXK2iGtZTii4Y+fszZEmVcUGwZvwo4M0WvZLkz6JKqp4S3Qt5tfKQYR/+zqAc MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8de0fecc-d3f7-4bd2-934f-08d50a611569 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 3:D8TFRKd9NR7Pg3SEfw3OZBcPLSpH8Kao5oPaBO0Im9AxDBbSQKcohst3Jxij3OI8UtrsTp0idBacfkuaUBOP9rZbIVLYwYumu5ZEd5zVfdvUUbW+rHsQ2OLCMzwvo0GSzFILSuck12sQMWX1Lx3xxh+t7G1g/vUIavRa507aOgNoUxURsP6wxilohe4mlnAdSHEiHT54G5KqSKIyA5u3oSnuTz+d7nGu5hHnJVC+OKb5gKOytFsEahs9Lw/84t8znbO3QoWP+VHCzgxWAUl4ieB1EDkcNacPIp14ss0vnBnbAhwC9MVL868zfTNIXi1hYLek2kCeWKCboDyesRWgdA==; 25:MIoZj/kNrVc2PtaHW4E2RMxAXiOesvnDKHqA/p84ARKVHGjhzC74BmzrdP0a3sNyVoOVagOffGV9r+mmkhxgGB7GwP4X5tFhL+AEwbWBspN4yEQmeRp5pTxWyyHxDjG3TqPfWsAoZHxieWf/5iZidfvWp4GkdwYJ8NMDNqig5BE72vVuKtoVwK27d5VtI+TkB25ZyZZAz1S9hkaknaFuiU/iNTUDu/jinD0xkg4xmhKkBc9HQKo63JwqjizFY4NchUIN78lkLspbGMrkW/TlHHfPsxWwDyxC2n/sgLEsx1manRV/WRwL01Ot2suKh8411xt4rndzxfczZvl+8ub9yQ==; 31:zvlDBMFcy/EzJauMVGlQvVCvw5zr7TOKSd1t2wqCCK0QaRwF34uxautwOIT1bh2SOmyeBIzO4G+PpgxsKWOeByrX9acsxoUjbBh5ZGG8Ey6e1xmvg05OZxateNg5aLk0A3D06uTGrJBPfX9D+d0ekcbUmuFDL5iD5wddsF9Yt4fG5T9h+//yWkBJn10KJKtghOmE1KU8c/rIXpEUhr5867WNYu6FR8lWVTfKxHGNF2I= X-MS-TrafficTypeDiagnostic: BN3PR03MB2355: 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)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123561025)(20161123559100)(20161123563025)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR03MB2355; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 4:TtlsszUs+LBIDOkQAATEcZgsINJWmIqwwntXCowwBhC3oLC956DFxPhtQZw0kegyreB2lHB20f6+yc0y8OC2pRLD0SSxk/9pQM7FGRV/nhqOsxHnwFe5gPxN4sfOFpVaR8i6v5hHUmVaFMNZGkmYbPoyXVRJwAqFokH75DNYWGjsD/6tcqmRxpV0SMFEUK7K0pg0iuzcitPVS64PvzeOtVBYiGROf0eHm8vsp/UoOzYaJmQgXqMZAf1kHWLBWssHq0p6G2/C0qGlp8LqwIK3zEtZ/aQpjI3bmDssB15miKA= X-Forefront-PRVS: 044968D9E1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2355; 23:7KLlGmxLEdthZZf1L3HAqmI+/TDnxbetIyuN/qPCr?= N5pZUU0dNwW69Q1R0xq4jKAPP/X4TGllqKA2JvETFRuA0thHqFj+xGrX3vJxhSAL+nDDlCPtonC85hLLPwjdpo3hBaaxvJSGjhFQupBQQQJ4dx68ceUK/RP3Gfrlz/klJ2bf58/b6lzdFdx39NCPksiGQK8JR66aFjeYl17RXB3XX8CYPCwaK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P/isT0yiDYifdw5UCTy5J6JPetfSd3f7rjcaYMjwf5PtteMvzGtZzoA7D/2Q1bCEsmEO2HdhQ113C7knmFlRUrjT3nHghQjPl8DU/9VyrAA9Wx8e1rwWBOitnE/xsYGM8dr8N4SyFDXdcqaJQquKepYZypvdiTcJWeMbLbaxllVNSM7WF0HdvA4x0R9bdLjfdNWx/2oNN+y+Wq4UjE4ea971MxInaY12WM7a3/SXyy3UG/wEWcjSDL8ZPbNrNIfBoEJnTmOuPbt0i3d1A6lg1JB/dn0Dp0fNBhjbPhA/xW5ZJjEa2Iylex+O6fDw==; 5:bkyVyoA/pr1Qn+1awvyjAWBh2PUiphBwlF1TshXAj8ETcwh7/+MXSi2CkbMUD6fp9Qzw8e3L1gTJrQSTYLLTj8feNJX68hJdY1tx5cwJUubtOkWKuWcVOBPbj+Sq/QJjp2dhypKQMgXIZD9P50Vw1A==; 24:ka4GEU9bpyLLlz2iiSXjdQca9jC9SydD39WscVL6LThZVyVd1UBGZfAMhQnPk+8WywV+dK6YHOzROJXSMNdCHBFIP6HXaV553oc764nG3G0=; 7:52ym78bu+acRAfZHsmD5TfCBAmjQ74kDWvK26bu0gn+Ri2Qo9mbTQqVeI9NUurAHQLJZ0MYKZxRBBy1HpmxvGDOhdiASXft0iR3zXrKP+3054cxU1dBadfHdpo1ZOPAzm41rHECQa+3Xh83MQYwsKGvspP8Ba5PO5Fw9QxNAcYiIBFnla8n3acXhzStxQ4OPB5TeK14K1YUarLfb1VvrWVIlR1cz3Afr5H1dBhAbVjY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2017 13:17:22.7799 (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: BN3PR03MB2355 Subject: [dpdk-dev] [PATCH v2 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.