Message ID | 1453203972-24855-10-git-send-email-sshukla@mvista.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 807DE91CA; Tue, 19 Jan 2016 12:47:05 +0100 (CET) Received: from mail-pf0-f175.google.com (mail-pf0-f175.google.com [209.85.192.175]) by dpdk.org (Postfix) with ESMTP id 24DE391C9 for <dev@dpdk.org>; Tue, 19 Jan 2016 12:47:04 +0100 (CET) Received: by mail-pf0-f175.google.com with SMTP id 65so174250511pff.2 for <dev@dpdk.org>; Tue, 19 Jan 2016 03:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jHgJsQqNu5OZSP5KBSUya1v7Kg+zJlOwFTK7RTzn/MU=; b=pInRdac2rJG23H9rl5djLon7rLiXodUm00Ubg4TtnSgHahg/NPqp2yERFli5TpfhWm klPRWEx6PGbHsj0m2WYdhXRsEGNaJKUZ1Y9xQ7Wa2Jx9WoYNlNBsAABanqOKFgfG1bmv 3/oXWgR5QSZjrTE2vhf1mIHjXOuMeEVkbuB+ZjjFjN1Ym2KUfa5NfdCv5kMplVQ0IVPn yJQ6kpB7JwwH6ptMKfY40khWSXeFlqPoDYgsV2eML8rDHDXkE7/Rk+2U5XLGbKsq5KbX TP1vYlqHjQqx4Fd6qgsYylpFhLyQgMjZqdlGsK173Ru63iInVN3zJd/h9Q9lAVGqLPgB M9kA== 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:in-reply-to :references; bh=jHgJsQqNu5OZSP5KBSUya1v7Kg+zJlOwFTK7RTzn/MU=; b=HcCDhEoqy64A3Q2JXgERvEyFdnDesS5FSjFlQHfgeqiXAnPp0rCgj93qrzghLM60kJ ZAL9I1eqsBkVpjKWZyxlNeLEFyb+rNNu4OtAsEYBvBBRSffDpcP1scf//ZwUpZHuA23J K3a0+84tbhX9NsJpLPBg8xa0XcSWPKcPQqFjXL8tTnwiWHJh7npUfXIB9IdSybjFgUIp swWs5Dv16VevEcLUGCpnAN8esZEt6EFfc/Eu0FWiw5EgVdxH08IJkwK1vOeytgvJFGlN B7bFmOKmKUPhqto40BaNAn4DkukCcJbuE+U4efmJXtUMq0g/j22UOtkOnKWpIhxGariS dF/Q== X-Gm-Message-State: ALoCoQm3Mczz4erug9aNoXf2ix0UGP5VGvmapkt75Qqwk1Wl2EGbjdzVCuYR/E7eKgh9IdbIT8pZWZDzwB6vSu8GByG/NjSwRA== X-Received: by 10.98.1.21 with SMTP id 21mr43621388pfb.8.1453204023586; Tue, 19 Jan 2016 03:47:03 -0800 (PST) Received: from santosh-Latitude-E5530-non-vPro.mvista.com ([111.93.218.67]) by smtp.gmail.com with ESMTPSA id 75sm41014170pfj.20.2016.01.19.03.47.00 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jan 2016 03:47:02 -0800 (PST) From: Santosh Shukla <sshukla@mvista.com> To: dev@dpdk.org Date: Tue, 19 Jan 2016 17:16:10 +0530 Message-Id: <1453203972-24855-10-git-send-email-sshukla@mvista.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1453203972-24855-1-git-send-email-sshukla@mvista.com> References: <1453203972-24855-1-git-send-email-sshukla@mvista.com> Subject: [dpdk-dev] [PATCH v5 09/11] virtio_pci: do not parse if interface is vfio-noiommu X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Santosh Shukla
Jan. 19, 2016, 11:46 a.m. UTC
If virtio interface attached to vfio-noiommu driver then
do not parse for virtio resource. Instead exit with return 0;
Note: Applicable for virtio spec 0.95.
Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
v4-->v5:
- added _NOIOMMU drv check for lagecy virtio. No need for resource_init in vfio
case. And resource_pasrsing/interface validation done by pci_eal module for
pmd driver.
drivers/net/virtio/virtio_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Two minor nits. Firstly about your title, you should be consistent: sometimes you use virtio_pci, and sometimes you use virtio_pic.h. And for virtio pmd driver, "virtio: " prefix is pretty enough, no need another extra "vfio: " or "pci: " prefix. And the same to your EAL changes. EAL is a bigger, having more components, thus sometimes 2 prefixs are used. And if you are not sure how to add prefix, dig the git history to get the answer. On Tue, Jan 19, 2016 at 05:16:10PM +0530, Santosh Shukla wrote: > If virtio interface attached to vfio-noiommu driver then > do not parse for virtio resource. Instead exit with return 0; > > Note: Applicable for virtio spec 0.95. And this is not necessary: io port stuff is for virtio 0.95 only. virtio 1.0 won't use that, at all. --yliu
On Fri, Jan 29, 2016 at 12:47 PM, Yuanhan Liu <yuanhan.liu@linux.intel.com> wrote: > Two minor nits. > > Firstly about your title, you should be consistent: sometimes you > use virtio_pci, and sometimes you use virtio_pic.h. And for virtio > pmd driver, "virtio: " prefix is pretty enough, no need another > extra "vfio: " or "pci: " prefix. > > And the same to your EAL changes. EAL is a bigger, having more > components, thus sometimes 2 prefixs are used. And if you are > not sure how to add prefix, dig the git history to get the answer. > > On Tue, Jan 19, 2016 at 05:16:10PM +0530, Santosh Shukla wrote: >> If virtio interface attached to vfio-noiommu driver then >> do not parse for virtio resource. Instead exit with return 0; >> >> Note: Applicable for virtio spec 0.95. > > And this is not necessary: io port stuff is for virtio 0.95 only. > virtio 1.0 won't use that, at all. > Okay, I removed [08/11] patch from v5 series and modified this patch accordingly [1]. So, ignore this patch and pl. review provided link. [1] http://dpdk.org/dev/patchwork/patch/10143/ > --yliu
On Fri, Jan 29, 2016 at 12:52:53PM +0530, Santosh Shukla wrote: > On Fri, Jan 29, 2016 at 12:47 PM, Yuanhan Liu > <yuanhan.liu@linux.intel.com> wrote: > > Two minor nits. > > > > Firstly about your title, you should be consistent: sometimes you > > use virtio_pci, and sometimes you use virtio_pic.h. And for virtio > > pmd driver, "virtio: " prefix is pretty enough, no need another > > extra "vfio: " or "pci: " prefix. > > > > And the same to your EAL changes. EAL is a bigger, having more > > components, thus sometimes 2 prefixs are used. And if you are > > not sure how to add prefix, dig the git history to get the answer. > > > > On Tue, Jan 19, 2016 at 05:16:10PM +0530, Santosh Shukla wrote: > >> If virtio interface attached to vfio-noiommu driver then > >> do not parse for virtio resource. Instead exit with return 0; > >> > >> Note: Applicable for virtio spec 0.95. > > > > And this is not necessary: io port stuff is for virtio 0.95 only. > > virtio 1.0 won't use that, at all. > > > > Okay, > > I removed [08/11] patch from v5 series and modified this patch > accordingly [1]. So, ignore this patch and pl. review provided link. > > [1] http://dpdk.org/dev/patchwork/patch/10143/ This patch actually looks good to me, despites the two minor nits. Another note is that while sending just one single update patch, it'd be better if you could link it to the old patch, to make it in the same email thread, otherwise, it's difficult for me to notice that single-alone patch: it's easily get lost. There is another option for that: the git scissors option; you could check the git format-patch man page for more detailed info (by searching "scissors" keyword). I'm just not quite sure Thomas like it or not. --yliu
2016-01-29 15:34, Yuanhan Liu: > There is another option for that: the git scissors option; you could > check the git format-patch man page for more detailed info (by searching > "scissors" keyword). I'm just not quite sure Thomas like it or not. For simple discussions, patch after scissors may be a good option. In this series, there are too many patches sent alone and it would be good to send the whole series to make things flatter (while keeping the --in-reply-to of course).
On Fri, Jan 29, 2016 at 10:02:26AM +0100, Thomas Monjalon wrote: > 2016-01-29 15:34, Yuanhan Liu: > > There is another option for that: the git scissors option; you could > > check the git format-patch man page for more detailed info (by searching > > "scissors" keyword). I'm just not quite sure Thomas like it or not. > > For simple discussions, patch after scissors may be a good option. > > In this series, there are too many patches sent alone and it would > be good to send the whole series to make things flatter (while keeping > the --in-reply-to of course). Agreed. --yliu
On Fri, Jan 29, 2016 at 2:32 PM, Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > 2016-01-29 15:34, Yuanhan Liu: >> There is another option for that: the git scissors option; you could >> check the git format-patch man page for more detailed info (by searching >> "scissors" keyword). I'm just not quite sure Thomas like it or not. > I agree and my mistake.. sorry for confusion, > For simple discussions, patch after scissors may be a good option. > > In this series, there are too many patches sent alone and it would > be good to send the whole series to make things flatter (while keeping > the --in-reply-to of course). Sending whole series taging patch version v6 version shortly, Thanks.
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index 537c552..520e540 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -514,7 +514,9 @@ virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev) static int legacy_virtio_resource_init(struct rte_pci_device *pci_dev) { - if (virtio_resource_init_by_uio(pci_dev) == 0) + if (pci_dev->kdrv == RTE_KDRV_VFIO_NOIOMMU) + return 0; + else if (virtio_resource_init_by_uio(pci_dev) == 0) return 0; else return virtio_resource_init_by_ioports(pci_dev);