From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: lijuan.tu@intel.com, dts@dpdk.org
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 1/2] framework/dut: add -a support in create_eal_parameters
Date: Mon, 7 Dec 2020 17:53:01 +0800 [thread overview]
Message-ID: <20201207095302.2133-2-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <20201207095302.2133-1-haiyangx.zhao@intel.com>
eal parameter -w is deprecated since dpdk 20.11.0-rc3 and should use -a
instead. For dpdk LTS test and avoid modify the -w option in suites, keep the
-w support.
Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
framework/dut.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index f3ef8c6..dcf833b 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -116,7 +116,8 @@ class Dut(Crb):
"""
generate eal parameters character string
:param config:
- :return: eal_str eg:'-c 0xf -w 0000:88:00.0 -w 0000:88:00.1 --file-prefix=dpdk_1112_20190809143420'
+ :return: eal_str eg:'-c 0xf -a 0000:88:00.0 -a 0000:88:00.1 --file-prefix=dpdk_1112_20190809143420',
+ if dpdk version < 20.11-rc4, eal_str eg: '-c 0xf -w 0000:88:00.0 --file-prefix=dpdk_1112_20190809143420',
"""
default_cores = '1S/2C/1T'
blank = ' '
@@ -137,19 +138,20 @@ class Dut(Crb):
# deal with ports
w_pci_list = []
if 'ports' in config and len(config['ports']) != 0:
+ allow_option = '-a' if self.dpdk_version > '20.11.0-rc3' or self.dpdk_version == '20.11.0' else '-w'
for port in config['ports']:
if type(port) == int:
if 'port_options' in config and port in list(config['port_options'].keys()):
port_option = config['port_options'][port]
- w_pci_list.append('-w %s,%s' % (self.ports_info[port]['pci'], port_option))
+ w_pci_list.append('%s %s,%s' % (allow_option, self.ports_info[port]['pci'], port_option))
else:
- w_pci_list.append('-w %s' % self.ports_info[port]['pci'])
+ w_pci_list.append('%s %s' % (allow_option, self.ports_info[port]['pci']))
else:
if 'port_options' in config and port in list(config['port_options'].keys()):
port_option = config['port_options'][port]
- w_pci_list.append('-w %s,%s' % (port, port_option))
+ w_pci_list.append('%s %s,%s' % (allow_option, port, port_option))
else:
- w_pci_list.append('-w %s' % port)
+ w_pci_list.append('%s %s' % (allow_option, port))
w_pci_str = ' '.join(w_pci_list)
# deal with black ports
--
2.17.1
next prev parent reply other threads:[~2020-12-07 9:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 9:53 [dts] [PATCH V1 0/2] framework: add -a option support in eal param Haiyang Zhao
2020-12-07 9:53 ` Haiyang Zhao [this message]
2020-12-07 9:53 ` [dts] [PATCH V1 2/2] framework/pmd_output: add -a support in split_eal_param Haiyang Zhao
2020-12-07 10:02 ` [dts] [PATCH V1 0/2] framework: add -a option support in eal param Zhao, HaiyangX
2020-12-10 8:39 ` Tu, Lijuan
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=20201207095302.2133-2-haiyangx.zhao@intel.com \
--to=haiyangx.zhao@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@intel.com \
/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).