From: Yasufumi Ogawa <yasufum.o@gmail.com>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 1/3] tools/sppc: add blacklist and whitelist options
Date: Mon, 12 Aug 2019 16:13:07 +0900 [thread overview]
Message-ID: <20190812071309.18991-2-yasufum.o@gmail.com> (raw)
In-Reply-To: <20190812071309.18991-1-yasufum.o@gmail.com>
EAL option `blacklist` is to exclude PCI devices from under management
of DPDK, and `whitelist` is to include devices in opposition. This
update is to add thesee options to app launcher because app container
tries to have PCI devices, such as `phy:0` or so, which are already
owned by SPP without `blacklist` or `whitelist`.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
tools/sppc/lib/app_helper.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tools/sppc/lib/app_helper.py b/tools/sppc/lib/app_helper.py
index 38c9ade..17b98b3 100644
--- a/tools/sppc/lib/app_helper.py
+++ b/tools/sppc/lib/app_helper.py
@@ -29,6 +29,14 @@ def add_eal_args(parser, mem_size=1024, mem_channel=4):
'--socket-mem',
type=str,
help='Memory size')
+ parser.add_argument(
+ '-b', '--pci-blacklist',
+ nargs='*', type=str,
+ help='PCI blacklist for excluding devices')
+ parser.add_argument(
+ '-w', '--pci-whitelist',
+ nargs='*', type=str,
+ help='PCI whitelist for including devices')
parser.add_argument(
'--nof-memchan',
type=int,
@@ -83,6 +91,15 @@ def setup_eal_opts(args, file_prefix, proc_type='auto', hugedir=None):
'--vdev', 'virtio_user%d,queues=%d,path=%s' % (
dev_ids[i], args.nof_queues, socks[i]['guest']), '\\']
+ if (args.pci_blacklist is not None) and (args.pci_whitelist is not None):
+ common.error_exit("Cannot use both of '-b' and '-w' at once")
+ elif args.pci_blacklist is not None:
+ for bd in args.pci_blacklist:
+ eal_opts += ['-b', bd, '\\']
+ elif args.pci_whitelist is not None:
+ for wd in args.pci_whitelist:
+ eal_opts += ['-w', wd, '\\']
+
eal_opts += [
'--file-prefix', file_prefix, '\\',
'--', '\\']
--
2.17.1
next prev parent reply other threads:[~2019-08-12 7:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 7:13 [spp] [PATCH 0/3] Add blacklist EAL option for SPP container Yasufumi Ogawa
2019-08-12 7:13 ` Yasufumi Ogawa [this message]
2019-08-12 7:13 ` [spp] [PATCH 2/3] docs: add two optiosn to examples of sppc Yasufumi Ogawa
2019-08-12 7:13 ` [spp] [PATCH 3/3] docs: add usage of blacklist for SPP container Yasufumi Ogawa
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=20190812071309.18991-2-yasufum.o@gmail.com \
--to=yasufum.o@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=spp@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).