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 6850CA04F7; Tue, 7 Jan 2020 02:57:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AB701D8DC; Tue, 7 Jan 2020 02:57:33 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id BCC7B1D8DA for ; Tue, 7 Jan 2020 02:57:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2020 17:57:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,404,1571727600"; d="scan'208";a="216998763" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by fmsmga007.fm.intel.com with ESMTP; 06 Jan 2020 17:57:29 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Tue, 7 Jan 2020 02:30:27 +0800 Message-Id: <1578335427-28803-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [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" Signed-off-by: lihong --- framework/pktgen_trex.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 = self.core_mask[:len(self._traffic_ports)] + core_mask = self.core_mask + if type(self.core_mask) == list: + core_mask = self.core_mask[:len(self._traffic_ports)] # Start traffic on port(s) run_opt = { 'ports': self._traffic_ports, -- 2.7.4