get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2168,
    "url": "https://patches.dpdk.org/api/patches/2168/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1419694402-2215-1-git-send-email-rkerur@gmail.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": "<1419694402-2215-1-git-send-email-rkerur@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1419694402-2215-1-git-send-email-rkerur@gmail.com",
    "date": "2014-12-27T15:33:17",
    "name": "[dpdk-dev,v2,1/6] Move EAL common functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e12e94a43edb4611b349f70a0932b35e1bd70798",
    "submitter": {
        "id": 134,
        "url": "https://patches.dpdk.org/api/people/134/?format=api",
        "name": "Ravi Kerur",
        "email": "rkerur@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1419694402-2215-1-git-send-email-rkerur@gmail.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2168/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2168/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 0A0C35689;\n\tSat, 27 Dec 2014 16:33:35 +0100 (CET)",
            "from mail-pd0-f169.google.com (mail-pd0-f169.google.com\n\t[209.85.192.169]) by dpdk.org (Postfix) with ESMTP id 1ED7F3195\n\tfor <dev@dpdk.org>; Sat, 27 Dec 2014 16:33:33 +0100 (CET)",
            "by mail-pd0-f169.google.com with SMTP id z10so14516480pdj.28\n\tfor <dev@dpdk.org>; Sat, 27 Dec 2014 07:33:32 -0800 (PST)",
            "from iaas-l305162.englab.brocade.com ([144.49.130.148])\n\tby mx.google.com with ESMTPSA id\n\tzk9sm31325490pac.1.2014.12.27.07.33.31\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSat, 27 Dec 2014 07:33:31 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=CXNjJHBJLbX4QzGYZuJimtqr1BvSQNJEWX5cPGdYpS0=;\n\tb=xFlwvJYHMYmqWrQbqnmbRyIOm4o6494rI4TBYTgAjE0Esi3gEpZJd0+vBJrsZdZ7IW\n\tFmSzOiH9zWT5gSzlaOqXObZRtneYRR96ceZmQV3T8bJzr8HOEYC5tO6IoecJrzVT+u2i\n\t4qKvtim2liOIwPAp6HFsQawA+JcgdOJUosPn51aLiJafXQ5xoolTVmZLqiaIZN3c6nmq\n\toQG1YeJD1UODVuwh5E1lbZ8TI4pkn2to01FdO0zR/kOVQBYjFoUtWzBWNQmOaMd/eJmU\n\tJh4yx8T4bJYFCWYfsZqtiHAV04UQPGB4E5XEJimfgdXkLNSFNc6B42FdoExfpdloDjMe\n\tKROg==",
        "X-Received": "by 10.66.55.4 with SMTP id n4mr46628840pap.79.1419694412501;\n\tSat, 27 Dec 2014 07:33:32 -0800 (PST)",
        "From": "Ravi Kerur <rkerur@gmail.com>",
        "To": "dev@dpdk.org",
        "Date": "Sat, 27 Dec 2014 10:33:17 -0500",
        "Message-Id": "<1419694402-2215-1-git-send-email-rkerur@gmail.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1419694322-2114-1-git-send-email-rkerur@gmail.com>",
        "References": "<1419694322-2114-1-git-send-email-rkerur@gmail.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/6] Move EAL common functions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Changes in v2\n1. Remove rte_dump_registers() function since it is not implemented.\n2. Fix comment for _rte_exit()\n\neal_debug.c has no difference between Linux and BSD, move\ninto common directory.\nRename eal_debug.c to eal_common_debug.c\nMakefile changes to reflect file move and name change.\nFix checkpatch warnings.\n\nSigned-off-by: Ravi Kerur <rkerur@gmail.com>\n---\n app/test/test_debug.c                     |   1 -\n lib/librte_eal/bsdapp/eal/Makefile        |   2 +-\n lib/librte_eal/bsdapp/eal/eal_debug.c     | 113 ------------------------------\n lib/librte_eal/common/eal_common_debug.c  | 106 ++++++++++++++++++++++++++++\n lib/librte_eal/common/include/rte_debug.h |   7 --\n lib/librte_eal/linuxapp/eal/Makefile      |   2 +-\n lib/librte_eal/linuxapp/eal/eal_debug.c   | 113 ------------------------------\n 7 files changed, 108 insertions(+), 236 deletions(-)\n delete mode 100644 lib/librte_eal/bsdapp/eal/eal_debug.c\n create mode 100644 lib/librte_eal/common/eal_common_debug.c\n delete mode 100644 lib/librte_eal/linuxapp/eal/eal_debug.c",
    "diff": "diff --git a/app/test/test_debug.c b/app/test/test_debug.c\nindex 7c3ee92..01d4b76 100644\n--- a/app/test/test_debug.c\n+++ b/app/test/test_debug.c\n@@ -136,7 +136,6 @@ static int\n test_debug(void)\n {\n \trte_dump_stack();\n-\trte_dump_registers();\n \tif (test_panic() < 0)\n \t\treturn -1;\n \tif (test_exit() < 0)\ndiff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile\nindex d434882..9b83e11 100644\n--- a/lib/librte_eal/bsdapp/eal/Makefile\n+++ b/lib/librte_eal/bsdapp/eal/Makefile\n@@ -53,7 +53,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_hugepage_info.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_thread.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_log.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_pci.c\n-SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_debug.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_lcore.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_timer.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_interrupts.c\n@@ -73,6 +72,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_common_hexdump.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_common_devargs.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_common_dev.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_common_options.c\n+SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += eal_common_debug.c\n \n CFLAGS_eal.o := -D_GNU_SOURCE\n #CFLAGS_eal_thread.o := -D_GNU_SOURCE\ndiff --git a/lib/librte_eal/bsdapp/eal/eal_debug.c b/lib/librte_eal/bsdapp/eal/eal_debug.c\ndeleted file mode 100644\nindex 44fc4f3..0000000\n--- a/lib/librte_eal/bsdapp/eal/eal_debug.c\n+++ /dev/null\n@@ -1,113 +0,0 @@\n-/*-\n- *   BSD LICENSE\n- *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- *   All rights reserved.\n- *\n- *   Redistribution and use in source and binary forms, with or without\n- *   modification, are permitted provided that the following conditions\n- *   are met:\n- *\n- *     * Redistributions of source code must retain the above copyright\n- *       notice, this list of conditions and the following disclaimer.\n- *     * Redistributions in binary form must reproduce the above copyright\n- *       notice, this list of conditions and the following disclaimer in\n- *       the documentation and/or other materials provided with the\n- *       distribution.\n- *     * Neither the name of Intel Corporation nor the names of its\n- *       contributors may be used to endorse or promote products derived\n- *       from this software without specific prior written permission.\n- *\n- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#include <execinfo.h>\n-#include <stdarg.h>\n-#include <signal.h>\n-#include <stdlib.h>\n-#include <stdio.h>\n-#include <stdint.h>\n-\n-#include <rte_log.h>\n-#include <rte_debug.h>\n-#include <rte_common.h>\n-\n-#define BACKTRACE_SIZE 256\n-\n-/* dump the stack of the calling core */\n-void rte_dump_stack(void)\n-{\n-\tvoid *func[BACKTRACE_SIZE];\n-\tchar **symb = NULL;\n-\tint size;\n-\n-\tsize = backtrace(func, BACKTRACE_SIZE);\n-\tsymb = backtrace_symbols(func, size);\n-\twhile (size > 0) {\n-\t\trte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL,\n-\t\t\t\"%d: [%s]\\n\", size, symb[size - 1]);\n-\t\tsize --;\n-\t}\n-}\n-\n-/* not implemented in this environment */\n-void rte_dump_registers(void)\n-{\n-\treturn;\n-}\n-\n-/* call abort(), it will generate a coredump if enabled */\n-void __rte_panic(const char *funcname, const char *format, ...)\n-{\n-\tva_list ap;\n-\n-\t/* disable history */\n-\trte_log_set_history(0);\n-\n-\trte_log(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, \"PANIC in %s():\\n\", funcname);\n-\tva_start(ap, format);\n-\trte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);\n-\tva_end(ap);\n-\trte_dump_stack();\n-\trte_dump_registers();\n-\tabort();\n-}\n-\n-/*\n- * Like rte_panic this terminates the application. However, no traceback is\n- * provided and no core-dump is generated.\n- */\n-void\n-rte_exit(int exit_code, const char *format, ...)\n-{\n-\tva_list ap;\n-\n-\t/* disable history */\n-\trte_log_set_history(0);\n-\n-\tif (exit_code != 0)\n-\t\tRTE_LOG(CRIT, EAL, \"Error - exiting with code: %d\\n\"\n-\t\t\t\t\"  Cause: \", exit_code);\n-\n-\tva_start(ap, format);\n-\trte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);\n-\tva_end(ap);\n-\n-#ifndef RTE_EAL_ALWAYS_PANIC_ON_ERROR\n-\texit(exit_code);\n-#else\n-\trte_dump_stack();\n-\trte_dump_registers();\n-\tabort();\n-#endif\n-}\ndiff --git a/lib/librte_eal/common/eal_common_debug.c b/lib/librte_eal/common/eal_common_debug.c\nnew file mode 100644\nindex 0000000..9c10ee4\n--- /dev/null\n+++ b/lib/librte_eal/common/eal_common_debug.c\n@@ -0,0 +1,106 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <execinfo.h>\n+#include <stdarg.h>\n+#include <signal.h>\n+#include <stdlib.h>\n+#include <stdio.h>\n+#include <stdint.h>\n+\n+#include <rte_log.h>\n+#include <rte_debug.h>\n+#include <rte_common.h>\n+\n+#define BACKTRACE_SIZE 256\n+\n+/* dump the stack of the calling core */\n+void rte_dump_stack(void)\n+{\n+\tvoid *func[BACKTRACE_SIZE];\n+\tchar **symb = NULL;\n+\tint size;\n+\n+\tsize = backtrace(func, BACKTRACE_SIZE);\n+\tsymb = backtrace_symbols(func, size);\n+\twhile (size > 0) {\n+\t\trte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL,\n+\t\t\t\"%d: [%s]\\n\", size, symb[size - 1]);\n+\t\tsize--;\n+\t}\n+}\n+\n+/* call abort(), it will generate a coredump if enabled */\n+void __rte_panic(const char *funcname, const char *format, ...)\n+{\n+\tva_list ap;\n+\n+\t/* disable history */\n+\trte_log_set_history(0);\n+\n+\trte_log(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, \"PANIC in %s():\\n\", funcname);\n+\tva_start(ap, format);\n+\trte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);\n+\tva_end(ap);\n+\trte_dump_stack();\n+\tabort();\n+}\n+\n+/*\n+ * Like rte_panic this terminates the application. However, no traceback is\n+ * provided and no core-dump is generated. if RTE_EAL_ALWAYS_PANIC_ON_ERROR\n+ * is not defined.\n+ */\n+void\n+rte_exit(int exit_code, const char *format, ...)\n+{\n+\tva_list ap;\n+\n+\t/* disable history */\n+\trte_log_set_history(0);\n+\n+\tif (exit_code != 0)\n+\t\tRTE_LOG(CRIT, EAL, \"Error - exiting with code: %d\\n\"\n+\t\t\t\t\"  Cause: \", exit_code);\n+\n+\tva_start(ap, format);\n+\trte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);\n+\tva_end(ap);\n+\n+#ifndef RTE_EAL_ALWAYS_PANIC_ON_ERROR\n+\texit(exit_code);\n+#else\n+\trte_dump_stack();\n+\tabort();\n+#endif\n+}\ndiff --git a/lib/librte_eal/common/include/rte_debug.h b/lib/librte_eal/common/include/rte_debug.h\nindex 82ee3b3..3fb0307 100644\n--- a/lib/librte_eal/common/include/rte_debug.h\n+++ b/lib/librte_eal/common/include/rte_debug.h\n@@ -53,13 +53,6 @@ extern \"C\" {\n void rte_dump_stack(void);\n \n /**\n- * Dump the registers of the calling core to the console.\n- *\n- * Note: Not implemented in a userapp environment; use gdb instead.\n- */\n-void rte_dump_registers(void);\n-\n-/**\n  * Provide notification of a critical non-recoverable error and terminate\n  * execution abnormally.\n  *\ndiff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile\nindex 72ecf3a..87b9bfc 100644\n--- a/lib/librte_eal/linuxapp/eal/Makefile\n+++ b/lib/librte_eal/linuxapp/eal/Makefile\n@@ -62,7 +62,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_uio.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_vfio.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_vfio_mp_sync.c\n-SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_debug.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_lcore.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_timer.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_interrupts.c\n@@ -85,6 +84,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_hexdump.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_devargs.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_dev.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_options.c\n+SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_common_debug.c\n \n CFLAGS_eal.o := -D_GNU_SOURCE\n CFLAGS_eal_thread.o := -D_GNU_SOURCE\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_debug.c b/lib/librte_eal/linuxapp/eal/eal_debug.c\ndeleted file mode 100644\nindex 44fc4f3..0000000\n--- a/lib/librte_eal/linuxapp/eal/eal_debug.c\n+++ /dev/null\n@@ -1,113 +0,0 @@\n-/*-\n- *   BSD LICENSE\n- *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- *   All rights reserved.\n- *\n- *   Redistribution and use in source and binary forms, with or without\n- *   modification, are permitted provided that the following conditions\n- *   are met:\n- *\n- *     * Redistributions of source code must retain the above copyright\n- *       notice, this list of conditions and the following disclaimer.\n- *     * Redistributions in binary form must reproduce the above copyright\n- *       notice, this list of conditions and the following disclaimer in\n- *       the documentation and/or other materials provided with the\n- *       distribution.\n- *     * Neither the name of Intel Corporation nor the names of its\n- *       contributors may be used to endorse or promote products derived\n- *       from this software without specific prior written permission.\n- *\n- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#include <execinfo.h>\n-#include <stdarg.h>\n-#include <signal.h>\n-#include <stdlib.h>\n-#include <stdio.h>\n-#include <stdint.h>\n-\n-#include <rte_log.h>\n-#include <rte_debug.h>\n-#include <rte_common.h>\n-\n-#define BACKTRACE_SIZE 256\n-\n-/* dump the stack of the calling core */\n-void rte_dump_stack(void)\n-{\n-\tvoid *func[BACKTRACE_SIZE];\n-\tchar **symb = NULL;\n-\tint size;\n-\n-\tsize = backtrace(func, BACKTRACE_SIZE);\n-\tsymb = backtrace_symbols(func, size);\n-\twhile (size > 0) {\n-\t\trte_log(RTE_LOG_ERR, RTE_LOGTYPE_EAL,\n-\t\t\t\"%d: [%s]\\n\", size, symb[size - 1]);\n-\t\tsize --;\n-\t}\n-}\n-\n-/* not implemented in this environment */\n-void rte_dump_registers(void)\n-{\n-\treturn;\n-}\n-\n-/* call abort(), it will generate a coredump if enabled */\n-void __rte_panic(const char *funcname, const char *format, ...)\n-{\n-\tva_list ap;\n-\n-\t/* disable history */\n-\trte_log_set_history(0);\n-\n-\trte_log(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, \"PANIC in %s():\\n\", funcname);\n-\tva_start(ap, format);\n-\trte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);\n-\tva_end(ap);\n-\trte_dump_stack();\n-\trte_dump_registers();\n-\tabort();\n-}\n-\n-/*\n- * Like rte_panic this terminates the application. However, no traceback is\n- * provided and no core-dump is generated.\n- */\n-void\n-rte_exit(int exit_code, const char *format, ...)\n-{\n-\tva_list ap;\n-\n-\t/* disable history */\n-\trte_log_set_history(0);\n-\n-\tif (exit_code != 0)\n-\t\tRTE_LOG(CRIT, EAL, \"Error - exiting with code: %d\\n\"\n-\t\t\t\t\"  Cause: \", exit_code);\n-\n-\tva_start(ap, format);\n-\trte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);\n-\tva_end(ap);\n-\n-#ifndef RTE_EAL_ALWAYS_PANIC_ON_ERROR\n-\texit(exit_code);\n-#else\n-\trte_dump_stack();\n-\trte_dump_registers();\n-\tabort();\n-#endif\n-}\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "1/6"
    ]
}