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 E705AA04F7; Tue, 7 Jan 2020 03:11:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E9851D8E2; Tue, 7 Jan 2020 03:11:39 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 913951D8E0 for ; Tue, 7 Jan 2020 03:11:37 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2020 18:11:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,404,1571727600"; d="scan'208";a="225570890" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 06 Jan 2020 18:11:36 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jan 2020 18:11:36 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 6 Jan 2020 18:11:36 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 6 Jan 2020 18:11:35 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.30]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.139]) with mapi id 14.03.0439.000; Tue, 7 Jan 2020 10:11:34 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] framework/pktgen_trex: fix issue about other type of core_mask Thread-Index: AQHVxP3ftBPtkgaU2Eqm34/O2Ig7fKfedY7w Date: Tue, 7 Jan 2020 02:11:33 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBA3B3E@SHSMSX101.ccr.corp.intel.com> References: <1578335427-28803-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1578335427-28803-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/pktgen_trex: fix issue about other type of core_mask 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: Tuesday, January 7, 2020 2:30 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] framework/pktgen_trex: fix issue about other ty= pe > of core_mask >=20 > Signed-off-by: lihong > --- > framework/pktgen_trex.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/framework/pktgen_trex.py b/framework/pktgen_trex.py index > 705d8f5..61c8c0c 100644 > --- a/framework/pktgen_trex.py > +++ b/framework/pktgen_trex.py > @@ -794,7 +794,9 @@ class TrexPacketGenerator(PacketGenerator): > # clear the stats before injecting > self._conn.clear_stats() > # 'core_mask' list must be the same length as 'ports' list > - core_mask =3D self.core_mask[:len(self._traffic_ports)] > + core_mask =3D self.core_mask > + if type(self.core_mask) =3D=3D list: > + core_mask =3D self.core_mask[:len(self._traffic_ports)] > # Start traffic on port(s) > run_opt =3D { > 'ports': self._traffic_ports, > -- > 2.7.4