From patchwork Tue Mar 14 17:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 125114 Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 43F6D41E93; Tue, 14 Mar 2023 18:36:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17AB2410D1; Tue, 14 Mar 2023 18:36:53 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id 018BB40A7E for ; Tue, 14 Mar 2023 18:36:52 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id j13so406591pjd.1 for ; Tue, 14 Mar 2023 10:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1678815411; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QxjnqJJ0C+YjEARO0VbpDpYH7u1A8pGPbIbAO6AODBA=; b=fKiF1GpkF9VaWbRsBqe4JKpqrwWumTFPuyY2BdhbJsdsAcLqE56zTit6UPT/U1+4RM 1aUg1WopzqwPyfY8UiYMDL9KtbFO7kox0ZFM9E6lxfTVyQULrxYkD9A9kXGYjQyKLsUk pnKkO1wwRBWgMjoPxYs0BVpzKYVXKvyUCb8mupCiHioOzxAZh6eNsw76HHonahtFFky5 iSulG0JhvMQcWpIuQ9Qr/jf82zJ/7QYeNtjk5/03YM5oMLhXGvxn1njSJpKolbuuXxCV CS0omv6KP1skbVgt/kUtfxpcwaxYib7TRDPjfLp/v82WILAzgeZhtCSapai5SjVMF+Sz aW1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678815411; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QxjnqJJ0C+YjEARO0VbpDpYH7u1A8pGPbIbAO6AODBA=; b=4xYiRvaLM7JpspCsUavg4tmVAyNJD3DWTVwmRBScbFEDZ2RqmIWbP0zRZWQ6VGSIYa kRWiVpoW30xNN5lCwziXkGD0lboJvUYk+U6lxDH2evhxc67QurKAG+J/Em5CLEi0d8BR tQwkOOoScOLgsahrzTvU/gkBLoHXGojsfCOJMyemom8DCEwNVFIKKbhYFpFu0QAqFpd7 XElGyJl3W69eIR1NIOitHHJlInka2YCA8LAt3lJp82u4XZ7y9XDWnM0bGBABJ3Tflb5E HpFigyEPxYab8qV0ZuNSWRLpD5JtItKZFMmqv9makR0kxK5wpMP8Gnk6DsSNv+H7zrN6 eXYA== X-Gm-Message-State: AO0yUKUA4d9KKHJOzpo7WGg7xml1JSlcGh3FqCA757wojDU53mEBm/hW OLkibY1sfGbAXJ+v6oGQQxCKoidrz/WfsXbo20trMw== X-Google-Smtp-Source: AK7set/1JpdymIyBKkbNqI1OjlEBar47tQQ0Y5eirzRThQB+hnUHY2bWXNiE68J/XXRnT1bcbAOKyA== X-Received: by 2002:a17:903:248b:b0:1a0:459b:3276 with SMTP id p11-20020a170903248b00b001a0459b3276mr6269001plw.11.1678815410868; Tue, 14 Mar 2023 10:36:50 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id q11-20020a170902a3cb00b0019ac9c4f32esm1979970plb.309.2023.03.14.10.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 10:36:50 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/3] testpmd control C fixes Date: Tue, 14 Mar 2023 10:36:45 -0700 Message-Id: <20230314173648.69528-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313171905.67720-1-stephen@networkplumber.org> References: <20230313171905.67720-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Resolve issues around using control-C in testpmd. Using cmdline_poll() is broken and won't work right so don't use it. Instead use cmdline_interact() and fix the signal handling. Stephen Hemminger (3): testpmd: go back to using cmdline_interact testpmd: use sig_atomic_t for flag testpmd: enable interrupt in interactive mode app/test-pmd/cmdline.c | 27 ++++++++++++++------------- app/test-pmd/testpmd.c | 17 ++++++++++++----- app/test-pmd/testpmd.h | 3 ++- lib/cmdline/cmdline.h | 10 ++++++++++ lib/cmdline/cmdline_os_unix.c | 8 +++++++- lib/cmdline/cmdline_os_windows.c | 18 ++++++++++++++++-- lib/cmdline/cmdline_private.h | 2 +- lib/cmdline/version.map | 3 +++ 8 files changed, 65 insertions(+), 23 deletions(-)