From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BAB31A0471 for ; Mon, 12 Aug 2019 09:13:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2DDBDE3; Mon, 12 Aug 2019 09:13:18 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by dpdk.org (Postfix) with ESMTP id 712BEDE3 for ; Mon, 12 Aug 2019 09:13:17 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id w3so11817252pgt.13 for ; Mon, 12 Aug 2019 00:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=JUnNT1/du/VtNOSbjP5DLEkYw38NJD2P9/zqpCAEgas=; b=foEnpNuzd0+WQHeJVih1trYcNB8aj7rT2naHnFLMvlZg6cZ2WNr+jHFgWFAheHZmmk F3mxQ8QMoo2QiS3ZfzYklvQ6rWJYxvz0aXKAjDvHAXtZEWr3L4Uoj2HVShyRq8Am6NiC PiN7xis6Pa44h1g0urzFbREcMGi5YGAvGByg3eOB3/HleJ1vyvyboDflBA25hy8SmYT6 pdQL19daeSvIX+pEJ0HlYGrF2jffLpp2qz9f/9+qUUjZkHYtOamFhRB5AlUrGovC/L8e CPUhlbdLv2XkWeyxnQIKIK6jiGCtCqP3T0uBpoiRQ8RCyIBz/v9KIDKBunrvgs2HYxqC aa4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=JUnNT1/du/VtNOSbjP5DLEkYw38NJD2P9/zqpCAEgas=; b=Vcce1d8ZD7N7+HknTD9bmSWcgg6gHth7k8Ui5dAckxjIGdNYYmM1FmFB9FxPywtWXP RMvMtkv/yOOJdnI2b7nqtCrjdyzrMvwXT5+HntZU1HUiRXYh3MIjdSRM2tSteg9PAK1x DE1S34zIjtFS6Nh0QCvRhtVnEncR86YZ35MPkAGLhk0e0k/7MQG5bDQulOSgF/5iYhh+ duVpuRDVZtXqbFqCxtnoeiNLuFP+HCT2fKJIYgPbV+PvevJY+fhT7jr86mPo+wAJFHmg NXHXrKUQG7Au4NENxXW0f2IGUkJVD67DPx4X47KvF8EiBJIoW6+OwUAFATjQOL1ATR41 oJFQ== X-Gm-Message-State: APjAAAXPxUabZfaGxdOKD70l+F9cHNoDcHAmjW5LyreCPuLl3JMtlrdb 75phSruUmrwm9SI5buEEb4c3uoZM X-Google-Smtp-Source: APXvYqx0vDGvVxbOmDKCoTVp89FfuJpzsL0gjDonZXuhhetYsBbZbfs12HKwNg80jYA078XzJg3mWg== X-Received: by 2002:aa7:9a5a:: with SMTP id x26mr4921228pfj.47.1565593996633; Mon, 12 Aug 2019 00:13:16 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c8c2:de00:8000:cb51:dfcb:76c]) by smtp.gmail.com with ESMTPSA id v22sm102073794pgk.69.2019.08.12.00.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Aug 2019 00:13:16 -0700 (PDT) From: Yasufumi Ogawa To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Mon, 12 Aug 2019 16:13:07 +0900 Message-Id: <20190812071309.18991-2-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190812071309.18991-1-yasufum.o@gmail.com> References: <20190812071309.18991-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 1/3] tools/sppc: add blacklist and whitelist options X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" 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 --- 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