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 4F540423C1; Fri, 13 Jan 2023 10:39:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48F7E42DAF; Fri, 13 Jan 2023 10:39:03 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 09E2042D53 for ; Fri, 13 Jan 2023 10:39:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673602742; x=1705138742; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DFd38y0S8EwRtCsA9ljp51FX3TGhDAezR/wsBzpH1+0=; b=EYRh8Nt+WkIdYP+ELQH5Zi4Wck/NsNQASk6+aERmd2DIiRhzNoTfFuy+ ytm4xjG2NlazE5LttWu6H+R5xnOKGQ/YRNWOmOkkhiHLHgPj0bSNki/2V Ng8ZvQnz4P2cUWJ1kd+2ESIiOIpcErjq8RH3b0lYJ5XpK7bVQd1zkmZH9 T/iEcZUkG71o73OxMASBuQ4PXh4Sm8MU+m0olQuwqMuxxl/sLQYq+S9IC vfoWf9SASOtJk9WHJWbiBpo0H6efp+KbGX1caVNlKfhP68KKVQfwimXOs d9kZ41HR7Mb+KrgXu3UzQ/6IfN+Hvxtbj7pE8PSlMa+lkWskcbkfUJCtZ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="386302497" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="386302497" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 01:39:01 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="832021424" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="832021424" Received: from unknown (HELO localhost.localdomain) ([10.239.252.196]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 01:38:58 -0800 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1] tests/vf_l2fwd: rebind interfaces to vfio-pci to avoid impacting pf suite Date: Fri, 13 Jan 2023 17:38:52 +0800 Message-Id: <20230113093854.634776-3-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230113093854.634776-1-yux.jiang@intel.com> References: <20230113093854.634776-1-yux.jiang@intel.com> 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 vfio-pci to avoid impacting pf suite Signed-off-by: Yu Jiang --- tests/TestSuite_vf_l2fwd.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_vf_l2fwd.py b/tests/TestSuite_vf_l2fwd.py index 542838c6..849ba638 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,7 @@ 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 +135,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