test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH v1] test_plans: add or remove mac address for VF
@ 2019-12-03 17:28 Guinan Sun
  2019-12-04  7:55 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Guinan Sun @ 2019-12-03 17:28 UTC (permalink / raw)
  To: dts; +Cc: Guinan Sun

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 ...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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-04  7:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 17:28 [dts] [PATCH v1] test_plans: add or remove mac address for VF Guinan Sun
2019-12-04  7:55 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).