get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/65370/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 65370,
    "url": "http://patches.dpdk.org/api/patches/65370/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200130160009.6549-5-david.marchand@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200130160009.6549-5-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200130160009.6549-5-david.marchand@redhat.com",
    "date": "2020-01-30T16:00:09",
    "name": "[v3,4/4] add ABI checks",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9b501384abb9beb18c1467be23f15afda31ab5d4",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200130160009.6549-5-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 8357,
            "url": "http://patches.dpdk.org/api/series/8357/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8357",
            "date": "2020-01-30T16:00:06",
            "name": "add ABI checks",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/8357/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65370/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65370/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EB409A0524;\n\tThu, 30 Jan 2020 17:01:15 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DC2D41C030;\n\tThu, 30 Jan 2020 17:01:14 +0100 (CET)",
            "from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com\n [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id A617E1C022\n for <dev@dpdk.org>; Thu, 30 Jan 2020 17:01:12 +0100 (CET)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-99-uW_QP6zTMwKGukswUrNL5Q-1; Thu, 30 Jan 2020 11:00:50 -0500",
            "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com\n [10.5.11.22])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C34821084420;\n Thu, 30 Jan 2020 16:00:45 +0000 (UTC)",
            "from dmarchan.remote.csb (ovpn-204-128.brq.redhat.com\n [10.40.204.128])\n by smtp.corp.redhat.com (Postfix) with ESMTP id E0FBF1001B28;\n Thu, 30 Jan 2020 16:00:39 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1580400072;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gQwJLNhhvSliH8jnfU+ifY8i0DIB10Qbv2Fso19ewpc=;\n b=ICxVsg7xYzrCSSnOs1Ka6ZX66Gkop12nlK0KMUGAoJ5066buhK7ba1rT3oeNJykDeWvM4a\n Jc3AYztxCR77QwVzJ/lSxafy1+gUTHLYsG7dsZvpAp8j7pWZyYBdN5ObT6STdenWMy9Fvq\n G9EhSmmQAVdFXIwRVC5zxCiBYmCCuYs=",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, bruce.richardson@intel.com, kevin.laatz@intel.com,\n aconole@redhat.com, nhorman@tuxdriver.com, akhil.goyal@nxp.com,\n anoobj@marvell.com, bluca@debian.org, fiona.trahe@intel.com,\n ferruh.yigit@intel.com, Michael Santana <maicolgabriel@hotmail.com>,\n John McNamara <john.mcnamara@intel.com>,\n Marko Kovacevic <marko.kovacevic@intel.com>",
        "Date": "Thu, 30 Jan 2020 17:00:09 +0100",
        "Message-Id": "<20200130160009.6549-5-david.marchand@redhat.com>",
        "In-Reply-To": "<20200130160009.6549-1-david.marchand@redhat.com>",
        "References": "<20191220152058.10739-1-david.marchand@redhat.com>\n <20200130160009.6549-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.22",
        "X-MC-Unique": "uW_QP6zTMwKGukswUrNL5Q-1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=US-ASCII",
        "Content-Transfer-Encoding": "quoted-printable",
        "Subject": "[dpdk-dev] [PATCH v3 4/4] add ABI checks",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "For normal developers, those checks are disabled.\n\nEnabling them requires a configuration that will trigger the ABI dumps\ngeneration as part of the existing devtools/test-build.sh and\ndevtools/test-meson-builds.sh scripts.\n\nThose checks are enabled in the CI for the default meson options on x86\nand aarch64 so that proposed patches are validated via our CI robot.\nA cache of the ABI is stored in travis jobs to avoid rebuilding too\noften.\n\nChecks can be only informational by setting ABI_CHECKS_WARN_ONLY when\nbreaking the ABI in a future release.\n\nExplicit suppression rules have been added on internal structures\nexposed to crypto drivers as the current ABI policy does not apply to\nthem.\nThis could be improved in the future by carefully splitting the headers\ncontent with application and driver \"users\" in mind.\n\nWe currently have issues reported for librte_crypto recent changes for\nwhich suppression rules have been added too.\n\nMellanox glue libraries are explicitly skipped as they are not part of\nthe application ABI.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\nAcked-by: Luca Boccassi <bluca@debian.org>\n---\nChangelog since v2:\n- forced -g / buildtype=debugoptimised in the test scripts so that\n  we can check ABI in existing environments,\n- little update on the documentation,\n\nChangelog since v1:\n- reworked the scripts so that the build test scripts clone and build the\n  reference automatically. A developer only needs to set one variable to\n  enable the checks,\n- meson builds are done with debug so that abidiff can inspect the\n  structures,\n- abidiff checks only public types by looking at installed headers,\n- abidiff has some issue when comparing a dump with a .so built with clang\n  so all diff are now done with dump files only,\n- suppression rules have been added to waive warnings on exposed internal\n  types,\n- an abi breakage has been reported on changes in cryptodev.\n  For now, suppression rules have been put in place to let the CI run,\n\n---\n .ci/linux-build.sh                  | 23 +++++++++++\n .travis.yml                         | 20 +++++++++-\n MAINTAINERS                         |  2 +\n devtools/check-abi.sh               | 59 +++++++++++++++++++++++++++++\n devtools/dpdk.abignore              | 21 ++++++++++\n devtools/gen-abi.sh                 | 26 +++++++++++++\n devtools/test-build.sh              | 51 ++++++++++++++++++++++---\n devtools/test-meson-builds.sh       | 37 +++++++++++++++++-\n doc/guides/contributing/patches.rst | 15 ++++++++\n 9 files changed, 246 insertions(+), 8 deletions(-)\n create mode 100755 devtools/check-abi.sh\n create mode 100644 devtools/dpdk.abignore\n create mode 100755 devtools/gen-abi.sh",
    "diff": "diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh\nindex e61aa2b0a..95bd869c3 100755\n--- a/.ci/linux-build.sh\n+++ b/.ci/linux-build.sh\n@@ -30,6 +30,7 @@ fi\n \n OPTS=\"$OPTS --default-library=$DEF_LIB\"\n OPTS=\"$OPTS --prefix=/usr -Dlibdir=lib\"\n+OPTS=\"$OPTS --buildtype=debugoptimized\"\n meson build --werror -Dexamples=all $OPTS\n ninja -C build\n DESTDIR=$(pwd)/install ninja -C build install\n@@ -40,6 +41,28 @@ if [ \"$AARCH64\" != \"1\" ]; then\n     unset LD_LIBRARY_PATH\n fi\n \n+if [ \"$ABI_CHECKS\" = \"1\" ]; then\n+    REF_GIT_REPO=${REF_GIT_REPO:-https://dpdk.org/git/dpdk}\n+    REF_GIT_TAG=${REF_GIT_TAG:-v19.11}\n+\n+    if [ \"$(cat reference/VERSION 2>/dev/null)\" != \"$REF_GIT_TAG\" ]; then\n+        rm -rf reference\n+    fi\n+\n+    if [ ! -d reference ]; then\n+        refsrcdir=$(readlink -f $(pwd)/../dpdk-$REF_GIT_TAG)\n+        git clone --single-branch -b $REF_GIT_TAG $REF_GIT_REPO $refsrcdir\n+        meson --werror $OPTS $refsrcdir $refsrcdir/build\n+        ninja -C $refsrcdir/build\n+        DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install\n+        devtools/gen-abi.sh reference\n+        echo $REF_GIT_TAG > reference/VERSION\n+    fi\n+\n+    devtools/gen-abi.sh install\n+    devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}\n+fi\n+\n if [ \"$RUN_TESTS\" = \"1\" ]; then\n     sudo meson test -C build --suite fast-tests -t 3\n fi\ndiff --git a/.travis.yml b/.travis.yml\nindex 8162f1c05..22539d823 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -1,5 +1,8 @@\n language: c\n-cache: ccache\n+cache:\n+  ccache: true\n+  directories:\n+    - reference\n compiler:\n   - gcc\n   - clang\n@@ -21,7 +24,7 @@ aarch64_packages: &aarch64_packages\n \n extra_packages: &extra_packages\n   - *required_packages\n-  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4]\n+  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4, abigail-tools]\n \n build_32b_packages: &build_32b_packages\n   - *required_packages\n@@ -151,5 +154,18 @@ matrix:\n         packages:\n           - *required_packages\n           - *doc_packages\n+  - env: DEF_LIB=\"shared\" EXTRA_PACKAGES=1 ABI_CHECKS=1\n+    compiler: gcc\n+    addons:\n+      apt:\n+        packages:\n+          - *extra_packages\n+  - env: DEF_LIB=\"shared\" EXTRA_PACKAGES=1 ABI_CHECKS=1\n+    arch: arm64\n+    compiler: gcc\n+    addons:\n+      apt:\n+        packages:\n+          - *extra_packages\n \n script: ./.ci/${TRAVIS_OS_NAME}-build.sh\ndiff --git a/MAINTAINERS b/MAINTAINERS\nindex 94bccae6d..6dae4ee63 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -144,8 +144,10 @@ M: Neil Horman <nhorman@tuxdriver.com>\n F: lib/librte_eal/common/include/rte_compat.h\n F: lib/librte_eal/common/include/rte_function_versioning.h\n F: doc/guides/rel_notes/deprecation.rst\n+F: devtools/check-abi.sh\n F: devtools/check-abi-version.sh\n F: devtools/check-symbol-change.sh\n+F: devtools/gen-abi.sh\n F: devtools/update-abi.sh\n F: devtools/update_version_map_abi.py\n F: devtools/validate-abi.sh\ndiff --git a/devtools/check-abi.sh b/devtools/check-abi.sh\nnew file mode 100755\nindex 000000000..5872499ec\n--- /dev/null\n+++ b/devtools/check-abi.sh\n@@ -0,0 +1,59 @@\n+#!/bin/sh -e\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2019 Red Hat, Inc.\n+\n+if [ $# != 2 ] && [ $# != 3 ]; then\n+\techo \"Usage: $0 refdir newdir [warnonly]\"\n+\texit 1\n+fi\n+\n+refdir=$1\n+newdir=$2\n+warnonly=${3:-}\n+ABIDIFF_OPTIONS=\"--suppr $(dirname $0)/dpdk.abignore --no-added-syms\"\n+\n+if [ ! -d $refdir ]; then\n+\techo \"Error: reference directory '$refdir' does not exist.\"\n+\texit 1\n+fi\n+incdir=$(find $refdir -type d -a -name include)\n+if [ -z \"$incdir\" ] || [ ! -e \"$incdir\" ]; then\n+\techo \"WARNING: could not identify a include directory for $refdir, expect false positives...\"\n+else\n+\tABIDIFF_OPTIONS=\"$ABIDIFF_OPTIONS --headers-dir1 $incdir\"\n+fi\n+\n+if [ ! -d $newdir ]; then\n+\techo \"Error: directory to check '$newdir' does not exist.\"\n+\texit 1\n+fi\n+incdir2=$(find $newdir -type d -a -name include)\n+if [ -z \"$incdir2\" ] || [ ! -e \"$incdir2\" ]; then\n+\techo \"WARNING: could not identify a include directory for $newdir, expect false positives...\"\n+else\n+\tABIDIFF_OPTIONS=\"$ABIDIFF_OPTIONS --headers-dir2 $incdir2\"\n+fi\n+\n+error=\n+for dump in $(find $refdir -name \"*.dump\"); do\n+\tname=$(basename $dump)\n+\t# skip glue drivers, example librte_pmd_mlx5_glue.dump\n+\t# We can't rely on a suppression rule for now:\n+\t# https://sourceware.org/bugzilla/show_bug.cgi?id=25480\n+\tif [ \"$name\" != \"${name%%_glue.dump}\" ]; then\n+\t\techo \"Skipping ${dump}...\"\n+\t\tcontinue\n+\tfi\n+\tdump2=$(find $newdir -name $name)\n+\tif [ -z \"$dump2\" ] || [ ! -e \"$dump2\" ]; then\n+\t\techo \"Error: can't find $name in $newdir\"\n+\t\terror=1\n+\t\tcontinue\n+\tfi\n+\tif ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then\n+\t\techo \"Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'\"\n+\t\terror=1\n+\tfi\n+done\n+\n+[ -z \"$error\" ] || [ -n \"$warnonly\" ]\ndiff --git a/devtools/dpdk.abignore b/devtools/dpdk.abignore\nnew file mode 100644\nindex 000000000..f2903612c\n--- /dev/null\n+++ b/devtools/dpdk.abignore\n@@ -0,0 +1,21 @@\n+[suppress_function]\n+        symbol_version = EXPERIMENTAL\n+[suppress_variable]\n+        symbol_version = EXPERIMENTAL\n+\n+; Explicit ignore for driver-only ABI\n+[suppress_type]\n+        name = rte_cryptodev_ops\n+; Ignore this enum update as it is part of an experimental API\n+[suppress_type]\n+        type_kind = enum\n+        name = rte_crypto_asym_xform_type\n+        changed_enumerators = RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END\n+\n+; FIXME\n+[suppress_type]\n+        type_kind = enum\n+        name = rte_crypto_aead_algorithm\n+        changed_enumerators = RTE_CRYPTO_AEAD_LIST_END\n+[suppress_variable]\n+        name = rte_crypto_aead_algorithm_strings\ndiff --git a/devtools/gen-abi.sh b/devtools/gen-abi.sh\nnew file mode 100755\nindex 000000000..c44b0e228\n--- /dev/null\n+++ b/devtools/gen-abi.sh\n@@ -0,0 +1,26 @@\n+#!/bin/sh -e\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2019 Red Hat, Inc.\n+\n+if [ $# != 1 ]; then\n+\techo \"Usage: $0 installdir\"\n+\texit 1\n+fi\n+\n+installdir=$1\n+if [ ! -d $installdir ]; then\n+\techo \"Error: install directory '$installdir' does not exist.\"\n+\texit 1\n+fi\n+\n+dumpdir=$installdir/dump\n+rm -rf $dumpdir\n+mkdir -p $dumpdir\n+for f in $(find $installdir -name \"*.so.*\"); do\n+\tif test -L $f; then\n+\t\tcontinue\n+\tfi\n+\n+\tlibname=$(basename $f)\n+\tabidw --out-file $dumpdir/${libname%.so*}.dump $f\n+done\ndiff --git a/devtools/test-build.sh b/devtools/test-build.sh\nindex 52305fbb8..a97e1280e 100755\n--- a/devtools/test-build.sh\n+++ b/devtools/test-build.sh\n@@ -30,7 +30,8 @@ default_path=$PATH\n # - LIBSSO_SNOW3G_PATH\n # - LIBSSO_KASUMI_PATH\n # - LIBSSO_ZUC_PATH\n-. $(dirname $(readlink -f $0))/load-devel-config\n+devtools_dir=$(dirname $(readlink -f $0))\n+. $devtools_dir/load-devel-config\n \n print_usage () {\n \techo \"usage: $(basename $0) [-h] [-jX] [-s] [config1 [config2] ...]]\"\n@@ -64,10 +65,12 @@ print_help () {\n [ -z $MAKE ] && echo \"Cannot find make or gmake\" && exit 1\n \n J=$DPDK_MAKE_JOBS\n+refsrcdir=$(mktemp -d -t dpdk-${DPDK_ABI_REF_VERSION:-}.XXX)\n builds_dir=${DPDK_BUILD_TEST_DIR:-.}\n short=false\n unset verbose\n-maxerr=-Wfatal-errors\n+# for ABI checks, we need debuginfo\n+test_cflags=\"-Wfatal-errors -g\"\n while getopts hj:sv ARG ; do\n \tcase $ARG in\n \t\tj ) J=$OPTARG ;;\n@@ -91,13 +94,14 @@ on_exit ()\n \t\t[ \"$DPDK_NOTIFY\" != notify-send ] || \\\n \t\t\tnotify-send -u low --icon=dialog-error 'DPDK build' 'failed'\n \tfi\n+\trm -rf $refsrcdir\n }\n # catch manual interrupt to ignore notification\n trap \"signal=INT ; trap - INT ; kill -INT $$\" INT\n # notify result on exit\n trap on_exit EXIT\n \n-cd $(dirname $(readlink -f $0))/..\n+cd $devtools_dir/..\n \n reset_env ()\n {\n@@ -233,14 +237,14 @@ for conf in $configs ; do\n \t# reload config with DPDK_TARGET set\n \tDPDK_TARGET=$target\n \treset_env\n-\t. $(dirname $(readlink -f $0))/load-devel-config\n+\t. $devtools_dir/load-devel-config\n \n \toptions=$(echo $conf | sed 's,[^~+]*,,')\n \tdir=$builds_dir/$conf\n \tconfig $dir $target $options\n \n \techo \"================== Build $conf\"\n-\t${MAKE} -j$J EXTRA_CFLAGS=\"$maxerr $DPDK_DEP_CFLAGS\" \\\n+\t${MAKE} -j$J EXTRA_CFLAGS=\"$test_cflags $DPDK_DEP_CFLAGS\" \\\n \t\tEXTRA_LDFLAGS=\"$DPDK_DEP_LDFLAGS\" $verbose O=$dir\n \t! $short || break\n \texport RTE_TARGET=$target\n@@ -253,6 +257,43 @@ for conf in $configs ; do\n \t\tEXTRA_LDFLAGS=\"$DPDK_DEP_LDFLAGS\" $verbose \\\n \t\tO=$(readlink -f $dir)/examples\n \tunset RTE_TARGET\n+\tif [ -n \"$DPDK_ABI_REF_VERSION\" ]; then\n+\t\tDPDK_ABI_REF_DIR=${DPDK_ABI_REF_DIR:-reference}\n+\t\tabirefdir=$DPDK_ABI_REF_DIR/$DPDK_ABI_REF_VERSION/$conf\n+\t\tif [ ! -d $abirefdir ]; then\n+\t\t\t# clone current sources\n+\t\t\tif [ ! -d $refsrcdir/.git ]; then\n+\t\t\t\tgit clone --local --no-hardlinks \\\n+\t\t\t\t\t--single-branch \\\n+\t\t\t\t\t-b $DPDK_ABI_REF_VERSION \\\n+\t\t\t\t\t$(pwd) $refsrcdir\n+\t\t\tfi\n+\n+\t\t\tcd $refsrcdir\n+\n+\t\t\trm -rf build\n+\t\t\tconfig build $target $options\n+\n+\t\t\techo -n \"================== Build $conf \"\n+\t\t\techo \"($DPDK_ABI_REF_VERSION)\"\n+\t\t\t${MAKE} -j$J \\\n+\t\t\t\tEXTRA_CFLAGS=\"$test_cflags $DPDK_DEP_CFLAGS\" \\\n+\t\t\t\tEXTRA_LDFLAGS=\"$DPDK_DEP_LDFLAGS\" $verbose \\\n+\t\t\t\tO=build\n+\t\t\t! $short || break\n+\t\t\texport RTE_TARGET=$target\n+\t\t\t${MAKE} install O=build DESTDIR=$abirefdir \\\n+\t\t\t\tprefix=\n+\t\t\t$devtools_dir/gen-abi.sh $abirefdir\n+\n+\t\t\t# back to current workdir\n+\t\t\tcd $devtools_dir/..\n+\t\tfi\n+\n+\t\techo \"================== Check ABI $conf\"\n+\t\t$devtools_dir/gen-abi.sh $dir/install\n+\t\t$devtools_dir/check-abi.sh $abirefdir $dir/install\n+\tfi\n \techo \"################## $conf done.\"\n \tunset dir\n done\ndiff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh\nindex 747fb4a1a..23e93770d 100755\n--- a/devtools/test-meson-builds.sh\n+++ b/devtools/test-meson-builds.sh\n@@ -16,8 +16,15 @@ srcdir=$(dirname $(readlink -f $0))/..\n \n MESON=${MESON:-meson}\n use_shared=\"--default-library=shared\"\n+refsrcdir=$(mktemp -d -t dpdk-${DPDK_ABI_REF_VERSION:-}.XXX)\n builds_dir=${DPDK_BUILD_TEST_DIR:-.}\n \n+on_exit ()\n+{\n+\trm -rf $refsrcdir\n+}\n+trap on_exit EXIT\n+\n if command -v gmake >/dev/null 2>&1 ; then\n \tMAKE=gmake\n else\n@@ -64,9 +71,14 @@ config () # <dir> <builddir> <meson options>\n \tbuilddir=$1\n \tshift\n \tif [ -f \"$builddir/build.ninja\" ] ; then\n+\t\t# for existing environments, force debugoptimized so that ABI\n+\t\t# checks can run\n+\t\t$MESON configure --buildtype=debugoptimized $builddir\n \t\treturn\n \tfi\n-\toptions=\"--werror -Dexamples=all -Dlibdir=lib\"\n+\toptions=\n+\toptions=\"$options --werror -Dexamples=all -Dlibdir=lib\"\n+\toptions=\"$options --buildtype=debugoptimized\"\n \tfor option in $DPDK_MESON_OPTIONS ; do\n \t\toptions=\"$options -D$option\"\n \tdone\n@@ -107,6 +119,29 @@ build () # <directory> <target compiler> <meson options>\n \tconfig $srcdir $builds_dir/$targetdir $*\n \tcompile $builds_dir/$targetdir \\\n \t\t$(readlink -f $builds_dir/$targetdir/install)\n+\tif [ -n \"$DPDK_ABI_REF_VERSION\" ]; then\n+\t\tDPDK_ABI_REF_DIR=${DPDK_ABI_REF_DIR:-reference}\n+\t\tabirefdir=$DPDK_ABI_REF_DIR/$DPDK_ABI_REF_VERSION/$targetdir\n+\t\tif [ ! -d $abirefdir ]; then\n+\t\t\t# clone current sources\n+\t\t\tif [ ! -d $refsrcdir/.git ]; then\n+\t\t\t\tgit clone --local --no-hardlinks \\\n+\t\t\t\t\t--single-branch \\\n+\t\t\t\t\t-b $DPDK_ABI_REF_VERSION \\\n+\t\t\t\t\t$srcdir $refsrcdir\n+\t\t\tfi\n+\n+\t\t\trm -rf $refsrcdir/build\n+\t\t\tconfig $refsrcdir $refsrcdir/build $*\n+\t\t\tcompile $refsrcdir/build $abirefdir\n+\t\t\t$srcdir/devtools/gen-abi.sh $abirefdir\n+\t\tfi\n+\n+\t\t$srcdir/devtools/gen-abi.sh \\\n+\t\t\t$(readlink -f $builds_dir/$targetdir/install)\n+\t\t$srcdir/devtools/check-abi.sh $abirefdir \\\n+\t\t\t$(readlink -f $builds_dir/$targetdir/install)\n+\tfi\n }\n \n if [ \"$1\" = \"-vv\" ] ; then\ndiff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst\nindex 0686450e4..59442824a 100644\n--- a/doc/guides/contributing/patches.rst\n+++ b/doc/guides/contributing/patches.rst\n@@ -513,6 +513,21 @@ in a single subfolder called \"__builds\" created in the current directory.\n Setting ``DPDK_BUILD_TEST_DIR`` to an absolute directory path e.g. ``/tmp`` is also supported.\n \n \n+Checking ABI compatibility\n+--------------------------\n+\n+By default, ABI compatibility checks are disabled.\n+\n+To enable them, a reference version must be selected via the environment\n+variable ``DPDK_ABI_REF_VERSION``.\n+\n+The ``devtools/test-build.sh`` and ``devtools/test-meson-builds.sh`` scripts\n+then build this reference version in a temporary directory and store the\n+results in a subfolder of the current working directory.\n+The environment variable ``DPDK_ABI_REF_DIR`` can be set so that the results go\n+to a different location.\n+\n+\n Sending Patches\n ---------------\n \n",
    "prefixes": [
        "v3",
        "4/4"
    ]
}