From: huilongx xu <huilongx.xu@intel.com>
To: dts@dpdk.org
Subject: [dts] [v2] support dpdk2.0 code
Date: Wed, 20 May 2015 16:56:52 +0800 [thread overview]
Message-ID: <1432112212-9575-1-git-send-email-huilongx.xu@intel.com> (raw)
From: huilong xu <huilongx.xu@intel.com>
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 <huilongx.xu@intel.com>
---
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
reply other threads:[~2015-05-20 8:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432112212-9575-1-git-send-email-huilongx.xu@intel.com \
--to=huilongx.xu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).