From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id AF22E1B3CF for ; Wed, 18 Oct 2017 04:06:31 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 17 Oct 2017 19:06:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,393,1503385200"; d="scan'208";a="324455798" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 17 Oct 2017 19:06:30 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Oct 2017 19:06:30 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Oct 2017 19:06:30 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Wed, 18 Oct 2017 10:06:28 +0800 From: "Liu, Yong" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH] test_plans: add test plan of queue region Thread-Index: AQHTQzmFXoi5L4PjOEyONLXVHHph0qLo5IPg Date: Wed, 18 Oct 2017 02:06:28 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62EF85F9@SHSMSX103.ccr.corp.intel.com> References: <1507799266-5514-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1507799266-5514-1-git-send-email-yuan.peng@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: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] test_plans: add test plan of queue region 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: Wed, 18 Oct 2017 02:06:32 -0000 Yuan,=20 Please add more background introduction in the header of test plan. It will help others have the idea about what happened in later contents. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of peng,yuan > Sent: Thursday, October 12, 2017 5:08 PM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH] test_plans: add test plan of queue region >=20 > From: Peng Yuan >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/test_plans/queue_region_test_plan.rst > b/test_plans/queue_region_test_plan.rst > new file mode 100644 > index 0000000..a068a43 > --- /dev/null > +++ b/test_plans/queue_region_test_plan.rst > @@ -0,0 +1,230 @@ > +.. 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=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +API to configure queue regions for RSS > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + Fortville > + > +2. software: > + dpdk: http://dpdk.org/git/dpdk > + scapy: http://www.secdev.org/projects/scapy/ > + > +3. bind the port to dpdk driver:: > + > + ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 > + > + the mac address of 05:00.0 is 00:00:00:00:01:00 > + > +4. start the testpmd:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 -- -i --rxq= =3D16 > --txq=3D16 > + testpmd> port config all rss all > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +Test case 1: different pctype packet can enter the expected queue region > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Set queue region on a port:: > + > + testpmd> set port 0 queue-region region_id 0 queue_start_index 1 > queue_num 1 > + testpmd> set port 0 queue-region region_id 1 queue_start_index 3 > queue_num 2 > + testpmd> set port 0 queue-region region_id 2 queue_start_index 6 > queue_num 2 > + testpmd> set port 0 queue-region region_id 3 queue_start_index 8 > queue_num 2 > + testpmd> set port 0 queue-region region_id 4 queue_start_index 11 > queue_num 4 > + testpmd> set port 0 queue-region region_id 5 queue_start_index 15 > queue_num 1 > + > +2. Set the mapping of flowtype to region index on a port:: > + > + testpmd> set port 0 queue-region region_id 0 flowtype 31 > + testpmd> set port 0 queue-region region_id 1 flowtype 32 > + testpmd> set port 0 queue-region region_id 2 flowtype 33 > + testpmd> set port 0 queue-region region_id 3 flowtype 34 > + testpmd> set port 0 queue-region region_id 4 flowtype 35 > + testpmd> set port 0 queue-region region_id 5 flowtype 45 > + testpmd> set port 0 queue-region region_id 2 flowtype 41 > + testpmd> set port 0 queue-region flush on > + > +3. send packet:: > + > + pkt1 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/UDP(sport=3D23,dport=3D24)/Raw('x'*20) > + pkt2 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D33,dport=3D34,flags=3D"S")/Raw('x'*20) > + pkt3 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D33,dport=3D34,flags=3D"PA")/Raw('x' * 20= ) > + pkt4 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/SCTP(sport=3D44,dport=3D45,tag=3D1)/SCTPChunkData(da= ta=3D"X" * > 20) > + pkt5 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/Raw('x'*20) > + pkt6 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IPv6(src=3D"2001::1", dst=3D"2001::2")/Raw('x'= * 20) > + pkt7 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/UDP(sport=3D24,dport=3D25)/Raw('x'*20) > + pkt8 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D1)/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/Raw('x'*20) > + > + verify the pkt1 to queue 1, pkt2 to queue 3 or queue 4, > + pkt3 to queue 6 or queue 7, pkt4 to queue 8 or queue 9, > + pkt5 to queue 11 or 12 or 13 or 14, > + pkt6 to queue 15, pkt7 to queue 6 or queue 7, > + pkt8 enter the same queue with pkt5. > + > +4. verified the rules can be listed and flushed:: > + > + testpmd> show port 0 queue-region > + testpmd> set port 0 queue-region flush off > + > +Notes: fortville can't parse the TCP SYN type packet, fortpark can parse > it. > +So if fortville, pkt2 to queue 6 or queue 7. > + > +Test case 2: different user priority packet can enter the expected queue > region > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D > + > +1. Set queue region on a port:: > + > + testpmd> set port 0 queue-region region_id 0 queue_start_index 0 > queue_num 1 > + testpmd> set port 0 queue-region region_id 7 queue_start_index 1 > queue_num 8 > + testpmd> set port 0 queue-region region_id 2 queue_start_index 10 > queue_num 4 > + > +2. Set the mapping of User Priority to Traffic Classes on a port:: > + > + testpmd> set port 0 queue-region UP 3 region_id 0 > + testpmd> set port 0 queue-region UP 1 region_id 7 > + testpmd> set port 0 queue-region UP 2 region_id 2 > + testpmd> set port 0 queue-region UP 7 region_id 2 > + testpmd> set port 0 queue-region flush on > + > +3. send packet:: > + > + pkt1=3DEther(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D3)/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/UDP(sport=3D22, dport=3D23)/Raw('x'*20) > + pkt2=3DEther(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D1)/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/UDP(sport=3D22, dport=3D23)/Raw('x'*20) > + pkt3=3DEther(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D2)/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D32, dport=3D33)/Raw('x'*20) > + pkt4=3DEther(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D7)/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D32, dport=3D33)/Raw('x'*20) > + pkt5=3DEther(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/Dot1Q(prio=3D7)/IP(src=3D"192.168.0.3", > dst=3D"192.168.0.4")/UDP(sport=3D22, dport=3D23)/Raw('x'*20) > + pkt6=3DEther(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/IP(src=3D"192.168.0.3", > dst=3D"192.168.0.4")/UDP(sport=3D22, dport=3D23)/Raw('x'*20) > + > + verify the pkt1 to queue 0, > + pkt2 to queue 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8. > + pkt3 to queue 10 or 11 or 12 or 13. > + pkt4 enter the same queue with pkt3. > + pkt5 to queue 10 or 11 or 12 or 13. > + pkt6 enter different queue from pkt5. > + > +4. verified the rules can be listed and flushed:: > + > + testpmd> show port 0 queue-region > + testpmd> set port 0 queue-region flush off > + > +Test case 3: boundary value testing > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. boundary value testing of "Set a queue region on a port" > + > + the following three rules are set successfully:: > + > + testpmd> set port 0 queue-region region_id 0 queue_start_index 0 > queue_num 16 > + testpmd> set port 0 queue-region flush on > + testpmd> set port 0 queue-region flush off > + testpmd> set port 0 queue-region region_id 0 queue_start_index 15 > queue_num 1 > + testpmd> set port 0 queue-region flush on > + testpmd> set port 0 queue-region flush off > + testpmd> set port 0 queue-region region_id 7 queue_start_index 2 > queue_num 8 > + testpmd> set port 0 queue-region flush on > + > + all the three rules can be listed:: > + > + testpmd> show port 0 queue-region > + testpmd> set port 0 queue-region flush off > + > + the following four rules can't be set successfully.:: > + > + testpmd> set port 0 queue-region region_id 8 queue_start_index 2 > queue_num 2 > + testpmd> set port 0 queue-region region_id 1 queue_start_index 16 > queue_num 1 > + testpmd> set port 0 queue-region region_id 2 queue_start_index 15 > queue_num 2 > + testpmd> set port 0 queue-region region_id 3 queue_start_index 2 > queue_num 3 > + > + no rules can be listed:: > + > + testpmd> show port 0 queue-region > + testpmd> set port 0 queue-region flush off > + > +2. boundary value testing of "Set the mapping of flowtype to region inde= x > + on a port":: > + > + testpmd> set port 0 queue-region region_id 0 queue_start_index 2 > queue_num 2 > + testpmd> set port 0 queue-region region_id 7 queue_start_index 4 > queue_num 4 > + > + the first two rules can be set successfully:: > + > + testpmd> set port 0 queue-region region_id 0 flowtype 63 > + testpmd> set port 0 queue-region region_id 7 flowtype 0 > + > + the first two rules can be listed:: > + > + testpmd> show port 0 queue-region > + > + the last two rule can't be set successfully:: > + > + testpmd> set port 0 queue-region region_id 0 flowtype 64 > + testpmd> set port 0 queue-region region_id 2 flowtype 34 > + testpmd> set port 0 queue-region flush on > + > + the last two rules can't be listed:: > + > + testpmd> show port 0 queue-region > + testpmd> set port 0 queue-region flush off > + > +3. boundary value testing of "Set the mapping of UP to region index > + on a port":: > + > + testpmd> set port 0 queue-region region_id 0 queue_start_index 2 > queue_num 2 > + testpmd> set port 0 queue-region region_id 7 queue_start_index 4 > queue_num 4 > + > + the first two rules can be set successfully:: > + > + testpmd> set port 0 queue-region UP 7 region_id 0 > + testpmd> set port 0 queue-region UP 0 region_id 7 > + > + the first two rules can be listed:: > + > + testpmd> show port 0 queue-region > + > + the last two rule can't be set successfully:: > + > + testpmd> set port 0 queue-region UP 8 region_id 0 > + testpmd> set port 0 queue-region UP 1 region_id 2 > + testpmd> set port 0 queue-region flush on > + > + the last two rules can't be listed:: > + > + testpmd> show port 0 queue-region > + testpmd> set port 0 queue-region flush off > -- > 2.5.0