From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Sun, GuinanX" <guinanx.sun@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Sun, GuinanX" <guinanx.sun@intel.com>
Subject: Re: [dts] [PATCH v1] test_plans: add or remove mac address for VF
Date: Wed, 4 Dec 2019 07:55:54 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB7D44A@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20191203172818.74897-1-guinanx.sun@intel.com>
DTS already have test plan similar as this, if not enough, please enhance them 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 <guinanx.sun@intel.com>
> Subject: [dts] [PATCH v1] test_plans: add or remove mac address for VF
>
> 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
prev parent reply other threads:[~2019-12-04 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 17:28 Guinan Sun
2019-12-04 7:55 ` Tu, Lijuan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BB7D44A@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=guinanx.sun@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).