From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 6C1F9912D for ; Mon, 31 Jul 2017 15:20:31 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 88DD02093F; Mon, 31 Jul 2017 09:20:30 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 31 Jul 2017 09:20:30 -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=hNRt1KHC6KJkpUc nNxWbBYq57TSS+vJG/4GDVGlxsdg=; b=aGUYh/J3hgsz0pnXf1BsevaawEbVYx4 n+3nLQjcv0ZzwITumm9TA99tpD/DOsRCITjb6r8nO2jC6JNhXQjc74FrUPZBe1yG lbd9iw9Q3KW2b1BemdP95uAKQDiVbU56hpFbJTT0Sr1wt9Pd08cURIoj4LpkZqDe 4HuorxNYdqSo= 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=hNRt1KHC6KJkpUcnNxWbBYq57TSS+vJG/4GDVGlxsdg=; b=mzxGylXn EbX2bFpCrqJdQkqO70Hw5aWGtAqZyoAZK/UYBcgLoyTDiSs1eSijG4KNjrxvyuKd sL89dxs0Xz1FoqowDE3Ez1nwzgzhbDeCaTUWTvGvvxwNPPPLHhQzZ0WoxKhvjMuf 90z7UnECyY0DDeskSYudH9bbeT/z0tVgjIf7tYvhIYyobhukw4baakRSUqDjyE+N v4d4gF1rThyUR64miQWdTTCgWCsZn/3OBGVuD+HoTUdIqMTnsvz1mqHvzJNeydmt IkkkM4Q87PW5Yp+EqSSL05yGqY42BoyPrunseKyYOC/lUwqArElI7SUJGEs/ypUy cqgMeYwGQIBjpw== X-ME-Sender: X-Sasl-enc: GVjturuCgDS/hqIWPUQrLKb5ZIq022OXV1giHesyGug1 1501507230 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3A3677E3B8; Mon, 31 Jul 2017 09:20:30 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org Date: Mon, 31 Jul 2017 15:20:29 +0200 Message-ID: <3447349.fNn8M4kDGr@xps> In-Reply-To: <032453ede0e0c6d5464bd9d53a45b48cf4d229db.1501505748.git.gaetan.rivet@6wind.com> References: <032453ede0e0c6d5464bd9d53a45b48cf4d229db.1501505748.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 v3] dev: fix virtual dev attach 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: Mon, 31 Jul 2017 13:20:31 -0000 31/07/2017 14:58, Gaetan Rivet: > Checking against error values returned by rte_eal_hotplug_add is > inelegant and prone to mistakes. Additionally, the failed PCI probe > prints a useless error that would throw off unsuspecting users: > > ERROR: failed to parse device "pci:net_ring0" > > This error is printed when attempting to probe a virtual device first > with the PCI bus (here, a net_ring0 device), which will inevitably fail. > > Use the relevant functions to infer the intended bus. The limitation to > PCI or vdev device is kept for strict API compatibility. Thus the PCI > probe attempt is avoided and the right function is directly called. > > Fixes: 1c35f666df07 ("dev: fix attach proceeding with vdev on PCI > success") > > Signed-off-by: Gaetan Rivet Applied with additional explanation from v1, thanks: dev: fix vdev attach after PCI mismatch If the device is a vdev, the parsing for PCI will fail with -EFAULT, and will not try to check for a vdev.