From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 2AFE795AB for ; Wed, 27 Jan 2016 13:44:59 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id l66so710013wml.0 for ; Wed, 27 Jan 2016 04:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=XQJtRQ6JcqLwFStrl/MfhqeqpdMGU2I1YR7IFpnttyc=; b=vi0u4kJMWeFxbKgozo23HLjgaasoQwzyM9mVhOVvyuQM88TJXSo1B6jsx2IgKnCVti sWaGAUGPXhrk4CuEVudF7EeMKDu/n/hjNGPMhjvgiXBrptwS1LKSibtLGlUKkbzcQ6si ZZAV8pWVwg+lsTGjCSUMUCzdvr5+R2WjYL0+FusVpF9gLmkobTHqHyeAN6+cPbcLm95k 8vndoe2bKzulNzEMCuXro0JWprvIL5k8o8C2Yvo3G7fhSZGbWGhY/l6F0PqiT8or2jzz U1HqST3kJdBP2yJGveRCvcYGnFTnmzwMrwyzxiAC5A5MojGUAAPNDOvUjgMqB7fl2Npg i/OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=XQJtRQ6JcqLwFStrl/MfhqeqpdMGU2I1YR7IFpnttyc=; b=YYDEOcKScDTmT6cK4D2/Yb9XLraPHG8+ePaUyYj/pWdu/SvgbWnV7SuK2HEi7bCt1n EzikBwUxVszvW48jsXaoF2YJleJO2ezx4z/jzD8adVvq//TTxJsEPh6bytun4LdKqnzv V2LC0ow2/NQqK+xFa6vjLOB+/8HZRQm5qFwkvYihMVR5aGh+d6eO6PteD8rJMQV5n2nO n5zIDt6a/wKKy7wgblKqWYblfyaAsD170E4MsQdjr1AC58VpHJsbHWklx0myvk4L7q1K 1zDhVYVXoQfX4iz7R96B4aXMnRDXuB40AIOmdOHzuSszhp09Ov0chEdjAzI0x66zQcul sq5g== X-Gm-Message-State: AG10YOShq29ymT+Q7FI+gA2JQKcC9bkPAgCCk8Qn79Z9A5X3zMhqQgZH0URUKWx3/FD6NeNJ X-Received: by 10.28.101.131 with SMTP id z125mr28898451wmb.60.1453898698850; Wed, 27 Jan 2016 04:44:58 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id z127sm8169757wme.2.2016.01.27.04.44.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jan 2016 04:44:58 -0800 (PST) From: Thomas Monjalon To: Huawei Xie Date: Wed, 27 Jan 2016 13:43:49 +0100 Message-ID: <34618638.VfLxKTif05@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <568E7382.9060406@redhat.com> References: <20151222035041.GA7532@pxdev.xzpeter.org> <1451843773-103006-5-git-send-email-huawei.xie@intel.com> <568E7382.9060406@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 4/4] virtio: check if any kernel driver is manipulating the virtio device 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, 27 Jan 2016 12:44:59 -0000 2016-01-07 16:17, Panu Matilainen: > On 01/03/2016 07:56 PM, Huawei Xie wrote: > > v2 changes: > > change LOG level from ERR to INFO > > > > virtio PMD could use IO port to configure the virtio device without > > using uio driver. > > > > There are two issues with previous implementation: > > 1) virtio PMD will take over each virtio device blindly even if some > > are not intended for DPDK. > > 2) driver conflict between virtio PMD and virtio-net kernel driver. > > > > This patch checks if there is any kernel driver manipulating the virtio > > device before virtio PMD uses IO port to configure the device. > > > > Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource") > > > > Signed-off-by: Huawei Xie > > --- > > drivers/net/virtio/virtio_ethdev.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > > index e815acd..7a50dac 100644 > > --- a/drivers/net/virtio/virtio_ethdev.c > > +++ b/drivers/net/virtio/virtio_ethdev.c > > @@ -1138,6 +1138,13 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev) > > int found = 0; > > size_t linesz; > > > > + if (pci_dev->kdrv != RTE_KDRV_NONE) { > > + PMD_INIT_LOG(INFO, > > + "kernel driver is manipulating this device." \ > > + " Please unbind the kernel driver."); > > At the very least this message needs to be changed. > > Like said earlier, I think the message could just as well be dropped > entirely, but at least it should be something to the tune of "ignoring > kernel owned device" instead of asking the user to break their > configuration. Huawei, a v3 is required. Thanks