[PATCH net V2] virtio-net: set queues after driver_ok

2023-08-09 Thread Jason Wang
eeds to be held for userspace requests to change the number of queues. So we are serialized in this way. Fixes: 25266128fe16 ("virtio-net: fix race between set queues and probe") Reported-by: Dragos Tatulea Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- The patch is needed

Re: [PATCH RFC 2/3] vhost-vdpa: introduce descriptor group backend feature

2023-08-09 Thread Jason Wang
On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > > Userspace knows if the device has dedicated descriptor group or not > by checking this feature bit. > > It's only exposed if the vdpa driver backend implements the > .get_vq_desc_group() operation callback. Userspace trying to negotiate > this f

Re: [PATCH RFC 0/3] vdpa: dedicated descriptor table group

2023-08-09 Thread Jason Wang
On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > > Following patchset introduces dedicated group for descriptor table to > reduce live migration downtime when passthrough VQ is being switched > to shadow VQ. As this RFC set is to seek early feedback on the uAPI > and driver API part, for now the

Re: [PATCH] virtio-net: Zero max_tx_vq field for VIRTIO_NET_CTRL_MQ_HASH_CONFIG case

2023-08-09 Thread Jason Wang
ch corresponds to the > `reserved` field in struct virtio_net_hash_config, is not zeroed, > thereby violating the VirtIO standard. > > This patch solves this problem by zeroing this field in > virtnet_init_default_rss(). > > Sig

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-09 Thread Jason Wang
On Thu, Aug 10, 2023 at 9:59 AM Xuan Zhuo wrote: > > > Ping!! > > Could we push this to the next linux version? How about implementing the wrappers along with virtqueue_dma_dev() to see if Christoph is happy? Thanks > > Thanks. > ___ Virtualization m

Re: [PATCH 0/2] vdpa/mlx5: Fixes for ASID handling

2023-08-10 Thread Jason Wang
re we doing with this patchset? If we are merging anything > for this release it has to happen now. I think we can merge this and do optimization on top. Acked-by: Jason Wang Thanks > > > Dragos Tatulea (1): > > vdpa/mlx5: Fix mr->initialized semantics > > > &g

Re: [PATCH] virtio_mmio: add suspend and resume calls for virtio_mmio devices

2023-08-10 Thread Jason Wang
On Fri, Aug 11, 2023 at 3:45 AM Michael S. Tsirkin wrote: > > On Fri, Jul 28, 2023 at 12:31:27PM +0530, Anvesh Jain P wrote: > > Handle suspend and resume calls for virtio mmio devices from > > PM core. Expose these notifications to virtio drivers that can quiesce and > > resume vq operations. Upd

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-10 Thread Jason Wang
On Fri, Aug 11, 2023 at 3:41 AM Michael S. Tsirkin wrote: > > On Tue, Aug 08, 2023 at 10:30:56AM +0800, Jason Wang wrote: > > On Mon, Jul 31, 2023 at 2:30 PM Jason Wang wrote: > > > > > > On Thu, Jul 27, 2023 at 5:46 PM Michael S. Tsirkin > > > wrote: >

[PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Jason Wang
b53 ("virtio-vdpa: Support interrupt affinity spreading mechanism") Signed-off-by: Jason Wang --- drivers/virtio/virtio_vdpa.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c index 961161

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-11 Thread Jason Wang
On Fri, Aug 11, 2023 at 1:42 PM Michael S. Tsirkin wrote: > > On Fri, Aug 11, 2023 at 10:23:15AM +0800, Jason Wang wrote: > > On Fri, Aug 11, 2023 at 3:41 AM Michael S. Tsirkin wrote: > > > > > > On Tue, Aug 08, 2023 at 10:30:56AM +0800, Jason Wang wrote: > >

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Jason Wang
On Fri, Aug 11, 2023 at 5:25 PM Michael S. Tsirkin wrote: > > On Fri, Aug 11, 2023 at 05:15:39AM -0400, Jason Wang wrote: > > We try to build affinity mask via create_affinity_masks() > > unconditionally which may lead several issues: > > > > - the affinity mask

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-11 Thread Jason Wang
On Fri, Aug 11, 2023 at 5:21 PM Michael S. Tsirkin wrote: > > On Fri, Aug 11, 2023 at 05:18:51PM +0800, Jason Wang wrote: > > On Fri, Aug 11, 2023 at 1:42 PM Michael S. Tsirkin wrote: > > > > > > On Fri, Aug 11, 2023 at 10:23:15AM +0800, Jason Wang wrote: > >

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-11 Thread Jason Wang
On Fri, Aug 11, 2023 at 5:51 PM Michael S. Tsirkin wrote: > > On Fri, Aug 11, 2023 at 05:43:25PM +0800, Jason Wang wrote: > > On Fri, Aug 11, 2023 at 5:21 PM Michael S. Tsirkin wrote: > > > > > > On Fri, Aug 11, 2023 at 05:18:51PM +0800, Jason Wang wrote: > >

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Jason Wang
On Fri, Aug 11, 2023 at 5:48 PM Michael S. Tsirkin wrote: > > On Fri, Aug 11, 2023 at 05:41:44PM +0800, Jason Wang wrote: > > On Fri, Aug 11, 2023 at 5:25 PM Michael S. Tsirkin wrote: > > > > > > On Fri, Aug 11, 2023 at 05:15:39AM -0400, Jason Wang wrote: > &g

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-13 Thread Jason Wang
On Fri, Aug 11, 2023 at 6:21 AM Si-Wei Liu wrote: > > > > On 8/9/2023 8:10 PM, Jason Wang wrote: > > On Thu, Aug 10, 2023 at 8:40 AM Si-Wei Liu wrote: > >> > >> > >> On 8/8/2023 11:52 PM, Jason Wang wrote: > >>> On Wed, Aug 9, 2023 at 6:5

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-13 Thread Jason Wang
On Thu, Aug 10, 2023 at 8:31 PM Xuan Zhuo wrote: > > Added virtqueue_dma_dev() to get DMA device for virtio. Then the > caller can do dma operation in advance. The purpose is to keep memory > mapped across multiple add/get buf operations. > > Signed-off-by: Xuan Zhuo > Acke

Re: [PATCH net-next 0/8] virtio-net: support dynamic notification coalescing moderation

2023-08-13 Thread Jason Wang
On Fri, Aug 11, 2023 at 2:55 PM Heng Qi wrote: > > Now, virtio-net already supports per-queue notification coalescing parameter > setting. Based on this, we use the netdim library[1] of linux to support > dynamic notification coalescing moderation for virtio-net. > > [1] https://docs.kernel.org/ne

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-14 Thread Jason Wang
On Mon, Aug 14, 2023 at 10:15 PM Dragos Tatulea wrote: > > On Wed, 2023-08-09 at 09:42 +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 3:24 PM Dragos Tatulea wrote: > > > > > > On Tue, 2023-08-08 at 10:57 +0800, Jason Wang wrote: > > > > On

Re: [PATCH RFC 1/4] vdpa: introduce .reset_map operation callback

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:46 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > include/linux/vdpa.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index db1b0ea..3a3878d 100644 > --- a/include/linux/vdpa.h > +++ b/include/li

Re: [PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > drivers/vhost/vdpa.c | 16 +++- > include/uapi/linux/vhost_types.h | 2 ++ > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdp

Re: [PATCH RFC 3/4] vhost-vdpa: should restore 1:1 dma mapping before detaching driver

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > drivers/vhost/vdpa.c | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index b43e868..62b0a01 100644 > --- a/drivers/vhost/vdpa.c > +++

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-15 Thread Jason Wang
On Tue, Aug 15, 2023 at 2:32 PM Xuan Zhuo wrote: > > > Hi, Jason > > Could you skip this patch? I'm fine with either merging or dropping this. > > Let we review other patches firstly? I will be on vacation soon, and won't have time to do this until next week. But I spot two possible "issues":

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-15 Thread Jason Wang
On Tue, Aug 15, 2023 at 5:40 PM Xuan Zhuo wrote: > > On Tue, 15 Aug 2023 15:50:23 +0800, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 2:32 PM Xuan Zhuo > > wrote: > > > > > > > > > Hi, Jason > > > > > > Could you skip th

Re: [PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 6:31 AM Si-Wei Liu wrote: > > > > On 8/14/2023 7:25 PM, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > >> Signed-off-by: Si-Wei Liu > >> --- > >> drivers/vhost/vdpa.c | 16 +++

Re: [PATCH RFC 0/3] vdpa: dedicated descriptor table group

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 8:02 AM Si-Wei Liu wrote: > > > > On 8/9/2023 8:50 PM, Jason Wang wrote: > > On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > >> Following patchset introduces dedicated group for descriptor table to > >> reduce live migration d

Re: [PATCH RFC 1/4] vdpa: introduce .reset_map operation callback

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 3:49 AM Si-Wei Liu wrote: > > > > On 8/14/2023 7:21 PM, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 9:46 AM Si-Wei Liu wrote: > >> Signed-off-by: Si-Wei Liu > >> --- > >> include/linux/vdpa.h | 7 +++ > >>

Re: [PATCH RFC 2/3] vhost-vdpa: introduce descriptor group backend feature

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 7:54 AM Si-Wei Liu wrote: > > > > On 8/9/2023 8:49 PM, Jason Wang wrote: > > On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > >> Userspace knows if the device has dedicated descriptor group or not > >> by checking this feature bit

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 10:16 AM Xuan Zhuo wrote: > > On Wed, 16 Aug 2023 09:13:48 +0800, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 5:40 PM Xuan Zhuo > > wrote: > > > > > > On Tue, 15 Aug 2023 15:50:23 +0800, Jason Wang > > > wrote: >

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 10:24 AM Xuan Zhuo wrote: > > On Wed, 16 Aug 2023 10:19:34 +0800, Jason Wang wrote: > > On Wed, Aug 16, 2023 at 10:16 AM Xuan Zhuo > > wrote: > > > > > > On Wed, 16 Aug 2023 09:13:48 +0800, Jason Wang > > > wrote: >

Re: [PATCH] MAINTAINERS: Add myself as mlx5_vdpa driver

2023-08-15 Thread Jason Wang
On Tue, Aug 15, 2023 at 4:33 PM Dragos Tatulea wrote: > > As Eli Cohen moved to other work, I'll be the contact point for > mlx5_vdpa. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > MAINTAINERS | 6 ++ > 1 file changed, 6 insertions(+)

Re: [PATCH] vdpa_sim_blk: Fix the potential leak of mgmt_dev

2023-08-20 Thread Jason Wang
On Mon, Aug 21, 2023 at 10:18 AM Shawn.Shao wrote: > > If the shared_buffer allocation fails, need to unregister mgmt_dev first. > Please add a Fixes tag. Other than this Acked-by: Jason Wang Thanks > Signed-off-by: Shawn.Shao > --- > drivers/vdpa/vdpa_sim/vdpa_sim_bl

Re: [PATCH] vdpa: Update sysfs ABI documentation

2023-08-20 Thread Jason Wang
On Mon, Aug 21, 2023 at 9:16 AM Shawn.Shao wrote: > > Fix the wrong drivers_autoprobe path name in the document > > Signed-off-by: Shawn.Shao Acked-by: Jason Wang Thanks > --- > Documentation/ABI/testing/sysfs-bus-vdpa | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-22 Thread Jason Wang
On Thu, Aug 17, 2023 at 7:44 AM Si-Wei Liu wrote: > > > > On 8/15/2023 6:48 PM, Jason Wang wrote: > > On Wed, Aug 16, 2023 at 6:31 AM Si-Wei Liu wrote: > >> > >> > >> On 8/14/2023 7:25 PM, Jason Wang wrote: > >>> On Tue, Aug 15, 2023 at 9:

Re: [PATCH net-next v3] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-22 Thread Jason Wang
instead of the UAPI header. > > v2->v3 > feedback from Willem de Bruijn > 1. fix typo in commit message. > 2. add original struct virtio_net_hdr into union > 3. remove virtio_net_hdr_mrg_rxbuf variable in receive_buf; > > Signed-off-by: Feng Liu > Reviewed-by: Jiri

Re: [PATCH] vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE

2023-08-23 Thread Jason Wang
l size. vhost_iotlb_del_range() will compute a correct end > iova. Same for vhost_vdpa_iotlb_unmap(). > > Signed-off-by: Eric Auger Cc: sta...@vger.kernel.org I think we need to document the usage of 0 as msg.size for IOTLB_INVALIDATE in uapi. Other than this: Acked-by: Jason Wang Tha

Re: [PATCH RFC v2 1/4] vdpa: introduce .reset_map operation callback

2023-09-10 Thread Jason Wang
Hi Si-Wei: On Sat, Sep 9, 2023 at 9:34 PM Si-Wei Liu wrote: > > On-chip IOMMU parent driver could use it to restore memory mapping > to the initial state. As discussed before. On-chip IOMMU is the hardware details that need to be hidden by the vDPA bus. Exposing this will complicate the impleme

Re: [PATCH RFC v3 2/4] vdpa/mlx5: implement .reset_map driver op

2023-09-10 Thread Jason Wang
On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > > Today, mlx5_vdpa gets started by preallocate 1:1 DMA mapping at > device creation time, while this 1:1 mapping will be implicitly > destroyed when the first .set_map call is invoked. Everytime > when the .reset callback is invoked, any mapping l

Re: [PATCH RFC v3 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-09-10 Thread Jason Wang
On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > > Userspace needs this feature flag to distinguish if vhost-vdpa > iotlb in the kernel supports persistent IOTLB mapping across > device reset. As discussed, the IOTLB persists for devices with platform IOMMU at least. You've mentioned that this

Re: [PATCH RFC v2 0/3] vdpa: dedicated descriptor table group

2023-09-10 Thread Jason Wang
On Sat, Sep 9, 2023 at 4:45 PM Si-Wei Liu wrote: > > Following patchset introduces dedicated group for descriptor table to > reduce live migration downtime when passthrough VQ is being switched > to shadow VQ. This RFC v2 is sent to incorporate the early feedback > from reviewers on the uAPI and d

Re: [PATCH 0/2] vdpa: Add logging operatins

2023-09-10 Thread Jason Wang
Adding Eugenio and Si Wei. On Sat, Aug 26, 2023 at 9:24 AM Jiang Dongxu wrote: > > From: jiangdongxu > > Currently, the vdpa device supports suspend and resume operations. > To support vdpa device live migration, we need to support logging > operations and device state save/load opertions. > > T

Re: [PATCH iproute2] vdpa: consume device_features parameter

2023-09-11 Thread Jason Wang
mac 00:11:22:33:44:55 > Unknown option "0xdeadbeef" > > Fixes: a4442ce58ebb ("vdpa: allow provisioning device features") > Signed-off-by: Allen Hubbe > Reviewed-by: Shannon Nelson > Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Thanks > --- > vdpa/

Re: [PATCH net-next] virtio: kdoc for struct virtio_pci_modern_device

2023-09-11 Thread Jason Wang
y: Shannon Nelson > Acked-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > include/linux/virtio_pci_modern.h | 34 --- > 1 file changed, 22 insertions(+), 12 deletions(-) > > diff --git a/include/linux/virtio_pci_modern.h > b/include

Re: [PATCH RFC v2 0/3] vdpa: dedicated descriptor table group

2023-09-11 Thread Jason Wang
On Mon, Sep 11, 2023 at 3:06 PM Dragos Tatulea wrote: > > Hi Jason, > > On Mon, 2023-09-11 at 14:43 +0800, Jason Wang wrote: > > On Sat, Sep 9, 2023 at 4:45 PM Si-Wei Liu wrote: > > > > > > Following patchset introduces dedicated group for descriptor table to

Re: [PATCH RFC v2 1/4] vdpa: introduce .reset_map operation callback

2023-09-11 Thread Jason Wang
On Tue, Sep 12, 2023 at 7:31 AM Si-Wei Liu wrote: > > Hi Jason, > > On 9/10/2023 8:42 PM, Jason Wang wrote: > > Hi Si-Wei: > > > > On Sat, Sep 9, 2023 at 9:34 PM Si-Wei Liu wrote: > >> On-chip IOMMU parent driver could use it to restore memory mapping >

Re: [PATCH RFC v3 2/4] vdpa/mlx5: implement .reset_map driver op

2023-09-11 Thread Jason Wang
On Tue, Sep 12, 2023 at 8:02 AM Si-Wei Liu wrote: > > > > On 9/10/2023 8:48 PM, Jason Wang wrote: > > On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > >> Today, mlx5_vdpa gets started by preallocate 1:1 DMA mapping at > >> device creation time, while

Re: [PATCH RFC v3 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-09-12 Thread Jason Wang
On Tue, Sep 12, 2023 at 8:28 AM Si-Wei Liu wrote: > > > > On 9/10/2023 8:52 PM, Jason Wang wrote: > > On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > >> Userspace needs this feature flag to distinguish if vhost-vdpa > >> iotlb in the kernel supports persist

Re: [RFC v2 3/4] vduse: update the vq_info in ioctl

2023-09-12 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:00 AM Cindy Lu wrote: > > In VDUSE_VQ_GET_INFO, the driver will sync the last_avail_idx > with reconnect info, After mapping the reconnect pages to userspace > The userspace App will update the reconnect_time in > struct vhost_reconnect_vring, If this is not 0 then it me

Re: [PATCH] vdpa/mlx5: Fix double release of debugfs entry

2023-09-14 Thread Jason Wang
> driver") > Signed-off-by: Dragos Tatulea > Reviewed-by: Gal Pressman Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/net/debug.c | 5 +++-- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 ++- > drivers/vdpa/mlx5/net/mlx5_vnet.h | 2 +- > 3 files changed, 6 insert

Re: [PATCH v2] vdpa/mlx5: Fix firmware error on creation of 1k VQs

2023-09-14 Thread Jason Wang
1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 63 ++- > drivers/vdpa/mlx5/net/mlx5_vnet.h | 9 + > 2 files

Re: [PATCH V3] io_uring: fix IO hang in io_wq_put_and_exit from do_exit()

2023-09-15 Thread Jason Wang
On Fri, Sep 8, 2023 at 11:25 PM Ming Lei wrote: > > On Fri, Sep 08, 2023 at 08:44:45AM -0600, Jens Axboe wrote: > > On 9/8/23 8:34 AM, Ming Lei wrote: > > > On Fri, Sep 08, 2023 at 07:49:53AM -0600, Jens Axboe wrote: > > >> On 9/8/23 3:30 AM, Ming Lei wrote: > > >>> diff --git a/io_uring/io_uring.

Re: [RFC v2 1/4] vduse: Add function to get/free the pages for reconnection

2023-09-18 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:00 AM Cindy Lu wrote: > > Add the function vduse_alloc_reconnnect_info_mem > and vduse_alloc_reconnnect_info_mem > In this 2 function, vduse will get/free (vq_num + 1)*page > Page 0 will be used to save the reconnection information, The > Userspace App will maintain this

Re: [RFC v2 2/4] vduse: Add file operation for mmap

2023-09-18 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:00 AM Cindy Lu wrote: > > Add the operation for mmap, The user space APP will > use this function to map the pages to userspace > > Signed-off-by: Cindy Lu > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 63 ++ > 1 file changed, 63 insertions(+

Re: [RFC v2 4/4] vduse: Add new ioctl VDUSE_GET_RECONNECT_INFO

2023-09-18 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:01 AM Cindy Lu wrote: > > In VDUSE_GET_RECONNECT_INFO, the Userspace App can get the map size > and The number of mapping memory pages from the kernel. The userspace > App can use this information to map the pages. > > Signed-off-by: Cindy Lu > --- > drivers/vdpa/vdpa_

Re: [PATCH net 1/6] virtio-net: initially change the value of tx-frames

2023-09-21 Thread Jason Wang
x switching > condition is met. > +* 3. If the device is up, the user setting fails: > +* "netlink error: Device or resource busy" > +* This is not intuitive. Therefore, we keep napi_tx state > consistent with > +

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 3:49 AM Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 03:13:10PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 03:39:26PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 12:53:04PM -0400, Michael S. Tsirkin wrote: > > > > > vdpa is not vfio,

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 4:16 AM Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 04:53:45PM -0300, Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 03:34:03PM -0400, Michael S. Tsirkin wrote: > > > > > that's easy/practical. If instead VDPA gives the same speed with just > > > shadow vq th

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 6:55 AM Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 04:45:45PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 04:49:46PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 03:13:10PM -0400, Michael S. Tsirkin wrote: > > > > On Thu, Sep 21, 2023

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 3:53 AM Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 03:34:03PM -0400, Michael S. Tsirkin wrote: > > > that's easy/practical. If instead VDPA gives the same speed with just > > shadow vq then keeping this hack in vfio seems like less of a problem. > > Finally if VDPA

Re: [PATCH net 2/6] virtio-net: fix mismatch of getting tx-frames

2023-09-21 Thread Jason Wang
> Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index fd5bc8d59eda..80d35a864790 100644 > --- a/drivers/ne

Re: [PATCH net 3/6] virtio-net: consistently save parameters for per-queue

2023-09-21 Thread Jason Wang
t;) > Cc: Gavin Li > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 80d35a864790..ce60162d380a 100644

Re: [PATCH net 4/6] virtio-net: fix per queue coalescing parameter setting

2023-09-21 Thread Jason Wang
On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > > When the user sets a non-zero coalescing parameter to 0 for a specific > virtqueue, it does not work as expected, so let's fix this. > > Fixes: 394bd87764b6 ("virtio_net: support per queue interrupt coalesce > command") > Reported-by: Xiaoming Zh

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-21 Thread Jason Wang
On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > > According to the definition of virtqueue coalescing spec[1]: > > Upon disabling and re-enabling a transmit virtqueue, the device MUST set > the coalescing parameters of the virtqueue to those configured through the > VIRTIO_NET_CTRL_NOTF_COA

Re: [PATCH net 6/6] virtio-net: a tiny comment update

2023-09-21 Thread Jason Wang
On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > > Update a comment because virtio-net now supports both > VIRTIO_NET_F_NOTF_COAL and VIRTIO_NET_F_VQ_NOTF_COAL. > > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 2 +- > 1 f

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-22 Thread Jason Wang
On Fri, Sep 22, 2023 at 1:02 PM Heng Qi wrote: > > > > 在 2023/9/22 下午12:29, Jason Wang 写道: > > On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > >> According to the definition of virtqueue coalescing spec[1]: > >> > >>Upon disabling and re-enabl

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 3:58 PM Heng Qi wrote: > > > > 在 2023/9/22 下午3:32, Jason Wang 写道: > > On Fri, Sep 22, 2023 at 1:02 PM Heng Qi wrote: > >> > >> > >> 在 2023/9/22 下午12:29, Jason Wang 写道: > >>> On Tue, Sep 19, 2023 at 3:49 PM Heng Q

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 5:56 PM Xuan Zhuo wrote: > > On Fri, 22 Sep 2023 15:32:39 +0800, Jason Wang wrote: > > On Fri, Sep 22, 2023 at 1:02 PM Heng Qi wrote: > > > > > > > > > > > > 在 2023/9/22 下午12:29, Jason Wang 写道: > > >

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 8:25 PM Parav Pandit wrote: > > > > From: Jason Gunthorpe > > Sent: Friday, September 22, 2023 5:53 PM > > > > > And what's more, using MMIO BAR0 then it can work for legacy. > > > > Oh? How? Our team didn't think so. > > It does not. It was already discussed. > The device

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 8:11 PM Jason Gunthorpe wrote: > > On Fri, Sep 22, 2023 at 11:01:23AM +0800, Jason Wang wrote: > > > > Even when it does, there is no real use case to live migrate a > > > virtio-net function from, say, AWS to GCP. > > > > It can h

Re: [RFC v2 4/4] vduse: Add new ioctl VDUSE_GET_RECONNECT_INFO

2023-09-24 Thread Jason Wang
On Thu, Sep 21, 2023 at 10:07 PM Cindy Lu wrote: > > On Mon, Sep 18, 2023 at 4:49 PM Jason Wang wrote: > > > > On Tue, Sep 12, 2023 at 11:01 AM Cindy Lu wrote: > > > > > > In VDUSE_GET_RECONNECT_INFO, the Userspace App can get the map size > > > an

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Jason Wang
On Mon, Sep 25, 2023 at 4:26 PM Parav Pandit wrote: > > > > > From: Jason Wang > > Sent: Monday, September 25, 2023 8:00 AM > > > > On Fri, Sep 22, 2023 at 8:25 PM Parav Pandit wrote: > > > > > > > > > > From: Ja

Re: [RFC 0/7] vdpa: Add support for iommufd

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:05 AM Cindy Lu wrote: > > Hi All > Really apologize for the delay, this is the draft RFC for > iommufd support for vdpa, This code provides the basic function > for iommufd support > > The code was tested and passed in device vdpa_sim_net > The qemu code is > https://gitl

Re: [RFC 5/7] vdpa: Add new vdpa_config_ops

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:06 AM Cindy Lu wrote: > > Add new vdpa_config_ops to support iommufd > > Signed-off-by: Cindy Lu > --- > include/linux/vdpa.h | 34 +- > 1 file changed, 33 insertions(+), 1 deletion(-) > > diff --git a/include/linux/vdpa.h b/include/linux

Re: [RFC 1/7] vhost/iommufd: Add the functions support iommufd

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:05 AM Cindy Lu wrote: > > Add a new file vhost/iommufd.c to support the function of > iommufd, This file contains iommufd function of emulated device and > the physical device. > > Signed-off-by: Cindy Lu > --- > drivers/vhost/iommufd.c | 151 +++

Re: [RFC 3/7] vhost: Add 3 new uapi to support iommufd

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:05 AM Cindy Lu wrote: > > VHOST_VDPA_SET_IOMMU_FD: bind the device to iommufd device > > VDPA_DEVICE_ATTACH_IOMMUFD_AS: Attach a vdpa device to an iommufd > address space specified by IOAS id. > > VDPA_DEVICE_DETACH_IOMMUFD_AS: Detach a vdpa device > from the iommufd addr

Re: [PATCH] vringh: don't use vringh_kiov_advance() in vringh_iov_xfer()

2023-09-25 Thread Jason Wang
7d ("vringh: implement vringh_kiov_advance()") > Cc: sta...@vger.kernel.org > Reported-by: Jason Wang > Signed-off-by: Stefano Garzarella Acked-by: Jason Wang Thanks > --- > drivers/vhost/vringh.c | 12 +++- > 1 file changed, 11 insertions(+), 1 delet

Re: [PATCH 04/16] vdpa/mlx5: Create helper function for dma mappings

2023-09-25 Thread Jason Wang
On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea wrote: > > Necessary for upcoming cvq separation from mr allocation. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 + > drivers/vdpa/mlx5/core/mr.c| 5

Re: [PATCH 05/16] vdpa/mlx5: Decouple cvq iotlb handling from hw mapping code

2023-09-25 Thread Jason Wang
unsigned int asid) > +{ > + if (mvdev->group2asid[MLX5_VDPA_CVQ_GROUP] != asid) > + return 0; > + > + prune_iotlb(mvdev); > + return dup_iotlb(mvdev, iotlb); > +} > + > int mlx5_vdpa_create_dma_mr(struct mlx5_vd

Re: [PATCH 06/16] vdpa/mlx5: Take cvq iotlb lock during refresh

2023-09-25 Thread Jason Wang
https://lore.kernel.org/lkml/20230112142218.725622-4-epere...@redhat.com/ > > Suggested-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mr.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/driv

Re: [PATCH 07/16] vdpa/mlx5: Collapse "dvq" mr add/delete functions

2023-09-25 Thread Jason Wang
hes. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mr.c | 16 +--- > 1 file changed, 5 insertions(+), 11 deletions(-) > > diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c > index 587300e

Re: [PATCH 08/16] vdpa/mlx5: Rename mr destroy functions

2023-09-25 Thread Jason Wang
On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea wrote: > > Make mlx5_destroy_mr symmetric to mlx5_create_mr. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 4 ++-- > drivers/vdpa/mlx5/core/mr.c| 6 +

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Jason Wang
On Tue, Sep 26, 2023 at 12:01 PM Parav Pandit wrote: > > > > > From: Jason Wang > > Sent: Tuesday, September 26, 2023 8:03 AM > > > > It's the implementation details in legacy. The device needs to make sure > > (reset) > > the driver can work (

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Jason Wang
On Tue, Sep 26, 2023 at 11:45 AM Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > Sent: Tuesday, September 26, 2023 12:06 AM > > > One can thinkably do that wait in hardware, though. Just defer completion > > until > > read is done. > > > Once OASIS does such new interface and if some

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Jason Wang
On Mon, Sep 25, 2023 at 8:26 PM Jason Gunthorpe wrote: > > On Mon, Sep 25, 2023 at 10:34:54AM +0800, Jason Wang wrote: > > > > Cloud vendors will similarly use DPUs to create a PCI functions that > > > meet the cloud vendor's internal specification. > > >

Re: [PATCH 09/16] vdpa/mlx5: Allow creation/deletion of any given mr struct

2023-09-25 Thread Jason Wang
On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea wrote: > > This patch adapts the mr creation/deletion code to be able to work with > any given mr struct pointer. All the APIs are adapted to take an extra > parameter for the mr. > > mlx5_vdpa_create/delete_mr doesn't need a ASID parameter anymore. T

Re: [PATCH 09/16] vdpa/mlx5: Allow creation/deletion of any given mr struct

2023-10-07 Thread Jason Wang
On Tue, Sep 26, 2023 at 3:21 PM Dragos Tatulea wrote: > > On Tue, 2023-09-26 at 12:44 +0800, Jason Wang wrote: > > On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea wrote: > > > > > > This patch adapts the mr creation/deletion code to be able to work with > > &g

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-07 Thread Jason Wang
On Tue, Sep 26, 2023 at 7:49 PM Michael S. Tsirkin wrote: > > On Tue, Sep 26, 2023 at 10:32:39AM +0800, Jason Wang wrote: > > It's the implementation details in legacy. The device needs to make > > sure (reset) the driver can work (is done before get_status return). >

Re: [PATCH 1/2] virtio_pci: fix the common map size and add check for vq-reset

2023-10-07 Thread Jason Wang
On Mon, Sep 25, 2023 at 11:58 AM Xuan Zhuo wrote: > > Now, the function vp_modern_map_capability() takes the size parameter, > which corresponds to the size of virtio_pci_common_cfg. As a result, the > pci_iomap_range() function maps the memory area for > virtio_pci_common_cfg. > > However, if the

Re: [PATCH 2/2] virtio_pci: add build offset check for the new common cfg items

2023-10-07 Thread Jason Wang
On Mon, Sep 25, 2023 at 11:58 AM Xuan Zhuo wrote: > > Add checks to the check_offsets(void) for queue_notify_data and > queue_reset. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > drivers/virtio/virtio_pci_modern_dev.c | 4 > 1 file changed,

Re: [PATCH 2/2] tools/virtio: Add hints when module is not installed

2023-10-07 Thread Jason Wang
On Tue, Sep 26, 2023 at 1:00 PM wrote: > > From: Liming Wu > > Need to insmod vhost_test.ko before run virtio_test. > Give some hints to users. > > Signed-off-by: Liming Wu > --- > tools/virtio/virtio_test.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/tools/virtio/virtio_test.c

Re: [PATCH 1/2] tools/virtio: Add dma sync api for virtio test

2023-10-07 Thread Jason Wang
On Tue, Sep 26, 2023 at 1:00 PM wrote: > > From: Liming Wu > > Fixes: 8bd2f71054bd ("virtio_ring: introduce dma sync api for virtqueue") > also add dma sync api for virtio test. > > Signed-off-by: Liming Wu Acked-by: Jason Wang Thanks > --- >

Re: [PATCH vhost] virtio_net: fix the missing of the dma cpu sync

2023-10-07 Thread Jason Wang
ffers") > Reported-by: Michael Roth > Closes: http://lore.kernel.org/all/20230926130451.axgodaa6tvwqs...@amd.com > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) &g

Re: [RFC v2 3/4] vduse: update the vq_info in ioctl

2023-10-07 Thread Jason Wang
On Fri, Sep 29, 2023 at 5:12 PM Maxime Coquelin wrote: > > > > On 9/12/23 09:39, Jason Wang wrote: > > On Tue, Sep 12, 2023 at 11:00 AM Cindy Lu wrote: > >> > >> In VDUSE_VQ_GET_INFO, the driver will sync the last_avail_idx > >> with reconnect info, A

Re: [PATCH net v2 4/6] virtio-net: fix per queue coalescing parameter setting

2023-10-07 Thread Jason Wang
nd") > Reported-by: Xiaoming Zhao > Cc: Gavin Li > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > v1->v2: > 1. Remove useless comments. > > drivers/net/virtio_net.c | 36 > 1 file changed, 16 insertions(

Re: [PATCH net v2 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-10-07 Thread Jason Wang
*/ > >> +err = virtnet_send_ctrl_coal_vq_cmd(vi, txq2vq(i), > >> + > >> vi->intr_coal_tx.max_usecs, > >> + > >> vi

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-10-07 Thread Jason Wang
l 21, 2023 at 04:37:00PM +0200, Maxime Coquelin wrote: > >>>>>> > >>>>>> > >>>>>> On 7/20/23 23:02, Michael S. Tsirkin wrote: > >>>>>>> On Thu, Jul 20, 2023 at 01:26:20PM -0700, Shannon Nelson wrote: > >>

Re: [PATCH] vduse: make vduse_class constant

2023-10-07 Thread Jason Wang
> allocated at runtime. > > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Xuan Zhuo > Cc: Xie Yongji > Signed-off-by: Greg Kroah-Hartman Acked-by: Jason Wang Thanks > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 40 -- &g

Re: [PATCH 09/16] vdpa/mlx5: Allow creation/deletion of any given mr struct

2023-10-08 Thread Jason Wang
On Sun, Oct 8, 2023 at 8:05 PM Dragos Tatulea wrote: > > On Sun, 2023-10-08 at 12:25 +0800, Jason Wang wrote: > > On Tue, Sep 26, 2023 at 3:21 PM Dragos Tatulea wrote: > > > > > > On Tue, 2023-09-26 at 12:44 +0800, Jason Wang wrote: > > > > On T

Re: [RFC PATCH 5/7] tun: Introduce virtio-net hashing feature

2023-10-09 Thread Jason Wang
On Tue, Oct 10, 2023 at 9:52 AM Akihiko Odaki wrote: > > On 2023/10/09 19:44, Willem de Bruijn wrote: > > On Mon, Oct 9, 2023 at 3:12 AM Akihiko Odaki > > wrote: > >> > >> On 2023/10/09 19:06, Willem de Bruijn wrote: > >>> On Mon, Oct 9, 2023 at 3:02 AM Akihiko Odaki > >>> wrote: > >

Re: [RFC PATCH 5/7] tun: Introduce virtio-net hashing feature

2023-10-09 Thread Jason Wang
On Tue, Oct 10, 2023 at 1:51 PM Akihiko Odaki wrote: > > On 2023/10/10 14:45, Jason Wang wrote: > > On Tue, Oct 10, 2023 at 9:52 AM Akihiko Odaki > > wrote: > >> > >> On 2023/10/09 19:44, Willem de Bruijn wrote: > >>> On Mon, Oct 9, 2023 at 3:12 

Re: [PATCH vhost v3 10/16] vdpa/mlx5: Allow creation/deletion of any given mr struct

2023-10-09 Thread Jason Wang
ASID parameter anymore. The > check is done in the caller instead (mlx5_set_map). > > This change is needed for a followup patch which will introduce an > additional mr for the vq descriptor data. > > Signed-off-by: Dragos Tatulea > Acked-by: E

<    1   2   3   4   5   6   7   8   9   10   >