Message ID | 20230314173648.69528-1-stephen@networkplumber.org (mailing list archive) |
---|---|
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]) 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 <dev@dpdk.org>; Tue, 14 Mar 2023 18:36:52 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id j13so406591pjd.1 for <dev@dpdk.org>; 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 <stephen@networkplumber.org> To: dev@dpdk.org Cc: Stephen Hemminger <stephen@networkplumber.org> 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 Content-Transfer-Encoding: 8bit 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>, <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>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series | testpmd control C fixes | |
Message
Stephen Hemminger
March 14, 2023, 5:36 p.m. UTC
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(-)
Comments
On Tue, 14 Mar 2023 10:36:45 -0700 Stephen Hemminger <stephen@networkplumber.org> wrote: > 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(-) > This patch is failing the CI tests from something that seems unrelated. Looks like recent cyrptodev or ixgbe change broke something. -Idrivers/net/ice/base -I../drivers/net/ice/base -Idrivers/net/ice/../../common/iavf -I../drivers/net/ice/../../common/iavf -Idrivers/common/iavf -I../drivers/common/iavf -Idrivers/net/mlx5 -I../drivers/net/mlx5 -Idrivers/net/mlx5/linux -I../drivers/net/mlx5/linux -Idrivers/net/mlx5/hws -I../drivers/net/mlx5/hws -Idrivers/common/mlx5 -I../drivers/common/mlx5 -Idrivers/common/mlx5/linux -I../drivers/common/mlx5/linux -Idrivers/bus/auxiliary -I../drivers/bus/auxiliary -I/usr/include/libnl3 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototyp es -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE -march=armv8-a+crc+crypto -march=armv8-a+crc -moutline-atomics -DALLOW_EXPERIMENTAL_API -Wno-deprecated-declarations -MD -MQ 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o' -MF 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o.d' -o 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o' -c ../drivers/net/ixgbe/ixgbe_testpmd.c In file included from ../drivers/net/ixgbe/ixgbe_ethdev.h:11, from ../drivers/net/ixgbe/ixgbe_testpmd.c:9: ../drivers/net/ixgbe/base/ixgbe_type.h:2945:17: error: conflicting types for 'u64' 2945 | #define __le64 u64 | ^~~ In file included from ../drivers/net/ixgbe/base/ixgbe_type.h:46, from ../drivers/net/ixgbe/ixgbe_ethdev.h:11, from ../drivers/net/ixgbe/ixgbe_testpmd.c:9: ../drivers/net/ixgbe/base/ixgbe_osdep.h:94:18: note: previous declaration of 'u64' was here 94 | typedef uint64_t u64; | ^~~ [2968/3157] Compiling C object 'app/test/3062f5d@@dpdk-test@exe/test_alarm.c.o'. [2969/3157] Compiling C object 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_mlx5_mlx5_testpmd.c.o'. [2970/3157] Compiling C object 'drivers/a715181@@tmp_rte_event_cnxk@sta/event_cnxk_tx_cn10k_tx_112_127_seg.c.o'. ninja: build stopped: subcommand failed. ==== End log output ====
On Tue, Mar 14, 2023 at 11:40 PM Stephen Hemminger <stephen@networkplumber.org> wrote: > > On Tue, 14 Mar 2023 10:36:45 -0700 > Stephen Hemminger <stephen@networkplumber.org> wrote: > > > 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(-) > > > > This patch is failing the CI tests from something that seems unrelated. > Looks like recent cyrptodev or ixgbe change broke something. There was no recent change in ixgbe. The build issue is due to added inclusion of signal.h in testpmd.h in patch 2. root@eb72fb63faec:~/dpdk# git stash Saved working directory and index state WIP on main: baf13c3135 version: 23.03-rc2 root@eb72fb63faec:~/dpdk# ninja -C build-mini-aarch64 ninja: Entering directory `build-mini-aarch64' [104/104] Linking target app/dpdk-testpmd. root@eb72fb63faec:~/dpdk# git stash pop On branch main Your branch is up to date with 'origin/main'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: app/test-pmd/testpmd.h no changes added to commit (use "git add" and/or "git commit -a") Dropped refs/stash@{0} (71b7fa29df19c6e8c553ca53e62cf89d1ef1ea97) root@eb72fb63faec:~/dpdk# git diff diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index bdfbfd36d3..ada1d7b438 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -6,6 +6,7 @@ #define _TESTPMD_H_ #include <stdbool.h> +#include <signal.h> #ifdef RTE_LIB_GRO #include <rte_gro.h> root@eb72fb63faec:~/dpdk# ninja -C build-mini-aarch64 ninja: Entering directory `build-mini-aarch64' [24/25] Compiling C object 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o'. FAILED: app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o ccache aarch64-linux-gnu-gcc -Iapp/a172ced@@dpdk-testpmd@exe -Iapp -I../app -Iapp/test-pmd -I../app/test-pmd -Ilib/ethdev -I../lib/ethdev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/arm/include -I../lib/eal/arm/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter -I../lib/meter -Ilib/cmdline -I../lib/cmdline -Ilib/bitratestats -I../lib/bitratestats -Ilib/metrics -I../lib/metrics -Ilib/bpf -I../lib/bpf -Ilib/gro -I../lib/gro -Ilib/gso -I../lib/gso -Ilib/latencystats -I../lib/latencystats -Ilib/pdump -I../lib/pdump -Ilib/pcapng -I../lib/pcapng -Idrivers/net/ixgbe -I../drivers/net/ixgbe -Idrivers/net/ixgbe/base -I../drivers/net/ixgbe/base -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/pci -I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -Ilib/security -I../lib/security -Ilib/cryptodev -I../lib/cryptodev -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -march=armv8-a+crc -moutline-atomics -DALLOW_EXPERIMENTAL_API -Wno-deprecated-declarations -MD -MQ 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o' -MF 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o.d' -o 'app/a172ced@@dpdk-testpmd@exe/.._drivers_net_ixgbe_ixgbe_testpmd.c.o' -c ../drivers/net/ixgbe/ixgbe_testpmd.c In file included from ../drivers/net/ixgbe/ixgbe_ethdev.h:11, from ../drivers/net/ixgbe/ixgbe_testpmd.c:9: ../drivers/net/ixgbe/base/ixgbe_type.h:2945:17: error: conflicting types for 'u64' 2945 | #define __le64 u64 | ^~~ In file included from ../drivers/net/ixgbe/base/ixgbe_type.h:46, from ../drivers/net/ixgbe/ixgbe_ethdev.h:11, from ../drivers/net/ixgbe/ixgbe_testpmd.c:9: ../drivers/net/ixgbe/base/ixgbe_osdep.h:94:18: note: previous declaration of 'u64' was here 94 | typedef uint64_t u64; | ^~~ ninja: build stopped: subcommand failed.