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 7DB59A04F0; Fri, 27 Dec 2019 09:01:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6E2221BFF1; Fri, 27 Dec 2019 09:01:49 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E32AD1BFA8 for ; Fri, 27 Dec 2019 09:01:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2019 00:01:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,362,1571727600"; d="scan'208";a="243171347" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 27 Dec 2019 00:01:46 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Dec 2019 00:01:46 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 27 Dec 2019 00:01:46 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 27 Dec 2019 00:01:45 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.90]) with mapi id 14.03.0439.000; Fri, 27 Dec 2019 16:01:44 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] framework/tester: only restore ports if start trex in dts Thread-Index: AQHVuu1Hs3RXpruG5EyCsIBOljbpKKfNod8Q Date: Fri, 27 Dec 2019 08:01:44 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB8EE89@SHSMSX101.ccr.corp.intel.com> References: <1577228799-25999-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1577228799-25999-1-git-send-email-lihongx.ma@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.2.0.6 dlp-reaction: no-action 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] framework/tester: only restore ports if start trex in dts 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 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong > Sent: Wednesday, December 25, 2019 7:07 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] framework/tester: only restore ports if start t= rex in > dts >=20 > Signed-off-by: lihong > --- > framework/tester.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/framework/tester.py b/framework/tester.py index > 5b4aff0..7b05832 100644 > --- a/framework/tester.py > +++ b/framework/tester.py > @@ -808,7 +808,9 @@ class Tester(Crb): > if self.it_uses_external_generator(): > if self.is_pktgen and self.pktgen: > self.pktgen.quit_generator() > - self.restore_trex_interfaces() > + # only restore ports if start trex in dts > + if 'start_trex' in self.pktgen.conf.keys(): > + self.restore_trex_interfaces() > self.pktgen =3D None > elif self.ixia_packet_gen: > self.ixia_packet_gen.close() > -- > 2.7.4