From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by dpdk.org (Postfix) with ESMTP id 9D44E530A for ; Wed, 3 Aug 2016 18:58:05 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id l69so12292387lfg.1 for ; Wed, 03 Aug 2016 09:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=from:subject:date:message-id:cc:to:mime-version; bh=TUcRxiUsgn6wbzOy/BUZeGeyIeBU39825WhKnhUj2Ak=; b=KPj3e9r6cVERf6qeDGLpjuax+OvqgF1iYfcnzNhOfBMpkqFC7gF+V/MQvA/g3JqfI1 GKsnNiFU57ZOZ+u5I8xF1a0T7GsLHefshUYe+/qv5Mcp3WWqXoNb7TfuPsZ9dEtcKsNN kzu7LAGurKgsVwlNCz6b/gv4ESh0YggzTx+m+P/BiM5d2Xq6fEW2dL2SBEYTisQt5BFP GTXx62gWvy1IwUpTtkHRXT3vh3ZcZ6QvHSjdiIXCT/6JudwOjELTePpDY1ZGw487xP8U sJ/hHBy5Fb14ViQ07ZmxfHYtovDk9//tiK1dtr/qb87T1oluf+Zj2R6m8Dx407KEZIWa kYnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:date:message-id:cc:to:mime-version; bh=TUcRxiUsgn6wbzOy/BUZeGeyIeBU39825WhKnhUj2Ak=; b=k/HWtVrp02+wjPBb07wi5az6ZlM14uzzbl48JYq9GkK1dB7y00qdVqO7rCFcZ0PoBd oOtHxQLwZ9ZlrJSF2C5IuBWl7tLe28/6eP66r+1i+FZkdI+fSfY0KkXXkqGL80ZtMlDj /aoqqk7AsM8UdD8VdTeTZ3Mq90uUtN6CoKqlCIRiKgCtGIT1kahPBhT+99WMgTEDDQVs FsqAvhNQRIVdwVXefeBuP2u02i37LFBgW0rZTICD31XKwGKoJzQfGBR2BgiSyyMbIG13 /Xmv6Xpg9aoVQBMw4eMKS2GBKlkjPTD7kCxJRjaT6xgx+WUJC6B0Zawu+XSihAkgI6wr 2scw== X-Gm-Message-State: AEkooustWYFpp1QP/lrRXD5VIimcYskZF9gU3AOYYHBE416X7oGB99ajBL8/jLXeMuEz9w== X-Received: by 10.46.0.97 with SMTP id 94mr20692892lja.60.1470243484753; Wed, 03 Aug 2016 09:58:04 -0700 (PDT) Received: from [172.20.100.10] (vpn.arccn.ru. [95.182.74.2]) by smtp.gmail.com with ESMTPSA id u2sm1536176lja.16.2016.08.03.09.58.03 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 09:58:03 -0700 (PDT) From: Igor Ryzhov Date: Wed, 3 Aug 2016 19:58:02 +0300 Message-Id: Cc: David Marchand To: dev@dpdk.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] rte_eth_dev_attach returns 0, although device is not attached X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2016 16:58:05 -0000 Hello. Function rte_eth_dev_attach can return false positive result. It happens because rte_eal_pci_probe_one returns zero if no driver is = found for the device: ret =3D pci_probe_all_drivers(dev); if (ret < 0) goto err_return; return 0; (pci_probe_all_drivers returns 1 in that case) For example, it can be easily reproduced by trying to attach virtio = device, managed by kernel driver. I think it should be: ret =3D pci_probe_all_drivers(dev); if (ret) goto err_return; return 0; Best regards, Igor=