From patchwork Wed Apr 19 05:14:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 126255 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 2BEE742985; Wed, 19 Apr 2023 07:14:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 252AE40A79; Wed, 19 Apr 2023 07:14:41 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 6F6A04021F for ; Wed, 19 Apr 2023 07:14:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681881279; x=1713417279; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=myk69Vmo98fqtigZip/6l9ZG1r7LV0fEItTBtclFjhc=; b=PHkRVYrf6ETMM87cyh7xbO9oXhT2ITEdvia1n/WwAHG31OBaotswJg+A k3A/4a9u4anjnvQe/XSg97ohpXkYlrAlEv3H7qlR/7rzEODrhPUzWStuv jmk/Wdx1neQTco3Mi6BteR/7HUOZv6cX2t5MLrg4t7+YS8U+nbJHxrHyP HiX6nbhyL221vfFsg/7WY7hjyurh9J0BJgXo7iBOQ2DfvjMPy75aR2U+k iDDH33Tciq751qamXSbw834ImdqpO+c+Lcv6OfLWxTiLsiwxw19yZrbJs 9bM3Tf5tnrBlDDZT3KlIzehRjXODYLaEA5oClful+2sioIsIE5dQeO4DZ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10684"; a="325689852" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="325689852" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 22:14:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10684"; a="691360511" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="691360511" Received: from unknown (HELO localhost.localdomain) ([10.239.252.196]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 22:14:36 -0700 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1] tests/vf_l2fwd: Optimize scripts Date: Wed, 19 Apr 2023 13:14:33 +0800 Message-Id: <20230419051433.1950456-1-yux.jiang@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 After bind back to kernel, execute "ifconfig .. up" to ensure pf port up Signed-off-by: Yu Jiang --- tests/TestSuite_vf_l2fwd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/TestSuite_vf_l2fwd.py b/tests/TestSuite_vf_l2fwd.py index 3bac3744..f8c3f888 100644 --- a/tests/TestSuite_vf_l2fwd.py +++ b/tests/TestSuite_vf_l2fwd.py @@ -60,6 +60,9 @@ class TestVfL2fwd(TestCase): VF_MAC_ADDR_port1 = "00:11:22:33:44:66" # generate vf self.dut.bind_interfaces_linux(self.kdriver) + for i_port in [self.dut.ports_info[self.dut_ports[0]]["intf"], self.dut.ports_info[self.dut_ports[1]]["intf"]]: + self.dut.send_expect("ifconfig %s up" % i_port, "# ") + self.dut.is_interface_up(i_port) self.dut.generate_sriov_vfs_by_port(self.dut_ports[0], 1, self.kdriver) self.sriov_vfs_port_0 = self.dut.ports_info[self.dut_ports[0]]["vfs_port"] self.verify(len(self.sriov_vfs_port_0) != 0, "VF create failed")