From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 08652271 for ; Tue, 27 Jun 2017 18:59:16 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 27 Jun 2017 09:59:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,271,1496127600"; d="scan'208";a="118021230" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 27 Jun 2017 09:59:15 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Jun 2017 09:59:15 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Jun 2017 09:59:14 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.56]) with mapi id 14.03.0319.002; Wed, 28 Jun 2017 00:59:11 +0800 From: "Liu, Yong" To: "Tu, LijuanX A" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1 1/2] multiple_pthread: Add test plan Thread-Index: AQHS5l0j7yAdwvDcHkCQxkJnd7i9S6Iyu5vwgAMxbQCAAxIucA== Date: Tue, 27 Jun 2017 16:59:11 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62E0FE04@SHSMSX103.ccr.corp.intel.com> References: <1497589130-7175-1-git-send-email-lijuanx.a.tu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E0D4B9@SHSMSX103.ccr.corp.intel.com> <38D041F150D4184C8114E499040E62343DBE38B8@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <38D041F150D4184C8114E499040E62343DBE38B8@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 1/2] multiple_pthread: Add test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 16:59:18 -0000 Lijuan, I've known that this case should cover combinations as more as possible. My= ask is just to add some descriptions about what the meaning of these combi= nations. Like --lcores=3D'0@8,(4-5)@(8-11)', it will start master lcore on core 8 an= d lcore4-5 on core 8-11.=20 For dump command, I think you can use command option replace of args option= . With command option, will show that where lcore thread is running.=20 ps -C testpmd -L -opid,tid,%cpu,psr,comm [root@dpdk-test38 ~]# ps -C testpmd -L -opid,tid,%cpu,psr,comm PID TID %CPU PSR COMMAND 40971 40971 1.8 8 testpmd 40971 40974 0.0 8 eal-intr-thread 40971 40975 3.3 9 lcore-slave-4 40971 40976 0.0 9 lcore-slave-5 40971 40977 0.0 8 pdump-thread Thanks, Marvin > -----Original Message----- > From: Tu, LijuanX A > Sent: Sunday, June 25, 2017 7:00 PM > To: Liu, Yong ; dts@dpdk.org > Subject: RE: [dts] [PATCH V1 1/2] multiple_pthread: Add test plan >=20 > Hi liuyong, >=20 > This is simply random combination test. I will send V2 immediately > The script is fixed selection of several combinations, > I think it's not rigorous , but it 's difficult for us to randomly > generated the combined parameters. >=20 >=20 >=20 > -----Original Message----- > From: Liu, Yong > Sent: Saturday, June 24, 2017 1:18 AM > To: Tu, LijuanX A; dts@dpdk.org > Cc: Tu, LijuanX A > Subject: RE: [dts] [PATCH V1 1/2] multiple_pthread: Add test plan >=20 > Lijuan, some comments below. >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu > > Sent: Thursday, June 15, 2017 9:59 PM > > To: dts@dpdk.org > > Cc: Tu, LijuanX A > > Subject: [dts] [PATCH V1 1/2] multiple_pthread: Add test plan > > > > Signed-off-by: Lijuan Tu > > --- > > test_plans/multiple_pthread_test_plan.rst | 151 > > ++++++++++++++++++++++++++++++ > > 1 file changed, 151 insertions(+) > > create mode 100644 test_plans/multiple_pthread_test_plan.rst > > > > diff --git a/test_plans/multiple_pthread_test_plan.rst > > b/test_plans/multiple_pthread_test_plan.rst > > new file mode 100644 > > index 0000000..4de4643 > > --- /dev/null > > +++ b/test_plans/multiple_pthread_test_plan.rst > > @@ -0,0 +1,151 @@ > > +.. Copyright (c) < 2017 >, Intel Corporation > > + All rights reserved. > > + > > + Redistribution and use in source and binary forms, with or without > > + modification, are permitted provided that the following conditions > > + are met: > > + > > + - Redistributions of source code must retain the above copyright > > + notice, this list of conditions and the following disclaimer. > > + > > + - Redistributions in binary form must reproduce the above copyright > > + notice, this list of conditions and the following disclaimer in > > + the documentation and/or other materials provided with the > > + distribution. > > + > > + - Neither the name of Intel Corporation nor the names of its > > + contributors may be used to endorse or promote products derived > > + from this software without specific prior written permission. > > + > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED > > + OF THE POSSIBILITY OF SUCH DAMAGE. > > + > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > +Multiple Pthread Test > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > + > > + > > +Description > > +----------- > > + > > +This test is a basic multiple pthread test which demonstrates the > > +basics of control group. Cgroup is a Linux kernel feature that > > +limits, accounts for and isolates the resource usage, like CPU, > > +memory, disk I/O, network, etc of a collection of processes. Now, it's > focus on the CPU usage. > > + > > +Prerequisites > > +------------- > > +Support igb_uio driver, kernel is 3.11+. > > +Use "modeprobe uio" "modprobe igb_uio" and then use > > +"./tools/dpdk_nic_bind.py --bind=3Digb_uio device_bus_id" to bind the > > ports. > > + > > +Assuming that an Intel=EF=BF=BD DPDK build has been set up and the tes= tpmd > > +applications have been built. > > + > > +Os required: Linux and FreeBSD > > + > > +Test Case 1: Basic operation > > +---------------------------- > > + > > +To run the application, start the testpmd with the lcoress all > > +running > > with > > +threads and also the unique core assigned, command as follows:: > > + > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'0@8,(4-5)@9' > > + -n 4 > > -- -i --portmask=3D0xc > > + EAL: Master lcore 0 is ready (tid=3Dffd4900;cpuset=3D[8]) > > + EAL: lcore 4 is ready (tid=3D873e7700;cpuset=3D[9]) > > + EAL: lcore 5 is ready (tid=3D873e7700;cpuset=3D[9]) > > + > > +To check the output, we shall make sure the lcore are init on the > > +correct > > cpu. > > +e.g. Duing INIT log we can found below: > > + > > +The process should start successfully and display a command prompt as > > follows:: > > + > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'0@8,(4-5)@9' > > + -n 4 > > -- -i --portmask=3D0xc > > + Checking link statuses... > > + Port 0 Link Up - speed 10000 Mbps - full-duplex > > + Port 1 Link Up - speed 10000 Mbps - full-duplex > > + Done > > + > > +Start the packet forwarding as follows:: > > + > > + testpmd>set fwd mac > > + > > +Before running the test, make sure the core is a unique one > > +otherwise, the throughput will be floating on different cores, > > +another thing is to make sure all the logic cores are running, > > +command as > > follows:: > > + > > + testpmd>set corelist 4,5 > > + > > +Pay attention that set corelist need to be configured before start, > > +otherwise, it will not work:: > > + > > + testpmd>start > > + testpmd>show config fwd > > + > > +Using the command to find the threads that's running, as follows:: > > + > > + ps -C testpmd -L -opid,tid,%cpu,psr,args > > + > > +Result as follows: > > + > > + PID TID %CPU PSR COMMAND > > + 179459 179459 0.2 8 ./x86_64-native-linuxapp-gcc/app/testpmd -- > > lcores=3D0 at 8,(4-5)@9 -n 4 -- -i --portmask=3D0xc > > + 179459 179460 0.0 21 ./x86_64-native-linuxapp-gcc/app/testpmd > > + -- > > lcores=3D0 at 8,(4-5)@9 -n 4 -- -i --portmask=3D0xc > > + 179461 0.0 21 ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D0 > > at 8,(4-5)@9 -n 4 -- -i --portmask=3D0xc > > + 179459 179462 80.4 9 ./x86_64-native-linuxapp-gcc/app/testpmd -- > > lcores=3D0 at 8,(4-5)@9 -n 4 -- -i --portmask=3D0xc > > + 179459 179463 0.0 9 ./x86_64-native-linuxapp-gcc/app/testpmd -- > > lcores=3D0 at 8,(4-5)@9 -n 4 -- -i --portmask=3D0xc > > + > > +You will see that there are two threads running on core 9. > > +The last 2 threads are running threads, their TID will be assigned to > > +the > > tasks in the folder thread0. > > + > > + cd /sys/fs/cgroup/cpu/dpdk/thread0 > > + echo 179462 > tasks > > + echo 179463 > tasks > > + > > +Assgined the percentage of cpu these two threads occupy as follows: > > + > Typo issue here, "assigned" should be "assigned". >=20 > > + echo 10000 > cpu.cfs_quota_us > > + > > +This means the two threads will totally occupy 10% of the CPU and each > 5%. > > + > > + > > +Test Case 2: Positive Test > > +-------------------------- > > + > Please add some description of these settings. >=20 >=20 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'0 at > > + 8,(4-5)@(8- > > 11)' -n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrs= t=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'1,2@(0-4,6),(3- > > 4,6)@5,(7,8)' -n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf= 01 -- > > txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd -- > > lcores=3D'(0,CONFIG_RTE_MAX_LCORE-1)@(4,5)' -n 4 -- -i --txfreet=3D32 -= - > > rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0,64-66)@(4,5)' - > > n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'2-5,6,7-9' -n > > + 4 -- > > -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'2, (3-5)@ 3' > > + -n 4 > > -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'(0,7-4)@(4,5)= ' > > + -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + > > +Test Case 3: Negative Test > > +-------------------------- > > + > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0-,4-7)@(4,5)' -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(-1,4-7)@(4,5)' -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0,4-7-9)@(4,5)' - > > n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0,abcd)@(4,5)' -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0,4-7)@(1-,5)' -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0,4-7)@(-1,5)' -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'(0,4-7)@(4,5-= 8- > 9)' > > -n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D3= 2 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0,4-7)@(abc,5)' - > > n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0,4-7)@(4,xyz)' - > > n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'(0,4-7)=3D(8,= 9)' > > + -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'2,3 at 4,(0- > > 1,,4))' -n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 > > --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'[0-,4-7]@(4,5)' -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd > > + --lcores=3D'(0-,4-7)@[4,5]' -n > > 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'3-4 at 3,2 at= 5- > 6' > > -n 4 -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D3= 2 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'2,,3''2--3' -= n > > + 4 - > > - -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > + ./x86_64-native-linuxapp-gcc/app/testpmd --lcores=3D'2,,,3''2--3' > > + -n 4 > > -- -i --txfreet=3D32 --rxfreet=3D32 --txqflags=3D0xf01 --txrst=3D32 > > -- > > 2.5.0