get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 13412,
    "url": "https://patches.dpdk.org/api/patches/13412/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1465484809-8776-1-git-send-email-thomas.monjalon@6wind.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": "<1465484809-8776-1-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1465484809-8776-1-git-send-email-thomas.monjalon@6wind.com",
    "date": "2016-06-09T15:06:49",
    "name": "[dpdk-dev,v2] log: deprecate history dump",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "19919b1427191af9d136d49171a8b7316fa25519",
    "submitter": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1465484809-8776-1-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/13412/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/13412/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 5283F1396;\n\tThu,  9 Jun 2016 17:06:54 +0200 (CEST)",
            "from mail-wm0-f44.google.com (mail-wm0-f44.google.com\n\t[74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 107C611D4\n\tfor <dev@dpdk.org>; Thu,  9 Jun 2016 17:06:53 +0200 (CEST)",
            "by mail-wm0-f44.google.com with SMTP id n184so229702402wmn.1\n\tfor <dev@dpdk.org>; Thu, 09 Jun 2016 08:06:53 -0700 (PDT)",
            "from XPS13.localdomain (184.203.134.77.rev.sfr.net.\n\t[77.134.203.184])\n\tby smtp.gmail.com with ESMTPSA id j2sm26881wjz.15.2016.06.09.08.06.51\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tThu, 09 Jun 2016 08:06:51 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=noCtdPrnbw0cJhrZHmrweBP2MCeAda/9ZnfJ8UmLufI=;\n\tb=p1CBh8xW0V3aqNsJqVroLS1Q+L3Qab7orY5Lxs35G39poBlFTI7oqCE1DOg8W5cD0q\n\tfkOWbp3f9mpsyMooNR9KHWvQhn4G+CrSHJv2kOBepMXEPnPbQ0DZO51L9/cE1Mb2nhOj\n\tno664tIm0GRjQEv3uBswIRw5veuf27CEPb88DDveypsjkoAAbay8vn46+kQKGCQq6OQo\n\tXaR3MJsadzzAUxX8RKMON9YtoLZDkQ/rH8ozqRJlwBiZbn5KecJxjavzIkfrxsjxgLDa\n\tL89b3iPDWmyh/3brecKatCEgoL6Gi5T10e0Orff3Ts6j+SnApSZctRmjPwvK2uyuyc6r\n\t3Kgg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=noCtdPrnbw0cJhrZHmrweBP2MCeAda/9ZnfJ8UmLufI=;\n\tb=CNl2e2/n49919K3EWkIHRf+KEHARvOKffAOaLk1iYTl4vqkTIe9YM4lSsxccJ9oKkV\n\tKkSKhkkpaZIEkOa+wafeVtfshtjIP3ds9VKmjwDQmmo76kwJ+iW8cINrIB40JOIh6Qfc\n\tKw28ydUTn/EjjeUhH60zI/5JJgnwIiQoiGvdvB24ziDpAhzaHidubiA8AQ4fSUpmU899\n\tXM+7+mbA8yaJ95xsO+EpMLOPHPHVyGKgE4HtRCmd4q09x3tM0G8/yy+TehcaUBVeyqfV\n\ttlI4WM/hd9nSPkHXjymlajyvvL9yiUgS0WTl1hZqmoSZRindRAmAJ8DQUFicAf/u3sgz\n\t1s9w==",
        "X-Gm-Message-State": "ALyK8tL6VSOh63YurOs279f3l7xvOE4c+OVZMc04Y6yzm4tKa2SBgjwb4BJyirOv+0mLz+w3",
        "X-Received": "by 10.194.162.168 with SMTP id yb8mr4216707wjb.32.1465484812404; \n\tThu, 09 Jun 2016 08:06:52 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "david.marchand@6wind.com",
        "Cc": "dev@dpdk.org",
        "Date": "Thu,  9 Jun 2016 17:06:49 +0200",
        "Message-Id": "<1465484809-8776-1-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "In-Reply-To": "<1465481396-23968-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<1465481396-23968-1-git-send-email-thomas.monjalon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v2] log: deprecate history dump",
        "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": "The log history uses rte_mempool. In order to remove the mempool\ndependency in EAL (and improve the build), this feature is deprecated.\nThe ABI is kept but the behaviour is now voided because it seems this\nfunction was not used. The history can be read from syslog.\nWhen enabling the log history, a warning is logged.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\nv2:\n- remove more mempool and log history traces\n- add a warning if enabling log history\n- move not related mempool includes cleanup in another patch\n---\n app/test-pmd/cmdline.c                  |   3 -\n app/test/autotest_data.py               |   6 --\n app/test/autotest_test_funcs.py         |   5 --\n app/test/commands.c                     |   4 +-\n app/test/test_logs.c                    |   3 -\n doc/guides/prog_guide/mempool_lib.rst   |   4 +-\n doc/guides/rel_notes/deprecation.rst    |   3 +\n lib/librte_eal/bsdapp/eal/Makefile      |   1 -\n lib/librte_eal/bsdapp/eal/eal_debug.c   |   6 --\n lib/librte_eal/common/eal_common_log.c  | 143 ++------------------------------\n lib/librte_eal/common/eal_private.h     |   3 -\n lib/librte_eal/common/include/rte_log.h |   8 ++\n lib/librte_eal/linuxapp/eal/Makefile    |   1 -\n lib/librte_eal/linuxapp/eal/eal_debug.c |   6 --\n lib/librte_eal/linuxapp/eal/eal_log.c   |   9 +-\n lib/librte_mempool/rte_mempool.c        |   4 -\n 16 files changed, 20 insertions(+), 189 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 1921612..fd389ac 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -7268,8 +7268,6 @@ static void cmd_dump_parsed(void *parsed_result,\n \t\trte_dump_physmem_layout(stdout);\n \telse if (!strcmp(res->dump, \"dump_memzone\"))\n \t\trte_memzone_dump(stdout);\n-\telse if (!strcmp(res->dump, \"dump_log_history\"))\n-\t\trte_log_dump_history(stdout);\n \telse if (!strcmp(res->dump, \"dump_struct_sizes\"))\n \t\tdump_struct_sizes();\n \telse if (!strcmp(res->dump, \"dump_ring\"))\n@@ -7284,7 +7282,6 @@ cmdline_parse_token_string_t cmd_dump_dump =\n \tTOKEN_STRING_INITIALIZER(struct cmd_dump_result, dump,\n \t\t\"dump_physmem#\"\n \t\t\"dump_memzone#\"\n-\t\t\"dump_log_history#\"\n \t\t\"dump_struct_sizes#\"\n \t\t\"dump_ring#\"\n \t\t\"dump_mempool#\"\ndiff --git a/app/test/autotest_data.py b/app/test/autotest_data.py\nindex 78d2edd..6c87809 100644\n--- a/app/test/autotest_data.py\n+++ b/app/test/autotest_data.py\n@@ -94,12 +94,6 @@ parallel_test_group_list = [\n \t\t \"Report\" :\tNone,\n \t\t},\n \t\t{\n-\t\t \"Name\" :\t\"Dump log history\",\n-\t\t \"Command\" :\t\"dump_log_history\",\n-\t\t \"Func\" :\tdump_autotest,\n-\t\t \"Report\" :\tNone,\n-\t\t},\n-\t\t{\n \t\t \"Name\" :\t\"Dump rings\",\n \t\t \"Command\" :\t\"dump_ring\",\n \t\t \"Func\" :\tdump_autotest,\ndiff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py\nindex b60b941..14cffd0 100644\n--- a/app/test/autotest_test_funcs.py\n+++ b/app/test/autotest_test_funcs.py\n@@ -144,16 +144,11 @@ def logs_autotest(child, test_name):\n \ti = 0\n \tchild.sendline(test_name)\n \n-\t# logs sequence is printed twice because of history dump\n \tlog_list = [\n \t\t\"TESTAPP1: error message\",\n \t\t\"TESTAPP1: critical message\",\n \t\t\"TESTAPP2: critical message\",\n \t\t\"TESTAPP1: error message\",\n-\t\t\"TESTAPP1: error message\",\n-\t\t\"TESTAPP1: critical message\",\n-\t\t\"TESTAPP2: critical message\",\n-\t\t\"TESTAPP1: error message\",\n \t]\n \n \tfor log_msg in log_list:\ndiff --git a/app/test/commands.c b/app/test/commands.c\nindex e0af8e4..2df46b0 100644\n--- a/app/test/commands.c\n+++ b/app/test/commands.c\n@@ -150,8 +150,6 @@ static void cmd_dump_parsed(void *parsed_result,\n \t\trte_dump_physmem_layout(stdout);\n \telse if (!strcmp(res->dump, \"dump_memzone\"))\n \t\trte_memzone_dump(stdout);\n-\telse if (!strcmp(res->dump, \"dump_log_history\"))\n-\t\trte_log_dump_history(stdout);\n \telse if (!strcmp(res->dump, \"dump_struct_sizes\"))\n \t\tdump_struct_sizes();\n \telse if (!strcmp(res->dump, \"dump_ring\"))\n@@ -164,7 +162,7 @@ static void cmd_dump_parsed(void *parsed_result,\n \n cmdline_parse_token_string_t cmd_dump_dump =\n \tTOKEN_STRING_INITIALIZER(struct cmd_dump_result, dump,\n-\t\t\t\t \"dump_physmem#dump_memzone#dump_log_history#\"\n+\t\t\t\t \"dump_physmem#dump_memzone#\"\n \t\t\t\t \"dump_struct_sizes#dump_ring#dump_mempool#\"\n \t\t\t\t \"dump_devargs\");\n \ndiff --git a/app/test/test_logs.c b/app/test/test_logs.c\nindex 05aa862..d0a9962 100644\n--- a/app/test/test_logs.c\n+++ b/app/test/test_logs.c\n@@ -83,9 +83,6 @@ test_logs(void)\n \tRTE_LOG(ERR, TESTAPP1, \"error message\\n\");\n \tRTE_LOG(ERR, TESTAPP2, \"error message (not displayed)\\n\");\n \n-\t/* print again the previous logs */\n-\trte_log_dump_history(stdout);\n-\n \treturn 0;\n }\n \ndiff --git a/doc/guides/prog_guide/mempool_lib.rst b/doc/guides/prog_guide/mempool_lib.rst\nindex 5fae79a..c3afc2e 100644\n--- a/doc/guides/prog_guide/mempool_lib.rst\n+++ b/doc/guides/prog_guide/mempool_lib.rst\n@@ -38,9 +38,7 @@ In the DPDK, it is identified by name and uses a ring to store free objects.\n It provides some other optional services such as a per-core object cache and\n an alignment helper to ensure that objects are padded to spread them equally on all DRAM or DDR3 channels.\n \n-This library is used by the\n-:ref:`Mbuf Library <Mbuf_Library>` and the\n-:ref:`Environment Abstraction Layer <Environment_Abstraction_Layer>` (for logging history).\n+This library is used by the :ref:`Mbuf Library <Mbuf_Library>`.\n \n Cookies\n -------\ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex ad05eba..bda40c1 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -8,6 +8,9 @@ API and ABI deprecation notices are to be posted here.\n Deprecation Notices\n -------------------\n \n+* The log history is deprecated.\n+  It is voided in 16.07 and will be removed in release 16.11.\n+\n * The ethdev hotplug API is going to be moved to EAL with a notification\n   mechanism added to crypto and ethdev libraries so that hotplug is now\n   available to both of them. This API will be stripped of the device arguments\ndiff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile\nindex 9054ad6..474651b 100644\n--- a/lib/librte_eal/bsdapp/eal/Makefile\n+++ b/lib/librte_eal/bsdapp/eal/Makefile\n@@ -41,7 +41,6 @@ CFLAGS += -I$(SRCDIR)/include\n CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common\n CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include\n CFLAGS += -I$(RTE_SDK)/lib/librte_ring\n-CFLAGS += -I$(RTE_SDK)/lib/librte_mempool\n CFLAGS += $(WERROR_FLAGS) -O3\n \n LDLIBS += -lexecinfo\ndiff --git a/lib/librte_eal/bsdapp/eal/eal_debug.c b/lib/librte_eal/bsdapp/eal/eal_debug.c\nindex 907fbfa..5fbc17c 100644\n--- a/lib/librte_eal/bsdapp/eal/eal_debug.c\n+++ b/lib/librte_eal/bsdapp/eal/eal_debug.c\n@@ -77,9 +77,6 @@ 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@@ -98,9 +95,6 @@ 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);\ndiff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c\nindex b5e37bb..0739331 100644\n--- a/lib/librte_eal/common/eal_common_log.c\n+++ b/lib/librte_eal/common/eal_common_log.c\n@@ -38,47 +38,14 @@\n #include <sys/types.h>\n #include <stdlib.h>\n #include <unistd.h>\n-#include <inttypes.h>\n-#include <errno.h>\n-#include <sys/queue.h>\n \n #include <rte_log.h>\n-#include <rte_memory.h>\n-#include <rte_memzone.h>\n-#include <rte_launch.h>\n #include <rte_common.h>\n-#include <rte_cycles.h>\n #include <rte_eal.h>\n #include <rte_per_lcore.h>\n-#include <rte_lcore.h>\n-#include <rte_atomic.h>\n-#include <rte_debug.h>\n-#include <rte_spinlock.h>\n-#include <rte_branch_prediction.h>\n-#include <rte_ring.h>\n-#include <rte_mempool.h>\n \n #include \"eal_private.h\"\n \n-#define LOG_ELT_SIZE     2048\n-\n-#define LOG_HISTORY_MP_NAME \"log_history\"\n-\n-STAILQ_HEAD(log_history_list, log_history);\n-\n-/**\n- * The structure of a message log in the log history.\n- */\n-struct log_history {\n-\tSTAILQ_ENTRY(log_history) next;\n-\tunsigned size;\n-\tchar buf[0];\n-};\n-\n-static struct rte_mempool *log_history_mp = NULL;\n-static unsigned log_history_size = 0;\n-static struct log_history_list log_history;\n-\n /* global log structure */\n struct rte_logs rte_logs = {\n \t.type = ~0,\n@@ -86,10 +53,7 @@ struct rte_logs rte_logs = {\n \t.file = NULL,\n };\n \n-static rte_spinlock_t log_dump_lock = RTE_SPINLOCK_INITIALIZER;\n-static rte_spinlock_t log_list_lock = RTE_SPINLOCK_INITIALIZER;\n static FILE *default_log_stream;\n-static int history_enabled = 1;\n \n /**\n  * This global structure stores some informations about the message\n@@ -106,59 +70,16 @@ static RTE_DEFINE_PER_LCORE(struct log_cur_msg, log_cur_msg);\n /* default logs */\n \n int\n-rte_log_add_in_history(const char *buf, size_t size)\n+rte_log_add_in_history(const char *buf __rte_unused, size_t size __rte_unused)\n {\n-\tstruct log_history *hist_buf = NULL;\n-\tstatic const unsigned hist_buf_size = LOG_ELT_SIZE - sizeof(*hist_buf);\n-\tvoid *obj;\n-\n-\tif (history_enabled == 0)\n-\t\treturn 0;\n-\n-\trte_spinlock_lock(&log_list_lock);\n-\n-\t/* get a buffer for adding in history */\n-\tif (log_history_size > RTE_LOG_HISTORY) {\n-\t\thist_buf = STAILQ_FIRST(&log_history);\n-\t\tif (hist_buf) {\n-\t\t\tSTAILQ_REMOVE_HEAD(&log_history, next);\n-\t\t\tlog_history_size--;\n-\t\t}\n-\t}\n-\telse {\n-\t\tif (rte_mempool_mc_get(log_history_mp, &obj) < 0)\n-\t\t\tobj = NULL;\n-\t\thist_buf = obj;\n-\t}\n-\n-\t/* no buffer */\n-\tif (hist_buf == NULL) {\n-\t\trte_spinlock_unlock(&log_list_lock);\n-\t\treturn -ENOBUFS;\n-\t}\n-\n-\t/* not enough room for msg, buffer go back in mempool */\n-\tif (size >= hist_buf_size) {\n-\t\trte_mempool_mp_put(log_history_mp, hist_buf);\n-\t\trte_spinlock_unlock(&log_list_lock);\n-\t\treturn -ENOBUFS;\n-\t}\n-\n-\t/* add in history */\n-\tmemcpy(hist_buf->buf, buf, size);\n-\thist_buf->buf[size] = hist_buf->buf[hist_buf_size-1] = '\\0';\n-\thist_buf->size = size;\n-\tSTAILQ_INSERT_TAIL(&log_history, hist_buf, next);\n-\tlog_history_size++;\n-\trte_spinlock_unlock(&log_list_lock);\n-\n \treturn 0;\n }\n \n void\n rte_log_set_history(int enable)\n {\n-\thistory_enabled = enable;\n+\tif (enable)\n+\t\tRTE_LOG(WARNING, EAL, \"The log history is deprecated.\\n\");\n }\n \n /* Change the stream that will be used by logging system */\n@@ -217,44 +138,8 @@ int rte_log_cur_msg_logtype(void)\n \n /* Dump log history to file */\n void\n-rte_log_dump_history(FILE *out)\n+rte_log_dump_history(FILE *out __rte_unused)\n {\n-\tstruct log_history_list tmp_log_history;\n-\tstruct log_history *hist_buf;\n-\tunsigned i;\n-\n-\t/* only one dump at a time */\n-\trte_spinlock_lock(&log_dump_lock);\n-\n-\t/* save list, and re-init to allow logging during dump */\n-\trte_spinlock_lock(&log_list_lock);\n-\ttmp_log_history = log_history;\n-\tSTAILQ_INIT(&log_history);\n-\tlog_history_size = 0;\n-\trte_spinlock_unlock(&log_list_lock);\n-\n-\tfor (i=0; i<RTE_LOG_HISTORY; i++) {\n-\n-\t\t/* remove one message from history list */\n-\t\thist_buf = STAILQ_FIRST(&tmp_log_history);\n-\n-\t\tif (hist_buf == NULL)\n-\t\t\tbreak;\n-\n-\t\tSTAILQ_REMOVE_HEAD(&tmp_log_history, next);\n-\n-\t\t/* write on stdout */\n-\t\tif (fwrite(hist_buf->buf, hist_buf->size, 1, out) == 0) {\n-\t\t\trte_mempool_mp_put(log_history_mp, hist_buf);\n-\t\t\tbreak;\n-\t\t}\n-\n-\t\t/* put back message structure in pool */\n-\t\trte_mempool_mp_put(log_history_mp, hist_buf);\n-\t}\n-\tfflush(out);\n-\n-\trte_spinlock_unlock(&log_dump_lock);\n }\n \n /*\n@@ -297,29 +182,11 @@ rte_log(uint32_t level, uint32_t logtype, const char *format, ...)\n }\n \n /*\n- * called by environment-specific log init function to initialize log\n- * history\n+ * called by environment-specific log init function\n  */\n int\n rte_eal_common_log_init(FILE *default_log)\n {\n-\tSTAILQ_INIT(&log_history);\n-\n-\t/* reserve RTE_LOG_HISTORY*2 elements, so we can dump and\n-\t * keep logging during this time */\n-\tlog_history_mp = rte_mempool_create(LOG_HISTORY_MP_NAME, RTE_LOG_HISTORY*2,\n-\t\t\t\tLOG_ELT_SIZE, 0, 0,\n-\t\t\t\tNULL, NULL,\n-\t\t\t\tNULL, NULL,\n-\t\t\t\tSOCKET_ID_ANY, MEMPOOL_F_NO_PHYS_CONTIG);\n-\n-\tif ((log_history_mp == NULL) &&\n-\t    ((log_history_mp = rte_mempool_lookup(LOG_HISTORY_MP_NAME)) == NULL)){\n-\t\tRTE_LOG(ERR, EAL, \"%s(): cannot create log_history mempool\\n\",\n-\t\t\t__func__);\n-\t\treturn -1;\n-\t}\n-\n \tdefault_log_stream = default_log;\n \trte_openlog_stream(default_log);\n \ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 2342fa1..857dc3e 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -49,9 +49,6 @@ int rte_eal_memzone_init(void);\n /**\n  * Common log initialization function (private to eal).\n  *\n- * Called by environment-specific log initialization function to initialize\n- * log history.\n- *\n  * @param default_log\n  *   The default log stream to be used.\n  * @return\ndiff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h\nindex 2e47e7f..b1add04 100644\n--- a/lib/librte_eal/common/include/rte_log.h\n+++ b/lib/librte_eal/common/include/rte_log.h\n@@ -42,6 +42,8 @@\n  * This file provides a log API to RTE applications.\n  */\n \n+#include \"rte_common.h\" /* for __rte_deprecated macro */\n+\n #ifdef __cplusplus\n extern \"C\" {\n #endif\n@@ -179,22 +181,27 @@ int rte_log_cur_msg_loglevel(void);\n int rte_log_cur_msg_logtype(void);\n \n /**\n+ * @deprecated\n  * Enable or disable the history (enabled by default)\n  *\n  * @param enable\n  *   true to enable, or 0 to disable history.\n  */\n+__rte_deprecated\n void rte_log_set_history(int enable);\n \n /**\n+ * @deprecated\n  * Dump the log history to a file\n  *\n  * @param f\n  *   A pointer to a file for output\n  */\n+__rte_deprecated\n void rte_log_dump_history(FILE *f);\n \n /**\n+ * @deprecated\n  * Add a log message to the history.\n  *\n  * This function can be called from a user-defined log stream. It adds\n@@ -209,6 +216,7 @@ void rte_log_dump_history(FILE *f);\n  *   - 0: Success.\n  *   - (-ENOBUFS) if there is no room to store the message.\n  */\n+__rte_deprecated\n int rte_log_add_in_history(const char *buf, size_t size);\n \n /**\ndiff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile\nindex e109361..a0ea698 100644\n--- a/lib/librte_eal/linuxapp/eal/Makefile\n+++ b/lib/librte_eal/linuxapp/eal/Makefile\n@@ -45,7 +45,6 @@ CFLAGS += -I$(SRCDIR)/include\n CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common\n CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include\n CFLAGS += -I$(RTE_SDK)/lib/librte_ring\n-CFLAGS += -I$(RTE_SDK)/lib/librte_mempool\n CFLAGS += -I$(RTE_SDK)/lib/librte_ivshmem\n CFLAGS += $(WERROR_FLAGS) -O3\n \ndiff --git a/lib/librte_eal/linuxapp/eal/eal_debug.c b/lib/librte_eal/linuxapp/eal/eal_debug.c\nindex 907fbfa..5fbc17c 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_debug.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_debug.c\n@@ -77,9 +77,6 @@ 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@@ -98,9 +95,6 @@ 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);\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_log.c b/lib/librte_eal/linuxapp/eal/eal_log.c\nindex 0b133c3..d391100 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_log.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_log.c\n@@ -50,8 +50,7 @@\n #include \"eal_private.h\"\n \n /*\n- * default log function, used once mempool (hence log history) is\n- * available\n+ * default log function\n  */\n static ssize_t\n console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)\n@@ -60,9 +59,6 @@ console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)\n \tssize_t ret;\n \tuint32_t loglevel;\n \n-\t/* add this log in history */\n-\trte_log_add_in_history(buf, size);\n-\n \t/* write on stdout */\n \tret = fwrite(buf, 1, size, stdout);\n \tfflush(stdout);\n@@ -110,8 +106,7 @@ rte_eal_log_init(const char *id, int facility)\n /* early logs */\n \n /*\n- * early log function, used during boot when mempool (hence log\n- * history) is not available\n+ * early log function, used before rte_eal_log_init\n  */\n static ssize_t\n early_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)\ndiff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c\nindex b54de43..22a5645 100644\n--- a/lib/librte_mempool/rte_mempool.c\n+++ b/lib/librte_mempool/rte_mempool.c\n@@ -1003,7 +1003,6 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,\n \n \t\tif (free == 0) {\n \t\t\tif (cookie != RTE_MEMPOOL_HEADER_COOKIE1) {\n-\t\t\t\trte_log_set_history(0);\n \t\t\t\tRTE_LOG(CRIT, MEMPOOL,\n \t\t\t\t\t\"obj=%p, mempool=%p, cookie=%\" PRIx64 \"\\n\",\n \t\t\t\t\tobj, (const void *) mp, cookie);\n@@ -1012,7 +1011,6 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,\n \t\t\thdr->cookie = RTE_MEMPOOL_HEADER_COOKIE2;\n \t\t} else if (free == 1) {\n \t\t\tif (cookie != RTE_MEMPOOL_HEADER_COOKIE2) {\n-\t\t\t\trte_log_set_history(0);\n \t\t\t\tRTE_LOG(CRIT, MEMPOOL,\n \t\t\t\t\t\"obj=%p, mempool=%p, cookie=%\" PRIx64 \"\\n\",\n \t\t\t\t\tobj, (const void *) mp, cookie);\n@@ -1022,7 +1020,6 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,\n \t\t} else if (free == 2) {\n \t\t\tif (cookie != RTE_MEMPOOL_HEADER_COOKIE1 &&\n \t\t\t    cookie != RTE_MEMPOOL_HEADER_COOKIE2) {\n-\t\t\t\trte_log_set_history(0);\n \t\t\t\tRTE_LOG(CRIT, MEMPOOL,\n \t\t\t\t\t\"obj=%p, mempool=%p, cookie=%\" PRIx64 \"\\n\",\n \t\t\t\t\tobj, (const void *) mp, cookie);\n@@ -1032,7 +1029,6 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,\n \t\ttlr = __mempool_get_trailer(obj);\n \t\tcookie = tlr->cookie;\n \t\tif (cookie != RTE_MEMPOOL_TRAILER_COOKIE) {\n-\t\t\trte_log_set_history(0);\n \t\t\tRTE_LOG(CRIT, MEMPOOL,\n \t\t\t\t\"obj=%p, mempool=%p, cookie=%\" PRIx64 \"\\n\",\n \t\t\t\tobj, (const void *) mp, cookie);\n",
    "prefixes": [
        "dpdk-dev",
        "v2"
    ]
}