[dts] [PATCH V2] add rss hash key size case

huilongx,xu huilongx.xu at intel.com
Mon Jul 13 08:24:29 CEST 2015


From: huilong xu <huilongx.xu at intel.com>


Signed-off-by: huilong xu <huilongx.xu at intel.com>
---
 tests/TestSuite_pmdrssreta.py |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 60f340d..1d02b17 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -241,6 +241,30 @@ class TestPmdrssreta(TestCase):
                 self.send_packet(itf, iptype)
 
             self.dut.send_expect("quit", "# ", 30)
+    def test_rss_key_size(self):
+        nic_rss_key_size = {"fortville_eagle":52, "fortville_spirit":52, "fortville_spirit_single":52, "niantic": 40, "e1000": 40}
+        dutPorts = self.dut.get_ports(self.nic)
+        localPort = self.tester.get_local_port(dutPorts[0])
+        itf = self.tester.get_interface(localPort)
+        self.dut.kill_all()
+        self.dut.send_expect("./%s/app/testpmd  -c fffff -n %d -- -i --coremask=0xffffe --rxq=2 --txq=2" % (self.target, self.dut.get_memory_channels()), "testpmd> ", 120)
+        self.dut.send_expect("start", "testpmd> ", 120)
+        out = self.dut.send_expect("show port info all", "testpmd> ", 120)
+        self.dut.send_expect("quit", "# ", 30)
+        print out
+
+        pattern = re.compile("Hash key size in bytes:\s(\d+)")
+        m = pattern.search(out)
+        if m is not None:
+            size = m.group(1)
+            print "******************"
+            print "the port hass size is %s" % size
+            print "the port nic name is %s" % self.nic
+            print "the NIC %s hash size should is %d" % (self.nic, nic_rss_key_size[self.nic])
+            if (nic_rss_key_size[self.nic] == int(size)):
+                self.verify(True, "pass")
+            else:
+                self.verify(False, "fail")
 
     def tear_down(self):
         """
-- 
1.7.4.4



More information about the dts mailing list