From patchwork Mon Mar 7 02:26:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 108559 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 4A483A034D; Mon, 7 Mar 2022 03:39:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 173C14068F; Mon, 7 Mar 2022 03:39:12 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 1E2C04068A for ; Mon, 7 Mar 2022 03:39:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646620750; x=1678156750; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2FHenawwJHCr4fL59rWS0wa9R+VD8ucUKD5UP5RFs8M=; b=UzRIFWampgsBgqMslSyOc4t3i407oQaTkl5LDDPfpdfbmIRvFTRqED5l rigjhuq7Unq3vgKhOn13HhiiBPtuDp2xyOYM/elj0Lq9vYSu9vgWZ7B34 aZt77NFK8G/lt1Ey+r1i3tvScNi3UlQJ4ZF+IUWMrRH5DXGftcgAV/cat BjF3nYjPxlGpekvIl8Hz6D728w0JBFPwJx5t6qEGhIkQnEu7mwe/lg5L+ 4gq5Z1yoFa9hjR0YNdw2YG6nEe/XmL64Twc0NGWY08ICafwZvAsF6TTev RT8nXs9qFXr0rHuCstfHUon8y4RqqE8M6RbBzRqYvmrBKdHsQlPg2smdd g==; X-IronPort-AV: E=McAfee;i="6200,9189,10278"; a="234890815" X-IronPort-AV: E=Sophos;i="5.90,160,1643702400"; d="scan'208";a="234890815" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2022 18:39:09 -0800 X-IronPort-AV: E=Sophos;i="5.90,160,1643702400"; d="scan'208";a="494898019" Received: from unknown (HELO localhost.localdomain) ([10.239.251.41]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2022 18:39:07 -0800 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 1/2] tests/vf_daemon: add step dpdk pf set mtu value. Date: Mon, 7 Mar 2022 10:26:27 +0800 Message-Id: <20220307022628.3829950-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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.Optimizing vf_mtu case does not require driving the VM1 virtual system. 2.Add step DPDK PF set MTU valuei. Signed-off-by: Weiyuan Li --- tests/TestSuite_vf_daemon.py | 37 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py index 19cecddf..51e61720 100644 --- a/tests/TestSuite_vf_daemon.py +++ b/tests/TestSuite_vf_daemon.py @@ -50,7 +50,6 @@ class TestVfDaemon(TestCase): supported_vf_driver = ['pci-stub', 'vfio-pci'] def set_up_all(self): - self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= 1, "Insufficient ports") self.vm0 = None @@ -126,17 +125,19 @@ class TestVfDaemon(TestCase): self.vm0_testpmd = PmdOutput(self.vm0_dut) vf1_prop = {'opt_host': self.sriov_vfs_port[1].pci} - self.vm1 = QEMUKvm(self.dut, 'vm1', 'vf_daemon') - self.vm1.set_vm_device(driver=self.vf_assign_method, **vf1_prop) - try: - self.vm1_dut = self.vm1.start() - if self.vm1_dut is None: - raise Exception("Set up VM1 ENV failed!") - except Exception as e: - self.destroy_vm_env() - raise Exception(e) - self.vm1_dut_ports = self.vm1_dut.get_ports('any') - self.vm1_testpmd = PmdOutput(self.vm1_dut) + + if self.running_case != 'test_vf_mtu': + self.vm1 = QEMUKvm(self.dut, 'vm1', 'vf_daemon') + self.vm1.set_vm_device(driver=self.vf_assign_method, **vf1_prop) + try: + self.vm1_dut = self.vm1.start() + if self.vm1_dut is None: + raise Exception("Set up VM1 ENV failed!") + except Exception as e: + self.destroy_vm_env() + raise Exception(e) + self.vm1_dut_ports = self.vm1_dut.get_ports('any') + self.vm1_testpmd = PmdOutput(self.vm1_dut) self.env_done = True self.dut_testpmd.quit() @@ -372,6 +373,12 @@ class TestVfDaemon(TestCase): self.tester.send_expect("ifconfig %s mtu 9000" % self.tester_intf, "#") self.check_vf_link_status() time.sleep(10) + self.dut_testpmd.execute_cmd("port stop all") + self.dut_testpmd.execute_cmd("port config mtu 0 9000") + self.dut_testpmd.execute_cmd("port start all") + out = self.dut_testpmd.execute_cmd("show port info 0") + self.verify("MTU: 9000" in out, "DPDK PF SET MTU FAILED!") + self.vf0_mac = self.vm0_testpmd.get_port_mac(0) self.vm0_testpmd.execute_cmd('set fwd mac') @@ -753,11 +760,13 @@ class TestVfDaemon(TestCase): def tear_down(self): self.vm0_testpmd.quit() - self.vm1_testpmd.quit() + if self.running_case != 'test_vf_mtu': + self.vm1_testpmd.quit() self.dut_testpmd.quit() time.sleep(3) self.vm0_dut.kill_all() - self.vm1_dut.kill_all() + if self.running_case != 'test_vf_mtu': + self.vm1_dut.kill_all() def tear_down_all(self): From patchwork Mon Mar 7 02:26:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 108560 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 A2F86A034E; Mon, 7 Mar 2022 03:39:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30DBA4114B; Mon, 7 Mar 2022 03:39:12 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 412EF4068A for ; Mon, 7 Mar 2022 03:39:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646620751; x=1678156751; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kyw2ys99cC/e9PBe4l+ujqK/gljNJ+x06KQpqmowUlQ=; b=cxtql5Dmt9/WIwC/h3uyrdN8KAQQ9XVve9t9XSKad7OeKH8zR30gsPcc HXdwzosSPnjMm/PYtZ5RNKtpeJDYooF/vIHfCqp7aX7k0K8q0TMFM3YaZ 7l8h1mFI4xLFuAWeho2XQa6ld6ckFQcLud8p2glgVPU45UQgUr+At3suD g2rlAGvw0loEIvDfSI5CfV+lJr/uesN3dTu4e/WtfsVwMmt6ujEsJ2rEu 8AjGif4CQI/sLvUE0b8aGHZIDAyERWMbT+dZElytVF5jIaR78LrzJk9Qn lEDMJ3f5TORXVfTIHGw4zEzwg0ExNTmlRXf7jE+yx6sJyuoblBpAtU1Zh A==; X-IronPort-AV: E=McAfee;i="6200,9189,10278"; a="234890816" X-IronPort-AV: E=Sophos;i="5.90,160,1643702400"; d="scan'208";a="234890816" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2022 18:39:10 -0800 X-IronPort-AV: E=Sophos;i="5.90,160,1643702400"; d="scan'208";a="494898027" Received: from unknown (HELO localhost.localdomain) ([10.239.251.41]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2022 18:39:09 -0800 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 2/2] test_plan/vf_daemon: sync add step dpdk pf set mtu. Date: Mon, 7 Mar 2022 10:26:28 +0800 Message-Id: <20220307022628.3829950-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220307022628.3829950-1-weiyuanx.li@intel.com> References: <20220307022628.3829950-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 Sync test plan add step dpdk pf set mtu value. Signed-off-by: Weiyuan Li --- test_plans/vf_daemon_test_plan.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test_plans/vf_daemon_test_plan.rst b/test_plans/vf_daemon_test_plan.rst index cb7fb41d..42c679ac 100644 --- a/test_plans/vf_daemon_test_plan.rst +++ b/test_plans/vf_daemon_test_plan.rst @@ -301,23 +301,29 @@ Test Case 9: Show/Clear stats for VF from PF Test Case 10: enhancement to identify VF MTU change =================================================== -1. Set VF0 in mac forwarding mode and start testpmd +1. Set DPDK PF mtu size is 9000. -2. Default mtu size is 1500, send one packet with length bigger than default + testpmd> port stop all + testpmd> port config mtu 0 9000 + testpmd> port start all + +2. Set VF0 in mac forwarding mode and start testpmd + +3. Default mtu size is 1500, send one packet with length bigger than default mtu size, such as 2000 from tester, check VF0 can receive but can't transmit packet -3. Set VF0 mtu size as 3000, but need to stop then restart port to active mtu:: +4. Set VF0 mtu size as 3000, but need to stop then restart port to active mtu:: testpmd> port stop all testpmd> port config mtu 0 3000 testpmd> port start all testpmd> start -4. Send one packet with length 2000 from tester, check VF0 can receive and +5. Send one packet with length 2000 from tester, check VF0 can receive and transmit packet -5. Send one packet with length bigger than configured mtu size, such as 5000 +6. Send one packet with length bigger than configured mtu size, such as 5000 from tester, check VF0 can receive but can't transmit packet