get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87538,
    "url": "https://patches.dpdk.org/api/patches/87538/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1611916159-32158-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": "<1611916159-32158-1-git-send-email-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1611916159-32158-1-git-send-email-juraj.linkes@pantheon.tech",
    "date": "2021-01-29T10:29:19",
    "name": "[RFC,v1] build: kni gcc cross-compilation support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "29c76cfe3d5602130b10be5d4a08a0cb3dcbe890",
    "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/1611916159-32158-1-git-send-email-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 15032,
            "url": "https://patches.dpdk.org/api/series/15032/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15032",
            "date": "2021-01-29T10:29:19",
            "name": "[RFC,v1] build: kni gcc cross-compilation support",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/15032/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87538/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/87538/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 68E4DA09E4;\n\tFri, 29 Jan 2021 11:29:25 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3EC1B240134;\n\tFri, 29 Jan 2021 11:29:24 +0100 (CET)",
            "from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20])\n by mails.dpdk.org (Postfix) with ESMTP id 1635F40694\n for <dev@dpdk.org>; Fri, 29 Jan 2021 11:29:23 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n by lb.pantheon.sk (Postfix) with ESMTP id 09940BFD91;\n Fri, 29 Jan 2021 11:29:21 +0100 (CET)",
            "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 AI5c_VhUkATE; Fri, 29 Jan 2021 11:29:20 +0100 (CET)",
            "from service-node1.lab.pantheon.local (unknown [46.229.239.141])\n by lb.pantheon.sk (Postfix) with ESMTP id 26038BF47B;\n Fri, 29 Jan 2021 11:29:20 +0100 (CET)"
        ],
        "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, thomas@monjalon.net, Ruifeng.Wang@arm.com,\n jerinjacobk@gmail.com, hemant.agrawal@nxp.com, ferruh.yigit@intel.com,\n aboyer@pensando.io",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Date": "Fri, 29 Jan 2021 11:29:19 +0100",
        "Message-Id": "<1611916159-32158-1-git-send-email-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.7.4",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC PATCH v1] build: kni gcc cross-compilation support",
        "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 kni linux module is using a custom target for building, which\ndoesn't take into account any cross compilation arguments. The arguments\nin question are ARCH and CROSS_COMPILE. Get those from the cross file\nand pass them to the custom target.\n\nThe user supplied path may not contain the 'build' directory, such as\nwhen using cross-compiled headers, so only append that in the default\ncase (when no path is supplied in native builds) and use the unmodified\npath from the user otherwise.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n kernel/linux/kni/meson.build |  4 ++--\n kernel/linux/meson.build     | 33 +++++++++++++++++++++++++++++----\n 2 files changed, 31 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build\nindex 07e0c9dae..0fbf52c93 100644\n--- a/kernel/linux/kni/meson.build\n+++ b/kernel/linux/kni/meson.build\n@@ -13,7 +13,7 @@ kni_sources = files(\n custom_target('rte_kni',\n \tinput: kni_sources,\n \toutput: 'rte_kni.ko',\n-\tcommand: ['make', '-j4', '-C', kernel_dir + '/build',\n+\tcommand: ['make', '-j4', '-C', kernel_dir,\n \t\t'M=' + meson.current_build_dir(),\n \t\t'src=' + meson.current_source_dir(),\n \t\t'MODULE_CFLAGS=-include ' + meson.source_root() + '/config/rte_config.h' +\n@@ -21,7 +21,7 @@ custom_target('rte_kni',\n \t\t' -I' + meson.source_root() + '/lib/librte_kni' +\n \t\t' -I' + meson.build_root() +\n \t\t' -I' + meson.current_source_dir(),\n-\t\t'modules'],\n+\t\t'modules'] + cross_args,\n \tdepends: kni_mkfile,\n \tinstall: true,\n \tinstall_dir: kernel_dir + '/extra/dpdk',\ndiff --git a/kernel/linux/meson.build b/kernel/linux/meson.build\nindex 5c864a465..57ed9bc48 100644\n--- a/kernel/linux/meson.build\n+++ b/kernel/linux/meson.build\n@@ -3,20 +3,45 @@\n \n subdirs = ['kni']\n \n+cross_args = []\n # if we are cross-compiling we need kernel_dir specified\n-if get_option('kernel_dir') == '' and meson.is_cross_build()\n-\terror('Need \"kernel_dir\" option for kmod compilation when cross-compiling')\n+if meson.is_cross_build()\n+\tif get_option('kernel_dir') == ''\n+\t\terror('Need \"kernel_dir\" option for kmod compilation when cross-compiling')\n+\telse\n+\t\tcross_compiler = find_program('c').path()\n+\t\tif cross_compiler.endswith('gcc')\n+\t\t\tcross_prefix = ''\n+\t\t\t# remove the 'gcc' suffix\n+\t\t\t# meson doesn't support removing elements from an array\n+\t\t\t# nor does it support slicing, so do it on our own\n+\t\t\tforeach element : cross_compiler.split('-')\n+\t\t\t\tif element != 'gcc'\n+\t\t\t\t\tcross_prefix += '@0@-'.format(element)\n+\t\t\t\tendif\n+\t\t\tendforeach\n+\t\telse\n+\t\t\terror('Unsupported cross compiler: @0@'.format(cross_compiler))\n+\t\tendif\n+\t\tif host_machine.cpu_family() == 'aarch64'\n+\t\t\tcross_arch = 'arm64'\n+\t\telse\n+\t\t\tcross_arch = build_machine.cpu_family()\n+\t\tendif\n+\t\tcross_args = ['ARCH=@0@'.format(cross_arch),\n+\t\t\t'CROSS_COMPILE=@0@'.format(cross_prefix)]\n+\tendif\n endif\n \n kernel_dir = get_option('kernel_dir')\n if kernel_dir == ''\n \t# use default path for native builds\n \tkernel_version = run_command('uname', '-r').stdout().strip()\n-\tkernel_dir = '/lib/modules/' + kernel_version\n+\tkernel_dir = '/lib/modules/' + kernel_version + '/build'\n endif\n \n # test running make in kernel directory, using \"make kernelversion\"\n-make_returncode = run_command('make', '-sC', kernel_dir + '/build',\n+make_returncode = run_command('make', '-sC', kernel_dir,\n \t\t'kernelversion').returncode()\n if make_returncode != 0\n \terror('Cannot compile kernel modules as requested - are kernel headers installed?')\n",
    "prefixes": [
        "RFC",
        "v1"
    ]
}