* [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file
@ 2015-05-27 7:02 huilong,xu
2015-05-27 7:02 ` [dts] [dts 2/4] [PATCH V1] add dual vlan test plan huilong,xu
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: huilong,xu @ 2015-05-27 7:02 UTC (permalink / raw)
To: dts
From: huilong xu <huilongx.xu@intel.com>
changed list:
1. add dual vlan for niantic and fortville test
2. add vlan for fortville test
Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
executions/execution.cfg | 3 ++-
executions/execution_FVL.cfg | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/executions/execution.cfg b/executions/execution.cfg
index 73d70f6..e5c6198 100644
--- a/executions/execution.cfg
+++ b/executions/execution.cfg
@@ -18,7 +18,8 @@ test_suites=
ip_pipeline,
pmd_bonded,
dynamic_config,
- generic_filter
+ generic_filter,
+ dual_vlan
targets=
x86_64-native-linuxapp-gcc
parameters=nic_type=cfg:func=true
diff --git a/executions/execution_FVL.cfg b/executions/execution_FVL.cfg
index 7e5151b..12990d8 100644
--- a/executions/execution_FVL.cfg
+++ b/executions/execution_FVL.cfg
@@ -4,7 +4,9 @@ drivername=<driver name igb_uio or vfio-pci>
test_suites=
checksum_offload,
dynamic_config,
- generic_filter
+ generic_filter,
+ dual_vlan,
+ vlan
targets=
x86_64-native-linuxapp-gcc
parameters=nic_type=cfg:func=true
--
1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [dts 2/4] [PATCH V1] add dual vlan test plan
2015-05-27 7:02 [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file huilong,xu
@ 2015-05-27 7:02 ` huilong,xu
2015-05-27 7:02 ` [dts] [dts 3/4] [PATCH v1] add dual vlan test case huilong,xu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: huilong,xu @ 2015-05-27 7:02 UTC (permalink / raw)
To: dts
From: huilong xu <huilongx.xu@intel.com>
Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
test_plans/dual_vlan_test_plan.rst | 394 ++++++++++++++++++++++++++++++++++++
1 files changed, 394 insertions(+), 0 deletions(-)
create mode 100644 test_plans/dual_vlan_test_plan.rst
diff --git a/test_plans/dual_vlan_test_plan.rst b/test_plans/dual_vlan_test_plan.rst
new file mode 100644
index 0000000..fa434cc
--- /dev/null
+++ b/test_plans/dual_vlan_test_plan.rst
@@ -0,0 +1,394 @@
+.. 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 Dual VLAN Offload Features by Poll Mode Drivers
+==========================================================
+
+The support of Dual VLAN offload features by Poll Mode Drivers consists in:
+
+- dynamically enable/disable inner VLAN filtering on an interface on 82576/82599,
+- dynamically enable/disable extended VLAN mode on 82576/82599,
+- dynamically configure outer VLAN TPID value, i.e. S-TPID value, on 82576/82599.
+
+Prerequisites
+=============
+
+In this feature, Only 82576 and 82599 are supported.
+
+Support igb_uio and vfio driver, if used vfio, kernel need 3.6+ and enable vt-d in bios.
+When used vfio , used "modprobe vfio" and "modprobe vfio-pci" insmod vfiod driver, then used
+"./tools/dpdk_nic_bind.py --bind=vfio-pci device_bus_id" to bind vfio driver to test driver.
+Assuming that ports ``0`` and ``1`` are connected to the traffic generator's port ``A`` and ``B``,
+launch the ``testpmd`` with the following arguments::
+
+ ./build/app/testpmd -c ffffff -n 3 -- -i --burst=1 --txpt=32 \
+ --txht=8 --txwt=0 --txfreet=0 --rxfreet=64 --mbcache=250 --portmask=0x3
+
+The -n command is used to select the number of memory channels. It should match the number of memory channels on that setup.
+
+Test Case: Enable/Disable VLAN packets filtering
+================================================
+
+Setup the ``mac`` forwarding mode::
+
+ testpmd> set fwd mac
+ Set mac packet forwarding mode
+
+Enable vlan filtering on port 0::
+
+ testpmd> vlan set filter on 0
+
+Check whether the mode is setted successful::
+
+ testpmd> show port info 0
+
+ ********************* Infos for port 0 *********************
+ MAC address: 90:E2:BA:1B:DF:60
+ Link status: up
+ Link speed: 10000 Mbps
+ Link duplex: full-duplex
+ Promiscuous mode: enabled
+ Allmulticast mode: disabled
+ Maximum number of MAC addresses: 127
+ VLAN offload:
+ strip off
+ filter on
+ qinq(extend) off
+
+start forwarding packets::
+
+ testpmd> start
+ mac packet forwarding - CRC stripping disabled - packets/burst=32
+ nb forwarding cores=1 - nb forwarding ports=10
+ RX queues=1 - RX desc=128 - RX free threshold=64
+ RX threshold registers: pthresh=8 hthresh=8 wthresh=4
+ TX queues=1 - TX desc=512 - TX free threshold=0
+ TX threshold registers: pthresh=32 hthresh=8 wthresh=8
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+ ``1`` and send 1 packet on port ``A``.Verify that the VLAN packet cannot
+ been received in port ``B``.
+
+Disable vlan filtering on port ``0``::
+
+ testpmd> vlan set filter off 0
+
+Check whether the mode is setted successful::
+
+ testpmd> show port info 0
+
+ ********************* Infos for port 0 *********************
+ MAC address: 90:E2:BA:1B:DF:60
+ Link status: up
+ Link speed: 10000 Mbps
+ Link duplex: full-duplex
+ Promiscuous mode: enabled
+ Allmulticast mode: disabled
+ Maximum number of MAC addresses: 127
+ VLAN offload:
+ strip off
+ filter off
+ qinq(extend) off
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+ ``1`` and send 1 packet on port ``A``.Verify that the VLAN packet can been
+ received in port ``B`` with VLAN Tag Identifier ``1``.
+
+Test Case: Add/Remove VLAN Tag Identifier pass VLAN filtering
+=============================================================
+
+Enable VLAN filtering on port ``0``::
+
+ testpmd> vlan set filter on 0
+
+Add a VLAN Tag Identifier ``1`` on port ``0``::
+
+ testpmd> rx_vlan add 1 0
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+ ``1`` and send 1 packet on port ``A``.Verify that the VLAN packet can been
+ received in port ``B``.
+
+Remove the VLAN Tag Identifier ``1`` on port ``0``::
+
+ testpmd> rx_vlan rm 1 0
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+ ``1`` and send 1 packet on port ``A``.Verify that the VLAN packet cannot been
+ received in port ``B``.
+
+Test Case: Enable/Disable VLAN header striping
+==============================================
+
+Enable vlan packet forwarding on port ``0`` first::
+
+ testpmd> vlan set filter off 0
+
+Enable vlan header striping on port ``0``::
+
+ testpmd> vlan set strip on 0
+
+Check whether the mode is setted successful::
+
+ testpmd> show port info 0
+
+ ********************* Infos for port 0 *********************
+ MAC address: 90:E2:BA:1B:DF:60
+ Link status: up
+ Link speed: 10000 Mbps
+ Link duplex: full-duplex
+ Promiscuous mode: enabled
+ Allmulticast mode: disabled
+ Maximum number of MAC addresses: 127
+ VLAN offload:
+ strip on
+ filter off
+ qinq(extend) off
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+``1`` and send 1 packet on port ``A``. Verify that the packet without VLAN Tag
+Identifier can been received in port ``B``.
+
+Disable vlan header striping on port ``0``::
+
+ testpmd> vlan set strip off 0
+
+Check whether the mode is setted successfully::
+
+ testpmd> show port info 0
+
+ ********************* Infos for port 0 *********************
+ MAC address: 90:E2:BA:1B:DF:60
+ Link status: up
+ Link speed: 10000 Mbps
+ Link duplex: full-duplex
+ Promiscuous mode: enabled
+ Allmulticast mode: disabled
+ Maximum number of MAC addresses: 127
+ VLAN offload:
+ strip off
+ filter off
+ qinq(extend) off
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+``1`` and send 1 packet on port ``A``. Verify that the packet with VLAN Tag
+Identifier ``1`` can been received in port ``B``.
+
+Test Case: Enable/Disable VLAN header striping in queue
+=======================================================
+
+Enable vlan packet forwarding on port ``0`` first::
+
+ testpmd> vlan set filter off 0
+
+Disable vlan header striping on port ``0``::
+
+ testpmd> vlan set strip off 0
+
+Disable vlan header striping in queue 0 on port ``0``::
+
+ testpmd> vlan set stripq off 0,0
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+``1`` and send 1 packet on port ``A``. Verify that the packet with VLAN Tag
+Identifier ``1`` can been received in port ``B``.
+
+
+Enable vlan header striping in queue 0 on port ``0``::
+
+ testpmd> vlan set stripq on 0,0
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+``1`` and send 1 packet on port ``A``. Verify that the packet without VLAN Tag
+Identifier ``1`` can been received in port ``B``.
+
+Enable vlan header striping on port ``0``.
+
+ MISSING COMMAND
+
+Configure the traffic generator to send VLAN packets with the Tag Identifier
+``1`` and send 1 packet on port ``A``. Verify that the packet without VLAN Tag
+Identifier ``1`` can been received in port ``B``.
+
+Test Case: Enable/Disable VLAN header inserting
+===============================================
+
+Enable vlan packet forwarding on port ``0`` first::
+
+ testpmd> vlan set filter off 0
+
+Insert VLAN Tag Identifier ``1`` on port ``1``::
+
+ testpmd> tx_vlan set 1 1
+
+Configure the traffic generator to send VLAN packet without VLAN Tag Identifier
+and send 1 packet on port ``A``. Verify that the packet can been received on port
+``B`` with VLAN Tag Identifier ``1``.
+
+Delete the VLAN Tag Identifier ``1`` on port ``1``::
+
+ testpmd> tx_vlan reset 1
+
+Configure the traffic generator to send VLAN packet without VLAN Tag Identifier
+and send 1 packet on port ``A``. Verify that the packet can been received on port
+``B`` without VLAN Tag Identifier.
+
+
+Test Case: Configure receive port outer VLAN TPID
+=================================================
+
+Enable vlan header QinQ on port ``0`` firstly to support set TPID::
+
+ testpmd> vlan set qinq on 0
+
+Check whether the mode is setted successfully::
+
+ testpmd> show port info 0
+
+ ********************* Infos for port 0 *********************
+ MAC address: 90:E2:BA:1B:DF:60
+ Link status: up
+ Link speed: 10000 Mbps
+ Link duplex: full-duplex
+ Promiscuous mode: enabled
+ Allmulticast mode: disabled
+ Maximum number of MAC addresses: 127
+ VLAN offload:
+ strip off
+ filter off
+ qinq(extend) on
+
+Set Tag Protocol ID ``0x1234`` on port ``0``::
+
+ testpmd> vlan set tpid 0x1234 0
+
+Enable vlan packet filtering and strip on port ``0`` ::
+
+ testpmd> vlan set filter on 0
+ testpmd> vlan set strip on 0
+
+Configure the traffic generator to send VLAN packet whose outer vlan tag is ``0x1``,
+inter vlan tag is ``0x2`` and outer Tag Protocol ID is ``0x8100`` and send 1 packet
+on port ``A``. Verify that one packet whose vlan header has not been strip has been
+received on port ``B``.
+
+Set Tag Protocol ID ``0x8100`` on port ``0``::
+
+ testpmd> vlan set tpid 0x8100 0
+
+Configure the traffic generator to send VLAN packet whose outer vlan tag is ``0x1``,
+inter vlan tag is ``0x2`` and outer Tag Protocol ID is ``0x8100`` and send 1 packet
+on port ``A``. Verify that no packets has been received on port ``B``
+
+Test Case: Strip/Filter/Extend/Insert enable/disable synthetic test
+===================================================================
+
+Do the synthetic test following the below table and check the result is the same
+as the table(the inserted VLAN Tag Identifier is limited to ``0x3``, and all modes
+except insert are setted on rx port).
+
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| Outer | Inner | Vlan | Vlan | Vlan | Vlan | Pass/ | Outer | Inner |
+| vlan | vlan | strip | filter | extend | insert | Drop | vlan | vlan |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | no | no | no | pass | 0x1 | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | no | no | no | pass | no | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x1 | no | no | pass | 0x1 | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x2 | no | no | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x1 | no | no | pass | no | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x2 | no | no | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | no | yes | no | pass | 0x1 | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | no | yes | no | pass | no | 0x1 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x1 | yes | no | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x2 | yes | no | pass | 0x1 | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x1 | yes | no | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x2 | yes | no | pass | no | 0x1 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | no | no | yes | pass | 0x3 | 0x1 |
+| | | | | | | | | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | no | no | yes | pass | 0x3 | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x1 | no | yes | pass | 0x3 | 0x1 |
+| | | | | | | | | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x2 | no | yes | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x1 | no | yes | pass | 0x3 | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x2 | no | yes | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | no | yes | yes | pass | 0x3 | 0x1 |
+| | | | | | | | | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | no | yes | yes | pass | 0x3 | 0x1 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x1 | yes | yes | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | no | yes,0x2 | yes | yes | pass | 0x3 | 0x1 |
+| | | | | | | | | 0x2 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x1 | yes | yes | drop | no | no |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+| 0x1 | 0x2 | yes | yes,0x2 | yes | yes | pass | 0x3 | 0x1 |
++-------+-------+--------+------------+--------+--------+-------+-------+-------+
+
+Test Case: Strip/Filter/Extend/Insert enable/disable random test
+================================================================
+
+Chooce the above table's item randomly 30 times and verify that the result is right.
+
+At last, stop packet forwarding and quit the application::
+ testpmd> stop
+ testpmd> quit
+
+
+
+
+
+
+
+
+
+
--
1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [dts 3/4] [PATCH v1] add dual vlan test case
2015-05-27 7:02 [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file huilong,xu
2015-05-27 7:02 ` [dts] [dts 2/4] [PATCH V1] add dual vlan test plan huilong,xu
@ 2015-05-27 7:02 ` huilong,xu
2015-05-27 7:02 ` [dts] [dts 4/4] [PATCH V1] update vlan get package function huilong,xu
2015-06-01 9:12 ` [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file Liu, Yong
3 siblings, 0 replies; 5+ messages in thread
From: huilong,xu @ 2015-05-27 7:02 UTC (permalink / raw)
To: dts
From: huilong xu <huilongx.xu@intel.com>
change list:
1. add vlan filter test case
different nic, this function are differernt.
niantic used vlan set filter off|on port_id disadle or enable this function
fortville the filter must on, and promisc must on for enable filter. you can't
disable this function, you only used rx vlan table for disable filter
2. add vlan strip test case
3. add vlan stripq test case
fortville not support this case, maybe dpdk2.1 will support
4. vlan inset test case
fortville not suppoet this case, mabye dpdk2.1 will support
5. vlan qinq test case
Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
tests/TestSuite_dual_vlan.py | 438 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 438 insertions(+), 0 deletions(-)
create mode 100644 tests/TestSuite_dual_vlan.py
diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py
new file mode 100644
index 0000000..184eb64
--- /dev/null
+++ b/tests/TestSuite_dual_vlan.py
@@ -0,0 +1,438 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+# 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.
+
+
+"""
+DPDK Test suite.
+
+Test the support of Dual VLAN Offload Features by Poll Mode Drivers.
+
+"""
+
+import dts
+import random
+import re
+
+txvlan = 3
+outvlan = 1
+invlan = 2
+
+allResult = {"TX+OUTER+INNER": (txvlan, outvlan, invlan),
+ "TX+INNER": (txvlan, invlan),
+ "TX+OUTER": (txvlan, outvlan),
+ "OUTER+INNER": (outvlan, invlan),
+ "INNER": (invlan,),
+ "OUTER": (outvlan,),
+ "NONE": ("No",)
+ }
+
+stripCase = 0x1
+filterCase = 0x2
+qinqCase = 0x4
+txCase = 0x8
+
+vlanCaseDef = [0, stripCase, filterCase, filterCase | stripCase,
+ qinqCase, qinqCase | stripCase, qinqCase | filterCase, qinqCase | filterCase | stripCase,
+ txCase, txCase | stripCase, txCase | filterCase, txCase | filterCase | stripCase,
+ txCase | qinqCase, txCase | qinqCase | stripCase, txCase | qinqCase | filterCase, txCase | qinqCase | filterCase | stripCase]
+
+vlanCase = ["OUTER+INNER", "INNER", ("OUTER+INNER", "NONE"), ("INNER", "NONE"),
+ "OUTER+INNER", "OUTER", ("NONE", "OUTER+INNER"), ("NONE", "OUTER"),
+ "TX+OUTER+INNER", "TX+INNER", ("TX+OUTER+INNER", "NONE"), ("TX+INNER", "NONE"),
+ "TX+OUTER+INNER", "TX+OUTER", ("NONE", "TX+OUTER+INNER"), ("NONE", "TX+OUTER")]
+
+
+from test_case import TestCase
+from pmd_output import PmdOutput
+
+#
+#
+# Test class.
+#
+
+
+class TestDualVlan(TestCase):
+
+ #
+ #
+ #
+ # Test cases.
+ #
+
+ def set_up_all(self):
+ """
+ Run at the start of each test suite.
+
+ Vlan Prerequistites
+ """
+ global dutRxPortId
+ global dutTxPortId
+
+ # Based on h/w type, choose how many ports to use
+ ports = self.dut.get_ports(self.nic)
+ self.verify(len(ports) >= 2, "Insufficient ports")
+ self.ports_socket = self.dut.get_numa_id(ports[0])
+
+ cores = self.dut.get_core_list('1S/2C/2T')
+ coreMask = dts.create_mask(cores)
+
+ ports = self.dut.get_ports(self.nic)
+ valports = [_ for _ in ports if self.tester.get_local_port(_) != -1]
+
+ portMask = dts.create_mask(valports[:2])
+
+ dutRxPortId = valports[0]
+ dutTxPortId = valports[1]
+
+ self.pmdout = PmdOutput(self.dut)
+ self.pmdout.start_testpmd("all", "--portmask=%s" % portMask, socket=self.ports_socket)
+
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.dut.send_expect("vlan set filter on all", "testpmd> ")
+ self.dut.send_expect("set promisc all off", "testpmd> ")
+
+ out = self.dut.send_expect("set fwd mac", "testpmd> ")
+ self.verify('Set mac packet forwarding mode' in out, "set fwd mac error")
+ out = self.dut.send_expect("start", "testpmd> ", 120)
+
+ def start_tcpdump(self,rxItf):
+
+ self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap","#")
+ self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& "%rxItf,"#" )
+
+ def get_tcpdump_package(self):
+ self.tester.send_expect("killall tcpdump","#")
+ return self.tester.send_expect("tcpdump -nn -e -v -r ./getPackageByTcpdump.cap","#")
+
+
+ def vlan_send_packet(self, *vid):
+ """
+ Send packet to portid
+ """
+ txPort = self.tester.get_local_port(dutRxPortId)
+ rxPort = self.tester.get_local_port(dutTxPortId)
+
+ txItf = self.tester.get_interface(txPort)
+ rxItf = self.tester.get_interface(rxPort)
+ mac = self.dut.get_mac_address(dutRxPortId)
+
+ self.start_tcpdump(rxItf)
+ vlanString = 'sendp([Ether(dst="%s")/' % mac
+ for i in range(len(vid)):
+ vlanString += "Dot1Q(id=0x8100,vlan=%s)/" % vid[i]
+ vlanString += 'IP(len=46)],iface="%s")' % txItf
+
+ self.tester.scapy_append(vlanString)
+
+ self.tester.scapy_execute()
+
+ def mode_config(self, **modeName):
+ """
+ Set up the VLAN mode.
+ """
+
+ for mode in modeName:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ # fortville NIC vlan filter can't close, if want close need remove rx_vlan
+ if mode == "filter":
+ if modeName[mode] == "off":
+ self.dut.send_expect("rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> ")
+ continue
+ else:
+ self.dut.send_expect("rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> ")
+ continue
+
+ if mode == "stripq":
+ self.dut.send_expect("vlan set %s %s %s,0" % (mode, modeName[mode], dutRxPortId), "testpmd> ")
+ else:
+ self.dut.send_expect("vlan set %s %s %s" % (mode, modeName[mode], dutRxPortId), "testpmd> ")
+
+ out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ")
+ for mode in modeName:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ # fortville NIC vlan filter can't close, if want close need remove rx_vlan
+ if mode == "filter":
+ if modeName[mode] == "off":
+ self.dut.send_expect("rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> ")
+ continue
+ else:
+ self.dut.send_expect("rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> ")
+ continue
+
+ if mode == "qinq":
+ self.verify("qinq(extend) %s" % modeName[mode] in out, "%s setting error" % mode)
+ continue
+ elif mode == "stripq":
+ continue
+ else:
+ self.verify("%s %s" % (mode, modeName[mode]) in out, "%s setting error" % mode)
+
+ def multimode_test(self, caseIndex):
+ """
+ Setup Strip/Filter/Extend/Insert enable/disable for synthetic test.
+ """
+ caseDef = vlanCaseDef[caseIndex]
+ temp = []
+
+ temp.append("on") if (caseDef & stripCase) != 0 else temp.append("off")
+ temp.append("on") if (caseDef & filterCase) != 0 else temp.append("off")
+ temp.append("on") if (caseDef & qinqCase) != 0 else temp.append("off")
+ self.mode_config(strip=temp[0], filter=temp[1], qinq=temp[2])
+
+ if (caseDef & txCase) != 0:
+ self.dut.send_expect('tx_vlan set %s %s' % (txvlan, dutTxPortId), "testpmd> ")
+
+
+ configMode = "Strip %s, filter %s 0x1, extend %s, insert %s" % (temp[0], temp[1], temp[2], "on" if (caseDef & txCase) != 0 else "off")
+
+ if (caseDef & filterCase) != 0:
+ #print "configMode%s,"%configMode
+ self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
+ self.vlan_send_packet(outvlan, invlan)
+ self.check_result(vlanCase[caseIndex][0], configMode + " result Error")
+ self.dut.send_expect('rx_vlan rm %s %s' %(outvlan, dutRxPortId), "testpmd> ")
+ self.dut.send_expect('rx_vlan add %s %s' % (invlan, dutRxPortId), "testpmd> ")
+ #self.dut.send_expect('rx_vlan rm 1 %s' % dutRxPortId, "testpmd> ")
+ self.vlan_send_packet(outvlan, invlan)
+ self.check_result(vlanCase[caseIndex][1], configMode + " result Error")
+ self.dut.send_expect('rx_vlan rm %s %s' % (invlan, dutRxPortId), "testpmd> ")
+ if (caseDef & txCase) != 0:
+ self.dut.send_expect('tx_vlan reset %s' % dutTxPortId, "testpmd> ")
+ else:
+ self.dut.send_expect('rx_vlan add %s %s' % (invlan, dutRxPortId), "testpmd> ")
+ self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
+ self.vlan_send_packet(outvlan, invlan)
+ self.check_result(vlanCase[caseIndex], configMode + " result Error")
+ if (caseDef & txCase) != 0:
+ self.dut.send_expect('tx_vlan reset %s' % dutTxPortId, "testpmd> ")
+ self.dut.send_expect('rx_vlan rm %s %s' % (invlan, dutRxPortId), "testpmd> ")
+ self.dut.send_expect('rx_vlan rm %s %s' % (outvlan,dutRxPortId), "testpmd> ")
+
+ def check_result(self, resultKey, errorString):
+ """
+ Check results of synthetic test.
+ """
+ print "vlan flage config:%s"%errorString
+ out = self.get_tcpdump_package()
+ if allResult[resultKey][0] == "No":
+ self.verify("vlan" not in out, errorString)
+ else:
+ resultList = []
+ for i in range(len(allResult[resultKey]) - 1):
+ resultList.append("vlan %s" % allResult[resultKey][i])
+ resultList.append("vlan %s" % allResult[resultKey][len(allResult[resultKey]) - 1])
+ for line in resultList:
+ self.verify(line in out,"reviceive package is wrong:%s"%out)
+
+
+ def set_up(self):
+ """
+ Run before each test case.
+ """
+ pass
+
+ def test_vlan_filter_config(self):
+ """
+ Enable/Disable VLAN packets filtering
+ """
+ self.mode_config(filter="on")
+ self.mode_config(strip="off")
+ self.mode_config(qinq="off")
+ self.vlan_send_packet(outvlan)
+ #out = self.tester.scapy_get_result()
+ out = self.get_tcpdump_package()
+ print out
+ self.verify(out is not None and "vlan %s"%outvlan not in out, "Vlan filter enable error: " + out)
+
+ if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.mode_config(filter="off")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify("vlan %s"%outvlan in out, "Vlan filter disable error: " + out)
+ else:
+ self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify("vlan %s"%outvlan in out, "Vlan filter disable error: " + out)
+ self.dut.send_expect('rx_vlan rm %s %s' % (outvlan, dutRxPortId), "testpmd> ")
+
+ def test_vlan_filter_table(self):
+ """
+ Add/Remove VLAN Tag Identifier pass VLAN filtering
+ """
+
+ self.mode_config(filter="on")
+ self.mode_config(strip="off")
+ self.mode_config(qinq="off")
+
+ self.dut.send_expect("rx_vlan add %s %s" %(outvlan, dutRxPortId), "testpmd> ")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify("vlan %s"%outvlan in out, "vlan filter table enable error: " + out)
+
+ self.dut.send_expect("rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> ")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify(out is not None and "vlan %s"%outvlan not in out, "vlan filter table disable error: " + out)
+
+ def test_vlan_strip_config(self):
+ """
+ Enable/Disable VLAN packets striping
+ """
+
+ self.mode_config(filter="off")
+ self.mode_config(qinq="off")
+ self.mode_config(strip="on")
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify("vlan %s"%outvlan not in out, "Vlan strip enable error: " + out)
+
+ self.mode_config(strip="off")
+ self.vlan_send_packet(outvlan)
+ #out = self.tester.scapy_get_result()
+ out = self.get_tcpdump_package()
+ self.verify("vlan %s"%outvlan in out, "Vlan strip disable error: " + out)
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.dut.send_expect('rx_vlan rm %s %s' %(outvlan, dutRxPortId), "testpmd> ")
+
+ def test_vlan_stripq_config(self):
+ """
+ Enable/Disable VLAN packets strip on queue
+ """
+ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"],"%s NIC not support queue vlan strip "%self.nic)
+
+ self.mode_config(filter="off")
+ self.mode_config(qinq="off")
+ self.mode_config(strip="off")
+ self.mode_config(stripq="off")
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify("vlan %s"%outvlan in out, "vlan strip queue disable error : " + out)
+ #if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.mode_config(strip="on")
+ self.mode_config(stripq="on")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify("vlan %s"%outvlan not in out, "vlan strip enable error: " + out)
+
+ self.mode_config(stripq="off")
+ self.vlan_send_packet(outvlan)
+ out = self.get_tcpdump_package()
+ #out = self.tester.scapy_get_result()
+ self.verify("vlan %s"%outvlan in out, "vlan strip queue disable error: " + out)
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.dut.send_expect('rx_vlan rm %s %s' % (outvlan, dutRxPortId), "testpmd> ")
+ def test_vlan_insert_config(self):
+ """
+ Enable/Disable VLAN packets inserting
+ """
+ self.mode_config(filter="off")
+ self.mode_config(qinq="off")
+
+ # hartwell need to set CTRL.VME for vlan insert
+ if(self.nic == "hartwell"):
+ self.dut.send_expect("vlan set strip on %s" % dutTxPortId, "testpmd> ")
+
+ self.dut.send_expect("tx_vlan set %s %s" % (txvlan, dutTxPortId), "testpmd> ")
+
+ self.vlan_send_packet()
+ #out = self.tester.scapy_get_result()
+ out = self.get_tcpdump_package()
+ self.verify("vlan %s"%txvlan in out, "vlan inset enalber error: " + out)
+
+ self.dut.send_expect("tx_vlan reset %s" % dutTxPortId, "testpmd> ")
+ self.vlan_send_packet()
+ #out = self.tester.scapy_get_result()
+ out = self.get_tcpdump_package()
+ self.verify("vlan %s"%txvlan not in out, "vlan inset disable error: " + out)
+
+ def test_vlan_tpid_config(self):
+ """
+ Configure receive port out vlan TPID
+ """
+ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single","hartwell"],"%s NIC not support tcpid "%self.nic)
+
+ self.mode_config(filter="on", strip="on", qinq="on")
+ self.dut.send_expect("vlan set tpid 1234 %s" % dutRxPortId, "testpmd> ")
+ self.vlan_send_packet(outvlan, invlan)
+
+ #out = self.tester.scapy_get_result()
+ out = self.get_tcpdump_package()
+ self.verify("vlan %s"%outvlan in out, "vlan tpid disable error: " + out)
+ self.verify("vlan %s"%invlan in out, "vlan tpid disable error: " + out)
+
+ self.dut.send_expect("vlan set tpid 0x8100 %s" % dutRxPortId, "testpmd> ")
+ self.vlan_send_packet(outvlan, invlan)
+
+ #out = self.tester.scapy_get_result()
+ out = self.get_tcpdump_package()
+ self.verify(out is not None and "vlan" not in out, "vlane tpid enable error: " + out)
+
+ def test_vlan_synthetic_test(self):
+ """
+ VLAN synthetic test.
+ """
+ self.verify(self.nic != "hartwell", "sorry, dual vlan cannot support this self.nic")
+ for i in range(len(vlanCase)):
+ self.multimode_test(i)
+
+ def test_vlan_random_test(self):
+ """
+ VLAN random test.
+ """
+ self.verify(self.nic != "hartwell", "sorry, dual vlan cannot support this self.nic")
+ for _ in range(30):
+ rand = random.randint(0, 15)
+ self.multimode_test(rand)
+
+ def tear_down(self):
+ """
+ Run after each test case.
+ """
+ pass
+
+ def tear_down_all(self):
+ """
+ Run after each test suite.
+ """
+ self.dut.kill_all()
+ pass
--
1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [dts 4/4] [PATCH V1] update vlan get package function
2015-05-27 7:02 [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file huilong,xu
2015-05-27 7:02 ` [dts] [dts 2/4] [PATCH V1] add dual vlan test plan huilong,xu
2015-05-27 7:02 ` [dts] [dts 3/4] [PATCH v1] add dual vlan test case huilong,xu
@ 2015-05-27 7:02 ` huilong,xu
2015-06-01 9:12 ` [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file Liu, Yong
3 siblings, 0 replies; 5+ messages in thread
From: huilong,xu @ 2015-05-27 7:02 UTC (permalink / raw)
To: dts
From: huilong xu <huilongx.xu@intel.com>
changed list:
1. used tcpdump get package replace scapy get package
Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
tests/TestSuite_vlan.py | 103 ++++++++++++++++++++++++++++------------------
1 files changed, 63 insertions(+), 40 deletions(-)
diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
index 66dc4f3..fba68e3 100644
--- a/tests/TestSuite_vlan.py
+++ b/tests/TestSuite_vlan.py
@@ -1,6 +1,6 @@
# BSD LICENSE
#
-# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,9 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
"""
DPDK Test suite.
+
Test the support of VLAN Offload Features by Poll Mode Drivers.
+
"""
import dts
@@ -51,6 +54,8 @@ class TestVlan(TestCase):
Vlan Prerequistites
"""
+ global dutRxPortId
+ global dutTxPortId
# Based on h/w type, choose how many ports to use
ports = self.dut.get_ports()
@@ -58,105 +63,120 @@ class TestVlan(TestCase):
# Verify that enough ports are available
self.verify(len(ports) >= 2, "Insufficient ports")
- global valports
valports = [_ for _ in ports if self.tester.get_local_port(_) != -1]
-
+ dutRxPortId = valports[0]
+ dutTxPortId = valports[1]
portMask = dts.create_mask(valports[:2])
self.pmdout = PmdOutput(self.dut)
- self.pmdout.start_testpmd("all", "--portmask=%s" % portMask)
+ self.pmdout.start_testpmd("all", "--portmask=%s" % portMask )
self.dut.send_expect("set verbose 1", "testpmd> ")
out = self.dut.send_expect("set fwd mac", "testpmd> ")
- self.dut.send_expect("vlan set strip off %s" % valports[0], "testpmd> ")
+
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.dut.send_expect("set promisc all off", "testpmd> ")
+ self.dut.send_expect("vlan set filter on %s"%dutRxPortId, "testpmd> ")
+
+ self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ")
self.verify('Set mac packet forwarding mode' in out, "set fwd rxonly error")
+
+ def start_tcpdump(self):
+ port = self.tester.get_local_port(dutTxPortId)
+ rxItf = self.tester.get_interface(port)
+ self.tester.send_expect("rm -rf ./vlan_test.cap","#")
+ self.tester.send_expect("tcpdump -i %s -w ./vlan_test.cap 2> /dev/null& "%rxItf,"#" )
+
+ def get_tcpdump_package(self):
+ self.tester.send_expect("killall tcpdump","#")
+ return self.tester.send_expect("tcpdump -nn -e -v -r ./vlan_test.cap","#")
def vlan_send_packet(self, vid, num=1):
"""
Send $num of packet to portid
"""
-
- port = self.tester.get_local_port(valports[0])
+ # The package stream : testTxPort->dutRxPort->dutTxport->testRxPort
+ port = self.tester.get_local_port(dutRxPortId)
txItf = self.tester.get_interface(port)
- port = self.tester.get_local_port(valports[1])
+ port = self.tester.get_local_port(dutTxPortId)
rxItf = self.tester.get_interface(port)
- mac = self.dut.get_mac_address(valports[0])
+ # the package dect mac must is dut tx port id when the port promisc is off
+ mac = self.dut.get_mac_address(dutRxPortId)
# FIXME send a burst with only num packet
- self.tester.scapy_background()
- self.tester.scapy_append('p=sniff(iface="%s",count=1,timeout=5)' % rxItf)
- self.tester.scapy_append('RESULT=str(p)')
- self.tester.scapy_foreground()
self.tester.scapy_append('sendp([Ether(dst="%s")/Dot1Q(vlan=%s)/IP(len=46)], iface="%s")' % (mac, vid, txItf))
self.tester.scapy_execute()
-
def set_up(self):
"""
Run before each test case.
"""
pass
-
def test_vlan_enable_receipt(self):
"""
Enable receipt of VLAN packets
"""
- self.dut.send_expect("set promisc all off", "testpmd> ")
- self.dut.send_expect("rx_vlan add 1 %s" % valports[0], "testpmd> ")
- self.dut.send_expect("start", "testpmd> ", 120)
+ self.dut.send_expect("rx_vlan add 1 %s" % dutRxPortId, "testpmd> ")
+ self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ")
+ self.dut.send_expect("start", "testpmd> ", 120)
+ out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ", 20)
+
+ self.start_tcpdump()
self.vlan_send_packet(1)
- out = self.tester.scapy_get_result()
- self.verify("vlan=1L" in out, "Wrong vlan:" + out)
+ #out = self.tester.scapy_get_result()
+ out = self.get_tcpdump_package()
+ self.verify("vlan 1" in out, "Wrong vlan:" + out)
self.dut.send_expect("stop", "testpmd> ")
+
def test_vlan_disable_receipt(self):
"""
Disable receipt of VLAN packets
"""
- self.dut.send_expect("rx_vlan rm 1 %s" % valports[0], "testpmd> ")
- self.dut.send_expect("start", "testpmd> ", 120)
+ self.dut.send_expect("rx_vlan rm 1 %s" % dutRxPortId, "testpmd> ")
+ self.dut.send_expect("start", "testpmd> ", 120)
+ self.start_tcpdump()
self.vlan_send_packet(1)
- out = self.tester.scapy_get_result()
- self.verify("vlan=1L" not in out, "Wrong vlan:" + out)
+ out = self.get_tcpdump_package()
+ self.verify("vlan 1" not in out, "Wrong vlan:" + out)
out = self.dut.send_expect("stop", "testpmd> ")
+
def test_vlan_strip_config_on(self):
- """
- Set vlan strip on
- """
- self.dut.send_expect("vlan set strip on %s" % valports[0], "testpmd> ", 20)
- self.dut.send_expect("set promisc all off", "testpmd> ", 20)
- out = self.dut.send_expect("vlan set strip on %s" % valports[0], "testpmd> ", 20)
+
+ self.dut.send_expect("vlan set strip on %s" % dutRxPortId, "testpmd> ", 20)
+ self.dut.send_expect("rx_vlan add 1 %s" % dutRxPortId, "testpmd> ", 20)
+ out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ", 20)
self.verify("strip on" in out, "Wrong strip:" + out)
self.dut.send_expect("start", "testpmd> ", 120)
+ self.start_tcpdump()
self.vlan_send_packet(1)
- out = self.tester.scapy_get_result()
- self.verify("vlan=1L" not in out, "Wrong vlan:" + out)
+ out = self.get_tcpdump_package()
+ self.verify("vlan 1" not in out, "Wrong vlan:" + out)
out = self.dut.send_expect("quit", "#", 120)
def test_vlan_strip_config_off(self):
- """
- Set vlan strip off
- """
- self.dut.send_expect("vlan set strip off %s" % valports[0], "testpmd> ", 20)
- out = self.dut.send_expect("show port info %s" % valports[0], "testpmd> ", 20)
+ self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ", 20)
+ self.dut.send_expect("rx_vlan add 1 %s" % dutRxPortId, "testpmd> ", 20)
+ out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ", 20)
self.verify("strip off" in out, "Wrong strip:" + out)
self.dut.send_expect("set nbport 2", "testpmd> ")
self.dut.send_expect("start", "testpmd> ", 120)
+ self.start_tcpdump()
self.vlan_send_packet(1)
- out = self.tester.scapy_get_result()
- self.verify("vlan=1L" in out, "Wrong strip vlan:" + out)
+ out = self.get_tcpdump_package()
+ self.verify("vlan 1" in out, "Wrong strip vlan:" + out)
out = self.dut.send_expect("stop", "testpmd> ", 120)
def FAILING_test_vlan_enable_vlan_insertion(self):
@@ -186,7 +206,10 @@ class TestVlan(TestCase):
out = self.tester.scapy_get_result()
self.verify("vlan=1L" in out, "Wrong vlan: " + out)
- self.dut.send_expect("quit", "# ", 30)
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ self.dut.send_expect("stop", "testpmd> ", 30)
+ else:
+ self.dut.send_expect("quit", "# ", 30)
def tear_down(self):
"""
--
1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file
2015-05-27 7:02 [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file huilong,xu
` (2 preceding siblings ...)
2015-05-27 7:02 ` [dts] [dts 4/4] [PATCH V1] update vlan get package function huilong,xu
@ 2015-06-01 9:12 ` Liu, Yong
3 siblings, 0 replies; 5+ messages in thread
From: Liu, Yong @ 2015-06-01 9:12 UTC (permalink / raw)
To: Xu, HuilongX, dts
Thanks, applied in 1.1 branch.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilong,xu
> Sent: Wednesday, May 27, 2015 3:02 PM
> To: dts@dpdk.org
> Subject: [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default
> execution file
>
> From: huilong xu <huilongx.xu@intel.com>
>
> changed list:
> 1. add dual vlan for niantic and fortville test
> 2. add vlan for fortville test
>
> Signed-off-by: huilong xu <huilongx.xu@intel.com>
> ---
> executions/execution.cfg | 3 ++-
> executions/execution_FVL.cfg | 4 +++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/executions/execution.cfg b/executions/execution.cfg
> index 73d70f6..e5c6198 100644
> --- a/executions/execution.cfg
> +++ b/executions/execution.cfg
> @@ -18,7 +18,8 @@ test_suites=
> ip_pipeline,
> pmd_bonded,
> dynamic_config,
> - generic_filter
> + generic_filter,
> + dual_vlan
> targets=
> x86_64-native-linuxapp-gcc
> parameters=nic_type=cfg:func=true
> diff --git a/executions/execution_FVL.cfg b/executions/execution_FVL.cfg
> index 7e5151b..12990d8 100644
> --- a/executions/execution_FVL.cfg
> +++ b/executions/execution_FVL.cfg
> @@ -4,7 +4,9 @@ drivername=<driver name igb_uio or vfio-pci>
> test_suites=
> checksum_offload,
> dynamic_config,
> - generic_filter
> + generic_filter,
> + dual_vlan,
> + vlan
> targets=
> x86_64-native-linuxapp-gcc
> parameters=nic_type=cfg:func=true
> --
> 1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-01 9:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 7:02 [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file huilong,xu
2015-05-27 7:02 ` [dts] [dts 2/4] [PATCH V1] add dual vlan test plan huilong,xu
2015-05-27 7:02 ` [dts] [dts 3/4] [PATCH v1] add dual vlan test case huilong,xu
2015-05-27 7:02 ` [dts] [dts 4/4] [PATCH V1] update vlan get package function huilong,xu
2015-06-01 9:12 ` [dts] [dts 1/4] [PATCH V1] add dual vlan test case in default execution file Liu, Yong
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).