From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id EB43B590F for ; Mon, 23 May 2016 22:48:32 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 23 May 2016 13:48:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,357,1459839600"; d="scan'208";a="987132033" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 23 May 2016 13:48:31 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 May 2016 13:48:31 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 May 2016 13:48:31 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.58]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0248.002; Tue, 24 May 2016 04:48:26 +0800 From: "Liu, Yong" To: "Pei, Yulong" , "dts@dpdk.org" CC: "Pei, Yulong" Thread-Topic: [dts] [PATCH] test_plans: add VLAN ethertype config Thread-Index: AQHRsAPNhbSJynp6fkCDJ40VOUqrcZ/HCNOQ Date: Mon, 23 May 2016 20:48:26 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E2221B89D@SHSMSX103.ccr.corp.intel.com> References: <1463465802-17611-1-git-send-email-yulong.pei@intel.com> In-Reply-To: <1463465802-17611-1-git-send-email-yulong.pei@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTY0MTJiMzAtNzI4MS00YTQ3LTk4NjEtOWViMDVlODBjODc4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InlCeVdPQUtPZll6Um9hZXBOdGdDQWk5eUM3Z1Qxb2lcL2ZhdU1HWVVBSVpjPSJ9 x-ctpclassification: CTP_IC 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 VLAN ethertype config 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: Mon, 23 May 2016 20:48:33 -0000 Applied. Thanks. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yulong Pei > Sent: Monday, May 16, 2016 11:17 PM > To: dts@dpdk.org > Cc: Pei, Yulong > Subject: [dts] [PATCH] test_plans: add VLAN ethertype config >=20 > Signed-off-by: Yulong Pei > --- > test_plans/vlan_ethertype_config_test_plan.rst | 231 > +++++++++++++++++++++++++ > 1 file changed, 231 insertions(+) > create mode 100644 test_plans/vlan_ethertype_config_test_plan.rst >=20 > diff --git a/test_plans/vlan_ethertype_config_test_plan.rst > b/test_plans/vlan_ethertype_config_test_plan.rst > new file mode 100644 > index 0000000..27dbda7 > --- /dev/null > +++ b/test_plans/vlan_ethertype_config_test_plan.rst > @@ -0,0 +1,231 @@ > +.. Copyright (c) <2016>, 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=3D=3D=3D=3D=3D=3D > +Fortville, Support for VLAN ethertype config > +=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 > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +for single vlan defaut TPID is 0x8100. > +for QinQ, default S-Tag+C-Tag VLAN TPIDs 0x88A8 + 0x8100. > +This feature implemented configuration of VLAN ethertype TPID, > +such as changing single vlan TPID 0x8100 to 0xA100, or changing QinQ > "0x88A8 + 0x8100" \ > +to "0x9100+0xA100" or "0x8100+0x8100" > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + one Fortville NIC (4x 10G or 2x10G or 2x40G or 1x10G) > + > +2. software: > + dpdk: http://dpdk.org/git/dpdk > + scapy: http://www.secdev.org/projects/scapy/ > + > +3. Assuming that DUT ports ``0`` and ``1`` are connected to the tester's > port ``A`` and ``B``. > + > +Test Case 1: change VLAN TPID > +=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) start testpmd, start in rxonly mode, > + > +./testpmd -c 0xff -n 4 -- -i --portmask=3D0x3 --txqflags=3D0 > +testpmd> set fwd rxonly > +testpmd> set verbose 1 > +testpmd> start > + > +2) change VLAN TPIDs to 0xA100, > + > +testpmd> vlan set inner tpid 0xA100 0 > + > +3) send a packet with VLAN TPIDs =3D 0xA100, verify it can be recognized= as > vlan packet. > + > +Test Case 2: test VLAN filtering on/off > +=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) start testpmd, setup vlan filter on, start in mac forwarding mode > + > +./testpmd -c 0xff -n 4 -- -i --portmask=3D0x3 --txqflags=3D0 > +testpmd> set fwd mac > +testpmd> vlan set filter on 0 > +testpmd> start > + > +2) send 1 packet with the VLAN Tag 16 on port ``A``, > +Verify that the VLAN packet cannot be received in port ``B``. > + > +3) disable vlan filtering on port ``0``:: > + > +testpmd> vlan set filter off 0 > + > +4) send 1 packet with the VLAN Tag 16 on port ``A``, > +Verify that the VLAN packet can be received in port ``B``. > + > +Test Case 3: test adding VLAN Tag Identifier with changing VLAN TPID > +=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) start testpmd, setup vlan filter on, start in mac forwarding mode, > + > +./testpmd -c 0xff -n 4 -- -i --portmask=3D0x3 --txqflags=3D0 > +testpmd> set fwd mac > +testpmd> vlan set filter on 0 > +testpmd> vlan set strip off 0 > +testpmd> start > + > +2) Add a VLAN Tag Identifier ``16`` on port ``0``:: > + > +testpmd> rx_vlan add 16 0 > + > +3) send 1 packet with the VLAN Tag 16 on port ``A``, > +Verify that the VLAN packet can be received in port ``B`` and TPID is > 0x8100 > + > +4) Change VLAN TPID to 0xA100 on port ``0`` > + > +testpmd> vlan set inner tpid 0xA100 0 > + > +5) send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, > +Verify that the VLAN packet can be received in port ``B`` and TPID is > 0xA100 > + > +4) Remove the VLAN Tag Identifier ``16`` on port ``0``:: > + > +testpmd> rx_vlan rm 16 0 > + > +5) send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, > +Verify that the VLAN packet cannot be received in port ``B``. > + > +Test Case 4: test VLAN header striping with changing VLAN TPID > +=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) start testpmd, setup vlan filter off, vlan strip on, start in mac > forwarding mode, > + > +./testpmd -c 0xff -n 4 -- -i --portmask=3D0x3 --txqflags=3D0 > +testpmd> set fwd mac > +testpmd> vlan set filter off 0 > +testpmd> vlan set strip on 0 > +testpmd> start > + > +2) send 1 packet with the VLAN Tag 16 on port ``A``, > +Verify that packet received in port ``B`` without VLAN Tag Identifier > + > +3) Change VLAN TPID to 0xA100 on port ``0`` > + > +testpmd> vlan set inner tpid 0xA100 0 > + > +4) send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, > +Verify that packet received in port ``B`` without VLAN Tag Identifier > + > +5) Disable vlan header striping on port ``0``:: > + > +testpmd> vlan set strip off 0 > + > +6) send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, > +Verify that packet received in port ``B`` with VLAN Tag Identifier. > + > + > +Test Case 5: test VLAN header inserting with changing VLAN TPID > +=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) start testpmd, enable vlan packet forwarding, start in mac forwarding > mode, > + > +./testpmd -c 0xff -n 4 -- -i --portmask=3D0x3 --txqflags=3D0 > +testpmd> set fwd mac > +testpmd> vlan set filter off 0 > +testpmd> vlan set strip off 0 > +testpmd> start > + > +2) Insert VLAN Tag Identifier ``16`` on port ``1``:: > + > +testpmd> tx_vlan set 1 16 > + > +3) send 1 packet without VLAN Tag Identifier on port ``A``, > +Verify that packet received in port ``B`` with VLAN Tag Identifier 16 an= d > TPID is 0x8100 > + > +4) Change VLAN TPID to 0xA100 on port ``1`` > + > +testpmd> vlan set inner tpid 0xA100 1 > + > +5)send 1 packet without VLAN Tag Identifier on port ``A``, > +Verify that packet received in port ``B`` with VLAN Tag Identifier 16 an= d > TPID is 0xA100. > + > +6) Delete the VLAN Tag Identifier ``16`` on port ``1``:: > + > +testpmd> tx_vlan reset 1 > + > +7) send 1 packet without VLAN Tag Identifieron port ``A``, > +Verify that packet received in port ``B`` without VLAN Tag Identifier 16= . > + > + > +Test Case 6: Change S-Tag and C-Tag within QinQ > +=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) start testpmd, enable QinQ, start in rxonly mode, > + > +./testpmd -c 0xff -n 4 -- -i --portmask=3D0x3 --txqflags=3D0 > +testpmd> vlan set qinq on 0 > +testpmd> set fwd rxonly > +testpmd> set verbose 1 > +testpmd> start > + > +2) change S-Tag+C-Tag VLAN TPIDs to 0x88A8 + 0x8100, > + > +testpmd> vlan set outer tpid 0x88A8 0 > +testpmd> vlan set inner tpid 0x8100 0 > + > +3) send a packet with set S-Tag+C-Tag VLAN TPIDs to 0x88A8 + 0x8100, > +verify it can be recognized as qinq packet. > + > +4) change S-Tag+C-Tag VLAN TPIDs to 0x9100+0xA100, > + > +testpmd> vlan set outer tpid 0x9100 0 > +testpmd> vlan set inner tpid 0xA100 0 > + > +5) send a packet with set S-Tag+C-Tag VLAN TPIDs to 0x9100+0xA100, > +verify it can be recognized as qinq packet. > + > +4) change S-Tag+C-Tag VLAN TPIDs to 0x8100+0x8100, > + > +testpmd> vlan set outer tpid 0x8100 0 > +testpmd> vlan set inner tpid 0x8100 0 > + > +5) send a packet with set S-Tag+C-Tag VLAN TPIDs to 0x8100+0x8100, > +verify it can be recognized as qinq packet. > + > + > +Note: > + > +send packet with specific S-Tag+C-Tag VLAN TPID, > +1. > wrpcap("qinq.pcap",[Ether(dst=3D"68:05:CA:3A:2E:58")/Dot1Q(type=3D0x8100,= vlan=3D > 16)/Dot1Q(type=3D0x8100,vlan=3D1006)/ IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")]). > +2. hexedit qinq.pcap; change tpid field, "ctrl+w" to save, "ctrl+x" to > exit. > +3. sendp(rdpcap("qinq.pcap"), iface=3D"ens260f0"). > + > +send packet with specific VLAN TPID, > +1. > wrpcap("vlan.pcap",[Ether(dst=3D"68:05:CA:3A:2E:58")/Dot1Q(type=3D0x8100,= vlan=3D > 16)/IP(src=3D"192.168.0.1", dst=3D"192.168.0.2")]). > +2. hexedit vlan.pcap; change tpid field, "ctrl+w" to save, "ctrl+x" to > exit. > +3. sendp(rdpcap("vlan.pcap"), iface=3D"ens260f0"). > -- > 2.1.0