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 9222E41E1D; Mon, 13 Mar 2023 16:53:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77FC640ED4; Mon, 13 Mar 2023 16:53:31 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 092E640ED4 for ; Mon, 13 Mar 2023 16:53:30 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id kb15so12517866pjb.1 for ; Mon, 13 Mar 2023 08:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1678722809; 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=XYiMXLlhPH4hwZrCY2ZVp8KGW75pVBf/Vfky5D3FDJo=; b=WlyebIpWWdoXXYoLUwGyDxUynLNXvakNJYv88KIR7SHVloylOU5Ktoq4Vxi6DEyM+h IPlGeVBdnqgJaIENgKx/Oxh5ilK0vic2+PnK6YeAKQQCAnyKBs+9CCvfoY+jgYDRJo3Z dAKuAxs6aPgMpFjAVLBq35nsY9FkHiR7M9PLl0vdIpVPR4EDjVC+pPfj1LxzpwHA+l0N XAjZqt2xIHzkd2VD69mLrLjkxLOKZ/IZt7ZFYRH5OOm8bZYOzLT2bfQPOCDTExDakbNi DPJdtMGu2OWui9t5m6hABLie8c7B9QK9B3dvPVHUMsxBVdeevKlqw21XtxBEx/tacjZR 5/rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678722809; 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=XYiMXLlhPH4hwZrCY2ZVp8KGW75pVBf/Vfky5D3FDJo=; b=p3tl3fCDkfHN8MvxYN9smvDkf7g109XvQP4wBPrxG/JnibDYQBU2WSv6QO73IYwfxF dLL/7OleCqwK6pN4EMfqFNxxhjQPvaET6Z3Vc9WIiypQgJmWRTtAQTeiA2BrLiYCqZio oaVqLLyarm5/mt27nrJY1xnmBIDdpItFNRK1CHnBLqgrePZ1ynHmEgaWtmfRS/sHWbzP E9tRESYsVjKW0y6Wefwm7Qe29ixRFSgmS6N/j4sRQcFn6t4VI/i2qaIcgbrQZFVCQVDg x3mfKmw6zKdEGc9dCxLjCZkfaOKxrTUGJUMtZ3CvmedyiDvhwKBhVKaIonZSKrKVRSMm FEVA== X-Gm-Message-State: AO0yUKWfmCr+MKZEUOzHxeS92Vc5QpMnc9nqEf2gCmQ0r6gxzZiw+aZr 81w8Eshgq0863btw1oAAA2pJUw== X-Google-Smtp-Source: AK7set+2R0eubO8kccXj9Yd2JF+59Sy4tdYWzcAbi+qYi66mlMtUb68gzOMf7mvzJ0qSzLD37RWtLQ== X-Received: by 2002:a17:903:2cb:b0:19c:d452:b282 with SMTP id s11-20020a17090302cb00b0019cd452b282mr37421438plk.12.1678722809137; Mon, 13 Mar 2023 08:53:29 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id kx5-20020a170902f94500b0019a837be977sm26347plb.271.2023.03.13.08.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 08:53:29 -0700 (PDT) Date: Mon, 13 Mar 2023 08:53:27 -0700 From: Stephen Hemminger To: "Ling, WeiX" Cc: Tal Shnaiderman , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Pier Damouny , "dev@dpdk.org" , "stable@dpdk.org" , "ferruh.yigit@amd.com" , "Singh, Aman Deep" , "Zhang, Yuying" , Raslan Darawsheh Subject: Re: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handling Message-ID: <20230313085327.4f658c0f@hermes.local> In-Reply-To: References: <20230130200914.22049-1-stephen@networkplumber.org> <20230203191409.97567-1-stephen@networkplumber.org> <20230219095348.5f496a67@hermes.local> <2636586.KRxA6XjA2N@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Mon, 13 Mar 2023 10:34:55 +0000 "Ling, WeiX" wrote: > > -----Original Message----- > > From: Tal Shnaiderman > > Sent: Monday, March 13, 2023 1:18 AM > > To: NBU-Contact-Thomas Monjalon (EXTERNAL) ; > > Stephen Hemminger ; Pier Damouny > > > > Cc: dev@dpdk.org; stable@dpdk.org; ferruh.yigit@amd.com; Singh, Aman > > Deep ; Zhang, Yuying > > ; Raslan Darawsheh > > Subject: RE: [PATCH v11 0/3] Fix cmdline_poll and testpmd signal handli= ng > > =20 > > > 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: =20 > > > > On Fri, 3 Feb 2023 11:14:06 -0800 > > > > Stephen Hemminger wrote: > > > > =20 > > > > > 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(-) > > > > > =20 > > > > > > > > Could this please be merged for 23.03? > > > > There are Ack's. > > > > The only CI failure is a bogus performance test failure. =20 > > > > > > There was no review from testpmd maintainers. > > > > > > I've added Cc: stable@dpdk.org. > > > Applied, thanks. > > > =20 > > Hi, > >=20 > > Commit "testpmd: cleanup cleanly from signal" from this series breaks > > TestPMD's interactive mode on Windows. > >=20 > > See https://bugs.dpdk.org/show_bug.cgi?id=3D1180 =20 >=20 > Hi Stephen, >=20 > I found an issue based this commit(0fd1386c: app/testpmd: cleanup cleanly= from signal). >=20 > The packets can't loop in 2 testpmd after start dpdk-pdump to capture pac= kets Immediately (less than 1 second). >=20 > Steps: >=20 > 1. Bind 1 CBDMA channel to vfio-pci, then start vhost-user as back-end: >=20 > x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 28-36 -n 4 -a 0000:80:04.0= --file-prefix=3Dvhost \ > --vdev 'eth_vhost0,iface=3Dvhost-net0,queues=3D8,client=3D1,\ > dmas=3D[txq0@0000:80:04.0;txq1@0000:80:04.0;txq2@0000:80:04.0;txq3@0000:8= 0:04.0;txq4@0000:80:04.0;txq5@0000:80:04.0;rxq2@0000:80:04.0;rxq3@0000:80:0= 4.0;rxq4@0000:80:04.0;rxq5@0000:80:04.0;rxq6@0000:80:04.0;rxq7@0000:80:04.0= ]' > --iova=3Dva -- -i --nb-cores=3D4 --rxq=3D8 --txq=3D8 --txd=3D1024 --rxd= =3D1024 >=20 > 2. Start virtio-user as front-end: >=20 > x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 38-42 -n 4 --file-prefix= =3Dvirtio-user0 --no-pci \ > --vdev=3Dnet_virtio_user0,mac=3D00:11:22:33:44:10,path=3D./vhost-net0,que= ues=3D8,mrg_rxbuf=3D1,in_order=3D1,packed_vq=3D1,server=3D1 \ > -- -i --nb-cores=3D4 --rxq=3D8 --txq=3D8 --txd=3D1024 --rxd=3D1024 > testpmd>set fwd csum > testpmd>start =20 >=20 > 3.Start dpdk-pdump to capture packets: >=20 > x86_64-native-linuxapp-gcc/app/dpdk-pdump -v --file-prefix=3Dvirtio-user= 0 -- \ > --pdump 'device_id=3Dnet_virtio_user0,queue=3D0,rx-dev=3D/root/dpdk/pdum= p-rx-q0.pcap,mbuf-size=3D8000' --pdump \ > 'device_id=3Dnet_virtio_user0,queue=3D1,rx-dev=3D/root/dpdk/pdump-rx-q1.p= cap,mbuf-size=3D8000' >=20 > 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): >=20 > 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 =20 >=20 > 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. >=20 > 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) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pfd.events =3D POLLIN; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pfd.revents =3D 0;=C2=A0-=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return poll(&pfd, 1, 0); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return poll(&pfd, 1, -1); > }=C2=A0ssize_t Thanks, cmdline_poll() existed a long time but was never used by any part o= f DPDK until now. My preference is to get the old cmdline_read_char() working and = just remove it.