From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 54808C30E for ; Thu, 16 Jul 2015 15:55:07 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 16 Jul 2015 06:55:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,488,1432623600"; d="scan'208";a="748578852" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 16 Jul 2015 06:55:05 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6GDt3jA006832; Thu, 16 Jul 2015 21:55:03 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t6GDt1d0027087; Thu, 16 Jul 2015 21:55:03 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6GDt1pD027083; Thu, 16 Jul 2015 21:55:01 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 16 Jul 2015 21:54:47 +0800 Message-Id: <1437054888-27021-5-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1437054888-27021-1-git-send-email-yong.liu@intel.com> References: <1437054888-27021-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH 4/5] Support start testpmd with assigned core list 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: , X-List-Received-Date: Thu, 16 Jul 2015 13:55:07 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/framework/pmd_output.py b/framework/pmd_output.py index 4ccdd0d..23d4c0d 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -65,17 +65,16 @@ class PmdOutput(): return None else: return int(m.group(2)) - + def set_default_corelist(self): """ set default cores for start testpmd - """ + """ core_number = len(self.dut.cores) if core_number < 2: raise else: self.default_cores = "1S/2C/1T" - def get_pmd_stats(self, portid): stats = {} @@ -105,7 +104,9 @@ class PmdOutput(): if "--txqflags" not in param: param += " --txqflags=0" - if cores == "Default": + if type(cores) == list: + core_list = cores + elif cores == "Default": core_list = self.dut.get_core_list(self.default_cores) else: core_list = self.dut.get_core_list(cores, socket) -- 1.9.3