From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 94468D48B for ; Thu, 30 Mar 2017 15:52:06 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 30 Mar 2017 06:52:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,246,1486454400"; d="scan'208";a="66909909" Received: from dwdohert-dpdk.ir.intel.com ([163.33.210.152]) by orsmga002.jf.intel.com with ESMTP; 30 Mar 2017 06:52:04 -0700 To: "Trahe, Fiona" , "dev@dpdk.org" , "De Lara Guarch, Pablo" References: <1490290570-14651-1-git-send-email-fiona.trahe@intel.com> <927ebdcb-132e-b1a6-e427-fa60cb8ac3b3@intel.com> <348A99DA5F5B7549AA880327E580B435891C21F1@IRSMSX101.ger.corp.intel.com> From: Declan Doherty Message-ID: Date: Thu, 30 Mar 2017 14:51:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <348A99DA5F5B7549AA880327E580B435891C21F1@IRSMSX101.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] cryptodev: add API note 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, 30 Mar 2017 13:52:07 -0000 On 24/03/17 12:52, Trahe, Fiona wrote: > Hi Declan, > >> -----Original Message----- >> From: Doherty, Declan >> Sent: Friday, March 24, 2017 10:53 AM >> To: Trahe, Fiona ; dev@dpdk.org; De Lara Guarch, >> Pablo >> Subject: Re: [dpdk-dev] [PATCH] cryptodev: add API note >> >> On 23/03/2017 5:36 PM, Fiona Trahe wrote: >>> Add note to cryptodev API that chained mbufs >>> are not supported in DOCSISBPI mode. >>> >>> Signed-off-by: Fiona Trahe >>> --- >> ... >>> >> >> >> Hey Fiona, >> >> Is this really a limitation of DOCSISBPI mode or just the PMDs which >> currently support these operations. I don't see any reason why DOCSISBPI >> mode cipher operation precludes scatter gather operations on the source >> payload. >> > > The DOCSISBPI spec in section I.12 Fragmented Packet Encryption > https://apps.cablelabs.com/specification/CM-SP-SECv3.1 > says "When a packet is fragmented, each fragment is independently encrypted using CBC mode with residual block processing" > Of course that doesn't guarantee that an application won't take one of those fragments and split it across multiple mbufs. But I checked with some subject matter experts who didn't see a use-case for it. > Due to the nature of DOCSIS there would be a performance impact in dereferencing through chained mbufs to get the address of the residual block, on that basis it seems like a better idea to preclude this on the API rather than having every PMD separately document a limitation or implement a less-performant path that's unlikely to be used. > Ok, thanks for clarifying that. So the only time this could possibly happen is if the mbufs themselves where not big enough to fit the packet MTU and the NIC port had the scatter rx path enabled. >> If there is some fundamental reason why scatter gather operations can't >> be supported I think documenting this in the rte_crypto_cipher_algorithm >> enumeration comments make more sense than in the rte_crypto_sym_op >> structure, as we already specify extra requirements >> RTE_CRYPTO_CIPHER_AES_GCM and RTE_CRYPTO_CIPHER_AES_CCM there. > > It seems to me that this constraint is similar to the notes on many of the other fields > in rte_crypto_sym_op. > The CCM/GCM comments on the other hand would not fit so well on the xform struct > as they're linking fields on both auth and cipher xforms so the comment would have to > be duplicated in 2 places, so works better on the enum. > But I don't feel strongly about where it goes, if you still prefer (and agree it's ok to add this constraint on the API) I can move it to the enum. > I you want to go ahead and place this restriction on these algorithms then to my mind it probably makes sense to document it with the algorithm definition in the enumeration definition.