From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id EF2985A87 for ; Wed, 23 Dec 2015 23:27:50 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id l126so163791456wml.0 for ; Wed, 23 Dec 2015 14:27:50 -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=3kZ2Lrcg9rxaetlR6GKAyzUSX2j10m/YOYVZW30YglI=; b=i+KtX2svOeZIRqZeug5fNYi0VqFF1B2r6vGnHM1KVw8gumiwvXvygX6j2EfFETiMlf ltD6zJvoRTUbqWvA7dKU1hikT5Zh6IVJZ8tMruwEqTsnY8yCeWAtA4SQRGPZvLsTgKYC e8L3vF17qcyIRlZY0gEt05qY9TRN3lt9hB3iwtw4t3yqX5gpojtD4nM447VmSj0V/wzK KuVzyG/8OvAYkbnFxWdFNH+ca/xctR7nLm5xTdxWXhwj6gbfiZtObgGOzaHBiABMP3s9 +qbIudQhInX6DjHbfeFltzbRY4IDkTE0oLJueVR8gqzxgf6KFM1oRBAMnNp1bih4hrZH ALKw== 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=3kZ2Lrcg9rxaetlR6GKAyzUSX2j10m/YOYVZW30YglI=; b=ZiZyg0+8+EM13FPgvLAk8adQD+WDZlanVx3hkd62Ue+SMnAQCuaAR4R+Y10H0FaRou 9hZlRJul9HFedxiCfXafuqQu5pqc6tST2TjZAxORMBCjmf/MUkJnUQKPFUjRvnWv4Vmc EiPadV7AXZ71sngtY+kcYucD4Mf64sNvGq/X/7MDCOTFs6LUZpepRyOvvL3vwZFnj+ET lM3llzRf/xW1fI2joZKt5RJCq6K7qWW650mqDC3p9ev9NwYkL2v7AvDoOtu0Ob3XlV8B CcWOHJUGBK2h1jbrMT0F4wDQEryoWjOcJTeOR4nlN9dFX4Dovqk9EH4DQXyaoxixpiFa aBAQ== X-Gm-Message-State: ALoCoQkgrNp9mafwGv6BDDeAKUWvUnSkEmbg1SJW+g7m44N9pz2DMvjgpV+A0jmlkx44/vpDkHaXHawFQEV3j5zyNwRQgl1SNg== X-Received: by 10.28.229.15 with SMTP id c15mr37520290wmh.76.1450909670798; Wed, 23 Dec 2015 14:27:50 -0800 (PST) Received: from xps13.localnet (APoitiers-658-1-50-6.w86-217.abo.wanadoo.fr. [86.217.129.6]) by smtp.gmail.com with ESMTPSA id n129sm30958333wmb.1.2015.12.23.14.27.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Dec 2015 14:27:50 -0800 (PST) From: Thomas Monjalon To: Yuanhan Liu Date: Wed, 23 Dec 2015 23:26:17 +0100 Message-ID: <2150122.EUSmcjyJtA@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151223020949.GV18863@yliu-dev.sh.intel.com> References: <20151222035041.GA7532@pxdev.xzpeter.org> <20151223015554.GC1694@pxdev.xzpeter.org> <20151223020949.GV18863@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [Question] How pmd virtio works without UIO? 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, 23 Dec 2015 22:27:51 -0000 2015-12-23 10:09, Yuanhan Liu: > On Wed, Dec 23, 2015 at 09:55:54AM +0800, Peter Xu wrote: > > On Tue, Dec 22, 2015 at 04:38:30PM +0000, Xie, Huawei wrote: > > > On 12/22/2015 7:39 PM, Peter Xu wrote: > > > > I tried to unbind one of the virtio net device, I see the PCI entry > > > > still there. > > > > > > > > Before unbind: > > > > > > > > [root@vm proc]# lspci -k -s 00:03.0 > > > > 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device > > > > Subsystem: Red Hat, Inc Device 0001 > > > > Kernel driver in use: virtio-pci > > > > [root@vm proc]# cat /proc/ioports | grep c060-c07f > > > > c060-c07f : 0000:00:03.0 > > > > c060-c07f : virtio-pci > > > > > > > > After unbind: > > > > > > > > [root@vm proc]# lspci -k -s 00:03.0 > > > > 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device > > > > Subsystem: Red Hat, Inc Device 0001 > > > > [root@vm proc]# cat /proc/ioports | grep c060-c07f > > > > c060-c07f : 0000:00:03.0 > > > > > > > > So... does this means that it is an alternative to black list > > > > solution? > > > Oh, we could firstly check if this port is manipulated by kernel driver > > > in virtio_resource_init/eth_virtio_dev_init, as long as it is not too late. > > Why can't we simply quit at pci_scan_one, once finding that it's not > bond to uio (or similar stuff)? That would be generic enough, that we > don't have to do similar checks for each new pmd driver. > > Or, am I missing something? UIO is not needed to make virtio works (without interrupt support). Sometimes it may be required to avoid using kernel modules. > > I guess there might be two problems? Which are: > > > > 1. How user avoid DPDK taking over virtio devices that they do not > > want for IO (chooses which device to use) > > Isn't that what's the 'binding/unbinding' for? Binding is, sometimes, required. But does it mean DPDK should use every available ports? That's the default and may be configured with blacklist/whitelist. > > 2. Driver conflict between virtio PMD in DPDK, and virtio-pci in > > kernel (happens on every virtio device that DPDK uses) > > If you unbinded the kernel driver first, which is the suggested (or > must?) way to use DPDK, that will not happen.