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 CEAABA04F1; Mon, 6 Jan 2020 09:39:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2F8E1D5FC; Mon, 6 Jan 2020 09:39:51 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 2C4DA1D5F9 for ; Mon, 6 Jan 2020 09:39:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2020 00:39:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,401,1571727600"; d="scan'208";a="370200488" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by orsmga004.jf.intel.com with ESMTP; 06 Jan 2020 00:39:48 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Mon, 6 Jan 2020 09:12:46 +0800 Message-Id: <1578273166-16197-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] framework/pktgen_trex: set core_mask length same with ports list length 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 2ff5894..705d8f5 100644 --- a/framework/pktgen_trex.py +++ b/framework/pktgen_trex.py @@ -793,11 +793,13 @@ class TrexPacketGenerator(PacketGenerator): try: # 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)] # Start traffic on port(s) run_opt = { 'ports': self._traffic_ports, 'mult': rate_percent, - 'core_mask': self.core_mask, + 'core_mask': core_mask, 'force': True,} self.logger.info("begin traffic ......") self.logger.debug(run_opt) -- 2.7.4