From patchwork Fri Jun 24 10:37:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 113361 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 8252BA0032; Fri, 24 Jun 2022 04:12:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F1754069D; Fri, 24 Jun 2022 04:12:49 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 13A2A4067B for ; Fri, 24 Jun 2022 04:12:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656036768; x=1687572768; h=from:to:cc:subject:date:message-id; bh=E7RVd6x+rrFPo2KzrwBynkaDN1aD7lU8/44yZIl/v6c=; b=TkRUZTisEmwrwkbSilj9Hl7mebOryy/KzUFawkHTsRr0M4kMrAqIaGUH mB0Gff4/L4OTbSgejptc4Ui9J4zAZO3HRoVcUvS4+b39fC+Wb68Yec8sd EruABX3gLCsfzgcCHbyCrT+dKiYYGQH849cv0VSOenTVvnPJIHHOQp+Ir PlDdBYqbzKlqE3Qk8hUU2Fi4qgynI1XgrCHInd+NlvtdxwoOAkPukXe1B BjAsrT7keM1Q/s2YXNbNU6s5oP7NcmJa/IHRQUIcPw4JJ+P42Nh8F3fGk ddRz/RB4PTCqIKvn3cXtLnuiAu0F/9UFOzPj4cqsVoG6xzoUvjbkRCF4S w==; X-IronPort-AV: E=McAfee;i="6400,9594,10387"; a="279664811" X-IronPort-AV: E=Sophos;i="5.92,217,1650956400"; d="scan'208";a="279664811" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 19:12:46 -0700 X-IronPort-AV: E=Sophos;i="5.92,217,1650956400"; d="scan'208";a="645051584" Received: from unknown (HELO localhost.localdomain) ([10.239.252.93]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 19:12:45 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V1] ice_advanced_iavf_rss_gtpu:add new case about disable rss Date: Fri, 24 Jun 2022 18:37:09 +0800 Message-Id: <20220624103709.6677-1-zhiminx.huang@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 vf rss gtpu miss a testcase about rss function when disable rss. so add new case in testcase and testplan. Signed-off-by: Zhimin Huang --- .../ice_advanced_iavf_rss_gtpu_test_plan.rst | 15 ++++++++++ tests/TestSuite_ice_advanced_iavf_rss_gtpu.py | 28 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst b/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst index 69782f05..f04b6017 100644 --- a/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst +++ b/test_plans/ice_advanced_iavf_rss_gtpu_test_plan.rst @@ -4096,6 +4096,21 @@ so the following step don't need to be run. 10. repeat step 5, check the rule without UL/DL can't work now. +rss function when disable rss +============================= +1. start testpmd without disable rss:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -- -i --rxq=16 --txq=16 --rxd=384 --txd=384 --disable-rss + +2. create a IPV4_GTPU_EH_IPV4 rule:: + + flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end + +3. send 1280 packets of IPV4_GTPU_EH_IPV4 packet type:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(dst=RandIP(),src=RandIP())/UDP(sport=RandShort(),dport=RandShort())/("X"*480)],iface="enp216s0f0",count=1280) + +4. check all the packets have hash value and distributed to all queues by RSS. stress case =========== diff --git a/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py b/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py index 040199f4..9577fbfe 100644 --- a/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py +++ b/tests/TestSuite_ice_advanced_iavf_rss_gtpu.py @@ -9666,6 +9666,34 @@ class TestICEAdvancedIAVFRSSGTPU(TestCase): ) self.pmd_output.execute_cmd("flow flush 0") + def test_rss_function_when_disable_rss(self): + self.pmd_output.quit() + self.pmd_output.start_testpmd( + cores="1S/4C/1T", + param="--rxq=16 --txq=16 --disable-rss --rxd=384 --txd=384", + eal_param=f"-a {self.vf0_pci}", + socket=self.ports_socket, + ) + self.pmd_output.execute_cmd("set fwd rxonly") + self.pmd_output.execute_cmd("set verbose 1") + self.pmd_output.execute_cmd("start") + res = self.pmd_output.wait_link_status_up("all", timeout=15) + self.verify(res is True, "there have port link is down") + rule = "flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end" + self.rssprocess.create_rule(rule=rule) + pkt = 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst=RandIP(),src=RandIP())/UDP(sport=RandShort(),dport=RandShort())/("X"*480)' + output = self.rssprocess.send_pkt_get_output(pkts=pkt, count=1280) + _, queues = self.rssprocess.get_hash_and_queues(output) + hashes, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output) + self.verify( + len(hashes) == 1280, + "all the packets should have hash value and distributed to all queues by RSS.", + ) + self.verify( + len(set(queues)) == 16, "all the packets have distributed to all queues" + ) + self.verify(rss_distribute, "the packet do not distribute by rss") + # vf rss gtpc gtpu def test_mac_ipv4_gtpu(self): self.switch_testpmd(symmetric=False)