From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f170.google.com (mail-it1-f170.google.com [209.85.166.170]) by dpdk.org (Postfix) with ESMTP id 4D6612C15 for ; Tue, 15 Jan 2019 18:59:29 +0100 (CET) Received: by mail-it1-f170.google.com with SMTP id p197so5658617itp.0 for ; Tue, 15 Jan 2019 09:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aVt4mx7kgFpCiuaqBy/BcOIpnDGungnnerfpcan4uqM=; b=CAS0uW0NVOYvDu/cmvt5D9DN+DqFkBkdLlrRhL1z3BstMz82ZJ/pLJVKRl8OtuwVlo Oc3g+fyLO3H/95nmYohzGngpvMmq1ngGFFGK+t1FxODfNAdOWrsaB5drO4Ug5p+GorNw rrath2AT9mGjPktBru5Uvw5268aCIxOXTqCLhEYkup2Mh2RUq1174AHMTYOmvlbkl9zF 1P4mqiB/q81mLF5VhR3txOgcLmJ0Ys2OilIXXk1N7+zyLWiOUMcUzwhn54DTLA5z6BIL f9RZsrcHShvvi5DjH4JbxTtfHIQdS6mIQfC/YPx+9vk1V8eyimzUuqIiV2uHpUkMW5Zm UHqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aVt4mx7kgFpCiuaqBy/BcOIpnDGungnnerfpcan4uqM=; b=QDw/qN3UmmJvgt9z1Jh8oQ5uDvLwu9iUbnKwKVDBSlADtGnAxZFkWw03aUlgrmL0Eg 7Nnf+hPShZVmQfTbEmdUPAuuQoOVTXj4ASL3h3rqp//QbB6QGhGG/uMlKa4NgcEbdqNj jQ4KRvoVz759I72NfLNEmrQCN8PU0CT0Mrk5HxOwoOXw2GTvPivQ+/tB6Ww86w1dnwF4 Hw/gBpKnywb7TwSgzw6cVeWjA9omNKiD8S2Y05Al72BUctYsnlKiYYGNWbGWHAmTfjqq SeD0hgAb/iFSlAfQZOFJleGwc7vrlbkZ95Zzf5q7gXnTmPdQOKMFoo1Rf4YrnNOUTQ1K 1Jqw== X-Gm-Message-State: AJcUukf3PvLQbMKQ6Z7h+cfxl4sEDQt68n+l/P2Hn9uwNIodLLn1fUlE 45Z41Ba2rwk2aXflt8LhW8MXn23ssVUo9LVQbZO3sg== X-Google-Smtp-Source: ALg8bN4z8mIykdHnXr3OGRxwtqTcGg6WeUOB3NuPadLTms56dRYCrSPAHTpftv490xo2eQep+toQkcb2GCvgbwzzMRw= X-Received: by 2002:a24:1495:: with SMTP id 143mr3078096itg.13.1547575168569; Tue, 15 Jan 2019 09:59:28 -0800 (PST) MIME-Version: 1.0 References: <59AF69C657FD0841A61C55336867B5B07271EB37@IRSMSX103.ger.corp.intel.com> In-Reply-To: From: Alejandro Lucero Date: Tue, 15 Jan 2019 17:59:17 +0000 Message-ID: To: "Liang, Cunming" , dev Cc: "Richardson, Bruce" , "Lu, Xiuchun" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [dpdk-techboard] A new bus for mediated devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 17:59:29 -0000 Hi Steve, On Tue, Jan 15, 2019 at 2:19 PM Liang, Cunming wrote: > Hi Alejandro, > > > > Good to know we have common interest in DPDK native mdev support. > > > > We=E2=80=99re working on something which mdev based PMD driver is part of= . It was > going to collect others=E2=80=99 interest & feedback on DPDK summit befor= e we start > upstream effort. > > Which DPDK summit do you refer to? the last one is Santa Jose in December? > > > There was a few considerations. > > - VT-d Spec 3.0 is publish, but no platform available to support > even PCIe device might have the ability > > - Except Intel, not sure other network IHVs is going to design > their device by the new spec. > > - w/o available platform, it only supports singleton mdev > instance per parent device > > - even in singleton mdev support, it requires IOMMU aware > mediate device which is WIP in kernel > > > Yes, I know this is new stuff and it will not be usable as I have previously commented by now, but I think this is going to be really important in the near future. It adds a lot of flexibility for creating ad-hoc net devices to be used by VMs. In our initial case, we just need one mdev per parent device, and the IOMMU mapping would be managed by the parent device after the proper ioctl call from user space (NFP PMD for mediated device). > For these reason, we hold on the upstream effort on DPDK side. > > > I understand. However, I think this should be discussed asap and to figure out which is what is needed. When implementing the mdev bus for DPDK myself, I found the mdev interface is so flexible (or maybe undefined), it is not clear how it should be done. > I=E2=80=99m actually quite interest in your use case, what=E2=80=99s the = benefit you=E2=80=99re > looking forward for kernel vfio mdev. If you don=E2=80=99t mind, could yo= u share > with us? > > > We need to use the PF and VFs in user space, this is DPDK, and the VF creation is not possible when PF is bound to the VFIO driver (vfio-pci). Mu idea is just to create a mediated device for allowing this, with the kernel driver helping with mmaping the right BAR areas. After that, the PMD will work almost as current NFP PMD, although certain things like link up/down or getting extended stats will be through the kernel netdev. > Our initial minimum goals to DPDK native mdev support, > > - scan/probe/=E2=80=A6 kernel mdev bus sysfs > > - keep consistent vfio uapi in DPDK > > - reuse/unmodified any existing PMD previous built for pci bus > > > This last point seems quite complicated if not impossible, at least in our case. > We had patch set base on DPDK 18.05 and haven=E2=80=99t rebased yet to ma= in > stream, which includes > > - intro new rte_mdev_bus for kernel mdev bus > > - intro new rte_mdev_driver for =E2=80=98vfio-pci=E2=80=99 mdev = type > > (allows to register other bus driver according to mdev type -- > =E2=80=98device_api=E2=80=99) > > - whitelist & blacklist uuid support > > - a pci vfio change to map resource according to general sysfs > > > Good. I have almost a mdev bus driver implemented and a specific NFP PMD for a NFP mediated device. But I have been working for the shake of probing this as an option for our purposes. Of course, my idea was to work on a full mdev support for DPDK so that was the reason of my email to the techboard. Knowing you have been working on this longer than me, and likely having a more complete implementation, I will not try to duplicate work here, and I hope I can contribute to the final implementation once I see your design. Thanks! > > > > Thanks, > > Steve > > > > > > *From:* techboard [mailto:techboard-bounces@dpdk.org > ] *On Behalf Of *Alejandro Lucero > *Sent:* Monday, January 14, 2019 7:29 PM > *To:* techboard@dpdk.org > *Subject:* [dpdk-techboard] A new bus for mediated devices > > > > Hi all, > > > > I think there is none working on supporting mediated devices within DPDK. > I am working on this for solving a requirement we have in Netronome but > apart from that, I think it is something we are going to need in DPDK > sooner or later. > > > > Because it is a really new interface and the way a mediated device can be > created is really flexible, the proper way to support it should be broadl= y > discussed. My plan is to send a RFC where the mdev bus is implemented alo= ng > with a new Netronome's PMD supporting Netronome's mediated devices create= d > by Netronome's kernel driver. Having an example of a mdev device will hel= p. > > > > The reason for this email is twofold: > > > > 1) To be sure there is no other person working on supporting mdev inside > the DPDK community, just for avoiding duplicate work. I found some > presentations describing this interface in userspace but I have found no > patch related nor RFC regarding DPDK. > > > > 2) To inform the techboard about my intentions and to introduce the mdev > interface for those not aware of it yet. > > > > If you consider it would be good to discuss this in next techboard > meeting, it will be a pleasure to attend. > > > > Thanks > > > > (*) > https://archive.fosdem.org/2018/schedule/event/netmdev/attachments/slides= /2176/export/events/attachments/netmdev/slides/2176/net_mdev___fosdem_2018.= pdf >