Message ID | 20230203191409.97567-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 C856E41BC0; Fri, 3 Feb 2023 20:14:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F34D42BC9; Fri, 3 Feb 2023 20:14:15 +0100 (CET) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id E437E40DDA for <dev@dpdk.org>; Fri, 3 Feb 2023 20:14:13 +0100 (CET) Received: by mail-pf1-f180.google.com with SMTP id z3so4448095pfb.2 for <dev@dpdk.org>; Fri, 03 Feb 2023 11:14:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=RkkmGT5L0uzsk2SP3GAU548/jYZ6Tn6N08Z5+gleais=; b=gqXx9aD4q3IJEvdCKfVH0Z9gR410FHaLxYp2JHxpcQXo63uhoNAyyel0pug1BIJrPj G6jfKfP3vZ7Z7CYokxJMWveYMPmYaBIC4w/tk3sWV3KjF8DMmZI1armjEdA5gCxDssga KWJwT7FMZnASPC5A7qCW1EVMEVh5GpUcwp5wq+rl+3aTN8jORjYkJIKArJjxUNn7I8/M BGtjRQTaMXnSyWeNv1liklnaFw6nvQyRKgDGZhg/RQ7xb3a4bybs5NkfgNir+SnwRKD5 nHZUVr0Wbfb9/Yu4QujnTFfe1ge8Ei01fYX3uw2aLebhc/ruywkN7CRLZLrnqJa0H7/P jjeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=RkkmGT5L0uzsk2SP3GAU548/jYZ6Tn6N08Z5+gleais=; b=Uk9eysKqL2TlcQ67KjiCh+L2X6fTnj9VyWu3OQqZB1zjo3i1IcFIAp7cw3iYMBB6dH u3U15/wqIJIlj6xoGqWDb5PI0NeT1i23ti4ALwtDRV2gL5coFF6nqxke8iob7l+cxeSP uJi9VtVqYncLWSNz5ZqO/kQMWqd9HHxaJXyNki6edsJW5P8jNw9NvJrG78lSFJe6JhVw ncJ0BU23cbIuQj/S/RxN55jeiMgzVtOdHioDsn92JhCGcnzUGqri+CMU121RvcXSgsfo q3tKqRN0Cfcdi6Wh5lOV4AqUrO9RlFbvwZ30Eu384EolNzAReHjc5cu4ThN6ME8RzBVk 1epg== X-Gm-Message-State: AO0yUKU2B3L0gYn3dFC4HY54I8za2FCwffw+zuQQVQWJF6r05e+6RghH VBQrlN6WSv0V4KR+6YSPmXHviOxn/JEGuljthtNn4w== X-Google-Smtp-Source: AK7set/1ubEB0GvMO+I5YZhjrv/mRN+oUCZC5MjOmW6nvs4r2KjTiWE4PMJPvnKypJ/dX2C5A92ZZg== X-Received: by 2002:aa7:91d2:0:b0:581:1c:82a3 with SMTP id z18-20020aa791d2000000b00581001c82a3mr9815614pfa.1.1675451652839; Fri, 03 Feb 2023 11:14:12 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l9-20020a056a00140900b00593edee1af6sm2200898pfu.67.2023.02.03.11.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 11:14:12 -0800 (PST) From: Stephen Hemminger <stephen@networkplumber.org> To: dev@dpdk.org Cc: stable@dpdk.org, Stephen Hemminger <stephen@networkplumber.org> Subject: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling Date: Fri, 3 Feb 2023 11:14:06 -0800 Message-Id: <20230203191409.97567-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230130200914.22049-1-stephen@networkplumber.org> References: <20230130200914.22049-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 |
Fix cmdline_poll and testpmd signal handling
|
|
Message
Stephen Hemminger
Feb. 3, 2023, 7:14 p.m. UTC
This patchset keeps uncovering bad practices in the cmdline library around end of file and signal handling. Stephen Hemminger (3): cmdline: make rdline status not private cmdline: handle EOF in cmdline_poll testpmd: cleanup cleanly from signal app/test-pmd/cmdline.c | 29 +++++-------- app/test-pmd/testpmd.c | 77 ++++++++++++++++------------------- app/test-pmd/testpmd.h | 1 + lib/cmdline/cmdline.c | 11 +++-- lib/cmdline/cmdline.h | 6 +++ lib/cmdline/cmdline_private.h | 6 --- 6 files changed, 62 insertions(+), 68 deletions(-)
Comments
On 2/3/2023 7:14 PM, Stephen Hemminger wrote: > This patchset keeps uncovering bad practices in the cmdline library > around end of file and signal handling. > > Stephen Hemminger (3): > cmdline: make rdline status not private > cmdline: handle EOF in cmdline_poll > testpmd: cleanup cleanly from signal Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
On Fri, 3 Feb 2023 11:14:06 -0800 Stephen Hemminger <stephen@networkplumber.org> wrote: > This patchset keeps uncovering bad practices in the cmdline library > around end of file and signal handling. > > Stephen Hemminger (3): > cmdline: make rdline status not private > cmdline: handle EOF in cmdline_poll > testpmd: cleanup cleanly from signal > > app/test-pmd/cmdline.c | 29 +++++-------- > app/test-pmd/testpmd.c | 77 ++++++++++++++++------------------- > app/test-pmd/testpmd.h | 1 + > lib/cmdline/cmdline.c | 11 +++-- > lib/cmdline/cmdline.h | 6 +++ > lib/cmdline/cmdline_private.h | 6 --- > 6 files changed, 62 insertions(+), 68 deletions(-) > Could this please be merged for 23.03? There are Ack's. The only CI failure is a bogus performance test failure.
19/02/2023 18:53, Stephen Hemminger: > On Fri, 3 Feb 2023 11:14:06 -0800 > Stephen Hemminger <stephen@networkplumber.org> wrote: > > > This patchset keeps uncovering bad practices in the cmdline library > > around end of file and signal handling. > > > > Stephen Hemminger (3): > > cmdline: make rdline status not private > > cmdline: handle EOF in cmdline_poll > > testpmd: cleanup cleanly from signal > > > > app/test-pmd/cmdline.c | 29 +++++-------- > > app/test-pmd/testpmd.c | 77 ++++++++++++++++------------------- > > app/test-pmd/testpmd.h | 1 + > > lib/cmdline/cmdline.c | 11 +++-- > > lib/cmdline/cmdline.h | 6 +++ > > lib/cmdline/cmdline_private.h | 6 --- > > 6 files changed, 62 insertions(+), 68 deletions(-) > > > > Could this please be merged for 23.03? > There are Ack's. > The only CI failure is a bogus performance test failure. There was no review from testpmd maintainers. I've added Cc: stable@dpdk.org. Applied, thanks.
> Subject: Re: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling > > External email: Use caution opening links or attachments > > > 19/02/2023 18:53, Stephen Hemminger: > > On Fri, 3 Feb 2023 11:14:06 -0800 > > Stephen Hemminger <stephen@networkplumber.org> wrote: > > > > > This patchset keeps uncovering bad practices in the cmdline library > > > around end of file and signal handling. > > > > > > Stephen Hemminger (3): > > > cmdline: make rdline status not private > > > cmdline: handle EOF in cmdline_poll > > > testpmd: cleanup cleanly from signal > > > > > > app/test-pmd/cmdline.c | 29 +++++-------- > > > app/test-pmd/testpmd.c | 77 ++++++++++++++++------------------- > > > app/test-pmd/testpmd.h | 1 + > > > lib/cmdline/cmdline.c | 11 +++-- > > > lib/cmdline/cmdline.h | 6 +++ > > > lib/cmdline/cmdline_private.h | 6 --- > > > 6 files changed, 62 insertions(+), 68 deletions(-) > > > > > > > Could this please be merged for 23.03? > > There are Ack's. > > The only CI failure is a bogus performance test failure. > > There was no review from testpmd maintainers. > > I've added Cc: stable@dpdk.org. > Applied, thanks. > Hi, Commit "testpmd: cleanup cleanly from signal" from this series breaks TestPMD's interactive mode on Windows. See https://bugs.dpdk.org/show_bug.cgi?id=1180
> -----Original Message----- > From: Tal Shnaiderman <talshn@nvidia.com> > Sent: Monday, March 13, 2023 1:18 AM > To: NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; > Stephen Hemminger <stephen@networkplumber.org>; Pier Damouny > <pdamouny@nvidia.com> > Cc: dev@dpdk.org; stable@dpdk.org; ferruh.yigit@amd.com; Singh, Aman > Deep <aman.deep.singh@intel.com>; Zhang, Yuying > <yuying.zhang@intel.com>; Raslan Darawsheh <rasland@nvidia.com> > Subject: RE: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling > > > Subject: Re: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal > > handling > > > > External email: Use caution opening links or attachments > > > > > > 19/02/2023 18:53, Stephen Hemminger: > > > On Fri, 3 Feb 2023 11:14:06 -0800 > > > Stephen Hemminger <stephen@networkplumber.org> wrote: > > > > > > > This patchset keeps uncovering bad practices in the cmdline > > > > library around end of file and signal handling. > > > > > > > > Stephen Hemminger (3): > > > > cmdline: make rdline status not private > > > > cmdline: handle EOF in cmdline_poll > > > > testpmd: cleanup cleanly from signal > > > > > > > > app/test-pmd/cmdline.c | 29 +++++-------- > > > > app/test-pmd/testpmd.c | 77 ++++++++++++++++------------------- > > > > app/test-pmd/testpmd.h | 1 + > > > > lib/cmdline/cmdline.c | 11 +++-- > > > > lib/cmdline/cmdline.h | 6 +++ > > > > lib/cmdline/cmdline_private.h | 6 --- > > > > 6 files changed, 62 insertions(+), 68 deletions(-) > > > > > > > > > > Could this please be merged for 23.03? > > > There are Ack's. > > > The only CI failure is a bogus performance test failure. > > > > There was no review from testpmd maintainers. > > > > I've added Cc: stable@dpdk.org. > > Applied, thanks. > > > Hi, > > Commit "testpmd: cleanup cleanly from signal" from this series breaks > TestPMD's interactive mode on Windows. > > See https://bugs.dpdk.org/show_bug.cgi?id=1180 Hi Stephen, I found an issue based this commit(0fd1386c: app/testpmd: cleanup cleanly from signal). The packets can't loop in 2 testpmd after start dpdk-pdump to capture packets Immediately (less than 1 second). Steps: 1. Bind 1 CBDMA channel to vfio-pci, then start vhost-user as back-end: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 28-36 -n 4 -a 0000:80:04.0 --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,\ dmas=[txq0@0000:80:04.0;txq1@0000:80:04.0;txq2@0000:80:04.0;txq3@0000:80:04.0;txq4@0000:80:04.0;txq5@0000:80:04.0;rxq2@0000:80:04.0;rxq3@0000:80:04.0;rxq4@0000:80:04.0;rxq5@0000:80:04.0;rxq6@0000:80:04.0;rxq7@0000:80:04.0]' --iova=va -- -i --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 2. Start virtio-user as front-end: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 38-42 -n 4 --file-prefix=virtio-user0 --no-pci \ --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1 \ -- -i --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 testpmd>set fwd csum testpmd>start 3.Start dpdk-pdump to capture packets: x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio-user0 -- \ --pdump 'device_id=net_virtio_user0,queue=0,rx-dev=/root/dpdk/pdump-rx-q0.pcap,mbuf-size=8000' --pdump \ 'device_id=net_virtio_user0,queue=1,rx-dev=/root/dpdk/pdump-rx-q1.pcap,mbuf-size=8000' 4.Set forwarding mode and send packets from vhost-user(execute this step must immediately, we use the automation script to do, it can be reproduced, and if I add time.sleep(1) before this step, it works well): testpmd>set fwd mac testpmd>set txpkts 64,64,64,2000,2000,2000 testpmd>set burst 1 testpmd>start tx_first 1 testpmd>show port stats 0 And I try to modify the follows code, then re-build DPDK, it works well. Maybe it's not a good method, just for your reference. diff --git a/lib/cmdline/cmdline_os_unix.c b/lib/cmdline/cmdline_os_unix.c index 64a945a34f..ede8289244 100644 --- a/lib/cmdline/cmdline_os_unix.c +++ b/lib/cmdline/cmdline_os_unix.c @@ -37,7 +37,7 @@ cmdline_poll_char(struct cmdline *cl) pfd.events = POLLIN; pfd.revents = 0; - return poll(&pfd, 1, 0); + return poll(&pfd, 1, -1); } ssize_t Regards, Wei Ling
On Mon, 13 Mar 2023 10:34:55 +0000 "Ling, WeiX" <weix.ling@intel.com> wrote: > > -----Original Message----- > > From: Tal Shnaiderman <talshn@nvidia.com> > > Sent: Monday, March 13, 2023 1:18 AM > > To: NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; > > Stephen Hemminger <stephen@networkplumber.org>; Pier Damouny > > <pdamouny@nvidia.com> > > Cc: dev@dpdk.org; stable@dpdk.org; ferruh.yigit@amd.com; Singh, Aman > > Deep <aman.deep.singh@intel.com>; Zhang, Yuying > > <yuying.zhang@intel.com>; Raslan Darawsheh <rasland@nvidia.com> > > Subject: RE: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling > > > > > Subject: Re: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal > > > handling > > > > > > External email: Use caution opening links or attachments > > > > > > > > > 19/02/2023 18:53, Stephen Hemminger: > > > > On Fri, 3 Feb 2023 11:14:06 -0800 > > > > Stephen Hemminger <stephen@networkplumber.org> wrote: > > > > > > > > > This patchset keeps uncovering bad practices in the cmdline > > > > > library around end of file and signal handling. > > > > > > > > > > Stephen Hemminger (3): > > > > > cmdline: make rdline status not private > > > > > cmdline: handle EOF in cmdline_poll > > > > > testpmd: cleanup cleanly from signal > > > > > > > > > > app/test-pmd/cmdline.c | 29 +++++-------- > > > > > app/test-pmd/testpmd.c | 77 ++++++++++++++++------------------- > > > > > app/test-pmd/testpmd.h | 1 + > > > > > lib/cmdline/cmdline.c | 11 +++-- > > > > > lib/cmdline/cmdline.h | 6 +++ > > > > > lib/cmdline/cmdline_private.h | 6 --- > > > > > 6 files changed, 62 insertions(+), 68 deletions(-) > > > > > > > > > > > > > Could this please be merged for 23.03? > > > > There are Ack's. > > > > The only CI failure is a bogus performance test failure. > > > > > > There was no review from testpmd maintainers. > > > > > > I've added Cc: stable@dpdk.org. > > > Applied, thanks. > > > > > Hi, > > > > Commit "testpmd: cleanup cleanly from signal" from this series breaks > > TestPMD's interactive mode on Windows. > > > > See https://bugs.dpdk.org/show_bug.cgi?id=1180 > > Hi Stephen, > > I found an issue based this commit(0fd1386c: app/testpmd: cleanup cleanly from signal). > > The packets can't loop in 2 testpmd after start dpdk-pdump to capture packets Immediately (less than 1 second). > > Steps: > > 1. Bind 1 CBDMA channel to vfio-pci, then start vhost-user as back-end: > > x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 28-36 -n 4 -a 0000:80:04.0 --file-prefix=vhost \ > --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,\ > dmas=[txq0@0000:80:04.0;txq1@0000:80:04.0;txq2@0000:80:04.0;txq3@0000:80:04.0;txq4@0000:80:04.0;txq5@0000:80:04.0;rxq2@0000:80:04.0;rxq3@0000:80:04.0;rxq4@0000:80:04.0;rxq5@0000:80:04.0;rxq6@0000:80:04.0;rxq7@0000:80:04.0]' > --iova=va -- -i --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 > > 2. Start virtio-user as front-end: > > x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 38-42 -n 4 --file-prefix=virtio-user0 --no-pci \ > --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1 \ > -- -i --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 > testpmd>set fwd csum > testpmd>start > > 3.Start dpdk-pdump to capture packets: > > x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=virtio-user0 -- \ > --pdump 'device_id=net_virtio_user0,queue=0,rx-dev=/root/dpdk/pdump-rx-q0.pcap,mbuf-size=8000' --pdump \ > 'device_id=net_virtio_user0,queue=1,rx-dev=/root/dpdk/pdump-rx-q1.pcap,mbuf-size=8000' > > 4.Set forwarding mode and send packets from vhost-user(execute this step must immediately, we use the automation script to do, it can be reproduced, and if I add time.sleep(1) before this step, it works well): > > testpmd>set fwd mac > testpmd>set txpkts 64,64,64,2000,2000,2000 > testpmd>set burst 1 > testpmd>start tx_first 1 > testpmd>show port stats 0 > > And I try to modify the follows code, then re-build DPDK, it works well. Maybe it's not a good method, just for your reference. > > diff --git a/lib/cmdline/cmdline_os_unix.c b/lib/cmdline/cmdline_os_unix.c > index 64a945a34f..ede8289244 100644 > --- a/lib/cmdline/cmdline_os_unix.c > +++ b/lib/cmdline/cmdline_os_unix.c > @@ -37,7 +37,7 @@ cmdline_poll_char(struct cmdline *cl) > pfd.events = POLLIN; > pfd.revents = 0; - return poll(&pfd, 1, 0); > + return poll(&pfd, 1, -1); > } ssize_t Thanks, cmdline_poll() existed a long time but was never used by any part of DPDK until now. My preference is to get the old cmdline_read_char() working and just remove it.
> -----Original Message----- > From: Stephen Hemminger <stephen@networkplumber.org> > Sent: Monday, March 13, 2023 11:53 PM > To: Ling, WeiX <weix.ling@intel.com> > Cc: Tal Shnaiderman <talshn@nvidia.com>; NBU-Contact-Thomas Monjalon > (EXTERNAL) <thomas@monjalon.net>; Pier Damouny > <pdamouny@nvidia.com>; dev@dpdk.org; stable@dpdk.org; > ferruh.yigit@amd.com; Singh, Aman Deep <aman.deep.singh@intel.com>; > Zhang, Yuying <yuying.zhang@intel.com>; Raslan Darawsheh > <rasland@nvidia.com> > Subject: Re: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling > > On Mon, 13 Mar 2023 10:34:55 +0000 > "Ling, WeiX" <weix.ling@intel.com> wrote: > > > > -----Original Message----- > > > From: Tal Shnaiderman <talshn@nvidia.com> > > > Sent: Monday, March 13, 2023 1:18 AM > > > To: NBU-Contact-Thomas Monjalon (EXTERNAL) > <thomas@monjalon.net>; > > > Stephen Hemminger <stephen@networkplumber.org>; Pier Damouny > > > <pdamouny@nvidia.com> > > > Cc: dev@dpdk.org; stable@dpdk.org; ferruh.yigit@amd.com; Singh, > Aman > > > Deep <aman.deep.singh@intel.com>; Zhang, Yuying > > > <yuying.zhang@intel.com>; Raslan Darawsheh <rasland@nvidia.com> > > > Subject: RE: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal > > > handling > > > > > > > Subject: Re: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal > > > > handling > > > > > > > > External email: Use caution opening links or attachments > > > > > > > > > > > > 19/02/2023 18:53, Stephen Hemminger: > > > > > On Fri, 3 Feb 2023 11:14:06 -0800 Stephen Hemminger > > > > > <stephen@networkplumber.org> wrote: > > > > > > > > > > > This patchset keeps uncovering bad practices in the cmdline > > > > > > library around end of file and signal handling. > > > > > > > > > > > > Stephen Hemminger (3): > > > > > > cmdline: make rdline status not private > > > > > > cmdline: handle EOF in cmdline_poll > > > > > > testpmd: cleanup cleanly from signal > > > > > > > > > > > > app/test-pmd/cmdline.c | 29 +++++-------- > > > > > > app/test-pmd/testpmd.c | 77 ++++++++++++++++--------------- > ---- > > > > > > app/test-pmd/testpmd.h | 1 + > > > > > > lib/cmdline/cmdline.c | 11 +++-- > > > > > > lib/cmdline/cmdline.h | 6 +++ > > > > > > lib/cmdline/cmdline_private.h | 6 --- > > > > > > 6 files changed, 62 insertions(+), 68 deletions(-) > > > > > > > > > > > > > > > > Could this please be merged for 23.03? > > > > > There are Ack's. > > > > > The only CI failure is a bogus performance test failure. > > > > > > > > There was no review from testpmd maintainers. > > > > > > > > I've added Cc: stable@dpdk.org. > > > > Applied, thanks. > > > > > > > Hi, > > > > > > Commit "testpmd: cleanup cleanly from signal" from this series > > > breaks TestPMD's interactive mode on Windows. > > > > > > See https://bugs.dpdk.org/show_bug.cgi?id=1180 > > > > Hi Stephen, > > > > I found an issue based this commit(0fd1386c: app/testpmd: cleanup cleanly > from signal). > > > > The packets can't loop in 2 testpmd after start dpdk-pdump to capture > packets Immediately (less than 1 second). > > > > Steps: > > > > 1. Bind 1 CBDMA channel to vfio-pci, then start vhost-user as back-end: > > > > x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 28-36 -n 4 -a 0000:80:04.0 > --file-prefix=vhost \ > > --vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,\ > > > dmas=[txq0@0000:80:04.0;txq1@0000:80:04.0;txq2@0000:80:04.0;txq3@000 > 0:80:04.0;txq4@0000:80:04.0;txq5@0000:80:04.0;rxq2@0000:80:04.0;rxq3@00 > 00:80:04.0;rxq4@0000:80:04.0;rxq5@0000:80:04.0;rxq6@0000:80:04.0;rxq7@0 > 000:80:04.0]' > > --iova=va -- -i --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 > > > > 2. Start virtio-user as front-end: > > > > x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 38-42 -n 4 --file- > prefix=virtio-user0 --no-pci \ > > --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues > > =8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1 \ > > -- -i --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 > > testpmd>set fwd csum > > testpmd>start > > > > 3.Start dpdk-pdump to capture packets: > > > > x86_64-native-linuxapp-gcc/app/dpdk-pdump -v > > --file-prefix=virtio-user0 -- \ --pdump > > 'device_id=net_virtio_user0,queue=0,rx-dev=/root/dpdk/pdump-rx- > q0.pcap,mbuf-size=8000' --pdump \ > 'device_id=net_virtio_user0,queue=1,rx-dev=/root/dpdk/pdump-rx- > q1.pcap,mbuf-size=8000' > > > > 4.Set forwarding mode and send packets from vhost-user(execute this > step must immediately, we use the automation script to do, it can be > reproduced, and if I add time.sleep(1) before this step, it works well): > > > > testpmd>set fwd mac > > testpmd>set txpkts 64,64,64,2000,2000,2000 set burst 1 start tx_first > > testpmd>1 show port stats 0 > > > > And I try to modify the follows code, then re-build DPDK, it works well. > Maybe it's not a good method, just for your reference. > > > > diff --git a/lib/cmdline/cmdline_os_unix.c > > b/lib/cmdline/cmdline_os_unix.c index 64a945a34f..ede8289244 100644 > > --- a/lib/cmdline/cmdline_os_unix.c > > +++ b/lib/cmdline/cmdline_os_unix.c > > @@ -37,7 +37,7 @@ cmdline_poll_char(struct cmdline *cl) > > pfd.events = POLLIN; > > pfd.revents = 0; - return poll(&pfd, 1, 0); > > + return poll(&pfd, 1, -1); > > } ssize_t > > > Thanks, cmdline_poll() existed a long time but was never used by any part of > DPDK until now. My preference is to get the old cmdline_read_char() > working and just remove it. Hi Stephen, I have submit a Bugzilla bug: https://bugs.dpdk.org/show_bug.cgi?id=1181 to track this issue. And I have verified based on DPDK23.03-rc2(baf13c3135) with this you new patch (https://patches.dpdk.org/project/dpdk/patch/20230313213831.80071-1-stephen@networkplumber.org/) PASSED. OS: Ubuntu 22.04.1 LTS/Linux 5.15.45-051545-generic Regards, Wei Ling