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 EB92EA04F3; Fri, 3 Jan 2020 11:49:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BC701C43C; Fri, 3 Jan 2020 11:49:03 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 384AC1C01 for ; Fri, 20 Dec 2019 17:20:58 +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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2019 08:20:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,336,1571727600"; d="scan'208";a="267558707" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 20 Dec 2019 08:20:56 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Dec 2019 08:20:56 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Dec 2019 08:20:56 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q2kMKqCCu4bBVpE3tQlKK1rOOtbYbgxh1Xkwg6leKj9eZqWaILNsIqTGB4y8cFy1ea+waPgNU3z9NdZx8ESOAlvDTGw4cZQ0cMemeow08mDSjA6KlJImfH7EU0CMv7e/79nAbC/7508CZ6yUKk579Rv6d/RhumqbgK1EIApujX0PPNmvnWDCKvAyCjm0biUdNM/7yVblYSXavj7+FZpvB0GGfi1eSWycPTQmn1B95EXBfh1tUuMSeQTlwYBVwBG5fVprffgazribty7arGKgOOHYIUBE+kEtMtydqEYZ0eoUyTXxrV1T+ve+RUjsSua5MWQ5wgPD3B5ayol4PwwNNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bnebXOrNaCHjBt12vUxQK6nVbjwra3Dc9N+rvvhrFz4=; b=WnBCsMRISq83tYAA09gWSnHVdYxIljy67SqrBRWmJAATXzxCp32SZeSRJzM8ywlocQsl1ZNvhTgVmnIj97wuHw5UyFCbuct8QKJcgr5r4iKvAvHsSTYfqCOO85QEoF5BfsGz5DIQ/IVn+Y6HSYi5aBN+pvwKxu2W3O9JYXoI/QYCFaNXRw8xutQUPdMFp56mOrleJ6E9w0EJj2UN5Ocmbzngv5gaEvnis7egTG+Q8zr2XFUiQVSa1EBwV/nBcSPlnAkAnueuaA0lcOHbIbvsL6b3vhfk0WDwv3yP4ytK0pCkWvWL4VImIKc5uUy+U6Nz+zcSL/3fcQ8Yx+pj8u235g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bnebXOrNaCHjBt12vUxQK6nVbjwra3Dc9N+rvvhrFz4=; b=D8c5llTa+f4yWkMGuLTgwag4XBcC69YMkt9AILMDH52RF/KaGC4B7zpa/l8NG7bkEvCxmm2T4o9wgP5380DbR9NAcwNWT3y7RcwJnP3SR3mhdYLO7fbh9NcEgGDDU3t3NxV7bjhT/DgEZOZ/3HPOBwfsx7+5fROEt59pcK/zUWo= Received: from MN2PR11MB4160.namprd11.prod.outlook.com (20.179.151.10) by MN2PR11MB3872.namprd11.prod.outlook.com (10.255.180.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.14; Fri, 20 Dec 2019 16:20:41 +0000 Received: from MN2PR11MB4160.namprd11.prod.outlook.com ([fe80::305a:2722:fd8e:bec7]) by MN2PR11MB4160.namprd11.prod.outlook.com ([fe80::305a:2722:fd8e:bec7%4]) with mapi id 15.20.2559.016; Fri, 20 Dec 2019 16:20:41 +0000 From: "Kinsella, Ray" To: "Richardson, Bruce" , David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Laatz, Kevin" , "aconole@redhat.com" , "nhorman@tuxdriver.com" , Michael Santana , "Mcnamara, John" , "Kovacevic, Marko" Thread-Topic: [PATCH] add ABI checks Thread-Index: AQHVt0lHeytI8KABvU62ODvABqKYnqfDJfBAgAAN7AA= Date: Fri, 20 Dec 2019 16:20:41 +0000 Message-ID: References: <20191220152058.10739-1-david.marchand@redhat.com> <59AF69C657FD0841A61C55336867B5B07EEAB0AE@IRSMSX103.ger.corp.intel.com> In-Reply-To: <59AF69C657FD0841A61C55336867B5B07EEAB0AE@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDVlOWRhMzYtMWFmYi00OWYzLTk4MDQtMmIyYzIyYTZlZjJkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSFlocE8xUFNDaDYzcHpUM3pYajA3ejdjUUw1VHRacU9wb2I1SU9OakRuMlZtNlwvZXpXTFJjdDJcL2VTeGEzanF5In0= dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action authentication-results: spf=none (sender IP is ) smtp.mailfrom=ray.kinsella@intel.com; x-originating-ip: [192.198.151.181] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 696cc74c-4aa3-4cde-31ea-08d785688ee5 x-ms-traffictypediagnostic: MN2PR11MB3872: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2733; x-forefront-prvs: 025796F161 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(136003)(39860400002)(396003)(366004)(13464003)(189003)(199004)(54906003)(81166006)(81156014)(8676002)(33656002)(7696005)(52536014)(186003)(26005)(86362001)(64756008)(66476007)(316002)(66446008)(66946007)(110136005)(76116006)(8936002)(6506007)(53546011)(9686003)(5660300002)(107886003)(478600001)(71200400001)(66556008)(4326008)(55016002)(30864003)(2906002)(21314003); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR11MB3872; H:MN2PR11MB4160.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FbRG4J1UJouxfTZozf+y5+breVh0fSPL0wJqEVXYSF/RHwRnAx3r/zHzBmgpo84g6Mm5evXncxmLMKGf9kGiJG4C2I7/nlhHHfX6Rp+q9vRCEUCeHf2gOcaZ9UuDps/gLV5rXwOxrXZL4pqHGB5Jecpd1S5W3Er4Pt0pL/sPfw5zVFd5CMq+u5EUv1AYVubpLMm6h+iNQEFgh2jLFKLy6dvTEMmX5y2cEqQfzOeE9VUDlHdSgyNss0LpcXsDiTKk/EeYgJeUVnV6eANHHNC3ZUhStTLxEBNr1HPg6yP+NQCWkZtn3GPe37RjLFFSn6mGBt8wkB/amDjgkZpe15qmytYPb07Ly40YUHoX00NCub5dVb3LyV6bwL+agZsMdMOXLVEFh4NpkJddnZzrfz5imEAVgDBFSOZj85emBEdBvHnjf85dVGPaj15eWw6uNT+5LhwhToVcYzaxJlG+beI0hsMbjKaMdCEgSs82prQJt+5vMIRo1O6K51qmDL+LlzKXGCp7OjLJ/CNyOWaTtepdwVwUAX4Q/0GCb+QmD6mbCzmrDQNGUZ0KtRomq1cAlnx6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 696cc74c-4aa3-4cde-31ea-08d785688ee5 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2019 16:20:41.3974 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zTUQNgzgOQ8MQSnhedUex85Zm1Add6+eLJpnznv5o5LtthC2p+OTgsvxlNUgTVHWa1OY/5oshENgjK/mteUe9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3872 X-OriginatorOrg: intel.com X-Mailman-Approved-At: Fri, 03 Jan 2020 11:49:00 +0100 Subject: Re: [dpdk-dev] [PATCH] 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" > -----Original Message----- > From: Richardson, Bruce > Sent: Friday 20 December 2019 15:32 > To: David Marchand ; dev@dpdk.org > Cc: thomas@monjalon.net; Laatz, Kevin ; > aconole@redhat.com; nhorman@tuxdriver.com; Michael Santana > ; Mcnamara, John ; > Kovacevic, Marko ; Kinsella, Ray > > Subject: RE: [PATCH] add ABI checks >=20 >=20 >=20 > > -----Original Message----- > > From: David Marchand > > Sent: Friday, December 20, 2019 3:21 PM > > To: dev@dpdk.org > > Cc: thomas@monjalon.net; Richardson, Bruce > > ; Laatz, Kevin ; > > aconole@redhat.com; nhorman@tuxdriver.com; Michael Santana > > ; Mcnamara, John > ; > > Kovacevic, Marko > > Subject: [PATCH] add ABI checks > > > > Starting from Kevin and Bruce idea of using libabigail, here is an > > alternate approach to implement ABI checks. > > > > By default, those checks are disabled and enabling them requires a > > manual step that generates the ABI dumps on a reference version for a > > set of configurations. > > > > Those checks are enabled in the CI by default for the default meson > > options on x86 and aarch64 so that proposed patches are validated. > > A cache of the ABI is stored in travis jobs. > > Checks can be only informational by setting ABI_CHECKS_WARN_ONLY when > > breaking the ABI in a future release. > > > > For advanced developers and maintainers, the contributing guide > > details the higher level scripts that are quite close to the existing > > devtools scripts. > > > > Signed-off-by: David Marchand > > --- > > .ci/linux-build.sh | 43 +++++++++++++++++++++++++++ > > .travis.yml | 20 +++++++++++-- > > devtools/check-abi-dump.sh | 46 > +++++++++++++++++++++++++++++ > > devtools/check-abi-reference.sh | 27 +++++++++++++++++ > > devtools/dpdk.abignore | 2 ++ > > devtools/gen-abi-dump.sh | 29 ++++++++++++++++++ > > devtools/gen-abi-reference.sh | 24 +++++++++++++++ > > devtools/test-build.sh | 13 ++++++-- > > devtools/test-meson-builds.sh | 6 ++++ > > doc/guides/contributing/patches.rst | 25 ++++++++++++++++ > > 10 files changed, 230 insertions(+), 5 deletions(-) create mode > > 100755 devtools/check-abi-dump.sh create mode 100755 > > devtools/check-abi- reference.sh create mode 100644 > > devtools/dpdk.abignore create mode > > 100755 devtools/gen-abi-dump.sh create mode 100755 devtools/gen-abi- > > reference.sh > > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index > > ccc3a7ccd..345dba264 100755 > > --- a/.ci/linux-build.sh > > +++ b/.ci/linux-build.sh > > @@ -30,8 +30,51 @@ fi > > > > OPTS=3D"$OPTS --default-library=3D$DEF_LIB" > > meson build --werror -Dexamples=3Dall $OPTS > > + > > +if [ "$ABI_CHECKS" =3D "1" ]; then > > + git remote add ref ${REF_GIT_REPO:-https://dpdk.org/git/dpdk} > > + git fetch --tags ref ${REF_GIT_BRANCH:-master} > > + > > + head=3D$(git describe --all) > > + tag=3D$(git describe --abbrev=3D0) > > + > > + if [ "$(cat reference/VERSION 2>/dev/null)" !=3D "$tag" ]; then > > + rm -rf reference > > + fi > > + > > + if [ ! -d reference ]; then > > + gen_abi_dump=3D$(mktemp -t gen-abi-dump-XXX.sh) > > + cp -a devtools/gen-abi-dump.sh $gen_abi_dump > > + > > + git checkout -qf $tag > > + ninja -C build > > + $gen_abi_dump build reference > > + > > + if [ "$AARCH64" !=3D "1" ]; then > > + mkdir -p reference/app > > + cp -a build/app/dpdk-testpmd reference/app/ > > + > > + export > LD_LIBRARY_PATH=3D$(pwd)/build/lib:$(pwd)/build/drivers > > + devtools/test-null.sh reference/app/dpdk-testpmd > > + unset LD_LIBRARY_PATH > > + fi > > + echo $tag > reference/VERSION > > + > > + git checkout -qf $head > > + fi > > +fi > > + > > ninja -C build > > > > +if [ "$ABI_CHECKS" =3D "1" ]; then > > + devtools/check-abi-dump.sh build reference > ${ABI_CHECKS_WARN_ONLY:-} > > + if [ "$AARCH64" !=3D "1" ]; then > > + export LD_LIBRARY_PATH=3D$(pwd)/build/lib:$(pwd)/build/drivers > > + devtools/test-null.sh reference/app/dpdk-testpmd > > + unset LD_LIBRARY_PATH > > + fi > > +fi > > + > > if [ "$AARCH64" !=3D "1" ]; then > > devtools/test-null.sh > > fi > > diff --git a/.travis.yml b/.travis.yml index 8f90d06f2..bbb060fa2 > > 100644 > > --- a/.travis.yml > > +++ b/.travis.yml > > @@ -1,5 +1,8 @@ > > language: c > > -cache: ccache > > +cache: > > + ccache: true > > + directories: > > + - reference > > compiler: > > - gcc > > - clang > > @@ -21,7 +24,7 @@ aarch64_packages: &aarch64_packages > > > > extra_packages: &extra_packages > > - *required_packages > > - - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4] > > + - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4, > > + abigail-tools] > > > > build_32b_packages: &build_32b_packages > > - *required_packages > > @@ -59,6 +62,13 @@ matrix: > > apt: > > packages: > > - *aarch64_packages > > + - env: DEF_LIB=3D"shared" EXTRA_PACKAGES=3D1 ABI_CHECKS=3D1 AARCH64= =3D1 > > + compiler: gcc > > + addons: > > + apt: > > + packages: > > + - *aarch64_packages > > + - *extra_packages > > - env: DEF_LIB=3D"static" EXTRA_PACKAGES=3D1 > > compiler: gcc > > addons: > > @@ -72,6 +82,12 @@ matrix: > > packages: > > - *extra_packages > > - *doc_packages > > + - env: DEF_LIB=3D"shared" EXTRA_PACKAGES=3D1 ABI_CHECKS=3D1 > > + compiler: gcc > > + addons: > > + apt: > > + packages: > > + - *extra_packages > > - env: DEF_LIB=3D"static" OPTS=3D"-Denable_kmods=3Dfalse" > EXTRA_PACKAGES=3D1 > > compiler: gcc > > addons: > > diff --git a/devtools/check-abi-dump.sh b/devtools/check-abi-dump.sh > > new file mode 100755 index 000000000..f48a2ae7e > > --- /dev/null > > +++ b/devtools/check-abi-dump.sh > > @@ -0,0 +1,46 @@ > > +#!/bin/sh -e > > +# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2019 Red > Hat, > > +Inc. > > + > > +if [ $# !=3D 2 ] && [ $# !=3D 3 ]; then > > + echo "Usage: $0 builddir dumpdir [warnonly]" > > + exit 1 > > +fi > > + > > +builddir=3D$1 > > +dumpdir=3D$2 > > +warnonly=3D${3:-} > > +if [ ! -d $builddir ]; then > > + echo "Error: build directory '$builddir' does not exist." > > + exit 1 > > +fi > > +if [ ! -d $dumpdir ]; then > > + echo "Error: dump directory '$dumpdir' does not exist." > > + exit 1 > > +fi > > + > > +ABIDIFF_OPTIONS=3D"--suppr $(dirname $0)/dpdk.abignore" > > +for dump in $(find $dumpdir -name "*.dump"); do > > + libname=3D$(basename $dump) > > + libname=3D${libname%.dump} > > + result=3D > > + for f in $(find $builddir -name "$libname.so.*"); do > > + if test -L $f || [ "$f" !=3D "${f%%.symbols}" ]; then > > + continue > > + fi > > + result=3Dfound > > + > > + if ! abidiff $ABIDIFF_OPTIONS $dump $f; then > > + if [ -z "$warnonly" ]; then > > + echo "Error: ABI issue reported for $dump, $f" > > + exit 1 > > + fi > > + echo "Warning: ABI issue reported for $dump, $f" > > + fi > > + break > > + done > > + if [ "$result" !=3D "found" ]; then > > + echo "Error: can't find a library for dump file $dump" > > + exit 1 > > + fi > > +done > > diff --git a/devtools/check-abi-reference.sh b/devtools/check-abi- > > reference.sh new file mode 100755 index 000000000..7addb094e > > --- /dev/null > > +++ b/devtools/check-abi-reference.sh > > @@ -0,0 +1,27 @@ > > +#!/bin/sh -e > > +# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2019 Red > Hat, > > +Inc. > > + > > +devtools_dir=3D$(dirname $(readlink -f $0)) . > > +$devtools_dir/load-devel-config > > + > > +abi_ref_build_dir=3D${DPDK_ABI_REF_BUILD_DIR:-reference} > > +builds_dir=3D${DPDK_BUILD_TEST_DIR:-.} > > + > > +for dir in $abi_ref_build_dir/*; do > > + if [ "$dir" =3D "$abi_ref_build_dir" ]; then > > + exit 1 > > + fi > > + if [ ! -d $dir/dump ]; then > > + echo "Skipping $dir" > > + continue > > + fi > > + target=3D$(basename $dir) > > + if [ -d $builds_dir/$target/install ]; then > > + libdir=3D$builds_dir/$target/install > > + else > > + libdir=3D$builds_dir/$target > > + fi > > + echo "Checking ABI between $libdir and $dir/dump" > > + $devtools_dir/check-abi-dump.sh $libdir $dir/dump done > > diff --git a/devtools/dpdk.abignore b/devtools/dpdk.abignore new file > > mode > > 100644 index 000000000..b866b7f26 > > --- /dev/null > > +++ b/devtools/dpdk.abignore > > @@ -0,0 +1,2 @@ > > +[suppress_function] > > + symbol_version =3D EXPERIMENTAL > > diff --git a/devtools/gen-abi-dump.sh b/devtools/gen-abi-dump.sh new > > file mode 100755 index 000000000..4e38d751f > > --- /dev/null > > +++ b/devtools/gen-abi-dump.sh > > @@ -0,0 +1,29 @@ > > +#!/bin/sh -e > > +# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2019 Red > Hat, > > +Inc. > > + > > +if [ $# !=3D 2 ]; then > > + echo "Usage: $0 builddir dumpdir" > > + exit 1 > > +fi > > + > > +builddir=3D$1 > > +dumpdir=3D$2 > > +if [ ! -d $builddir ]; then > > + echo "Error: build directory '$builddir' does not exist." > > + exit 1 > > +fi > > +if [ -d $dumpdir ]; then > > + echo "Error: dump directory '$dumpdir' already exists." > > + exit 1 > > +fi > > + > > +mkdir -p $dumpdir > > +for f in $(find $builddir -name "*.so.*"); do > > + if test -L $f || [ "$f" !=3D "${f%%.symbols}" ]; then > > + continue > > + fi > > + > > + libname=3D$(basename $f) > > + abidw --out-file $dumpdir/${libname%.so.*}.dump $f done > > diff --git a/devtools/gen-abi-reference.sh > > b/devtools/gen-abi-reference.sh new file mode 100755 index > > 000000000..f41d7fadc > > --- /dev/null > > +++ b/devtools/gen-abi-reference.sh > > @@ -0,0 +1,24 @@ > > +#!/bin/sh -e > > +# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2019 Red > Hat, > > +Inc. > > + > > +devtools_dir=3D$(dirname $(readlink -f $0)) . > > +$devtools_dir/load-devel-config > > + > > +abi_ref_build_dir=3D${DPDK_ABI_REF_BUILD_DIR:-reference} > > +for dir in $abi_ref_build_dir/*; do > > + if [ "$dir" =3D "$abi_ref_build_dir" ]; then > > + exit 1 > > + fi > > + if [ -d $dir/dump ]; then > > + echo "Skipping $dir" > > + continue > > + fi > > + if [ -d $dir/install ]; then > > + libdir=3D$dir/install > > + else > > + libdir=3D$dir > > + fi > > + echo "Dumping libraries from $libdir in $dir/dump" > > + $devtools_dir/gen-abi-dump.sh $libdir $dir/dump done > > diff --git a/devtools/test-build.sh b/devtools/test-build.sh index > > 52305fbb8..8cb5b56fb 100755 > > --- a/devtools/test-build.sh > > +++ b/devtools/test-build.sh > > @@ -30,7 +30,8 @@ default_path=3D$PATH > > # - LIBSSO_SNOW3G_PATH > > # - LIBSSO_KASUMI_PATH > > # - LIBSSO_ZUC_PATH > > -. $(dirname $(readlink -f $0))/load-devel-config > > +devtools_dir=3D$(dirname $(readlink -f $0)) . > > +$devtools_dir/load-devel-config > > > > print_usage () { > > echo "usage: $(basename $0) [-h] [-jX] [-s] [config1 [config2] > > ...]]" > > @@ -64,6 +65,7 @@ print_help () { > > [ -z $MAKE ] && echo "Cannot find make or gmake" && exit 1 > > > > J=3D$DPDK_MAKE_JOBS > > +abi_ref_build_dir=3D${DPDK_ABI_REF_BUILD_DIR:-reference} > > builds_dir=3D${DPDK_BUILD_TEST_DIR:-.} > > short=3Dfalse > > unset verbose > > @@ -97,7 +99,7 @@ trap "signal=3DINT ; trap - INT ; kill -INT $$" INT > # > > notify result on exit trap on_exit EXIT > > > > -cd $(dirname $(readlink -f $0))/.. > > +cd $devtools_dir/.. > > > > reset_env () > > { > > @@ -233,7 +235,7 @@ for conf in $configs ; do > > # reload config with DPDK_TARGET set > > DPDK_TARGET=3D$target > > reset_env > > - . $(dirname $(readlink -f $0))/load-devel-config > > + . $devtools_dir/load-devel-config > > > > options=3D$(echo $conf | sed 's,[^~+]*,,') > > dir=3D$builds_dir/$conf > > @@ -246,6 +248,11 @@ for conf in $configs ; do > > export RTE_TARGET=3D$target > > rm -rf $dir/install > > ${MAKE} install O=3D$dir DESTDIR=3D$dir/install prefix=3D > > + if [ -d $abi_ref_build_dir/$conf/dump ]; then > > + echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Check A= BI $conf" > > + $devtools_dir/check-abi-dump.sh $dir/install \ > > + $abi_ref_build_dir/$conf/dump > > + fi > > echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Build ex= amples for $conf" > > export RTE_SDK=3D$(readlink -f $dir)/install/share/dpdk > > ln -sTf $(pwd)/lib $RTE_SDK/lib # workaround for vm_power_manager > > diff --git a/devtools/test-meson-builds.sh > > b/devtools/test-meson-builds.sh index 688567714..aaefa38a2 100755 > > --- a/devtools/test-meson-builds.sh > > +++ b/devtools/test-meson-builds.sh > > @@ -16,6 +16,7 @@ srcdir=3D$(dirname $(readlink -f $0))/.. > > > > MESON=3D${MESON:-meson} > > use_shared=3D"--default-library=3Dshared" > > +abi_ref_build_dir=3D${DPDK_ABI_REF_BUILD_DIR:-reference} > > builds_dir=3D${DPDK_BUILD_TEST_DIR:-.} > > > > if command -v gmake >/dev/null 2>&1 ; then @@ -88,6 +89,11 @@ build > > () # > > echo "$ninja_cmd -C $builddir" > > $ninja_cmd -C $builddir > > fi > > + > > + if [ -d $abi_ref_build_dir/$1/dump ]; then > > + $srcdir/devtools/check-abi-dump.sh $builddir > > + $abi_ref_build_dir/$1/dump > > + fi > > } > > > > if [ "$1" =3D "-vv" ] ; then > > diff --git a/doc/guides/contributing/patches.rst > > b/doc/guides/contributing/patches.rst > > index 0686450e4..de3dff145 100644 > > --- a/doc/guides/contributing/patches.rst > > +++ b/doc/guides/contributing/patches.rst > > @@ -513,6 +513,31 @@ in a single subfolder called "__builds" created > > in the current directory. > > Setting ``DPDK_BUILD_TEST_DIR`` to an absolute directory path e.g. > > ``/tmp`` is also supported. > > > > > > +Checking ABI compatibility > > +-------------------------- > > + > > +The first thing is to build reference binaries for the latest > release > > +your patches are built on top of. > > + > > +Either you are in a git tree and an easy way to identify this is to > run:: > > + > > + git checkout $(git describe --abbrev=3D0) > > + > > +Or you use a tarball and you extract the sources in a director of > > +your > > choice. > > + > > +Next is building those sources, refer to the previous paragraph. > > +You can set ``DPDK_BUILD_TEST_DIR=3Dreference``, so that the builds > > +occur in this directory. > > + > > +Finally, the ABI dump files are generated with the > > +``devtools/gen-abi-reference.sh`` script. This script will look for > > +builds in the current sub directory ``reference``. But you can set > > +the environment variable ``DPDK_ABI_REF_BUILD_DIR`` to a different > location. > > + > > +Once done, you can check your current binaries ABI with this > > +reference with the ``devtools/check-abi-reference.sh`` script. > > + > > + > > Sending Patches > > --------------- > > > > -- > > 2.23.0 >=20 > I still very much dislike forcing the user to generate his own > reference version to compare the ABI against. These should be archived > and the user should just be able to pull them down via git or http or > otherwise. Two reasons for this: >=20 > 1. Less error prone, since there is no chance of the user having an > incorrect build for whatever reason. >=20 > 2. Less effort for the user than asking them to do extra builds. The > more steps the user has to follow, the less likely they are to attempt > the process. >=20 > Regards, > /Bruce >=20 +1 ... 100% agree with this. Many people won't know or understand what the reference is,=20 or why they to generate it.=20 Ray K