* [dts] [PATCH 1/2] Add updated vmdq test suite.
@ 2015-09-15 6:35 Qian Xu
2015-09-15 6:35 ` [dts] [PATCH 2/2] Add updated test plan for vmdq Qian Xu
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Qian Xu @ 2015-09-15 6:35 UTC (permalink / raw)
To: dts
Updated vmdq test suite, and it works for both FVL and Niantic. The major changes are as below:
1. Support FVL 4x10g, 2x10g, 2x40g.
2. Update the traffic to make the MAC address and VLAN id changes together. Then the packet loss is 0 at low traffic.
3. Set the max pools number for major NICs: FVL 40G, 10G, Niantic, 1G.
4. Update the core config.
Signed-off-by: Qian Xu <qian.q.xu@intel.com>
diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py
new file mode 100644
index 0000000..5949bce
--- /dev/null
+++ b/tests/TestSuite_vmdq.py
@@ -0,0 +1,262 @@
+# <COPYRIGHT_TAG>
+
+"""
+DPDK Test suite.
+
+Tests for vmdq.
+
+"""
+
+import dts
+import re
+from etgen import IxiaPacketGenerator
+from test_case import TestCase
+from time import sleep
+
+
+class TestVmdq(TestCase, IxiaPacketGenerator):
+ dut_ports = []
+ ip_dot1q_header_size = 22
+ default_framesize = 64
+ default_payload = default_framesize - ip_dot1q_header_size
+ current_frame_size = 0
+ destmac_port0 = "52:54:00:12:00:00"
+ destmac_port1 = "52:54:00:12:01:00"
+ da_repeat = 1
+ vlan_repeat = 1
+ queues = 8
+
+ def set_up_all(self):
+ """
+ Run at the start of each test suite.
+ """
+
+ self.tester.extend_external_packet_generator(TestVmdq, self)
+
+ self.dut.send_expect("sed -i 's/CONFIG_RTE_MAX_QUEUES_PER_PORT=256/CONFIG_RTE_MAX_QUEUES_PER_PORT=1024/' ./config/common_linuxapp", "# ", 5)
+
+ self.dut.build_install_dpdk(self.target)
+ # Update the max queue per port for Fortville.
+ self.dut.send_expect("sed -i 's/define MAX_QUEUES 128/define MAX_QUEUES 1024/' ./examples/vmdq/main.c", "#", 5)
+
+ self.dut_ports = self.dut.get_ports(self.nic)
+ print self.dut_ports
+ self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
+
+ self.core_configs = []
+ self.core_configs.append({'cores': '1S/1C/1T', 'mpps': {}})
+ self.core_configs.append({'cores': '1S/2C/1T', 'mpps': {}})
+ self.core_configs.append({'cores': '1S/2C/2T', 'mpps': {}})
+ self.core_configs.append({'cores': '1S/4C/1T', 'mpps': {}})
+
+ self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
+ out = self.dut.send_expect("make -C examples/vmdq", "#", 10)
+ self.verify("Error" not in out, "Compilation error")
+
+
+ def validateApproxEqual(self, lines):
+ """
+ Check that all the rx queue stats are within a 30% range.
+ """
+
+ minimum = 1000000
+ maximun = 0
+
+ # Need to use Python re package because dts.regexp only handles 1 group,
+ # we need 4.
+ scanner = re.compile(
+ "^Pool [0-9]+: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$")
+ for l in lines:
+ m = scanner.search(l)
+ if m is None:
+ # Line at the end, "Finished handling signal", ignore
+ pass
+ else:
+ for stat in m.groups():
+ if stat < minimum:
+ minimum = stat
+ if stat > maximun:
+ maximun = stat
+ self.verify(maximun - minimum <= minimum *
+ 0.3, "Too wide variation in queue stats")
+
+ def Npools_128queues(self, npools):
+ """
+ MAX queues is 128
+ queues/pools = 128/npools
+ """
+
+ TestVmdq.current_frame_size = TestVmdq.default_framesize
+
+ self.dut_ports = self.dut.get_ports(self.nic)
+
+ core_list = self.dut.get_core_list("1S/4C/1T", socket=self.ports_socket)
+ core_mask = dts.create_mask(core_list)
+
+ port_mask = dts.create_mask([self.dut_ports[0], self.dut_ports[1]])
+ # Run the application
+ out = self.dut.send_expect("./examples/vmdq/build/vmdq_app -n 4 -c %s -- -p %s --nb-pools %s&" %
+ (core_mask, port_mask, str(npools)), "reading queues", 120)
+
+ # Transmit traffic
+ tx_port = self.tester.get_local_port(self.dut_ports[0])
+ rx_port = self.tester.get_local_port(self.dut_ports[1])
+ tx_mac = self.tester.get_mac(tx_port)
+
+ self.vlan_repeat = npools
+ self.da_repeat = npools
+ tgen_input = []
+ for p in range(8):
+ self.tester.scapy_append('dmac="%s"' % self.destmac_port0)
+ self.tester.scapy_append('smac="%s"' % tx_mac)
+ self.tester.scapy_append(
+ 'flows = [Ether(src=smac, dst=dmac)/Dot1Q(vlan=0,prio=%d)]'%p)
+ self.tester.scapy_append('wrpcap("test%d.pcap", flows)' %p)
+ self.tester.scapy_execute()
+ tgen_input.append((tx_port, rx_port, "test%d.pcap" %p))
+
+ loss = self.tester.traffic_generator_loss(tgen_input, 10)
+ print "loss is %s !" % loss
+
+ # Verify the accurate
+ self.verify(loss < 0.001, "Excessive packet loss")
+ self.validateApproxEqual(out.split("\r\n"))
+
+ def set_up(self):
+ """
+ Run before each test case.
+ """
+ self.dut.kill_all()
+
+ def test_perf_vmdq_64pools_queues(self):
+ """
+ This function call " Npools_128queues" with differen number
+ of pools. Details see below. if not sure, set it as 8 pools.
+ """
+ if self.nic in ("niantic", "springfountain"):
+ self.Npools_128queues(64)
+ elif self.nic in ("fortville_spirit", "fortville_spirit_single"):
+ self.Npools_128queues(63)
+ elif self.nic in ("fortville_eagle"):
+ self.Npools_128queues(34)
+ else:
+ self.Npools_128queues(8)
+
+ def test_perf_vmdq_performance(self):
+ """
+ Try different configuration and different packe size
+ """
+
+ self.tester.get_interface(
+ self.tester.get_local_port(self.dut_ports[0]))
+
+ frame_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
+ for config in self.core_configs:
+
+ print dts.BLUE(config["cores"])
+ self.dut.kill_all()
+
+ core_config = config['cores']
+ core_list = self.dut.get_core_list(core_config,socket=self.ports_socket)
+ core_mask = dts.create_mask(core_list)
+ portmask = dts.create_mask(self.dut.get_ports())
+ if self.nic in ("niantic", "springfountain"):
+ self.queues = 64
+ self.dut.send_expect(
+ "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --nb-pools 64&" %
+ (self.dut.get_memory_channels(), core_mask, portmask), "reading queues", 30)
+ elif self.nic in ("fortville_spirit", "fortville_spirit_single"):
+ self.queues = 63
+ self.dut.send_expect(
+ "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --nb-pools 63&" %
+ (self.dut.get_memory_channels(), core_mask, portmask), "reading queues", 30)
+ elif self.nic in ("fortville_eagle"):
+ self.queues = 34
+ self.dut.send_expect(
+ "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --nb-pools 34&" %
+ (self.dut.get_memory_channels(), core_mask, portmask), "reading queues", 30)
+ else:
+ self.queues = 8
+ self.dut.send_expect(
+ "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --nb-pools 8&" %
+ (self.dut.get_memory_channels(), core_mask, portmask), "reading queues", 30)
+
+ tx_port = self.tester.get_local_port(self.dut_ports[0])
+ rx_port = self.tester.get_local_port(self.dut_ports[1])
+
+ print dts.GREEN("Waiting for application to initialize")
+ sleep(5)
+
+ for frame_size in frame_sizes:
+
+ TestVmdq.current_frame_size = frame_size
+
+ print dts.BLUE(str(frame_size))
+
+ self.tester.scapy_append('dstmac="%s"' % self.destmac_port0)
+ tx_mac = self.tester.get_mac(tx_port)
+ self.tester.scapy_append('srcmac="%s"' % tx_mac)
+ self.tester.scapy_append(
+ 'flows = [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
+ (frame_size - TestVmdq.ip_dot1q_header_size))
+ self.tester.scapy_append('wrpcap("test1.pcap", flows)')
+ self.tester.scapy_execute()
+
+ self.tester.scapy_append('dstmac="%s"' % self.destmac_port1)
+ tx_mac = self.tester.get_mac(rx_port)
+ self.tester.scapy_append('srcmac="%s"' % tx_mac)
+ self.tester.scapy_append(
+ 'flows = [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
+ (frame_size - TestVmdq.ip_dot1q_header_size))
+ self.tester.scapy_append('wrpcap("test2.pcap", flows)')
+ self.tester.scapy_execute()
+
+ self.vlan_repeat = self.queues
+ self.da_repeat = self.queues
+
+ tgen_input = []
+ tgen_input.append((tx_port, rx_port, "test1.pcap"))
+ tgen_input.append((rx_port, tx_port, "test2.pcap"))
+ _, pps = self.tester.traffic_generator_throughput(tgen_input)
+ config['mpps'][frame_size] = pps/1000000.0
+
+ for n in range(len(self.core_configs)):
+ for size in frame_sizes:
+ self.verify(
+ self.core_configs[n]['mpps'][size] is not 0, "No traffic detected")
+
+ # Print results
+ dts.results_table_add_header(
+ ['Frame size'] + [n['cores'] for n in self.core_configs])
+
+ for size in frame_sizes:
+ dts.results_table_add_row(
+ [size] + [n['mpps'][size] for n in self.core_configs])
+
+ dts.results_table_print()
+
+ # Override etgen.dot1q function
+ def dot1q(self, port, prio, id, vlan, type):
+ """
+ Change Ixia configuration
+ """
+
+ self.add_tcl_cmd("vlan config -mode vIncrement")
+ self.add_tcl_cmd("vlan config -step 1")
+ self.add_tcl_cmd("vlan config -repeat %d" % self.vlan_repeat)
+ self.add_tcl_cmd("stream config -framesize %d" %
+ TestVmdq.current_frame_size)
+ super(TestVmdq, self).dot1q(port, prio, id, vlan, type)
+
+ def ether(self, port, src, dst, type):
+ """
+ Configure Ether protocal.
+ """
+ self.add_tcl_cmd("protocol config -ethernetType ethernetII")
+ self.add_tcl_cmd('stream config -sa "%s"' % self.macToTclFormat(src))
+ self.add_tcl_cmd('stream config -da "%s"' % self.macToTclFormat(dst))
+ self.add_tcl_cmd('stream config -daRepeatCounter increment')
+ self.add_tcl_cmd('stream config -daStep 1')
+ self.add_tcl_cmd('stream config -numDA %d' % self.da_repeat)
+
+
--
2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH 2/2] Add updated test plan for vmdq.
2015-09-15 6:35 [dts] [PATCH 1/2] Add updated vmdq test suite Qian Xu
@ 2015-09-15 6:35 ` Qian Xu
2015-09-15 8:44 ` [dts] [PATCH 1/2] Add updated vmdq test suite Xu, HuilongX
2015-09-16 2:06 ` Liu, Yong
2 siblings, 0 replies; 8+ messages in thread
From: Qian Xu @ 2015-09-15 6:35 UTC (permalink / raw)
To: dts
The test plan is updated to align with updated test script, and also supports FVL 40G, 10G.
Signed-off-by: Qian Xu <qian.q.xu@intel.com>
diff --git a/test_plans/vmdq_test_plan.rst b/test_plans/vmdq_test_plan.rst
new file mode 100644
index 0000000..9a3908c
--- /dev/null
+++ b/test_plans/vmdq_test_plan.rst
@@ -0,0 +1,123 @@
+.. Copyright (c) 2010,2011 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 RX/TX Packet Filtering using VMDQ Features of 40G&10G&1G NIC
+=========================================================================
+
+The 1G, 10G 82599 and 40G FVL Network Interface Card (NIC), supports a number of packet
+filtering functions which can be used to distribute incoming packets into a
+number of reception (RX) queues. VMDQ is a filtering
+functions which operate on VLAN-tagged packets to distribute those packets
+among up to 512 RX queues.
+
+The feature itself works by:
+
+- splitting the incoming packets up into different "pools" - each with its own
+ set of RX queues - based upon the MAC address and VLAN ID within the VLAN tag of the packet.
+- assigning each packet to a specific queue within the pool, based upon the
+ user priority field within the VLAN tag and MAC address.
+
+The VMDQ features are enabled in the ``vmdq`` example application
+contained in the Intel DPDK, and this application should be used to validate
+the feature.
+
+Prerequisites
+=============
+- All tests assume a linuxapp setup.
+- The port ids of the two 10G or 40G ports to be used for the testing are specified
+ in the commandline. it use a portmask.
+- The Intel DPDK is compiled for the appropriate target type in each case, and
+ the VMDQ example application is compiled and linked with that DPDK
+ instance
+- Two ports are connected to the test system, one to be used for packet
+ reception, the other for transmission
+- The traffic generator being used is configured to send to the application RX
+ port a stream of packets with VLAN tags, where the VLAN IDs increment from 0
+ to the pools numbers(e.g: for FVL spirit, it's 63, inclusive) as well as the MAC address from
+ 52:54:00:12:[port_index]:00 to 52:54:00:12:[port_index]:3e and the VLAN user priority field increments from 0 to 7
+ (inclusive) for each VLAN ID. In our case port_index = 0 or 1.
+
+
+Test Case: Measure VMDQ pools queues
+------------------------------------
+1. Put different number of pools: in the case of 10G 82599 Nic is 64, in the case
+ of FVL spirit is 63,in case of FVL eagle is 34.
+2. Start traffic transmission using approx 10% of line rate.
+3. After a number of seconds, e.g. 15, stop traffic, and ensure no traffic
+ loss (<0.001%) has occurred.
+4. Send a hangup signal (SIGHUP) to the application to have it print out the
+ statistics of how many packets were received per RX queue
+
+Expected Result:
+
+- No packet loss is expected
+- Every RX queue should have received approximately (+/-15%) the same number of
+ incoming packets
+
+Test Case: Measure VMDQ Performance
+-----------------------------------
+
+1. Compile VMDQ example application as in first test above.
+2. Run application using a core mask for the appropriate thread and core
+ settings given in the following list:
+
+ * 1S/1C/1T
+ * 1S/2C/1T
+ * 1S/2C/2T
+ * 1S/4C/1T
+
+3. Measure maximum RFC2544 performance throughput for bi-directional traffic for
+ all standard packet sizes.
+
+Output Format:
+The output format should be as below, or any similar table-type, with figures
+given in mpps:
+
++------------+----------+----------+----------+----------+
+| Frame size | 1S/1C/1T | 1S/2C/1T | 1S/2C/2T | 1S/4C/1T |
++============+==========+==========+==========+==========+
+| 64 | 19.582 | 42.222 | 53.204 | 73.768 |
++------------+----------+----------+----------+----------+
+| 128 | 20.607 | 42.126 | 52.964 | 67.527 |
++------------+----------+----------+----------+----------+
+| 256 | 15.614 | 33.849 | 36.232 | 36.232 |
++------------+----------+----------+----------+----------+
+| 512 | 11.794 | 18.797 | 18.797 | 18.797 |
++------------+----------+----------+----------+----------+
+| 1024 | 9.568 | 9.579 | 9.579 | 9.579 |
++------------+----------+----------+----------+----------+
+| 1280 | 7.692 | 7.692 | 7.692 | 7.692 |
++------------+----------+----------+----------+----------+
+| 1518 | 6.395 | 6.502 | 6.502 | 6.502 |
++------------+----------+----------+----------+----------+
+
--
2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH 1/2] Add updated vmdq test suite.
2015-09-15 6:35 [dts] [PATCH 1/2] Add updated vmdq test suite Qian Xu
2015-09-15 6:35 ` [dts] [PATCH 2/2] Add updated test plan for vmdq Qian Xu
@ 2015-09-15 8:44 ` Xu, HuilongX
2015-09-15 9:09 ` Xu, Qian Q
2015-09-16 2:06 ` Liu, Yong
2 siblings, 1 reply; 8+ messages in thread
From: Xu, HuilongX @ 2015-09-15 8:44 UTC (permalink / raw)
To: Xu, Qian Q, dts
Hi qian,
Could you add this test in execution.conf and execution_FVL.conf for Niantic and FVL NIC test?
Thanks a lot
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu
> Sent: Tuesday, September 15, 2015 2:35 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Updated vmdq test suite, and it works for both FVL and Niantic. The major
> changes are as below:
> 1. Support FVL 4x10g, 2x10g, 2x40g.
> 2. Update the traffic to make the MAC address and VLAN id changes together.
> Then the packet loss is 0 at low traffic.
> 3. Set the max pools number for major NICs: FVL 40G, 10G, Niantic, 1G.
> 4. Update the core config.
>
> Signed-off-by: Qian Xu <qian.q.xu@intel.com>
>
> diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py
> new file mode 100644
> index 0000000..5949bce
> --- /dev/null
> +++ b/tests/TestSuite_vmdq.py
> @@ -0,0 +1,262 @@
> +# <COPYRIGHT_TAG>
> +
> +"""
> +DPDK Test suite.
> +
> +Tests for vmdq.
> +
> +"""
> +
> +import dts
> +import re
> +from etgen import IxiaPacketGenerator
> +from test_case import TestCase
> +from time import sleep
> +
> +
> +class TestVmdq(TestCase, IxiaPacketGenerator):
> + dut_ports = []
> + ip_dot1q_header_size = 22
> + default_framesize = 64
> + default_payload = default_framesize - ip_dot1q_header_size
> + current_frame_size = 0
> + destmac_port0 = "52:54:00:12:00:00"
> + destmac_port1 = "52:54:00:12:01:00"
> + da_repeat = 1
> + vlan_repeat = 1
> + queues = 8
> +
> + def set_up_all(self):
> + """
> + Run at the start of each test suite.
> + """
> +
> + self.tester.extend_external_packet_generator(TestVmdq, self)
> +
> + self.dut.send_expect("sed -i
> 's/CONFIG_RTE_MAX_QUEUES_PER_PORT=256/CONFIG_RTE_MAX_QUEUES_PER_PORT=1024/
> ' ./config/common_linuxapp", "# ", 5)
> +
> + self.dut.build_install_dpdk(self.target)
> + # Update the max queue per port for Fortville.
> + self.dut.send_expect("sed -i 's/define MAX_QUEUES 128/define
> MAX_QUEUES 1024/' ./examples/vmdq/main.c", "#", 5)
> +
> + self.dut_ports = self.dut.get_ports(self.nic)
> + print self.dut_ports
> + self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> +
> + self.core_configs = []
> + self.core_configs.append({'cores': '1S/1C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/2T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/4C/1T', 'mpps': {}})
> +
> + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
> + out = self.dut.send_expect("make -C examples/vmdq", "#", 10)
> + self.verify("Error" not in out, "Compilation error")
> +
> +
> + def validateApproxEqual(self, lines):
> + """
> + Check that all the rx queue stats are within a 30% range.
> + """
> +
> + minimum = 1000000
> + maximun = 0
> +
> + # Need to use Python re package because dts.regexp only handles 1
> group,
> + # we need 4.
> + scanner = re.compile(
> + "^Pool [0-9]+: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$")
> + for l in lines:
> + m = scanner.search(l)
> + if m is None:
> + # Line at the end, "Finished handling signal", ignore
> + pass
> + else:
> + for stat in m.groups():
> + if stat < minimum:
> + minimum = stat
> + if stat > maximun:
> + maximun = stat
> + self.verify(maximun - minimum <= minimum *
> + 0.3, "Too wide variation in queue stats")
> +
> + def Npools_128queues(self, npools):
> + """
> + MAX queues is 128
> + queues/pools = 128/npools
> + """
> +
> + TestVmdq.current_frame_size = TestVmdq.default_framesize
> +
> + self.dut_ports = self.dut.get_ports(self.nic)
> +
> + core_list = self.dut.get_core_list("1S/4C/1T",
> socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> +
> + port_mask = dts.create_mask([self.dut_ports[0],
> self.dut_ports[1]])
> + # Run the application
> + out = self.dut.send_expect("./examples/vmdq/build/vmdq_app -n 4 -
> c %s -- -p %s --nb-pools %s&" %
> + (core_mask, port_mask, str(npools)),
> "reading queues", 120)
> +
> + # Transmit traffic
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> + tx_mac = self.tester.get_mac(tx_port)
> +
> + self.vlan_repeat = npools
> + self.da_repeat = npools
> + tgen_input = []
> + for p in range(8):
> + self.tester.scapy_append('dmac="%s"' % self.destmac_port0)
> + self.tester.scapy_append('smac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows = [Ether(src=smac,
> dst=dmac)/Dot1Q(vlan=0,prio=%d)]'%p)
> + self.tester.scapy_append('wrpcap("test%d.pcap", flows)' %p)
> + self.tester.scapy_execute()
> + tgen_input.append((tx_port, rx_port, "test%d.pcap" %p))
> +
> + loss = self.tester.traffic_generator_loss(tgen_input, 10)
> + print "loss is %s !" % loss
> +
> + # Verify the accurate
> + self.verify(loss < 0.001, "Excessive packet loss")
> + self.validateApproxEqual(out.split("\r\n"))
> +
> + def set_up(self):
> + """
> + Run before each test case.
> + """
> + self.dut.kill_all()
> +
> + def test_perf_vmdq_64pools_queues(self):
> + """
> + This function call " Npools_128queues" with differen number
> + of pools. Details see below. if not sure, set it as 8 pools.
> + """
> + if self.nic in ("niantic", "springfountain"):
> + self.Npools_128queues(64)
> + elif self.nic in ("fortville_spirit", "fortville_spirit_single"):
> + self.Npools_128queues(63)
> + elif self.nic in ("fortville_eagle"):
> + self.Npools_128queues(34)
> + else:
> + self.Npools_128queues(8)
> +
> + def test_perf_vmdq_performance(self):
> + """
> + Try different configuration and different packe size
> + """
> +
> + self.tester.get_interface(
> + self.tester.get_local_port(self.dut_ports[0]))
> +
> + frame_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
> + for config in self.core_configs:
> +
> + print dts.BLUE(config["cores"])
> + self.dut.kill_all()
> +
> + core_config = config['cores']
> + core_list =
> self.dut.get_core_list(core_config,socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> + portmask = dts.create_mask(self.dut.get_ports())
> + if self.nic in ("niantic", "springfountain"):
> + self.queues = 64
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 64&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_spirit",
> "fortville_spirit_single"):
> + self.queues = 63
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 63&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_eagle"):
> + self.queues = 34
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 34&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> + else:
> + self.queues = 8
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 8&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> +
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> +
> + print dts.GREEN("Waiting for application to initialize")
> + sleep(5)
> +
> + for frame_size in frame_sizes:
> +
> + TestVmdq.current_frame_size = frame_size
> +
> + print dts.BLUE(str(frame_size))
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port0)
> + tx_mac = self.tester.get_mac(tx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test1.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port1)
> + tx_mac = self.tester.get_mac(rx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test2.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.vlan_repeat = self.queues
> + self.da_repeat = self.queues
> +
> + tgen_input = []
> + tgen_input.append((tx_port, rx_port, "test1.pcap"))
> + tgen_input.append((rx_port, tx_port, "test2.pcap"))
> + _, pps =
> self.tester.traffic_generator_throughput(tgen_input)
> + config['mpps'][frame_size] = pps/1000000.0
> +
> + for n in range(len(self.core_configs)):
> + for size in frame_sizes:
> + self.verify(
> + self.core_configs[n]['mpps'][size] is not 0, "No
> traffic detected")
> +
> + # Print results
> + dts.results_table_add_header(
> + ['Frame size'] + [n['cores'] for n in self.core_configs])
> +
> + for size in frame_sizes:
> + dts.results_table_add_row(
> + [size] + [n['mpps'][size] for n in self.core_configs])
> +
> + dts.results_table_print()
> +
> + # Override etgen.dot1q function
> + def dot1q(self, port, prio, id, vlan, type):
> + """
> + Change Ixia configuration
> + """
> +
> + self.add_tcl_cmd("vlan config -mode vIncrement")
> + self.add_tcl_cmd("vlan config -step 1")
> + self.add_tcl_cmd("vlan config -repeat %d" % self.vlan_repeat)
> + self.add_tcl_cmd("stream config -framesize %d" %
> + TestVmdq.current_frame_size)
> + super(TestVmdq, self).dot1q(port, prio, id, vlan, type)
> +
> + def ether(self, port, src, dst, type):
> + """
> + Configure Ether protocal.
> + """
> + self.add_tcl_cmd("protocol config -ethernetType ethernetII")
> + self.add_tcl_cmd('stream config -sa "%s"' %
> self.macToTclFormat(src))
> + self.add_tcl_cmd('stream config -da "%s"' %
> self.macToTclFormat(dst))
> + self.add_tcl_cmd('stream config -daRepeatCounter increment')
> + self.add_tcl_cmd('stream config -daStep 1')
> + self.add_tcl_cmd('stream config -numDA %d' % self.da_repeat)
> +
> +
> --
> 2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH 1/2] Add updated vmdq test suite.
2015-09-15 8:44 ` [dts] [PATCH 1/2] Add updated vmdq test suite Xu, HuilongX
@ 2015-09-15 9:09 ` Xu, Qian Q
2015-09-15 10:33 ` Xu, HuilongX
0 siblings, 1 reply; 8+ messages in thread
From: Xu, Qian Q @ 2015-09-15 9:09 UTC (permalink / raw)
To: Xu, HuilongX, dts
Huilong
It's a performance test, do you want to test?
Thanks
Qian
-----Original Message-----
From: Xu, HuilongX
Sent: Tuesday, September 15, 2015 4:45 PM
To: Xu, Qian Q; dts@dpdk.org
Subject: RE: [dts] [PATCH 1/2] Add updated vmdq test suite.
Hi qian,
Could you add this test in execution.conf and execution_FVL.conf for Niantic and FVL NIC test?
Thanks a lot
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu
> Sent: Tuesday, September 15, 2015 2:35 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Updated vmdq test suite, and it works for both FVL and Niantic. The
> major changes are as below:
> 1. Support FVL 4x10g, 2x10g, 2x40g.
> 2. Update the traffic to make the MAC address and VLAN id changes together.
> Then the packet loss is 0 at low traffic.
> 3. Set the max pools number for major NICs: FVL 40G, 10G, Niantic, 1G.
> 4. Update the core config.
>
> Signed-off-by: Qian Xu <qian.q.xu@intel.com>
>
> diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py new
> file mode 100644 index 0000000..5949bce
> --- /dev/null
> +++ b/tests/TestSuite_vmdq.py
> @@ -0,0 +1,262 @@
> +# <COPYRIGHT_TAG>
> +
> +"""
> +DPDK Test suite.
> +
> +Tests for vmdq.
> +
> +"""
> +
> +import dts
> +import re
> +from etgen import IxiaPacketGenerator from test_case import TestCase
> +from time import sleep
> +
> +
> +class TestVmdq(TestCase, IxiaPacketGenerator):
> + dut_ports = []
> + ip_dot1q_header_size = 22
> + default_framesize = 64
> + default_payload = default_framesize - ip_dot1q_header_size
> + current_frame_size = 0
> + destmac_port0 = "52:54:00:12:00:00"
> + destmac_port1 = "52:54:00:12:01:00"
> + da_repeat = 1
> + vlan_repeat = 1
> + queues = 8
> +
> + def set_up_all(self):
> + """
> + Run at the start of each test suite.
> + """
> +
> + self.tester.extend_external_packet_generator(TestVmdq, self)
> +
> + self.dut.send_expect("sed -i
> 's/CONFIG_RTE_MAX_QUEUES_PER_PORT=256/CONFIG_RTE_MAX_QUEUES_PER_PORT=1
> 024/
> ' ./config/common_linuxapp", "# ", 5)
> +
> + self.dut.build_install_dpdk(self.target)
> + # Update the max queue per port for Fortville.
> + self.dut.send_expect("sed -i 's/define MAX_QUEUES 128/define
> MAX_QUEUES 1024/' ./examples/vmdq/main.c", "#", 5)
> +
> + self.dut_ports = self.dut.get_ports(self.nic)
> + print self.dut_ports
> + self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> +
> + self.core_configs = []
> + self.core_configs.append({'cores': '1S/1C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/2T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/4C/1T', 'mpps': {}})
> +
> + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
> + out = self.dut.send_expect("make -C examples/vmdq", "#", 10)
> + self.verify("Error" not in out, "Compilation error")
> +
> +
> + def validateApproxEqual(self, lines):
> + """
> + Check that all the rx queue stats are within a 30% range.
> + """
> +
> + minimum = 1000000
> + maximun = 0
> +
> + # Need to use Python re package because dts.regexp only
> + handles 1
> group,
> + # we need 4.
> + scanner = re.compile(
> + "^Pool [0-9]+: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$")
> + for l in lines:
> + m = scanner.search(l)
> + if m is None:
> + # Line at the end, "Finished handling signal", ignore
> + pass
> + else:
> + for stat in m.groups():
> + if stat < minimum:
> + minimum = stat
> + if stat > maximun:
> + maximun = stat
> + self.verify(maximun - minimum <= minimum *
> + 0.3, "Too wide variation in queue stats")
> +
> + def Npools_128queues(self, npools):
> + """
> + MAX queues is 128
> + queues/pools = 128/npools
> + """
> +
> + TestVmdq.current_frame_size = TestVmdq.default_framesize
> +
> + self.dut_ports = self.dut.get_ports(self.nic)
> +
> + core_list = self.dut.get_core_list("1S/4C/1T",
> socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> +
> + port_mask = dts.create_mask([self.dut_ports[0],
> self.dut_ports[1]])
> + # Run the application
> + out = self.dut.send_expect("./examples/vmdq/build/vmdq_app -n
> + 4 -
> c %s -- -p %s --nb-pools %s&" %
> + (core_mask, port_mask,
> + str(npools)),
> "reading queues", 120)
> +
> + # Transmit traffic
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> + tx_mac = self.tester.get_mac(tx_port)
> +
> + self.vlan_repeat = npools
> + self.da_repeat = npools
> + tgen_input = []
> + for p in range(8):
> + self.tester.scapy_append('dmac="%s"' % self.destmac_port0)
> + self.tester.scapy_append('smac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows = [Ether(src=smac,
> dst=dmac)/Dot1Q(vlan=0,prio=%d)]'%p)
> + self.tester.scapy_append('wrpcap("test%d.pcap", flows)' %p)
> + self.tester.scapy_execute()
> + tgen_input.append((tx_port, rx_port, "test%d.pcap" %p))
> +
> + loss = self.tester.traffic_generator_loss(tgen_input, 10)
> + print "loss is %s !" % loss
> +
> + # Verify the accurate
> + self.verify(loss < 0.001, "Excessive packet loss")
> + self.validateApproxEqual(out.split("\r\n"))
> +
> + def set_up(self):
> + """
> + Run before each test case.
> + """
> + self.dut.kill_all()
> +
> + def test_perf_vmdq_64pools_queues(self):
> + """
> + This function call " Npools_128queues" with differen number
> + of pools. Details see below. if not sure, set it as 8 pools.
> + """
> + if self.nic in ("niantic", "springfountain"):
> + self.Npools_128queues(64)
> + elif self.nic in ("fortville_spirit", "fortville_spirit_single"):
> + self.Npools_128queues(63)
> + elif self.nic in ("fortville_eagle"):
> + self.Npools_128queues(34)
> + else:
> + self.Npools_128queues(8)
> +
> + def test_perf_vmdq_performance(self):
> + """
> + Try different configuration and different packe size
> + """
> +
> + self.tester.get_interface(
> + self.tester.get_local_port(self.dut_ports[0]))
> +
> + frame_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
> + for config in self.core_configs:
> +
> + print dts.BLUE(config["cores"])
> + self.dut.kill_all()
> +
> + core_config = config['cores']
> + core_list =
> self.dut.get_core_list(core_config,socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> + portmask = dts.create_mask(self.dut.get_ports())
> + if self.nic in ("niantic", "springfountain"):
> + self.queues = 64
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 64&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_spirit",
> "fortville_spirit_single"):
> + self.queues = 63
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 63&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_eagle"):
> + self.queues = 34
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 34&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> + else:
> + self.queues = 8
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 8&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> +
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> +
> + print dts.GREEN("Waiting for application to initialize")
> + sleep(5)
> +
> + for frame_size in frame_sizes:
> +
> + TestVmdq.current_frame_size = frame_size
> +
> + print dts.BLUE(str(frame_size))
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port0)
> + tx_mac = self.tester.get_mac(tx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test1.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port1)
> + tx_mac = self.tester.get_mac(rx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test2.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.vlan_repeat = self.queues
> + self.da_repeat = self.queues
> +
> + tgen_input = []
> + tgen_input.append((tx_port, rx_port, "test1.pcap"))
> + tgen_input.append((rx_port, tx_port, "test2.pcap"))
> + _, pps =
> self.tester.traffic_generator_throughput(tgen_input)
> + config['mpps'][frame_size] = pps/1000000.0
> +
> + for n in range(len(self.core_configs)):
> + for size in frame_sizes:
> + self.verify(
> + self.core_configs[n]['mpps'][size] is not 0, "No
> traffic detected")
> +
> + # Print results
> + dts.results_table_add_header(
> + ['Frame size'] + [n['cores'] for n in self.core_configs])
> +
> + for size in frame_sizes:
> + dts.results_table_add_row(
> + [size] + [n['mpps'][size] for n in
> + self.core_configs])
> +
> + dts.results_table_print()
> +
> + # Override etgen.dot1q function
> + def dot1q(self, port, prio, id, vlan, type):
> + """
> + Change Ixia configuration
> + """
> +
> + self.add_tcl_cmd("vlan config -mode vIncrement")
> + self.add_tcl_cmd("vlan config -step 1")
> + self.add_tcl_cmd("vlan config -repeat %d" % self.vlan_repeat)
> + self.add_tcl_cmd("stream config -framesize %d" %
> + TestVmdq.current_frame_size)
> + super(TestVmdq, self).dot1q(port, prio, id, vlan, type)
> +
> + def ether(self, port, src, dst, type):
> + """
> + Configure Ether protocal.
> + """
> + self.add_tcl_cmd("protocol config -ethernetType ethernetII")
> + self.add_tcl_cmd('stream config -sa "%s"' %
> self.macToTclFormat(src))
> + self.add_tcl_cmd('stream config -da "%s"' %
> self.macToTclFormat(dst))
> + self.add_tcl_cmd('stream config -daRepeatCounter increment')
> + self.add_tcl_cmd('stream config -daStep 1')
> + self.add_tcl_cmd('stream config -numDA %d' % self.da_repeat)
> +
> +
> --
> 2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH 1/2] Add updated vmdq test suite.
2015-09-15 9:09 ` Xu, Qian Q
@ 2015-09-15 10:33 ` Xu, HuilongX
2015-09-15 11:47 ` Xu, Qian Q
0 siblings, 1 reply; 8+ messages in thread
From: Xu, HuilongX @ 2015-09-15 10:33 UTC (permalink / raw)
To: Xu, Qian Q, dts
Hi qian,
Would need add vmdq function test case, or only run performance test?
If only run performance test, I think not need add in execution files.
I suggest you can add a new execution file for performance test.
Thanks a lot
> -----Original Message-----
> From: Xu, Qian Q
> Sent: Tuesday, September 15, 2015 5:09 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: RE: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Huilong
> It's a performance test, do you want to test?
>
> Thanks
> Qian
>
>
> -----Original Message-----
> From: Xu, HuilongX
> Sent: Tuesday, September 15, 2015 4:45 PM
> To: Xu, Qian Q; dts@dpdk.org
> Subject: RE: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Hi qian,
> Could you add this test in execution.conf and execution_FVL.conf for
> Niantic and FVL NIC test?
> Thanks a lot
>
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu
> > Sent: Tuesday, September 15, 2015 2:35 PM
> > To: dts@dpdk.org
> > Subject: [dts] [PATCH 1/2] Add updated vmdq test suite.
> >
> > Updated vmdq test suite, and it works for both FVL and Niantic. The
> > major changes are as below:
> > 1. Support FVL 4x10g, 2x10g, 2x40g.
> > 2. Update the traffic to make the MAC address and VLAN id changes
> together.
> > Then the packet loss is 0 at low traffic.
> > 3. Set the max pools number for major NICs: FVL 40G, 10G, Niantic, 1G.
> > 4. Update the core config.
> >
> > Signed-off-by: Qian Xu <qian.q.xu@intel.com>
> >
> > diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py new
> > file mode 100644 index 0000000..5949bce
> > --- /dev/null
> > +++ b/tests/TestSuite_vmdq.py
> > @@ -0,0 +1,262 @@
> > +# <COPYRIGHT_TAG>
> > +
> > +"""
> > +DPDK Test suite.
> > +
> > +Tests for vmdq.
> > +
> > +"""
> > +
> > +import dts
> > +import re
> > +from etgen import IxiaPacketGenerator from test_case import TestCase
> > +from time import sleep
> > +
> > +
> > +class TestVmdq(TestCase, IxiaPacketGenerator):
> > + dut_ports = []
> > + ip_dot1q_header_size = 22
> > + default_framesize = 64
> > + default_payload = default_framesize - ip_dot1q_header_size
> > + current_frame_size = 0
> > + destmac_port0 = "52:54:00:12:00:00"
> > + destmac_port1 = "52:54:00:12:01:00"
> > + da_repeat = 1
> > + vlan_repeat = 1
> > + queues = 8
> > +
> > + def set_up_all(self):
> > + """
> > + Run at the start of each test suite.
> > + """
> > +
> > + self.tester.extend_external_packet_generator(TestVmdq, self)
> > +
> > + self.dut.send_expect("sed -i
> > 's/CONFIG_RTE_MAX_QUEUES_PER_PORT=256/CONFIG_RTE_MAX_QUEUES_PER_PORT=1
> > 024/
> > ' ./config/common_linuxapp", "# ", 5)
> > +
> > + self.dut.build_install_dpdk(self.target)
> > + # Update the max queue per port for Fortville.
> > + self.dut.send_expect("sed -i 's/define MAX_QUEUES 128/define
> > MAX_QUEUES 1024/' ./examples/vmdq/main.c", "#", 5)
> > +
> > + self.dut_ports = self.dut.get_ports(self.nic)
> > + print self.dut_ports
> > + self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> > +
> > + self.core_configs = []
> > + self.core_configs.append({'cores': '1S/1C/1T', 'mpps': {}})
> > + self.core_configs.append({'cores': '1S/2C/1T', 'mpps': {}})
> > + self.core_configs.append({'cores': '1S/2C/2T', 'mpps': {}})
> > + self.core_configs.append({'cores': '1S/4C/1T', 'mpps': {}})
> > +
> > + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
> > + out = self.dut.send_expect("make -C examples/vmdq", "#", 10)
> > + self.verify("Error" not in out, "Compilation error")
> > +
> > +
> > + def validateApproxEqual(self, lines):
> > + """
> > + Check that all the rx queue stats are within a 30% range.
> > + """
> > +
> > + minimum = 1000000
> > + maximun = 0
> > +
> > + # Need to use Python re package because dts.regexp only
> > + handles 1
> > group,
> > + # we need 4.
> > + scanner = re.compile(
> > + "^Pool [0-9]+: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$")
> > + for l in lines:
> > + m = scanner.search(l)
> > + if m is None:
> > + # Line at the end, "Finished handling signal", ignore
> > + pass
> > + else:
> > + for stat in m.groups():
> > + if stat < minimum:
> > + minimum = stat
> > + if stat > maximun:
> > + maximun = stat
> > + self.verify(maximun - minimum <= minimum *
> > + 0.3, "Too wide variation in queue stats")
> > +
> > + def Npools_128queues(self, npools):
> > + """
> > + MAX queues is 128
> > + queues/pools = 128/npools
> > + """
> > +
> > + TestVmdq.current_frame_size = TestVmdq.default_framesize
> > +
> > + self.dut_ports = self.dut.get_ports(self.nic)
> > +
> > + core_list = self.dut.get_core_list("1S/4C/1T",
> > socket=self.ports_socket)
> > + core_mask = dts.create_mask(core_list)
> > +
> > + port_mask = dts.create_mask([self.dut_ports[0],
> > self.dut_ports[1]])
> > + # Run the application
> > + out = self.dut.send_expect("./examples/vmdq/build/vmdq_app -n
> > + 4 -
> > c %s -- -p %s --nb-pools %s&" %
> > + (core_mask, port_mask,
> > + str(npools)),
> > "reading queues", 120)
> > +
> > + # Transmit traffic
> > + tx_port = self.tester.get_local_port(self.dut_ports[0])
> > + rx_port = self.tester.get_local_port(self.dut_ports[1])
> > + tx_mac = self.tester.get_mac(tx_port)
> > +
> > + self.vlan_repeat = npools
> > + self.da_repeat = npools
> > + tgen_input = []
> > + for p in range(8):
> > + self.tester.scapy_append('dmac="%s"' % self.destmac_port0)
> > + self.tester.scapy_append('smac="%s"' % tx_mac)
> > + self.tester.scapy_append(
> > + 'flows = [Ether(src=smac,
> > dst=dmac)/Dot1Q(vlan=0,prio=%d)]'%p)
> > + self.tester.scapy_append('wrpcap("test%d.pcap", flows)' %p)
> > + self.tester.scapy_execute()
> > + tgen_input.append((tx_port, rx_port, "test%d.pcap" %p))
> > +
> > + loss = self.tester.traffic_generator_loss(tgen_input, 10)
> > + print "loss is %s !" % loss
> > +
> > + # Verify the accurate
> > + self.verify(loss < 0.001, "Excessive packet loss")
> > + self.validateApproxEqual(out.split("\r\n"))
> > +
> > + def set_up(self):
> > + """
> > + Run before each test case.
> > + """
> > + self.dut.kill_all()
> > +
> > + def test_perf_vmdq_64pools_queues(self):
> > + """
> > + This function call " Npools_128queues" with differen number
> > + of pools. Details see below. if not sure, set it as 8 pools.
> > + """
> > + if self.nic in ("niantic", "springfountain"):
> > + self.Npools_128queues(64)
> > + elif self.nic in ("fortville_spirit",
> "fortville_spirit_single"):
> > + self.Npools_128queues(63)
> > + elif self.nic in ("fortville_eagle"):
> > + self.Npools_128queues(34)
> > + else:
> > + self.Npools_128queues(8)
> > +
> > + def test_perf_vmdq_performance(self):
> > + """
> > + Try different configuration and different packe size
> > + """
> > +
> > + self.tester.get_interface(
> > + self.tester.get_local_port(self.dut_ports[0]))
> > +
> > + frame_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
> > + for config in self.core_configs:
> > +
> > + print dts.BLUE(config["cores"])
> > + self.dut.kill_all()
> > +
> > + core_config = config['cores']
> > + core_list =
> > self.dut.get_core_list(core_config,socket=self.ports_socket)
> > + core_mask = dts.create_mask(core_list)
> > + portmask = dts.create_mask(self.dut.get_ports())
> > + if self.nic in ("niantic", "springfountain"):
> > + self.queues = 64
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 64&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > + elif self.nic in ("fortville_spirit",
> > "fortville_spirit_single"):
> > + self.queues = 63
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 63&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > + elif self.nic in ("fortville_eagle"):
> > + self.queues = 34
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 34&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > + else:
> > + self.queues = 8
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 8&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > +
> > + tx_port = self.tester.get_local_port(self.dut_ports[0])
> > + rx_port = self.tester.get_local_port(self.dut_ports[1])
> > +
> > + print dts.GREEN("Waiting for application to initialize")
> > + sleep(5)
> > +
> > + for frame_size in frame_sizes:
> > +
> > + TestVmdq.current_frame_size = frame_size
> > +
> > + print dts.BLUE(str(frame_size))
> > +
> > + self.tester.scapy_append('dstmac="%s"' %
> > self.destmac_port0)
> > + tx_mac = self.tester.get_mac(tx_port)
> > + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> > + self.tester.scapy_append(
> > + 'flows =
> > [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> > + (frame_size - TestVmdq.ip_dot1q_header_size))
> > + self.tester.scapy_append('wrpcap("test1.pcap", flows)')
> > + self.tester.scapy_execute()
> > +
> > + self.tester.scapy_append('dstmac="%s"' %
> > self.destmac_port1)
> > + tx_mac = self.tester.get_mac(rx_port)
> > + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> > + self.tester.scapy_append(
> > + 'flows =
> > [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> > + (frame_size - TestVmdq.ip_dot1q_header_size))
> > + self.tester.scapy_append('wrpcap("test2.pcap", flows)')
> > + self.tester.scapy_execute()
> > +
> > + self.vlan_repeat = self.queues
> > + self.da_repeat = self.queues
> > +
> > + tgen_input = []
> > + tgen_input.append((tx_port, rx_port, "test1.pcap"))
> > + tgen_input.append((rx_port, tx_port, "test2.pcap"))
> > + _, pps =
> > self.tester.traffic_generator_throughput(tgen_input)
> > + config['mpps'][frame_size] = pps/1000000.0
> > +
> > + for n in range(len(self.core_configs)):
> > + for size in frame_sizes:
> > + self.verify(
> > + self.core_configs[n]['mpps'][size] is not 0, "No
> > traffic detected")
> > +
> > + # Print results
> > + dts.results_table_add_header(
> > + ['Frame size'] + [n['cores'] for n in self.core_configs])
> > +
> > + for size in frame_sizes:
> > + dts.results_table_add_row(
> > + [size] + [n['mpps'][size] for n in
> > + self.core_configs])
> > +
> > + dts.results_table_print()
> > +
> > + # Override etgen.dot1q function
> > + def dot1q(self, port, prio, id, vlan, type):
> > + """
> > + Change Ixia configuration
> > + """
> > +
> > + self.add_tcl_cmd("vlan config -mode vIncrement")
> > + self.add_tcl_cmd("vlan config -step 1")
> > + self.add_tcl_cmd("vlan config -repeat %d" % self.vlan_repeat)
> > + self.add_tcl_cmd("stream config -framesize %d" %
> > + TestVmdq.current_frame_size)
> > + super(TestVmdq, self).dot1q(port, prio, id, vlan, type)
> > +
> > + def ether(self, port, src, dst, type):
> > + """
> > + Configure Ether protocal.
> > + """
> > + self.add_tcl_cmd("protocol config -ethernetType ethernetII")
> > + self.add_tcl_cmd('stream config -sa "%s"' %
> > self.macToTclFormat(src))
> > + self.add_tcl_cmd('stream config -da "%s"' %
> > self.macToTclFormat(dst))
> > + self.add_tcl_cmd('stream config -daRepeatCounter increment')
> > + self.add_tcl_cmd('stream config -daStep 1')
> > + self.add_tcl_cmd('stream config -numDA %d' % self.da_repeat)
> > +
> > +
> > --
> > 2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH 1/2] Add updated vmdq test suite.
2015-09-15 10:33 ` Xu, HuilongX
@ 2015-09-15 11:47 ` Xu, Qian Q
0 siblings, 0 replies; 8+ messages in thread
From: Xu, Qian Q @ 2015-09-15 11:47 UTC (permalink / raw)
To: Xu, HuilongX, dts
Thx, right now I think performance is enough since it will cover base VMDQ rx functions. As to the performance execution file, it's not hard, but there are still some perf scripts need to be checked or updated, when all perf test scripts updated, then it's easy to have an execution file for perf test. Currently Heng has a local perf execution file but not checked in.
Thanks
Qian
-----Original Message-----
From: Xu, HuilongX
Sent: Tuesday, September 15, 2015 6:33 PM
To: Xu, Qian Q; dts@dpdk.org
Subject: RE: [dts] [PATCH 1/2] Add updated vmdq test suite.
Hi qian,
Would need add vmdq function test case, or only run performance test?
If only run performance test, I think not need add in execution files.
I suggest you can add a new execution file for performance test.
Thanks a lot
> -----Original Message-----
> From: Xu, Qian Q
> Sent: Tuesday, September 15, 2015 5:09 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: RE: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Huilong
> It's a performance test, do you want to test?
>
> Thanks
> Qian
>
>
> -----Original Message-----
> From: Xu, HuilongX
> Sent: Tuesday, September 15, 2015 4:45 PM
> To: Xu, Qian Q; dts@dpdk.org
> Subject: RE: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Hi qian,
> Could you add this test in execution.conf and execution_FVL.conf for
> Niantic and FVL NIC test?
> Thanks a lot
>
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu
> > Sent: Tuesday, September 15, 2015 2:35 PM
> > To: dts@dpdk.org
> > Subject: [dts] [PATCH 1/2] Add updated vmdq test suite.
> >
> > Updated vmdq test suite, and it works for both FVL and Niantic. The
> > major changes are as below:
> > 1. Support FVL 4x10g, 2x10g, 2x40g.
> > 2. Update the traffic to make the MAC address and VLAN id changes
> together.
> > Then the packet loss is 0 at low traffic.
> > 3. Set the max pools number for major NICs: FVL 40G, 10G, Niantic, 1G.
> > 4. Update the core config.
> >
> > Signed-off-by: Qian Xu <qian.q.xu@intel.com>
> >
> > diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py new
> > file mode 100644 index 0000000..5949bce
> > --- /dev/null
> > +++ b/tests/TestSuite_vmdq.py
> > @@ -0,0 +1,262 @@
> > +# <COPYRIGHT_TAG>
> > +
> > +"""
> > +DPDK Test suite.
> > +
> > +Tests for vmdq.
> > +
> > +"""
> > +
> > +import dts
> > +import re
> > +from etgen import IxiaPacketGenerator from test_case import
> > +TestCase from time import sleep
> > +
> > +
> > +class TestVmdq(TestCase, IxiaPacketGenerator):
> > + dut_ports = []
> > + ip_dot1q_header_size = 22
> > + default_framesize = 64
> > + default_payload = default_framesize - ip_dot1q_header_size
> > + current_frame_size = 0
> > + destmac_port0 = "52:54:00:12:00:00"
> > + destmac_port1 = "52:54:00:12:01:00"
> > + da_repeat = 1
> > + vlan_repeat = 1
> > + queues = 8
> > +
> > + def set_up_all(self):
> > + """
> > + Run at the start of each test suite.
> > + """
> > +
> > + self.tester.extend_external_packet_generator(TestVmdq,
> > + self)
> > +
> > + self.dut.send_expect("sed -i
> > 's/CONFIG_RTE_MAX_QUEUES_PER_PORT=256/CONFIG_RTE_MAX_QUEUES_PER_PORT
> > =1
> > 024/
> > ' ./config/common_linuxapp", "# ", 5)
> > +
> > + self.dut.build_install_dpdk(self.target)
> > + # Update the max queue per port for Fortville.
> > + self.dut.send_expect("sed -i 's/define MAX_QUEUES
> > + 128/define
> > MAX_QUEUES 1024/' ./examples/vmdq/main.c", "#", 5)
> > +
> > + self.dut_ports = self.dut.get_ports(self.nic)
> > + print self.dut_ports
> > + self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> > +
> > + self.core_configs = []
> > + self.core_configs.append({'cores': '1S/1C/1T', 'mpps': {}})
> > + self.core_configs.append({'cores': '1S/2C/1T', 'mpps': {}})
> > + self.core_configs.append({'cores': '1S/2C/2T', 'mpps': {}})
> > + self.core_configs.append({'cores': '1S/4C/1T', 'mpps': {}})
> > +
> > + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
> > + out = self.dut.send_expect("make -C examples/vmdq", "#", 10)
> > + self.verify("Error" not in out, "Compilation error")
> > +
> > +
> > + def validateApproxEqual(self, lines):
> > + """
> > + Check that all the rx queue stats are within a 30% range.
> > + """
> > +
> > + minimum = 1000000
> > + maximun = 0
> > +
> > + # Need to use Python re package because dts.regexp only
> > + handles 1
> > group,
> > + # we need 4.
> > + scanner = re.compile(
> > + "^Pool [0-9]+: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$")
> > + for l in lines:
> > + m = scanner.search(l)
> > + if m is None:
> > + # Line at the end, "Finished handling signal", ignore
> > + pass
> > + else:
> > + for stat in m.groups():
> > + if stat < minimum:
> > + minimum = stat
> > + if stat > maximun:
> > + maximun = stat
> > + self.verify(maximun - minimum <= minimum *
> > + 0.3, "Too wide variation in queue stats")
> > +
> > + def Npools_128queues(self, npools):
> > + """
> > + MAX queues is 128
> > + queues/pools = 128/npools
> > + """
> > +
> > + TestVmdq.current_frame_size = TestVmdq.default_framesize
> > +
> > + self.dut_ports = self.dut.get_ports(self.nic)
> > +
> > + core_list = self.dut.get_core_list("1S/4C/1T",
> > socket=self.ports_socket)
> > + core_mask = dts.create_mask(core_list)
> > +
> > + port_mask = dts.create_mask([self.dut_ports[0],
> > self.dut_ports[1]])
> > + # Run the application
> > + out = self.dut.send_expect("./examples/vmdq/build/vmdq_app
> > + -n
> > + 4 -
> > c %s -- -p %s --nb-pools %s&" %
> > + (core_mask, port_mask,
> > + str(npools)),
> > "reading queues", 120)
> > +
> > + # Transmit traffic
> > + tx_port = self.tester.get_local_port(self.dut_ports[0])
> > + rx_port = self.tester.get_local_port(self.dut_ports[1])
> > + tx_mac = self.tester.get_mac(tx_port)
> > +
> > + self.vlan_repeat = npools
> > + self.da_repeat = npools
> > + tgen_input = []
> > + for p in range(8):
> > + self.tester.scapy_append('dmac="%s"' % self.destmac_port0)
> > + self.tester.scapy_append('smac="%s"' % tx_mac)
> > + self.tester.scapy_append(
> > + 'flows = [Ether(src=smac,
> > dst=dmac)/Dot1Q(vlan=0,prio=%d)]'%p)
> > + self.tester.scapy_append('wrpcap("test%d.pcap", flows)' %p)
> > + self.tester.scapy_execute()
> > + tgen_input.append((tx_port, rx_port, "test%d.pcap" %p))
> > +
> > + loss = self.tester.traffic_generator_loss(tgen_input, 10)
> > + print "loss is %s !" % loss
> > +
> > + # Verify the accurate
> > + self.verify(loss < 0.001, "Excessive packet loss")
> > + self.validateApproxEqual(out.split("\r\n"))
> > +
> > + def set_up(self):
> > + """
> > + Run before each test case.
> > + """
> > + self.dut.kill_all()
> > +
> > + def test_perf_vmdq_64pools_queues(self):
> > + """
> > + This function call " Npools_128queues" with differen number
> > + of pools. Details see below. if not sure, set it as 8 pools.
> > + """
> > + if self.nic in ("niantic", "springfountain"):
> > + self.Npools_128queues(64)
> > + elif self.nic in ("fortville_spirit",
> "fortville_spirit_single"):
> > + self.Npools_128queues(63)
> > + elif self.nic in ("fortville_eagle"):
> > + self.Npools_128queues(34)
> > + else:
> > + self.Npools_128queues(8)
> > +
> > + def test_perf_vmdq_performance(self):
> > + """
> > + Try different configuration and different packe size
> > + """
> > +
> > + self.tester.get_interface(
> > + self.tester.get_local_port(self.dut_ports[0]))
> > +
> > + frame_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
> > + for config in self.core_configs:
> > +
> > + print dts.BLUE(config["cores"])
> > + self.dut.kill_all()
> > +
> > + core_config = config['cores']
> > + core_list =
> > self.dut.get_core_list(core_config,socket=self.ports_socket)
> > + core_mask = dts.create_mask(core_list)
> > + portmask = dts.create_mask(self.dut.get_ports())
> > + if self.nic in ("niantic", "springfountain"):
> > + self.queues = 64
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 64&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > + elif self.nic in ("fortville_spirit",
> > "fortville_spirit_single"):
> > + self.queues = 63
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 63&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > + elif self.nic in ("fortville_eagle"):
> > + self.queues = 34
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 34&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > + else:
> > + self.queues = 8
> > + self.dut.send_expect(
> > + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> > + %s --
> > nb-pools 8&" %
> > + (self.dut.get_memory_channels(), core_mask,
> > + portmask),
> > "reading queues", 30)
> > +
> > + tx_port = self.tester.get_local_port(self.dut_ports[0])
> > + rx_port = self.tester.get_local_port(self.dut_ports[1])
> > +
> > + print dts.GREEN("Waiting for application to initialize")
> > + sleep(5)
> > +
> > + for frame_size in frame_sizes:
> > +
> > + TestVmdq.current_frame_size = frame_size
> > +
> > + print dts.BLUE(str(frame_size))
> > +
> > + self.tester.scapy_append('dstmac="%s"' %
> > self.destmac_port0)
> > + tx_mac = self.tester.get_mac(tx_port)
> > + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> > + self.tester.scapy_append(
> > + 'flows =
> > [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> > + (frame_size - TestVmdq.ip_dot1q_header_size))
> > + self.tester.scapy_append('wrpcap("test1.pcap", flows)')
> > + self.tester.scapy_execute()
> > +
> > + self.tester.scapy_append('dstmac="%s"' %
> > self.destmac_port1)
> > + tx_mac = self.tester.get_mac(rx_port)
> > + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> > + self.tester.scapy_append(
> > + 'flows =
> > [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> > + (frame_size - TestVmdq.ip_dot1q_header_size))
> > + self.tester.scapy_append('wrpcap("test2.pcap", flows)')
> > + self.tester.scapy_execute()
> > +
> > + self.vlan_repeat = self.queues
> > + self.da_repeat = self.queues
> > +
> > + tgen_input = []
> > + tgen_input.append((tx_port, rx_port, "test1.pcap"))
> > + tgen_input.append((rx_port, tx_port, "test2.pcap"))
> > + _, pps =
> > self.tester.traffic_generator_throughput(tgen_input)
> > + config['mpps'][frame_size] = pps/1000000.0
> > +
> > + for n in range(len(self.core_configs)):
> > + for size in frame_sizes:
> > + self.verify(
> > + self.core_configs[n]['mpps'][size] is not 0,
> > + "No
> > traffic detected")
> > +
> > + # Print results
> > + dts.results_table_add_header(
> > + ['Frame size'] + [n['cores'] for n in
> > + self.core_configs])
> > +
> > + for size in frame_sizes:
> > + dts.results_table_add_row(
> > + [size] + [n['mpps'][size] for n in
> > + self.core_configs])
> > +
> > + dts.results_table_print()
> > +
> > + # Override etgen.dot1q function
> > + def dot1q(self, port, prio, id, vlan, type):
> > + """
> > + Change Ixia configuration
> > + """
> > +
> > + self.add_tcl_cmd("vlan config -mode vIncrement")
> > + self.add_tcl_cmd("vlan config -step 1")
> > + self.add_tcl_cmd("vlan config -repeat %d" % self.vlan_repeat)
> > + self.add_tcl_cmd("stream config -framesize %d" %
> > + TestVmdq.current_frame_size)
> > + super(TestVmdq, self).dot1q(port, prio, id, vlan, type)
> > +
> > + def ether(self, port, src, dst, type):
> > + """
> > + Configure Ether protocal.
> > + """
> > + self.add_tcl_cmd("protocol config -ethernetType ethernetII")
> > + self.add_tcl_cmd('stream config -sa "%s"' %
> > self.macToTclFormat(src))
> > + self.add_tcl_cmd('stream config -da "%s"' %
> > self.macToTclFormat(dst))
> > + self.add_tcl_cmd('stream config -daRepeatCounter increment')
> > + self.add_tcl_cmd('stream config -daStep 1')
> > + self.add_tcl_cmd('stream config -numDA %d' %
> > + self.da_repeat)
> > +
> > +
> > --
> > 2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH 1/2] Add updated vmdq test suite.
2015-09-15 6:35 [dts] [PATCH 1/2] Add updated vmdq test suite Qian Xu
2015-09-15 6:35 ` [dts] [PATCH 2/2] Add updated test plan for vmdq Qian Xu
2015-09-15 8:44 ` [dts] [PATCH 1/2] Add updated vmdq test suite Xu, HuilongX
@ 2015-09-16 2:06 ` Liu, Yong
2015-09-16 2:14 ` Xu, Qian Q
2 siblings, 1 reply; 8+ messages in thread
From: Liu, Yong @ 2015-09-16 2:06 UTC (permalink / raw)
To: Xu, Qian Q, dts
Qian, few questions for the code.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu
> Sent: Tuesday, September 15, 2015 2:35 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Updated vmdq test suite, and it works for both FVL and Niantic. The major
> changes are as below:
> 1. Support FVL 4x10g, 2x10g, 2x40g.
> 2. Update the traffic to make the MAC address and VLAN id changes together.
> Then the packet loss is 0 at low traffic.
> 3. Set the max pools number for major NICs: FVL 40G, 10G, Niantic, 1G.
> 4. Update the core config.
>
> Signed-off-by: Qian Xu <qian.q.xu@intel.com>
>
> diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py
> new file mode 100644
> index 0000000..5949bce
> --- /dev/null
> +++ b/tests/TestSuite_vmdq.py
> @@ -0,0 +1,262 @@
> +# <COPYRIGHT_TAG>
> +
> +"""
> +DPDK Test suite.
> +
> +Tests for vmdq.
> +
> +"""
> +
> +import dts
> +import re
> +from etgen import IxiaPacketGenerator
> +from test_case import TestCase
> +from time import sleep
> +
> +
> +class TestVmdq(TestCase, IxiaPacketGenerator):
> + dut_ports = []
> + ip_dot1q_header_size = 22
> + default_framesize = 64
> + default_payload = default_framesize - ip_dot1q_header_size
> + current_frame_size = 0
> + destmac_port0 = "52:54:00:12:00:00"
> + destmac_port1 = "52:54:00:12:01:00"
> + da_repeat = 1
> + vlan_repeat = 1
> + queues = 8
> +
> + def set_up_all(self):
> + """
> + Run at the start of each test suite.
> + """
> +
> + self.tester.extend_external_packet_generator(TestVmdq, self)
> +
> + self.dut.send_expect("sed -i
> 's/CONFIG_RTE_MAX_QUEUES_PER_PORT=256/CONFIG_RTE_MAX_QUEUES_PER_PORT=1024/
> ' ./config/common_linuxapp", "# ", 5)
> +
> + self.dut.build_install_dpdk(self.target)
> + # Update the max queue per port for Fortville.
> + self.dut.send_expect("sed -i 's/define MAX_QUEUES 128/define
> MAX_QUEUES 1024/' ./examples/vmdq/main.c", "#", 5)
> +
> + self.dut_ports = self.dut.get_ports(self.nic)
> + print self.dut_ports
> + self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> +
> + self.core_configs = []
> + self.core_configs.append({'cores': '1S/1C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/2T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/4C/1T', 'mpps': {}})
> +
> + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
> + out = self.dut.send_expect("make -C examples/vmdq", "#", 10)
> + self.verify("Error" not in out, "Compilation error")
> +
> +
> + def validateApproxEqual(self, lines):
> + """
> + Check that all the rx queue stats are within a 30% range.
> + """
> +
> + minimum = 1000000
> + maximun = 0
> +
> + # Need to use Python re package because dts.regexp only handles 1
> group,
> + # we need 4.
> + scanner = re.compile(
> + "^Pool [0-9]+: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$")
> + for l in lines:
> + m = scanner.search(l)
> + if m is None:
> + # Line at the end, "Finished handling signal", ignore
> + pass
> + else:
> + for stat in m.groups():
> + if stat < minimum:
> + minimum = stat
> + if stat > maximun:
> + maximun = stat
> + self.verify(maximun - minimum <= minimum *
> + 0.3, "Too wide variation in queue stats")
> +
> + def Npools_128queues(self, npools):
> + """
> + MAX queues is 128
> + queues/pools = 128/npools
> + """
> +
> + TestVmdq.current_frame_size = TestVmdq.default_framesize
> +
Qian, why not just use self.current_frame_size, this will change module default element.
> + self.dut_ports = self.dut.get_ports(self.nic)
> +
> + core_list = self.dut.get_core_list("1S/4C/1T",
> socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> +
> + port_mask = dts.create_mask([self.dut_ports[0],
> self.dut_ports[1]])
> + # Run the application
> + out = self.dut.send_expect("./examples/vmdq/build/vmdq_app -n 4 -
> c %s -- -p %s --nb-pools %s&" %
> + (core_mask, port_mask, str(npools)),
> "reading queues", 120)
> +
> + # Transmit traffic
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> + tx_mac = self.tester.get_mac(tx_port)
> +
> + self.vlan_repeat = npools
> + self.da_repeat = npools
> + tgen_input = []
> + for p in range(8):
> + self.tester.scapy_append('dmac="%s"' % self.destmac_port0)
> + self.tester.scapy_append('smac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows = [Ether(src=smac,
> dst=dmac)/Dot1Q(vlan=0,prio=%d)]'%p)
> + self.tester.scapy_append('wrpcap("test%d.pcap", flows)' %p)
> + self.tester.scapy_execute()
> + tgen_input.append((tx_port, rx_port, "test%d.pcap" %p))
> +
> + loss = self.tester.traffic_generator_loss(tgen_input, 10)
> + print "loss is %s !" % loss
> +
Look like unaligned code here.
> + # Verify the accurate
> + self.verify(loss < 0.001, "Excessive packet loss")
> + self.validateApproxEqual(out.split("\r\n"))
> +
> + def set_up(self):
> + """
> + Run before each test case.
> + """
> + self.dut.kill_all()
> +
> + def test_perf_vmdq_64pools_queues(self):
> + """
> + This function call " Npools_128queues" with differen number
> + of pools. Details see below. if not sure, set it as 8 pools.
> + """
> + if self.nic in ("niantic", "springfountain"):
> + self.Npools_128queues(64)
> + elif self.nic in ("fortville_spirit", "fortville_spirit_single"):
> + self.Npools_128queues(63)
> + elif self.nic in ("fortville_eagle"):
> + self.Npools_128queues(34)
> + else:
> + self.Npools_128queues(8)
> +
> + def test_perf_vmdq_performance(self):
> + """
> + Try different configuration and different packe size
> + """
> +
> + self.tester.get_interface(
> + self.tester.get_local_port(self.dut_ports[0]))
> +
> + frame_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
> + for config in self.core_configs:
> +
> + print dts.BLUE(config["cores"])
> + self.dut.kill_all()
> +
> + core_config = config['cores']
> + core_list =
> self.dut.get_core_list(core_config,socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> + portmask = dts.create_mask(self.dut.get_ports())
> + if self.nic in ("niantic", "springfountain"):
> + self.queues = 64
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 64&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_spirit",
> "fortville_spirit_single"):
> + self.queues = 63
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 63&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_eagle"):
> + self.queues = 34
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 34&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> + else:
> + self.queues = 8
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p %s --
> nb-pools 8&" %
> + (self.dut.get_memory_channels(), core_mask, portmask),
> "reading queues", 30)
> +
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> +
> + print dts.GREEN("Waiting for application to initialize")
> + sleep(5)
> +
> + for frame_size in frame_sizes:
> +
> + TestVmdq.current_frame_size = frame_size
> +
> + print dts.BLUE(str(frame_size))
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port0)
> + tx_mac = self.tester.get_mac(tx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test1.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port1)
> + tx_mac = self.tester.get_mac(rx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test2.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.vlan_repeat = self.queues
> + self.da_repeat = self.queues
> +
> + tgen_input = []
> + tgen_input.append((tx_port, rx_port, "test1.pcap"))
> + tgen_input.append((rx_port, tx_port, "test2.pcap"))
> + _, pps =
> self.tester.traffic_generator_throughput(tgen_input)
> + config['mpps'][frame_size] = pps/1000000.0
> +
> + for n in range(len(self.core_configs)):
> + for size in frame_sizes:
> + self.verify(
> + self.core_configs[n]['mpps'][size] is not 0, "No
> traffic detected")
> +
> + # Print results
> + dts.results_table_add_header(
> + ['Frame size'] + [n['cores'] for n in self.core_configs])
> +
> + for size in frame_sizes:
> + dts.results_table_add_row(
> + [size] + [n['mpps'][size] for n in self.core_configs])
> +
> + dts.results_table_print()
> +
> + # Override etgen.dot1q function
> + def dot1q(self, port, prio, id, vlan, type):
> + """
> + Change Ixia configuration
> + """
> +
> + self.add_tcl_cmd("vlan config -mode vIncrement")
> + self.add_tcl_cmd("vlan config -step 1")
> + self.add_tcl_cmd("vlan config -repeat %d" % self.vlan_repeat)
> + self.add_tcl_cmd("stream config -framesize %d" %
> + TestVmdq.current_frame_size)
> + super(TestVmdq, self).dot1q(port, prio, id, vlan, type)
> +
> + def ether(self, port, src, dst, type):
> + """
> + Configure Ether protocal.
> + """
> + self.add_tcl_cmd("protocol config -ethernetType ethernetII")
> + self.add_tcl_cmd('stream config -sa "%s"' %
> self.macToTclFormat(src))
> + self.add_tcl_cmd('stream config -da "%s"' %
> self.macToTclFormat(dst))
> + self.add_tcl_cmd('stream config -daRepeatCounter increment')
> + self.add_tcl_cmd('stream config -daStep 1')
> + self.add_tcl_cmd('stream config -numDA %d' % self.da_repeat)
> +
> +
> --
> 2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH 1/2] Add updated vmdq test suite.
2015-09-16 2:06 ` Liu, Yong
@ 2015-09-16 2:14 ` Xu, Qian Q
0 siblings, 0 replies; 8+ messages in thread
From: Xu, Qian Q @ 2015-09-16 2:14 UTC (permalink / raw)
To: Liu, Yong, dts
In fact all these codes are the original code, I didn't change it. I can update it and send v2 patch.
Thanks
Qian
-----Original Message-----
From: Liu, Yong
Sent: Wednesday, September 16, 2015 10:06 AM
To: Xu, Qian Q; dts@dpdk.org
Subject: RE: [dts] [PATCH 1/2] Add updated vmdq test suite.
Qian, few questions for the code.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu
> Sent: Tuesday, September 15, 2015 2:35 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH 1/2] Add updated vmdq test suite.
>
> Updated vmdq test suite, and it works for both FVL and Niantic. The
> major changes are as below:
> 1. Support FVL 4x10g, 2x10g, 2x40g.
> 2. Update the traffic to make the MAC address and VLAN id changes together.
> Then the packet loss is 0 at low traffic.
> 3. Set the max pools number for major NICs: FVL 40G, 10G, Niantic, 1G.
> 4. Update the core config.
>
> Signed-off-by: Qian Xu <qian.q.xu@intel.com>
>
> diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py new
> file mode 100644 index 0000000..5949bce
> --- /dev/null
> +++ b/tests/TestSuite_vmdq.py
> @@ -0,0 +1,262 @@
> +# <COPYRIGHT_TAG>
> +
> +"""
> +DPDK Test suite.
> +
> +Tests for vmdq.
> +
> +"""
> +
> +import dts
> +import re
> +from etgen import IxiaPacketGenerator from test_case import TestCase
> +from time import sleep
> +
> +
> +class TestVmdq(TestCase, IxiaPacketGenerator):
> + dut_ports = []
> + ip_dot1q_header_size = 22
> + default_framesize = 64
> + default_payload = default_framesize - ip_dot1q_header_size
> + current_frame_size = 0
> + destmac_port0 = "52:54:00:12:00:00"
> + destmac_port1 = "52:54:00:12:01:00"
> + da_repeat = 1
> + vlan_repeat = 1
> + queues = 8
> +
> + def set_up_all(self):
> + """
> + Run at the start of each test suite.
> + """
> +
> + self.tester.extend_external_packet_generator(TestVmdq, self)
> +
> + self.dut.send_expect("sed -i
> 's/CONFIG_RTE_MAX_QUEUES_PER_PORT=256/CONFIG_RTE_MAX_QUEUES_PER_PORT=1
> 024/
> ' ./config/common_linuxapp", "# ", 5)
> +
> + self.dut.build_install_dpdk(self.target)
> + # Update the max queue per port for Fortville.
> + self.dut.send_expect("sed -i 's/define MAX_QUEUES 128/define
> MAX_QUEUES 1024/' ./examples/vmdq/main.c", "#", 5)
> +
> + self.dut_ports = self.dut.get_ports(self.nic)
> + print self.dut_ports
> + self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> +
> + self.core_configs = []
> + self.core_configs.append({'cores': '1S/1C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/1T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/2C/2T', 'mpps': {}})
> + self.core_configs.append({'cores': '1S/4C/1T', 'mpps': {}})
> +
> + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
> + out = self.dut.send_expect("make -C examples/vmdq", "#", 10)
> + self.verify("Error" not in out, "Compilation error")
> +
> +
> + def validateApproxEqual(self, lines):
> + """
> + Check that all the rx queue stats are within a 30% range.
> + """
> +
> + minimum = 1000000
> + maximun = 0
> +
> + # Need to use Python re package because dts.regexp only
> + handles 1
> group,
> + # we need 4.
> + scanner = re.compile(
> + "^Pool [0-9]+: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$")
> + for l in lines:
> + m = scanner.search(l)
> + if m is None:
> + # Line at the end, "Finished handling signal", ignore
> + pass
> + else:
> + for stat in m.groups():
> + if stat < minimum:
> + minimum = stat
> + if stat > maximun:
> + maximun = stat
> + self.verify(maximun - minimum <= minimum *
> + 0.3, "Too wide variation in queue stats")
> +
> + def Npools_128queues(self, npools):
> + """
> + MAX queues is 128
> + queues/pools = 128/npools
> + """
> +
> + TestVmdq.current_frame_size = TestVmdq.default_framesize
> +
Qian, why not just use self.current_frame_size, this will change module default element.
> + self.dut_ports = self.dut.get_ports(self.nic)
> +
> + core_list = self.dut.get_core_list("1S/4C/1T",
> socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> +
> + port_mask = dts.create_mask([self.dut_ports[0],
> self.dut_ports[1]])
> + # Run the application
> + out = self.dut.send_expect("./examples/vmdq/build/vmdq_app -n
> + 4 -
> c %s -- -p %s --nb-pools %s&" %
> + (core_mask, port_mask,
> + str(npools)),
> "reading queues", 120)
> +
> + # Transmit traffic
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> + tx_mac = self.tester.get_mac(tx_port)
> +
> + self.vlan_repeat = npools
> + self.da_repeat = npools
> + tgen_input = []
> + for p in range(8):
> + self.tester.scapy_append('dmac="%s"' % self.destmac_port0)
> + self.tester.scapy_append('smac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows = [Ether(src=smac,
> dst=dmac)/Dot1Q(vlan=0,prio=%d)]'%p)
> + self.tester.scapy_append('wrpcap("test%d.pcap", flows)' %p)
> + self.tester.scapy_execute()
> + tgen_input.append((tx_port, rx_port, "test%d.pcap" %p))
> +
> + loss = self.tester.traffic_generator_loss(tgen_input, 10)
> + print "loss is %s !" % loss
> +
Look like unaligned code here.
> + # Verify the accurate
> + self.verify(loss < 0.001, "Excessive packet loss")
> + self.validateApproxEqual(out.split("\r\n"))
> +
> + def set_up(self):
> + """
> + Run before each test case.
> + """
> + self.dut.kill_all()
> +
> + def test_perf_vmdq_64pools_queues(self):
> + """
> + This function call " Npools_128queues" with differen number
> + of pools. Details see below. if not sure, set it as 8 pools.
> + """
> + if self.nic in ("niantic", "springfountain"):
> + self.Npools_128queues(64)
> + elif self.nic in ("fortville_spirit", "fortville_spirit_single"):
> + self.Npools_128queues(63)
> + elif self.nic in ("fortville_eagle"):
> + self.Npools_128queues(34)
> + else:
> + self.Npools_128queues(8)
> +
> + def test_perf_vmdq_performance(self):
> + """
> + Try different configuration and different packe size
> + """
> +
> + self.tester.get_interface(
> + self.tester.get_local_port(self.dut_ports[0]))
> +
> + frame_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
> + for config in self.core_configs:
> +
> + print dts.BLUE(config["cores"])
> + self.dut.kill_all()
> +
> + core_config = config['cores']
> + core_list =
> self.dut.get_core_list(core_config,socket=self.ports_socket)
> + core_mask = dts.create_mask(core_list)
> + portmask = dts.create_mask(self.dut.get_ports())
> + if self.nic in ("niantic", "springfountain"):
> + self.queues = 64
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 64&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_spirit",
> "fortville_spirit_single"):
> + self.queues = 63
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 63&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> + elif self.nic in ("fortville_eagle"):
> + self.queues = 34
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 34&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> + else:
> + self.queues = 8
> + self.dut.send_expect(
> + "examples/vmdq/build/vmdq_app -n %d -c %s -- -p
> + %s --
> nb-pools 8&" %
> + (self.dut.get_memory_channels(), core_mask,
> + portmask),
> "reading queues", 30)
> +
> + tx_port = self.tester.get_local_port(self.dut_ports[0])
> + rx_port = self.tester.get_local_port(self.dut_ports[1])
> +
> + print dts.GREEN("Waiting for application to initialize")
> + sleep(5)
> +
> + for frame_size in frame_sizes:
> +
> + TestVmdq.current_frame_size = frame_size
> +
> + print dts.BLUE(str(frame_size))
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port0)
> + tx_mac = self.tester.get_mac(tx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test1.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.tester.scapy_append('dstmac="%s"' %
> self.destmac_port1)
> + tx_mac = self.tester.get_mac(rx_port)
> + self.tester.scapy_append('srcmac="%s"' % tx_mac)
> + self.tester.scapy_append(
> + 'flows =
> [Ether(src=srcmac,dst=dstmac)/Dot1Q(vlan=0)/("X"*%d)]' %
> + (frame_size - TestVmdq.ip_dot1q_header_size))
> + self.tester.scapy_append('wrpcap("test2.pcap", flows)')
> + self.tester.scapy_execute()
> +
> + self.vlan_repeat = self.queues
> + self.da_repeat = self.queues
> +
> + tgen_input = []
> + tgen_input.append((tx_port, rx_port, "test1.pcap"))
> + tgen_input.append((rx_port, tx_port, "test2.pcap"))
> + _, pps =
> self.tester.traffic_generator_throughput(tgen_input)
> + config['mpps'][frame_size] = pps/1000000.0
> +
> + for n in range(len(self.core_configs)):
> + for size in frame_sizes:
> + self.verify(
> + self.core_configs[n]['mpps'][size] is not 0, "No
> traffic detected")
> +
> + # Print results
> + dts.results_table_add_header(
> + ['Frame size'] + [n['cores'] for n in self.core_configs])
> +
> + for size in frame_sizes:
> + dts.results_table_add_row(
> + [size] + [n['mpps'][size] for n in
> + self.core_configs])
> +
> + dts.results_table_print()
> +
> + # Override etgen.dot1q function
> + def dot1q(self, port, prio, id, vlan, type):
> + """
> + Change Ixia configuration
> + """
> +
> + self.add_tcl_cmd("vlan config -mode vIncrement")
> + self.add_tcl_cmd("vlan config -step 1")
> + self.add_tcl_cmd("vlan config -repeat %d" % self.vlan_repeat)
> + self.add_tcl_cmd("stream config -framesize %d" %
> + TestVmdq.current_frame_size)
> + super(TestVmdq, self).dot1q(port, prio, id, vlan, type)
> +
> + def ether(self, port, src, dst, type):
> + """
> + Configure Ether protocal.
> + """
> + self.add_tcl_cmd("protocol config -ethernetType ethernetII")
> + self.add_tcl_cmd('stream config -sa "%s"' %
> self.macToTclFormat(src))
> + self.add_tcl_cmd('stream config -da "%s"' %
> self.macToTclFormat(dst))
> + self.add_tcl_cmd('stream config -daRepeatCounter increment')
> + self.add_tcl_cmd('stream config -daStep 1')
> + self.add_tcl_cmd('stream config -numDA %d' % self.da_repeat)
> +
> +
> --
> 2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-16 2:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15 6:35 [dts] [PATCH 1/2] Add updated vmdq test suite Qian Xu
2015-09-15 6:35 ` [dts] [PATCH 2/2] Add updated test plan for vmdq Qian Xu
2015-09-15 8:44 ` [dts] [PATCH 1/2] Add updated vmdq test suite Xu, HuilongX
2015-09-15 9:09 ` Xu, Qian Q
2015-09-15 10:33 ` Xu, HuilongX
2015-09-15 11:47 ` Xu, Qian Q
2015-09-16 2:06 ` Liu, Yong
2015-09-16 2:14 ` Xu, Qian Q
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).