From patchwork Thu Aug 11 10:15:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 114838 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 B9682A0548; Thu, 11 Aug 2022 12:58:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E67F410FC; Thu, 11 Aug 2022 12:58:34 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 2466540DDE for ; Thu, 11 Aug 2022 12:58:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660215513; x=1691751513; h=from:to:cc:subject:date:message-id; bh=+iKzWprqKfyRizotvsJ+nJcj6rK4Xy3gJGunAuSyPQk=; b=cPaNxv7N3sKPR/d9daxBgtmag7p/8Ff/SaJDNb9d54S/0v99t7In3O8U d1B2n3FLy3tTGSzbMq1lsntCdNDNAYNgR3Itsk+wmHWIyng50Uw5QEDoq 2K/CPaJZdmXmpQDfQJFviqR+2LZUGRN1Wbdi1rRAR8aWJQpKK2oMaoqO3 y2MF+LBNXOCvzGWhXZVeJuWKKkmWOjwxtfXTFAolIP+9EgLqn7qiUkRfr k+8Fxw4IOTFvTGnglYcJSzL1p1wjPidxKDaKIjYM2Z14CsGc/LOY4kGhT WgtZU2Ek0vWdxOXwJLe34SnmZmvCREpPn8bjXqmzY9K5EW1bVVQX2p/em Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="278262903" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="278262903" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 03:58:31 -0700 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="602128096" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 03:58:29 -0700 From: Lingli Chen 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 06:15:58 -0400 Message-Id: <20220811101558.8761-1-linglix.chen@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 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 Tested-by: Weiyuan Li Signed-off-by: Lingli Chen Acked-by: Lijuan Tu --- 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(