From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id C33AF58CE for ; Sun, 9 Jul 2017 16:50:29 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6549C207D3; Sun, 9 Jul 2017 10:50:29 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 09 Jul 2017 10:50:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=1wASIA7BeEXKRB/ Rmju0//PFWk8mbQwpBUUIomv/pyc=; b=rRVmPCsShnsvtBHkvpqzRkHC1v0+6G/ Qtp/VDbeoXFFZYYdyir4TrMMj2NYCz9KTgbHZpyo75ik3hL2mymddsGim2h16a6F Z28PaXdNivzchMGYANpcXP78aS6uRaTs8Bk/t1ow7m8AIDr7Cgy0Epbix/yu9ltx Z71PpSVK8frw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=1wASIA7BeEXKRB/Rmju0//PFWk8mbQwpBUUIomv/pyc=; b=INCHpgUR qs8/XUL304oQtNIIEVnOChwN4xx/CYj+R12Yeqr4ee1/vIFrZA4GnEi3OgTI9/sZ v292Sz5ejhMktkhFfJeylROXFFbPLC8gi7xL5EauCdnL8wn3GJPA6+rKKhrdBsnn SjXPVBTzxgj3SAjboPXgwsbbo9VbLYq2DuUb/cYeOm+FD5UqvRWhocXBwjIb71gc T266YSRUFeOjPUrsZ31UutTHZI4w8Hfgb/HSxa8Crz4QsAI96Mnbk/wUzP9ct22j brNZBOVgRWYhUr0NnotoRi2DK9Ub5XkfyS0AY0NRPaycPbY0alsjXKjr3sn4BZVo m+7Do0oG1rW/LQ== X-ME-Sender: X-Sasl-enc: PrlUx8qE2XmE5pCJznPCRQ+PKgpYuA6Gppgk3U5HnKzE 1499611829 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 11B9F7E71B; Sun, 9 Jul 2017 10:50:29 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org, jblunck@infradead.org, matan@mellanox.com Date: Sun, 09 Jul 2017 16:50:28 +0200 Message-ID: <8124922.CSY8T9Vcb2@xps> In-Reply-To: <8816dcfaf7d7554cf1a105cf941b43dc8a9e7423.1499384590.git.gaetan.rivet@6wind.com> References: <8816dcfaf7d7554cf1a105cf941b43dc8a9e7423.1499384590.git.gaetan.rivet@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v7 12/17] devargs: parse bus policies 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: Sun, 09 Jul 2017 14:50:30 -0000 Hi, I think there is a real bug to fix in 17.08-rc2. More details below. Proposals are welcome. 07/07/2017 02:04, Gaetan Rivet: > --- a/lib/librte_eal/common/eal_common_devargs.c > +++ b/lib/librte_eal/common/eal_common_devargs.c > @@ -143,6 +143,21 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str) > > break; > } > + if (devargs->type == RTE_DEVTYPE_WHITELISTED_PCI) { > + if (bus->conf.scan_mode == RTE_BUS_SCAN_UNDEFINED) { > + bus->conf.scan_mode = RTE_BUS_SCAN_WHITELIST; > + } else if (bus->conf.scan_mode == RTE_BUS_SCAN_BLACKLIST) { > + fprintf(stderr, "ERROR: incompatible device type and bus scan mode\n"); > + goto fail; > + } > + } else if (devargs->type == RTE_DEVTYPE_BLACKLISTED_PCI) { > + if (bus->conf.scan_mode == RTE_BUS_SCAN_UNDEFINED) { > + bus->conf.scan_mode = RTE_BUS_SCAN_BLACKLIST; > + } else if (bus->conf.scan_mode == RTE_BUS_SCAN_WHITELIST) { > + fprintf(stderr, "ERROR: incompatible device type and bus scan mode\n"); > + goto fail; > + } > + } After another look, there is something wrong here. You are checking a probe policy (wrongly named scan_mode), in a function which can be not related at all with bus probing. Example with failsafe: 1/ We blacklist a device for the global EAL probe. So the probing mode is set from "undefined" to "blacklist". 2/ We add the device as a failsafe slave. 3/ The device must be plugged, no matter of the probe policy. But it is seen as a whitelist and rejected because the bus probing is in blacklist mode. I think it is a serious bug. PS: thanks Matan for having checked it