From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 7D722568B for ; Wed, 20 May 2015 10:56:59 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 20 May 2015 01:56:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,464,1427785200"; d="scan'208";a="574149417" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 20 May 2015 01:56:58 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t4K8uuOm016834; Wed, 20 May 2015 16:56:56 +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 t4K8usaX009610; Wed, 20 May 2015 16:56:56 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t4K8ur5C009606; Wed, 20 May 2015 16:56:53 +0800 From: huilongx xu To: dts@dpdk.org Date: Wed, 20 May 2015 16:56:52 +0800 Message-Id: <1432112212-9575-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [v2] support dpdk2.0 code 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: Wed, 20 May 2015 08:57:02 -0000 From: huilong xu changed list: 1. when start testpmd by pmd_output model, if testpmd parameter not include "--txqflags=0", add it. because in dpdk2.0 testpmd must used txqflags for open hardware features, egg: checsum offload, vlan 2. pmd_output add a function set_default_corelist, if the server cores number more then 2, the default cores is 2. In test case you can used "Default" to start testpmd. Signed-off-by: huilong xu --- framework/pmd_output.py | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/framework/pmd_output.py b/framework/pmd_output.py index 97274a5..3c8d5a2 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -54,6 +54,7 @@ class PmdOutput(): self.tx_bytes_prefix = "TX-bytes:" self.bad_ipcsum_prefix = "Bad-ipcsum:" self.bad_l4csum_prefix = "Bad-l4csum:" + self.set_default_corelist() def get_pmd_value(self, prefix, out): pattern = re.compile(prefix + "(\s+)([0-9]+)") @@ -62,6 +63,17 @@ 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 = {} @@ -87,7 +99,14 @@ class PmdOutput(): return self.command def start_testpmd(self, cores, param='', eal_param='', socket=0): - core_list = self.dut.get_core_list(cores, socket) + # in dpdk2.0 need used --txqflags param to open hardware features + if "--txqflags" not in param: + param += " --txqflags" + + if cores == "Default": + core_list = self.dut.get_core_list(self.default_cores) + else: + core_list = self.dut.get_core_list(cores, socket) self.coremask = dts.create_mask(core_list) command = "./%s/app/testpmd -c %s -n %d %s -- -i %s" \ % (self.dut.target, self.coremask, self.dut.get_memory_channels(), eal_param, param) -- 1.7.4.4