get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 98025,
    "url": "https://patches.dpdk.org/api/patches/98025/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210906041732.1019743-4-jerinj@marvell.com/",
    "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": "<20210906041732.1019743-4-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210906041732.1019743-4-jerinj@marvell.com",
    "date": "2021-09-06T04:17:29",
    "name": "[v3,3/6] eal: support libunwind based backtrace",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "205853bb3842497df18f296f2bf0b66eae1d8d58",
    "submitter": {
        "id": 1188,
        "url": "https://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@marvell.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210906041732.1019743-4-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 18690,
            "url": "https://patches.dpdk.org/api/series/18690/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18690",
            "date": "2021-09-06T04:17:26",
            "name": "support oops handling",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/18690/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/98025/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/98025/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 7E88EA0C4D;\n\tMon,  6 Sep 2021 06:20:02 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9F7AE410F0;\n\tMon,  6 Sep 2021 06:19:58 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 6EA9E410EA\n for <dev@dpdk.org>; Mon,  6 Sep 2021 06:19:57 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 185Le8nD010416;\n Sun, 5 Sep 2021 21:19:54 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 3aw2sp140a-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 05 Sep 2021 21:19:53 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Sun, 5 Sep 2021 21:19:51 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Sun, 5 Sep 2021 21:19:51 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id 80F8A3F7065;\n Sun,  5 Sep 2021 21:19:47 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=M+pMJhlvapl4RbnlYzIvjj/zHga3oTOjf0jjUl+f0yg=;\n b=c5zzPJa0LECX6kGzM5JfDQYsXOwK2uGaHpKUchoZuZrtS9aba8HUM3O3c74skf2jWd7v\n Av0KDToWqn9ZtJbOn9gcP9c6/I1qOBbx4Nrk0iCwEY2dtQo/gj/jxvYXAQi3jKP49sr1\n xO1SemLixYx1oaRHkhMqWCI+HrAhsM6DzzqlpbzA4uWWLFyPz43LlOI0H91l6/o/Oasm\n aYfkRzUlfoZAGf6ECQR8Jd3Y7715H6sdVueP9e5XNRIh5GApnFKjFTNVMLFGvNQhJHaS\n Ia1OHjPPt5kbnHYPtK1SQLOEDgsFIBi3w0fQ2aujwhlVx71fAtznxpRl4f876emtgQM6 QQ==",
        "From": "<jerinj@marvell.com>",
        "To": "<dev@dpdk.org>, Aaron Conole <aconole@redhat.com>, Michael Santana\n <maicolgabriel@hotmail.com>, Bruce Richardson <bruce.richardson@intel.com>",
        "CC": "<thomas@monjalon.net>, <david.marchand@redhat.com>,\n <dmitry.kozliuk@gmail.com>, <navasile@linux.microsoft.com>,\n <dmitrym@microsoft.com>, <pallavi.kadam@intel.com>,\n <konstantin.ananyev@intel.com>, <ruifeng.wang@arm.com>,\n <drc@linux.vnet.ibm.com>, <stephen@networkplumber.org>, Jerin Jacob\n <jerinj@marvell.com>",
        "Date": "Mon, 6 Sep 2021 09:47:29 +0530",
        "Message-ID": "<20210906041732.1019743-4-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20210906041732.1019743-1-jerinj@marvell.com>",
        "References": "<20210817032723.3997054-1-jerinj@marvell.com>\n <20210906041732.1019743-1-jerinj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "5-6DAQYvl4nHP_DQ-Yuyvv005aEEx69y",
        "X-Proofpoint-ORIG-GUID": "5-6DAQYvl4nHP_DQ-Yuyvv005aEEx69y",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-09-06_01,2021-09-03_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v3 3/6] eal: support libunwind based backtrace",
        "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": "From: Jerin Jacob <jerinj@marvell.com>\n\nadding optional libwind library dependency to DPDK for\nenhanced backtrace based on ucontext.\n\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\n---\n .github/workflows/build.yml |  2 +-\n .travis.yml                 |  2 +-\n config/meson.build          |  8 +++++++\n lib/eal/unix/eal_oops.c     | 45 +++++++++++++++++++++++++++++++++++++\n 4 files changed, 55 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml\nindex 151641e6fa..de985776ed 100644\n--- a/.github/workflows/build.yml\n+++ b/.github/workflows/build.yml\n@@ -93,7 +93,7 @@ jobs:\n       run: sudo apt install -y ccache libnuma-dev python3-setuptools\n         python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev\n         libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev\n-        libarchive-dev\n+        libarchive-dev libunwind-dev\n     - name: Install libabigail build dependencies if no cache is available\n       if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'\n       run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev\ndiff --git a/.travis.yml b/.travis.yml\nindex 4bb5bf629e..cfb8931d3b 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -16,7 +16,7 @@ addons:\n     packages: &required_packages\n       - [libnuma-dev, python3-setuptools, python3-wheel, python3-pip, python3-pyelftools, ninja-build]\n       - [libbsd-dev, libpcap-dev, libibverbs-dev, libcrypto++-dev, libfdt-dev, libjansson-dev]\n-      - [libarchive-dev]\n+      - [libarchive-dev, libunwind-dev]\n \n _aarch64_packages: &aarch64_packages\n   - *required_packages\ndiff --git a/config/meson.build b/config/meson.build\nindex 3b5966ec2f..7f4dd52bc5 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -237,6 +237,14 @@ if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false\n     dpdk_extra_ldflags += '-latomic'\n endif\n \n+# check for libunwind\n+unwind_dep = dependency('libunwind', required: false, method: 'pkg-config')\n+if unwind_dep.found() and cc.has_header('libunwind.h', dependencies: unwind_dep)\n+    dpdk_conf.set('RTE_USE_LIBUNWIND', 1)\n+    add_project_link_arguments('-lunwind', language: 'c')\n+    dpdk_extra_ldflags += '-lunwind'\n+endif\n+\n # add -include rte_config to cflags\n add_project_arguments('-include', 'rte_config.h', language: 'c')\n \ndiff --git a/lib/eal/unix/eal_oops.c b/lib/eal/unix/eal_oops.c\nindex a480437f23..9c2d9d99d9 100644\n--- a/lib/eal/unix/eal_oops.c\n+++ b/lib/eal/unix/eal_oops.c\n@@ -28,11 +28,56 @@ struct oops_signal {\n \n static struct oops_signal signals_db[RTE_DIM(oops_signals)];\n \n+#if defined(RTE_USE_LIBUNWIND)\n+\n+#define BACKTRACE_DEPTH 256\n+#define UNW_LOCAL_ONLY\n+#include <libunwind.h>\n+\n+static void\n+back_trace_dump(ucontext_t *context)\n+{\n+\tunw_cursor_t cursor;\n+\tunw_word_t ip, off;\n+\tint rc, level = 0;\n+\tchar name[256];\n+\n+\tif (context == NULL)\n+\t\treturn;\n+\n+\trc = unw_init_local(&cursor, (unw_context_t *)context);\n+\tif (rc < 0)\n+\t\tgoto fail;\n+\n+\tfor (;;) {\n+\t\trc = unw_get_reg(&cursor, UNW_REG_IP, &ip);\n+\t\tif (rc < 0)\n+\t\t\tgoto fail;\n+\t\trc = unw_get_proc_name(&cursor, name, sizeof(name), &off);\n+\t\tif (rc == 0)\n+\t\t\toops_print(\"[%16p]: %s()+0x%\" PRIx64 \"\\n\", (void *)ip,\n+\t\t\t\t   name, (uint64_t)off);\n+\t\telse\n+\t\t\toops_print(\"[%16p]: <unknown>\\n\", (void *)ip);\n+\t\trc = unw_step(&cursor);\n+\t\tif (rc <= 0 || ++level >= BACKTRACE_DEPTH)\n+\t\t\tbreak;\n+\t}\n+\treturn;\n+fail:\n+\toops_print(\"libunwind call failed %s\\n\", unw_strerror(rc));\n+}\n+\n+#else\n+\n static void\n back_trace_dump(ucontext_t *context)\n {\n \tRTE_SET_USED(context);\n }\n+\n+#endif\n+\n static void\n siginfo_dump(int sig, siginfo_t *info)\n {\n",
    "prefixes": [
        "v3",
        "3/6"
    ]
}