get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 91460,
    "url": "https://patches.dpdk.org/api/patches/91460/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1618407696-20483-2-git-send-email-juraj.linkes@pantheon.tech/",
    "project": {
        "id": 1,
        "url": "https://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": "<1618407696-20483-2-git-send-email-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1618407696-20483-2-git-send-email-juraj.linkes@pantheon.tech",
    "date": "2021-04-14T13:41:34",
    "name": "[v21,1/3] build: disable/enable drivers in Arm builds",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "32d1e1293f1fbf62e4ca3495fc30da9f7832899c",
    "submitter": {
        "id": 1626,
        "url": "https://patches.dpdk.org/api/people/1626/?format=api",
        "name": "Juraj Linkeš",
        "email": "juraj.linkes@pantheon.tech"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1618407696-20483-2-git-send-email-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 16373,
            "url": "https://patches.dpdk.org/api/series/16373/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16373",
            "date": "2021-04-14T13:41:33",
            "name": "Arm build options rework",
            "version": 21,
            "mbox": "https://patches.dpdk.org/series/16373/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/91460/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/91460/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 66B73A0562;\n\tWed, 14 Apr 2021 15:41:47 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F31B7161B1F;\n\tWed, 14 Apr 2021 15:41:43 +0200 (CEST)",
            "from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20])\n by mails.dpdk.org (Postfix) with ESMTP id 173D04013F\n for <dev@dpdk.org>; Wed, 14 Apr 2021 15:41:42 +0200 (CEST)",
            "from localhost (localhost [127.0.0.1])\n by lb.pantheon.sk (Postfix) with ESMTP id 18722C5672;\n Wed, 14 Apr 2021 15:41:39 +0200 (CEST)",
            "from lb.pantheon.sk ([127.0.0.1])\n by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id YSPWCJnECVMT; Wed, 14 Apr 2021 15:41:38 +0200 (CEST)",
            "from service-node1.lab.pantheon.local (unknown [46.229.239.141])\n by lb.pantheon.sk (Postfix) with ESMTP id C3450C566A;\n Wed, 14 Apr 2021 15:41:37 +0200 (CEST)"
        ],
        "X-Virus-Scanned": "amavisd-new at siecit.sk",
        "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "To": "bruce.richardson@intel.com, Ruifeng.Wang@arm.com,\n Honnappa.Nagarahalli@arm.com, Phil.Yang@arm.com, vcchunga@amazon.com,\n Dharmik.Thakkar@arm.com, jerinjacobk@gmail.com, hemant.agrawal@nxp.com,\n ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, aboyer@pensando.io",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Date": "Wed, 14 Apr 2021 15:41:34 +0200",
        "Message-Id": "<1618407696-20483-2-git-send-email-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1618407696-20483-1-git-send-email-juraj.linkes@pantheon.tech>",
        "References": "<1618405118-20187-1-git-send-email-juraj.linkes@pantheon.tech>\n <1618407696-20483-1-git-send-email-juraj.linkes@pantheon.tech>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v21 1/3] build: disable/enable drivers in Arm\n builds",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Add support for enabling or disabling drivers for Arm cross build. Do\nnot implement any enable/disable lists yet.\n\nEnabling drivers is useful when building for an SoC where we only want\nto build a few drivers. That way the list won't be too long.\n\nSimilarly, disabling drivers is useful when we want to disable only a\nfew drivers.\n\nBoth of these are advantageous mainly in aarch64 -> aarch64 (or arch ->\nsame arch) builds, where the build machine may have the required driver\ndependencies, yet we don't want to build drivers for a specific SoC.\n\nIf enable_drivers is a non-empty list, build only those drivers,\notherwise build all drivers and add them to enable_drivers.  If\ndisable_drivers is non-empty list, build all drivers specified in\nenable_drivers except those in disable_drivers.\n\nThere are two drivers, bus/pci and bus/vdev, which break the build if\nnot enabled. Address this by always enabling these if the user disables\nthem or doesn't specify in their allowlist.\n\nAlso remove the old Makefile arm configuration options which don't do\nanything in Meson.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\nReviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n buildtools/list-dir-globs.py                  |  7 ++--\n config/arm/meson.build                        |  4 ---\n config/meson.build                            |  4 +++\n .../linux_gsg/cross_build_dpdk_for_arm64.rst  |  8 +++++\n drivers/common/qat/meson.build                |  4 +--\n drivers/meson.build                           | 32 ++++++++++++++++---\n meson_options.txt                             |  2 ++\n 7 files changed, 48 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/buildtools/list-dir-globs.py b/buildtools/list-dir-globs.py\nindex 80b5e801f2..911e267335 100755\n--- a/buildtools/list-dir-globs.py\n+++ b/buildtools/list-dir-globs.py\n@@ -14,6 +14,7 @@\n                     os.getenv('MESON_SUBDIR', '.'))\n \n for path in sys.argv[1].split(','):\n-    for p in iglob(os.path.join(root, path)):\n-        if os.path.isdir(p):\n-            print(os.path.relpath(p))\n+    if path:\n+        for p in iglob(os.path.join(root, path)):\n+            if os.path.isdir(p):\n+                print(os.path.relpath(p))\ndiff --git a/config/arm/meson.build b/config/arm/meson.build\nindex aaed89bd5b..2984ae2db3 100644\n--- a/config/arm/meson.build\n+++ b/config/arm/meson.build\n@@ -17,9 +17,6 @@ flags_common = [\n \t#\t['RTE_ARM64_MEMCPY_ALIGN_MASK', 0xF],\n \t#\t['RTE_ARM64_MEMCPY_STRICT_ALIGN', false],\n \n-\t['RTE_NET_FM10K', false],\n-\t['RTE_NET_AVP', false],\n-\n \t['RTE_SCHED_VECTOR', false],\n \t['RTE_ARM_USE_WFE', false],\n \t['RTE_ARCH_ARM64', true],\n@@ -126,7 +123,6 @@ implementer_cavium = {\n \t\t\t\t['RTE_MACHINE', '\"octeontx2\"'],\n \t\t\t\t['RTE_ARM_FEATURE_ATOMICS', true],\n \t\t\t\t['RTE_USE_C11_MEM_MODEL', true],\n-\t\t\t\t['RTE_EAL_IGB_UIO', false],\n \t\t\t\t['RTE_MAX_LCORE', 36],\n \t\t\t\t['RTE_MAX_NUMA_NODES', 1]\n \t\t\t]\ndiff --git a/config/meson.build b/config/meson.build\nindex 3268cf6804..6e6ef8c0e1 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -63,6 +63,10 @@ if not is_windows\n \t\t\tpmd_subdir_opt)\n endif\n \n+# init disable/enable driver lists that will be populated in different places\n+disable_drivers = ''\n+enable_drivers = ''\n+\n # set the machine type and cflags for it\n if meson.is_cross_build()\n \tmachine = host_machine.cpu()\ndiff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst\nindex faaf24b95b..9b9e8ef704 100644\n--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst\n+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst\n@@ -234,3 +234,11 @@ There are other options you may specify in a cross file to tailor the build::\n       numa = false        # set to false to force building for a non-NUMA system\n          # if not set or set to true, the build system will build for a NUMA\n          # system only if libnuma is installed\n+\n+      disable_drivers = 'bus/dpaa,crypto/*'  # add disabled drivers\n+         # valid values are dir/subdirs in the drivers directory\n+         # wildcards are allowed\n+\n+      enable_drivers = 'common/*,bus/*'  # build only these drivers\n+         # valid values are dir/subdirs in the drivers directory\n+         # wildcards are allowed\ndiff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build\nindex 3ad7dd5017..fe278f734f 100644\n--- a/drivers/common/qat/meson.build\n+++ b/drivers/common/qat/meson.build\n@@ -14,13 +14,13 @@ qat_compress = true\n qat_compress_path = 'compress/qat'\n qat_compress_relpath = '../../' + qat_compress_path\n \n-if disabled_drivers.contains(qat_crypto_path)\n+if disable_drivers.contains(qat_crypto_path)\n \tqat_crypto = false\n \tdpdk_drvs_disabled += qat_crypto_path\n \tset_variable(qat_crypto_path.underscorify() + '_disable_reason',\n \t\t\t'Explicitly disabled via build config')\n endif\n-if disabled_drivers.contains(qat_compress_path)\n+if disable_drivers.contains(qat_compress_path)\n \tqat_compress = false\n \tdpdk_drvs_disabled += qat_compress_path\n \tset_variable(qat_compress_path.underscorify() + '_disable_reason',\ndiff --git a/drivers/meson.build b/drivers/meson.build\nindex 45af8749da..9aa86e7ed6 100644\n--- a/drivers/meson.build\n+++ b/drivers/meson.build\n@@ -20,8 +20,25 @@ subdirs = [\n \t'baseband', # depends on common and bus.\n ]\n \n-disabled_drivers = run_command(list_dir_globs, get_option('disable_drivers'),\n-\t\t).stdout().split()\n+if meson.is_cross_build()\n+\tdisable_drivers += ',' + meson.get_cross_property('disable_drivers', '')\n+\tenable_drivers += ',' + meson.get_cross_property('enable_drivers', '')\n+endif\n+\n+# add cmdline disabled drivers and meson disabled drivers together\n+disable_drivers += ',' + get_option('disable_drivers')\n+disable_drivers = run_command(list_dir_globs, disable_drivers).stdout().split()\n+\n+# add cmdline enabled drivers and meson enabled drivers together\n+enable_drivers = ',' + get_option('enable_drivers')\n+enable_drivers = run_command(list_dir_globs, enable_drivers).stdout().split()\n+if enable_drivers.length() == 0\n+\tenable_drivers = run_command(list_dir_globs, '*/*').stdout().split()\n+endif\n+\n+# these drivers must always be enabled, otherwise the build breaks\n+always_enable = ['bus/pci', 'bus/vdev']\n+enable_drivers += always_enable\n \n default_cflags = machine_args\n default_cflags += ['-DALLOW_EXPERIMENTAL_API']\n@@ -75,9 +92,16 @@ foreach subpath:subdirs\n \t\text_deps = []\n \t\tpkgconfig_extra_libs = []\n \n-\t\tif disabled_drivers.contains(drv_path)\n+\t\tif not enable_drivers.contains(drv_path)\n \t\t\tbuild = false\n-\t\t\treason = 'explicitly disabled via build config'\n+\t\t\treason = 'not in enabled drivers build config'\n+\t\telif disable_drivers.contains(drv_path)\n+\t\t\tif always_enable.contains(drv_path)\n+\t\t\t\tmessage('Driver @0@ cannot be disabled, not disabling.'.format(drv_path))\n+\t\t\telse\n+\t\t\t\tbuild = false\n+\t\t\t\treason = 'explicitly disabled via build config'\n+\t\t\tendif\n \t\telse\n \t\t\t# pull in driver directory which should update all the local variables\n \t\t\tsubdir(drv_path)\ndiff --git a/meson_options.txt b/meson_options.txt\nindex fa207cbada..e1dc351620 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -10,6 +10,8 @@ option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',\n \tdescription: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')\n option('enable_docs', type: 'boolean', value: false,\n \tdescription: 'build documentation')\n+option('enable_drivers', type: 'string', value: '',\n+\tdescription: 'Comma-separated list of drivers to build. If unspecified, build all drivers.')\n option('enable_driver_sdk', type: 'boolean', value: false,\n \tdescription: 'Install headers to build drivers.')\n option('enable_kmods', type: 'boolean', value: false,\n",
    "prefixes": [
        "v21",
        "1/3"
    ]
}