Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-02-04 Thread Jason Wang
On 2020/2/4 下午8:52, Jason Gunthorpe wrote: On Tue, Feb 04, 2020 at 04:28:27PM +0800, Jason Wang wrote: On 2020/2/4 下午4:21, Zhu Lingshan wrote: +static const struct dma_map_ops vdpasim_dma_ops = { +    .map_page = vdpasim_map_page, +    .unmap_page = vdpasim_unmap_page, +    .alloc = vdpasim_al

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-02-04 Thread Jason Gunthorpe
On Tue, Feb 04, 2020 at 04:28:27PM +0800, Jason Wang wrote: > > On 2020/2/4 下午4:21, Zhu Lingshan wrote: > > > +static const struct dma_map_ops vdpasim_dma_ops = { > > > +    .map_page = vdpasim_map_page, > > > +    .unmap_page = vdpasim_unmap_page, > > > +    .alloc = vdpasim_alloc_coherent, > > >

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-02-04 Thread Jason Wang
On 2020/2/4 下午4:21, Zhu Lingshan wrote: +static const struct dma_map_ops vdpasim_dma_ops = { +    .map_page = vdpasim_map_page, +    .unmap_page = vdpasim_unmap_page, +    .alloc = vdpasim_alloc_coherent, +    .free = vdpasim_free_coherent, +}; + Hey Jason, IMHO, it would be nice if dma_ops o

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-02-03 Thread Jason Wang
On 2020/1/17 下午10:10, Jason Gunthorpe wrote: Netlink based lifecycle management could be implemented for vDPA simulator as well. This is just begging for a netlink based approach. Certainly netlink driven removal should be an agreeable standard for all devices, I think. Well, I think Parav ha

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-02-03 Thread Jason Wang
On 2020/1/28 上午11:32, Dan Carpenter wrote: Hi Jason, url: https://github.com/0day-ci/linux/commits/Jason-Wang/vDPA-support/20200117-170243 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next Will fix this. Thanks If you fix the issue, kindly add followin

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-27 Thread Dan Carpenter
Hi Jason, url: https://github.com/0day-ci/linux/commits/Jason-Wang/vDPA-support/20200117-170243 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch w

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-20 Thread Jason Wang
On 2020/1/17 下午10:10, Jason Gunthorpe wrote: On Fri, Jan 17, 2020 at 05:32:39PM +0800, Jason Wang wrote: On 2020/1/16 下午11:47, Jason Gunthorpe wrote: On Thu, Jan 16, 2020 at 08:42:31PM +0800, Jason Wang wrote: This patch implements a software vDPA networking device. The datapath is implemente

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-18 Thread kbuild test robot
Hi Jason, I love your patch! Yet something to improve: [auto build test ERROR on vhost/linux-next] [also build test ERROR on linux/master linus/master v5.5-rc6 next-20200117] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-17 Thread Jason Gunthorpe
On Fri, Jan 17, 2020 at 05:32:39PM +0800, Jason Wang wrote: > > On 2020/1/16 下午11:47, Jason Gunthorpe wrote: > > On Thu, Jan 16, 2020 at 08:42:31PM +0800, Jason Wang wrote: > > > This patch implements a software vDPA networking device. The datapath > > > is implemented through vringh and workqueue

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-17 Thread Jason Wang
On 2020/1/17 下午12:12, Randy Dunlap wrote: On 1/16/20 4:42 AM, Jason Wang wrote: diff --git a/drivers/virtio/vdpa/Kconfig b/drivers/virtio/vdpa/Kconfig index 3032727b4d98..12ec25d48423 100644 --- a/drivers/virtio/vdpa/Kconfig +++ b/drivers/virtio/vdpa/Kconfig @@ -7,3 +7,20 @@ config VDPA

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-17 Thread Jason Wang
On 2020/1/16 下午11:47, Jason Gunthorpe wrote: On Thu, Jan 16, 2020 at 08:42:31PM +0800, Jason Wang wrote: This patch implements a software vDPA networking device. The datapath is implemented through vringh and workqueue. The device has an on-chip IOMMU which translates IOVA to PA. For kernel vir

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-16 Thread Randy Dunlap
On 1/16/20 4:42 AM, Jason Wang wrote: > diff --git a/drivers/virtio/vdpa/Kconfig b/drivers/virtio/vdpa/Kconfig > index 3032727b4d98..12ec25d48423 100644 > --- a/drivers/virtio/vdpa/Kconfig > +++ b/drivers/virtio/vdpa/Kconfig > @@ -7,3 +7,20 @@ config VDPA >datapath which complies with v

Re: [PATCH 5/5] vdpasim: vDPA device simulator

2020-01-16 Thread Jason Gunthorpe
On Thu, Jan 16, 2020 at 08:42:31PM +0800, Jason Wang wrote: > This patch implements a software vDPA networking device. The datapath > is implemented through vringh and workqueue. The device has an on-chip > IOMMU which translates IOVA to PA. For kernel virtio drivers, vDPA > simulator driver provid

[PATCH 5/5] vdpasim: vDPA device simulator

2020-01-16 Thread Jason Wang
This patch implements a software vDPA networking device. The datapath is implemented through vringh and workqueue. The device has an on-chip IOMMU which translates IOVA to PA. For kernel virtio drivers, vDPA simulator driver provides dma_ops. For vhost driers, set_map() methods of vdpa_config_ops i