From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 6/6] virtio: return 1 to tell the upper layer we don't take over this device Date: Wed, 09 Mar 2016 15:23:41 -0800 (PST) Message-ID: <3562231.jlqsJmrYNZ@xps13> References: <20151222035041.GA7532@pxdev.xzpeter.org> <1457451223-82306-1-git-send-email-huawei.xie@intel.com> <1457451223-82306-7-git-send-email-huawei.xie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, nikita.troitsky@intel.com To: Huawei Xie Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id C4BF42BA1 for ; Thu, 10 Mar 2016 00:23:42 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id l68so6763017wml.0 for ; Wed, 09 Mar 2016 15:23:42 -0800 (PST) In-Reply-To: <1457451223-82306-7-git-send-email-huawei.xie@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-03-08 23:33, Huawei Xie: > PMD_INIT_LOG(INFO, "trying with legacy virtio pci."); > - if (legacy_virtio_resource_init(dev, hw) < 0) > + if (legacy_virtio_resource_init(dev, hw) < 0) { > + if (dev->kdrv == RTE_KDRV_UNKNOWN && > + dev->devargs->type != RTE_DEVTYPE_WHITELISTED_PCI) { I still think you should add && dev->devargs->type != RTE_DEVTYPE_BLACKLISTED_PCI) Not a big deal. > + PMD_INIT_LOG(INFO, > + "skip kernel managed virtio device."); > + return 1; > + } > return -1;