From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1C3AFA0524; Fri, 31 Jan 2020 10:03:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A5F41C0BD; Fri, 31 Jan 2020 10:03:56 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 910751C044 for ; Fri, 31 Jan 2020 10:03:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2020 01:03:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,385,1574150400"; d="scan'208";a="247671750" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.61]) ([10.237.221.61]) by orsmga002.jf.intel.com with ESMTP; 31 Jan 2020 01:03:47 -0800 To: Thomas Monjalon , Akhil Goyal , David Marchand , Anoob Joseph , "Trahe, Fiona" , "Kusztal, ArkadiuszX" Cc: "dev@dpdk.org" , "bruce.richardson@intel.com" , "nhorman@tuxdriver.com" , John McNamara , "dodji@seketeli.net" , Andrew Rybchenko References: <20191220152058.10739-1-david.marchand@redhat.com> <1ef7ca98-cff6-4c5d-5a71-ddbdf893ee73@intel.com> <6121442.K2JlShyGXD@xps> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@intel.com; prefer-encrypt=mutual; keydata= mQINBFXZCFABEADCujshBOAaqPZpwShdkzkyGpJ15lmxiSr3jVMqOtQS/sB3FYLT0/d3+bvy qbL9YnlbPyRvZfnP3pXiKwkRoR1RJwEo2BOf6hxdzTmLRtGtwWzI9MwrUPj6n/ldiD58VAGQ +iR1I/z9UBUN/ZMksElA2D7Jgg7vZ78iKwNnd+v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RD5M+tD3xNhH2O+D/9OEz62YuJQLuIuOfL67eFTIB5/1+0j8Tsu o2psca1PUQ61SZJZOMl6VwNxpdvEaolVdrpnSxUF31kPEvR0Igy8HysQ11pj8AcgH0a9FrvU /8k2Roccd2ZIdpNLkirGFZR7LtRw41Kt1Jg+lafI0efkiHKMT/6D/P1EUp1RxOBNtWGV2hrd 0Yg9ds+VMphHHU69fDH02SwgpvXwG8Qm14Zi5WQ66R4CtTkHuYtA63sS17vMl8fDuTCtvfPF HzvdJLIhDYN3Mm1oMjKLlq4PUdYh68Fiwm+boJoBUFGuregJFlO3hM7uHBDhSEnXQr5mqpPM 6R/7Q5BjAxrwVBisH0yQGjsWlnysRWNfExAE2sRePSl0or9q19ddkRYltl6X4FDUXy2DTXa9 a+Fw4e1EvmcF3PjmTYs9IE3Vc64CRQXkhujcN4ZZh5lvOpU8WgyDxFq7bavFnSS6kx7Tk29/ wNJBp+cf9qsQxLbqhW5kfORuZGecus0TLcmpZEFKKjTJBK9gELRBB/zoN3j41hlEl7uTUXTI JQFLhpsFlEdKLujyvT/aCwP3XWT+B2uZDKrMAElF6ltpTxI53JYi22WO7NH7MR16Fhi4R6vh FHNBOkiAhUpoXRZXaCR6+X4qwA8CwHGqHRBfYFSU/Ulq1ZLR+S3hNj2mbnSx0lBs1eEqe2vh cA== Message-ID: <21107407-3ad7-89a5-4f1a-bdc548aacdd6@intel.com> Date: Fri, 31 Jan 2020 09:03:47 +0000 MIME-Version: 1.0 In-Reply-To: <6121442.K2JlShyGXD@xps> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 4/4] add ABI checks 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" On 1/30/2020 8:18 PM, Thomas Monjalon wrote: > 30/01/2020 17:09, Ferruh Yigit: >> On 1/29/2020 8:13 PM, Akhil Goyal wrote: >>> >>> >>>> >>>> On Wed, Jan 29, 2020 at 7:10 PM Anoob Joseph wrote: >>>>> The asymmetric crypto library is experimental. Changes to experimental code >>>> paths is allowed, right? >>>> >>>> The asymmetric crypto enum is referenced by a function part of the stable ABI. >>>> It is possible to waive this enum, if we are sure no use out of the >>>> experimental asym crypto APIs is possible. >>>> >>>> The rest of the changes touch stable symbols. >>>> >>>> Adding the abidiff report: >>>> >>>> [C]'function void rte_cryptodev_info_get(uint8_t, >>>> rte_cryptodev_info*)' at rte_cryptodev.c:1115:1 has some indirect >>>> sub-type changes: >>>> parameter 2 of type 'rte_cryptodev_info*' has sub-type changes: >>>> in pointed to type 'struct rte_cryptodev_info' at rte_cryptodev.h:468:1: >>>> type size hasn't changed >>>> 1 data member change: >>>> type of 'const rte_cryptodev_capabilities* >>>> rte_cryptodev_info::capabilities' changed: >>>> in pointed to type 'const rte_cryptodev_capabilities': >>>> in unqualified underlying type 'struct >>>> rte_cryptodev_capabilities' at rte_cryptodev.h:176:1: >>>> type size hasn't changed >>>> 1 data member change: >>>> type of '__anonymous_union__ ' changed: >>>> type size hasn't changed >>>> 1 data member change: >>>> type of 'rte_cryptodev_asymmetric_capability >>>> __anonymous_union__::asym' changed: >>>> type size hasn't changed >>>> 1 data member change: >>>> type of >>>> 'rte_cryptodev_asymmetric_xform_capability >>>> rte_cryptodev_asymmetric_capability::xform_capa' changed: >>>> type size hasn't changed >>>> 1 data member change: >>>> type of 'rte_crypto_asym_xform_type >>>> rte_cryptodev_asymmetric_xform_capability::xform_type' changed: >>>> type size hasn't changed >>>> 2 enumerator insertions: >>>> >>>> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECDSA' value '7' >>>> >>>> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECPM' value '8' >>>> 1 enumerator change: >>>> >>>> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END' >>>> from >>>> value '7' to '9' at rte_crypto_asym.h:60:1 >>>> >>> >>> I believe these enums will be used only in case of ASYM case which is experimental. >> >> Independent from being experiment and not, this shouldn't be a problem, I think >> this is a false positive. >> >> The ABI break can happen when a struct has been shared between the application >> and the library (DPDK) and the layout of that memory know differently by >> application and the library. >> >> Here in all cases, there is no layout/size change. >> >> As to the value changes of the enums, since application compiled with old DPDK, >> it will know only up to '6', 7 and more means invalid to the application. So it >> won't send these values also it should ignore these values from library. Only >> consequence is old application won't able to use new features those new enums >> provide but that is expected/normal. > > If library give higher value than expected by the application, > if the application uses this value as array index, > there can be an access out of bounds. First this concern is not an ABI break concern, but application should ignore any value bigger than the MAX value it knows. Otherwise this would mean we can't add any new enum or define to the project, which is wrong I believe. > > >>>> [C]'function int >>>> rte_cryptodev_get_aead_algo_enum(rte_crypto_aead_algorithm*, const >>>> char*)' at rte_cryptodev.c:239:1 has some indirect sub-type changes: >>>> parameter 1 of type 'rte_crypto_aead_algorithm*' has sub-type changes: >>>> in pointed to type 'enum rte_crypto_aead_algorithm' at >>>> rte_crypto_sym.h:346:1: >>>> type size hasn't changed >>>> 1 enumerator insertion: >>>> 'rte_crypto_aead_algorithm::RTE_CRYPTO_AEAD_CHACHA20_POLY1305' >>>> value '3' >>>> 1 enumerator change: >>>> 'rte_crypto_aead_algorithm::RTE_CRYPTO_AEAD_LIST_END' from >>>> value '3' to '4' at rte_crypto_sym.h:346:1 >> >> Same as above, no layout change. >> >>>> >>>> >>>> [C]'const char* rte_crypto_aead_algorithm_strings[1]' was changed at >>>> rte_crypto_sym.h:358:1: >>>> size of symbol (in bytes) changed from 24 to 32 >>>> >> >> The shared memory size changes, but this is global variable in the library, and >> the values application can request 'RTE_CRYPTO_AEAD_AES_CCM' & >> 'RTE_CRYPTO_AEAD_AES_GCM' is already there, so there is no backward >> compatibility issue here. > > For this one, I don't know what is the breakage. > > >>> +Fiona and Arek >>> >>> We may need to revert the chacha-poly patches. >>> >> >> I don't see any ABI break in this case, can someone explain if I am missing >> anything here? > > > > >