* [dts] [PATCH V2] add filter lldp in sniff model
@ 2017-05-12 7:44 xu,huilong
2017-05-12 7:44 ` [dts] [PATCH V2] add fortville 25G NIC for this case xu,huilong
` (11 more replies)
0 siblings, 12 replies; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
fortville nic will auto send lldp packet when use dpdk driver.
so should filter lldp packet in nvgre and vxlan checksum offload case
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_nvgre.py | 2 +-
tests/TestSuite_vxlan.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py
index 015aa9f..6b838b4 100644
--- a/tests/TestSuite_nvgre.py
+++ b/tests/TestSuite_nvgre.py
@@ -575,7 +575,7 @@ class TestNvgre(TestCase):
self.tester.send_expect("rm -rf %s" % config.capture_file, "# ")
# save the capture packet into pcap format
self.tester.scapy_background()
- self.tester.scapy_append('p=sniff(iface="%s",count=1,timeout=5)' % self.tester_rx_iface)
+ self.tester.scapy_append('p=sniff(iface="%s",filter="ether[12:2]!=0x88cc",count=1,timeout=5)' % self.tester_rx_iface)
self.tester.scapy_append('wrpcap(\"%s\", p)' % config.capture_file)
self.tester.scapy_foreground()
diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
index 5fef9d9..411ce22 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -446,7 +446,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
# save the capture packet into pcap format
self.tester.scapy_background()
self.tester.scapy_append(
- 'p=sniff(iface="%s",count=1,timeout=5)' % self.recv_iface)
+ 'p=sniff(iface="%s",filter="ether[12:2]!=0x88cc",count=1,timeout=5)' % self.recv_iface)
self.tester.scapy_append(
'wrpcap(\"%s\", p)' % config.capture_file)
self.tester.scapy_foreground()
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH V2] add fortville 25G NIC for this case
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-12 8:47 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 1/2] add link bonding rss dynamic config test plane xu,huilong
` (10 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
add new NIC fortville 25G for tso test suite
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_tso.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 00f7539..0689291 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -55,7 +55,7 @@ class TestTSO(TestCase):
self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
"82540EM", "springfountain", "fortville_eagle",
"fortville_spirit", "fortville_spirit_single",
- "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
+ "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV","fortville_25g"],
"NIC Unsupported: " + str(self.nic))
# Based on h/w type, choose how many ports to use
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH 1/2] add link bonding rss dynamic config test plane
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
2017-05-12 7:44 ` [dts] [PATCH V2] add fortville 25G NIC for this case xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-15 2:30 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH] fix check packet failure by lldp have different packet size xu,huilong
` (9 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
add a new case in pmd rss hash test plane. in new dpdk, bond device support
rss hash config.
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
| 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--git a/test_plans/pmdrss_hash_test_plan.rst b/test_plans/pmdrss_hash_test_plan.rst
index 4922d3b..eda7103 100644
--- a/test_plans/pmdrss_hash_test_plan.rst
+++ b/test_plans/pmdrss_hash_test_plan.rst
@@ -149,4 +149,23 @@ Test Case: test_simple_symmetric
The same as the above two test cases. Just pay attention to set the hash function to "simple xor"
+Test Case: test_dynamic_rss_bond_config
+=================================
+This case test bond slaves will auto sync rss hash config, so it only support fortville nic.
+#1. set up testpmd woth fortville NICs::
+./testpmd -c f -n 4 -- -i --portmask 0x3 --txqflags=0
+#2 creat bond device with mode 3::
+ create bonded device 3 0
+#3 add slave to bond device::
+ add bonding slave 0 2
+ add bonding slave 1 2
+#4 get default hash algorithm on slave::
+ get_hash_global_config 0
+ get_hash_global_config 1
+#5 set hash algorithm on slave 0::
+ set_hash_global_config 0 simple_xor ipv4-other enable
+#6 get hash algorithm on slave 0 and 1::
+ get_hash_global_config 0
+ get_hash_global_config 1
+#7 check slave 0 and 1 use same hash algorithm
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH] fix check packet failure by lldp have different packet size
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
2017-05-12 7:44 ` [dts] [PATCH V2] add fortville 25G NIC for this case xu,huilong
2017-05-12 7:44 ` [dts] [PATCH 1/2] add link bonding rss dynamic config test plane xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-15 2:54 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix test app compile error xu,huilong
` (8 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
fortville will send different size lldp packet, so should update chcek function.
now we know lldp size is 110 or 100 in dpdk17.05 by debug.
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
framework/pmd_output.py | 5 ++++-
framework/settings.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index ca361a7..8fdf4c9 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -203,8 +203,11 @@ class PmdOutput():
so should used (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp']
for check tx_bytes count right
"""
- return not (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp']
+ flage = 1
+ for size in PROTOCOL_PACKET_SIZE['lldp']:
+ flage = flage and (tx_bytes - exp_bytes) % size
+ return not flage
def get_port_vlan_offload(self, port_id):
"""
Function: get the port vlan settting info.
diff --git a/framework/settings.py b/framework/settings.py
index 342314d..3839859 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -173,7 +173,7 @@ HEADER_SIZE = {
dpdk send protocol packet size.
"""
PROTOCOL_PACKET_SIZE = {
- 'lldp': 110,
+ 'lldp': [110,100],
}
"""
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH V2] fix test app compile error
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (2 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH] fix check packet failure by lldp have different packet size xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-12 8:57 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix timeout when setup dpdk app xu,huilong
` (7 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
dpdk update code tree alrady, so should update compile test app compile for test
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_unit_tests_pmd_perf.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py
index a3284a0..7fc200e 100644
--- a/tests/TestSuite_unit_tests_pmd_perf.py
+++ b/tests/TestSuite_unit_tests_pmd_perf.py
@@ -71,12 +71,12 @@ class TestUnitTestsPmdPerf(TestCase):
[arch, machine, env, toolchain] = self.target.split('-')
self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/' config/common_%s" % env, "# ", 30)
self.dut.build_install_dpdk(self.target)
- out = self.dut.build_dpdk_apps('./app/test/')
+ out = self.dut.build_dpdk_apps('./test/test/')
self.verify('make: Leaving directory' in out, "Compilation failed")
- self.dut.send_expect("mv -f ./app/test/test ./app/test/test_scalar", "# ")
+ self.dut.send_expect("mv -f ./test/test/test ./test/test/test_scalar", "# ")
self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/' config/common_%s" % env, "# ", 30)
self.dut.build_install_dpdk(self.target)
- out = self.dut.build_dpdk_apps('./app/test/')
+ out = self.dut.build_dpdk_apps('./test/test/')
self.verify('make: Leaving directory' in out, "Compilation failed")
def set_up(self):
@@ -90,7 +90,7 @@ class TestUnitTestsPmdPerf(TestCase):
Run pmd stream control mode burst test case.
"""
- self.dut.send_expect("./app/test/test -n 1 -c f", "R.*T.*E.*>.*>", 60)
+ self.dut.send_expect("./test/test/test -n 1 -c f", "R.*T.*E.*>.*>", 60)
for mode in self.burst_ctlmodes:
self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 10)
out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120)
@@ -113,9 +113,9 @@ class TestUnitTestsPmdPerf(TestCase):
for mode in self.rxtx_modes:
if mode is "scalar":
- self.dut.send_expect("./app/test/test_scalar -n 1 -c f", "R.*T.*E.*>.*>", 60)
+ self.dut.send_expect("./test/test/test_scalar -n 1 -c f", "R.*T.*E.*>.*>", 60)
else:
- self.dut.send_expect("./app/test/test -n 1 -c f", "R.*T.*E.*>.*>", 60)
+ self.dut.send_expect("./test/test/test -n 1 -c f", "R.*T.*E.*>.*>", 60)
table_row = [mode]
self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10)
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH V2] fix timeout when setup dpdk app
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (3 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH V2] fix test app compile error xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-12 9:01 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix user space ethtool failed case xu,huilong
` (6 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
dpdk setup info update in dpdk17.05, so must changed check info in test case
now in this change, need update ipfrag/ip_ressembly/kni/quota_watermak example
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_ipfrag.py | 2 +-
tests/TestSuite_ipv4_reassembly.py | 2 +-
tests/TestSuite_kni.py | 2 +-
tests/TestSuite_quota_watermark.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py
index d2a1dbb..f23dbe1 100644
--- a/tests/TestSuite_ipfrag.py
+++ b/tests/TestSuite_ipfrag.py
@@ -133,7 +133,7 @@ l3fwd_ipv4_route_array[] = {\\\n"
# run ipv4_frag
self.dut.send_expect("examples/ip_fragmentation/build/ip_fragmentation -c %s -n %d -- -p %s -q %s" % (
- coremask, self.dut.get_memory_channels(), portmask, numPortThread), "IP_FRAG:", 120)
+ coremask, self.dut.get_memory_channels(), portmask, numPortThread), "Link Up", 120)
time.sleep(2)
self.txItf = self.tester.get_interface(self.tester.get_local_port(P0))
diff --git a/tests/TestSuite_ipv4_reassembly.py b/tests/TestSuite_ipv4_reassembly.py
index 8f28823..c730fd6 100644
--- a/tests/TestSuite_ipv4_reassembly.py
+++ b/tests/TestSuite_ipv4_reassembly.py
@@ -128,7 +128,7 @@ class TestIpReassembly(TestCase):
command = ('./examples/ip_reassembly/build/ip_reassembly -c {core_mask} ' +
'-n {memory_channels} -- -p {dut_port_mask} ' +
'--maxflows={maxflows} --flowttl={flowttl} {extra_args}')
- self.dut.send_expect(command.format(**self.test_config.__dict__), 'IP_RSMBL: ')
+ self.dut.send_expect(command.format(**self.test_config.__dict__), 'Link Up')
def tcp_ipv4_fragments(self, src_ip, identifier):
"""
diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 0825903..acd6230 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -307,7 +307,7 @@ class TestKni(TestCase):
out_kni = self.dut.send_expect(
'./examples/kni/build/app/kni -c %s -n %d -- -P -p %s %s &' %
(core_mask, self.dut.get_memory_channels(), port_mask, config_param),
- "APP: Lcore [0-9]+ is reading from port [0-9]+", 20)
+ "Link Up", 20)
time.sleep(5)
if kthread_mode == 'single':
diff --git a/tests/TestSuite_quota_watermark.py b/tests/TestSuite_quota_watermark.py
index 94957e2..72556ab 100644
--- a/tests/TestSuite_quota_watermark.py
+++ b/tests/TestSuite_quota_watermark.py
@@ -146,7 +146,7 @@ class TestQuotaWatermark(TestCase, IxiaPacketGenerator):
# file
time.sleep(15)
result = self.dut.send_expect('cat output.log', '# ')
- self.verify('USER1: receive_stage() started' in result,
+ self.verify('probe driver:' in result,
'qw app failed to execute')
self.execute_qwctl_app(memory_channels)
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH V2] fix user space ethtool failed case
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (4 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH V2] fix timeout when setup dpdk app xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-12 9:07 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH] remove --crc-strip parameter in testpmd xu,huilong
` (5 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
1. update user space ethtool compile error, becauese the example path update in dpdk already
2. kernel space ethtool dump nic eeprom file size differnet dpdk user space ethtool, so should
cat out dpdk ethtool dump nic eeprom file and the file size same with kernel ethtool. then use
file md5 check the file is same
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_userspace_ethtool.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 937a9e5..36ff104 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -61,7 +61,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
self.verify("Error" not in out, "compilation error 1")
self.verify("No such file" not in out, "compilation error 2")
- path = "./examples/ethtool/ethtool-app/ethtool-app/%s/ethtool" % self.target
+ path = "./examples/ethtool/ethtool-app/%s/ethtool" % self.target
self.cmd = "%s -c f -n %d" % (path, self.dut.get_memory_channels())
# pause frame basic configuration
@@ -370,7 +370,9 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
self.dut.send_expect("ethtool --eeprom-dump %s raw on > %s" % (intf, ethtool_eeprom), "# ")
# wait for file ready
time.sleep(2)
- portinfo['ethtool_eeprom'] = ethtool_eeprom
+ dpdk_eeprom_size = int(self.dut.send_expect('ls -all %s' % portinfo['eeprom_file'], '# ').split(' ')[4].strip())
+ self.dut.send_expect('dd if=%s of=%s bs=%d count=1' % (ethtool_eeprom, "ethtool_eeprom_%d_cat.bin" % index, dpdk_eeprom_size), "#")
+ portinfo['ethtool_eeprom'] = "ethtool_eeprom_%d_cat.bin" % index
# bind to original driver
portinfo['net_dev'].bind_driver(portinfo['ori_driver'])
@@ -499,8 +501,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
for index in range(len(self.ports)):
port = self.ports[index]
ori_rx_pkts, _ = self.strip_portstats(index)
+ time.sleep(10)
# stop port
self.dut.send_expect("stop %d" % index, "EthApp>")
+ time.sleep(10)
# check packet not forwarded when port is stop
pkt = Packet()
tester_port = self.tester.get_local_port(port)
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH] remove --crc-strip parameter in testpmd
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (5 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH V2] fix user space ethtool failed case xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-12 9:10 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 1/2] update fdir test case xu,huilong
` (4 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
testpmd remove --crc-strip parameter, because default enable crc strip.
if want use disable crc-strip, must use --disable-crc-strip
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_checksum_offload.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 54e5001..5f5547f 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -67,7 +67,7 @@ class TestChecksumOffload(TestCase):
"""
self.pmdout.start_testpmd("Default", "--portmask=%s " %
(self.portMask) + "--disable-hw-vlan --enable-rx-cksum " +
- "--crc-strip --port-topology=loop", socket=self.ports_socket)
+ "--port-topology=loop", socket=self.ports_socket)
self.dut.send_expect("set verbose 1", "testpmd>")
self.dut.send_expect("set fwd csum", "testpmd>")
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH 1/2] update fdir test case
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (6 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH] remove --crc-strip parameter in testpmd xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-15 2:19 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] update testpmd path in dpdk xu,huilong
` (3 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
update list:
1. support fortville 25G NIC
2. add three case for fortville
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_fdir.py | 367 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 353 insertions(+), 14 deletions(-)
diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py
index aa0ec52..44f1e96 100644
--- a/tests/TestSuite_fdir.py
+++ b/tests/TestSuite_fdir.py
@@ -64,7 +64,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
#
###########################################################################
- def send_and_verify(self, condition, packet):
+ def send_and_verify(self, condition, packet, queueid = -2):
"""
Send packages and verify behavior.
"""
@@ -78,7 +78,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
out = self.dut.get_session_output()
self.dut.send_expect("stop", "testpmd>")
- if(self.nic in ["kawela", "niantic", "fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if(self.nic in ["kawela", "niantic", "fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
if ("fwd" == self.fdir_type):
if condition:
self.queue = 2
@@ -89,6 +89,8 @@ class TestFdir(TestCase, IxiaPacketGenerator):
self.queue = 0
else:
self.queue = -1
+ else:
+ self.queue = queueid
result_scanner = r"port ([0-9]+)/queue ([0-9]+): received ([0-9]+) packets\s*src=[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2} - dst=[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}"
scanner = re.compile(result_scanner, re.DOTALL)
@@ -205,7 +207,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
Fdir Performance Benchmarking set rules
"""
self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
- if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
self.dut.send_expect("flow_director_flex_payload %s l2 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
self.dut.send_expect("flow_director_flex_payload %s l3 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
self.dut.send_expect("flow_director_flex_payload %s l4 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
@@ -221,7 +223,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
Fdir get flexbytes and payload according NIC
"""
- if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
if not sctp:
self.flexbytes = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
else:
@@ -297,7 +299,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IP(src="192.168.0.1", dst="192.168.0.2", frag=1, flags="MF")/Raw(load="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
@@ -316,7 +318,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
if self.nic in ["niantic"]:
# Niantic ipv6 only support signature mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
- elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]:
# Fortville ipv6 support perfect mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -373,7 +375,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv6 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-other src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-frag src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888", nh=44)/IPv6ExtHdrFragment()/Raw(load="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
@@ -441,7 +443,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
@@ -460,7 +462,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
def test_fdir_noflexword_drop_ipv6(self):
# drop not support signature mode, niantic only can work in signature mode with ipv6
# Niantic is not support in drop ipv6
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]:
# drop command testing
self.dut.kill_all()
@@ -563,7 +565,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IP(src="192.168.0.1", dst="192.168.0.2", frag=1, flags="MF")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
@@ -601,7 +603,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
if self.nic in ["niantic"]:
# Niantic ipv6 only support signature mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
- elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]:
# fortville ipv6 support perfect mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -657,7 +659,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv6 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-other src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-frag src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888", nh=44)/IPv6ExtHdrFragment()/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
@@ -707,7 +709,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
@@ -726,7 +728,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
def test_fdir_flexword_drop_ipv6(self):
# drop not support signature mode, niantic only can work in signature mode with ipv6
# Niantic is not support in drop ipv6
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
# drop testing with flexword
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -764,6 +766,343 @@ class TestFdir(TestCase, IxiaPacketGenerator):
self.dut.send_expect("quit", "# ", 30)
+ def test_ipv4_tos_proto_ttl(self):
+ """
+ Expand Flow Director for fortville to support ipv4 TOS, ipv4 PROTO, ipv4 TTL
+ """
+ if not self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g"]:
+ self.verify(False, "This case only support fortville nic")
+ self.dut.kill_all()
+ self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+ self.fdir_set_rule()
+ self.fdir_get_flexbytes()
+ # fwd comand testing
+ self.fdir_type = " "
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other none select" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other src-ipv4 add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other dst-ipv4 add" % self.dut_ports[0], "testpmd>")
+
+ # test add and remove tso rule
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-tos add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=8, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=8, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove proto reul
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-proto add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=253, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=254, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=253, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=254, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove ttl rule
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-ttl add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ def test_fdir_ipv6_tc(self):
+ """
+ Expand Flow Director for fortville to support ipv6 TC, next-header, hop-limits
+ """
+ if not self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g"]:
+ self.verify(False, "This case only support fortville nic")
+ self.dut.kill_all()
+ self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+ self.fdir_set_rule()
+ self.fdir_get_flexbytes()
+ # fwd comand testing
+ self.fdir_type = " "
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other none select" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other src-ipv6 add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other dst-ipv6 add" % self.dut_ports[0], "testpmd>")
+
+ # test add and remove ipv6 tc reul
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-tc add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=8, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=8, nh=255, hlim=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove pv6-next-header reul
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-next-header add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=254, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=254, hlim=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove ipv6-hop-limits rule
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-hop-limits add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ def test_fdir_ivlan(self):
+ """
+ Expand Flow Director for fortville to support ipv4 TOS, ipv4 PROTO, ipv4 TTL
+ """
+ if not self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g"]:
+ self.verify(False, "This case only support fortville nic")
+ self.dut.kill_all()
+ self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+ self.fdir_type = " "
+ self.dut.send_expect("set_fdir_input_set %d ipv4-udp ivlan add" % self.dut_ports[0], "testpmd>")
+
+
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002 \
+ tos 2 ttl 40 vlan 1 flexbytes () fwd pf queue 1 fd_id 1"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 15 flexbytes () fwd pf queue 2 fd_id 2"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 255 flexbytes () fwd pf queue 3 fd_id 3"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 4095 flexbytes () fwd pf queue 3 fd_id 4"
+ % self.dut_ports[0], "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=1) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 1)
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=15) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 2)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=255) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 3)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=4095) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 3)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 1 flexbytes () fwd pf queue 1 fd_id 1"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 15 flexbytes () fwd pf queue 2 fd_id 2"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 255 flexbytes () fwd pf queue 3 fd_id 3"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 4095 flexbytes () fwd pf queue 3 fd_id 4"
+ % self.dut_ports[0], "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=1) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=15) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=255) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=4095) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+
+
+
def failed_test_fdir_flush(self):
"""
FDir flush in Fortville.
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH V2] update testpmd path in dpdk
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (7 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH 1/2] update fdir test case xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-12 9:12 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 2/2] add link bond slave dynamic config test case xu,huilong
` (2 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
dpdk code tree update already, so should update setup testpmd cmdline
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_dynamic_config.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_dynamic_config.py b/tests/TestSuite_dynamic_config.py
index b4ddede..25986cb 100644
--- a/tests/TestSuite_dynamic_config.py
+++ b/tests/TestSuite_dynamic_config.py
@@ -74,7 +74,7 @@ class TestDynamicConfig(TestCase):
self.portMask = utils.create_mask(self.dut_ports[:2])
# launch app
- cmd = "./%s/app/testpmd -c %s -n 3 -- -i --rxpt=0 \
+ cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --rxpt=0 \
--rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.target, self.coreMask, self.portMask)
if "cavium" in self.dut.nic_type:
@@ -115,7 +115,7 @@ class TestDynamicConfig(TestCase):
"""
Run before each test case.
"""
- cmd = "./%s/app/testpmd -c %s -n 3 -- -i --rxpt=0 \
+ cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --rxpt=0 \
--rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.target, self.coreMask, self.portMask)
if "cavium" in self.dut.nic_type:
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH 2/2] add link bond slave dynamic config test case
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (8 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH V2] update testpmd path in dpdk xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-12 8:53 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 2/2] update fdir test plane xu,huilong
2017-05-12 8:45 ` [dts] [PATCH V2] add filter lldp in sniff model Liu, Yong
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
update list:
1 add link bond slave dynamic config test case
2 use two port for this suite
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
| 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
--git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index 78ae34d..fd032f4 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -417,10 +417,10 @@ class TestPmdrssHash(TestCase):
"""
self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
+ "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV","fortville_25g"],
"NIC Unsupported: " + str(self.nic))
global reta_num
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV","fortville_25g"]:
reta_num = 512
elif self.nic in ["niantic"]:
reta_num = 128
@@ -429,7 +429,7 @@ class TestPmdrssHash(TestCase):
else:
self.verify(False, "NIC Unsupported:%s" % str(self.nic))
ports = self.dut.get_ports(self.nic)
- self.verify(len(ports) >= 1, "Not enough ports available")
+ self.verify(len(ports) >= 2, "Not enough ports available")
def set_up(self):
"""
@@ -651,6 +651,32 @@ class TestPmdrssHash(TestCase):
self.dut.send_expect("quit", "# ", 30)
+ def test_dynamic_rss_bond_config(self):
+ self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i --txqflags=0" % self.target, "testpmd> ", 120)
+ out = self.dut.send_expect("create bonded device 3 0", "testpmd> ", 30)
+ bond_device_id = int(re.search("port \d+", out).group().split(" ")[-1].strip())
+ self.verify(bond_device_id > 1, "not enought port for bonded test")
+ self.dut.send_expect("add bonding slave 0 %d" % bond_device_id, "testpmd>", 30)
+ self.dut.send_expect("add bonding slave 1 %d" % bond_device_id, "testpmd>", 30)
+ out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
+ slave0_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
+ out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
+ slave1_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
+ self.verify(slave0_hash_function == slave1_hash_function, "default hash function not match")
+ new_hash_function = ""
+ for hash_function in ["toeplitz", "simple_xor"]:
+ if slave0_hash_function[-3:].lower() != hash_function[-3:]:
+ new_hash_function = hash_function
+ self.dut.send_expect("set_hash_global_config 0 %s ipv4-other enable" % new_hash_function, "testpmd>")
+ out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
+ slave0_new_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
+ out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
+ slave1_new_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
+ self.verify(slave0_new_hash_function == slave1_new_hash_function, "bond slave auto sync hash function failed")
+ self.verify(slave0_new_hash_function[-3:].lower() == new_hash_function[-3:], "changed slave hash function failed")
+ self.dut.send_expect("remove bonding slave 0 %d" % bond_device_id, "testpmd>", 30)
+ self.dut.send_expect("remove bonding slave 1 %d" % bond_device_id, "testpmd>", 30)
+ self.dut.send_expect("quit","# ", 30)
def tear_down(self):
"""
Run after each test case.
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dts] [PATCH 2/2] update fdir test plane
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (9 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH 2/2] add link bond slave dynamic config test case xu,huilong
@ 2017-05-12 7:44 ` xu,huilong
2017-05-15 2:16 ` Liu, Yong
2017-05-12 8:45 ` [dts] [PATCH V2] add filter lldp in sniff model Liu, Yong
11 siblings, 1 reply; 26+ messages in thread
From: xu,huilong @ 2017-05-12 7:44 UTC (permalink / raw)
To: dts; +Cc: xu,huilong
add fdir ivaln/ttl/PROTO test plane for fortville nic
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
test_plans/fdir_test_plan.rst | 366 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 365 insertions(+), 1 deletion(-)
diff --git a/test_plans/fdir_test_plan.rst b/test_plans/fdir_test_plan.rst
index 95a2926..3bbdfeb 100644
--- a/test_plans/fdir_test_plan.rst
+++ b/test_plans/fdir_test_plan.rst
@@ -77,7 +77,7 @@ be given but other fields must be as shown::
IP(src="192.168.0.1", dst="192.168.0.2")/GRE(proto=0xff)/IP()/UDP()
The test commands below assume that port 0 on the DUT is the port that is
-connected to the traffic generator. If this is not the case, the following
+connected to the traffic generator. All fdir cmdline please see doc on http://www.dpdk.org/doc/guides/testpmd_app_ug/testpmd_funcs.html#filter-functions. If this is not the case, the following
``testpmd`` commands must be changed, and also the ``--portmask`` parameter.
* ``show port fdir <port>``
@@ -684,3 +684,367 @@ and then to 0x0017. The packets should still match the filter:::
PKT_RX_PKT_RX_FDIR
PKT_RX_IP_CKSUM
PKT_RX_IPV4_HDR
+
+
+Test Case : test with ipv4 TOS, PROTO, TTL
+===========================================
+
+1) start testpmd and initialize flow director flex payload configuration::
+
+ ./testpmd -c fffff -n 4 -- -i --disable-rss --pkt-filter-mode=perfect --rxq=8 --txq=8 --nb-cores=8
+ testpmd> port stop 0
+ testpmd> flow_director_flex_payload 0 l2 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_payload 0 l3 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_payload 0 l4 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_mask 0 flow all (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff)
+ testpmd> port start 0
+ testpmd> set verbose 1
+ testpmd> set fwd rxonly
+ testpmd> start
+
+Note::
+ assume FLEXBYTES = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
+ assume payload = "\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88"
+
+2) setup the fdir input set of IPv4::
+
+ testpmd> set_fdir_input_set 0 ipv4-other none select
+ testpmd> set_fdir_input_set 0 ipv4-other src-ipv4 add
+ testpmd> set_fdir_input_set 0 ipv4-other dst-ipv4 add
+
+3) add ipv4-tos to fdir input set, set tos to 16 and 8::
+
+ testpmd> set_fdir_input_set 0 ipv4-other ipv4-tos add
+ setup flow director filter rules,
+
+rule_1::
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 16 proto 255 ttl 255 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 1 fd_id 1
+
+rule_2::
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 8 proto 255 ttl 255 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 2 fd_id 2
+
+send packet to DUT,
+
+packet_1::
+ 'sendp([Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2", tos=16, proto=255, ttl=255)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_1 should be received by queue 1.
+
+packet_2::
+ 'sendp([Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2", tos=8, proto=255, ttl=255)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_2 should be received by queue 2.
+
+delete rule_1, send packet_1 again, packet_1 should be received by queue 0.
+delete rule_2, send packet_2 again, packet_2 should be received by queue 0.
+
+4) add ipv4-proto to fdir input set, set proto to 253 and 254::
+
+ testpmd> set_fdir_input_set 0 ipv4-other ipv4-proto add
+
+setup flow director filter rules
+rule_3::
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 16 proto 253 ttl 255 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 3 fd_id 3
+
+rule_4::
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 8 proto 254 ttl 255 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 4 fd_id 4
+
+send packet to DUT,
+
+packet_3::
+ 'sendp([Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2", tos=16, proto=253, ttl=255)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_3 should be received by queue 3.
+
+packet_4::
+ 'sendp([Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2", tos=8, proto=254, ttl=255)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_4 should be received by queue 4.
+
+delete rule_3, send packet_3 again, packet_3 should be received by queue 0.
+delete rule_4, send packet_4 again, packet_4 should be received by queue 0.
+
+5) test ipv4-ttl, set ttl to 32 and 64::
+
+ testpmd> set_fdir_input_set 0 ipv4-other ipv4-ttl add
+
+setup flow director filter rules,
+rule_5::
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 16 proto 253 ttl 32 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 5 fd_id 5
+
+rule_6::
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 8 proto 254 ttl 64 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 6 fd_id 6
+
+send packet to DUT,
+
+packet_5::
+ 'sendp([Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2", tos=16, proto=253, ttl=32)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_5 should be received by queue 5.
+
+packet_6::
+ 'sendp([Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2", tos=8, proto=254, ttl=64)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_6 should be received by queue 6.
+
+delete rule_5, send packet_5 again, packet_5 should be received by queue 0.
+delete rule_6, send packet_6 again, packet_6 should be received by queue 0.
+
+6) removed all entry of fdir::
+
+ testpmd>flush_flow_director 0
+ testpmd>show port fdir 0
+
+example::
+
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 16 proto 255 ttl 255 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 1 fd_id 1
+
+ flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 tos 8 proto 255 ttl 255 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 2 fd_id 2
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=255)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IP(src="192.168.1.1", dst="192.168.1.2", tos=8, proto=255, ttl=255)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+Test Case 2: test with ipv6 tc, next-header, hop-limits
+=======================================================
+1) start testpmd and initialize flow director flex payload configuration::
+
+ ./testpmd -c fffff -n 4 -- -i --disable-rss --pkt-filter-mode=perfect --rxq=8 --txq=8 --nb-cores=8
+ testpmd> port stop 0
+ testpmd> flow_director_flex_payload 0 l2 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_payload 0 l3 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_payload 0 l4 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_mask 0 flow all (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff)
+ testpmd> port start 0
+ testpmd> set verbose 1
+ testpmd> set fwd rxonly
+ testpmd> start
+
+Note::
+ assume FLEXBYTES = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
+ assume payload = "\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88"
+
+2) setup the fdir input set of IPv6::
+
+ testpmd> set_fdir_input_set 0 ipv6-other none select
+ testpmd> set_fdir_input_set 0 ipv6-other src-ipv6 add
+ testpmd> set_fdir_input_set 0 ipv6-other dst-ipv6 add
+
+3) add ipv6-tc to fdir input set, set tc to 16 and 8::
+
+ testpmd> set_fdir_input_set 0 ipv6-other ipv6-tc add
+
+setup flow director filter rules,
+
+rule_1::
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 16 proto 255 ttl 64 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 1 fd_id 1
+
+rule_2::
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 8 proto 255 ttl 64 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 2 fd_id 2
+
+send packet to DUT,
+
+packet_1::
+ 'sendp([Ether(dst="%s")/IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64)/Raw(%s)], iface="%s")' \
+ %(dst_mac, payload, itf)
+
+packet_1 should be received by queue 1.
+
+packet_2::
+ 'sendp([Ether(dst="%s")/IPv6(src="2000::1", dst="2000::2", tc=8, nh=255, hlim=64)/Raw(%s)], iface="%s")' \
+ %(dst_mac, payload, itf)
+
+packet_2 should be received by queue 2.
+
+delete rule_1, send packet_1 again, packet_1 should be received by queue 0.
+delete rule_2, send packet_2 again, packet_2 should be received by queue 0.
+
+4) add ipv6-next-header to fdir input set, set nh to 253 and 254::
+
+ testpmd> set_fdir_input_set 0 ipv6-other ipv6-next-header add
+
+setup flow director filter rules,
+rule_3::
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 16 proto 253 ttl 255 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 3 fd_id 3
+
+rule_4::
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 8 proto 254 ttl 255 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 4 fd_id 4
+
+send packet to DUT,
+
+packet_3::
+ 'sendp([Ether(dst="%s")/IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=64)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_3 should be received by queue 3.
+
+packet_4::
+ 'sendp([Ether(dst="%s")/IPv6(src="2000::1", dst="2000::2", tc=8, nh=254, hlim=64)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_4 should be received by queue 4.
+
+delete rule_3, send packet_3 again, packet_3 should be received by queue 0.
+delete rule_4, send packet_4 again, packet_4 should be received by queue 0.
+
+5) add ipv6-hop-limits to fdir input set, set hlim to 32 and 64::
+
+ testpmd> set_fdir_input_set 0 ipv6-other ipv6-hop-limits add
+
+setup flow director filter rules,
+rule_5::
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 16 proto 253 ttl 32 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 5 fd_id 5
+
+rule_6::
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 8 proto 254 ttl 64 vlan 0 \
+ flexbytes (FLEXBYTES) fwd pf queue 6 fd_id 6
+
+send packet to DUT,
+
+packet_5::
+ 'sendp([Ether(dst="%s")/IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=32)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_5 should be received by queue 5.
+
+packet_6::
+ 'sendp([Ether(dst="%s")/IPv6(src="2000::1", dst="2000::2", tc=8, nh=254, hlim=64)/Raw(%s)], iface="%s")'\
+ %(dst_mac, payload, itf)
+
+packet_6 should be received by queue 6.
+
+delete rule_5, send packet_5 again, packet_5 should be received by queue 0.
+delete rule_6, send packet_6 again, packet_6 should be received by queue 0.
+
+6) removed all entry of fdir::
+
+ testpmd>flush_flow_director 0
+ testpmd>show port fdir 0
+
+example::
+
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 16 proto 255 ttl 64 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 1 fd_id 1
+
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 8 proto 255 ttl 64 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 2 fd_id 2
+
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 16 proto 253 ttl 64 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 3 fd_id 3
+
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 8 proto 254 ttl 64 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 4 fd_id 4
+
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 16 proto 253 ttl 32 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 5 fd_id 5
+
+ flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst 2000::2 tos 8 proto 254 ttl 48 vlan 0 flexbytes (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88) fwd pf queue 6 fd_id 6
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IPv6(src="2000::1", dst="2000::2", tc=8, nh=255, hlim=64)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=64)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IPv6(src="2000::1", dst="2000::2", tc=8, nh=254, hlim=64)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=32)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+ sendp([Ether(src="00:00:00:00:00:01", dst="00:00:00:00:01:00")/IPv6(src="2000::1", dst="2000::2", tc=8, nh=254, hlim=48)/Raw(load="\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88")], iface="ens260f0")
+
+
+Test Case 3: test with ivlan (qinq not work)
+============================
+1) start testpmd and initialize flow director flex payload configuration::
+
+ ./testpmd -c fffff -n 4 -- -i --disable-rss --pkt-filter-mode=perfect --rxq=8 --txq=8 --nb-cores=8
+ testpmd> port stop 0
+ testpmd> flow_director_flex_payload 0 l2 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_payload 0 l3 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_payload 0 l4 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+ testpmd> flow_director_flex_mask 0 flow all (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff)
+ testpmd> port start 0
+
+ testpmd> vlan set qinq on 0
+
+ testpmd> set verbose 1
+ testpmd> set fwd rxonly
+ testpmd> start
+
+Note::
+ assume FLEXBYTES = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
+ assume payload = "\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88"
+
+2) setup the fdir input set::
+
+ testpmd> set_fdir_input_set 0 ipv4-udp none select
+ testpmd> set_fdir_input_set 0 ipv4-udp ivlan add
+
+
+3) setup flow director filter rules,
+
+rule_1::
+ flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 dst 192.168.1.2 1022 tos 16 ttl 255 \
+ vlan 1 flexbytes (FLEXBYTES) fwd pf queue 1 fd_id 1
+
+rule_2::
+ flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 dst 192.168.1.2 1022 tos 16 ttl 255 \
+ vlan 15 flexbytes (FLEXBYTES) fwd pf queue 2 fd_id 2
+
+rule_3::
+ flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 dst 192.168.1.2 1022 tos 16 ttl 255 \
+ vlan 255 flexbytes (FLEXBYTES) fwd pf queue 3 fd_id 3
+
+rule_4::
+ flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 dst 192.168.1.2 1022 tos 16 ttl 255 \
+ vlan 4095 flexbytes (FLEXBYTES) fwd pf queue 4 fd_id 4
+
+4) send packet to DUT,
+
+packet_1::
+
+ 'sendp([Ether(dst="%s")/Dot1Q(id=0x8100,vlan=16)/Dot1Q(id=0x8100,vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2", \
+ tos=16, ttl=255)/UDP(sport="1021",dport="1022")/Raw(%s)], iface="%s")' % (dst_mac, payload, itf)
+
+packet_1 should be received by queue 1.
+
+packet_2::
+ 'sendp([Ether(dst="%s")/Dot1Q(id=0x8100,vlan=16)/Dot1Q(id=0x8100,vlan=15)/IP(src="192.168.0.1",dst="192.168.0.2", \
+ tos=16, ttl=255)/UDP(sport="1021",dport="1022")/Raw(%s)], iface="%s")' % (dst_mac, payload, itf)
+
+packet_2 should be received by queue 2.
+
+packet_3::
+ 'sendp([Ether(dst="%s")/Dot1Q(id=0x8100,vlan=16)/Dot1Q(id=0x8100,vlan=255)/IP(src="192.168.0.1",dst="192.168.0.2", \
+ tos=16, ttl=255)/UDP(sport="1021",dport="1022")/Raw(%s)], iface="%s")' % (dst_mac, payload, itf)
+
+packet_3 should be received by queue 3.
+
+packet_4::
+ 'sendp([Ether(dst="%s")/Dot1Q(id=0x8100,vlan=16)/Dot1Q(id=0x8100,vlan=4095)/IP(src="192.168.0.1",dst="192.168.0.2", \
+ tos=16, ttl=255)/UDP(sport="1021",dport="1022")/Raw(%s)], iface="%s")' % (dst_mac, payload, itf)
+
+packet_4 should be received by queue 4.
+
+delete rule_1, send packet_1 again, packet_1 should be received by queue 0.
+delete rule_2, send packet_2 again, packet_2 should be received by queue 0.
+delete rule_3, send packet_3 again, packet_3 should be received by queue 0.
+delete rule_4, send packet_4 again, packet_4 should be received by queue 0.
+
+5) removed all entry of fdir::
+
+ testpmd>flush_flow_director 0
+ testpmd>show port fdir 0
+
--
1.9.3
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH V2] add filter lldp in sniff model
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
` (10 preceding siblings ...)
2017-05-12 7:44 ` [dts] [PATCH 2/2] update fdir test plane xu,huilong
@ 2017-05-12 8:45 ` Liu, Yong
11 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 8:45 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied with some comments modified.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> fortville nic will auto send lldp packet when use dpdk driver.
> so should filter lldp packet in nvgre and vxlan checksum offload case
>
> Signed-off-by: xu,huilong<huilongx.xu@intel.com>
> ---
> tests/TestSuite_nvgre.py | 2 +-
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH V2] add fortville 25G NIC for this case
2017-05-12 7:44 ` [dts] [PATCH V2] add fortville 25G NIC for this case xu,huilong
@ 2017-05-12 8:47 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 8:47 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> add new NIC fortville 25G for tso test suite
>
> Signed-off-by: xu,huilong<huilongx.xu@intel.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH 2/2] add link bond slave dynamic config test case
2017-05-12 7:44 ` [dts] [PATCH 2/2] add link bond slave dynamic config test case xu,huilong
@ 2017-05-12 8:53 ` Liu, Yong
2017-05-15 1:08 ` Xu, HuilongX
0 siblings, 1 reply; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 8:53 UTC (permalink / raw)
To: xu,huilong, dts
Huilong,
Some comments below.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> update list:
> 1 add link bond slave dynamic config test case
> 2 use two port for this suite
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
> tests/TestSuite_pmdrss_hash.py | 32 +++++++++++++++++++++++++++++---
> 1 file changed, 29 insertions(+), 3 deletions(-)
>
> diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
> index 78ae34d..fd032f4 100644
> --- a/tests/TestSuite_pmdrss_hash.py
> +++ b/tests/TestSuite_pmdrss_hash.py
> @@ -417,10 +417,10 @@ class TestPmdrssHash(TestCase):
> """
>
> self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
> - "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
> + "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV","fortville_25g"],
Here contain pep8 issue, please check with pep8 tool.
> "NIC Unsupported: " + str(self.nic))
> global reta_num
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV","fortville_25g"]:
> reta_num = 512
> elif self.nic in ["niantic"]:
> reta_num = 128
> @@ -429,7 +429,7 @@ class TestPmdrssHash(TestCase):
> else:
> self.verify(False, "NIC Unsupported:%s" % str(self.nic))
> ports = self.dut.get_ports(self.nic)
> - self.verify(len(ports) >= 1, "Not enough ports available")
> + self.verify(len(ports) >= 2, "Not enough ports available")
We are trying to limit port usage, is this case must use two ports?
>
> def set_up(self):
> """
> @@ -651,6 +651,32 @@ class TestPmdrssHash(TestCase):
>
> self.dut.send_expect("quit", "# ", 30)
>
> + def test_dynamic_rss_bond_config(self):
> + self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i --txqflags=0" % self.target, "testpmd> ", 120)
> + out = self.dut.send_expect("create bonded device 3 0", "testpmd> ", 30)
> + bond_device_id = int(re.search("port \d+", out).group().split(" ")[-1].strip())
> + self.verify(bond_device_id > 1, "not enought port for bonded test")
Please add some space line between different blocks. And add one comment
line to describe the code block.
It will more readable and easier for later maintenance.
> + self.dut.send_expect("add bonding slave 0 %d" % bond_device_id, "testpmd>", 30)
> + self.dut.send_expect("add bonding slave 1 %d" % bond_device_id, "testpmd>", 30)
> + out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
> + slave0_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
> + out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
> + slave1_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
> + self.verify(slave0_hash_function == slave1_hash_function, "default hash function not match")
> + new_hash_function = ""
> + for hash_function in ["toeplitz", "simple_xor"]:
> + if slave0_hash_function[-3:].lower() != hash_function[-3:]:
> + new_hash_function = hash_function
> + self.dut.send_expect("set_hash_global_config 0 %s ipv4-other enable" % new_hash_function, "testpmd>")
> + out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
> + slave0_new_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
> + out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
> + slave1_new_hash_function = re.search("Hash function is .+", out).group().split(" ")[-1].strip()
> + self.verify(slave0_new_hash_function == slave1_new_hash_function, "bond slave auto sync hash function failed")
> + self.verify(slave0_new_hash_function[-3:].lower() == new_hash_function[-3:], "changed slave hash function failed")
> + self.dut.send_expect("remove bonding slave 0 %d" % bond_device_id, "testpmd>", 30)
> + self.dut.send_expect("remove bonding slave 1 %d" % bond_device_id, "testpmd>", 30)
> + self.dut.send_expect("quit","# ", 30)
> def tear_down(self):
> """
> Run after each test case.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH V2] fix test app compile error
2017-05-12 7:44 ` [dts] [PATCH V2] fix test app compile error xu,huilong
@ 2017-05-12 8:57 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 8:57 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> dpdk update code tree alrady, so should update compile test app compile for test
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH V2] fix timeout when setup dpdk app
2017-05-12 7:44 ` [dts] [PATCH V2] fix timeout when setup dpdk app xu,huilong
@ 2017-05-12 9:01 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 9:01 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> dpdk setup info update in dpdk17.05, so must changed check info in test case
> now in this change, need update ipfrag/ip_ressembly/kni/quota_watermak example
>
> Signed-off-by: xu,huilong<huilongx.xu@intel.com>
> ---
> tests/TestSuite_ipfrag.py | 2 +-
> tests/TestSuite_ipv4_reassembly.py | 2 +-
> tests/TestSuite_kni.py | 2 +-
> tests/TestSuite_quota_watermark.py | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH V2] fix user space ethtool failed case
2017-05-12 7:44 ` [dts] [PATCH V2] fix user space ethtool failed case xu,huilong
@ 2017-05-12 9:07 ` Liu, Yong
2017-05-15 1:27 ` Xu, HuilongX
0 siblings, 1 reply; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 9:07 UTC (permalink / raw)
To: xu,huilong, dts
Huilong, some comments below.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> 1. update user space ethtool compile error, becauese the example path update in dpdk already
> 2. kernel space ethtool dump nic eeprom file size differnet dpdk user space ethtool, so should
> cat out dpdk ethtool dump nic eeprom file and the file size same with kernel ethtool. then use
> file md5 check the file is same
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
> tests/TestSuite_userspace_ethtool.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
> index 937a9e5..36ff104 100644
> --- a/tests/TestSuite_userspace_ethtool.py
> +++ b/tests/TestSuite_userspace_ethtool.py
> @@ -61,7 +61,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
> self.verify("Error" not in out, "compilation error 1")
> self.verify("No such file" not in out, "compilation error 2")
>
> - path = "./examples/ethtool/ethtool-app/ethtool-app/%s/ethtool" % self.target
> + path = "./examples/ethtool/ethtool-app/%s/ethtool" % self.target
> self.cmd = "%s -c f -n %d" % (path, self.dut.get_memory_channels())
>
> # pause frame basic configuration
> @@ -370,7 +370,9 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
> self.dut.send_expect("ethtool --eeprom-dump %s raw on > %s" % (intf, ethtool_eeprom), "# ")
> # wait for file ready
> time.sleep(2)
> - portinfo['ethtool_eeprom'] = ethtool_eeprom
> + dpdk_eeprom_size = int(self.dut.send_expect('ls -all %s' % portinfo['eeprom_file'], '# ').split(' ')[4].strip())
There's one simple command "stat -c \%s file" to strip file size.
> + self.dut.send_expect('dd if=%s of=%s bs=%d count=1' % (ethtool_eeprom, "ethtool_eeprom_%d_cat.bin" % index, dpdk_eeprom_size), "#")
> + portinfo['ethtool_eeprom'] = "ethtool_eeprom_%d_cat.bin" % index
> # bind to original driver
> portinfo['net_dev'].bind_driver(portinfo['ori_driver'])
>
> @@ -499,8 +501,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
> for index in range(len(self.ports)):
> port = self.ports[index]
> ori_rx_pkts, _ = self.strip_portstats(index)
> + time.sleep(10)
> # stop port
> self.dut.send_expect("stop %d" % index, "EthApp>")
> + time.sleep(10)
Sleep 20 seconds seem too long, please explain why need this.
> # check packet not forwarded when port is stop
> pkt = Packet()
> tester_port = self.tester.get_local_port(port)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH] remove --crc-strip parameter in testpmd
2017-05-12 7:44 ` [dts] [PATCH] remove --crc-strip parameter in testpmd xu,huilong
@ 2017-05-12 9:10 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 9:10 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> testpmd remove --crc-strip parameter, because default enable crc strip.
> if want use disable crc-strip, must use --disable-crc-strip
>
> Signed-off-by: xu,huilong<huilongx.xu@intel.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH V2] update testpmd path in dpdk
2017-05-12 7:44 ` [dts] [PATCH V2] update testpmd path in dpdk xu,huilong
@ 2017-05-12 9:12 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-12 9:12 UTC (permalink / raw)
To: xu,huilong, dts
Huilong,
testpmd still existed in its original place. Please check it out.
Thanks,
Marvin
On 05/12/2017 03:44 PM, xu,huilong wrote:
> dpdk code tree update already, so should update setup testpmd cmdline
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
> tests/TestSuite_dynamic_config.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/TestSuite_dynamic_config.py b/tests/TestSuite_dynamic_config.py
> index b4ddede..25986cb 100644
> --- a/tests/TestSuite_dynamic_config.py
> +++ b/tests/TestSuite_dynamic_config.py
> @@ -74,7 +74,7 @@ class TestDynamicConfig(TestCase):
> self.portMask = utils.create_mask(self.dut_ports[:2])
>
> # launch app
> - cmd = "./%s/app/testpmd -c %s -n 3 -- -i --rxpt=0 \
> + cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --rxpt=0 \
> --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.target, self.coreMask, self.portMask)
>
> if "cavium" in self.dut.nic_type:
> @@ -115,7 +115,7 @@ class TestDynamicConfig(TestCase):
> """
> Run before each test case.
> """
> - cmd = "./%s/app/testpmd -c %s -n 3 -- -i --rxpt=0 \
> + cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --rxpt=0 \
> --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.target, self.coreMask, self.portMask)
>
> if "cavium" in self.dut.nic_type:
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH 2/2] add link bond slave dynamic config test case
2017-05-12 8:53 ` Liu, Yong
@ 2017-05-15 1:08 ` Xu, HuilongX
0 siblings, 0 replies; 26+ messages in thread
From: Xu, HuilongX @ 2017-05-15 1:08 UTC (permalink / raw)
To: Liu, Yong, dts
Hi yong,
Thanks a lot
> -----Original Message-----
> From: Liu, Yong
> Sent: Friday, May 12, 2017 4:54 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: Re: [dts] [PATCH 2/2] add link bond slave dynamic config test case
>
> Huilong,
> Some comments below.
>
> On 05/12/2017 03:44 PM, xu,huilong wrote:
> > update list:
> > 1 add link bond slave dynamic config test case
> > 2 use two port for this suite
> >
> > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > ---
> > tests/TestSuite_pmdrss_hash.py | 32
> +++++++++++++++++++++++++++++---
> > 1 file changed, 29 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/TestSuite_pmdrss_hash.py
> > b/tests/TestSuite_pmdrss_hash.py index 78ae34d..fd032f4 100644
> > --- a/tests/TestSuite_pmdrss_hash.py
> > +++ b/tests/TestSuite_pmdrss_hash.py
> > @@ -417,10 +417,10 @@ class TestPmdrssHash(TestCase):
> > """
> >
> > self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
> > - "fortville_spirit_single", "redrockcanyou", "atwood",
> "boulderrapid", "fortpark_TLV"],
> > + "fortville_spirit_single", "redrockcanyou",
> > + "atwood", "boulderrapid", "fortpark_TLV","fortville_25g"],
>
> Here contain pep8 issue, please check with pep8 tool.
Yes, I will update this in next version.
> > "NIC Unsupported: " + str(self.nic))
> > global reta_num
> > - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single",
> "fortpark_TLV"]:
> > + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single",
> "fortpark_TLV","fortville_25g"]:
> > reta_num = 512
> > elif self.nic in ["niantic"]:
> > reta_num = 128
> > @@ -429,7 +429,7 @@ class TestPmdrssHash(TestCase):
> > else:
> > self.verify(False, "NIC Unsupported:%s" % str(self.nic))
> > ports = self.dut.get_ports(self.nic)
> > - self.verify(len(ports) >= 1, "Not enough ports available")
> > + self.verify(len(ports) >= 2, "Not enough ports available")
> We are trying to limit port usage, is this case must use two ports?
Yes, because this case must use two ports. One ports config rss by manual. Another port will auto sync rss config.
>
> >
> > def set_up(self):
> > """
> > @@ -651,6 +651,32 @@ class TestPmdrssHash(TestCase):
> >
> > self.dut.send_expect("quit", "# ", 30)
> >
> > + def test_dynamic_rss_bond_config(self):
> > + self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i --txqflags=0" %
> self.target, "testpmd> ", 120)
> > + out = self.dut.send_expect("create bonded device 3 0", "testpmd> ",
> 30)
> > + bond_device_id = int(re.search("port \d+", out).group().split(" ")[-
> 1].strip())
> > + self.verify(bond_device_id > 1, "not enought port for bonded
> > + test")
>
> Please add some space line between different blocks. And add one
> comment line to describe the code block.
> It will more readable and easier for later maintenance.
Yes, I will updte next version.
> > + self.dut.send_expect("add bonding slave 0 %d" % bond_device_id,
> "testpmd>", 30)
> > + self.dut.send_expect("add bonding slave 1 %d" % bond_device_id,
> "testpmd>", 30)
> > + out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
> > + slave0_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > + out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
> > + slave1_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > + self.verify(slave0_hash_function == slave1_hash_function, "default
> hash function not match")
> > + new_hash_function = ""
> > + for hash_function in ["toeplitz", "simple_xor"]:
> > + if slave0_hash_function[-3:].lower() != hash_function[-3:]:
> > + new_hash_function = hash_function
> > + self.dut.send_expect("set_hash_global_config 0 %s ipv4-other
> enable" % new_hash_function, "testpmd>")
> > + out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
> > + slave0_new_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > + out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
> > + slave1_new_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > + self.verify(slave0_new_hash_function == slave1_new_hash_function,
> "bond slave auto sync hash function failed")
> > + self.verify(slave0_new_hash_function[-3:].lower() ==
> new_hash_function[-3:], "changed slave hash function failed")
> > + self.dut.send_expect("remove bonding slave 0 %d" %
> bond_device_id, "testpmd>", 30)
> > + self.dut.send_expect("remove bonding slave 1 %d" %
> bond_device_id, "testpmd>", 30)
> > + self.dut.send_expect("quit","# ", 30)
> > def tear_down(self):
> > """
> > Run after each test case.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH V2] fix user space ethtool failed case
2017-05-12 9:07 ` Liu, Yong
@ 2017-05-15 1:27 ` Xu, HuilongX
0 siblings, 0 replies; 26+ messages in thread
From: Xu, HuilongX @ 2017-05-15 1:27 UTC (permalink / raw)
To: Liu, Yong, dts
> -----Original Message-----
> From: Liu, Yong
> Sent: Friday, May 12, 2017 5:07 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: Re: [dts] [PATCH V2] fix user space ethtool failed case
>
> Huilong, some comments below.
>
> On 05/12/2017 03:44 PM, xu,huilong wrote:
> > 1. update user space ethtool compile error, becauese the example path
> > update in dpdk already 2. kernel space ethtool dump nic eeprom file size
> differnet dpdk user space ethtool, so should
> > cat out dpdk ethtool dump nic eeprom file and the file size same with
> kernel ethtool. then use
> > file md5 check the file is same
> >
> > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > ---
> > tests/TestSuite_userspace_ethtool.py | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/TestSuite_userspace_ethtool.py
> > b/tests/TestSuite_userspace_ethtool.py
> > index 937a9e5..36ff104 100644
> > --- a/tests/TestSuite_userspace_ethtool.py
> > +++ b/tests/TestSuite_userspace_ethtool.py
> > @@ -61,7 +61,7 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
> > self.verify("Error" not in out, "compilation error 1")
> > self.verify("No such file" not in out, "compilation error
> > 2")
> >
> > - path = "./examples/ethtool/ethtool-app/ethtool-app/%s/ethtool" %
> self.target
> > + path = "./examples/ethtool/ethtool-app/%s/ethtool" %
> > + self.target
> > self.cmd = "%s -c f -n %d" % (path,
> > self.dut.get_memory_channels())
> >
> > # pause frame basic configuration @@ -370,7 +370,9 @@ class
> > TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
> > self.dut.send_expect("ethtool --eeprom-dump %s raw on > %s" %
> (intf, ethtool_eeprom), "# ")
> > # wait for file ready
> > time.sleep(2)
> > - portinfo['ethtool_eeprom'] = ethtool_eeprom
> > + dpdk_eeprom_size = int(self.dut.send_expect('ls -all %s'
> > + % portinfo['eeprom_file'], '# ').split(' ')[4].strip())
> There's one simple command "stat -c \%s file" to strip file size.
I will update it next version
>
> > + self.dut.send_expect('dd if=%s of=%s bs=%d count=1' %
> (ethtool_eeprom, "ethtool_eeprom_%d_cat.bin" % index,
> dpdk_eeprom_size), "#")
> > + portinfo['ethtool_eeprom'] = "ethtool_eeprom_%d_cat.bin"
> > + % index
> > # bind to original driver
> > portinfo['net_dev'].bind_driver(portinfo['ori_driver'])
> >
> > @@ -499,8 +501,10 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
> > for index in range(len(self.ports)):
> > port = self.ports[index]
> > ori_rx_pkts, _ = self.strip_portstats(index)
> > + time.sleep(10)
> > # stop port
> > self.dut.send_expect("stop %d" % index, "EthApp>")
> > + time.sleep(10)
>
> Sleep 20 seconds seem too long, please explain why need this.
For Fortville nic when port stats change, should more time to update link stats.
Update link stats maybe need 5 seconds in manual test, so we will sleep 10 seconds
For every ports stats update in test case.
> > # check packet not forwarded when port is stop
> > pkt = Packet()
> > tester_port = self.tester.get_local_port(port)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH 2/2] update fdir test plane
2017-05-12 7:44 ` [dts] [PATCH 2/2] update fdir test plane xu,huilong
@ 2017-05-15 2:16 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-15 2:16 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> add fdir ivaln/ttl/PROTO test plane for fortville nic
>
> Signed-off-by: xu,huilong<huilongx.xu@intel.com>
> ---
> test_plans/fdir_test_plan.rst | 366 +++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 365 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH 1/2] update fdir test case
2017-05-12 7:44 ` [dts] [PATCH 1/2] update fdir test case xu,huilong
@ 2017-05-15 2:19 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-15 2:19 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied with some commit modified.
Please send out test plan before test suite next time.
Thanks,
Marvin
On 05/12/2017 03:44 PM, xu,huilong wrote:
> update list:
> 1. support fortville 25G NIC
> 2. add three case for fortville
>
> Signed-off-by: xu,huilong<huilongx.xu@intel.com>
> ---
> tests/TestSuite_fdir.py | 367 ++++++++++++++++++++++++++++++++++++++++++++++--
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH 1/2] add link bonding rss dynamic config test plane
2017-05-12 7:44 ` [dts] [PATCH 1/2] add link bonding rss dynamic config test plane xu,huilong
@ 2017-05-15 2:30 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-15 2:30 UTC (permalink / raw)
To: xu,huilong, dts
Thanks, applied with some comments changed.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> add a new case in pmd rss hash test plane. in new dpdk, bond device support
> rss hash config.
>
> Signed-off-by: xu,huilong<huilongx.xu@intel.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dts] [PATCH] fix check packet failure by lldp have different packet size
2017-05-12 7:44 ` [dts] [PATCH] fix check packet failure by lldp have different packet size xu,huilong
@ 2017-05-15 2:54 ` Liu, Yong
0 siblings, 0 replies; 26+ messages in thread
From: Liu, Yong @ 2017-05-15 2:54 UTC (permalink / raw)
To: xu,huilong, dts
Huilong, some comments below.
On 05/12/2017 03:44 PM, xu,huilong wrote:
> fortville will send different size lldp packet, so should update chcek function.
> now we know lldp size is 110 or 100 in dpdk17.05 by debug.
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
> framework/pmd_output.py | 5 ++++-
> framework/settings.py | 2 +-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/framework/pmd_output.py b/framework/pmd_output.py
> index ca361a7..8fdf4c9 100644
> --- a/framework/pmd_output.py
> +++ b/framework/pmd_output.py
> @@ -203,8 +203,11 @@ class PmdOutput():
> so should used (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp']
> for check tx_bytes count right
> """
> - return not (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp']
> + flage = 1
> + for size in PROTOCOL_PACKET_SIZE['lldp']:
> + flage = flage and (tx_bytes - exp_bytes) % size
>
Not sure the meaning of flage, please change it to more meaningful name
like error_flag.
> + return not flage
> def get_port_vlan_offload(self, port_id):
> """
> Function: get the port vlan settting info.
> diff --git a/framework/settings.py b/framework/settings.py
> index 342314d..3839859 100644
> --- a/framework/settings.py
> +++ b/framework/settings.py
> @@ -173,7 +173,7 @@ HEADER_SIZE = {
> dpdk send protocol packet size.
> """
> PROTOCOL_PACKET_SIZE = {
> - 'lldp': 110,
> + 'lldp': [110,100],
Add space between two numbers.
> }
>
> """
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2017-05-15 3:07 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
2017-05-12 7:44 ` [dts] [PATCH V2] add fortville 25G NIC for this case xu,huilong
2017-05-12 8:47 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 1/2] add link bonding rss dynamic config test plane xu,huilong
2017-05-15 2:30 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH] fix check packet failure by lldp have different packet size xu,huilong
2017-05-15 2:54 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix test app compile error xu,huilong
2017-05-12 8:57 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix timeout when setup dpdk app xu,huilong
2017-05-12 9:01 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix user space ethtool failed case xu,huilong
2017-05-12 9:07 ` Liu, Yong
2017-05-15 1:27 ` Xu, HuilongX
2017-05-12 7:44 ` [dts] [PATCH] remove --crc-strip parameter in testpmd xu,huilong
2017-05-12 9:10 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 1/2] update fdir test case xu,huilong
2017-05-15 2:19 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] update testpmd path in dpdk xu,huilong
2017-05-12 9:12 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 2/2] add link bond slave dynamic config test case xu,huilong
2017-05-12 8:53 ` Liu, Yong
2017-05-15 1:08 ` Xu, HuilongX
2017-05-12 7:44 ` [dts] [PATCH 2/2] update fdir test plane xu,huilong
2017-05-15 2:16 ` Liu, Yong
2017-05-12 8:45 ` [dts] [PATCH V2] add filter lldp in sniff model Liu, Yong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).