From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 575EFDE0 for ; Thu, 31 Aug 2017 12:06:02 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D56B421564; Thu, 31 Aug 2017 06:06:01 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 31 Aug 2017 06:06:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=R0mw6WzPIf/DKE9 uBxRo8YEEPxiwR+Y4TMhJCl17axM=; b=ATCxg6y5b4ZMqpc380kxmM18ZtgaiaH R70c3fhpvk/bs/Tdi1QPiKQTh1JmGsqZAkWkhapu6NsOw0enoyxw0W6QPiQ7sQM9 75Qqj9SoRVLSasRQX6bP/FV8907KVJdujE7OI10n3nM/mdldH7uSntxGuNGvX5KX C/W6jEEpKYns= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=R0mw6WzPIf/DKE9uBxRo8YEEPxiwR+Y4TMhJCl17axM=; b=Iqq4TRz/ C5izogCsDFy0YmUCdSSuw/zYNXSRWExQ8g4tPKq8GuXUqoLy0oP24KH8/IyiNtWe piNOv/d+M05A7fUXR4OiGQ95gyb58qsZf71ToTckALfel1UsYmEhZScEJbEjYVrV o4S9HxDUKsOM80JV0G1aZF10TXtT7Cr7FaUciPz4U1cjZKv88kIefhwO2YhvHKFG zbJlOB5yUfYdMVnatXAyNhhYt+OQyrhZArUXcrCtO5Vior0xz6/clqrwMAiu236B sTyYiVthwpa4m+gtmNgE6WsB7LXSc6zNvMpNTHCCUuztDTpqIOZ46yRFsdl09Wbr gk8b4pnoJIzzVA== X-ME-Sender: X-Sasl-enc: +kjJMndrtZYo30FjUuOtCX1ONJJwpjMlsDLS0FmE16nX 1504173961 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7AE8C7E1B4; Thu, 31 Aug 2017 06:06:01 -0400 (EDT) From: Thomas Monjalon To: Akhil Goyal Cc: dev@dpdk.org, borisp@mellanox.com, declan.doherty@intel.com, radu.nicolau@intel.com, aviadye@mellanox.com, sandeep.malik@nxp.com, hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com Date: Thu, 31 Aug 2017 12:06:00 +0200 Message-ID: <7410549.rg854U5vhU@xps> In-Reply-To: <48311141-8bb2-d816-bac8-8a5bb3fd7dee@nxp.com> References: <7834b3bd-0800-500c-1c89-3b89e2eb47fa@nxp.com> <2166799.Q9jkndJmdM@xps> <48311141-8bb2-d816-bac8-8a5bb3fd7dee@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [RFC PATCH 0/1] IPSec Inline and look aside crypto offload 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, 31 Aug 2017 10:06:02 -0000 31/08/2017 11:37, Akhil Goyal: > On 8/29/2017 8:19 PM, Thomas Monjalon wrote: > > 25/07/2017 13:21, Akhil Goyal: > >> These are very similar to what Declan proposed with a few additions. > >> This can be updated further for other security protocols like MACSec and DTLS > > > > You should avoid referencing another proposal without > > - link to the proposal > > - summary of the proposal > The link is not mentioned in the cover note but the patches are sent in > reply to the same thread that I have mentioned. If we see the complete > thread, then there should not be any gap. > > > > [...] > >> Now, after the application configures the session using above APIs, it needs to > >> attach the session with the crypto_op in case the session is configured for > >> crypto look aside protocol offload. For IPSec inline/ full protocol offload > >> using NIC, the mbuf ol_flags can be set as per the RFC suggested by Boris. > > > > Again a missing reference (link + summary). > > > > Even worst, the RFCv2 references this v1 without copying the explanations. > > It is too hard to track, or maybe it is cryptic on purpose ;) > Same comment, patches are sent within the same thread. > Please let me know what is not clear with the thread. > > Also, I would take care about this comment, that I need to copy the > content of previous versions, in my future patches. > > As this was an RFC series of patches, the content may not 100% stable, > and things may get finalized during the course of development across > Intel/NXP/Mellanox and may be others. > > As per my understanding all the information is there in the complete > thread and nothing looks cryptic to me. I am sure nothing looks cryptic to you :) But you are not writing it for yourself. My feedback is that it would be easier to read if you summarize the whole status in the same cover letter. You are free to consider my feedback or not. > > [...] > >> Now the application(ipsec-secgw) have 4 paths to decide for the data path. > >> 1. Non-protocol offload (currently implemented) > >> 2. IPSec inline(only crypto operations using NIC) > >> 3. full protocol offload(crypto operations along with all the IPsec header > >> and trailer processing using NIC) > >> 4. look aside protocol offload(single-pass encryption and authentication with > >> additional levels of protocol processing offload using crypto device) > > > > I feel these 4 paths are the most important to discuss. > > Unfortunately there are not enough detailed. > > Please explain the purpose and implementation of each one. > Yes these are 4 paths which can be used for IPSEC. > 1. Non protocol offload(RTE_SECURITY_SESS_NONE) - the existing > application works on this path, the crypto devices perform the crypto > operations without protocol knowledge. This mode is when using cryptodev API, right? Are you proposing to use rte_security as a simple wrapper of cryptodev in the mode RTE_SECURITY_SESS_NONE? > 2. Ipsec inline(RTE_SECURITY_SESS_ETH_INLINE_CRYPTO) - This is when the > crypto operations are performed by ethernet device instead of crypto > device. This is also without protocol knowledge inside the ethernet device If the ethernet device can act as a crypto device, this function should be offered via the cryptodev interface. How is it different from mode RTE_SECURITY_SESS_NONE? Is there direct Rx/Tx involved in this mode? > 3. full protocol offload(RTE_SECURITY_SESS_ETH_PROTO_OFFLOAD) - This is > same as 2 but with protocol support in the ethernet device. Is there direct Rx/Tx in RTE_SECURITY_SESS_ETH_PROTO_OFFLOAD? > 4. look aside protocol offload(RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD) - > This is same as 1 but with protocol support in crypto device. Who is responsible for Rx/Tx in RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD? [...] > >> The application can decide using the below action types > >> enum rte_security_session_action_type { > >> RTE_SECURITY_SESS_ETH_INLINE_CRYPTO, > >> /**< Crypto operations are performed by Network interface */ > > > > In this mode, the ethdev port does the same thing as a crypto port? > > not exactly everything. In this mode, only cipher and auth operations > are performed by the eth device. No intelligence about the protocol is > done. This is similar to what the current implementation do with the > crypto device(Non protocol offload). Are you saying no but yes? I say "ethdev port does the same thing as a crypto port" You say "similar to what the current implementation do with the crypto device" > >> RTE_SECURITY_SESS_ETH_PROTO_OFFLOAD, > >> /**< Crypto operations with protocol support are performed > >> * by Network/ethernet device. > >> */ > >> RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD, > >> /**< Crypto operations with protocol support are performed > >> * by Crypto device. > >> */ > > > > I guess the difference between ETH_PROTO_OFFLOAD and CRYPTO_PROTO_OFFLOAD > > is that we must re-inject packets from CRYPTO_PROTO_OFFLOAD to the NIC? > > yes OK Who is responsible to re-inject packets from CRYPTO_PROTO_OFFLOAD to the NIC? > >> RTE_SECURITY_SESS_NONE > >> /**< Non protocol offload. Application need to manage everything */ > >> }; > > > > What RTE_SECURITY_SESS_NONE does? It is said to be implemented above. > > It is non protocol offload mentioned above. How is it different from using cryptodev?