Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/131774/?format=api
http://patchwork.dpdk.org/api/patches/131774/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230921100832.2036256-12-skori@marvell.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20230921100832.2036256-12-skori@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230921100832.2036256-12-skori@marvell.com", "date": "2023-09-21T10:08:31", "name": "[v5,11/12] app/graph: add CLI option to enable graph stats", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "54463c00e54b806156ee52d28296172691ae1944", "submitter": { "id": 1318, "url": "http://patchwork.dpdk.org/api/people/1318/?format=api", "name": "Sunil Kumar Kori", "email": "skori@marvell.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230921100832.2036256-12-skori@marvell.com/mbox/", "series": [ { "id": 29586, "url": "http://patchwork.dpdk.org/api/series/29586/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29586", "date": "2023-09-21T10:08:20", "name": "add CLI based graph application", "version": 5, "mbox": "http://patchwork.dpdk.org/series/29586/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/131774/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/131774/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 98B4B425FF;\n\tThu, 21 Sep 2023 12:10:15 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5E8A040EDC;\n\tThu, 21 Sep 2023 12:09:07 +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 4071840E4A\n for <dev@dpdk.org>; Thu, 21 Sep 2023 12:09:02 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38L7Xwfr010099 for <dev@dpdk.org>; Thu, 21 Sep 2023 03:09:01 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3t85pttqeg-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 21 Sep 2023 03:09:01 -0700", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 21 Sep 2023 03:08:59 -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.48 via Frontend\n Transport; Thu, 21 Sep 2023 03:08:59 -0700", "from localhost.localdomain (unknown [10.28.34.25])\n by maili.marvell.com (Postfix) with ESMTP id 438915B693F;\n Thu, 21 Sep 2023 03:08:58 -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=e9bCXb/mt8f9sNM3XxK74kfcCkYqJlLGE2yHq+D2OOU=;\n b=hRfrhGjN+nGaeMVB7Mjtm8hcGFnzutnjUzAo2WQSlsAMVlHn1QMdRNHTotl/Y4sZQaG4\n atxYdnLxeA/WGosVj0pI1Pcs9R5ozFkRI501a/OvbfmuDLAMy5+f6KVs4Y1/TojwbhAD\n Laoq9KpQgwtlPuWgCjTbfEIVAC44QAUGdkawioWKTRxct2Lqg/5G9c4FoIf89V4aexJ5\n NB5T1mFv14kBvjE757chcZhGw0QF9ccdpUY/TEFB71O0964yrk+OBvZi7jjNYwFbmuxl\n Z4fzA5Q+mEYjfolu1kQMHPWJ2LjmyQQMISYW5h6Wfse62Stc54s+DuLEMPV8IjnJ9pzE RA==", "From": "<skori@marvell.com>", "To": "Sunil Kumar Kori <skori@marvell.com>, Rakesh Kudurumalla\n <rkudurumalla@marvell.com>", "CC": "<dev@dpdk.org>", "Subject": "[PATCH v5 11/12] app/graph: add CLI option to enable graph stats", "Date": "Thu, 21 Sep 2023 15:38:31 +0530", "Message-ID": "<20230921100832.2036256-12-skori@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230921100832.2036256-1-skori@marvell.com>", "References": "<20230919160455.1678716-1-skori@marvell.com>\n <20230921100832.2036256-1-skori@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "X0H7ftcTmsRZ8riXZxFXZBC0vkVBy15s", "X-Proofpoint-ORIG-GUID": "X0H7ftcTmsRZ8riXZxFXZBC0vkVBy15s", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26\n definitions=2023-09-21_06,2023-09-20_01,2023-05-22_02", "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" }, "content": "From: Sunil Kumar Kori <skori@marvell.com>\n\nIt adds application's command line parameter \"--enable-graph-stats\"\nto enable dumping graph stats on console.\n\nBy default, no graph stats will be printed on console but same can\nbe dumped via telnet session using \"graph stats show\" command.\n\nSigned-off-by: Sunil Kumar Kori <skori@marvell.com>\nSigned-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>\n---\n app/graph/main.c | 38 +++++++++++++++++++++++++++++++++++++-\n app/graph/module_api.h | 3 +++\n doc/guides/tools/graph.rst | 4 ++++\n 3 files changed, 44 insertions(+), 1 deletion(-)", "diff": "diff --git a/app/graph/main.c b/app/graph/main.c\nindex b3b8b9a2d7..177e15a556 100644\n--- a/app/graph/main.c\n+++ b/app/graph/main.c\n@@ -18,12 +18,13 @@\n volatile bool force_quit;\n struct conn *conn;\n \n-static const char usage[] = \"%s EAL_ARGS -- -s SCRIPT [-h HOST] [-p PORT] \"\n+static const char usage[] = \"%s EAL_ARGS -- -s SCRIPT [-h HOST] [-p PORT] [--enable-graph-stats] \"\n \t\t\t \"[--help]\\n\";\n \n static struct app_params {\n \tstruct conn_params conn;\n \tchar *script_name;\n+\tbool enable_graph_stats;\n } app = {\n \t.conn = {\n \t\t.welcome = \"\\nWelcome!\\n\\n\",\n@@ -37,6 +38,7 @@ static struct app_params {\n \t\t.msg_handle_arg = NULL, /* set later. */\n \t},\n \t.script_name = NULL,\n+\t.enable_graph_stats = false,\n };\n \n static void\n@@ -53,6 +55,7 @@ app_args_parse(int argc, char **argv)\n {\n \tstruct option lgopts[] = {\n \t\t{\"help\", 0, 0, 'H'},\n+\t\t{\"enable-graph-stats\", 0, 0, 'g'},\n \t};\n \tint h_present, p_present, s_present, n_args, i;\n \tchar *app_name = argv[0];\n@@ -130,6 +133,12 @@ app_args_parse(int argc, char **argv)\n \t\t\t}\n \t\t\tbreak;\n \n+\t\tcase 'g':\n+\t\t\tapp.enable_graph_stats = true;\n+\t\t\tprintf(\"WARNING! Telnet session can not be accessed with\"\n+\t\t\t \"--enable-graph-stats\");\n+\t\t\tbreak;\n+\n \t\tcase 'H':\n \t\tdefault:\n \t\t\tprintf(usage, app_name);\n@@ -141,6 +150,33 @@ app_args_parse(int argc, char **argv)\n \treturn 0;\n }\n \n+bool\n+app_graph_stats_enabled(void)\n+{\n+\treturn app.enable_graph_stats;\n+}\n+\n+\n+bool\n+app_graph_exit(void)\n+{\n+\tstruct timeval tv;\n+\tfd_set fds;\n+\tint ret;\n+\tchar c;\n+\n+\tFD_ZERO(&fds);\n+\tFD_SET(0, &fds);\n+\ttv.tv_sec = 0;\n+\ttv.tv_usec = 100;\n+\tret = select(1, &fds, NULL, NULL, &tv);\n+\tif ((ret < 0 && errno == EINTR) || (ret == 1 && read(0, &c, 1) > 0))\n+\t\treturn true;\n+\telse\n+\t\treturn false;\n+\n+}\n+\n int\n main(int argc, char **argv)\n {\ndiff --git a/app/graph/module_api.h b/app/graph/module_api.h\nindex 8417c2d3dd..a7d287f5c8 100644\n--- a/app/graph/module_api.h\n+++ b/app/graph/module_api.h\n@@ -24,4 +24,7 @@\n extern volatile bool force_quit;\n extern struct conn *conn;\n \n+bool app_graph_stats_enabled(void);\n+bool app_graph_exit(void);\n+\n #endif\ndiff --git a/doc/guides/tools/graph.rst b/doc/guides/tools/graph.rst\nindex 2c06f8e958..649e802d73 100644\n--- a/doc/guides/tools/graph.rst\n+++ b/doc/guides/tools/graph.rst\n@@ -57,6 +57,10 @@ Following are the application command-line options:\n a mandatory parameter which will be used to create desired graph\n for a given use case.\n \n+* ``--enable-graph-stats``\n+\n+ Enable graph statistics printing on console. By default graph statistics are disabled.\n+\n * ``--help``\n \n Dumps application usage\n", "prefixes": [ "v5", "11/12" ] }{ "id": 131774, "url": "