From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A6964569C for ; Mon, 13 Jul 2015 07:43:33 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 12 Jul 2015 22:43:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,459,1432623600"; d="scan'208";a="761253494" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 12 Jul 2015 22:43:31 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6D5hTRb014715; Mon, 13 Jul 2015 13:43:29 +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 t6D5hRbI004978; Mon, 13 Jul 2015 13:43:29 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6D5hRXr004974; Mon, 13 Jul 2015 13:43:27 +0800 From: "huilongx,xu" To: dts@dpdk.org Date: Mon, 13 Jul 2015 13:43:25 +0800 Message-Id: <1436766205-4943-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] add rss hash key size case 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, 13 Jul 2015 05:43:34 -0000 From: huilong xu Signed-off-by: huilong xu --- 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..1749889 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 size + print self.nic + print 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