From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A5176292D for ; Mon, 12 Sep 2016 08:48:45 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP; 11 Sep 2016 23:48:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,321,1470726000"; d="scan'208";a="7428366" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga005.jf.intel.com with ESMTP; 11 Sep 2016 23:48:43 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u8C6mfRR010317; Mon, 12 Sep 2016 14:48:41 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u8C6mdwc006069; Mon, 12 Sep 2016 14:48:41 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u8C6mdei006065; Mon, 12 Sep 2016 14:48:39 +0800 From: Peng yuan To: dts@dpdk.org Cc: pengyuan Date: Mon, 12 Sep 2016 14:48:38 +0800 Message-Id: <1473662918-6033-1-git-send-email-yuan.peng@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] tests pmdrss_hash: add new PCTYPE to fortpark_TLV X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2016 06:48:46 -0000 From: pengyuan Signed-off-by: pengyuan diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py index a53057b..101cc0d 100644 --- a/tests/TestSuite_pmdrss_hash.py +++ b/tests/TestSuite_pmdrss_hash.py @@ -81,6 +81,13 @@ class TestPmdrssHash(TestCase): self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) + elif tran_type == "ipv4-tcp-syn-no-ack": + for i in range(10): + packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s")' % ( + mac, itf, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) elif tran_type == "ipv4-udp": for i in range(10): packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s")' % ( @@ -88,6 +95,20 @@ class TestPmdrssHash(TestCase): self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) + elif tran_type == "ipv4-udp-unicast": + for i in range(10): + packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s")' % ( + mac, itf, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + elif tran_type == "ipv4-udp-multicast": + for i in range(10): + packet = r'sendp([Ether(dst="01:00:5e:57:91:e6", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="224.215.145.230")/UDP(sport=1024,dport=1024)], iface="%s")' % ( + itf, i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) elif tran_type == "ipv4-sctp": for i in range(10): packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="192.168.0.%d")/SCTP(sport=1024,dport=1024,tag=1)], iface="%s")' % ( @@ -124,6 +145,13 @@ class TestPmdrssHash(TestCase): self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) + elif tran_type == "ipv6-tcp-syn-no-ack": + for i in range(10): + packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s")' % ( + mac, itf, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) elif tran_type == "ipv6-udp": for i in range(10): packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s")' % ( @@ -131,6 +159,20 @@ class TestPmdrssHash(TestCase): self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) + elif tran_type == "ipv6-udp-unicast": + for i in range(10): + packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s")' % ( + mac, itf, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + elif tran_type == "ipv6-udp-multicast": + for i in range(10): + packet = r'sendp([Ether(dst="33:33:88:88:88:88", src=get_if_hwaddr("%s"))/IPv6(src="3ffe:2501:200:1fff::%d", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)], iface="%s")' % ( + itf, i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) elif tran_type == "ipv6-sctp": for i in range(10): packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/SCTP(sport=1024,dport=1024,tag=1)], iface="%s")' % ( @@ -154,7 +196,8 @@ class TestPmdrssHash(TestCase): reta_line = {} # collect the hash result and the queue id for line in lines: - line = line.strip() + print "line is %s" % line + line = line.strip() if len(line) != 0 and line.strip().startswith("port "): reta_line = {} rexp = r"port (\d)/queue (\d{1,2}): received (\d) packets" @@ -164,8 +207,8 @@ class TestPmdrssHash(TestCase): reta_line["queue"] = m.group(2) elif len(line) != 0 and line.startswith(("src=",)): - if "RSS hash" not in line: - continue + #if "RSS hash" not in line: + # continue for item in line.split("-"): item = item.strip() if(item.startswith("RSS hash")): @@ -203,10 +246,9 @@ class TestPmdrssHash(TestCase): dts.results_table_add_row( [i, tmp_reta_line["RSS hash"], hash_index, reta_entries[hash_index], tmp_reta_line["queue"], status]) i = i + 1 - dts.results_table_print() reta_lines = [] - self.verify(sum(result) == 0, "the reta update function failed!") + self.verify(sum(result) == 0, "The actual-queue-id matches queue-id failed!") def send_packet_symmetric(self, itf, tran_type): """ @@ -243,6 +285,18 @@ class TestPmdrssHash(TestCase): self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) + elif tran_type == "ipv4-tcp-syn-no-ack": + for i in range(4): + packet = r'sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1025)], iface="%s")' % ( + mac, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + packet = r'sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1025,dport=1024)], iface="%s")' % ( + mac, i + 2, i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) elif tran_type == "ipv4-udp": for i in range(4): packet = r'sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1025)], iface="%s")' % ( @@ -255,7 +309,31 @@ class TestPmdrssHash(TestCase): self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) - elif tran_type == "ipv4-sctp": + elif tran_type == "ipv4-udp-unicast": + for i in range(4): + packet = r'sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1025)], iface="%s")' % ( + mac, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + packet = r'sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1025,dport=1024)], iface="%s")' % ( + mac, i + 2, i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + elif tran_type == "ipv4-udp-multicast": + for i in range(4): + packet = r'sendp([Ether(dst="01:00:5e:57:91:e6")/IP(src="192.168.0.%d", dst="224.215.145.230")/UDP(sport=1024,dport=1025)], iface="%s")' % ( + i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + packet = r'sendp([Ether(dst="01:00:5e:57:91:e6")/IP(src="224.215.145.230", dst="192.168.0.%d")/UDP(sport=1025,dport=1024)], iface="%s")' % ( + i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + elif tran_type == "ipv4-sctp": for i in range(4): packet = r'sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/SCTP(sport=1024,dport=1025,tag=1)], iface="%s")' % ( mac, i + 1, i + 2, itf) @@ -312,6 +390,19 @@ class TestPmdrssHash(TestCase): self.tester.scapy_execute() time.sleep(.5) + elif tran_type == "ipv6-tcp-syn-no-ack": + for i in range(4): + packet = r'sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1025)], iface="%s")' % ( + mac, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + packet = r'sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:3::%d", dst="3ffe:2501:200:1fff::%d")/TCP(sport=1025,dport=1024)], iface="%s")' % ( + mac, i + 2, i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + elif tran_type == "ipv6-udp": for i in range(4): packet = r'sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1025)], iface="%s")' % ( @@ -324,6 +415,30 @@ class TestPmdrssHash(TestCase): self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) + elif tran_type == "ipv6-udp-unicast": + for i in range(4): + packet = r'sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1025)], iface="%s")' % ( + mac, i + 1, i + 2, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + packet = r'sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1025,dport=1024)], iface="%s")' % ( + mac, i + 2, i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + elif tran_type == "ipv6-udp-multicast": + for i in range(4): + packet = r'sendp([Ether(dst="33:33:88:88:88:88")/IPv6(src="3ffe:2501:200:1fff::%d", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1025)], iface="%s")' % ( + i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) + packet = r'sendp([Ether(dst="33:33:88:88:88:88")/IPv6(src="FF1E:5555:6666:6666:7777:7777:8888:8888", dst="3ffe:2501:200:1fff::%d")/UDP(sport=1025,dport=1024)], iface="%s")' % ( + i + 1, itf) + self.tester.scapy_append(packet) + self.tester.scapy_execute() + time.sleep(.5) elif tran_type == "ipv6-sctp": for i in range(4): packet = r'sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/SCTP(sport=1024,dport=1025,tag=1)], iface="%s")' % ( @@ -442,7 +557,7 @@ class TestPmdrssHash(TestCase): localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) global reta_num - iptypes = {'ipv4-sctp': 'sctp', + iptypes = {'ipv4-sctp': 'sctp', 'ipv4-other': 'ip', 'ipv4-frag': 'ip', 'ipv4-udp': 'udp', @@ -455,6 +570,26 @@ class TestPmdrssHash(TestCase): 'ipv6-tcp': 'tcp', 'ipv6-frag': 'ip' } + if (self.nic in ["fortpark_TLV"]): + iptypes = {'ipv4-sctp': 'sctp', + 'ipv4-other': 'ip', + 'ipv4-frag': 'ip', + 'ipv4-udp': 'udp', + 'ipv4-udp-unicast': 'udp', + 'ipv4-udp-multicast': 'udp', + 'ipv4-tcp': 'tcp', + 'ipv4-tcp-syn-no-ack': 'tcp', + # this hash not support in dpdk2.0 + # 'l2_payload':'ether', + 'ipv6-other': 'ip', + 'ipv6-sctp': 'ip', + 'ipv6-udp': 'udp', + 'ipv6-udp-unicast': 'udp', + 'ipv6-udp-multicast': 'udp', + 'ipv6-tcp': 'tcp', + 'ipv6-tcp-syn-no-ack': 'tcp', + 'ipv6-frag': 'ip' + } self.dut.kill_all() @@ -493,7 +628,7 @@ class TestPmdrssHash(TestCase): localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) global reta_num - iptypes = {'ipv4-sctp': 'sctp', + ptypes = {'ipv4-sctp': 'sctp', 'ipv4-other': 'ip', 'ipv4-frag': 'ip', 'ipv4-udp': 'udp', @@ -506,6 +641,26 @@ class TestPmdrssHash(TestCase): 'ipv6-tcp': 'tcp', 'ipv6-frag': 'ip' } + if (self.nic in ["fortpark_TLV"]): + iptypes = {'ipv4-sctp': 'sctp', + 'ipv4-other': 'ip', + 'ipv4-frag': 'ip', + 'ipv4-udp': 'udp', + 'ipv4-udp-unicast': 'udp', + 'ipv4-udp-multicast': 'udp', + 'ipv4-tcp': 'tcp', + 'ipv4-tcp-syn-no-ack': 'tcp', + # this hash not support in dpdk2.0 + # 'l2_payload':'ether', + 'ipv6-other': 'ip', + 'ipv6-sctp': 'ip', + 'ipv6-udp': 'udp', + 'ipv6-udp-unicast': 'udp', + 'ipv6-udp-multicast': 'udp', + 'ipv6-tcp': 'tcp', + 'ipv6-tcp-syn-no-ack': 'tcp', + 'ipv6-frag': 'ip' + } self.dut.kill_all() @@ -551,7 +706,7 @@ class TestPmdrssHash(TestCase): 'ipv4-frag': 'ip', 'ipv4-udp': 'udp', 'ipv4-tcp': 'tcp', - # this hass not support in dpdk 2.0 + # this hash not support in dpdk2.0 # 'l2_payload':'ether', 'ipv6-other': 'ip', 'ipv6-sctp': 'ip', @@ -559,6 +714,27 @@ class TestPmdrssHash(TestCase): 'ipv6-tcp': 'tcp', 'ipv6-frag': 'ip' } + if (self.nic in ["fortpark_TLV"]): + iptypes = {'ipv4-sctp': 'sctp', + 'ipv4-other': 'ip', + 'ipv4-frag': 'ip', + 'ipv4-udp': 'udp', + 'ipv4-udp-unicast': 'udp', + 'ipv4-udp-multicast': 'udp', + 'ipv4-tcp': 'tcp', + 'ipv4-tcp-syn-no-ack': 'tcp', + # this hash not support in dpdk2.0 + # 'l2_payload':'ether', + 'ipv6-other': 'ip', + 'ipv6-sctp': 'ip', + 'ipv6-udp': 'udp', + 'ipv6-udp-unicast': 'udp', + 'ipv6-udp-multicast': 'udp', + 'ipv6-tcp': 'tcp', + 'ipv6-tcp-syn-no-ack': 'tcp', + 'ipv6-frag': 'ip' + } + if self.kdriver in ["fm10k"]: iptypes.pop('ipv4-sctp') iptypes.pop('ipv6-sctp') @@ -616,7 +792,28 @@ class TestPmdrssHash(TestCase): 'ipv6-tcp': 'tcp', 'ipv6-frag': 'ip' } - self.dut.kill_all() + if (self.nic in ["fortpark_TLV"]): + iptypes = {'ipv4-sctp': 'sctp', + 'ipv4-other': 'ip', + 'ipv4-frag': 'ip', + 'ipv4-udp': 'udp', + 'ipv4-udp-unicast': 'udp', + 'ipv4-udp-multicast': 'udp', + 'ipv4-tcp': 'tcp', + 'ipv4-tcp-syn-no-ack': 'tcp', + # this hash not support in dpdk2.0 + # 'l2_payload':'ether', + 'ipv6-other': 'ip', + 'ipv6-sctp': 'ip', + 'ipv6-udp': 'udp', + 'ipv6-udp-unicast': 'udp', + 'ipv6-udp-multicast': 'udp', + 'ipv6-tcp': 'tcp', + 'ipv6-tcp-syn-no-ack': 'tcp', + 'ipv6-frag': 'ip' + } + + self.dut.kill_all() # test with different rss queues for queue in testQueues: -- 2.5.0