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

2020-02-12 Thread Jason Wang
On 2020/2/11 下午9:52, Jason Gunthorpe wrote: On Mon, Feb 10, 2020 at 11:56:08AM +0800, Jason Wang wrote: + +static struct vdpasim *vdpasim_create(void) +{ + struct vdpasim *vdpasim; + struct virtio_net_config *config; + struct vdpa_device *vdpa; + struct device *dev; +

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

2020-02-11 Thread Jason Gunthorpe
On Mon, Feb 10, 2020 at 11:56:08AM +0800, Jason Wang wrote: > + > +static struct vdpasim *vdpasim_create(void) > +{ > + struct vdpasim *vdpasim; > + struct virtio_net_config *config; > + struct vdpa_device *vdpa; > + struct device *dev; > + int ret = -ENOMEM; > + > +

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

2020-02-10 Thread Jason Wang
On 2020/2/10 下午7:23, Michael S. Tsirkin wrote: On Mon, Feb 10, 2020 at 11:56:08AM +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

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

2020-02-10 Thread Michael S. Tsirkin
On Mon, Feb 10, 2020 at 11:56:08AM +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

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

2020-02-09 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