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 AD427231E for ; Thu, 13 Jul 2017 21:42:40 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id y5so7055590wmh.3 for ; Thu, 13 Jul 2017 12:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=j1oTMVuA89nIE63US0aihyTxEv02yRZEwxTTdQYYYQg=; b=KsoWqqRNAZuZey+W/KSlTTrTCrT2qjWVrMdbHT8rDQgzgAIp1SwW0MLpGdlc/vByDr 2FuuVlKyChENJ+iWyjoRiEUmy+iTq+7lZU5X3SGQk62f8Zl8gNWQFeFPNwSLAg2cFbYY cBtDM/AojnftCQHZnKV7nOlCtw/T9dTbmwk11ssKbSrX0WKBummZW1WRouue717RgO1r ay6vSQ7iq11APbsFaSIiX94rVK8AIuu+fgCVIdssN22HAz+yI1DTO7VT1z/FlsiiyZbw ko3ceQXXpk/cWH7iNw4bYC2qwVXkM/QB2D3C1nkAsSA5a1Q+o5nvYC6wnpEZgCHreDAR Q4vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=j1oTMVuA89nIE63US0aihyTxEv02yRZEwxTTdQYYYQg=; b=k73Fgw20wIkRkzGjiEsFwJMEUePnI9lxddRooXgQPxQ7lQm5jYX7Q4Bq9X5vhMVQNn 9Kp3/qLUdYPZl1asEUFZ6QeKJ2G3rcJH1RfAulYfDWBc7P7MndzTJuUleIx45rl+Gyh3 ivlpuo+r7sbYZatGuCTnlHPaqGqYPjZFmouQDj2J3jFKy7kAzRetHPJuUOm88K2+cZSJ hdBU8vqpVi79wj7drkK5v0p/1oQ5o5P0VebUjjTvdB4TCp7BO7ZVTkYeCPYrBxAWZ84D eXrZv8iZZ/CoHGPpz9RPU9t0/KLHG59hytJYQZXA3aD+sa3aZANX2Ap7YStlDCwRYNQJ FnHg== X-Gm-Message-State: AIVw110Y4epPmdpJr4edjQXpYuX5LGdJMvWscfRJoW1bL9nk6O2FcWF9 B+b7QiuKq0AiHDVVY+cRr5aQx16rdQ== X-Received: by 10.28.2.195 with SMTP id 186mr268007wmc.108.1499974960139; Thu, 13 Jul 2017 12:42:40 -0700 (PDT) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.45.210 with HTTP; Thu, 13 Jul 2017 12:42:39 -0700 (PDT) In-Reply-To: <20170713175900.GL11154@bidouze.vm.6wind.com> References: <20170711232512.54641-1-jblunck@infradead.org> <20170711232512.54641-5-jblunck@infradead.org> <20170713175900.GL11154@bidouze.vm.6wind.com> From: Jan Blunck Date: Thu, 13 Jul 2017 15:42:39 -0400 X-Google-Sender-Auth: lMoY3_h6VwSY80CV8wq3qcQkAec Message-ID: To: =?UTF-8?Q?Ga=C3=ABtan_Rivet?= Cc: dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 19:42:40 -0000 On Thu, Jul 13, 2017 at 1:59 PM, Ga=C3=ABtan Rivet = wrote: > On Tue, Jul 11, 2017 at 07:25:03PM -0400, Jan Blunck wrote: >> When scanning/probing devices the bus should use its configuration inste= ad >> 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. > You just introduced them in 17.08-rc1 and you want to remove them again for 17.11?! Please revert these changes in this case for 17.08-rc2. Thomas, what is your take on this? >> 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/com= mon/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 !=3D NULL && >> - dev->device.devargs->type =3D=3D >> - RTE_DEVTYPE_BLACKLISTED_PCI) { >> + rte_pci_bus.bus.conf.scan_mode =3D=3D RTE_BUS_SCAN_BLACKLI= ST) { >> 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 =3D pci_probe_all_drivers(dev); >> - else if (devargs !=3D NULL && >> - devargs->type =3D=3D RTE_DEVTYPE_WHITELISTED_PCI) >> + else if (devargs !=3D NULL) >> ret =3D pci_probe_all_drivers(dev); >> if (ret < 0) { >> RTE_LOG(ERR, EAL, "Requested device " PCI_PRI_FMT >> -- >> 2.13.2 >> > > -- > Ga=C4=97tan Rivet > 6WIND