From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3] dev: fix virtual dev attach Date: Mon, 31 Jul 2017 15:20:29 +0200 Message-ID: <3447349.fNn8M4kDGr@xps> References: <032453ede0e0c6d5464bd9d53a45b48cf4d229db.1501505748.git.gaetan.rivet@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Gaetan Rivet 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) In-Reply-To: <032453ede0e0c6d5464bd9d53a45b48cf4d229db.1501505748.git.gaetan.rivet@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.