From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99F55A0524; Thu, 6 May 2021 10:17:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C1E2410DB; Thu, 6 May 2021 10:17:34 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 9909940040 for ; Thu, 6 May 2021 10:17:32 +0200 (CEST) IronPort-SDR: JFDzED5R/dq7Jmcb8sQ445PBJKh7cKnLmN+vqQAI01rS8zYEk8dTDraNapMu/HGaztvqyfugxn 4/jOROR/zbEQ== X-IronPort-AV: E=McAfee;i="6200,9189,9975"; a="259688649" X-IronPort-AV: E=Sophos;i="5.82,277,1613462400"; d="scan'208";a="259688649" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2021 01:17:30 -0700 IronPort-SDR: wdQ0J9UwcKEpLgiCF+k2YknsqbO/Z2CC0ZpSWzCyWkYAPyaRhdyraLdhD1sm5YQN10OyHIB3+J 5nLEC+BoLg+w== X-IronPort-AV: E=Sophos;i="5.82,277,1613462400"; d="scan'208";a="434236647" Received: from unknown (HELO localhost.localdomain) ([10.240.183.77]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2021 01:17:28 -0700 From: Bo Chen To: dts@dpdk.org Cc: Bo Chen Date: Thu, 6 May 2021 16:19:26 +0000 Message-Id: <20210506161926.432035-1-BoX.C.Chen@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1] tests/pmdrss_hash: use flow api replace legancy X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" use flow api replace legancy filter command Signed-off-by: Bo Chen --- tests/TestSuite_pmdrss_hash.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py index fb83f78d..54c0a89d 100644 --- a/tests/TestSuite_pmdrss_hash.py +++ b/tests/TestSuite_pmdrss_hash.py @@ -390,7 +390,7 @@ class TestPmdrssHash(TestCase): status = "true" result.insert(i, 0) if(i % 2 == 1): - if(pre_RSS_hash == tmp_reta_line["RSS hash"]): + if(pre_RSS_hash != tmp_reta_line["RSS hash"]): status = "true" result.insert(len(reta_lines) + (i - 1) // 2, 0) else: @@ -494,6 +494,7 @@ class TestPmdrssHash(TestCase): dutPorts = self.dut.get_ports(self.nic) localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) + rule_action = 'func symmetric_toeplitz queues end / end' global reta_num global iptypes @@ -512,10 +513,13 @@ class TestPmdrssHash(TestCase): "set nbcore %d" % (queue + 1), "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") - self.dut.send_expect( - "set_hash_global_config 0 toeplitz %s enable" % iptype, "testpmd> ") - self.dut.send_expect( - "set_sym_hash_ena_per_port 0 enable", "testpmd> ") + self.dut.send_expect("flow flush 0", "testpmd> ") + rule_cmd = f'flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}' + if 'sctp' in iptype or 'udp' in iptype or 'tcp' in iptype: + rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /') + if 'ipv6' in iptype: + rule_cmd = rule_cmd.replace('ipv4', 'ipv6') + self.dut.send_expect(rule_cmd, "testpmd> ") self.dut.send_expect("port start all", "testpmd> ") out = self.dut.send_expect( "port config all rss %s" % rsstype, "testpmd> ") @@ -528,6 +532,7 @@ class TestPmdrssHash(TestCase): "port config 0 rss reta (%d,%d)" % (i, reta_entries[i]), "testpmd> ") self.send_packet_symmetric(itf, iptype) + self.dut.send_expect("flow flush 0", "testpmd> ") self.dut.send_expect("quit", "# ", 30) -- 2.31.1