From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id A9B49271 for ; Thu, 13 Jul 2017 19:59:10 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id w126so213802wme.0 for ; Thu, 13 Jul 2017 10:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=b/02KTatF1o6OTzflv/qMz1jQL85Kuozgoh5p92uN9M=; b=k/q2Fhoqq++5xeFww0Td1KGS3somHqi6VMrhBbLbsDw6O+3jNXYGEF6u9HssSttR/M C9cnY7pR8GP3GLGC1oEeW4NQnIpiiK6IRqK9O+1HrHwWYNNx/X4h76aD0H2CfCxq6f19 RPPgK2yz9s+Ttl1HGItLFgerr+e54ljiV6+Ku6y5pi123GOuasxJpA8m73qVu+cfL34g /Iu5cQUAQubVcJPhaFF1AeB+PFL8wDIzNEuT1BeWXPHKY6/QP/ASBSxM+KHrjbsKv4Wt 2O3XOfzplA4bPs2hNa2enNwtTgJ3NEgzuTuGwBunX0UMiIBEhZhE4F9m3dmI4pHfQj6k FLFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=b/02KTatF1o6OTzflv/qMz1jQL85Kuozgoh5p92uN9M=; b=Vvuw2yidredas4fCpokyZ+d88q/r6PwMepUdT2n6g0YG/x/jvQQHWv2kgS/F/vyoeP UUy304ZUYrvzIVujYxen3S6l2ym1w/SsSdJ2YJqY/bSLqbw8gl3tUtpGUPx+OPrwYsYb npMvkD8hC7SL5imZpEZZ5qad4TjljQdDVBuPBQiSwb1k0QsvHGUcNm9gIhNQuZVXf5OI nAbjLYiPjWMP+kUQqNWdBXo0AFwFQVOknOVz0LOOeyUimf/eTQlapmleI2uneptNgT3u 7NjvZE5nGpqmxJUru2kyYzMz1ilZSyDjgPxpPIk81xcJXxZU1xyTDjZIKIQpfSXNtMNR S2Ww== X-Gm-Message-State: AIVw112X7je0xlw6VFgnDxZsBiyyAlYPCyvWdLFAWTj4/tRlqe22lLD8 vl/7t6korhRLG1R9 X-Received: by 10.28.56.198 with SMTP id f189mr3207342wma.88.1499968750142; Thu, 13 Jul 2017 10:59:10 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id r70sm17429wmb.16.2017.07.13.10.59.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 10:59:09 -0700 (PDT) Date: Thu, 13 Jul 2017 19:59:00 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Jan Blunck Cc: dev@dpdk.org Message-ID: <20170713175900.GL11154@bidouze.vm.6wind.com> References: <20170711232512.54641-1-jblunck@infradead.org> <20170711232512.54641-5-jblunck@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170711232512.54641-5-jblunck@infradead.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 04/13] 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: Thu, 13 Jul 2017 17:59:11 -0000 On Tue, Jul 11, 2017 at 07:25:03PM -0400, Jan Blunck wrote: > When scanning/probing devices the bus should use its configuration instead > of looking at the devargs->type field. > With this patch, how do you probe a device that was previously blacklisted? The answers I see to this question are pretty bad, maybe you have a good solution. On the other hand, can you explain why you want this limitation? What problem does this solve? You have one view of the hotplug API, I would like to understand why you hold this view. Regarding the rte_devargs API, it can be fixed without making the hotplug needlessly complicated I think. I must point out that the scan_mode (incorrectly named) is something that will be removed next release. The probe policies will be reworked and I don't think that the solution should be proposed as a fix a few days before the RC2. > 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 > -- Gaëtan Rivet 6WIND