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 32B11A04B5; Tue, 3 Dec 2019 10:30:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E29592B8D; Tue, 3 Dec 2019 10:30:56 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 07ADF91 for ; Tue, 3 Dec 2019 10:30:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2019 01:30:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,272,1571727600"; d="scan'208";a="242323707" Received: from intel.sh.intel.com ([10.239.255.32]) by fmsmga002.fm.intel.com with ESMTP; 03 Dec 2019 01:30:52 -0800 From: Guinan Sun To: dts@dpdk.org Cc: Guinan Sun Date: Tue, 3 Dec 2019 17:28:18 +0000 Message-Id: <20191203172818.74897-1-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [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" 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 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. + +======================================= +Niantic Add or Remove Mac Address Tests +======================================= + +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 +============= + +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 +========================================= +Run testpmd + + start PF testpmd(terminal1):: + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 04:00.1 --file-prefix=PF -- -i + + start VF testpmd(terminal2):: + ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 04:10.1 --file-prefix=VF -- -i + testpmd> set verbose 1 + testpmd> set promisc all off + testpmd> start + +1. send packets to VF(default mac address):: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1A")/"Hello!0",iface="ens2f0",count=100) + 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="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1B")/"Hello!0",iface="ens2f0",count=100) + Check that packets can be received. + +4. send packets to illegal mac address of port1VF:: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1E")/"Hello!0",iface="ens2f0",count=100) + Check that packets can't be received. + +5. send packets to VF(default mac address):: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1A")/"Hello!0",iface="ens2f0",count=100) + 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="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1B")/"Hello!0",iface="ens2f0",count=100) + Check that packets can't be received. + +8. send packets to VF(default mac address):: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1A")/"Hello!0",iface="ens2f0",count=100) + Check that packets can be received. + +Test Case : add/remove multiple mac address +=========================================== +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="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1B")/"Hello!0",iface="ens2f0",count=100) + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1C")/"Hello!0",iface="ens2f0",count=100) + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1D")/"Hello!0",iface="ens2f0",count=100) + Check that packets can be received. + +11. send packets to illegal mac addr of port1VF:: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1E")/"Hello!0",iface="ens2f0",count=100) + 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="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1B")/"Hello!0",iface="ens2f0",count=100) + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1C")/"Hello!0",iface="ens2f0",count=100) + Check that packets can't be received. + +14. send packets to unremoved mac address of port1VF:: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1D")/"Hello!0",iface="ens2f0",count=100) + Check that packets can be received. + +15. send packets to VF(default mac address):: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1A")/"Hello!0",iface="ens2f0",count=100) + Check that packets can be received. + +16. send packets to illegal mac addr of port1VF:: + >>>sendp(Ether(src="90:E2:BA:30:A1:6C",dst="02:9C:E2:71:A4:1E")/"Hello!0",iface="ens2f0",count=100) + Check that packets can't be received. + -- 2.17.1