From: "Ling, WeiX" <weix.ling@intel.com>
To: Tal Shnaiderman <talshn@nvidia.com>,
"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
Stephen Hemminger <stephen@networkplumber.org>,
Pier Damouny <pdamouny@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>,
"ferruh.yigit@amd.com" <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
Date: Mon, 13 Mar 2023 10:34:55 +0000 [thread overview]
Message-ID: <PH7PR11MB6006BD811BE0B8EA70506697EEB99@PH7PR11MB6006.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MW4PR12MB5668B1BDC87382144C117B3DA4B89@MW4PR12MB5668.namprd12.prod.outlook.com>
> -----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
next prev parent reply other threads:[~2023-03-13 10:35 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 17:23 [RFC 1/2] testpmd: make f_quit flag volatile Stephen Hemminger
2022-10-14 17:23 ` [RFC 2/2] testpmd: cleanup cleanly from signal Stephen Hemminger
2022-11-06 10:50 ` Andrew Rybchenko
2022-11-08 18:16 ` Stephen Hemminger
2022-11-08 18:53 ` [PATCH v2] " Stephen Hemminger
2022-11-08 20:24 ` [PATCH v3] " Stephen Hemminger
2022-11-09 4:10 ` [PATCH v4] " Stephen Hemminger
2022-11-09 21:46 ` Mattias Rönnblom
2022-11-09 22:53 ` Stephen Hemminger
2022-11-10 7:50 ` Mattias Rönnblom
2022-11-10 16:14 ` Stephen Hemminger
2022-11-10 22:06 ` Mattias Rönnblom
2022-11-09 17:29 ` [PATCH v5] " Stephen Hemminger
2022-11-10 7:14 ` Andrew Rybchenko
2022-11-10 16:13 ` Stephen Hemminger
2022-11-10 16:53 ` [PATCH v6] " Stephen Hemminger
2022-11-11 8:05 ` Andrew Rybchenko
2022-11-11 16:49 ` Stephen Hemminger
2022-11-11 16:51 ` [PATCH v7] " Stephen Hemminger
2022-11-12 17:28 ` [PATCH v8] " Stephen Hemminger
2023-01-19 15:53 ` Ferruh Yigit
2023-01-25 18:32 ` [PATCH v9] " Stephen Hemminger
2023-01-30 18:48 ` Ferruh Yigit
2023-01-30 20:11 ` Stephen Hemminger
2022-11-06 10:48 ` [RFC 1/2] testpmd: make f_quit flag volatile Andrew Rybchenko
2022-11-08 18:07 ` [PATCH v2] " Stephen Hemminger
2022-11-09 10:11 ` Ruifeng Wang
2022-11-09 10:37 ` Andrew Rybchenko
2023-01-30 20:09 ` [PATCH v10 0/2] testpmd: handle signals safely Stephen Hemminger
2023-01-30 20:09 ` [PATCH v10 1/2] cmdline: handle EOF in cmdline_poll Stephen Hemminger
2023-01-30 22:12 ` Ferruh Yigit
2023-01-31 2:54 ` Stephen Hemminger
2023-01-30 20:09 ` [PATCH v10 2/2] testpmd: cleanup cleanly from signal Stephen Hemminger
2023-01-31 9:30 ` Ferruh Yigit
2023-01-30 22:13 ` [PATCH v10 0/2] testpmd: handle signals safely Ferruh Yigit
2023-02-03 19:14 ` [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling Stephen Hemminger
2023-02-03 19:14 ` [PATCH v11 1/3] cmdline: make rdline status not private Stephen Hemminger
2023-02-06 2:31 ` fengchengwen
2023-02-03 19:14 ` [PATCH v11 2/3] cmdline: handle EOF in cmdline_poll Stephen Hemminger
2023-02-03 19:14 ` [PATCH v11 3/3] testpmd: cleanup cleanly from signal Stephen Hemminger
2023-02-07 14:49 ` Ferruh Yigit
2023-02-07 14:48 ` [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling Ferruh Yigit
2023-02-19 17:53 ` Stephen Hemminger
2023-03-11 10:17 ` Thomas Monjalon
2023-03-12 17:18 ` Tal Shnaiderman
2023-03-13 10:34 ` Ling, WeiX [this message]
2023-03-13 15:53 ` Stephen Hemminger
2023-03-14 7:05 ` Ling, WeiX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH7PR11MB6006BD811BE0B8EA70506697EEB99@PH7PR11MB6006.namprd11.prod.outlook.com \
--to=weix.ling@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=pdamouny@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=talshn@nvidia.com \
--cc=thomas@monjalon.net \
--cc=yuying.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).