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 EA372A0487 for ; Wed, 3 Jul 2019 07:40:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DDD6137AF; Wed, 3 Jul 2019 07:40:30 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 595EA1BE0 for ; Wed, 3 Jul 2019 07:40:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 22:40:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="154647661" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 02 Jul 2019 22:40:28 -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 22:40:27 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jul 2019 22:40:27 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.22]) with mapi id 14.03.0439.000; Wed, 3 Jul 2019 13:40:24 +0800 From: "Tu, Lijuan" 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: AQHVMLjVLcgYAR+QMEaynvfscb8MG6a4YiiQ Date: Wed, 3 Jul 2019 05:40:24 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAD90A5@SHSMSX101.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: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjk2ODQ0MmYtZDE4NS00YmZiLTliMTktNDg2MGExN2ZjOWZkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSE5teFJENzZxbEJvMUl5Y0x5bUJiN2x5YjZ6XC9oaWx3TU5wTnlKYXVLWlEyYWJUXC9ybUVzc3R5RE4rT24xXC94VCJ9 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" Applied, thanks > -----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 >=20 > 1.update kni to run on env with single cpu on socket 0 2.add cmd to close > firewall on ubuntu >=20 > Signed-off-by: xiao,qimai > --- > tests/TestSuite_kni.py | 27 ++++++++++++++++++++++++--- > 1 file changed, 24 insertions(+), 3 deletions(-) >=20 > 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.replace('C{1.',= 'C{0. > ') > + > default_2_port_cores_config=3Ddefault_1_port_cores_config.replace('C{1.',= 'C{0. > ') > + for i in range(len(routing_performance_steps)): > + routing_performance_steps[i]['config'] =3D > routing_performance_steps[i]['config'].replace('C{1.','C{0.') > + for j in range(len(bridge_performance_steps)): > + bridge_performance_steps[j]['config'] =3D > bridge_performance_steps[j]['config'].replace('C{1.','C{0.') > + for k in range(len(loopback_performance_steps)): > + loopback_performance_steps[k]['config'] =3D > + 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