get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 90006,
    "url": "https://patches.dpdk.org/api/patches/90006/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1617015818-13240-1-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": "<1617015818-13240-1-git-send-email-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1617015818-13240-1-git-send-email-juraj.linkes@pantheon.tech",
    "date": "2021-03-29T11:03:38",
    "name": "[v3] build: add platform meson option",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a7d5e415eb853cc3bc94ed6e6d59bfe247d43c69",
    "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/1617015818-13240-1-git-send-email-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 15945,
            "url": "https://patches.dpdk.org/api/series/15945/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15945",
            "date": "2021-03-29T11:03:38",
            "name": "[v3] build: add platform meson option",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/15945/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/90006/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/90006/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 C85D3A034F;\n\tMon, 29 Mar 2021 13:03:43 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3D72140151;\n\tMon, 29 Mar 2021 13:03:43 +0200 (CEST)",
            "from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20])\n by mails.dpdk.org (Postfix) with ESMTP id 56AFB40042\n for <dev@dpdk.org>; Mon, 29 Mar 2021 13:03:41 +0200 (CEST)",
            "from localhost (localhost [127.0.0.1])\n by lb.pantheon.sk (Postfix) with ESMTP id 9AB2EC4F07;\n Mon, 29 Mar 2021 13:03:40 +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 4jV0ZnE7nTA6; Mon, 29 Mar 2021 13:03:39 +0200 (CEST)",
            "from service-node1.lab.pantheon.local (unknown [46.229.239.141])\n by lb.pantheon.sk (Postfix) with ESMTP id E5170C4EEB;\n Mon, 29 Mar 2021 13:03:38 +0200 (CEST)"
        ],
        "X-Virus-Scanned": "amavisd-new at siecit.sk",
        "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "To": "thomas@monjalon.net, david.marchand@redhat.com,\n bruce.richardson@intel.com,\n Honnappa.Nagarahalli@arm.com",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Date": "Mon, 29 Mar 2021 13:03:38 +0200",
        "Message-Id": "<1617015818-13240-1-git-send-email-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1609761130-4627-1-git-send-email-juraj.linkes@pantheon.tech>",
        "References": "<1609761130-4627-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 v3] build: add platform meson option",
        "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": "The current meson option 'machine' should only specify the ISA, which is\nnot sufficient for Arm, where setting ISA implies other setting as well.\nAdd a new meson option, 'platform', which differentiates the type of the\nbuild (native/generic) and sets machine accordingly, unless the user\nchooses to override it.\nThe 'machine' option also doesn't describe very well what it sets, so\nintroduce a new option 'cpu_instruction_set', but keep 'machine' for\nbackwards compatibility.\nThese two new variables, taken together, achieve what 'machine' was\nsetting per architecture - setting the ISA in x86 build and setting\nnative/default 'build type' in aarch64 build - is now properly being set\nfor all architectures in a uniform manner.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n config/meson.build            | 47 +++++++++++++++++++++++++----------\n devtools/test-meson-builds.sh |  9 ++++---\n meson_options.txt             |  8 ++++--\n 3 files changed, 45 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/config/meson.build b/config/meson.build\nindex 66a2edcc47..32c9e18c17 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -63,42 +63,63 @@ if not is_windows\n \t\t\tpmd_subdir_opt)\n endif\n \n-# set the machine type and cflags for it\n+platform = get_option('platform')\n+\n+# set the cpu_instruction_set type and cflags for it\n if meson.is_cross_build()\n-\tmachine = host_machine.cpu()\n+\tcpu_instruction_set = host_machine.cpu()\n else\n-\tmachine = get_option('machine')\n+\tcpu_instruction_set = get_option('cpu_instruction_set')\n+\tif get_option('machine') != 'auto'\n+\t\twarning('The \"machine\" option is deprecated. ' +\n+\t\t        'Please use \"cpu_instruction_set\" instead.')\n+\t\tif cpu_instruction_set != 'auto'\n+\t\t\terror('Setting both \"machine\" and ' +\n+\t\t\t      '\"cpu_instruction_set\" is unsupported.')\n+\t\tendif\n+\t\tcpu_instruction_set = get_option('machine')\n+\tendif\n+endif\n+\n+if platform == 'native'\n+\tif cpu_instruction_set == 'auto'\n+\t\tcpu_instruction_set = 'native'\n+\tendif\n+elif platform == 'generic'\n+\tif cpu_instruction_set == 'auto'\n+\t\tcpu_instruction_set = 'default'\n+\tendif\n endif\n \n-# machine type 'default' is special, it defaults to the per arch agreed common\n+if cpu_instruction_set == 'default'\n+# cpu_instruction_set type 'default' is special, it defaults to the per arch agreed common\n # minimal baseline needed for DPDK.\n # That might not be the most optimized, but the most portable version while\n # still being able to support the CPU features required for DPDK.\n # This can be bumped up by the DPDK project, but it can never be an\n # invariant like 'native'\n-if machine == 'default'\n \tif host_machine.cpu_family().startswith('x86')\n \t\t# matches the old pre-meson build systems default\n-\t\tmachine = 'corei7'\n+\t\tcpu_instruction_set = 'corei7'\n \telif host_machine.cpu_family().startswith('arm')\n-\t\tmachine = 'armv7-a'\n+\t\tcpu_instruction_set = 'armv7-a'\n \telif host_machine.cpu_family().startswith('aarch')\n \t\t# arm64 manages defaults in config/arm/meson.build\n-\t\tmachine = 'default'\n+\t\tcpu_instruction_set = 'default'\n \telif host_machine.cpu_family().startswith('ppc')\n-\t\tmachine = 'power8'\n+\t\tcpu_instruction_set = 'power8'\n \tendif\n endif\n \n-dpdk_conf.set('RTE_MACHINE', machine)\n+dpdk_conf.set('RTE_MACHINE', cpu_instruction_set)\n machine_args = []\n \n # ppc64 does not support -march= at all, use -mcpu and -mtune for that\n if host_machine.cpu_family().startswith('ppc')\n-\tmachine_args += '-mcpu=' + machine\n-\tmachine_args += '-mtune=' + machine\n+\tmachine_args += '-mcpu=' + cpu_instruction_set\n+\tmachine_args += '-mtune=' + cpu_instruction_set\n else\n-\tmachine_args += '-march=' + machine\n+\tmachine_args += '-march=' + cpu_instruction_set\n endif\n \n toolchain = cc.get_id()\ndiff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh\nindex c11ae87e0d..b413b9e96a 100755\n--- a/devtools/test-meson-builds.sh\n+++ b/devtools/test-meson-builds.sh\n@@ -223,12 +223,13 @@ done\n # test compilation with minimal x86 instruction set\n # Set the install path for libraries to \"lib\" explicitly to prevent problems\n # with pkg-config prefixes if installed in \"lib/x86_64-linux-gnu\" later.\n-default_machine='nehalem'\n-if ! check_cc_flags \"-march=$default_machine\" ; then\n-\tdefault_machine='corei7'\n+default_isa='nehalem'\n+if ! check_cc_flags \"-march=$default_isa\" ; then\n+\tdefault_isa='corei7'\n fi\n build build-x86-default cc skipABI -Dcheck_includes=true \\\n-\t-Dlibdir=lib -Dmachine=$default_machine $use_shared\n+\t-Dlibdir=lib -Dcpu_instruction_set=$default_isa \\\n+\t$use_shared\n \n # 32-bit with default compiler\n if check_cc_flags '-m32' ; then\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 3b8c5d316d..c6047f3405 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -2,6 +2,8 @@\n \n option('check_includes', type: 'boolean', value: false,\n \tdescription: 'build \"chkincs\" to verify each header file can compile alone')\n+option('cpu_instruction_set', type: 'string', value: 'auto',\n+\tdescription: 'Set the target machine ISA (instruction set architecture). Will be set according to the platform option by default.')\n option('disable_drivers', type: 'string', value: '',\n \tdescription: 'Comma-separated list of drivers to explicitly disable.')\n option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',\n@@ -20,14 +22,16 @@ option('include_subdir_arch', type: 'string', value: '',\n \tdescription: 'subdirectory where to install arch-dependent headers')\n option('kernel_dir', type: 'string', value: '',\n \tdescription: 'Path to the kernel for building kernel modules. Headers must be in $kernel_dir or $kernel_dir/build. Modules will be installed in /lib/modules.')\n-option('machine', type: 'string', value: 'native',\n-\tdescription: 'set the target machine type')\n+option('machine', type: 'string', value: 'auto',\n+\tdescription: 'Set the target machine ISA (instruction set architecture).')\n option('max_ethports', type: 'integer', value: 32,\n \tdescription: 'maximum number of Ethernet devices')\n option('max_lcores', type: 'integer', value: 128,\n \tdescription: 'maximum number of cores/threads supported by EAL')\n option('max_numa_nodes', type: 'integer', value: 32,\n \tdescription: 'maximum number of NUMA nodes supported by EAL')\n+option('platform', type: 'string', value: 'generic',\n+\tdescription: 'Platform to build, either \"native\" or \"generic\".')\n option('enable_trace_fp', type: 'boolean', value: false,\n \tdescription: 'enable fast path trace points.')\n option('tests', type: 'boolean', value: true,\n",
    "prefixes": [
        "v3"
    ]
}