* [dts] [PATCH] TestSuite_pmdrssreta.py: Modified test case to support vector mode and made few changes for cavium_a063 and cavium_a064
@ 2019-12-13 11:26 nareddy
0 siblings, 0 replies; only message in thread
From: nareddy @ 2019-12-13 11:26 UTC (permalink / raw)
To: dts; +Cc: pvukkisala, Praneeth Reddy
From: Praneeth Reddy <nareddy@marvell.com>
- Sending 4 packets to support vector mode
- For cavium_a063 and cavium_a064 rx-offloads parameter is required to support RSS hash
- For cavium_a063 and cavium_a064 Hash value must be 32 bit
Signed-off-by: Praneeth Reddy <nareddy@marvell.com>
---
| 45 ++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 20 deletions(-)
--git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index a2f2d3e..0fddb17 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -63,42 +63,42 @@ class TestPmdrssreta(TestCase):
# send packet with different source and dest ip
if tran_type == "IPV4":
for i in range(16):
- packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")], iface="%s")' % (
+ packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")], iface="%s", count=4)' % (
mac, i + 1, i + 2, itf)
self.tester.scapy_append(packet)
self.tester.scapy_execute()
time.sleep(.5)
elif tran_type == "IPV4&TCP":
for i in range(16):
- packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
+ packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s", count=4)' % (
mac, 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(16):
- packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
+ packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s", count=4)' % (
mac, i + 1, i + 2, itf)
self.tester.scapy_append(packet)
self.tester.scapy_execute()
time.sleep(.5)
elif tran_type == "IPV6":
for i in range(16):
- packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")], iface="%s")' % (
+ packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")], iface="%s", count=4)' % (
mac, i + 1, i + 2, itf)
self.tester.scapy_append(packet)
self.tester.scapy_execute()
time.sleep(.5)
elif tran_type == "IPV6&TCP":
for i in range(16):
- packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
+ packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s", count=4)' % (
mac, 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(16):
- packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
+ packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s", count=4)' % (
mac, i + 1, i + 2, itf)
self.tester.scapy_append(packet)
self.tester.scapy_execute()
@@ -119,17 +119,13 @@ class TestPmdrssreta(TestCase):
if(item.startswith("RSS hash")):
name, value = item.split("=", 1)
print name + "-" + value
+ reta_line[name.strip()] = value.strip()
+
+ elif(item.startswith("RSS queue")):
+ name, value = item.split("=", 1)
+ reta_line["queue"] = int(value.strip(),16)
- reta_line[name.strip()] = value.strip()
reta_lines.append(reta_line)
- reta_line = {}
- elif len(line) != 0 and line.strip().startswith("port "):
- rexp = r"port (\d)/queue (\d{1,2}): received (\d) packets"
- m = re.match(rexp, line.strip())
- if m:
- reta_line["port"] = m.group(1)
- reta_line["queue"] = m.group(2)
- elif len(line) != 0 and line.startswith("stop"):
break
else:
pass
@@ -153,6 +149,7 @@ class TestPmdrssreta(TestCase):
# compute the hash result using simple XOR.
hash_index_tmp = 0
index_tmp = tmp_reta_line["RSS hash"].strip("0x")
+ index_tmp = index_tmp.zfill(8)
index_tmp = textwrap.wrap(index_tmp,2)
index_tmp = [hex(int(index,16)) for index in index_tmp]
for index in index_tmp:
@@ -215,12 +212,20 @@ class TestPmdrssreta(TestCase):
# test with different rss queues
for queue in testQueues:
- if(queue == 16):
- self.pmdout.start_testpmd(
- "all", "--rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket)
+ if(self.nic in ["cavium_a063", "cavium_a064"]):
+ if(queue == 16):
+ self.pmdout.start_testpmd(
+ "all", "--rxq=%d --txq=%d --rx-offloads=0x00080000" % (queue, queue), socket=self.ports_socket)
+ else:
+ self.pmdout.start_testpmd(
+ "all", "--mbcache=128 --rxq=%d --txq=%d --rx-offloads=0x00080000" % (queue, queue), socket=self.ports_socket)
else:
- self.pmdout.start_testpmd(
- "all", "--mbcache=128 --rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket)
+ if(queue == 16):
+ self.pmdout.start_testpmd(
+ "all", "--rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket)
+ else:
+ self.pmdout.start_testpmd(
+ "all", "--mbcache=128 --rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket)
for iptype, rsstype in iptypes.items():
self.dut.send_expect("set verbose 8", "testpmd> ")
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-13 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 11:26 [dts] [PATCH] TestSuite_pmdrssreta.py: Modified test case to support vector mode and made few changes for cavium_a063 and cavium_a064 nareddy
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).