From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 7C23058EF for ; Mon, 13 Jul 2015 08:24:42 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 12 Jul 2015 23:24:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,461,1432623600"; d="scan'208";a="761269243" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 12 Jul 2015 23:24:34 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6D6OW9h004147; Mon, 13 Jul 2015 14:24:32 +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 t6D6OU4l006136; Mon, 13 Jul 2015 14:24:32 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6D6OUcE006132; Mon, 13 Jul 2015 14:24:30 +0800 From: "huilongx,xu" To: dts@dpdk.org Date: Mon, 13 Jul 2015 14:24:29 +0800 Message-Id: <1436768669-6101-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH V2] 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 06:24:43 -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..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