TestPMD shell get stuck
https://bugs.dpdk.org/show_bug.cgi?id=1180
Bug ID: 1180
Summary: TestPMD shell get stuck
Product: DPDK
Version: unspecified
Hardware: x86
OS: Windows
Status: UNCONFIRMED
Severity: major
Priority: Normal
Component: testpmd
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
from the commit 0fd1386c30c3ad9365d7fdd2829bf7cb2e1b9dff
when entering testpmd with interactive mode
while writing the shell get stuck and cant enter or CTRL C
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
Quoted 16 lines · On Sun, 12 Mar 2023 17:09:12 +0000 [email protected] wrote:
https://bugs.dpdk.org/show_bug.cgi?id=1180
Bug ID: 1180
Summary: TestPMD shell get stuck
Product: DPDK
Version: unspecified
Hardware: x86
OS: Windows
Status: UNCONFIRMED
Severity: major
Priority: Normal
Component: testpmd
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Quoted 5 lines
from the commit
0fd1386c30c3ad9365d7fdd2829bf7cb2e1b9dffwhen entering testpmd with interactive mode
while writing the shell get stuck and cant enter or CTRL C
IANAW (I am not a Windows Programmer)
Is there a way to read from stdin and get interrupted if Ctrl C is hit. On Linux, this requires doing select() then do a read() since the default behaviour is to restart the read() on signal.
Quoted 16 lines · On Sun, 12 Mar 2023 17:09:12 +0000 [email protected] wrote:
https://bugs.dpdk.org/show_bug.cgi?id=1180
Bug ID: 1180
Summary: TestPMD shell get stuck
Product: DPDK
Version: unspecified
Hardware: x86
OS: Windows
Status: UNCONFIRMED
Severity: major
Priority: Normal
Component: testpmd
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Quoted 5 lines
from the commit
0fd1386c30c3ad9365d7fdd2829bf7cb2e1b9dffwhen entering testpmd with interactive mode
while writing the shell get stuck and cant enter or CTRL C
Try this patch, it works on Linux. Sorry, don't have time or setup to run DPDK on Windows. I am totally volunteer on the project now.
From f3410ed290c2f2b1981be289a121089366edcb4c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <[email protected]>
Date: Sun, 12 Mar 2023 15:58:14 -0700
Subject: [PATCH] testpmd: make sure ctrl-c causes SIGINT
The setting in terminal handling for both Unix style and Windows was not ensuring that Ctrl-C character would cause interrupt.
Bugzilla ID: 1180
--- lib/cmdline/cmdline_os_unix.c | 3 ++- lib/cmdline/cmdline_os_windows.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
lib/cmdline/cmdline_os_unix.c +2 -1
@@ -16,7 +16,8 @@ terminal_adjust(struct cmdline *cl)tcgetattr (0 , &cl->oldterm);memcpy (&term, &cl->oldterm,sizeof (term)); - term.c_lflag &= ~(ICANON |ECHO |ISIG ); + term.c_lflag &= ~(ICANON |ECHO ); + term.c_lflag |=ISIG ;tcsetattr (0 ,TCSANOW , &term);setbuf (stdin,NULL );
lib/cmdline/cmdline_os_windows.c +2 -2
@@ -32,10 +32,10 @@ terminal_adjust(struct cmdline *cl) mode &= ~(ENABLE_LINE_INPUT |/* no line buffering */ ENABLE_ECHO_INPUT |/* no echo */ -ENABLE_PROCESSED_INPUT |/* pass Ctrl+C to program */ ENABLE_MOUSE_INPUT |/* no mouse events */ ENABLE_WINDOW_INPUT );/* no window resize events */ - mode |=ENABLE_VIRTUAL_TERMINAL_INPUT ; + mode |=ENABLE_VIRTUAL_TERMINAL_INPUT | +ENABLE_PROCESSED_INPUT ;/* Ctrl C processed by the system */ SetConsoleMode (handle, mode); }
Signature · 1 line
2.39.2
https://bugs.dpdk.org/show_bug.cgi?id=1180
Pier Damouny ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED--- Comment #6 from Pier Damouny ([email protected]) --- the issue was solved by commit f1d0993e034e39968a2c80a8561b46c260c27487
https://github.com/Mellanox/dpdk.org/commit/f1d0993e034e39968a2c80a8561b46c260c27487
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.