test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lijuan Tu <lijuanx.a.tu@intel.com>
To: dts@dpdk.org, yulong.pei@intel.com
Cc: Lijuan Tu <lijuanx.a.tu@intel.com>
Subject: [dts] [PATCH 2/2] test_plan/vlan_ehancement: add test plan
Date: Sat,  1 Apr 2017 09:37:22 +0800	[thread overview]
Message-ID: <1491010642-116510-2-git-send-email-lijuanx.a.tu@intel.com> (raw)
In-Reply-To: <1491010642-116510-1-git-send-email-lijuanx.a.tu@intel.com>

ehance single vlan test plan,
1, vlan id in [1, random, MAX_VLAN]
2, packet with no tag, matched tag, not-matched tag
3, several times operation on rx_vlan add/rm

Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
---
 test_plans/vlan_ehancement_test_plan.rst | 177 +++++++++++++++++++++++++++++++
 1 file changed, 177 insertions(+)
 create mode 100644 test_plans/vlan_ehancement_test_plan.rst

diff --git a/test_plans/vlan_ehancement_test_plan.rst b/test_plans/vlan_ehancement_test_plan.rst
new file mode 100644
index 0000000..47c5cf6
--- /dev/null
+++ b/test_plans/vlan_ehancement_test_plan.rst
@@ -0,0 +1,177 @@
+.. Copyright (c) <2010>, 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.
+
+=====================================================
+Support of VLAN Offload Features by Poll Mode Drivers
+=====================================================
+
+The support of VLAN offload features by Poll Mode Drivers consists in:
+
+- the filtering of received VLAN packets,
+- VLAN header stripping by hardware in received [VLAN] packets,
+- VLAN header insertion by hardware in transmitted packets.
+
+The filtering of VLAN packets is automatically enabled by the ``testpmd``
+application for each port.
+By default, the VLAN filter of each port is empty and all received VLAN packets
+are dropped by the hardware.
+To enable the receipt of VLAN packets tagged with the VLAN tag identifier
+``vlan_id`` on the port ``port_id``, the following command of the ``testpmd``
+application must be used::
+
+  rx_vlan add vlan_id port_id
+
+In the same way, the insertion of a VLAN header with the VLAN tag identifier
+``vlan_id`` in packets sent on the port ``port_id`` can be enabled with the
+following command of the ``testpmd`` application::
+
+  tx_vlan set vlan_id port_id
+
+
+The transmission of VLAN packets is done with the ``start tx_first`` command
+of the ``testpmd`` application that arranges to first send a burst of packets
+on all configured ports before starting the ``rxonly`` packet forwarding mode
+that has been previously selected.
+
+
+Prerequisites
+=============
+Assuming that ports ``0`` and ``1`` are connected to a traffic generator's port
+``A`` and ``B``. Launch the ``testpmd`` with the following arguments::
+  ./build/app/testpmd -cffffff -n 3 -- -i 
+The -n command is used to select the number of memory channels. 
+It should match the number of memory channels on that setup.
+Set the verbose level to 1 to display informations for each received packet::
+  testpmd> set verbose 1
+
+Test Case: enable filter on and set rx_vlan
+===========================================
+Vlan set filter on 0
+Vlan rx_vlan add %vid 0
+1 Send packets with vid=%vid ,check packet can be received by tester and vid=%vid
+2 Send packets without vlan tag ,and check packet can received by tester.
+3 Send packets with other vid,and check packet cannot received by tester.
+
+Repeat step above and %vid in range [1, random vid, max vid]
+
+Take 1 for example:: 
+  testpmd> set fwd mac
+  testpmd> vlan set filter on 0
+  testpmd> rx_vlan add %vid 0
+  testpmd> start
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+ ``%vid`` and send 1 packet on port ``A``.
+Verify that the VLAN packet was correctly received on port ``B`` with VLAN tag ``%vid``.
+
+Test Case: enable filter on and  rx_vlan rm
+===============================================
+Vlan set filter on 0
+rx_vlan rm %vid 0
+1 Send packets with vid=%vid ,and check packet cannot be received by tester.
+2 Send packets without vlan tag ,and check packet can be received by tester.
+3 Send packets with other vid,and check packet cannot be received by tester.
+But Fortville nic , nic will add vlan=0 as default, so all packets will be received by tester.
+
+Repeat step above and %vid in range [1, random vid, max vid]
+
+Take 1 for example:
+Disable the receipt of VLAN packets with Tag Identifier ``%vid`` on port 0::
+  testpmd> vlan set filter on 0
+  testpmd> rx_vlan rm %vid 0
+  testpmd> start
+Send VLAN packets with the Tag Identifier ``%vid`` check that no packet is received
+on port ``B``, meaning that VLAN packets are now dropped on port 0::
+Verify that no packet was received on port ``B``.
+
+Test Case: disable vlan filter 
+===============================================
+Vlan set filter off 0
+1 Send packets with vid=%vid ,check packet can be received by tester and vid=%vid
+2 Send packets without vlan tag ,and check packet can be received by tester.
+3 Send packets with other vid,and check packet can be received by tester and vid=other vid.
+
+Repeat step above and %vid in range [1, random vid, max vid]
+
+Test Case: rx_vlan add/rm
+===============================================
+vlan set filter on 0
+rx_vlan add %vid 0
+rx_vlan add %vid+1 0
+rx_vlan add %vid+2 0
+rx_vlan add %vid+3 0
+Send packets with vid, vid+1, vid+2, vid+3 ,check packet can be received by tester and vlan id = vid, vid+1, vid+2, vid+3
+rx_vlan rm %vid 0
+rx_vlan rm %vid+1 0
+rx_vlan rm %vid+2 0
+rx_vlan rm %vid+3 0
+rx_vlan rm %vid+4 0
+Send packets with vid, vid+1, vid+2, vid+3 ,check packet cannot be received by tester.
+Repeat steps above 10 times.
+
+Repeat step above and %vid in range [1, random vid, max vid-4]
+
+
+Test Case: vlan strip on
+===============================================
+vlan set filter off 0
+vlan set strip on 0
+1 Send packets with vid=%vid ,and check packet without vlan can be received by tester.
+2 Send packets without vlan tag ,and check packet without vlan can be received by tester.
+3 Send packets with other vid, check packet without vlan can be received by tester.
+Repeat step above and %vid in range [1, random vid, max vid]
+
+Test Case: vlan strip off
+===============================================
+vlan set filter off 0
+vlan set strip off 0
+1 Send packets with vid=%vid ,check packet can be received by tester and vid=%vid
+2 Send packets without vlan tag ,and check packet can be received by tester.
+3 Send packets with other vid,and check packet can be received by tester and vid=other vid.
+
+Repeat step above and %vid in range [1, random vid, max vid]
+
+Test Case: Enable VLAN header insertion in transmitted packets
+==============================================================
+vlan set filter off 0
+vlan set strip off 0
+tx_vlan set %vid 0
+Send packets without vlan tag ,and check packet can be received by tester and vid=%vid.
+Repeat step above and %vid in range [1, random vid, max vid]
+
+::
+  testpmd> vlan set filter off 0
+  testpmd> vlan set strip off 0
+  testpmd> tx_vlan set %vid 0
+Send packet without vlan.
+Verify that the packet is correctly received on the traffic generator side
+(with VLAN Tag Identifier ``%vid``)
+
-- 
1.9.3

      reply	other threads:[~2017-04-01  1:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01  1:37 [dts] [PATCH 1/2] tests/vlan_ehancement: add script Lijuan Tu
2017-04-01  1:37 ` Lijuan Tu [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=1491010642-116510-2-git-send-email-lijuanx.a.tu@intel.com \
    --to=lijuanx.a.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yulong.pei@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).