From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <sshukla@mvista.com>
Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com
 [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 855D28E74
 for <dev@dpdk.org>; Wed, 13 Jan 2016 13:17:26 +0100 (CET)
Received: by mail-pf0-f182.google.com with SMTP id e65so80870098pfe.0
 for <dev@dpdk.org>; Wed, 13 Jan 2016 04:17:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mvista-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=Guk/lJx5pM+U9Z3fvJrN1fm8E9KNKQEgzAJLftLvFqY=;
 b=h/4HNWNPArqbfdpOwsUxi9k3iG8NSiT1wnChNLgFWDXVi1obXGha7prl7+A49UvZsQ
 E5yC6t70hTeeKKonZF7nk6fF/vngY1O5H3DzUabeYx0z4lt/bSMYvEvPYSdLCzxyZYO8
 HTOSrTwTRpyrgPIBmhK8+CB4tLsCYaWyXEP0OFps2qGb7rm2V/2AOhdlHucX8err3JZq
 ab9g7kIfwJRwy4behhzaEBq/DI+Ew6V/y++ToH3tONS44jOxCuYAuUKyG2ixLN1TcODf
 geaqciENtyK1VfdcxvWThUOr9vkGcajYV933/0iUepdhoxop5zQ06A9SGdXyOs5YITsx
 fVLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:date
 :message-id:subject:from:to:cc:content-type;
 bh=Guk/lJx5pM+U9Z3fvJrN1fm8E9KNKQEgzAJLftLvFqY=;
 b=TKi0TnK95jomi573Zb1sP6Sh2Py8gLcizGczmJVnrzcLJK0J6GyGdKjrHuy1Lq+f1c
 ejS3Bd3TJxtYAHNgMDBEYbihJH/Sb7nxQHZzOwZEx89Vc9zsLZJEg8veT+8iy/lBGDTH
 ++J5H4EfhehkrsOL+43BDzEMNizkDALgiQOodWumTdXae5pqjU4uJE8mTCRFHu9hTPxs
 xM8QYUiefn+ERvOGutq6Lo3Ok/AZXTie7udxK2N/FhXRmDlzBaQD5x+iAihrWzSUL6w0
 KdFJ6N/ZK23WepvTfmpw7IaU5k1O78uziN2vEWlr/weTZx6SrJIe6gPljEfDel2b0WZc
 4few==
X-Gm-Message-State: ALoCoQl/dXOoHo0ByZb3u7Dzocrsp8urRbT5hebJjtrXT7Tb5CILqNl0HaB3WgSMYNF3o0II9VACRKICqL4q5DXv2dOyTJ2d1qAzMKHV12MfaatMmEcWzgE=
MIME-Version: 1.0
X-Received: by 10.98.15.29 with SMTP id x29mr21739291pfi.61.1452687445803;
 Wed, 13 Jan 2016 04:17:25 -0800 (PST)
Received: by 10.66.196.81 with HTTP; Wed, 13 Jan 2016 04:17:25 -0800 (PST)
In-Reply-To: <C37D651A908B024F974696C65296B57B4C57FF82@SHSMSX101.ccr.corp.intel.com>
References: <20151222035041.GA7532@pxdev.xzpeter.org>
 <1451843773-103006-1-git-send-email-huawei.xie@intel.com>
 <20160104092507.297de1df@xeon-e3>
 <C37D651A908B024F974696C65296B57B4C57FD49@SHSMSX101.ccr.corp.intel.com>
 <CAAyOgsY0R0_PjyWar1MfRe92scApXWa3_zn6GU3PsmGb5Nkidw@mail.gmail.com>
 <C37D651A908B024F974696C65296B57B4C57FF82@SHSMSX101.ccr.corp.intel.com>
Date: Wed, 13 Jan 2016 17:47:25 +0530
Message-ID: <CAAyOgsZAosHY6QLXjL=6QT-CMZC_4-dHdZQU3J5M8L3SBd4WbQ@mail.gmail.com>
From: Santosh Shukla <sshukla@mvista.com>
To: "Xie, Huawei" <huawei.xie@intel.com>
Content-Type: text/plain; charset=UTF-8
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 0/4] fix the issue that DPDK takes over
 virtio device blindly
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>
X-List-Received-Date: Wed, 13 Jan 2016 12:17:27 -0000

On Tue, Jan 12, 2016 at 10:46 AM, Xie, Huawei <huawei.xie@intel.com> wrote:
> On 1/12/2016 12:24 PM, Santosh Shukla wrote:
>> On Tue, Jan 12, 2016 at 8:32 AM, Xie, Huawei <huawei.xie@intel.com> wrote:
>>> On 1/5/2016 1:25 AM, Stephen Hemminger wrote:
>>>> On Mon,  4 Jan 2016 01:56:09 +0800
>>>> Huawei Xie <huawei.xie@intel.com> wrote:
>>>>
>>>>> v2 changes:
>>>>>  Remove unnecessary assignment of NULL to dev->data->mac_addrs
>>>>>  Ajust one comment's position
>>>>>  change LOG level from ERR to INFO
>>>>>
>>>>> virtio PMD doesn't set RTE_PCI_DRV_NEED_MAPPING in drv_flags of its
>>>>> eth_driver. It will try igb_uio and PORT IO in turn to configure
>>>>> virtio device. Even user in guest VM doesn't want to use virtio for
>>>>> DPDK, virtio PMD will take over the device blindly.
>>>>>
>>>>> The more serious problem is kernel driver is still manipulating the
>>>>> device, which causes driver conflict.
>>>>>
>>>>> This patch checks if there is any kernel driver manipulating the
>>>>> virtio device before virtio PMD uses port IO to configure the device.
>>>>>
>>>>> Huawei Xie (4):
>>>>>   eal: make the comment more accurate
>>>>>   eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device.
>>>>>   virtio: return 1 to tell the kernel we don't take over this device
>>>>>   virtio: check if any kernel driver is manipulating the virtio device
>>>>>
>>>>>  drivers/net/virtio/virtio_ethdev.c     | 16 ++++++++++++++--
>>>>>  lib/librte_eal/common/eal_common_pci.c |  8 ++++----
>>>>>  lib/librte_eal/linuxapp/eal/eal_pci.c  |  2 +-
>>>>>  3 files changed, 19 insertions(+), 7 deletions(-)
>>>>>
>>>> Overall looks good, thanks for addressing this.
>>>>
>>>> It would be good to note that VFIO no-IOMMU mode should work for this
>>>> as well.
>>> It isn't implemented yet in virtio PMD. I could add a note in the commit
>>> message. Do you plan to implement this?
>>>
>> I can send vfio-noiommu patches for this one, as I am looking at
>> vfio-noiommu for virtio  for my arm v4 patch series. Stephen, let me
>> know if you already started working on this?
>>
>> Also for some reason I can't find [3/4] patch, could you point me to
>> patch link? Thanks.
> Thanks. Here is the patch: http://www.dpdk.org/dev/patchwork/patch/9720/
>

Thanks, I am rebasing my v4 series on top of this patch, although I
couldn't see current series creating issue for vfio-noiommu case.
We'll post feedback in v4 cover-letter.