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 37FBFA04A4; Wed, 2 Mar 2022 07:10:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 322BD406B4; Wed, 2 Mar 2022 07:10:44 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 83B1440141 for ; Wed, 2 Mar 2022 07:10:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646201442; x=1677737442; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fgCPNR+frDSXZDreaLbfGoq7T5FqwCY52WPi8QOP60k=; b=DpRpBuIEzYkDGLPx89X5YTi+TG4dSYSmdoVZoxS/ic3cAOGDjRA2ZIAA rlc2acbxGnxDJFJOKroO2ikcjm4AZIhxBO4SBG7/Dty4Q2/6mtLucDr4X XmZIexK+vCZ3+U9cXzkp/Z1SvGNw5uJv0Eo4WUQL9Wzj/z9iw9nyeNKor BRsVN4OT9D8R4hJIdpUjEeUxwzPKKI+H10xKVv+XYRJSFBa4+5gBUIloi akT6YnD7r6EPXPRGWlGeGtYEvFR5enURaxURe5+PH+kJfTbLYp1Mc1p1H nNLXGVWGZ6igkAnOvd2GPyz6e8rQtQvnMVRJWekyGoIHS2iacVy4Zszl/ w==; X-IronPort-AV: E=McAfee;i="6200,9189,10273"; a="240733355" X-IronPort-AV: E=Sophos;i="5.90,148,1643702400"; d="scan'208";a="240733355" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 22:10:41 -0800 X-IronPort-AV: E=Sophos;i="5.90,148,1643702400"; d="scan'208";a="535254585" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 22:10:40 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [PATCH V3 3/3] tests/vf_interrupt_pmd: remove change DPDK code steps and sleep time Date: Wed, 2 Mar 2022 14:10:35 +0800 Message-Id: <20220302061035.498887-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 v1: Remove change DPDK code steps. v2: Add insmod igb_uio driver step in test_nic_interrupt_PF_igb_uio case. v3: Modify start dpdk-l3fwd-power app expect value from "L3FWD_POWER" to "Checking link statusdone" to wait the app start success. Remove time.sleep(3) in send_packet method. Signed-off-by: Wei Ling --- tests/TestSuite_vf_interrupt_pmd.py | 41 +++++++++-------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/tests/TestSuite_vf_interrupt_pmd.py b/tests/TestSuite_vf_interrupt_pmd.py index aff1f35a..cfdcd442 100644 --- a/tests/TestSuite_vf_interrupt_pmd.py +++ b/tests/TestSuite_vf_interrupt_pmd.py @@ -44,7 +44,6 @@ from framework.packet import Packet from framework.test_case import TestCase from framework.virt_common import VM - class TestVfInterruptPmd(TestCase): supported_vf_driver = ['pci-stub', 'vfio-pci'] @@ -88,11 +87,8 @@ class TestVfInterruptPmd(TestCase): def prepare_l3fwd_power(self, use_dut): """ - Change the DPDK source code and recompile + Compile dpdk-l3fwd-power """ - use_dut.send_expect( - "sed -i -e '/DEV_RX_OFFLOAD_CHECKSUM,/d' \ - ./examples/l3fwd-power/main.c", "#", 10) out = use_dut.build_dpdk_apps("./examples/l3fwd-power") self.path = use_dut.apps_name['l3fwd-power'] self.verify("Error" not in out, "compilation error") @@ -106,6 +102,7 @@ class TestVfInterruptPmd(TestCase): pkt.send_pkt(self.tester, tx_port=testinterface) self.out2 = use_dut.get_session_output(timeout=2) + def send_packet_loop(self, mac, testinterface, use_dut, ip_addr): """ Send a packet and verify @@ -131,7 +128,7 @@ class TestVfInterruptPmd(TestCase): cmd_vhost_net = self.path + "-n %d -c %s" % (use_dut.get_memory_channels(), self.core_mask_user) + " -- -P -p 1 --config='(0,0,%s)'" % self.core_user try: self.logger.info("Launch l3fwd_sample sample:") - self.out = use_dut.send_expect(cmd_vhost_net, "L3FWD_POWER", 60) + self.out = use_dut.send_expect(cmd_vhost_net, "Checking link statusdone", 60) if "Error" in self.out: raise Exception("Launch l3fwd-power sample failed") else: @@ -151,7 +148,7 @@ class TestVfInterruptPmd(TestCase): cmd_vhost_net = self.path + "-l 0-%d -n 4 -- -P -p 0x1" % queue + " --config='%s'" % config_info try: self.logger.info("Launch l3fwd_sample sample:") - self.out = use_dut.send_expect(cmd_vhost_net, "L3FWD_POWER", 60) + self.out = use_dut.send_expect(cmd_vhost_net, "Checking link statusdone", 60) self.logger.info(self.out) if "Error" in self.out: raise Exception("Launch l3fwd-power sample failed") @@ -174,8 +171,7 @@ class TestVfInterruptPmd(TestCase): self.host_intf0 = self.dut.ports_info[self.used_dut_port_0]['intf'] # set vf mac - self.dut.send_expect("ip link set %s vf 0 mac %s" % - (self.host_intf0, self.vf0_mac), "# ") + self.dut.send_expect("ip link set %s vf 0 mac %s" %(self.host_intf0, self.vf0_mac), "# ") for port in self.sriov_vfs_port_0: port.bind_driver(self.vf_driver) @@ -238,7 +234,7 @@ class TestVfInterruptPmd(TestCase): core_mask_user = utils.create_mask(core_list) cmd = self.path + "-c %s -n %d -- -P -p 0x01 --config='(0,0,%s)'" % (core_mask_user, self.vm0_dut.get_memory_channels(), core_user) - self.vm0_dut.send_expect(cmd, "L3FWD_POWER", 60) + self.vm0_dut.send_expect(cmd, "Checking link statusdone", 60) self.send_packet(self.vf0_mac, self.rx_intf_0, self.vm0_dut) self.destroy_vm_env() self.verify( @@ -261,8 +257,7 @@ class TestVfInterruptPmd(TestCase): for port in self.sriov_vfs_port_0: port.bind_driver('vfio-pci') # set vf mac - self.dut.send_expect("ip link set %s vf 0 mac %s" % - (self.host_intf, self.vf_mac), "# ") + self.dut.send_expect("ip link set %s vf 0 mac %s" %(self.host_intf, self.vf_mac), "# ") self.begin_l3fwd_power(self.dut) self.send_packet(self.vf_mac, self.rx_intf_0, self.dut) self.verify( @@ -297,6 +292,8 @@ class TestVfInterruptPmd(TestCase): """ self.prepare_l3fwd_power(self.dut) + self.dut.setup_modules_linux(self.target, 'igb_uio', '') + self.dut.ports_info[0]['port'].bind_driver(driver='igb_uio') self.begin_l3fwd_power(self.dut) @@ -325,8 +322,7 @@ class TestVfInterruptPmd(TestCase): for port in self.sriov_vfs_port_0: port.bind_driver('vfio-pci') # set vf mac - self.dut.send_expect("ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), - "# ") + self.dut.send_expect("ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), "# ") self.begin_l3fwd_power_multi_queues(self.dut) stroutput = "" for ip in range(2,10): @@ -346,14 +342,12 @@ class TestVfInterruptPmd(TestCase): """ self.verify(self.nic in ['fortville_eagle', 'fortville_spirit', 'fortville_25g', 'fortville_spirit_single','fortpark_TLV', 'fortpark_BASE-T', 'carlsville'], '%s nic port not support vf multi-queues interrupt' % str(self.nic)) self.setup_vm_env() - self.vm0_dut.send_expect("ip link set %s vf 0 mac %s" % - (self.host_intf0, self.vf0_mac), "# ") + self.vm0_dut.send_expect("ip link set %s vf 0 mac %s" %(self.host_intf0, self.vf0_mac), "# ") self.queues = 4 self.prepare_l3fwd_power(self.vm0_dut) self.VF0_bind_vfio_pci() cores = "1S/4C/1T" core_list = self.vm0_dut.get_core_list(cores) - core_user = core_list[0] core_mask_user = utils.create_mask(core_list) config_info ="" for queue in range(self.queues): @@ -361,18 +355,7 @@ class TestVfInterruptPmd(TestCase): config_info += ',' config_info += '(0,%d,%d)' % (queue, queue) cmd = self.path + "-c %s -n 4 -- -P -p 0x1" % core_mask_user + " --config='%s'" % config_info - self.vm0_dut.send_expect(cmd, "L3FWD_POWER", 60) - time.sleep(1) - try: - self.logger.info("Launch l3fwd_sample sample:") - self.out = self.vm0_dut.send_expect(cmd, "L3FWD_POWER", 60) - if "Error" in self.out: - raise Exception("Launch l3fwd-power sample failed") - else: - self.logger.info("Launch l3fwd-power sample finished") - except Exception as e: - self.logger.error("ERROR: Failed to launch l3fwd-power sample: %s" - % str(e)) + self.vm0_dut.send_expect(cmd, "Checking link statusdone", 60) stroutput = "" for ip in range(2, 10): self.send_packet_loop(self.vf0_mac, self.rx_intf_0, self.vm0_dut, ip) -- 2.25.1