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 AA1A3423E8; Mon, 16 Jan 2023 02:51:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3D3E40156; Mon, 16 Jan 2023 02:51:35 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 83DF340042 for ; Mon, 16 Jan 2023 02:51:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673833894; x=1705369894; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WNDJbhX1/1n5Isz56WsjoFkydSAutEiQ2t9Gap91Z5M=; b=RqJB3Gsr/d4kZPuL/g1S76LCBnTqFEpRJPGd1zgOD9VURJymqtwqpU+7 S27Vr71w63qRjNEHHd/unTcOfs/17t1/a/Pk6epY5Wd51J762JxKmSTsU TezTbHhJfcsSstpGcg7K8H+FoeVg8yEfDgHdmLluksK7fZL4JgIEF0LMj yb2EMHXhjp2Hl2Wt+nI0rAR6YYxhtWVkwtdp24RDzxwc3CryOW6lksozB lZgmA5vlIZwroYKOKzrFo51qdzFND/FGp1Cvj2YUjpFt8DZ4r22B3+mHv xPMAp4xmXmelTg+oUIOO/Qup3u3DWIvFmdq9JK4xfV4KC54ZC32AMnhuq Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="304749674" X-IronPort-AV: E=Sophos;i="5.97,219,1669104000"; d="scan'208";a="304749674" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2023 17:51:33 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="636395712" X-IronPort-AV: E=Sophos;i="5.97,219,1669104000"; d="scan'208";a="636395712" Received: from unknown (HELO localhost.localdomain) ([10.239.252.196]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2023 17:51:31 -0800 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V2] tests/vf_l2fwd:rebind interfaces to dpdk Date: Mon, 16 Jan 2023 09:51:32 +0800 Message-Id: <20230116015132.663834-1-yux.jiang@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 rebind interfaces to dpdk to avoid impacting pf suite Signed-off-by: Yu Jiang --- tests/TestSuite_vf_l2fwd.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) V2: format.sh this suite diff --git a/tests/TestSuite_vf_l2fwd.py b/tests/TestSuite_vf_l2fwd.py index 542838c6..3bac3744 100644 --- a/tests/TestSuite_vf_l2fwd.py +++ b/tests/TestSuite_vf_l2fwd.py @@ -36,6 +36,7 @@ class TestVfL2fwd(TestCase): len(self.dut_ports) >= self.number_of_ports, "Not enough ports for " + self.nic, ) + self.vf_ports = "" self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) # compile out = self.dut.build_dpdk_apps("./examples/l2fwd") @@ -64,7 +65,8 @@ class TestVfL2fwd(TestCase): self.verify(len(self.sriov_vfs_port_0) != 0, "VF create failed") self.dut.generate_sriov_vfs_by_port(self.dut_ports[1], 1, self.kdriver) self.sriov_vfs_port_1 = self.dut.ports_info[self.dut_ports[1]]["vfs_port"] - self.vf_ports = [self.sriov_vfs_port_0[0].pci, self.sriov_vfs_port_1[0].pci] + self.vf_ports = [self.dut_ports[0], self.dut_ports[1]] + self.vf_ports_pci = [self.sriov_vfs_port_0[0].pci, self.sriov_vfs_port_1[0].pci] for port in self.sriov_vfs_port_0 + self.sriov_vfs_port_1: port.bind_driver(self.drivername) @@ -82,7 +84,9 @@ class TestVfL2fwd(TestCase): # the cases use the first two ports port_mask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]]) cores = self.dut.get_core_list(self.core_config, socket=self.ports_socket) - eal_params = self.dut.create_eal_parameters(cores=cores, ports=self.vf_ports) + eal_params = self.dut.create_eal_parameters( + cores=cores, ports=self.vf_ports_pci + ) for queues in self.test_queues: command_line = "./%s %s -- -q %s -p %s &" % ( self.app_l2fwd_path, @@ -133,4 +137,8 @@ class TestVfL2fwd(TestCase): """ Run after each test suite. """ - pass + self.dut.kill_all() + if self.vf_ports: + for item in self.vf_ports: + self.dut.destroy_sriov_vfs_by_port(item) + self.dut.bind_interfaces_linux(self.drivername) -- 2.25.1