From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3BFFBA0487 for ; Wed, 3 Jul 2019 05:39:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 867365F11; Wed, 3 Jul 2019 05:39:25 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 4198B2BB5 for ; Wed, 3 Jul 2019 05:39:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 20:39:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,445,1557212400"; d="scan'208";a="247489558" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 02 Jul 2019 20:39:22 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jul 2019 20:39:20 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jul 2019 20:39:20 -0700 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.240]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.162]) with mapi id 14.03.0439.000; Wed, 3 Jul 2019 11:39:18 +0800 From: "Yao, BingX Y" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1] update kni for env with single cpu on socket 0 Thread-Index: AQHVMLjVvr5bGe+FZUWryNdmZ3UV76a4QDTA Date: Wed, 3 Jul 2019 03:39:18 +0000 Message-ID: <95BCD24840F32441BEA74E0F8A31839E058F3B53@SHSMSX106.ccr.corp.intel.com> References: <1562060104-127705-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1562060104-127705-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] update kni for env with single cpu on socket 0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" Tested-by: Yao, BingX Y -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xiao,qimai Sent: Tuesday, July 2, 2019 5:35 PM To: dts@dpdk.org Cc: Xiao, QimaiX Subject: [dts] [PATCH V1] update kni for env with single cpu on socket 0 1.update kni to run on env with single cpu on socket 0 2.add cmd to close f= irewall on ubuntu Signed-off-by: xiao,qimai --- tests/TestSuite_kni.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index 6bf388c.= .a1c07a2 100644 --- a/tests/TestSuite_kni.py +++ b/tests/TestSuite_kni.py @@ -263,13 +263,34 @@ class TestKni(TestCase): =20 out =3D self.dut.build_dpdk_apps("./examples/kni/") self.verify('Error' not in out, "Compilation failed") + p0_pci =3D self.dut.ports_info[0]['pci'] + numa_node =3D int(self.dut.send_expect("cat /sys/bus/pci/devices/%= s/numa_node"%p0_pci, "# ", 30)) + socket_id =3D numa_node if numa_node > 0 else 0 + if socket_id=3D=3D0: + global default_1_port_cores_config + global default_2_port_cores_config + global routing_performance_steps + global bridge_performance_steps + global loopback_performance_steps + + default_1_port_cores_config=3Ddefault_1_port_cores_config.repl= ace('C{1.','C{0.') + default_2_port_cores_config=3Ddefault_1_port_cores_config.repl= ace('C{1.','C{0.') + for i in range(len(routing_performance_steps)): + routing_performance_steps[i]['config'] =3D routing_perform= ance_steps[i]['config'].replace('C{1.','C{0.') + for j in range(len(bridge_performance_steps)): + bridge_performance_steps[j]['config'] =3D bridge_performan= ce_steps[j]['config'].replace('C{1.','C{0.') + for k in range(len(loopback_performance_steps)): + loopback_performance_steps[k]['config'] =3D=20 + loopback_performance_steps[k]['config'].replace('C{1.','C{0.') =20 self.extract_ports_cores_config(default_1_port_cores_config) out =3D self.start_kni() self.verify("Error" not in out, "Error found during kni start") - - self.dut.send_expect("service iptables stop", "# ") - self.dut.send_expect("service firewalld stop", "# ") + out =3D self.dut.send_expect("cat /etc/os-release", "# ") + if "Ubuntu" in out: + self.dut.send_expect("ufw disable", "# ") + else: + self.dut.send_expect("service iptables stop", "# ") + self.dut.send_expect("service firewalld stop", "# ") =20 # get dts output path if self.logger.log_path.startswith(os.sep): -- 2.17.1