From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id E2CFB7CA3 for ; Fri, 14 Jul 2017 23:12:35 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id j85so12764487wmj.0 for ; Fri, 14 Jul 2017 14:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=BVy1UPLHBGwV7qtt/O8gxcH+NjJi3MFnqk/JJOll0Q8=; b=m5GLUqH6K614Gf9ZNIBWAORdJ9en0zd89JGVDl8b7t2hHygThLldo49qpVwiVxKxtB 0LsoDB5f2Bi3UrzvxftgP62y+vkLiu4lP7ElEg0YWKA4V5/qyKXFb8GXgE7WtQpMMZX6 g2zIHkOwp2eDXA5CGl9a79L892Vk94qnY2KThxe8uJvVDvLrx5sDNlbRGfx+9W7yWO1/ VyY4wc9/gXbJhnOxnTOL4OICmOOVABsSDxY8qhgU4JInPqjOHnW0pgxT9rvJvHCc3r2s UDGpEI15EyQSym2q68shuODFT1cP8F9zWrw/kmXmYqeEniK+kvIN2cuMZTWJopqOTYaX 8mXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=BVy1UPLHBGwV7qtt/O8gxcH+NjJi3MFnqk/JJOll0Q8=; b=NU+kwwBEE3+JkMcaKan23Zw+c6RjebNEdFhD83VCBt5JC7QgabifpZ2m6MnOlNbGs2 v0UffOSgoTIRgYenjWJWcOADQXwHisC/uyTj9+uPVbtxsFy+A+IB5P3byX3Y/7c4vy4/ l/9/p0gAUTTDplIlBVib7w24kg4ojeTb3sqIKjPjCgQ9xsKf/sdKGexOeEumq50uEmEk IdQMhPEJ63djTlvem2UwjIkMKG9QrtHttYI877lV9JDur+MEAmecln17W2jost5fGJuy edncyLGAwIgA/GGShzBHTVnNLGysZPtPRax6vgBGnfD0x+rZAweQOG5CrzFlUX3xDnL1 UWEg== X-Gm-Message-State: AIVw113fWCbcxeZAXMdskF+P09p0DgzvTWt4RW4EhG6V3TABEieYjUHz EcNbLYAcJqOhJzGc X-Received: by 10.80.174.247 with SMTP id f52mr8397462edd.15.1500066755529; Fri, 14 Jul 2017 14:12:35 -0700 (PDT) Received: from localhost.localdomain ([37.228.147.16]) by smtp.gmail.com with ESMTPSA id c11sm4892223eda.0.2017.07.14.14.12.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 14 Jul 2017 14:12:33 -0700 (PDT) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Date: Fri, 14 Jul 2017 17:12:03 -0400 Message-Id: <20170714211213.34436-6-jblunck@infradead.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170714211213.34436-1-jblunck@infradead.org> References: <20170711232512.54641-1-jblunck@infradead.org> <20170714211213.34436-1-jblunck@infradead.org> Subject: [dpdk-dev] [PATCH v2 05/15] pci: use scan_mode configuration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 21:12:36 -0000 When scanning/probing devices the bus doesn't need to look at the devargs->type field: if the bus is in blacklist probing mode and there is no devargs found for the device it is white-listed. Therefore it is enough to let the bus check for the scan_mode. Signed-off-by: Jan Blunck --- lib/librte_eal/common/eal_common_pci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 72fcc35c2..fb0e29ac4 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -197,8 +197,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, /* no initialization when blacklisted, return without error */ if (dev->device.devargs != NULL && - dev->device.devargs->type == - RTE_DEVTYPE_BLACKLISTED_PCI) { + rte_pci_bus.bus.conf.scan_mode == RTE_BUS_SCAN_BLACKLIST) { RTE_LOG(INFO, EAL, " Device is blacklisted, not" " initializing\n"); return 1; @@ -404,8 +403,7 @@ rte_pci_probe(void) /* probe all or only whitelisted devices */ if (probe_all) ret = pci_probe_all_drivers(dev); - else if (devargs != NULL && - devargs->type == RTE_DEVTYPE_WHITELISTED_PCI) + else if (devargs != NULL) ret = pci_probe_all_drivers(dev); if (ret < 0) { RTE_LOG(ERR, EAL, "Requested device " PCI_PRI_FMT -- 2.13.2