From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8C55F12009 for ; Fri, 12 Jan 2018 16:55:13 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jan 2018 07:55:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,349,1511856000"; d="scan'208";a="18717212" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by FMSMGA003.fm.intel.com with ESMTP; 12 Jan 2018 07:55:11 -0800 To: Neil Horman Cc: dev@dpdk.org, thomas@monjalon.net, john.mcnamara@intel.com, bruce.richardson@intel.com References: <20171201185628.16261-1-nhorman@tuxdriver.com> <20171213151728.16747-1-nhorman@tuxdriver.com> <20171213151728.16747-6-nhorman@tuxdriver.com> <6a5b06ce-c824-93aa-da38-1085bbe0eaa1@intel.com> <20180111212930.GC6879@hmswarspite.think-freely.org> <20180112143707.GC20015@hmswarspite.think-freely.org> From: Ferruh Yigit Message-ID: <2ba5be68-4d5d-9f37-e86a-fe23b6708056@intel.com> Date: Fri, 12 Jan 2018 15:55:10 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180112143707.GC20015@hmswarspite.think-freely.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCHv4 5/5] doc: Add ABI __experimental tag documentation 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: Fri, 12 Jan 2018 15:55:13 -0000 On 1/12/2018 2:37 PM, Neil Horman wrote: > On Fri, Jan 12, 2018 at 11:50:12AM +0000, Ferruh Yigit wrote: >> On 1/11/2018 9:29 PM, Neil Horman wrote: >>> On Thu, Jan 11, 2018 at 08:06:48PM +0000, Ferruh Yigit wrote: >>>> On 12/13/2017 3:17 PM, Neil Horman wrote: >>>>> Document the need to add the __experimental tag to appropriate functions >>>>> >>>>> Signed-off-by: Neil Horman >>>>> CC: Thomas Monjalon >>>>> CC: "Mcnamara, John" >>>>> CC: Bruce Richardson >> >> <...> >> >>>>> automatically marked as ``experimental`` to allow for a period of stabilization>>> before they become part of a tracked ABI. >> >> Full sentences for above statement: >> " >> Since changes to APIs are most likely immediately after their introduction, as >> users begin to take advantage of those new APIs and start finding issues with >> them, new DPDK APIs will be automatically marked as experimental to allow for a >> period of stabilization before they become part of a tracked ABI. >> " >> >> This part is not related to this patchset, but it will be hard to maintain above >> behavior, "automatically marked" is not automatic now and moving them to stable >> after one release is also not automatic. Do you have any suggestion on how to >> manage this, do you think can your script be expanded to cover these checks? >> > > I would make the argument that this was never the case, but rather a statement > of principle. I assert that because I can find no mechanism anywhere in our > build system that 'automatically' documented or marked a new API as experimental > (please correct me if I'm wrong here). I think this was more meant to be a > directive to developers to do whatever coding was needed to preform such > marking/documentation in whatever style/format was current. E.g. introducers of > a new API should document everything as EXPERIMENTAL using the appropriate > doxygen tag and version map tag. > > In answer to your question, While we might be able to expand my script to check > for new API's and ensure they are marked as experimental, I don't think thats > the right place to do it, because that script is run at build time, where the > state of the tree is transient. A better place to do it would be with a git hook > at checkin time, or in the checkpatch script to flag new apis as experimental > right before those new API's are comitted. Though I'm not a huge fan of that > either (at least not of the former suggestion). I say that because I think we > need to allow developers the freedom to determine the supported status of any > new API that they add. For example, it seems pretty clear that a new library > might want to have its entire API marked as experimental, but someone adding a > single new function to an existing API might be confident that the new function > is needed and should be immediately supported.. > > I think the better solution is to define the use of the EXPERIMENTAL tag in the > version map as the canonical location to define unstable API functions. Doing > so immediately commits an author to ensuring that the corresponding function > definitions are marked with the __experimental tags, which in turn will cause > any downstream users to be alerted to the fact that they might be using those > API's in their code, so they can take appropriate action. It still allows for > the Documentation to be out of sync, but alerting authors doing development I > think is the more important element here, as Documentation can be corrected more > easily than code in the field. > > Thoughts? After this point agree to using EXPERIMENTAL tag in the version map as standard, but it will be hard to maintain "API is experimental for first release" without help of any automated tool. > Neil > >>>>> >>>>> +Note that marking an API as experimental is a two step process. To mark an API >>>>> +as experimental, the symbols which are desired to be exported must be placed in >>>>> +an EXPERIMENTAL version block in the corresponding libraries' version map >>>>> +script. Secondly, the corresponding definitions of those exported functions, and >>>>> +their forward declarations (in the development header files), must be marked >>>>> +with the __experimental tag (see rte_compat.h). The DPDK build makefiles >>>>> +preform a check to ensure that the map file and the C code reflect the same >>>>> +list of symbols. >>>> >>>> There are more steps we historically do to mark an API as experimental: >>>> - Add to function header comment experimental for API documentation, preferably >>>> with a warning tag to highlight it: >>>> >>>> /** >>>> * @warning >>>> * @b EXPERIMENTAL: >>>> .... >>>> */ >>>> >>>> - If whole APIs in header file are experimental, add same experimental warning >>>> doxygen comment in file comment, again preferably with warning. >>>> >>>> - If whole library is experimental, put EXPERIMENTAL tag into maintainers file >>>> as well. >>>> >>> Is that documented somewhere? I'd like to add this to the same location that it >>> otherwise is written out. The above location was the only place in the guide >>> that I could find reference to experimental markings. >> >> As far as I know how to mark an API as experimental is not documented. >> What do you think making a new section for this information? >> >>> >>>>> + >>>>> ABI versions, once released, are available until such time as their >>>>> deprecation has been noted in the Release Notes for at least one major release >>>>> cycle. For example consider the case where the ABI for DPDK 2.0 has been >>>>> >>>> >>>> >> >>