From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8264F41E82; Mon, 13 Mar 2023 00:01:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32BE2406BC; Mon, 13 Mar 2023 00:01:58 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 0DAD640151 for ; Mon, 13 Mar 2023 00:01:55 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id d13so162418pjh.0 for ; Sun, 12 Mar 2023 16:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1678662115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=V+C3cfbaYpSL7tO4hcOnI7yUrtuFflnMEuL3QPN2SuQ=; b=cB3skvoosIC9K07aqfJ80S/Kihc+DwXHBdsOX6tPTRCNxb9HDR7mtAWPgZ0VIPPS2i /LrQodlCIFrYA2h2D3tk6ypokB8HoLdmcnzIWTjeyUo8zw/uYy/975F9gDjjABBsgzwB rgKXRsijL6lZIh80Naz3gmz8aaLts72lCzOAttmPjyjihGwMX2kVZCsI82RQ2wwLTQyY d6/F9YwpM6Z0q7y33Kk6W0gfzWwLe3l2pTxLdwYRZuzZU/T1l/b32hdWp982APj1qsai DNdIGpyfHsbwVnWMuBYrKb3rfepV/UYsh9PQLp1qSjT8X+5DOr4HQtkQchZGsK4hDKlG zMQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678662115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V+C3cfbaYpSL7tO4hcOnI7yUrtuFflnMEuL3QPN2SuQ=; b=1hJp/c2Pc7fBHRBEOo1A+hjCso6kBwfcQM6f6W55mM050EUyvJMLe9WC1Ulcht7ID1 EikU+re4aT0Ky5B/e2xta8ezXLehovUOuyJznngDQYY7zinDQ409eO9w5V+mo+Z7OFjW CysCAFV8xS9crvGYTJaKOwdyWu34Y8nPJoWc/lUOs/vD1sUcfIlmyRblUxn7BISqFvmA PlXKkDdRQGc9PL9jA9TdPgzCDnr4IYkr8OCol0QkaWX7R6S6CTgjJX7k6L21Elazhev2 IYmH1Odq8B7E6HMYlpP8zyWquUWZ44qM6BeyQqd/5i7AJenQArppyJW5DcFbPumUVeg1 9dCg== X-Gm-Message-State: AO0yUKXVSQFOYEKENWM/WFGoDXZ4g28ja/qD6rtCUvljluKs+wNnWCHg /PZIBm/ji86w0rT1dpHhzavg1w== X-Google-Smtp-Source: AK7set9r9vYsmSEhIlInRFZkCLRelgtSNNqsXXxcNsWzrv/0Da+GTUUYJLzSlhFgRrMpNL8KITDARg== X-Received: by 2002:a17:903:120d:b0:1a0:49e2:df91 with SMTP id l13-20020a170903120d00b001a049e2df91mr1711759plh.0.1678662114967; Sun, 12 Mar 2023 16:01:54 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id lk15-20020a17090308cf00b001898ee9f723sm3357357plb.2.2023.03.12.16.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 16:01:54 -0700 (PDT) Date: Sun, 12 Mar 2023 16:01:52 -0700 From: Stephen Hemminger To: bugzilla@dpdk.org Cc: dev@dpdk.org Subject: Re: [Bug 1180] TestPMD shell get stuck Message-ID: <20230312160152.118418dc@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sun, 12 Mar 2023 17:09:12 +0000 bugzilla@dpdk.org wrote: > https://bugs.dpdk.org/show_bug.cgi?id=3D1180 >=20 > 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: dev@dpdk.org > Reporter: pdamouny@nvidia.com > Target Milestone: --- >=20 > from the commit 0fd1386c30c3ad9365d7fdd2829bf7cb2e1b9dff >=20 > when entering testpmd with interactive mode=20 > while writing the shell get stuck and cant enter or CTRL C >=20 Try this patch, it works on Linux. Sorry, don't have time or setup to run D= PDK on Windows. I am totally volunteer on the project now. =46rom f3410ed290c2f2b1981be289a121089366edcb4c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger 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. Fixes: 0fd1386c30c3 ("app/testpmd: cleanup cleanly from signal") Bugzilla ID: 1180 Signed-off-by: Stephen Hemminger --- lib/cmdline/cmdline_os_unix.c | 3 ++- lib/cmdline/cmdline_os_windows.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/cmdline/cmdline_os_unix.c b/lib/cmdline/cmdline_os_unix.c index 64a945a34fb3..755a6141546d 100644 --- a/lib/cmdline/cmdline_os_unix.c +++ b/lib/cmdline/cmdline_os_unix.c @@ -16,7 +16,8 @@ terminal_adjust(struct cmdline *cl) tcgetattr(0, &cl->oldterm); =20 memcpy(&term, &cl->oldterm, sizeof(term)); - term.c_lflag &=3D ~(ICANON | ECHO | ISIG); + term.c_lflag &=3D ~(ICANON | ECHO); + term.c_lflag |=3D ISIG; tcsetattr(0, TCSANOW, &term); =20 setbuf(stdin, NULL); diff --git a/lib/cmdline/cmdline_os_windows.c b/lib/cmdline/cmdline_os_wind= ows.c index 73ed9ba290b8..be11409029a2 100644 --- a/lib/cmdline/cmdline_os_windows.c +++ b/lib/cmdline/cmdline_os_windows.c @@ -32,10 +32,10 @@ terminal_adjust(struct cmdline *cl) mode &=3D ~( 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 |=3D ENABLE_VIRTUAL_TERMINAL_INPUT; + mode |=3D ENABLE_VIRTUAL_TERMINAL_INPUT | + ENABLE_PROCESSED_INPUT; /* Ctrl C processed by the system */ SetConsoleMode(handle, mode); } =20 --=20 2.39.2