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 AAF36A04B5; Wed, 4 Dec 2019 08:56:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E8B51BE84; Wed, 4 Dec 2019 08:56:01 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id DB16D1BE82 for ; Wed, 4 Dec 2019 08:55:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2019 23:55:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,276,1571727600"; d="scan'208";a="213740562" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 03 Dec 2019 23:55:57 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Dec 2019 23:55:57 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Dec 2019 23:55:57 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.72]) with mapi id 14.03.0439.000; Wed, 4 Dec 2019 15:55:55 +0800 From: "Tu, Lijuan" To: "Sun, GuinanX" , "dts@dpdk.org" CC: "Sun, GuinanX" Thread-Topic: [dts] [PATCH v1] test_plans: add or remove mac address for VF Thread-Index: AQHVqbxwlxBCggcAukSzgJYLdmvhhqepnJqw Date: Wed, 4 Dec 2019 07:55:54 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB7D44A@SHSMSX101.ccr.corp.intel.com> References: <20191203172818.74897-1-guinanx.sun@intel.com> In-Reply-To: <20191203172818.74897-1-guinanx.sun@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.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWY0ZWRjMjgtMzk1Zi00MWZkLTgxMTMtMjk1MzI3OWYxNjNlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiS1owa2cwb0Z6UEFRejZOc250dVhhODJSVzI1cFdjQnplZUZoT1ZkOElDVkNXeUsrSUJsOWlHSjdXVHpISlJGRSJ9 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_plans: add or remove mac address for VF 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" DTS already have test plan similar as this, if not enough, please enhance t= hem based on the old one. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Guinan Sun > Sent: Wednesday, December 4, 2019 1:28 AM > To: dts@dpdk.org > Cc: Sun, GuinanX > Subject: [dts] [PATCH v1] test_plans: add or remove mac address for VF >=20 > Signed-off-by: Guinan Sun > --- > ...vf_add_or_remove_mac_address_test_plan.rst | 174 > ++++++++++++++++++ > 1 file changed, 174 insertions(+) > create mode 100644 > test_plans/vf_add_or_remove_mac_address_test_plan.rst >=20 > diff --git a/test_plans/vf_add_or_remove_mac_address_test_plan.rst > b/test_plans/vf_add_or_remove_mac_address_test_plan.rst > new file mode 100644 > index 0000000..3d08a54 > --- /dev/null > +++ b/test_plans/vf_add_or_remove_mac_address_test_plan.rst > @@ -0,0 +1,174 @@ > +.. Copyright (c) <2018>, 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 > +Niantic Add or Remove Mac Address 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 > + > +This document provides test plan for testing whether the "mac address > add/remove" > +command works properly. ixgbe PMD PF host code need to support "mac > address add/remove" > +function, PF hsot need to add handle process for IXGBE_VF_SET_MACVLAN > +message, VF will be able to add new MAC address for itself too. > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + > +1)linkage and NIC info:: > + > + 04:00.1 04:00.0 > +----------------------------------- > +| NIC 82599 port1 port0 | > +--------------(dpdk) (kernel)------ > + | | > + +--------+ > + > +port0 (kernel)----(04:00.0) > +90:E2:BA:30:A1:6C(04:00.0 ens2f0) > + > +port1 PF (04:00.1 dpdk) > +90:E2:BA:30:A1:6D > + > +port1 VF----(04:10.1 dpdk) > +02:9C:E2:71:A4:1A > + > +use new mac address to test:: > +02:9C:E2:71:A4:1B > +02:9C:E2:71:A4:1C > +02:9C:E2:71:A4:1D > + > +2)Test Setup > +bind port1 to dpdk:: > + dpdkcode#./usertools/dpdk-devbind.py -b igb_uio 04:00.1 > + > +create VF of port1:: > + #echo 1 > /sys/bus/pci/devices/0000\:04\:00.1/max_VFs > + > +bind port1VF to dpdk:: > + dpdkcode#./usertools/dpdk-devbind.py -b igb_uio 04:10.1 > + > +ensure port0 Active > + > +2. Software: > + > + * dpdk: http://dpdk.org/git/dpdk > + * scapy: http://www.secdev.org/projects/scapy/ > + > +3. Added command:: > + > + testpmd> mac_addr add (port_id) (mac_addr) > + " Add MACsec. " > + testpmd> mac_addr remove (port_id) (mac_addr) > + " Remove MACsec. " > + > +Test Case : add/remove single mac address > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Run testpmd > + > + start PF testpmd(terminal1):: > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w > 04:00.1 > +--file-prefix=3DPF -- -i > + > + start VF testpmd(terminal2):: > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w > 04:10.1 --file-prefix=3DVF -- -i > + testpmd> set verbose 1 > + testpmd> set promisc all off > + testpmd> start > + > +1. send packets to VF(default mac address):: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1A")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can be received. > + > +2. add mac address:: > + VF testpmd>mac_addr add 0 02:9C:E2:71:A4:1B > + > +3. send packets to added mac address of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1B")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can be received. > + > +4. send packets to illegal mac address of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1E")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can't be received. > + > +5. send packets to VF(default mac address):: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1A")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can be received. > + > +6. remove mac address:: > + VF testpmd>mac_addr remove 0 02:9C:E2:71:A4:1B > + > +7. send packets to removed mac address of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1B")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can't be received. > + > +8. send packets to VF(default mac address):: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1A")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can be received. > + > +Test Case : add/remove multiple mac address > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +9. add multiple mac address:: > + VF testpmd> mac_addr add 0 02:9C:E2:71:A4:1B > + VF testpmd> mac_addr add 0 02:9C:E2:71:A4:1C > + VF testpmd> mac_addr add 0 02:9C:E2:71:A4:1D > + > +10. send packets to multiple mac address of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1B")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1C")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1D")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can be received. > + > +11. send packets to illegal mac addr of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1E")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can't be received. > + > +12. remove multiple mac address:: > + VF testpmd> mac_addr remove 0 02:9C:E2:71:A4:1B > + VF testpmd> mac_addr remove 0 02:9C:E2:71:A4:1C > + > +13. send packets to removed mac address of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1B")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1C")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can't be received. > + > +14. send packets to unremoved mac address of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1D")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can be received. > + > +15. send packets to VF(default mac address):: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1A")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can be received. > + > +16. send packets to illegal mac addr of port1VF:: > + > >>>sendp(Ether(src=3D"90:E2:BA:30:A1:6C",dst=3D"02:9C:E2:71:A4:1E")/" > Hello!0",iface=3D"ens2f0",count=3D100) > + Check that packets can't be received. > + > -- > 2.17.1