Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/68897/?format=api
https://patches.dpdk.org/api/patches/68897/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200419100133.3232316-26-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": "<20200419100133.3232316-26-jerinj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200419100133.3232316-26-jerinj@marvell.com", "date": "2020-04-19T10:01:25", "name": "[v6,25/33] eal/trace: add trace bufsize configuration parameter", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "9d72a8542da2006d9f6119cfccbe8122c0779fe9", "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/20200419100133.3232316-26-jerinj@marvell.com/mbox/", "series": [ { "id": 9495, "url": "https://patches.dpdk.org/api/series/9495/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9495", "date": "2020-04-19T10:01:02", "name": "DPDK Trace support", "version": 6, "mbox": "https://patches.dpdk.org/series/9495/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/68897/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/68897/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 75E27A0561;\n\tSun, 19 Apr 2020 12:09:36 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 532A61D65E;\n\tSun, 19 Apr 2020 12:03:38 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id BA9771D528\n for <dev@dpdk.org>; Sun, 19 Apr 2020 12:03:20 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 03JA18BJ020144; Sun, 19 Apr 2020 03:03:10 -0700", "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0b-0016f401.pphosted.com with ESMTP id 30g12njxe9-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 19 Apr 2020 03:03:10 -0700", "from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Sun, 19 Apr 2020 03:03:09 -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.2 via Frontend\n Transport; Sun, 19 Apr 2020 03:03:09 -0700", "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id ABDC63F703F;\n Sun, 19 Apr 2020 03:03:06 -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=pfpt0818;\n bh=sEQYf8Li9Rh9X+7sS5/bQkNV4sZB88kt7mTPBMYAEtE=;\n b=AqGbcjkhlEXdt2NtSB6Eeh43Qj8bl1/7DqZYPkK4hxI6fbQtGmHeoKK84iuafnmhrATe\n lyvRodu5GFQTZz0oBPZF3+6DxfC9l8Gdqi3XuDwdt4A0XHhFo/sb6Rnc6iXD5/bS+U+3\n YguTXLXppxhlWcnuaMY+85dCnYsAC1OjWLvBBRzQChiMC/sHzOdlTmeh+WlJPDDCnVfl\n pRmL1zx12gz1sCPDFGoG9ngu+d1R3DLIacW+CQst/910g810ZvQafmSZ6XXIDFNeQdki\n NXXlAWeVKGMvZvVFIAnFAZU6sbwVFbhTZC1UUFZ8NKzQDOdIoeFkDniJ7D8nY3hCOmRU lQ==", "From": "<jerinj@marvell.com>", "To": "John McNamara <john.mcnamara@intel.com>, Marko Kovacevic\n <marko.kovacevic@intel.com>, Jerin Jacob <jerinj@marvell.com>, \"Sunil Kumar\n Kori\" <skori@marvell.com>", "CC": "<dev@dpdk.org>, <thomas@monjalon.net>, <bruce.richardson@intel.com>,\n <david.marchand@redhat.com>, <mattias.ronnblom@ericsson.com>", "Date": "Sun, 19 Apr 2020 15:31:25 +0530", "Message-ID": "<20200419100133.3232316-26-jerinj@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200419100133.3232316-1-jerinj@marvell.com>", "References": "<20200413150116.734047-1-jerinj@marvell.com>\n <20200419100133.3232316-1-jerinj@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676\n definitions=2020-04-19_02:2020-04-17,\n 2020-04-19 signatures=0", "Subject": "[dpdk-dev] [PATCH v6 25/33] eal/trace: add trace bufsize\n\tconfiguration parameter", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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: Sunil Kumar Kori <skori@marvell.com>\n\nTrace library exposes --trace-bufsz EAL parameter to configure\nmaximum size of ring buffer where events are to be stored.\n\nSigned-off-by: Sunil Kumar Kori <skori@marvell.com>\n---\n doc/guides/linux_gsg/eal_args.include.rst | 13 ++++++++\n lib/librte_eal/common/eal_common_options.c | 17 +++++++++++\n lib/librte_eal/common/eal_common_trace.c | 3 ++\n .../common/eal_common_trace_utils.c | 30 +++++++++++++++++++\n lib/librte_eal/common/eal_options.h | 2 ++\n lib/librte_eal/common/eal_trace.h | 2 ++\n 6 files changed, 67 insertions(+)", "diff": "diff --git a/doc/guides/linux_gsg/eal_args.include.rst b/doc/guides/linux_gsg/eal_args.include.rst\nindex 98bfcd357..b921c83b8 100644\n--- a/doc/guides/linux_gsg/eal_args.include.rst\n+++ b/doc/guides/linux_gsg/eal_args.include.rst\n@@ -163,6 +163,19 @@ Debugging options\n By default, trace output will created at ``home`` directory and parameter\n must be specified once only.\n \n+* ``--trace-bufsz=<val>``\n+\n+ Specify maximum size of allocated memory for trace output for each thread.\n+ Valid unit can be either ``B`` or ``K`` or ``M`` for ``Bytes``, ``KBytes``\n+ and ``MBytes`` respectively. For example:\n+\n+ Configuring ``2MB`` as a maximum size for trace output file::\n+\n+ --trace-bufsz=2M\n+\n+ By default, size of trace output file is ``1MB`` and parameter\n+ must be specified once only.\n+\n Other options\n ~~~~~~~~~~~~~\n \ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex f242d56a7..32b163a81 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -70,6 +70,7 @@ eal_long_options[] = {\n \t{OPT_LOG_LEVEL, 1, NULL, OPT_LOG_LEVEL_NUM },\n \t{OPT_TRACE, 1, NULL, OPT_TRACE_NUM },\n \t{OPT_TRACE_DIR, 1, NULL, OPT_TRACE_DIR_NUM },\n+\t{OPT_TRACE_BUF_SIZE, 1, NULL, OPT_TRACE_BUF_SIZE_NUM },\n \t{OPT_MASTER_LCORE, 1, NULL, OPT_MASTER_LCORE_NUM },\n \t{OPT_MBUF_POOL_OPS_NAME, 1, NULL, OPT_MBUF_POOL_OPS_NAME_NUM},\n \t{OPT_NO_HPET, 0, NULL, OPT_NO_HPET_NUM },\n@@ -1440,6 +1441,15 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\tbreak;\n \t}\n \n+\tcase OPT_TRACE_BUF_SIZE_NUM: {\n+\t\tif (eal_trace_bufsz_args_save(optarg) < 0) {\n+\t\t\tRTE_LOG(ERR, EAL, \"invalid parameters for --\"\n+\t\t\t\tOPT_TRACE_BUF_SIZE \"\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tbreak;\n+\t}\n+\n \tcase OPT_LCORES_NUM:\n \t\tif (eal_parse_lcores(optarg) < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"invalid parameter for --\"\n@@ -1724,6 +1734,13 @@ eal_common_usage(void)\n \t \" By default, trace output will created at\\n\"\n \t \" $HOME directory and parameter must be\\n\"\n \t \" specified once only.\\n\"\n+\t \" --\"OPT_TRACE_BUF_SIZE\"=<int>\\n\"\n+\t \" Specify maximum size of allocated memory\\n\"\n+\t \" for trace output for each thread. Valid\\n\"\n+\t \" unit can be either 'B|K|M' for 'Bytes',\\n\"\n+\t \" 'KBytes' and 'MBytes' respectively.\\n\"\n+\t \" Default is 1MB and parameter must be\\n\"\n+\t \" specified once only.\\n\"\n \t \" -v Display version information on startup\\n\"\n \t \" -h, --help This help\\n\"\n \t \" --\"OPT_IN_MEMORY\" Operate entirely in memory. This will\\n\"\ndiff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c\nindex 2a86b740f..3d9201d2f 100644\n--- a/lib/librte_eal/common/eal_common_trace.c\n+++ b/lib/librte_eal/common/eal_common_trace.c\n@@ -64,6 +64,9 @@ eal_trace_init(void)\n \t/* Generate UUID ver 4 with total size of events and number of events */\n \ttrace_uuid_generate();\n \n+\t/* Apply buffer size configuration for trace output */\n+\ttrace_bufsz_args_apply();\n+\n \t/* Generate CTF TDSL metadata */\n \tif (trace_metadata_create() < 0)\n \t\tgoto fail;\ndiff --git a/lib/librte_eal/common/eal_common_trace_utils.c b/lib/librte_eal/common/eal_common_trace_utils.c\nindex 41f2bdd05..b4ac79c95 100644\n--- a/lib/librte_eal/common/eal_common_trace_utils.c\n+++ b/lib/librte_eal/common/eal_common_trace_utils.c\n@@ -193,6 +193,36 @@ trace_args_apply(const char *arg)\n \treturn 0;\n }\n \n+int\n+eal_trace_bufsz_args_save(char const *optarg)\n+{\n+\tstruct trace *trace = trace_obj_get();\n+\tuint64_t bufsz;\n+\n+\tif (optarg == NULL) {\n+\t\ttrace_err(\"no optarg is passed\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tbufsz = rte_str_to_size(optarg);\n+\tif (bufsz == 0) {\n+\t\ttrace_err(\"buffer size cannot be zero\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ttrace->buff_len = bufsz;\n+\treturn 0;\n+}\n+\n+void\n+trace_bufsz_args_apply(void)\n+{\n+\tstruct trace *trace = trace_obj_get();\n+\n+\tif (trace->buff_len == 0)\n+\t\ttrace->buff_len = 1024 * 1024; /* 1MB */\n+}\n+\n int\n eal_trace_dir_args_save(char const *optarg)\n {\ndiff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h\nindex 04222e57f..3e9a54f3a 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_eal/common/eal_options.h\n@@ -37,6 +37,8 @@ enum {\n \tOPT_TRACE_NUM,\n #define OPT_TRACE_DIR \"trace-dir\"\n \tOPT_TRACE_DIR_NUM,\n+#define OPT_TRACE_BUF_SIZE \"trace-bufsz\"\n+\tOPT_TRACE_BUF_SIZE_NUM,\n #define OPT_MASTER_LCORE \"master-lcore\"\n \tOPT_MASTER_LCORE_NUM,\n #define OPT_MBUF_POOL_OPS_NAME \"mbuf-pool-ops-name\"\ndiff --git a/lib/librte_eal/common/eal_trace.h b/lib/librte_eal/common/eal_trace.h\nindex 7af7d63f0..2fd73c5d5 100644\n--- a/lib/librte_eal/common/eal_trace.h\n+++ b/lib/librte_eal/common/eal_trace.h\n@@ -101,6 +101,7 @@ struct trace_point_head *trace_list_head_get(void);\n const char *trace_mode_to_string(enum rte_trace_mode mode);\n const char *trace_area_to_string(enum trace_area_e area);\n int trace_args_apply(const char *arg);\n+void trace_bufsz_args_apply(void);\n bool trace_has_duplicate_entry(void);\n void trace_uuid_generate(void);\n int trace_metadata_create(void);\n@@ -115,5 +116,6 @@ void eal_trace_fini(void);\n int eal_trace_args_save(const char *optarg);\n void eal_trace_args_free(void);\n int eal_trace_dir_args_save(const char *optarg);\n+int eal_trace_bufsz_args_save(const char *optarg);\n \n #endif /* __EAL_TRACE_H */\n", "prefixes": [ "v6", "25/33" ] }{ "id": 68897, "url": "