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 57992A0613 for ; Mon, 23 Sep 2019 08:58:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3BBE61BE9D; Mon, 23 Sep 2019 08:58:17 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E58084C90 for ; Mon, 23 Sep 2019 08:58:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Sep 2019 23:58:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,539,1559545200"; d="scan'208";a="363538057" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 22 Sep 2019 23:58:11 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 22 Sep 2019 23:58:07 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.113]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.92]) with mapi id 14.03.0439.000; Mon, 23 Sep 2019 14:58:06 +0800 From: "Mo, YufengX" To: "dts@dpdk.org" , "Li, WenjieX A" , "Chen, Zhaoyan" , "Tu, Lijuan" Thread-Topic: [dts][PATCH V2 4/7] framework/pktgen_base: fix internal bug Thread-Index: AQHVcdsFgfHmhaB58Earwsy2O1pdwKc41MSw Date: Mon, 23 Sep 2019 06:58:05 +0000 Message-ID: References: <20190923065040.8251-1-yufengx.mo@intel.com> <20190923065040.8251-5-yufengx.mo@intel.com> In-Reply-To: <20190923065040.8251-5-yufengx.mo@intel.com> Accept-Language: zh-CN, 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 V2 4/7] framework/pktgen_base: fix internal bug 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 Mo, YufengX > -----Original Message----- > From: Mo, YufengX > Sent: Monday, September 23, 2019 2:51 PM > To: dts@dpdk.org; Li, WenjieX A ; Chen, Zhaoyan <= zhaoyan.chen@intel.com>; Tu, Lijuan > Cc: Mo, YufengX > Subject: [dts][PATCH V2 4/7] framework/pktgen_base: fix internal bug >=20 >=20 > *. remove logger format setting after import libs to eliminate dts redund= ant logs. > *. set part of information logger display to debug level. > *. remove un-used libs import. >=20 > Signed-off-by: yufengmx > --- > framework/pktgen_base.py | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) >=20 > diff --git a/framework/pktgen_base.py b/framework/pktgen_base.py > index 4cb5447..cd541b0 100644 > --- a/framework/pktgen_base.py > +++ b/framework/pktgen_base.py > @@ -29,7 +29,6 @@ > # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >=20 > -import os > import time > import logging > from abc import abstractmethod > @@ -45,11 +44,6 @@ from settings import PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_= IXIA, PKTGEN > TRANSMIT_CONT =3D 'continuous' > TRANSMIT_M_BURST =3D 'multi_burst' > TRANSMIT_S_BURST =3D 'single_burst' > -# set logger > -FORMAT =3D '%(message)s' > -logging.basicConfig(format=3DFORMAT) > -logger =3D logging.getLogger(os.path.basename(__file__)[:-3].upper()) > -logger.setLevel(logging.INFO) >=20 >=20 > class PacketGenerator(object): > @@ -83,7 +77,7 @@ class PacketGenerator(object): > if tester_pci =3D=3D gen_pci: > msg =3D "gen port {0} map test port {1}".format( > port_id, port_id= x) > - self.logger.info(msg) > + self.logger.debug(msg) > return port_idx > else: > port =3D -1 > @@ -105,7 +99,7 @@ class PacketGenerator(object): > tester_pci =3D info['pci'] > port =3D self._get_gen_port(tester_pci) > msg =3D "test port {0} map gen port {1}".format(port_id, por= t) > - self.logger.info(msg) > + self.logger.debug(msg) > except: > port =3D -1 >=20 > @@ -349,8 +343,6 @@ class PacketGenerator(object): > else: > result =3D None >=20 > - self.logger.info(result) > - > return result >=20 > def _summary_statistic(self, array=3D[]): > -- > 2.21.0