From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10042.outbound.protection.outlook.com [40.107.1.42]) by dpdk.org (Postfix) with ESMTP id C724B1B10C for ; Mon, 1 Oct 2018 14:50:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ue4/ZZgTw7IUrXSEmrnxqaQKnqsTX+2vZTnUEBlw51U=; b=NSe8aNUcOVD45sVFLxCJJFfApyF34ZIN7CfbxNpFc4twGIkxunVAthAYehIEcPJ6/rnJgYndd6c6DxuU6HPICS1TUyjGmhUu4HwP9KGwGvWjy8Ntk0rAXFueEDyC5jbK0IRhpxHHfBbTR3rr9gVt3eZwnSL9hjYcmuKdSoZqQLE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.232.134.144] (14.143.30.134) by DB7PR04MB4889.eurprd04.prod.outlook.com (2603:10a6:10:18::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.22; Mon, 1 Oct 2018 12:50:03 +0000 To: "Ananyev, Konstantin" , Jerin Jacob , "Joseph, Anoob" Cc: "dev@dpdk.org" , "Awal, Mohammad Abdul" , "Doherty, Declan" , Narayana Prasad , Hemant Agrawal , "shreyansh.jain@nxp.com" References: <1535129598-27301-1-git-send-email-konstantin.ananyev@intel.com> <358d1b6c-26f2-b125-07a4-cfb1c0e2a57b@caviumnetworks.com> <2601191342CEEE43887BDE71AB977258EA95089D@irsmsx105.ger.corp.intel.com> <475cf471-b46a-671a-5485-0042c652430c@caviumnetworks.com> <2601191342CEEE43887BDE71AB977258EA954BAD@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258EA954E9D@irsmsx105.ger.corp.intel.com> <20180916105640.GA4803@jerin> <2601191342CEEE43887BDE71AB977258EA95724C@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258EA957E3A@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258EA95A705@irsmsx105.ger.corp.intel.com> <36e1d53b-4c31-1a92-c91f-7066f4358f79@nxp.com> <2601191342CEEE43887BDE71AB9772580102FDFF11@IRSMSX106.ger.corp.intel.com> From: Akhil Goyal Message-ID: <85566521-21e9-4e9e-e05d-3967c1662704@nxp.com> Date: Mon, 1 Oct 2018 18:19:26 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <2601191342CEEE43887BDE71AB9772580102FDFF11@IRSMSX106.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: MA1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::29) To DB7PR04MB4889.eurprd04.prod.outlook.com (2603:10a6:10:18::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 670d359b-7683-4d1a-f027-08d6279c6a3f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR04MB4889; X-Microsoft-Exchange-Diagnostics: 1; DB7PR04MB4889; 3:UdQUp3OFxnF1ApL4KjOd+XvA5H377Ks70JF1Ptbb6AvSx6K+WJ03l/T4N9zBKJFoF+f+RRoudmGB6bCw552D+Y94R27nPotWjZtkjPgDLnYyakJSMXRGV7+Z62ckIJk6wwR8gn0HY8p1lNgHYLvZp0Oa7/bv8JBq7WoB8Z0Z9PxmHCfvm4J6Jw0olka/D6TAcSHyqz8mhXSPvUlbxeQTiHDfUFgDJKOhosqh6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MCX2ogsaKVPqipsi1Fv0ZDSP3hLTSo7X7fAqOv3I7oyNaPVxiIAI252RFSM9Ke9sScDPVRtrYJlCoAqQAfi8ezdH7hl645xNXhy2iG61R9dU6Jp2AMwb//eYLeBt; 4:+BThrLfgJnMLMI9Szz4hOAqvNGKJH7ugQtgFV0TQ9mnvRolBv/qbiOg11j+SBlMGKVyA95rhez3btBbhsQjYLE0AX/e7AxI0yydFv2E6jVXbf7PDu3XRQQUV7cpZfv3ImzfsmN36MJVhPq6YoOjD2r+0P5L3H0V+rTaz6QKKr+0bopc6xNrQGeyPpwz5i3oRPBCABNyKFnfkzOyr9S7xQHJuPAJOavl6vpzf1hAGhXckloM/4p7U+wGc3iXsk5Cwq8cb4aT14tPWtp04xA5aPjfnMCwq5hRetU56ag+4vbLglTXUhJ6J+NJH5v9fCH3vrAPb9q0tBXPxiHlCfA9YmiXQbS2upgYw99Gv3R/rK5c= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(17755550239193); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:DB7PR04MB4889; BCL:0; PCL:0; RULEID:; SRVR:DB7PR04MB4889; X-Forefront-PRVS: 0812095267 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(39860400002)(366004)(396003)(346002)(136003)(376002)(199004)(189003)(57704003)(43544003)(52314003)(58126008)(5660300001)(7736002)(956004)(106356001)(64126003)(6246003)(6486002)(5009440100003)(486006)(47776003)(23676004)(52146003)(65826007)(2486003)(65806001)(86362001)(66066001)(65956001)(476003)(50466002)(77096007)(5024004)(53936002)(14444005)(3846002)(6116002)(31696002)(11346002)(105586002)(2616005)(4326008)(97736004)(2906002)(446003)(6666003)(305945005)(26005)(16526019)(93886005)(67846002)(16576012)(316002)(478600001)(36756003)(31686004)(110136005)(54906003)(53546011)(2870700001)(386003)(81166006)(81156014)(44832011)(8936002)(68736007)(52116002)(34290500001)(25786009)(229853002)(3260700006)(8676002)(76176011)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB4889; H:[10.232.134.144]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjdQUjA0TUI0ODg5OzIzOlZIOFE0Yk52ZFZFZ2tyVnkxWmFKQmZOY2Rh?= =?utf-8?B?aHhOZ2lFZVp4U0ZBbEt6NkQ5bm5HT0tJNTd5dzJLdUtMVlhtY3o5azhaZXJk?= =?utf-8?B?MUdubGljSHJoQ0NsMi9EQjFSZjkxanpVL0wrTmNyK0xpV1NPWWlpczRZdzFM?= =?utf-8?B?NUd0QmdmOXRTSCs2aUk4RS90U3dYYnJhcFpYd3JONjQzSk1VcVQ5ZUxpbXor?= =?utf-8?B?cGJhQWxrQzNUNjRRTjMxbzdYaFdBb0VEUUVwTVE2QmNLU1FsS1BucmRJeFQ3?= =?utf-8?B?aEhqSllIbGtLd2E5NVFkbVpFdi9CbkpheCtlR2VFNjdLcEZHSFg3d1c3S3hH?= =?utf-8?B?TUJMSm55YWdtMUsyYmtRZVBXNDFXa29tVXFuQmJGcjRXS0hycm1vbEJkR3cz?= =?utf-8?B?S1dDMzZEZlo4MFNSMGpsRmI5dkhZc0ZMOElLQ2p4MThCc3lEOG5FdFEvbm04?= =?utf-8?B?R09iVWhJTWg1R0p5L3BWYXozaU5YNlUwTVJiOFptTmZpT0xLRVVlUnpCdDZo?= =?utf-8?B?cVF0cGNQMDU4MlM3SG9oU3g0MlpiYUFpT01PN1U4c0J5RFlz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2zNuUXOiYW+7ZkJqpgts/Ge9BDFm9PwbQoimIDlZnBQByDZ0S97BE0cZqF9YD5KnHav65qUx2u/5HyuGqacs/xLEkkgn9Ga00FlL9YKzPvgITSWT+ClGdQNUQApt9hgDl9rzTusbeVqbQNkYxJ/+oKr749oBM2GY22m SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2018 12:50:03.3584 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 670d359b-7683-4d1a-f027-08d6279c6a3f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4889 Subject: Re: [dpdk-dev] [RFC] ipsec: new library for IPsec data-path processing 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: Mon, 01 Oct 2018 12:50:09 -0000 Hi Konstantin, On 10/1/2018 2:30 AM, Ananyev, Konstantin wrote: > > Hi Akhil, > >> Hi Konstantin, >> >> On 9/24/2018 4:21 PM, Ananyev, Konstantin wrote: >>> Hi Akhil, >>> >>>> Hi Konstantin, >>>> >>>> On 9/18/2018 6:12 PM, Ananyev, Konstantin wrote: >>>>>>> I am not saying this should be the ONLY way to do as it does not work >>>>>>> very well with non NPU/FPGA class of SoC. >>>>>>> >>>>>>> So how about making the proposed IPSec library as plugin/driver to >>>>>>> rte_security. >>>>>> As I mentioned above, I don't think that pushing whole IPSec data-path into rte_security >>>>>> is the best possible approach. >>>>>> Though I probably understand your concern: >>>>>> In RFC code we always do whole prepare/process in SW (attach/remove ESP headers/trailers, so paddings etc.), >>>>>> i.e. right now only device types: RTE_SECURITY_ACTION_TYPE_NONE and RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO are >> covered. >>>>>> Though there are devices where most of prepare/process can be done in HW >>>>>> (RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL/RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL), >>>>>> plus in future could be devices where prepare/process would be split between HW/SW in a custom way. >>>>>> Is that so? >>>>>> To address that issue I suppose we can do: >>>>>> 1. Add support for RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL and RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL >>>>>> security devices into ipsec. >>>>>> We planned to do it anyway, just don't have it done yet. >>>>>> 2. For custom case - introduce RTE_SECURITY_ACTION_TYPE_INLINE_CUSTOM and >>>> RTE_SECURITY_ACTION_TYPE_LOOKASIDE_CUSTOM >>>>>> and add into rte_security_ops new functions: >>>>>> uint16_t lookaside_prepare(struct rte_security_session *sess, struct rte_mbuf *mb[], struct struct rte_crypto_op *cop[], uint16_t >>>> num); >>>>>> uint16_t lookaside_process(struct rte_security_session *sess, struct rte_mbuf *mb[], struct struct rte_crypto_op *cop[], uint16_t >>>> num); >>>>>> uint16_t inline_process(struct rte_security_session *sess, struct rte_mbuf *mb[], struct struct rte_crypto_op *cop[], uint16_t >> num); >>>>>> So for custom HW, PMD can overwrite normal prepare/process behavior. >>>>>> >>>>> Actually after another thought: >>>>> My previous assumption (probably wrong one) was that for both >>>>> RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL and RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL >>>>> devices can do whole data-path ipsec processing totally in HW - no need for any SW support (except init/config). >>>>> Now looking at dpaa and dpaa2 devices (the only ones that supports RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL right now) >>>>> I am not so sure about that - looks like some SW help might be needed for replay window updates, etc. >>>>> Hemant, Shreyansh - can you guys confirm what is expected from RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL devices >>>>> (HW/SW roses/responsibilities)? >>>>> About RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL - I didn't find any driver inside DPDK source tree that does support that >>>> capability. >>>>> So my question is there any devices/drivers that do support it? >>>>> If so, where could source code could be found, and what are HW/SW roles/responsibilities for that type of devices? >>>>> Konstantin >>>>> >>>>> >>>> In case of LOOKASIDE, the protocol errors like antireplay and sequence >>>> number overflow shall be the responsibility of either PMD or the HW. >>>> It should notify the application that the error has occurred and >>>> application need to decide what it needs to decide next. >>> Ok, thanks for clarification. >>> Just to confirm - do we have a defined way for it right now in rte_security? >> As of now, there are no macros defined for antireplay/seq. no. overflow >> errors in crypto errors(rte_crypto_op_status), but it will be added soon. >> For inline cases, ipsec-secgw application gets error notification via >> rte_eth_event. > Ok. > > >>>> As Jerin said in other email, the roles/responsibility of the PMD in >>>> case of inline proto and lookaside case, nothing much is required from >>>> the application to do any processing for ipsec. >>>> >>>> As per my understanding, the proposed RFC is to make the application >>>> code cleaner for  the protocol processing. >>> Yes, unified data-path API is definitely one of the main goals. >>> >>>> 1. For inline proto and lookaside there won't be any change in the data >>>> path. The main changes would be in the control path. >>> Yes, from your and Jerin description data-path processing looks >>> really lightweight for these cases. >>> For control path - there is no much change, user would have to call >>> rte_ipsec_sa_init() to start using given SA. >>> >>>> 2. But in case of inline crypto and RTE_SECURITY_ACTION_TYPE_NONE, the >>>> protocol processing will be done in the library and there would be >>>> changes in both control and data path. >>> Yes. >>> >>>> As the rte_security currently provide generic APIs for control path only >>>> and we may have it expanded for protocol specific datapath processing. >>>> So for the application, working with inline crypto/ inline proto would >>>> be quite similar and it won't need to do some extra processing for >>>> inline crypto. >>>> Same will be the case for RTE_SECURITY_ACTION_TYPE_NONE and lookaside. >>>> >>>> We may have the protocol specific APIs reside inside the rte_security >>>> and we can use either the crypto/net PMD underneath it. >>> As I understand, you suggest instead of introducing new library, >>> introduce similar data-path functions inside rte_security. >>> Probably something like: >>> >>> uint16_t rte_security_process(struct rte_security_session *s, struct rte_mbuf *mb[], uint16_t num); >>> uint16_t rte_security_crypto_prepare(struct rte_ipsec_sa *sa, struct rte_mbuf *mb[], >>> struct rte_crypto_op *cop[], uint16_t num); >>> ... >>> Is that correct? >> "rte_security_process_ipsec" and "rte_security_crypto_prepare_ipsec" will be better. >> We can have such APIs for other protocols as well. >> Also, we should leave the existing functionality as is and we should let the user decide whether >> it needs to manage the ipsec on it's own or with the new APIs. > There are no plans to void any existing API. > If the user has working code that uses rte_crytpodev/rte_security directly and wants to keep it, > that's fine. > >>> I thought about that approach too, and indeed from one side it looks cleaner and easier >>> to customize - each of these functions would just call related function inside rte_security_ops. >>> The problem with that approach - it would mean that each SA would be able to work with one >>> device only. >>> So if someone needs an SA that could be processed by multiple cores and multiple crypto-devices >>> in parallel such approach wouldn’t fit. >> One SA should be processed by a single core or else we need to have an >> event based application which support ordered queues, >> because if we process packets of single SA on multiple cores, then >> packets will get re-ordered and we will get the anti-replay late errors >> on decap side. > I suppose in some cases one core would be enough to handle SA traffic, > for some not, as I said before, I think it should be configurable. > Of course for MT case some entity that would guarantee proper ordering > for final packet processing would be needed. > It could be some eventdev, or SW FIFO queue, or something else. > >> And if we have event based solution, then the scheduler will be able to >> handle the load balancing accordingly. > Didn't understand that sentence. I mean the event device will be able to handle that which has an inbuilt scheduler in it for balancing the load of single SA, and if the queues are ordered and it support order restoration, then it will be able to maintain the ordering. And for that you would not have to bother about giving the same SA to different cryptodevs on multi cores. >>> That was the main reason to keep rte_security as it is right now and go ahead with new library. >>> One thing that worries me - do we need a way to share SQN and replay window information >>> between rte_security and upper layer (rte_ipsec)? >>> If 'no', then ok, if 'yes' then probably we need to discuss how to do it now? >> anti-replay window size shall be a parameter in ipsec_xform, which shall >> be added. >> And the error notification >>  - in case of using crypto, then use rte_crypto_op_status >> - in case of inline cases, then use rte_eth_event callbacks. >> I don't see rte_ipsec needs to take care of that in your initial approach. >> However, if you plan to include session reset inside rte_ipsec, then you >> may need that inside the rte_ipsec. > I am not talking rte_ipsec, my concern here is rte_security. > Suppose you need to switch from device that can do inline_proto to the device that doesn't. In what use case you would need such switching? > Right now the only way - renegotiate all SAs that were handled by inline_proto device > (because there is no way to retrieve from rte_security device SQN information). > Renegotiation should work, but it looks like quite expensive approach. This will be only for the first packet. > If rte_security would have a way to share its SQN status with SW, then I think it would > be possible to do such switch without SA termination. what kind of SQN status you are looking for? overflow? If yes, application need to re-negotiate the session, which will be done periodically anyways. > Again with such info available - load-balancing for the same SA on multiple devices > might be possible. > Konstantin >