From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1F653A32A2 for ; Fri, 25 Oct 2019 09:07:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 142F31E553; Fri, 25 Oct 2019 09:07:43 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D0F681E54A for ; Fri, 25 Oct 2019 09:07:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2019 00:07:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,227,1569308400"; d="scan'208";a="197950850" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 25 Oct 2019 00:07:39 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 25 Oct 2019 00:07:39 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 25 Oct 2019 00:07:36 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 25 Oct 2019 00:07:36 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.176]) by SHSMSX154.ccr.corp.intel.com ([10.239.6.54]) with mapi id 14.03.0439.000; Fri, 25 Oct 2019 15:07:34 +0800 From: "Zhang, Yuwei1" To: "Zhu, TaoX" , "dts@dpdk.org" CC: "Zhu, TaoX" Thread-Topic: [dts] [PATCH V1] test_plan: add test plan for port representor Thread-Index: AQHVb3zfTkMh3WwKv0Se5Lf62R228KdrJq9g Date: Fri, 25 Oct 2019 07:07:34 +0000 Message-ID: References: <1568961270-41923-1-git-send-email-taox.zhu@intel.com> In-Reply-To: <1568961270-41923-1-git-send-email-taox.zhu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 V1] test_plan: add test plan for port representor 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Acked-by Yuwei Zhang -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Zhu Tao Sent: Friday, September 20, 2019 2:35 PM To: dts@dpdk.org Cc: Zhu, TaoX Subject: [dts] [PATCH V1] test_plan: add test plan for port representor add port_representor_test_plan.rst to test_plans Signed-off-by: Zhu Tao --- test_plans/port_representor_test_plan.rst | 206 ++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 test_plans/port_representor_test_plan.rst diff --git a/test_plans/port_representor_test_plan.rst b/test_plans/port_re= presentor_test_plan.rst new file mode 100644 index 0000000..e7c1849 --- /dev/null +++ b/test_plans/port_representor_test_plan.rst @@ -0,0 +1,206 @@ +.. Copyright (c) <2019>, 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=3D=3D +Port Representor Tests +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 +Use two representor ports as the control plane to manage the two VFs,=20 +the control plane could change VFs behavior such as change promiscous=20 +mode, stats reset, etc. our statistical data information is independent=20 +on the control plane and data plane. + +Prerequisites +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Create two VFs and two VFs representor ports which are used as control pla= ne. + +1. bind PF to igb_uio:: + + ./usertools/dpdk-devbind.py -b igb_uio 0000:af:00.0 + +2. create two VFs from PF:: + + echo 2 > /sys/bus/pci/devices/0000\:af\:00.0/max_vfs + +3. bind two VFs to vfio-pci:: + + ./usertools/dpdk-devbind.py -b vfio-pci 0000:af:02.0 0000:af:02.1 + +4. start a testpmd with create 2 VFs representor ports as control plane na= med testpmd-pf:: + + ./testpmd --lcores 1,2 -n 4 -w af:00.0,representor=3D0-1 --socket-mem = 1024,1024 \ + --proc-type auto --file-prefix testpmd-pf -- -i=20 + --port-topology=3Dchained + +5. start two testpmd as dataplane named testpmd-vf0/testpmd-vf1(case 3 run= later):: + + ./testpmd --lcores 3,4 -n 4 -w af:02.0 --socket-mem 1024,1024 --proc-t= ype auto --file-prefix testpmd-vf0 -- -i + ./testpmd --lcores 5,6 -n 4 -w af:02.1 --socket-mem 1024,1024=20 + --proc-type auto --file-prefix testpmd-vf1 -- -i + +Note: Every case needs to restart testpmd. + +Test Cases +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +1. Test Case 1: VF Stats show and clear [ixgbe not support] +----------------------------------------------------------- +Description: use control testpmd to get and clear dataplane testpmd ports = Stats. + +1. prepare 3 testpmd to receive packets:: + + PF testpmd> set promisc 0 off + PF testpmd> start + VF0 testpmd> set promisc 0 off + VF0 testpmd> start + VF1 testpmd> set promisc 0 off + VF1 testpmd> start + +2. send 30 packets by scapy as below:: + + scapy> pkt1=3DEther(src=3Dsrc_mac, dst=3Dpf_mac)/IP() + scapy> pkt2=3DEther(src=3Dsrc_mac, dst=3Dvf0_mac)/IP() + scapy> pkt3=3DEther(src=3Dsrc_mac, dst=3Dvf1_mac)/IP() + scapy> pkts=3D[pkt1, pkt2, pkt3]*10 + scapy> sendp(pkts, iface=3D"ens785f0") + +3. check port stats in control testpmd, it will show 1 PF and 2 VF stats:: + + PF testpmd> show port stats all + + expected result: + VF0 and VF1 will show receive 10 packets separately in control testmpd. + +4. clear port stats in control testpmd:: + + PF testpmd> clear vf stats 0 0 + PF testpmd> clear vf stats 0 1 + PF testpmd> clear port stats all + PF testpmd> show port stats all + + expected result: + all the testpmd's port stats should be cleared + +Note: PF statistics superimpose the number of VFs, and the independent com= mand + 'clear vf stats ' to clear this part of the data. + +2. Test Case 2: VF Promiscous enable/disable +-------------------------------------------- +Description: use control testpmd to enable/disable dataplane testpmd ports= promiscous mode. + +1. prepare 3 testpmd to receive packets, turn on VF0 promisc mode in contr= ol testpmd:: + + PF testpmd> set promisc 0 off + PF testpmd> start + VF0 testpmd> set promisc 0 off + VF0 testpmd> start + VF1 testpmd> set promisc 0 off + VF1 testpmd> start + PF testpmd> set promisc 1 on + +2. send 40 packets by scapy as below:: + + scapy> pkt1=3DEther(src=3Dsrc_mac, dst=3Dpf_mac)/IP() + scapy> pkt2=3DEther(src=3Dsrc_mac, dst=3Dvf0_mac)/IP() + scapy> pkt3=3DEther(src=3Dsrc_mac, dst=3Dvf1_mac)/IP() + scapy> pkt4=3DEther(src=3Dsrc_mac, dst=3Dunicast_mac)/IP() + scapy> pkts=3D[pkt1, pkt2, pkt3, pkt4]*10 + scapy> sendp(pkts, iface=3D"ens785f0") + +3. check port stats in DUT:: + + PF testpmd> show port stats all + + expected result: + VF0 should receive 20 packets(10 vf0_mac and 10 unicast_mac) and VF1=20 + show receive 10 packets in representor ports of PF. + +3. Test Case 3: set VF MAC address +---------------------------------- +Description: use control testpmd to set vf mac address + +1. Run PF testpmd with PF first, set VF0 and VF1 mac address use represent= or ports:: + + PF testpmd> mac_addr set 1 aa:11:22:33:44:55 + PF testpmd> mac_addr set 2 aa:22:33:44:55:66 + PF testpmd> set promisc 0 off + PF testpmd> start + +2. Run VFs testpmd, and turn off promisc mode:: + + VF0 testpmd> set promisc 0 off + VF0 testpmd> start + VF1 testpmd> set promisc 0 off + VF1 testpmd> start + +3. use test case 2 step 2 to send packets from traffic generator + +4. check port stats in DUT:: + + PF testpmd> show port stats all + + expected result: + VF0 should receive 10 packets and VF1 show receive 10 packets in represe= ntor ports of PF. + +4. Test Case 4: set vlan filter +------------------------------- +Description: use control testpmd to set vlan + +1. set promisc mode off in control testpmd, turn on vlan filter, add vlan = filter in each VF:: + + PF testpmd> set promisc 1 off + PF testpmd> vlan set filter on 1 + PF testpmd> rx_vlan add 3 1 + PF testpmd> set promisc 2 off + PF testpmd> vlan set filter on 2 + PF testpmd> rx_vlan add 4 2 + VF0 testpmd> start + VF1 testpmd> start + + +2. use scapy to send packets as below:: + + scapy> pkt1=3DEther(src=3Dsrc_mac, dst=3Dvf0_mac)/Dot1Q(vlan=3D3)/IP() + scapy> pkt2=3DEther(src=3Dsrc_mac, dst=3Dvf1_mac)/Dot1Q(vlan=3D4)/IP() + scapy> pkts=3D[pkt1, pkt2]*10 + scapy> sendp(pkts, iface=3D"ens785f0") + +3. check port stats in 2 VF testpmd: + expected result: + 2 VF testpmds should receive 10 packets separately. + + + + + + + -- 2.21.0.windows.1