Michael S. Tsirkin
2019-Nov-07 13:08 UTC
[PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
On Thu, Nov 07, 2019 at 08:43:29PM +0800, Jason Wang wrote:> > On 2019/11/7 ??7:21, Michael S. Tsirkin wrote: > > On Thu, Nov 07, 2019 at 06:18:45PM +0800, Jason Wang wrote: > > > On 2019/11/7 ??5:08, Michael S. Tsirkin wrote: > > > > On Wed, Nov 06, 2019 at 09:35:31PM +0800, Jason Wang wrote: > > > > > This sample driver creates mdev device that simulate virtio net device > > > > > over virtio mdev transport. The device is implemented through vringh > > > > > and workqueue. A device specific dma ops is to make sure HVA is used > > > > > directly as the IOVA. This should be sufficient for kernel virtio > > > > > driver to work. > > > > > > > > > > Only 'virtio' type is supported right now. I plan to add 'vhost' type > > > > > on top which requires some virtual IOMMU implemented in this sample > > > > > driver. > > > > > > > > > > Acked-by: Cornelia Huck<cohuck at redhat.com> > > > > > Signed-off-by: Jason Wang<jasowang at redhat.com> > > > > I'd prefer it that we call this something else, e.g. > > > > mvnet-loopback. Just so people don't expect a fully > > > > functional device somehow. Can be renamed when applying? > > > Actually, I plan to extend it as another standard network interface for > > > kernel. It could be either a standalone pseudo device or a stack device. > > > Does this sounds good to you? > > > > > > Thanks > > That's a big change in an interface so it's a good reason > > to rename the driver at that point right? > > Oherwise users of an old kernel would expect a stacked driver > > and get a loopback instead. > > > > Or did I miss something? > > > My understanding is that it was a sample driver in /doc. It should not be > used in production environment. Otherwise we need to move it to > driver/virtio. > > But if you insist, I can post a V11. > > Thanksthis can be a patch on top.
Jason Wang
2019-Nov-07 13:32 UTC
[PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
On 2019/11/7 ??9:08, Michael S. Tsirkin wrote:> On Thu, Nov 07, 2019 at 08:43:29PM +0800, Jason Wang wrote: >> On 2019/11/7 ??7:21, Michael S. Tsirkin wrote: >>> On Thu, Nov 07, 2019 at 06:18:45PM +0800, Jason Wang wrote: >>>> On 2019/11/7 ??5:08, Michael S. Tsirkin wrote: >>>>> On Wed, Nov 06, 2019 at 09:35:31PM +0800, Jason Wang wrote: >>>>>> This sample driver creates mdev device that simulate virtio net device >>>>>> over virtio mdev transport. The device is implemented through vringh >>>>>> and workqueue. A device specific dma ops is to make sure HVA is used >>>>>> directly as the IOVA. This should be sufficient for kernel virtio >>>>>> driver to work. >>>>>> >>>>>> Only 'virtio' type is supported right now. I plan to add 'vhost' type >>>>>> on top which requires some virtual IOMMU implemented in this sample >>>>>> driver. >>>>>> >>>>>> Acked-by: Cornelia Huck<cohuck at redhat.com> >>>>>> Signed-off-by: Jason Wang<jasowang at redhat.com> >>>>> I'd prefer it that we call this something else, e.g. >>>>> mvnet-loopback. Just so people don't expect a fully >>>>> functional device somehow. Can be renamed when applying? >>>> Actually, I plan to extend it as another standard network interface for >>>> kernel. It could be either a standalone pseudo device or a stack device. >>>> Does this sounds good to you? >>>> >>>> Thanks >>> That's a big change in an interface so it's a good reason >>> to rename the driver at that point right? >>> Oherwise users of an old kernel would expect a stacked driver >>> and get a loopback instead. >>> >>> Or did I miss something? >> >> My understanding is that it was a sample driver in /doc. It should not be >> used in production environment. Otherwise we need to move it to >> driver/virtio. >> >> But if you insist, I can post a V11. >> >> Thanks > this can be a patch on top.Then maybe it's better just extend it to work as a normal networking device on top? Thanks
Michael S. Tsirkin
2019-Nov-07 13:50 UTC
[PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
On Thu, Nov 07, 2019 at 09:32:29PM +0800, Jason Wang wrote:> > On 2019/11/7 ??9:08, Michael S. Tsirkin wrote: > > On Thu, Nov 07, 2019 at 08:43:29PM +0800, Jason Wang wrote: > > > On 2019/11/7 ??7:21, Michael S. Tsirkin wrote: > > > > On Thu, Nov 07, 2019 at 06:18:45PM +0800, Jason Wang wrote: > > > > > On 2019/11/7 ??5:08, Michael S. Tsirkin wrote: > > > > > > On Wed, Nov 06, 2019 at 09:35:31PM +0800, Jason Wang wrote: > > > > > > > This sample driver creates mdev device that simulate virtio net device > > > > > > > over virtio mdev transport. The device is implemented through vringh > > > > > > > and workqueue. A device specific dma ops is to make sure HVA is used > > > > > > > directly as the IOVA. This should be sufficient for kernel virtio > > > > > > > driver to work. > > > > > > > > > > > > > > Only 'virtio' type is supported right now. I plan to add 'vhost' type > > > > > > > on top which requires some virtual IOMMU implemented in this sample > > > > > > > driver. > > > > > > > > > > > > > > Acked-by: Cornelia Huck<cohuck at redhat.com> > > > > > > > Signed-off-by: Jason Wang<jasowang at redhat.com> > > > > > > I'd prefer it that we call this something else, e.g. > > > > > > mvnet-loopback. Just so people don't expect a fully > > > > > > functional device somehow. Can be renamed when applying? > > > > > Actually, I plan to extend it as another standard network interface for > > > > > kernel. It could be either a standalone pseudo device or a stack device. > > > > > Does this sounds good to you? > > > > > > > > > > Thanks > > > > That's a big change in an interface so it's a good reason > > > > to rename the driver at that point right? > > > > Oherwise users of an old kernel would expect a stacked driver > > > > and get a loopback instead. > > > > > > > > Or did I miss something? > > > > > > My understanding is that it was a sample driver in /doc. It should not be > > > used in production environment. Otherwise we need to move it to > > > driver/virtio. > > > > > > But if you insist, I can post a V11. > > > > > > Thanks > > this can be a patch on top. > > > Then maybe it's better just extend it to work as a normal networking device > on top? > > ThanksThat would be a substantial change. Maybe drop 6/6 for now until we have a better handle on this?