From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0040.outbound.protection.outlook.com [104.47.38.40]) by dpdk.org (Postfix) with ESMTP id 7B5EC1B18C for ; Thu, 21 Sep 2017 11:16:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=31ui3uI39nLr52mENfuQBcHQ1CgrXBzwnEePrqn90ck=; b=DOzKZODL96nDWegxaimmhkgEzAoYzdvy4OmAGKUiczmD3XcnWOmhFBtMUB5Fvf7MvicaEDfB/Aasrp7OXanenZHQkIp1w4D0KUmYiTBhx+G9DsPvtqcPZHHbzFVZ3Pfe/Vj1PNnug+BvOUW7oce80jEck7eRLFc+wmPwF13zRz8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Thu, 21 Sep 2017 09:16:22 +0000 Date: Thu, 21 Sep 2017 14:46:04 +0530 From: Jerin Jacob To: Akhil Goyal Cc: dev@dpdk.org, declan.doherty@intel.com, pablo.de.lara.guarch@intel.com, hemant.agrawal@nxp.com, radu.nicolau@intel.com, borisp@mellanox.com, aviadye@mellanox.com, thomas@monjalon.net, sandeep.malik@nxp.com Message-ID: <20170921091600.GA1567@jerin> References: <20170914082651.26232-1-akhil.goyal@nxp.com> <20170914082651.26232-8-akhil.goyal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170914082651.26232-8-akhil.goyal@nxp.com> User-Agent: Mutt/1.9.0 (2017-09-02) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0107.INDPRD01.PROD.OUTLOOK.COM (10.174.144.23) To BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a329d30-b71c-4c27-ccb2-08d500d16ebb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 3:hB191cw4AJ2NeevL3b1s3kewvNYXQnFkrhG0xAD0es+Px8DXXr0SE/0mTL94EwRPnJzhHSnPa/C6spNrO8n6hJKpcFRwMRMWq+7QZZ6RBwyy1Pk0ztUpjB8KTLBwJZpSTbjZwL/OCBHdkFOutAeGLUwbTxpyJ1D6W2wYeMIyUHhKPi1zqYGKqheIqPWqY1T/dfkN6CljgZlgmJycCQjaU6BgHSw5pOusH1GvjAv65DXxEB33O9Aq6t7VfoTWVHtx; 25:BcnPHYkynIoBxJPIp0gWX0F2+meVW4ydCzmSGeEFtoAVtFaFNohOVWbRfGi9hOwRwmqkCf1hvF+hsT7IJsDOk1gTiSvUSoAe/PqRtZ7iZPwoqmsw6Mar80GKaasZgm/iviNmGH8DWn+nRpL26Ndvc8zOgLvMwNHPNWLM7tnpvOniWSKHEah6lCOG96yqonBiflQUWrs2NM6s8Ke26mQu534IQaBWnWNbqoWDyrlsiNT6GHk4QV4hkzNHW06vIBtb38ml7GsnLReO6gjQt4/AADAMY6mPg5ckw6ll/Id46sdJTm0/hfuWwBJZscGd6mI4dRJw784cwb1wsyEp+LQaTA==; 31:3gwIb97NRx4VJ596fhG1qEwNQz110RHuL172/YUwhDXA8W9sGTTc31DVNkXbVNoKwXJvz7Cgwi3dtgpNEOgXtaZLga/ASeiBRCwh4T7MtltuQ0DhlyyqyWLzoZStOmi7d3+eMX3/KBpY6Z3Qre11Z5pQNQyCHfGOwPYq74/Sc7ZQLUjwKdfulnR2QVpdrHD5H7EYFRAak6ir227T5aB45ocFJE/5wXZMMD3r6iZAbR8= X-MS-TrafficTypeDiagnostic: BN3PR07MB2513: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 20:qfTYWTSDsUcrQptTkoF/FF4L4UWIeSpZMAjRaiind1aNRHtgEdYQU4hOQyhL64J6PEDbsTMRObOX1LExTTERr05OTlQjgD32V3yne+/B7Hzkg9pL71rwNARsHdz4VLrT8UuwDKPJTawQGTHiHPWE+ON5sLGcTIaKmRtsUYCMWyOTWd/YeuWsb1aA48R2Y35jtiC6xeaqLaLQ2iiXMk2+jBBWlEM4lRapFBKeAliaPwpsXdP1uykNj0u09G4P9L03oqJv6S86G1DTF5GBAAXpsdar9FTRx6z55dgGoxl2ZylAVSv5VdK3JdBfiSFuyhkq4Ii5CoEGwuiZeuBFsZU4vocZyCT1k4aWBwpjCxtyQpihGa2nXTEIN/Et+42RNuj0OhIEjwfVxJQpWJSe8quhejfEqhCmebDSu9tcVl9qj4qNQNdi08AQoCPfOPqCGQeMh00W+jlAAuSUk+0p0lhQjInPyp1GjRSR4a/YSC0gdT8OOg0hz5l+iqBwsCMlRfAC6qo31AlgEyd6JG5FCI588pGwWG/JaurAzshwa/Xx3EEUALQXscRZsEtOvUQKW0QqMBdkWHxhqoF055wI+zzSt9q9wclnBR1UUiwWmlRyPio= X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR07MB2513; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 4:Lw1mswaGa1mHdUM/mazWWG8CLWMVlQ9xfGGjzXQv6tin9dSTpbBwIBhlmPHhCO8vnuB1j7UR1+lFS+yCat7R13TOZpHVwVz6Fe4ZGE45cAOgWiIN1DP9Xl2F34mwTJMRF7He9mEYzhzhr+B+oYJl0rFoEShfHWvt00qllm7PEr+96A+LGwj8MfpBch64n+0GVVXQQQ2gcafkUhEF0h/T7WiP0Rl3zI4KznZ/BZd7dDo0At60PJP/vdD7ZnNMqDu1juK8QbqFb+ZX93Y05wIkiH0fKBRK7ZYqOfFD6Eigf4yreaOQXbEOgFlc++s1+Bol8e2uM5jB/XDsgyFi/MomTof+/tMiflvAF9xoqBl7cxqE8303Tpz0ANfPLdcMoGem X-Forefront-PRVS: 04371797A5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(13464003)(199003)(189002)(50986999)(76176999)(4326008)(54356999)(7736002)(68736007)(305945005)(53936002)(42882006)(6916009)(2950100002)(55016002)(9686003)(7416002)(5660300001)(106356001)(189998001)(105586002)(101416001)(81156014)(81166006)(8676002)(6246003)(8936002)(6496005)(23726003)(72206003)(478600001)(3846002)(6116002)(83506001)(50466002)(58126008)(316002)(16586007)(16526017)(6666003)(5009440100003)(33656002)(1076002)(66066001)(97736004)(33716001)(47776003)(25786009)(229853002)(8656003)(2906002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2513; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permit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QOS6DiophorQQ5TVaApPSPug==; 24:nLErYwH8wcTJIkGF9o9EZNumVNfPKNQI3LIkbcBpf2zb3Ri+2QxtBZhrQtzcVzu7iqqX7hld91eJzBDAawbse3iP1HiqdQZlgJzLp7Tm3kc=; 7:aTsj5GbqgFn0byx3vteacnHLs8l6UvKGlZMjnZwFjqwA/Bx/ja5ti1+v73tkfYcI0w4VlHOlMsrJg6HtiEPdpzksHU9mSVoE1SfwXkpxi+2kaluhpJC73vo6nxNuofApdmjpOJJCFNEok1w3kprQt5zFPna0IVYlWDmLHwrEoFitktgo0bfUwj9PBl5OjHqq1QChsYlvB5iZsdjObd8krDf8yklVVsM81SWX5qkpg+Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 09:16:22.1727 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2513 Subject: Re: [dpdk-dev] [PATCH 07/11] 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: Thu, 21 Sep 2017 09:16:28 -0000 -----Original Message----- > Date: Thu, 14 Sep 2017 13:56:47 +0530 > From: Akhil Goyal > To: dev@dpdk.org > CC: declan.doherty@intel.com, pablo.de.lara.guarch@intel.com, > hemant.agrawal@nxp.com, radu.nicolau@intel.com, borisp@mellanox.com, > aviadye@mellanox.com, thomas@monjalon.net, sandeep.malik@nxp.com, > jerin.jacob@caviumnetworks.com > Subject: [PATCH 07/11] ethdev: add rte flow action for crypto > X-Mailer: git-send-email 2.9.3 > > From: Boris Pismenny Hi Boris, > > 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 | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h > index ea08af6..dce92ca 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,29 @@ struct rte_flow_action_vf { > }; > > /** > + * RTE_FLOW_ACTION_TYPE_SECURITY > + * > + * Perform security action on define flow as specified by security session. > + * 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 We do HW CAMs at ingress side to specify the action like RTE_FLOW_ACTION_TYPE_SECURITY. But, egress side there is NO for HW CAM for RTE_FLOW_ACTION_TYPE_SECURITY(meaning flow to SA lookup). If I understand it correctly, Intel has the similar situation and that is the reason for adding rte_security_set_pkt_metadata() to fix up something in outbound or inbound. Is it a correct interpretation? Something like below in ipsec-gw application for RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL outbound case. 296,6 +296,11 @@ ipsec_enqueue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx, } break; case RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL: + /* Some ports require SA for inline IPsec */ + if (sa->port_needs_md) + rte_security_set_pkt_metadata( + sa->port_md_uid, + sa->sec_session, pkts[i], sa); break; > + * security session if the security session supports the definition of the > + * direction. > + * > + * Multiple flows can be configured to use the same security session. For > + * example if the security session specifies an egress IPsec SA, then multiple > + * flows can be specified to that SA. In the case of an ingress IPsec SA then > + * it is only valid to have a single flow to map to that 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 >