From patchwork Thu Aug 11 08:38:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, HongboX" X-Patchwork-Id: 114836 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CF3C9A0548; Thu, 11 Aug 2022 11:21:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7E2A42B93; Thu, 11 Aug 2022 11:21:17 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id AFA3942B8F for ; Thu, 11 Aug 2022 11:21:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660209676; x=1691745676; h=from:to:cc:subject:date:message-id; bh=Nrwq+vPfDfgxNa0Nrql+jInLIQ+R6V3o2LgStYbK/yU=; b=GJl3hN1cGnCdoXfxXXfKUyG4ViWkFo5hMcNt7md8VUDrYUVhlwlpU8cl kMGwRNmZGXLOk4kNnS57TiyGtOlvU3IRUUw1915Osg+hsrh9a7pTR377Q Yw9j4yHfnGnNcKABHdQrm4sHOnqQAiKpLDcJsV69ZoDPRvdrNJAJzObn9 gUXpN6P+k4lS+jVvcRs95M92c0lSfOe/2vpCQ62YG/NQvu02kKH1Z6RT6 iEjTbCXObMMGrtsQwMh6O1W/HrlTY2H5EMF6xNrGJH2KJCB0QEFYW+1oD fEgLbGndLp6cCOVF+H4RFE8kwKl/GWScDBRJWFxbT7sm2Ui3YOcq2X6ef A==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="271688295" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="271688295" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 02:21:15 -0700 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="665295459" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 02:21:14 -0700 From: Hongbo Li To: dts@dpdk.org Cc: yuan.peng@intel.com, Lingli Chen Subject: [dts][PATCH V1] tests/rss_key_update: modify testplan sync with script Date: Thu, 11 Aug 2022 04:38:44 -0400 Message-Id: <20220811083844.70803-1-hongbox.li@intel.com> X-Mailer: git-send-email 2.17.1 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 From: Lingli Chen 1. modify testplan according to dts commit: 2865e5b5ec53(replace legacy filter with rte flow). 2. modify case test_set_hash_key_toeplitz sync with testplan Signed-off-by: Lingli Chen --- test_plans/rss_key_update_test_plan.rst | 13 ++++++++++--- tests/TestSuite_rss_key_update.py | 10 +++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/test_plans/rss_key_update_test_plan.rst b/test_plans/rss_key_update_test_plan.rst index 8c574a0f..78cae6c2 100644 --- a/test_plans/rss_key_update_test_plan.rst +++ b/test_plans/rss_key_update_test_plan.rst @@ -23,7 +23,7 @@ Test Case: test_set_hash_key_toeplitz #. Launch the ``testpmd`` application with the following arguments:: - .//app/dpdk-testpmd -c ffffff -n 4 -- -i --portmask=0x6 --rxq=16 --txq=16 + .//app/dpdk-testpmd -c ffffff -n 4 -- -i --rxq=16 --txq=16 #. PMD fwd only receive the packets:: @@ -39,7 +39,14 @@ Test Case: test_set_hash_key_toeplitz #. Set hash function, symmetric, port and packet type:: - testpmd> set_hash_global_config 0 toeplitz ipv4-udp enable + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func toeplitz / end + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func toeplitz / end + types in pattern must match rss types. + +#. Configure RSS hash:: + + testpmd> port config all rss + verify "error" not in out #. Send packet and print the hash value and queue id of every packet. \ Then use the hash value % the table size to find expected queue id. \ @@ -68,7 +75,7 @@ Test Case: test_set_hash_key_toeplitz_symmetric Same steps as the "test_set_hash_key_toeplitz" test case. When set hash function you will need to add:: - testpmd> set_sym_hash_ena_per_port 0 enable + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func symmetric_toeplitz queues end / end Then send in packet as normal. diff --git a/tests/TestSuite_rss_key_update.py b/tests/TestSuite_rss_key_update.py index 0ce422ec..77f11839 100644 --- a/tests/TestSuite_rss_key_update.py +++ b/tests/TestSuite_rss_key_update.py @@ -228,7 +228,7 @@ class TestRssKeyUpdate(TestCase): self.dut.kill_all() - self.pmdout.start_testpmd("Default", f"--rxq={queue} --txq={queue}") + self.pmdout.start_testpmd("all", f"--rxq={queue} --txq={queue}") def test_set_hash_key_toeplitz(self): @@ -255,6 +255,10 @@ class TestRssKeyUpdate(TestCase): ) self.dut.send_expect("flow flush 0", "testpmd> ") cmd = f"flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end func toeplitz / end" + if "sctp" in iptype or "udp" in iptype or "tcp" in iptype: + cmd = cmd.replace("/ ipv4 /", f"/ ipv4 / {rsstype} /") + if "ipv6" in iptype: + cmd = cmd.replace("ipv4", "ipv6") self.dut.send_expect(cmd, "testpmd> ") out = self.dut.send_expect(f"port config all rss {rsstype}", "testpmd> ") self.verify( @@ -267,6 +271,10 @@ class TestRssKeyUpdate(TestCase): ) self.dut.send_expect("flow flush 0", "testpmd> ") cmd = f"flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end func toeplitz / end" + if "sctp" in iptype or "udp" in iptype or "tcp" in iptype: + cmd = cmd.replace("/ ipv4 /", f"/ ipv4 / {rsstype} /") + if "ipv6" in iptype: + cmd = cmd.replace("ipv4", "ipv6") self.dut.send_expect(cmd, "testpmd> ") new_output = self.send_packet(self.itf, iptype, False) self.verify(