From patchwork Sat Feb 20 15:13:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xie, WeiX" X-Patchwork-Id: 88026 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 65B7BA0524; Sat, 20 Feb 2021 07:44:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FE3D4003E; Sat, 20 Feb 2021 07:44:50 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A9DE54003C for ; Sat, 20 Feb 2021 07:44:48 +0100 (CET) IronPort-SDR: RrPOFlLDhBMI+rkdIZy4VoZTNYr2R36qTx1IDPaQP2n2JJ+uRP8FgXMEGInuIWFuDLhzOVlCtl y/CF+DeX+MQg== X-IronPort-AV: E=McAfee;i="6000,8403,9900"; a="245479412" X-IronPort-AV: E=Sophos;i="5.81,192,1610438400"; d="scan'208";a="245479412" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 22:44:46 -0800 IronPort-SDR: 7dAqgE9OQtupPIcajVUpzId/EZQSiv48KFbsjhvSWfcKZQiwrSQHpF0v2gd+7TwqrUHjL0I1Ld uyLi1k9L8KMw== X-IronPort-AV: E=Sophos;i="5.81,192,1610438400"; d="scan'208";a="401364542" Received: from unknown (HELO cvl_100g_103.icx.intel.com) ([10.240.183.103]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 22:44:44 -0800 From: xiewei To: dts@dpdk.org Cc: xiewei Date: Sat, 20 Feb 2021 23:13:07 +0800 Message-Id: <20210220151307.12102-1-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/large_vf: start testpmd with all vfs 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" This negative case need launch testpmd with max vfs, and before its only with 1 vf. Signed-off-by: xiewei --- tests/TestSuite_large_vf.py | 56 ++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 19 deletions(-) mode change 100755 => 100644 tests/TestSuite_large_vf.py diff --git a/tests/TestSuite_large_vf.py b/tests/TestSuite_large_vf.py old mode 100755 new mode 100644 index 6ff67a22..84f592d1 --- a/tests/TestSuite_large_vf.py +++ b/tests/TestSuite_large_vf.py @@ -174,8 +174,8 @@ multi_fdir_among = { more_than_4_queues_max_vfs = { "name": "test_more_than_4_queues_max_vfs", - "param": ["--txq=8 --rxq=8", "--txq=4 --rxq=4"], - "check_param": "configure queues failed" + "param": ["--txq=4 --rxq=4"], + "check_param": "request queues from PF failed" } more_than_max_vfs_4_queues = { @@ -215,6 +215,13 @@ class TestLargeVf(TestCase): self.app_path = self.dut.apps_name["test-pmd"] self.vf_num = 7 if self.max_vf_num > 128 else 3 + self.pmdout_list = [] + self.session_list = [] + for i in range(self.vf_num): + session = self.dut.new_session() + self.session_list.append(session) + pmdout = PmdOutput(self.dut, session) + self.pmdout_list.append(pmdout) def set_up(self): """ @@ -258,9 +265,9 @@ class TestLargeVf(TestCase): time.sleep(1) self.logger.info('try start testpmd the {} times'.format(retry_times)) - def config_testpmd(self): self.pmd_output.execute_cmd("set verbose 1") + self.pmd_output.execute_cmd("port config all rss all") self.pmd_output.execute_cmd("start") def send_packets(self, packets, count): @@ -361,12 +368,27 @@ class TestLargeVf(TestCase): self.verify(tv["check_param"] in out, "fail: create vfs successfully") elif subcase_name == "test_more_than_4_queues_max_vfs": self.pmd_output.execute_cmd("quit", "# ") - out = self.pmd_output.start_testpmd("all", param=tv["param"][0], - ports=[self.sriov_vfs_port[0].pci], socket=self.ports_socket) - self.verify(tv["check_param"] in out, "fail: testpmd start successfully") - self.pmd_output.execute_cmd("quit", "#") - self.launch_testpmd(tv["param"][1]) - self.check_rxqtxq_number(8, tv["check_param"]) + pmd_number = 4 if self.max_vf_num > 64 else 2 + eal_param = '' + for port in range(self.max_vf_num): + eal_param += '-a %s ' % self.sriov_vfs_port[port].pci + for i in range(pmd_number): + self.pmdout_list[i].start_testpmd('all', eal_param=eal_param, param=tv["param"][0], prefix='pmd{}'.format(i)) + for j in range(pmd_number): + if j == pmd_number - 1: + self.pmdout_list[j].execute_cmd("stop") + self.pmdout_list[j].execute_cmd("port stop all") + self.pmdout_list[j].execute_cmd("port config all rxq 8") + out = self.pmdout_list[j].execute_cmd("port start all") + self.verify(tv["check_param"] in out, "fail: testpmd start successfully") + else: + self.pmdout_list[j].execute_cmd("stop") + self.pmdout_list[j].execute_cmd("port stop all") + self.pmdout_list[j].execute_cmd("port config all rxq 8") + self.pmdout_list[j].execute_cmd("port start all") + # quit all testpmd + for k in range(pmd_number): + self.pmdout_list[k].execute_cmd("quit", "# ") else: self.create_fdir_rule(tv["rule"]) self.check_match_mismatch_pkts(tv) @@ -526,24 +548,20 @@ class TestLargeVf(TestCase): self.check_txonly_pkts(rxtx_num) def test_3_vfs_256_queues(self): - self.pmdout_list = [] - session_list = [] - for i in range(self.vf_num): - session = self.dut.new_session() - session_list.append(session) - pmdout = PmdOutput(self.dut, session) - self.pmdout_list.append(pmdout) self.create_iavf(self.vf_num + 1) self.launch_testpmd("--rxq=256 --txq=256", total=True) self.config_testpmd() self.rte_flow_process(max_vfs_256_queues_3) - self.dut.close_session(session_list) def test_max_vfs_4_queues(self): + session_last = self.dut.new_session() + pmdout = PmdOutput(self.dut, session_last) + self.pmdout_list.append(pmdout) self.create_iavf(self.max_vf_num) self.launch_testpmd("--rxq=4 --txq=4") self.config_testpmd() self.rte_flow_process(max_vfs_4_queues) + self.dut.close_session(session_last) def tear_down(self): """ @@ -553,9 +571,9 @@ class TestLargeVf(TestCase): self.dut.kill_all() self.destroy_iavf() - def tear_down_all(self): """ Run after each test suite. """ - self.dut.kill_all() \ No newline at end of file + self.dut.close_session(self.session_list) + self.dut.kill_all()