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 59038592A for ; Wed, 20 May 2015 08:43:04 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 19 May 2015 23:43:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,463,1427785200"; d="scan'208";a="728830743" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 19 May 2015 23:43:02 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t4K6h0rI031411; Wed, 20 May 2015 14:43:00 +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 t4K6gwOx008266; Wed, 20 May 2015 14:43:00 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t4K6gwfV008262; Wed, 20 May 2015 14:42:58 +0800 From: huilongx xu To: dts@dpdk.org Date: Wed, 20 May 2015 14:42:57 +0800 Message-Id: <1432104177-8231-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] 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 06:43:05 -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. dut add a function set_default_corelist, if the server cores number more then 4, the default cores is 4. In test case you can used self.dut.default_cores to start app. Signed-off-by: huilong xu --- framework/dut.py | 11 +++++++++++ framework/pmd_output.py | 3 +++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 5b7aba2..656fc78 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -140,6 +140,16 @@ class Dut(Crb): """ return self.crb['pass'] + def set_default_corelist(self): + """ + set default cors list + """ + core_num = len(self.cores) + if core_num <= 4: + self.default_cores = "1S/%dC/1T" % core_num + else: + self.default_cores = "1S/4C/1T" + def dut_prerequisites(self): """ Prerequest function should be called before execute any test case. @@ -155,6 +165,7 @@ class Dut(Crb): self.send_expect('alias sed=gsed', '# ') self.init_core_list() + self.set_default_corelist() self.pci_devices_information() # scan ports before restore interface self.scan_ports() diff --git a/framework/pmd_output.py b/framework/pmd_output.py index 97274a5..78b4e4f 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -87,6 +87,9 @@ class PmdOutput(): return self.command def start_testpmd(self, cores, param='', eal_param='', socket=0): + if "--txqflags" not in param: + param += " --txqflags=0" + 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" \ -- 1.7.4.4