Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/87168/?format=api
http://patches.dpdk.org/api/patches/87168/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210125032953.430840-1-dapengx.yu@intel.com/", "project": { "id": 1, "url": "http://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": "<20210125032953.430840-1-dapengx.yu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210125032953.430840-1-dapengx.yu@intel.com", "date": "2021-01-25T03:29:53", "name": "[v2] app/testpmd: avoid exit without terminal restore", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "36bb1acb0d362b03b9709a007973c608e368ec47", "submitter": { "id": 2042, "url": "http://patches.dpdk.org/api/people/2042/?format=api", "name": "Yu, DapengX", "email": "dapengx.yu@intel.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210125032953.430840-1-dapengx.yu@intel.com/mbox/", "series": [ { "id": 14921, "url": "http://patches.dpdk.org/api/series/14921/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14921", "date": "2021-01-25T03:29:53", "name": "[v2] app/testpmd: avoid exit without terminal restore", "version": 2, "mbox": "http://patches.dpdk.org/series/14921/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/87168/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/87168/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 D0545A052A;\n\tMon, 25 Jan 2021 04:30:13 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8BA3E140DE5;\n\tMon, 25 Jan 2021 04:30:13 +0100 (CET)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 1FDE1140DE4;\n Mon, 25 Jan 2021 04:30:11 +0100 (CET)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jan 2021 19:30:10 -0800", "from unknown (HELO localhost.localdomain) ([10.240.183.93])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jan 2021 19:30:08 -0800" ], "IronPort-SDR": [ "\n hlSj/KwqK3gW8s5x5AYmcR9s2+ud4NXiwAmoaLg7WPhSU0nCZn/AXrqwu0xCa1fgyUL2raaxjY\n ydiZCSBa5c0w==", "\n WO46HNCVpdRLCr2IRvvDfMiw+nK/5Dw/AHIJe4b80w554VF2BE7Ta+YPebTPi761pRfKx08cfR\n k4Jh1PlGUmDg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9874\"; a=\"178879466\"", "E=Sophos;i=\"5.79,372,1602572400\"; d=\"scan'208\";a=\"178879466\"", "E=Sophos;i=\"5.79,372,1602572400\"; d=\"scan'208\";a=\"387131833\"" ], "From": "dapengx.yu@intel.com", "To": "beilei.xing@intel.com, xiaoyun.li@intel.com, wenzhuo.lu@intel.com,\n bernard.iremonger@intel.com, stephen@networkplumber.org", "Cc": "dev@dpdk.org,\n\tDapeng Yu <dapengx.yu@intel.com>,\n\tstable@dpdk.org", "Date": "Mon, 25 Jan 2021 11:29:53 +0800", "Message-Id": "<20210125032953.430840-1-dapengx.yu@intel.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20201224035748.67012-1-dapengx.yu@intel.com>", "References": "<20201224035748.67012-1-dapengx.yu@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2] app/testpmd: avoid exit without terminal\n restore", "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: Dapeng Yu <dapengx.yu@intel.com>\n\nIn interactive mode, if testpmd exit by calling rte_exit without\nrestore terminal attributes, terminal will not echo keyboard input.\n\nregister a function with atexit() in prompt(), when exit() in\nrte_exit() is called, the registered function restores terminal\nattributes.\n\nFixes: 5a8fb55c48ab (\"app/testpmd: support unidirectional configuration\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dapeng Yu <dapengx.yu@intel.com>\n---\n app/test-pmd/cmdline.c | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 89034c8b7..f7e18ba3d 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -17116,6 +17116,7 @@ cmdline_read_from_file(const char *filename)\n void\n prompt(void)\n {\n+\tint ret;\n \t/* initialize non-constant commands */\n \tcmd_set_fwd_mode_init();\n \tcmd_set_fwd_retry_mode_init();\n@@ -17123,15 +17124,23 @@ prompt(void)\n \ttestpmd_cl = cmdline_stdin_new(main_ctx, \"testpmd> \");\n \tif (testpmd_cl == NULL)\n \t\treturn;\n+\n+\tret = atexit(prompt_exit);\n+\tif (ret != 0)\n+\t\tprintf(\"Cannot set exit function for cmdline\\n\");\n+\n \tcmdline_interact(testpmd_cl);\n-\tcmdline_stdin_exit(testpmd_cl);\n+\tif (ret != 0)\n+\t\tcmdline_stdin_exit(testpmd_cl);\n }\n \n void\n prompt_exit(void)\n {\n-\tif (testpmd_cl != NULL)\n+\tif (testpmd_cl != NULL) {\n \t\tcmdline_quit(testpmd_cl);\n+\t\tcmdline_stdin_exit(testpmd_cl);\n+\t}\n }\n \n static void\n", "prefixes": [ "v2" ] }{ "id": 87168, "url": "