* [dts] [v2, 1/5] generic_filter: remove perf test case
2021-08-04 14:41 [dts] [v2, 0/5] remove some run-down cases Lijuan Tu
@ 2021-08-04 14:41 ` Lijuan Tu
2021-08-04 14:41 ` [dts] [v2, 2/5] nvgre: remove perf test cases Lijuan Tu
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Lijuan Tu @ 2021-08-04 14:41 UTC (permalink / raw)
To: dts; +Cc: Lijuan Tu
the case is no longer maintained.
Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
test_plans/generic_filter_test_plan.rst | 107 --------------------------------
tests/TestSuite_generic_filter.py | 75 ----------------------
2 files changed, 182 deletions(-)
diff --git a/test_plans/generic_filter_test_plan.rst b/test_plans/generic_filter_test_plan.rst
index de02f62..fda54e0 100644
--- a/test_plans/generic_filter_test_plan.rst
+++ b/test_plans/generic_filter_test_plan.rst
@@ -522,110 +522,3 @@ Send packets(`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` =
sending packets. packets are received on the queue 64 and queue 127 When
setting 5-tuple Filter with queue(128), it will display failure because the
number of queues no more than 128.
-
-
-
-Test Case 11: 10G NIC Performance
-=================================
-
-This case is designed for Niantic. It provides the performance data with and
-without generic filter::
-
- Launch app without filter
- ./testpmd -c fffff -n 4 -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=16 --nb-ports=2
- testpmd> start
-
-Send the packets stream from packet generator::
-
- testpmd> quit
-
-Enable the filters on app::
-
- ./testpmd -c fffff -n 4 -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=16 --nb-ports=2
-
- testpmd>set stat_qmap rx 0 0 0
- testpmd>set stat_qmap rx 0 1 1
- testpmd>set stat_qmap rx 0 2 2
- testpmd>set stat_qmap rx 0 3 3
- testpmd>set flush_rx on
- testpmd> add_syn_filter 0 priority high queue 1
- testpmd> add_ethertype_filter 0 ethertype 0x0806 priority disable 0 queue 2 index 1
- testpmd> add_5tuple_filter 0 dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f flags 0x02 priority 3 queue 3 index 1
- testpmd> start
-
-Send the packets stream from packet generator::
-
- testpmd> quit
-
-
-+-------+---------+---------+
-| Frame | disable | enable |
-| Size | filter | filter |
-+-------+---------+---------+
-| 64 | | |
-+-------+---------+---------+
-| 128 | | |
-+-------+---------+---------+
-| 256 | | |
-+-------+---------+---------+
-| 512 | | |
-+-------+---------+---------+
-| 1024 | | |
-+-------+---------+---------+
-| 1280 | | |
-+-------+---------+---------+
-| 1518 | | |
-+-------+---------+---------+
-
-
-Test Case 12: 1G NIC Performance
-================================
-
-This case is designed for NIC (I350, 82580, and 82576). It provides the
-performance data with and without generic filter::
-
- ./testpmd -c fffff -n 4 -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=16 --nb-ports=2
- testpmd> start
-
-Send the packets stream from packet generator::
-
- testpmd> quit
-
-Enable the filter::
-
- ./testpmd -c fffff -n 4 -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=16 --nb-ports=2
-
- testpmd>set stat_qmap rx 0 0 0
- testpmd>set stat_qmap rx 0 1 1
- testpmd>set stat_qmap rx 0 2 2
- testpmd>set stat_qmap rx 0 3 3
- testpmd>set flush_rx on
- testpmd> add_syn_filter 0 priority high queue 1
- testpmd> add_ethertype_filter 0 ethertype 0x0806 priority disable 0 queue 2 index 1
- testpmd> start
-
-
-Send the packets stream from packet generator::
-
- testpmd> quit
-
-
-
-+-------+---------+---------+
-| Frame | disable | enable |
-| Size | filter | filter |
-+-------+---------+---------+
-| 64 | | |
-+-------+---------+---------+
-| 128 | | |
-+-------+---------+---------+
-| 256 | | |
-+-------+---------+---------+
-| 512 | | |
-+-------+---------+---------+
-| 1024 | | |
-+-------+---------+---------+
-| 1280 | | |
-+-------+---------+---------+
-| 1518 | | |
-+-------+---------+---------+
diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py
index b34c9dd..22f85bd 100644
--- a/tests/TestSuite_generic_filter.py
+++ b/tests/TestSuite_generic_filter.py
@@ -773,81 +773,6 @@ class TestGeneric_filter(TestCase):
else:
self.verify(False, "%s not support this test" % self.nic)
- def test_perf_generic_filter_perf(self):
- self.pmdout.start_testpmd(
- "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask)
- self.port_config()
- print(valports[0], valports[1])
- tx_port = self.tester.get_local_port(valports[0])
- tx_mac = self.dut.get_mac_address(valports[0])
- txItf = self.tester.get_interface(tx_port)
-
- rx_port = self.tester.get_local_port(valports[1])
- rxItf = self.tester.get_interface(rx_port)
- package_sizes = [64, 128, 256, 512, 1024, 1280, 1518]
- print(tx_mac)
- print(self.dut.ports_info[valports[0]], self.dut.ports_info[valports[1]])
- test_type = {
- "syn": ["syn_filter add 0 priority high queue 1", "syn_filter del 0 priority high queue 1"],
- "ethertype": ["add_ethertype_filter 0 ethertype 0x0806 priority disable 0 queue 2 index 1", "remove_ethertype_filter 0 index 1"],
- "5tuple": ["5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x02 priority 3 queue 3", "5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x02 priority 3 queue 3"]
- }
- stream_config = {
- "syn": 'Ether(dst="%s")/IP(src="2.2.2.5",dst="2.2.2.4")/TCP(dport=80,flags="S")/("X"*64)',
- "ethertype": 'Ether(dst="%s")/ARP(pdst="192.168.1.1")' % tx_mac,
- "5tuple": 'flows.append(Ether(dst="%s")/IP(src="2.2.2.4",dst="2.2.2.5")/TCP(sport=1,dport=1,flags=0)/("X"*%d))',
- }
- self.result_table_create(
- ['pack_size', "filter_type", "enable", "disable", "perf_compare"])
- for key in list(test_type.keys()):
- if "5tuple" != key:
- pps_lists = []
- for i in range(2):
- self.dut.send_expect(test_type[key][i], "testpmd> ", 15)
- self.dut.send_expect("start", "testpmd> ", 120)
- self.tester.scapy_append('flows = []')
- self.tester.scapy_append(
- 'flows.append(%s)' % stream_config[key])
- self.tester.scapy_append(
- 'wrpcap("generic_firlter.pcap",flows)')
- self.tester.scapy_execute()
- tgen_input = []
- tgen_input.append(
- (tx_port, rx_port, "generic_firlter.pcap"))
- _, pps = self.tester.traffic_generator_throughput(
- tgen_input)
- pps_lists.append(pps)
- self.result_table_add(
- ["defult", key, pps_lists[0], pps_lists[1], (pps_lists[0] - pps_lists[1]) / float(pps_lists[1])])
- # this is a TCP/IP packet, need to test different payload_size
- if ("5tuple" == key) and ("niantic" == self.nic):
- for package_size in package_sizes:
- payload_size = package_size - \
- HEADER_SIZE["tcp"] - HEADER_SIZE[
- 'ip'] - HEADER_SIZE['eth']
- pps_lists = []
- for i in range(2):
- self.dut.send_expect(
- test_type[key][i], "testpmd> ", 15)
- self.dut.send_expect("start", "testpmd> ", 120)
- self.tester.scapy_append('flows = []')
- self.tester.scapy_append('flows.append(%s)' % (
- stream_config[key] % (tx_mac, payload_size)))
- self.tester.scapy_append(
- 'wrpcap("generic_firlter.pcap",flows)')
- self.tester.scapy_execute()
- tgen_input = []
- # tgen_input.append((txItf, rxItf, "generic_firlter.pcap"))
- tgen_input.append(
- (tx_port, rx_port, "generic_firlter.pcap"))
- print(tgen_input)
- _, pps = self.tester.traffic_generator_throughput(
- tgen_input)
- pps_lists.append(pps)
- self.result_table_add(
- [package_size, key, pps_lists[0], pps_lists[1], (pps_lists[0] - pps_lists[1]) / float(pps_lists[1])])
- self.result_table_print()
-
def tear_down(self):
"""
Run after each test case.
--
1.8.3.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [v2, 2/5] nvgre: remove perf test cases
2021-08-04 14:41 [dts] [v2, 0/5] remove some run-down cases Lijuan Tu
2021-08-04 14:41 ` [dts] [v2, 1/5] generic_filter: remove perf test case Lijuan Tu
@ 2021-08-04 14:41 ` Lijuan Tu
2021-08-04 14:41 ` [dts] [v2, 3/5] vm_power_manager: " Lijuan Tu
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Lijuan Tu @ 2021-08-04 14:41 UTC (permalink / raw)
To: dts; +Cc: Lijuan Tu
the cases are no longer maintained.
Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
test_plans/nvgre_test_plan.rst | 65 -----------------
tests/TestSuite_nvgre.py | 156 -----------------------------------------
2 files changed, 221 deletions(-)
diff --git a/test_plans/nvgre_test_plan.rst b/test_plans/nvgre_test_plan.rst
index d9412e1..015182a 100644
--- a/test_plans/nvgre_test_plan.rst
+++ b/test_plans/nvgre_test_plan.rst
@@ -340,68 +340,3 @@ correct or not.
+-----------+------------+------------+---------+----------+------------+------------+-----------+---------------------+-----------+
| Yes | Yes | Ipv6 | Yes | Yes | Yes | Ipv6 (Bad) | Udp | PKT_RX_IPV6_HDR_EXT | None |
+-----------+------------+------------+---------+----------+------------+------------+-----------+---------------------+-----------+
-
-
-Test Case: NVGRE Checksum Offload Performance Benchmarking
-==========================================================
-
-The throughput is measured for each of these cases for NVGRE tx checksum
-offload of "all by software", "inner l3 offload by hardware", "inner l4
-offload by hardware", "inner l3&l4 offload by hardware", "outer l3 offload
-by hardware", "outer l4 offload by hardware", "outer l3&l4 offload by
-hardware", "all by hardware".
-
-The results are printed in the following table:
-
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| Calculate Type | 1S/1C/1T Mpps | % linerate | 1S/1C/2T Mpps | % linerate | 1S/2C/1T Mpps | % linerate |
-+================+===============+============+===============+============+===============+============+
-| SOFTWARE ALL | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| HW OUTER L3 | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| HW OUTER L4 | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| HW OUTER L3&L4 | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| HW INNER L3 | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| HW INNER L4 | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| HW INNER L3&L4 | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-| HARDWARE ALL | | | | | | |
-+----------------+---------------+------------+---------------+------------+---------------+------------+
-
-Test Case: NVGRE Tunnel filter Performance Benchmarking
-=======================================================
-
-The throughput is measured for different NVGRE tunnel filter types.
-Queue single mean there's only one flow and forwarded to the first queue.
-Queue multi mean there are two flows and configure to different queues.
-
-+--------+------------------+--------+--------+------------+
-| Packet | Filter | Queue | Mpps | % linerate |
-+========+==================+========+========+============+
-| Normal | None | Single | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | None | Single | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac-ivlan | Single | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac-ivlan-tenid | Single | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac-tenid | Single | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac | Single | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | omac-imac-tenid | Single | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac-ivlan | Multi | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac-ivlan-tenid | Multi | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac-tenid | Multi | | |
-+--------+------------------+--------+--------+------------+
-| NVGRE | imac | Multi | | |
-+--------+------------------+--------+--------+------------+
diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py
index 1301819..1b1a50d 100644
--- a/tests/TestSuite_nvgre.py
+++ b/tests/TestSuite_nvgre.py
@@ -877,162 +877,6 @@ class TestNvgre(TestCase):
# check vlan nvgre packet + inner vlan + inner sctp checksum invalid
self.nvgre_checksum(outer_vlan=1, inner_l4_invalid=1, inner_l4_type='SCTP')
- def test_perf_nvgre_tunnelfilter_performance_2ports(self):
- self.result_table_create(self.tunnel_header)
- core_list = self.dut.get_core_list('1S/%dC/1T' % (self.tunnel_multiqueue * 2), socket=self.ports_socket)
- core_mask = utils.create_mask(core_list)
-
- for perf_config in self.tunnel_perf:
- pkts = []
- config = NvgreTestConfig(self)
- config.inner_vlan = self.default_vlan
- config.outer_mac_dst = self.dut.get_mac_address(self.dut_port)
- # get frame size
- config.create_pcap()
- frame_size = config.pcap_len()
-
- # restart testpmd in each performance config
- self.eal_para = self.dut.create_eal_parameters(cores="all")
- self.dut.send_expect(r'%s %s -- -i --disable-rss --coremask=%s --rxq=4 --txq=4 --portmask=%s'
- % (self.path, self.eal_para, core_mask, self.portmask), "testpmd>", 100)
- if perf_config['tunnel_filter'] != 'None':
- self.dut.send_expect("tunnel_filter add %d %s %s %s %d vxlan %s %d %d"
- % (self.dut_port, config.outer_mac_dst, config.inner_mac_dst, config.inner_ip_dst, config.inner_vlan,
- perf_config['tunnel_filter'], config.tni, 0), "testpmd>", 10)
-
- if perf_config['Packet'] == 'Normal':
- config.outer_udp_dst = 63
- config.outer_mac_dst = self.dut.get_mac_address(self.dut_port)
- config.payload_size = frame_size - HEADER_SIZE['eth'] - HEADER_SIZE['ip'] - HEADER_SIZE['udp']
-
- # add default pkt into pkt list
- pkt = config.create_pcap()
- pkts.append(pkt)
-
- # add other pkts into pkt list when enable multi receive queues
- if perf_config['recvqueue'] == 'Multi':
- for queue in range(self.tunnel_multiqueue - 1):
- if 'imac' in perf_config['tunnel_filter']:
- config.inner_mac_dst = "00:00:20:00:00:0%d" % (queue + 2)
- if 'ivlan' in perf_config['tunnel_filter']:
- config.inner_vlan = (queue + 2)
- if 'tenid' in perf_config['tunnel_filter']:
- config.vni = (queue + 2)
-
- # add tunnel filter the same as pkt
- pkt = config.create_pcap()
- pkts.append(pkt)
- out = self.dut.send_expect("tunnel_filter add %d %s %s %s %d vxlan %s %d %d"
- % (self.dut_port, config.outer_mac_dst, config.inner_mac_dst, config.inner_ip_dst, config.inner_vlan,
- perf_config['tunnel_filter'], config.vni, (queue + 1)), "testpmd>", 10)
-
- # save pkt list into pcap file
- wrpcap(config.pcap_file, pkts)
- self.tester.session.copy_file_to(config.pcap_file)
-
- # config the flows
- tgen_input = []
- tgen_input.append((self.tester.get_local_port(self.dut_port),
- self.tester.get_local_port(self.recv_port),
- config.pcap_file))
-
- self.dut.send_expect("set fwd mac", "testpmd>", 10)
- self.dut.send_expect("start", "testpmd>", 10)
-
- frame_size = config.pcap_len()
- wirespeed = self.wirespeed(self.nic, frame_size, 2)
- # run traffic generator
- _, pps = self.tester.traffic_generator_throughput(tgen_input)
-
- pps /= 1000000.0
- perf_config['Mpps'] = pps
- perf_config['pct'] = pps * 100 / wirespeed
-
- out = self.dut.send_expect("stop", "testpmd>", 10)
- self.dut.send_expect("quit", "# ", 10)
-
- # verify every queue work fine
- if perf_config['recvqueue'] == 'Multi':
- for queue in range(self.tunnel_multiqueue):
- self.verify("RX Port= 0/Queue= %d -> TX Port= 1/Queue= %d" % (queue, queue) in out, "Queue %d no traffic" % queue)
-
- table_row = [perf_config['Packet'], perf_config['tunnel_filter'],
- perf_config['recvqueue'], perf_config['Mpps'],
- perf_config['pct']]
-
- self.result_table_add(table_row)
-
- self.result_table_print()
-
- def test_perf_nvgre_checksum_performance_2ports(self):
- config = NvgreTestConfig(self)
- config.outer_mac_dst = self.dut.get_mac_address(self.dut_port)
- config.pcap_file = "nvgre1.pcap"
- config.create_pcap()
- config.outer_mac_dst = self.dut.get_mac_address(self.recv_port)
- config.pcap_file = "nvgre.pcap"
- config.create_pcap()
-
- # configure flows
- tgen_input = []
- tgen_input.append((self.tester.get_local_port(self.dut_port),
- self.tester.get_local_port(self.recv_port),
- "nvgre.pcap"))
- tgen_input.append((self.tester.get_local_port(self.recv_port),
- self.tester.get_local_port(self.dut_port),
- "nvgre.pcap"))
-
- all_cores_mask = utils.create_mask(self.dut.get_core_list("all"))
-
- # socket/core/thread
- for test_cycle in self.test_cycles:
- core_config = test_cycle['cores']
-
- # take care the corelist when enable numa
- if '2S' not in core_config:
- core_list = self.dut.get_core_list(core_config,
- socket=self.ports_socket)
- else:
- core_list = self.dut.get_core_list(core_config)
-
- core_mask = utils.create_mask(core_list)
- self.eal_para = self.dut.create_eal_parameters(cores="all")
- self.dut.send_expect(r'%s %s -- -i --disable-rss --coremask=%s --rxq=4 --txq=4 --portmask=%s'
- % (self.path, self.eal_para, core_mask, self.portmask), "testpmd>", 100)
- self.dut.send_expect("set fwd csum", "testpmd>", 10)
-
- # different calculate type
- for cal in self.cal_type:
- self.dut.send_expect("tx_checksum set %s %d" % (cal['tx_checksum'], self.dut_port), "testpmd>", 10)
- self.dut.send_expect("tx_checksum set %s %d" % (cal['tx_checksum'], self.recv_port), "testpmd>", 10)
- self.dut.send_expect("start", "testpmd>", 10)
-
- frame_size = config.pcap_len()
- wirespeed = self.wirespeed(self.nic, frame_size, 2)
- # run traffic generator
- _, pps = self.tester.traffic_generator_throughput(tgen_input)
-
- pps /= 1000000.0
- test_cycle['Mpps'][cal['Type']] = pps
- test_cycle['pct'][cal['Type']] = pps * 100 / wirespeed
-
- self.dut.send_expect("stop", "testpmd>", 10)
-
- self.dut.send_expect("quit", "# ", 10)
-
- self.result_table_create(self.table_header)
-
- # save the results
- for cal in self.cal_type:
- table_row = [cal['Type']]
- for test_cycle in self.test_cycles:
- table_row.append(test_cycle['Mpps'][cal['Type']])
- table_row.append(test_cycle['pct'][cal['Type']])
-
- self.result_table_add(table_row)
-
- self.result_table_print()
-
def set_up(self):
"""
Run before each test case.
--
1.8.3.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [v2, 3/5] vm_power_manager: remove perf test cases
2021-08-04 14:41 [dts] [v2, 0/5] remove some run-down cases Lijuan Tu
2021-08-04 14:41 ` [dts] [v2, 1/5] generic_filter: remove perf test case Lijuan Tu
2021-08-04 14:41 ` [dts] [v2, 2/5] nvgre: remove perf test cases Lijuan Tu
@ 2021-08-04 14:41 ` Lijuan Tu
2021-08-04 8:14 ` Pattan, Reshma
2021-08-04 14:41 ` [dts] [v2, 4/5] vxlan_sample: remove perf test case Lijuan Tu
` (2 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Lijuan Tu @ 2021-08-04 14:41 UTC (permalink / raw)
To: dts; +Cc: Lijuan Tu
the cases are no longer maintained.
Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
test_plans/vm_power_manager_test_plan.rst | 65 ------------------
tests/TestSuite_vm_power_manager.py | 106 ------------------------------
2 files changed, 171 deletions(-)
diff --git a/test_plans/vm_power_manager_test_plan.rst b/test_plans/vm_power_manager_test_plan.rst
index 992f315..7cac509 100644
--- a/test_plans/vm_power_manager_test_plan.rst
+++ b/test_plans/vm_power_manager_test_plan.rst
@@ -89,30 +89,6 @@ Prerequisites
- libvirtd (libvirt) 1.1.3.5
- Add virio-serial port
-4. IXIA Traffic Generator Configuration LPM table used for packet routing is:
-
- +---------+------------------------+----+
- | Entry # | LPM prefix (IP/length) | |
- +---------+------------------------+----+
- | 0 | 1.1.1.0/24 | P0 |
- +---------+------------------------+----+
- | 1 | 2.1.1.0/24 | P1 |
- +---------+------------------------+----+
-
-
- The flows should be configured and started by the traffic generator.
-
- +------+---------+------------+---------+------+-------+--------+
- | Flow | Traffic | IPv4 | IPv4 | Port | Port | L4 |
- | | Gen. | Src. | Dst. | Src. | Dest. | Proto. |
- | | Port | Address | Address | | | |
- +------+---------+------------+---------+------+-------+--------+
- | 1 | TG0 | 0.0.0.0 | 2.1.1.0 | any | any | UDP |
- +------+---------+------------+---------+------+-------+--------+
- | 2 | TG1 | 0.0.0.0 | 1.1.1.0 | any | any | UDP |
- +------+---------+------------+---------+------+-------+--------+
-
-
Test Case 1: VM Power Management Channel
========================================
@@ -282,44 +258,3 @@ Test Case 7: VM Power Management Multi VMs
8. Poweroff VM2 and remove VM2 from host vm_power_mgr::
vmpower> rm_vm <vm2_name>
-
-Test Case 8: VM l3fwd-power Latency
-===================================
-1. Connect two physical ports to IXIA
-2. Start VM and run l3fwd-power::
-
- l3fwd-power -c 6 -n 4 -- -p 0x3 --config '(P0,0,C{1.1.0}),(P1,0,C{1.2.0})'
-
-3. Configure packet flow in IxiaNetwork
-4. Start to send packets from IXIA and check the receiving packets and latency
-5. Record the latency of frame sizes 128
-6. Compare latency value with sample l3fwd
-
-Test Case 9: VM l3fwd-power Performance
-=======================================
-Start VM and run l3fwd-power::
-
- l3fwd-power -c 6 -n 4 -- -p 0x3 --config '(P0,0,C{1.1.0}),(P1,0,C{1.2.0})'
-
-Input traffic linerate varied from 0 to 100%, in order to see cpu frequency
-changes.
-
-The test report should provide the throughput rate measurements (in Mpps and %
-of the line rate for 2x NIC ports) and cpu frequency as listed in the table
-below:
-
- +---------------+---------------+-----------+
- | % Tx linerate | Rx % linerate | Cpu freq |
- +---------------+---------------+-----------+
- | 0 | | |
- +---------------+---------------+-----------+
- | 20 | | |
- +---------------+---------------+-----------+
- | 40 | | |
- +---------------+---------------+-----------+
- | 60 | | |
- +---------------+---------------+-----------+
- | 80 | | |
- +---------------+---------------+-----------+
- | 100 | | |
- +---------------+---------------+-----------+
diff --git a/tests/TestSuite_vm_power_manager.py b/tests/TestSuite_vm_power_manager.py
index 00910eb..fca122b 100644
--- a/tests/TestSuite_vm_power_manager.py
+++ b/tests/TestSuite_vm_power_manager.py
@@ -273,112 +273,6 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator):
vm2_dut.send_expect("quit", "# ")
vm2.stop()
- def test_perf_vmpower_latency(self):
- """
- Measure packet latency in VM
- """
- latency_header = ['Frame Size', 'Max latency', 'Min lantecy',
- 'Avg latency']
-
- self.result_table_create(latency_header)
-
- rx_port = self.dut_ports[0]
- tx_port = self.dut_ports[1]
-
- # build l3fwd-power
- out = self.vm_dut.send_expect("make -C examples/l3fwd-power", "# ")
- self.verify("Error" not in out, "compilation error 1")
- self.verify("No such file" not in out, "compilation error 2")
- # start l3fwd-power
- l3fwd_app = "./examples/l3fwd-power/build/l3fwd-power"
-
- cmd = l3fwd_app + " -c 6 -n 4 -- -p 0x3 --config " + \
- "'(0,0,1),(1,0,2)'"
-
- self.vm_dut.send_expect(cmd, "L3FWD_POWER: entering main loop")
-
- for frame_size in self.frame_sizes:
- # Prepare traffic flow
- payload_size = frame_size - HEADER_SIZE['udp'] - \
- HEADER_SIZE['ip'] - HEADER_SIZE['eth']
- dmac = self.dut.get_mac_address(self.dut_ports[0])
- flow = 'Ether(dst="%s")/IP(dst="2.1.1.0")/UDP()' % dmac + \
- '/Raw("X"*%d)' % payload_size
- self.tester.scapy_append('wrpcap("vmpower.pcap", [%s])' % flow)
- self.tester.scapy_execute()
-
- tgen_input = []
- tgen_input.append((self.tester.get_local_port(rx_port),
- self.tester.get_local_port(tx_port),
- "vmpower.pcap"))
- # run traffic generator
- [latency] = self.tester.traffic_generator_latency(tgen_input)
- print(latency)
- table_row = [frame_size, latency['max'], latency['min'],
- latency['average']]
- self.result_table_add(table_row)
-
- self.result_table_print()
-
- self.vm_dut.kill_all()
-
- def test_perf_vmpower_frequency(self):
- """
- Measure cpu frequency fluctuate with work load
- """
- latency_header = ['Tx linerate%', 'Rx linerate%', 'Cpu freq']
-
- self.result_table_create(latency_header)
-
- rx_port = self.dut_ports[0]
- tx_port = self.dut_ports[1]
-
- # build l3fwd-power
- out = self.vm_dut.send_expect("make -C examples/l3fwd-power", "# ")
- self.verify("Error" not in out, "compilation error 1")
- self.verify("No such file" not in out, "compilation error 2")
- # start l3fwd-power
- l3fwd_app = "./examples/l3fwd-power/build/l3fwd-power"
-
- cmd = l3fwd_app + " -c 6 -n 4 -- -p 0x3 --config " + \
- "'(0,0,1),(1,0,2)'"
-
- self.vm_dut.send_expect(cmd, "L3FWD_POWER: entering main loop")
-
- for rate in self.perf_rates:
- # Prepare traffic flow
- payload_size = self.def_framesize - HEADER_SIZE['udp'] - \
- HEADER_SIZE['ip'] - HEADER_SIZE['eth']
- dmac = self.dut.get_mac_address(self.dut_ports[0])
- flow = 'Ether(dst="%s")/IP(dst="2.1.1.0")/UDP()' % dmac + \
- '/Raw("X"*%d)' % payload_size
- self.tester.scapy_append('wrpcap("vmpower.pcap", [%s])' % flow)
- self.tester.scapy_execute()
-
- tgen_input = []
- tgen_input.append((self.tester.get_local_port(rx_port),
- self.tester.get_local_port(tx_port),
- "vmpower.pcap"))
-
- # register hook function for current cpu frequency
- self.hook_transmissoin_func = self.get_freq_in_transmission
- self.tester.extend_external_packet_generator(TestVmPowerManager,
- self)
- # run traffic generator, run 20 seconds for frequency stable
- _, pps = self.tester.traffic_generator_throughput(tgen_input,
- rate,
- delay=20)
- pps /= 1000000.0
- freq = self.cur_freq / 1000000.0
- wirespeed = self.wirespeed(self.nic, self.def_framesize, 1)
- pct = pps * 100 / wirespeed
- table_row = [rate, pct, freq]
- self.result_table_add(table_row)
-
- self.result_table_print()
-
- self.vm_dut.kill_all()
-
def get_freq_in_transmission(self):
self.cur_freq = self.get_cpu_frequency(self.vcpu_map[1])
print((utils.GREEN("Current cpu frequency %d" % self.cur_freq)))
--
1.8.3.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [v2, 3/5] vm_power_manager: remove perf test cases
2021-08-04 14:41 ` [dts] [v2, 3/5] vm_power_manager: " Lijuan Tu
@ 2021-08-04 8:14 ` Pattan, Reshma
0 siblings, 0 replies; 8+ messages in thread
From: Pattan, Reshma @ 2021-08-04 8:14 UTC (permalink / raw)
To: Tu, Lijuan, dts; +Cc: Tu, Lijuan
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Lijuan Tu
> Sent: Wednesday, August 4, 2021 3:42 PM
> To: dts@dpdk.org
> Cc: Tu, Lijuan <lijuan.tu@intel.com>
> Subject: [dts] [v2, 3/5] vm_power_manager: remove perf test cases
>
> the cases are no longer maintained.
>
> Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [v2, 4/5] vxlan_sample: remove perf test case
2021-08-04 14:41 [dts] [v2, 0/5] remove some run-down cases Lijuan Tu
` (2 preceding siblings ...)
2021-08-04 14:41 ` [dts] [v2, 3/5] vm_power_manager: " Lijuan Tu
@ 2021-08-04 14:41 ` Lijuan Tu
2021-08-04 14:41 ` [dts] [v2, 5/5] remove cloud_filter as it is no longer maintained Lijuan Tu
2021-08-10 6:01 ` [dts] [v2, 0/5] remove some run-down cases Tu, Lijuan
5 siblings, 0 replies; 8+ messages in thread
From: Lijuan Tu @ 2021-08-04 14:41 UTC (permalink / raw)
To: dts; +Cc: Lijuan Tu
the case is no longer maintained.
Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
test_plans/vxlan_sample_test_plan.rst | 30 ---------
tests/TestSuite_vxlan_sample.py | 111 +---------------------------------
2 files changed, 1 insertion(+), 140 deletions(-)
diff --git a/test_plans/vxlan_sample_test_plan.rst b/test_plans/vxlan_sample_test_plan.rst
index a092e85..9681d05 100644
--- a/test_plans/vxlan_sample_test_plan.rst
+++ b/test_plans/vxlan_sample_test_plan.rst
@@ -234,33 +234,3 @@ Verify that packet received by virtIO port0 and forwarded by virtIO port1::
Verify that four separated vxlan packets received on PF devices.
Make sure tcp packet payload is 256, 256, 256 and 124.
-
-Test Case: Vxlan Sample Performance Benchmarking
-================================================
-The throughput is measured for different operations taken by vxlan sample.
-Virtio single mean there's only one flow and forwarded by single port in vm.
-Virtio two mean there are two flows and forwarded by both two ports in vm.
-
-+----------------+-----------+-------+------------+
-| Function | VirtIO | Mpps | % linerate |
-+================+===========+=======+============+
-| Decap | Single | | |
-+----------------+-----------+-------+------------+
-| Encap | Single | | |
-+----------------+-----------+-------+------------+
-| Decap&Encap | Single | | |
-+----------------+-----------+-------+------------+
-| Checksum | Single | | |
-+----------------+-----------+-------+------------+
-| Checksum&Decap | Single | | |
-+----------------+-----------+-------+------------+
-| Decap | Two Ports | | |
-+----------------+-----------+-------+------------+
-| Encap | Two Ports | | |
-+----------------+-----------+-------+------------+
-| Decap&Encap | Two Ports | | |
-+----------------+-----------+-------+------------+
-| Checksum | Two Ports | | |
-+----------------+-----------+-------+------------+
-| Checksum&Decap | Two Ports | | |
-+----------------+-----------+-------+------------+
diff --git a/tests/TestSuite_vxlan_sample.py b/tests/TestSuite_vxlan_sample.py
index 92253bb..109196f 100644
--- a/tests/TestSuite_vxlan_sample.py
+++ b/tests/TestSuite_vxlan_sample.py
@@ -176,10 +176,7 @@ class TestVxlanSample(TestCase):
if self.running_case == "test_vxlan_sample_tso":
tep_cmd += " --tso-segsz=%d" % self.def_mss
- if self.running_case != "test_perf_vxlan_sample":
- self.prepare_vxlan_sample_env(tep_cmd, vm_num=vm_num)
-
- pass
+ self.prepare_vxlan_sample_env(tep_cmd, vm_num=vm_num)
def prepare_vxlan_sample_env(self, tep_cmd, vm_num=1):
# remove unexpected socket
@@ -491,112 +488,6 @@ class TestVxlanSample(TestCase):
self.logger.info("Vxlan packet tso pass on virtIO port %d"
% vf_id)
- def test_perf_vxlan_sample(self):
- # vxlan payload length for performance test
- # inner packet not contain crc, should need add four
- vxlan_payload = PACKET_LEN - HEADER_SIZE['eth'] - \
- HEADER_SIZE['ip'] - HEADER_SIZE['udp'] - \
- HEADER_SIZE['vxlan'] - HEADER_SIZE['eth'] - \
- HEADER_SIZE['ip'] - HEADER_SIZE['udp'] + 4
-
- vxlansample_header = ['Type', 'Queue', 'Mpps', '% linerate']
- self.result_table_create(vxlansample_header)
- for perf_cfg in self.perf_cfg:
- func = perf_cfg['Func']
- if func is 'Decap':
- encap = self.FEAT_DISABLE
- decap = self.FEAT_ENABLE
- chksum = self.FEAT_DISABLE
- elif func is 'Encap':
- encap = self.FEAT_ENABLE
- decap = self.FEAT_DISABLE
- chksum = self.FEAT_DISABLE
- elif func is 'Decap&Encap':
- encap = self.FEAT_ENABLE
- decap = self.FEAT_ENABLE
- chksum = self.FEAT_DISABLE
- elif func is 'Checksum':
- encap = self.FEAT_ENABLE
- decap = self.FEAT_DISABLE
- chksum = self.FEAT_ENABLE
- elif func is 'Checksum&Decap':
- encap = self.FEAT_ENABLE
- decap = self.FEAT_ENABLE
- chksum = self.FEAT_ENABLE
-
- tep_cmd_temp = self.app_tep_termination_path + " -c %(COREMASK)s -n %(CHANNELS)d " \
- + "--socket-mem 2048,2048 -- -p 0x1 --udp-port " \
- + "%(VXLAN_PORT)d --nb-devices %(NB_DEVS)d --filter-type " \
- + "%(FILTERS)d --tx-checksum %(TX_CHKS)d --encap %(ENCAP)d " \
- + "--decap %(DECAP)d --rx-retry 1 --rx-retry-num 4 " \
- + "--rx-retry-delay 15"
-
- tep_cmd = tep_cmd_temp % {
- 'COREMASK': self.coremask,
- 'CHANNELS': self.dut.get_memory_channels(),
- 'VXLAN_PORT': self.vxlan_port, 'NB_DEVS': 2,
- 'FILTERS': self.OUTER_INNER_VNI, 'TX_CHKS': chksum,
- 'ENCAP': encap, 'DECAP': decap}
-
- self.prepare_vxlan_sample_env(tep_cmd, vm_num=1)
- self.vm_testpmd_start(vm_id=0)
-
- # create vxlan packet pf mac + vni=1000 + inner virtIO port0 mac
- params = {}
- params['outer_mac_dst'] = self.pf_mac
- params['vni'] = 1000
- mac_incr = 0
- params['inner_mac_dst'] = self.mac_address_add(mac_incr)
- params['payload_size'] = vxlan_payload
- params['pcap_file'] = 'vxlan_sample.pcap'
-
- # create vxlan pcap file and transfer it to tester
- vxlan_pkt = VxlanTestConfig(self, **params)
- vxlan_pkt.create_pcap()
-
- if perf_cfg['VirtIO'] == "Two Ports":
- # create vxlan packet pf mac + vni=1000 + inner virtIO port0
- # mac
- params['outer_mac_dst'] = self.pf_mac
- params['vni'] = 1000
- mac_incr = 1
- params['inner_mac_dst'] = self.mac_address_add(mac_incr)
- params['pcap_file'] = 'vxlan_sample_1.pcap'
-
- # create vxlan pcap file and transfer it to tester
- vxlan_pkt = VxlanTestConfig(self, **params)
- vxlan_pkt.create_pcap(scp=False)
-
- self.combine_pcap("vxlan_sample.pcap", "vxlan_sample_1.pcap")
-
- self.tester.session.copy_file_to("vxlan_sample.pcap")
-
- # config the flows
- tgen_input = []
- tgen_input.append((self.tester.get_local_port(self.pf),
- self.tester.get_local_port(self.pf),
- "vxlan_sample.pcap"))
-
- # run traffic generator
- _, pps = self.tester.traffic_generator_throughput(tgen_input)
-
- self.vm_dut.send_expect("stop", "testpmd>")
- self.vm_dut.send_expect("quit", "# ")
-
- pps /= 1000000.0
- perf_cfg['Mpps'] = pps
- wirespeed = self.wirespeed(self.nic, PACKET_LEN, 1)
- perf_cfg['pct'] = pps * 100 / wirespeed
-
- table_row = [perf_cfg['Func'], perf_cfg['VirtIO'],
- perf_cfg['Mpps'], perf_cfg['pct']]
-
- self.result_table_add(table_row)
-
- self.tear_down()
-
- self.result_table_print()
-
def combine_pcap(self, dest_pcap, src_pcap):
pkts = rdpcap(dest_pcap)
if len(pkts) != 1:
--
1.8.3.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [v2, 5/5] remove cloud_filter as it is no longer maintained
2021-08-04 14:41 [dts] [v2, 0/5] remove some run-down cases Lijuan Tu
` (3 preceding siblings ...)
2021-08-04 14:41 ` [dts] [v2, 4/5] vxlan_sample: remove perf test case Lijuan Tu
@ 2021-08-04 14:41 ` Lijuan Tu
2021-08-10 6:01 ` [dts] [v2, 0/5] remove some run-down cases Tu, Lijuan
5 siblings, 0 replies; 8+ messages in thread
From: Lijuan Tu @ 2021-08-04 14:41 UTC (permalink / raw)
To: dts; +Cc: Lijuan Tu
Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
test_plans/cloud_filter_test_plan.rst | 326 ------------------------
test_plans/index.rst | 1 -
tests/TestSuite_cloud_filter.py | 463 ----------------------------------
3 files changed, 790 deletions(-)
delete mode 100644 test_plans/cloud_filter_test_plan.rst
delete mode 100644 tests/TestSuite_cloud_filter.py
diff --git a/test_plans/cloud_filter_test_plan.rst b/test_plans/cloud_filter_test_plan.rst
deleted file mode 100644
index 500e131..0000000
--- a/test_plans/cloud_filter_test_plan.rst
+++ /dev/null
@@ -1,326 +0,0 @@
-.. Copyright (c) <2016-2017> 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.
-
-==========================================
-Cloud filter Support through Ethtool Tests
-==========================================
-
-This feature based on X710 to classify VxLan/Geneve packets and put those into
-a specified queue in VF for further processing from virtual switch.
-
-Prerequisites
-=============
-Cloud filter feature based on latest i40e out of tree driver. Should also
-update ethtool and XL710 firmware:
-
-* Ethtool version: 3.18
-* i40e driver: i40e-1.5.13_rc1
-* Kernel version: 4.2.2
-* Xl710 DA2 firmware: 5.02 0x80002282
-
-BIOS setting:
-
-* Enable VT-d and VT-x
-
-Kernel command line:
-
-* Enable Intel IOMMU with below arguments
-* intel_iommu=on iommu=pt
-
-Create two VFs from kernel driver::
-
- echo 2 > /sys/bus/pci/devices/0000\:82\:00.0/sriov_numvfs
- ifconfig $PF_INTF up
-
-Add vxlan network interface based on PF device::
-
- ip li add vxlan0 type vxlan id 1 group 239.1.1.1 local 127.0.0.1 dev $PF_INTF
- ifconfig vxlan0 up
-
-Allocate hugepage for dpdk::
-
- echo 4096 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-Bind vf device to igb_uio driver and start testpmd with multiple queues::
-
- cd dpdk
- modprobe uio
- insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
- ./tools/dpdk_nic_bind.py --bind=igb_uio 82:02.0 82:02.1
- ./x86_64-native-linuxapp-gcc/app/testpmd -c ffff -n 4 -- -i --rxq=4 --txq=4 --disable-rss
- testpmd> set nbcore 8
- testpmd> set fwd rxonly
- testpmd> set verbose 1
- testpmd> start
-
-
-Test case: cloud filter rule(inner ip)
---------------------------------------
-
-1. Add cloud filter with inner ip address rule. Flow type ip4 mean this rule
- only match inner destination ip address. User define field higher 32bit is
- all 0xf mean vni id is not in the rule. Lower 32bit is 1 mean packet will
- be forwarded to VF1. Action 3 mean packet will be redirected to queue 3::
-
- ethtool -N $PF_INTF flow-type ip4 dst-ip 192.168.1.1 user-def 0xffffffff00000001 action 3 loc 1
-
-2. Send vxlan packet with inner ip matched rule::
-
- Ether()/IP()/UDP()/Vxlan()/Ether()/IP(dst="192.168.1.1")/TCP()/Raw('x' * 20)
-
-3. verify packet received by queue3 of VF1, verify packet type is correct::
-
- testpmd> port 1/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=106 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown
- - Tunnel type: GRENAT - Inner L2 type: ETHER - Inner L3 type: IPV4_EXT_UNKNOWN - Inner L4 type: UDP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 1 - Receive queue=0x3
-
-Test case: cloud filter rule(inner mac)
----------------------------------------
-1. Add cloud filter with Inner mac rule. Dst mac mask ff:ff:ff:ff:ff:ff mean
- outer mac address is not in the rule. Src mac mask 00:00:00:00:00:00 mean
- inner mac address is in the rule. User define field higher 32bit is all
- 0xf mean vni id is not in the rule. Lower 32bit is 1 mean packet will be
- forwarded to VF1. Action 3 mean packet will be redirected to queue 3::
-
- ethtool -N $PF_INTF flow-type ether dst 00:00:00:00:00:00 m \
- ff:ff:ff:ff:ff:ff src 00:00:00:00:09:00 m 00:00:00:00:00:00 \
- user-def 0xffffffff00000001 action 3 loc 1
-
-2. Send vxlan packet with inner mac matched rule::
-
- Ether()/IP()/UDP()/Vxlan()/Ether(dst="00:00:00:00:09:00")/IP()/TCP()/Raw('x' * 20)
-
-3. verify packet received by queue3 of VF1, verify packet type is correct::
-
- testpmd> port 1/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=120 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown
- - Tunnel type: GRENAT - Inner L2 type: ETHER - Inner L3 type:
- IPV4_EXT_UNKNOWN - Inner L4 type: TCP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 0 - Receive queue=0x3
-
-Test case: cloud filter rule(inner mac + outer mac + vni)
----------------------------------------------------------
-
-1. Add cloud filter with Inner mac + outer mac + vni rule. Dst mac mask
- 00:00:00:00:00:00 mean outer mac address is in the rule. Src mac mask
- 00:00:00:00:00:00 mean inner mac address is in the rule. User define field
- higher 32bit is 0x1 mean vni match 1 is in the rule. Lower 32bit is 1 mean
- packet will be forwarded to VF1. Action 3 mean packet will be redirected
- to queue 3::
-
- ethtool -N $PF_INTF flow-type ether dst 00:00:00:00:10:00 m \
- 00:00:00:00:00:00 src 00:00:00:00:09:00 m 00:00:00:00:00:00 \
- user-def 0x100000001 action 3 loc 1
-
-2. Send vxlan packet with inner mac match rule::
-
- Ether(dst="00:00:00:00:10:00")/IP()/UDP()/Vxlan(vni=1)/Ether(dst="00:00:00:00:09:00")/IP()/TCP()/Raw('x' * 20)
-
-3. verify packet received by queue3 of VF1, verify packet type is correct::
-
- testpmd> port 1/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=120 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown
- - Tunnel type: GRENAT - Inner L2 type: ETHER - Inner L3 type: IPV4_EXT_UNKNOWN - Inner L4 type: TCP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 0 - Receive queue=0x3
-
-Test case: cloud filter rule(inner mac + inner vlan + vni)
-----------------------------------------------------------
-
-1. Add cloud filter with Inner mac + inner vlan + vni rule. Dst mac mask
- ff:ff:ff:ff:ff:ff mean outer mac address is not in the rule. Src mac mask
- 00:00:00:00:00:00 mean inner mac address is in the rule. Vlan 1 mean vlan
- match is in the rule. User define field higher 32bit is 0x1 mean vni match
- 1 is in the rule. Lower 32bit is 1 mean packet will be forwarded to VF1.
- Action 3 mean packet will be redirected to queue 3::
-
- ethtool -N $PF_INTF flow-type ether dst 00:00:00:00:00:00 m \
- ff:ff:ff:ff:ff:ff src 00:00:00:00:09:00 m 00:00:00:00:00:00 \
- vlan 1 user-def 0x100000001 action 3 loc 1
-
-2. Send vxlan packet with inner mac match rule::
-
- Ether()/IP()/UDP()/Vxlan(vni=1)/Ether(dst="00:00:00:00:09:00")/Dot1Q(vlan=1)/IP()/TCP()/Raw('x' * 20)
-
-3. verify packet received by queue3 of VF1, verify packet type is correct::
-
- testpmd> port 1/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=124 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown
- - Tunnel type: GRENAT - Inner L2 type: ETHER_VLAN - Inner L3 type: IPV4_EXT_UNKNOWN - Inner L4 type: TCP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 1 - Receive queue=0x3
-
-Test case: cloud filter rule(inner mac + inner vlan)
-----------------------------------------------------
-
-1. Add cloud filter with Inner mac + inner vlan rule. Dst mac mask
- ff:ff:ff:ff:ff:ff mean outer mac address is not in the rule. Src mac mask
- 00:00:00:00:00:00 mean inner mac address is in the rule. Vlan 1 mean vlan
- match is in the rule. User define field higher 32bit is all 0xf mean vni
- id is not in the rule. Lower 32bit is 1 mean packet will be forwarded to
- VF1. Action 3 mean packet will be redirected to queue 3::
-
- ethtool -N $PF_INTF flow-type ether dst 00:00:00:00:00:00 m \
- ff:ff:ff:ff:ff:ff src 00:00:00:00:09:00 m 00:00:00:00:00:00 \
- vlan 1 user-def 0xffffffff00000001 action 3 loc 1
-
-2. Send vxlan packet with inner mac match rule::
-
- Ether()/IP()/UDP()/Vxlan(vni=1)/Ether(dst="00:00:00:00:09:00")/Dot1Q(vlan=1)/IP()/TCP()/Raw('x' * 20)
-
-3. verify packet received by queue3 of VF1, verify packet type is correct::
-
- testpmd> port 1/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=124 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown
- - Tunnel type: GRENAT - Inner L2 type: ETHER_VLAN - Inner L3 type: IPV4_EXT_UNKNOWN - Inner L4 type: TCP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 1 - Receive queue=0x3
-
-Test case: Remove cloud filter rule
------------------------------------
-
-Remove cloud filter rule in location 1::
-
- ethtool -N $PF_INTF delete 1
-
-Dump rule and check there's no rule listed::
-
- ethtool -n $PF_INTF
- Total 0 rules
-
-Send packet match last rule::
-
- Ether(dst not match PF&VF)/IP()/UDP()/Vxlan(vni=1)/Ether(dst="00:00:00:00:09:00")/Dot1Q(vlan=1)/IP()/TCP()/Raw('x' * 20)
-
-Check packet only received on PF device.
-
-Test case: Multiple cloud filter rules
---------------------------------------
-
-1. Add cloud filter with Inner mac + inner vlan rule. Dst mac mask
- ff:ff:ff:ff:ff:ff mean outer mac address is not in the rule. Src mac mask
- 00:00:00:00:00:00 mean inner mac address is in the rule. Vlan 1 mean vlan
- match is in the rule. User define field higher 32bit is all 0xf mean vni
- id is not in the rule. Lower 32bit is 1 mean packet will be forwarded to
- VF1. Action 3 mean packet will be redirected to queue 3::
-
- ethtool -N $PF_INTF flow-type ether dst 00:00:00:00:00:00 m \
- ff:ff:ff:ff:ff:ff src 00:00:00:00:09:00 m 00:00:00:00:00:00 \
- vlan 1 user-def 0xffffffff00000001 action 3 loc 1
-
-2. Add another cloud filter with Inner mac + inner vlan rule. Dst mac mask
- ff:ff:ff:ff:ff:ff mean outer mac address is not in the rule. Src mac mask
- 00:00:00:00:00:00 mean inner mac address is in the rule. Vlan 2 mean vlan
- match is in the rule. User define field higher 32bit is all 0xf mean vni
- id is not in the rule. Lower 32bit is 0 mean packet will be forwarded to
- VF0. Action 3 mean packet will be redirected to queue 3. Locate 2 mean
- this rule will be added to index 2::
-
- ethtool -N $PF_INTF flow-type ether dst 00:00:00:00:00:00 m \
- ff:ff:ff:ff:ff:ff src 00:00:00:00:10:00 m 00:00:00:00:00:00 \
- vlan 2 user-def 0xffffffff00000000 action 3 loc 2
-
-3. Dump cloud filter rules::
-
- ethtool -n $PF_INTF
- 64 RX rings available
- Total 2 rules
-
-4. Send packet match rule 1::
-
- Ether()/IP()/UDP()/Vxlan(vni=1)/Ether(dst="00:00:00:00:09:00")/Dot1Q(vlan=1)/IP()/TCP()/Raw('x' * 20)
-
-5. verify packet received by queue3 of VF1, verify packet type is correct::
-
- testpmd> port 1/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=124 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown
- - Tunnel type: GRENAT - Inner L2 type: ETHER_VLAN - Inner L3 type: IPV4_EXT_UNKNOWN - Inner L4 type: TCP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 1 - Receive queue=0x3
-
-6. Send packet match rule 2::
-
- Ether()/IP()/UDP()/Vxlan(vni=1)/Ether(dst="00:00:00:00:10:00")/Dot1Q(vlan=2)/IP()/TCP()/Raw('x' * 20)
-
-7. verify packet received by queue3 of VF0, verify packet type is correct::
-
- testpmd> port 0/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=124 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown - Tunnel type: GRENAT
- - Inner L2 type: ETHER_VLAN - Inner L3 type: IPV4_EXT_UNKNOWN - Inner L4 type: TCP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 1 - Receive queue=0x3
-
-Test case: Bifurcated between kernel VF and dpdk VF
----------------------------------------------------
-
-1. Add cloud filter with inner ip address rule. Flow type ip4 mean this rule
- only match inner destination ip address. User define field higher 32bit is
- all 0xf mean vni id is not in the rule. Lower 32bit is 1 mean packet will
- be forwarded to VF1. Action 3 mean packet will be redirected to queue 3::
-
- ethtool -N $PF_INTF flow-type ip4 dst-ip 192.168.1.1 user-def 0xffffffff00000001 action 3 loc 1
-
-2. Add cloud filter with inner ip address rule. Flow type ip4 mean this rule
- only match inner destination ip address. User define field higher 32bit is
- all 0xf mean vni id is not in the rule. Lower 32bit is 0 mean packet will
- be forwarded to VF0. Action 0 mean packet will be redirected to queue 0::
-
- ethtool -N $PF_INTF flow-type ip4 dst-ip 192.168.2.1 user-def 0xffffffff00000000 action 0 loc 2
-
-3. Send vxlan packet which matched first rule::
-
- Ether()/IP()/UDP()/Vxlan()/Ether()/IP(dst="192.168.1.1")/UDP()/Raw('x' * 20)
-
-4. verify packet received by queue3 of VF1, verify packet type is correct::
-
- testpmd> port 1/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=00:00:00:00:09:00 - type=0x0800 - length=106 - nb_segs=1
-
- - (outer) L2 type: ETHER - (outer) L3 type: IPV4_EXT_UNKNOWN - (outer) L4 type: Unknown
- - Tunnel type: GRENAT - Inner L2 type: ETHER - Inner L3 type: IPV4_EXT_UNKNOWN - Inner L4 type: UDP
- - VXLAN packet: packet type =24721, Destination UDP port =8472, VNI = 1 - Receive queue=0x3
-
-5. Send vxlan packet which matched second rule::
-
- Ether()/IP()/UDP()/Vxlan()/Ether()/IP(dst="192.168.2.1")/UDP()/Raw('x' * 20)
-
-6. verify packet received by VF0, verify packet content is correct
diff --git a/test_plans/index.rst b/test_plans/index.rst
index 55d3297..0208a22 100644
--- a/test_plans/index.rst
+++ b/test_plans/index.rst
@@ -40,7 +40,6 @@ The following are the test plans for the DPDK DTS automated test system.
ABI_stable_test_plan
blocklist_test_plan
checksum_offload_test_plan
- cloud_filter_test_plan
coremask_test_plan
cvl_advanced_rss_test_plan
cvl_advanced_rss_gtpu_test_plan
diff --git a/tests/TestSuite_cloud_filter.py b/tests/TestSuite_cloud_filter.py
deleted file mode 100644
index abc474f..0000000
--- a/tests/TestSuite_cloud_filter.py
+++ /dev/null
@@ -1,463 +0,0 @@
-# BSD LICENSE
-#
-# Copyright(c) 2020 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 Cloud Filters features in DPDK.
-
-"""
-
-import string
-import re
-import time
-import os
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
-from packet import Packet
-
-from scapy.layers.inet import UDP, IP
-from scapy.layers.vxlan import VXLAN
-from scapy.packet import split_layers, bind_layers
-
-VXLAN_PORT = 4789
-CLOUD_PORT = 8472
-split_layers(UDP, VXLAN, dport=VXLAN_PORT)
-bind_layers(UDP, VXLAN, dport=CLOUD_PORT)
-
-#
-#
-# Test class.
-#
-
-
-class CloudFilterConfig(object):
-
- """
- Module for config/verify cloud filter rule
- """
-
- RULE_TYPE = [
- 'iip', 'imac', 'omac+imac+vni', 'imac+ivlan+vni', 'imac+ivlan']
-
- def __init__(self, test_case, pf_intf=""):
- self.case = test_case
- # make sure pf existed
- out = self.case.dut.send_expect(
- 'ifconfig %s' % pf_intf, "#", alt_session=True)
- self.case.verify("Device not found" not in out,
- "Cloud filter need PF interface!!!")
- self.pf_intf = pf_intf
- self.pkt = Packet()
-
- def config_rule(self, **kwargs):
- """
- Configure cloud filter rule settings, must check rule format
- """
- self.rule_idx = 1
- self.case.verify(
- 'type' in kwargs, "Cloud filter rule must configure filter type")
- rule_type = kwargs['type']
- self.case.verify(
- rule_type in self.RULE_TYPE, "Cloud filter rule type not correct")
- self.case.verify(
- 'vf' in kwargs, "Cloud filter rule must configure device!!!")
- self.case.verify(
- 'queue' in kwargs, "Cloud filter rule must configure queue index")
- if 'loc' in kwargs:
- self.rule_idx = kwargs['loc']
-
- self.cf_rule = {}
- self.cf_rule['type'] = rule_type
- self.cf_rule['vf'] = kwargs['vf']
- self.cf_rule['queue'] = kwargs['queue']
-
- required_args = rule_type.split('+')
- for required_arg in required_args:
- self.case.verify(required_arg in kwargs,
- "Argument for [%s] missing!!!" % required_arg)
- self.cf_rule[required_arg] = kwargs[required_arg]
-
- if 'ivlan' in self.cf_rule:
- self.pkt.assign_layers(['ether', 'ipv4', 'udp',
- 'vxlan', 'inner_mac', 'inner_vlan',
- 'inner_ipv4', 'inner_tcp', 'raw'])
- else:
- self.pkt.assign_layers(['ether', 'ipv4', 'udp',
- 'vxlan', 'inner_mac',
- 'inner_ipv4', 'inner_tcp', 'raw'])
-
- def ethtool_add(self):
- """
- Add cloud filter rule by ethtool and return rule index
- """
- ip_fmt = "ethtool -N %(PF)s flow-type ip4 dst-ip %(IP)s user-def " + \
- "%(VNI_VF)s action %(QUEUE)d loc %(ID)d"
- ether_fmt = "ethtool -N %(PF)s flow-type ether dst %(OMAC)s m " + \
- "%(OMASK)s src %(IMAC)s m %(IMASK)s user-def %(VNI_VF)s " + \
- "action %(QUEUE)d loc %(ID)d"
- ether_vlan_fmt = "ethtool -N %(PF)s flow-type ether dst %(OMAC)s m " + \
- "%(OMASK)s src %(IMAC)s m %(IMASK)s vlan %(VLAN)d " + \
- "user-def %(VNI_VF)s action %(QUEUE)d loc %(ID)d"
-
-
- # generate user define field
- vni_vf = '0x'
- if 'vni' in self.cf_rule:
- vni_str = hex(self.cf_rule['vni'])[2:]
- else:
- vni_str = 'ffffffff' # without vni
- vni_vf += vni_str
- vf_str = "%08x" % self.cf_rule['vf']
- vni_vf += vf_str
-
- if 'omac' in self.cf_rule:
- omac_str = self.cf_rule['omac']
- omac_mask = '00:00:00:00:00:00'
- else:
- omac_str = '00:00:00:00:00:00'
- omac_mask = 'ff:ff:ff:ff:ff:ff'
-
- if 'imac' in self.cf_rule:
- imac_str = self.cf_rule['imac']
- imac_mask = '00:00:00:00:00:00'
- else:
- imac_str = '00:00:00:00:00:00'
- imac_mask = 'ff:ff:ff:ff:ff:ff'
-
- if 'iip' in self.cf_rule:
- ip_str = self.cf_rule['iip']
-
- if self.cf_rule['type'] == 'iip':
- ethtool_cmd = ip_fmt % {'PF': self.pf_intf,
- 'IP': ip_str,
- 'VNI_VF': vni_vf,
- 'QUEUE': self.cf_rule['queue'],
- 'ID': self.rule_idx}
- elif 'ivlan' in self.cf_rule:
- ethtool_cmd = ether_vlan_fmt % {'PF': self.pf_intf,
- 'OMAC': omac_str,
- 'OMASK': omac_mask,
- 'IMAC': imac_str,
- 'IMASK': imac_mask,
- 'VLAN': self.cf_rule['ivlan'],
- 'VNI_VF': vni_vf,
- 'QUEUE': self.cf_rule['queue'],
- 'ID': self.rule_idx}
- else:
- ethtool_cmd = ether_fmt % {'PF': self.pf_intf,
- 'OMAC': omac_str,
- 'OMASK': omac_mask,
- 'IMAC': imac_str,
- 'IMASK': imac_mask,
- 'VNI_VF': vni_vf,
- 'QUEUE': self.cf_rule['queue'],
- 'ID': self.rule_idx}
-
- print(ethtool_cmd)
- out = self.case.dut.send_expect(ethtool_cmd, "# ", alt_session=True)
- self.case.verify("ethtool" not in out, "Add cloud filter failed!!!")
-
- return self.rule_idx
-
- def ethtool_delete(self):
- """
- Delete cloud filter rule by index and return whether success
- """
- self.case.dut.send_expect("ethtool -N %s delete %d" % (self.pf_intf,
- self.rule_idx),
- "# ", alt_session=True)
-
- def ethtool_dumprule(self):
- """
- Dump cloud filter rule according to index value
- """
- pass
-
- def transmit_packet(self, match=True):
- """
- Send packet match or not matched cloud filter rules
- """
- ether_cfg = {'src': self.case.tester_mac}
- if match:
- if 'iip' in list(self.cf_rule.keys()):
- self.pkt.config_layer(
- 'inner_ipv4', {'dst': self.cf_rule['iip']})
- if 'imac' in list(self.cf_rule.keys()):
- self.pkt.config_layer(
- 'inner_mac', {'dst': self.cf_rule['imac']})
- if 'omac' in list(self.cf_rule.keys()):
- ether_cfg['dst'] = self.cf_rule['omac']
- if 'ivlan' in list(self.cf_rule.keys()):
- self.pkt.config_layer(
- 'inner_vlan', {'vlan': self.cf_rule['ivlan']})
- if 'vni' in list(self.cf_rule.keys()):
- self.pkt.config_layer('vxlan', {'vni': self.cf_rule['vni']})
-
- self.pkt.config_layer('ether', ether_cfg)
- self.pkt.config_layer('raw', {'payload': ['01'] * 18})
- self.pkt.send_pkt(crb=self.case.tester, tx_port=self.case.tester_intf)
-
-
-class TestCloudFilter(TestCase):
-
- def set_up_all(self):
- """
- vxlan Prerequisites
- """
- # this feature only enable in FVL now
- self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
- "fortville_spirit_single"],
- "Cloud filter only supported by Fortville")
- # Based on h/w type, choose how many ports to use
- self.dut_ports = self.dut.get_ports()
-
- # Verify that enough ports are available
- self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
-
- # required setting test environment
- self.env_done = False
- self.vf_queues = 4
-
- def setup_vf_env(self):
- """
- Create testing environment with 2VFs generated from PF
- """
- if self.env_done:
- return
-
- # get PF interface name and opposite tester interface name
- self.pf_port = self.dut_ports[0]
- self.bind_nics_driver([self.pf_port], driver="i40e")
- self.pf_intf = self.dut.ports_info[self.pf_port]['intf']
- tester_port = self.tester.get_local_port(self.pf_port)
- self.tester_intf = self.tester.get_interface(tester_port)
- self.tester_mac = self.tester.get_mac(tester_port)
- pf_numa = self.dut.get_numa_id(self.pf_port)
-
- self.dut.generate_sriov_vfs_by_port(self.pf_port, 2, driver="default")
-
- # enable vxlan on PF
- self.dut.send_expect("ip li add vxlan0 type vxlan id 1 group " +
- "239.1.1.1 local 127.0.0.1 dev %s" % self.pf_intf,
- "# ")
- self.dut.send_expect("ifconfig vxlan0 up", "# ")
-
- self.vf_port0 = self.dut.ports_info[self.pf_port]['vfs_port'][0]
- self.vf_port1 = self.dut.ports_info[self.pf_port]['vfs_port'][1]
-
- # bind one vf device to dpdk
- self.vf_port0.bind_driver(driver='igb_uio')
- self.vf_port1.bind_driver(driver='i40evf')
- self.vf_intf = self.vf_port1.intf_name
-
- # bind vf0 to igb_uio and start testpmd
- core_num = self.vf_queues + 1
- cores = "1S/%dC/1T" % core_num
-
- self.pmdout = PmdOutput(self.dut)
- self.pmdout.start_testpmd(
- cores, "--rxq=%d --txq=%d --portmask=0x1 --enable-rx-cksum" %
- (self.vf_queues, self.vf_queues), socket=pf_numa)
-
- # rxonly and verbose enabled
- self.pmdout.execute_cmd("set nbcore %d" % self.vf_queues)
- self.pmdout.execute_cmd("set fwd rxonly")
- self.pmdout.execute_cmd("set verbose 1")
- self.pmdout.execute_cmd("start")
-
- self.env_done = True
-
- def destroy_vf_env(self):
-
- if getattr(self, 'pmd_output', None):
- self.dut.kill_all()
-
- if getattr(self, 'pf_port', None):
- self.dut.destroy_sriov_vfs_by_port(self.pf_port)
- self.bind_nics_driver([self.pf_port], driver="igb_uio")
-
- self.env_done = False
-
- def bind_nics_driver(self, ports, driver=""):
- # modprobe vfio driver
- if driver == "vfio-pci":
- for port in ports:
- netdev = self.dut.ports_info[port]['port']
- driver = netdev.get_nic_driver()
- if driver != 'vfio-pci':
- netdev.bind_driver(driver='vfio-pci')
-
- elif driver == "igb_uio":
- # igb_uio should insmod as default, no need to check
- for port in ports:
- netdev = self.dut.ports_info[port]['port']
- driver = netdev.get_nic_driver()
- if driver != 'igb_uio':
- netdev.bind_driver(driver='igb_uio')
- else:
- for port in ports:
- netdev = self.dut.ports_info[port]['port']
- driver_now = netdev.get_nic_driver()
- if driver == "":
- driver = netdev.default_driver
- if driver != driver_now:
- netdev.bind_driver(driver=driver)
-
- def send_and_verify(self, cloud_cfg=None, dpdk=True):
- """
- Send packet match cloud filter rule and verify packet received
- """
- self.logger.info("Verifying vxlan %s filter" % cloud_cfg.cf_rule['type'])
- if dpdk:
- cloud_cfg.transmit_packet()
- out = self.pmdout.get_output()
- queue = cloud_cfg.cf_rule['queue']
- self.verify("queue %d" %
- queue in out, "Vxlan not received in queue %d" % queue)
- self.verify("VXLAN packet" in out, "Vxlan packet not detected")
- self.verify("Inner L4 type: TCP" in out,
- "Vxlan inner L4 type not detected")
- if 'vni' in list(cloud_cfg.cf_rule.keys()):
- vni = cloud_cfg.cf_rule['vni']
- self.verify("VNI = %d" %
- vni in out, "Vxlan vni value not correct")
- if 'ivlan' in list(cloud_cfg.cf_rule.keys()):
- self.verify("Inner L2 type: ETHER_VLAN" in out,
- "Vxlan inner vlan not detected")
- else:
- # packet received on dut VF device
- tmp_file = '/tmp/cloud_filter_%s.pcap' % self.vf_intf
- sniff_cmd = ('tcpdump -w ' + tmp_file +
- ' -i {0} 2>tcpdump_{0}.out &').format(self.vf_intf)
- rm_cmd = 'rm -f ' + tmp_file
- self.dut.send_expect(rm_cmd, '#', alt_session=True)
- self.dut.send_expect(sniff_cmd, '#', alt_session=True)
- # wait for interface promisc enable
- time.sleep(2)
- cloud_cfg.transmit_packet()
- self.dut.send_expect('killall tcpdump', '#', alt_session=True)
- # wait for pcap file saved
- time.sleep(2)
- # copy pcap to tester and then analyze
- self.dut.session.copy_file_from(tmp_file)
- pkt = Packet()
- pkt.read_pcapfile(filename="cloud_filter_%s.pcap" % self.vf_intf)
- self.verify(
- len(pkt) == 1, "%d packet recevied on kernel VF" % len(pkt))
- cap_pkt = pkt[0]
- try:
- dport = cap_pkt[UDP].dport
- self.verify(dport == CLOUD_PORT,
- "Captured packet is not vxlan packet")
- inner_ip = cap_pkt['VXLAN'][IP].dst
- self.verify(inner_ip == cloud_cfg.cf_rule['iip'],
- "Inner ip not matched")
- except:
- print("Kernel VF captured packet not match rule")
- raise
-
- self.logger.info("Verified vxlan %s filter pass" % cloud_cfg.cf_rule['type'])
-
- def test_cloud_filter(self):
- """
- Verify dpdk work with linux driver added cloud filter rule
- """
- # setting for cloud filter rule
- queue = self.vf_queues - 1
- vni = 1
- vlan = 1
- # add cloud filter rule
- rules = [
- {'type': 'iip', 'iip': '192.168.1.1',
- 'vf': 0, 'queue': queue, 'loc': 1},
- {'type': 'imac', 'imac': '00:00:00:00:09:00',
- 'vf': 0, 'queue': queue, 'loc': 1},
- {'type': 'omac+imac+vni', 'omac': '00:00:00:00:10:00',
- 'imac': '00:00:00:00:09:00', 'vni': vni, 'vf': 0, 'queue': queue,
- 'loc': 1},
- {'type': 'imac+ivlan+vni', 'imac': '00:00:00:00:09:00',
- 'ivlan': vlan, 'vni': vni, 'vf': 0, 'queue': queue, 'loc': 1},
- {'type': 'imac+ivlan', 'imac': '00:00:00:00:09:00',
- 'ivlan': vlan, 'vf': 0, 'queue': queue, 'loc': 1},
- ]
- cf_cfg = CloudFilterConfig(self, self.pf_intf)
- for rule in rules:
- cf_cfg.config_rule(**rule)
- cf_cfg.ethtool_add()
-
- self.send_and_verify(cf_cfg)
-
- cf_cfg.ethtool_delete()
-
- def test_bifurcated_driver(self):
- """
- Verify bifurcated driver work with dpdk VF and kernel VF
- """
- rules = [
- {'type': 'iip', 'iip': '192.168.1.1', 'vf': 0,
- 'queue': self.vf_queues - 1, 'loc': 1},
- {'type': 'iip', 'iip': '192.168.2.1', 'vf': 1, 'queue': 0,
- 'loc': 2}]
-
- dpdk_cfg = CloudFilterConfig(self, self.pf_intf)
- # fdir rule for dpdk VF
- dpdk_cfg.config_rule(**rules[0])
- dpdk_cfg.ethtool_add()
- self.send_and_verify(dpdk_cfg)
- # fdir rule for kernel VF
- kernel_cfg = CloudFilterConfig(self, self.pf_intf)
- kernel_cfg.config_rule(**rules[1])
- kernel_cfg.ethtool_add()
- self.send_and_verify(kernel_cfg, dpdk=False)
-
- pass
-
- def set_up(self):
- """
- Run before each test case.
- """
- self.setup_vf_env()
- pass
-
- def tear_down(self):
- """
- Run after each test case.
- """
- pass
-
- def tear_down_all(self):
- """
- Run after each test suite.
- """
- self.destroy_vf_env()
- pass
--
1.8.3.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [v2, 0/5] remove some run-down cases
2021-08-04 14:41 [dts] [v2, 0/5] remove some run-down cases Lijuan Tu
` (4 preceding siblings ...)
2021-08-04 14:41 ` [dts] [v2, 5/5] remove cloud_filter as it is no longer maintained Lijuan Tu
@ 2021-08-10 6:01 ` Tu, Lijuan
5 siblings, 0 replies; 8+ messages in thread
From: Tu, Lijuan @ 2021-08-10 6:01 UTC (permalink / raw)
To: dts
> -----Original Message-----
> From: Tu, Lijuan <lijuan.tu@intel.com>
> Sent: 2021年8月4日 22:42
> To: dts@dpdk.org
> Cc: Tu, Lijuan <lijuan.tu@intel.com>
> Subject: [v2, 0/5] remove some run-down cases
>
> some cases are not maintained for a long time.
>
> Lijuan Tu (5):
> generic_filter: remove perf test case
> nvgre: remove perf test cases
> vm_power_manager: remove perf test cases
> vxlan_sample: remove perf test case
> remove cloud_filter as it is no longer maintained
>
Applied the series except "4/5 vxlan_sample: remove perf test case" as the whole files are not existed in dts now.
^ permalink raw reply [flat|nested] 8+ messages in thread