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 EE37CA0613 for ; Tue, 27 Aug 2019 16:19:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D7211C119; Tue, 27 Aug 2019 16:19:08 +0200 (CEST) Received: from qrelay115.mxroute.com (qrelay115.mxroute.com [172.82.139.115]) by dpdk.org (Postfix) with ESMTP id B6F0B1C114 for ; Tue, 27 Aug 2019 16:19:07 +0200 (CEST) Received: from filter001.mxrelay.co (unknown [94.130.183.33]) by qrelay115.mxroute.com (Postfix) with ESMTP id CA5FF10086D; Tue, 27 Aug 2019 10:19:06 -0400 (EDT) Received: from galaxy.mxroute.com (unknown [23.92.70.113]) by filter001.mxrelay.co (Postfix) with ESMTPS id AAD2A1003B5; Tue, 27 Aug 2019 14:19:04 +0000 (UTC) Received: from [192.198.151.44] by galaxy.mxroute.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1i2cCs-0005va-RI; Tue, 27 Aug 2019 10:12:23 -0400 From: Ray Kinsella To: Bruce Richardson Cc: Aaron Conole , dev@dpdk.org, vladimir.medvedkin@intel.com, john.mcnamara@intel.com, marko.kovacevic@intel.com References: <20190822160717.13584-1-mdr@ashroe.eu> <9043b351-86cc-ecc6-2af9-1c04368cabca@ashroe.eu> <20190827081740.GB1740@bricha3-MOBL.ger.corp.intel.com> <7fa81424-98b8-ec03-59c6-5b617e520cbb@ashroe.eu> Openpgp: preference=signencrypt Autocrypt: addr=mdr@ashroe.eu; keydata= mQINBFv8B3wBEAC+5ImcgbIvadt3axrTnt7Sxch3FsmWTTomXfB8YiuHT8KL8L/bFRQSL1f6 ASCHu3M89EjYazlY+vJUWLr0BhK5t/YI7bQzrOuYrl9K94vlLwzD19s/zB/g5YGGR5plJr0s JtJsFGEvF9LL3e+FK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0l1of+wIKm3KlD/9w/LOG5rtgtCUWPl4B3pZvGpNym6XdK8cop9saOnE85zWf u+sKWCrxNgYkYP7aZrYMPwqDvilxhbTsIJl5HhPgpTO1b0i+c0n1Tij3EElj5UCg3q8mEc17 c+5jRrY3oz77g7E3oPftAjaq1ybbXjY4K32o3JHFR6I8wX3m9wJZJe1+Y+UVrrjY65gZFxcA thNVnWKErarVQGjeNgHV4N1uF3pIx3kT1N4GSnxhoz4Bki91kvkbBhUgYfNflGURfZT3wIKK +d50jd7kqRouXUCzTdzmDh7jnYrcEFM4nvyaYu0JjSS5R672d9SK5LVIfWmoUGzqD4AVmUW8 pcv461+PXchuS8+zpltR9zajl72Q3ymlT4BTAQOlCWkD0snBoKNUB5d2EXPNV13nA0qlm4U2 GpROfJMQXjV6fyYRvttKYfM5xYKgRgtP0z5lTAbsjg9WFKq0Fndh7kUlmHjuAIwKIV4Tzo75 QO2zC0/NTaTjmrtiXhP+vkC4pcrOGNsbHuaqvsc/ZZ0siXyYsqbctj/sCd8ka2r94u+c7o4l BGaAm+FtwAfEAkXHu4y5Phuv2IRR+x1wTey1U1RaEPgN8xq0LQ1OitX4t2mQwjdPihZQBCnZ wzOrkbzlJMNrMKJpEgulmxAHmYJKgvZHXZXtLJSejFjR0GdHJcL5rwVOMWB8cg== Message-ID: <87d19bda-9bac-84b4-bff2-186bd3f88f7e@ashroe.eu> Date: Tue, 27 Aug 2019 15:19:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <7fa81424-98b8-ec03-59c6-5b617e520cbb@ashroe.eu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-AuthUser: mdr@ashroe.eu Subject: Re: [dpdk-dev] [PATCH v2 0/2] add abi version testing to app/test 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 27/08/2019 09:28, Ray Kinsella wrote: > > > On 27/08/2019 09:17, Bruce Richardson wrote: >> On Mon, Aug 26, 2019 at 05:45:55PM +0100, Ray Kinsella wrote: >>> >>> >>> On 23/08/2019 16:49, Aaron Conole wrote: >>>> Ray Kinsella writes: >>>> >>>>> This patchset adds ABI version testing to the app/test unit test framework, >>>>> addressing two issues previously raised during ML conversations on ABI >>>>> stability; >>>>> >>>>> 1. How do we unit test still supported previous ABI versions? >>>>> 2. How to we unit test inline functions from still supported previous ABI >>>>> versions? >>>>> >>>>> Starting with rte_lpm, I did the following:- >>>>> >>>>> * I reproduced mostly unmodified unit tests for the v2.0 ABI, taken from DPDK >>>>> 2.2 and 17.02. >>>>> * I reproduced the rte_lpm interface header from v2.0, including the inline >>>>> functions and remapping symbols to their appropriate versions. >>>>> * I added support for multiple abi versions to the app/test unit test framework >>>>> to allow users to switch between abi versions (set_abi_version), without >>>>> further polluting the already long list of unit tests available in app/test. >>>>> >>>>> The intention here is that in future as developers need to deprecate APIs, the >>>>> associated unit tests may move into the ABI version testing mechanism of the >>>>> app/test instead of being replaced by the latest set of unit tests as would be >>>>> the case today. >>>>> >>>>> v2: >>>>> >>>>> * Added LPM IPv6 test cases for the v2.0 ABI. >>>>> * Fixed a number of checkpatch errors, stop short of substantially reworking >>>>> the test code from the v2.0 ABI. >>>>> * Removed duplicating test cases published in the original v1 patch. >>>> >>>> Thanks for this work. I think it's useful. >>>> >>>> I see an error under aarch64 builds because there are some x86_64 >>>> specific types being used in the testing. >>> >>> So the problem is that LPM didn't fully support ARM until DPDK v16.04. >>> The ABI versioning code in the LPM library is there to support the 2.0 ABI. >>> >>> The intention of this unit test is to test backward's compatibility with >>> an inline LPM function from DPDK v2.2.0, which was essentially x86 only >>> at that time. >>> >>> Unless we want to get into the business of backporting ARM support to >>> DPDK 2.2.0 (from where this test cases came from) - we should probably >>> restrict these ABI versioning test cases to CONFIG_RTE_ARCH_X86_64 only. >>> >>> The other option is forget about testing this the LPM ABI versioning >>> support, which then asks the question should be perhaps excise that code >>> altogether. >>> >> >> I think function versioning is great and should be widely used. >> Unfortunately, though, in our case since we break the ABI so consistently, >> this old code is pretty useless. Therefore, I think we should remove all >> old versionned code from e.g. pre-18.11, since no app is realistically >> going to work from that far back anyway. >> >> /Bruce >> > > I had come to a similar conclusion, that we likely need to deprecate > much or all of the existing ABI Compatibility code, it needs a wider > review. > > BIND_VERSION_SYMBOL and friends, are still needed to unit test ABI > Versioning, the general idea is sound. And I liked LPM as an example, > because it is well understood and contained, but I will look for > something more recent we could use instead. > Only recent example I can find of ABI versioning is the Timer Library, changed in April 2019. After that are the distributor and the lpm library both changes in 2017, does this seem right? Ray K root@xxx:/build/dpdk# find lib -name *.map | xargs -I{} -- git log -1 --format="%ai {}" {} | sort -k 1,2 | tail -n 10 2019-04-03 18:20:13 -0500 lib/librte_stack/rte_stack_version.map 2019-04-15 16:41:28 -0500 lib/librte_timer/rte_timer_version.map 2019-04-30 22:54:16 -0500 lib/librte_rcu/rte_rcu_version.map 2019-06-25 04:46:02 +0530 lib/librte_eventdev/rte_eventdev_version.map 2019-07-05 10:16:17 -0700 lib/librte_net/rte_net_version.map 2019-07-11 09:26:05 +0000 lib/librte_metrics/rte_metrics_version.map 2019-07-17 03:23:55 +0800 lib/librte_ring/rte_ring_version.map 2019-07-26 15:10:19 +0100 lib/librte_security/rte_security_version.map 2019-07-27 09:21:33 +0200 lib/librte_eal/rte_eal_version.map 2019-07-31 14:27:16 +0200 lib/librte_ethdev/rte_ethdev_version.map root@xxx:/build/dpdk# find lib -name *.map | xargs -I{} -- git log -1 --format="%ai {}" {} | sort -k 1,2 | tail -n 50 | awk '{print $4}' | xargs sort | uniq -c | sort -k 1 ... 2 rte_distributor_clear_returns; 2 rte_distributor_create; 2 rte_distributor_flush; 2 rte_distributor_get_pkt; 2 rte_distributor_poll_pkt; 2 rte_distributor_process; 2 rte_distributor_request_pkt; 2 rte_distributor_returned_pkts; 2 rte_distributor_return_pkt; 2 rte_lpm6_add; 2 rte_lpm6_is_rule_present; 2 rte_lpm6_lookup; 2 rte_lpm6_lookup_bulk_func; 2 rte_lpm_add; 2 rte_lpm_create; 2 rte_lpm_delete; 2 rte_lpm_delete_all; 2 rte_lpm_find_existing; 2 rte_lpm_free; 2 rte_lpm_is_rule_present; 2 rte_timer_dump_stats; 2 rte_timer_manage; 2 rte_timer_reset; 2 rte_timer_stop; 2 rte_timer_subsystem_init; ...