Re: [PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists

2023-07-31 Thread Jason Wang
On Mon, Jul 31, 2023 at 5:08 PM Michael S. Tsirkin wrote: > > On Mon, Jul 31, 2023 at 07:15:31AM +, Dragos Tatulea wrote: > > On Thu, 2023-07-27 at 12:28 -0400, Michael S. Tsirkin wrote: > > > On Thu, Jul 27, 2023 at 04:02:16PM +, Dragos Tatulea wrote: > > > > On Wed, 2023-07-26 at 15:26 -

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

2023-07-30 Thread Jason Wang
On Thu, Jul 27, 2023 at 5:46 PM Michael S. Tsirkin wrote: > > On Thu, Jul 27, 2023 at 04:59:33PM +0800, Jason Wang wrote: > > > They really shouldn't - any NIC that takes forever to > > > program will create issues in the networking stack. > > > > Unfor

Re: [PATCH net-next V4 2/3] virtio_net: support per queue interrupt coalesce command

2023-07-30 Thread Jason Wang
在 2023/7/28 13:46, Michael S. Tsirkin 写道: On Thu, Jul 27, 2023 at 03:28:32PM +0200, Paolo Abeni wrote: On Tue, 2023-07-25 at 16:07 +0300, Gavin Li wrote: Add interrupt_coalesce config in send_queue and receive_queue to cache user config. Send per virtqueue interrupt moderation config to under

Re: [PATCH net-next V4 3/3] virtio_net: enable per queue interrupt coalesce feature

2023-07-30 Thread Jason Wang
在 2023/7/25 21:07, Gavin Li 写道: Enable per queue interrupt coalesce feature bit in driver and validate its dependency with control queue. Signed-off-by: Gavin Li Reviewed-by: Dragos Tatulea Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Reviewed-by: Heng Qi Acked-by: Jason Wang

Re: [PATCH net-next V4 2/3] virtio_net: support per queue interrupt coalesce command

2023-07-30 Thread Jason Wang
all the VQs when updating the global configuration, as now the individual VQs configuration can diverge from the global configuration. Signed-off-by: Gavin Li Reviewed-by: Dragos Tatulea Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Reviewed-by: Heng Qi Acked-by: Jason Wang Thanks

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

2023-07-30 Thread Jason Wang
On Fri, Jul 28, 2023 at 11:03 PM Jakub Kicinski wrote: > > On Fri, 28 Jul 2023 14:02:33 +0800 Xuan Zhuo wrote: > > Hi guys, this topic is stuck again. How should I proceed with this work? > > > > Let me briefly summarize: > > 1. The problem with adding virtio_dma_{map, sync} api is that, for AF_XD

Re: [PATCH net-next V4 2/3] virtio_net: support per queue interrupt coalesce command

2023-07-27 Thread Jason Wang
On Thu, Jul 27, 2023 at 9:28 PM Paolo Abeni wrote: > > On Tue, 2023-07-25 at 16:07 +0300, Gavin Li wrote: > > Add interrupt_coalesce config in send_queue and receive_queue to cache user > > config. > > > > Send per virtqueue interrupt moderation config to underlying device in > > order to have mor

Re: [PATCH] vdpa/mlx5: Correct default number of queues when MQ is on

2023-07-27 Thread Jason Wang
On Fri, Jul 28, 2023 at 1:25 AM Dragos Tatulea wrote: > > The standard specifies that the initial number of queues is the > default, which is 1 (1 tx, 1 rx). > > Signed-off-by: Dragos Tatulea > Reviewed-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > drivers/v

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

2023-07-27 Thread Jason Wang
On Thu, Jul 27, 2023 at 2:10 PM Michael S. Tsirkin wrote: > > On Thu, Jul 27, 2023 at 02:03:59PM +0800, Jason Wang wrote: > > On Wed, Jul 26, 2023 at 7:38 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Jul 26, 2023 at 09:55:37AM +0800, Jason Wang wrote: > >

Re: [PATCH] virtio-vdpa: Fix cpumask memory leak in virtio_vdpa_find_vqs()

2023-07-26 Thread Jason Wang
ot;) > Signed-off-by: Gal Pressman > Reviewed-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/virtio/virtio_vdpa.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c > index 989e2d7184ce

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

2023-07-26 Thread Jason Wang
On Wed, Jul 26, 2023 at 7:38 PM Michael S. Tsirkin wrote: > > On Wed, Jul 26, 2023 at 09:55:37AM +0800, Jason Wang wrote: > > On Tue, Jul 25, 2023 at 3:36 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 25, 2023 at 11:07:40AM +0800, Jason Wang wrote: > >

Re: vdpa: use io_uring passthrough command for IOCTLs [was Re: [PATCH 1/2] Reduce vdpa initialization / startup overhead]

2023-07-26 Thread Jason Wang
On Tue, Jul 18, 2023 at 6:32 PM Stefano Garzarella wrote: > > On Thu, Apr 20, 2023 at 6:20 AM Jason Wang wrote: > > > > On Wed, Apr 19, 2023 at 11:33 PM Eugenio Perez Martin > > wrote: > > > > > > On Wed, Apr 19, 2023 at 12:56 AM wrote: > > >

Re: [PATCH] vduse: Use proper spinlock for IRQ injection

2023-07-25 Thread Jason Wang
NAPI polling work is scheduled > and the time it is executed. > > Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace") > Cc: xieyon...@bytedance.com > > Suggested-by: Jason Wang > Signed-off-by: Maxime Coquelin Acked-by: Jason Wang Than

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

2023-07-25 Thread Jason Wang
On Tue, Jul 25, 2023 at 3:36 PM Michael S. Tsirkin wrote: > > On Tue, Jul 25, 2023 at 11:07:40AM +0800, Jason Wang wrote: > > On Mon, Jul 24, 2023 at 3:17 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jul 24, 2023 at 02:52:05PM +0800, Jason Wang wrote: > >

Re: [PATCH net] virtio-net: fix race between set queues and probe

2023-07-25 Thread Jason Wang
On Tue, Jul 25, 2023 at 3:53 PM Michael S. Tsirkin wrote: > > On Tue, Jul 25, 2023 at 03:20:49AM -0400, Jason Wang wrote: > > A race were found where set_channels could be called after registering > > but before virtnet_set_queues() in virtnet_probe(). Fixing this

[PATCH net] virtio-net: fix race between set queues and probe

2023-07-25 Thread Jason Wang
at that time. Fixes: a220871be66f ("virtio-net: correctly enable multiqueue") Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 0db14f6b87d3..1270c8d23

Re: [PATCH v1] virtio-pci: Fix legacy device flag setting error in probe

2023-07-24 Thread Jason Wang
On Mon, Jul 24, 2023 at 9:14 PM Feng Liu wrote: > > > > On 2023-07-20 p.m.1:14, Michael S. Tsirkin wrote: > > External email: Use caution opening links or attachments > > > > > > On Thu, Jul 20, 2023 at 10:27:04AM +0800, Jason Wang wrote: > >> On

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

2023-07-24 Thread Jason Wang
On Mon, Jul 24, 2023 at 3:17 PM Michael S. Tsirkin wrote: > > On Mon, Jul 24, 2023 at 02:52:05PM +0800, Jason Wang wrote: > > On Sat, Jul 22, 2023 at 4:18 AM Maxime Coquelin > > wrote: > > > > > > > > > > > > On 7/21/23 17:10, Michael S. Tsi

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

2023-07-24 Thread Jason Wang
On Mon, Jul 24, 2023 at 3:18 PM Michael S. Tsirkin wrote: > > On Mon, Jul 24, 2023 at 02:52:49PM +0800, Jason Wang wrote: > > On Mon, Jul 24, 2023 at 2:46 PM Michael S. Tsirkin wrote: > > > > > > On Fri, Jul 21, 2023 at 10:18:03PM +0200, Maxime Coquelin wrote: >

Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check

2023-07-24 Thread Jason Wang
On Sun, Jul 23, 2023 at 6:02 PM Michael S. Tsirkin wrote: > > On Sun, Jul 23, 2023 at 05:48:46PM +0800, Lin Ma wrote: > > > > > Sure, that is another undergoing task I'm working on. If the nlattr is > > > parsed with > > > NL_VALIDATE_UNSPEC, any forgotten nlattr will be rejected, therefore > >

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

2023-07-23 Thread Jason Wang
ng cond_resched() to the command waiting loop for a better > > > > > > > > > co-operation with the scheduler. This allows to give CPU a > > > > > > > > > breath to > > > > > > > > > run other task(workqueue) instead of busy l

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

2023-07-23 Thread Jason Wang
>> On Fri, Jul 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: > >>>>>> On

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

2023-07-20 Thread Jason Wang
Adding cond_resched() to the command waiting loop for a better co-operation with the scheduler. This allows to give CPU a breath to run other task(workqueue) instead of busy looping when preemption is not allowed on a device whose CVQ might be slow. Signed-off-by: Jason Wang --- drivers/net

[PATCH net-next v4 1/2] virtio-net: convert rx mode setting to use workqueue

2023-07-20 Thread Jason Wang
lost after resuming. This is not the bug of this patch as we never try to restore rx mode setting during resume. Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 55 +--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/drivers/net

[PATCH net-next v4 0/2] virtio-net: don't busy poll for cvq command

2023-07-20 Thread Jason Wang
buffer manually since the virtio core check more_used() instead Jason Wang (2): virtio-net: convert rx mode setting to use workqueue virtio-net: add cond_resched() to the command waiting loop drivers/net/virtio_net.c | 59 +--- 1 file changed, 55 insertions(

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-20 Thread Jason Wang
On Thu, Jul 20, 2023 at 2:23 PM Christoph Hellwig wrote: > > Hi Jason, > > can you please resend your reply with proper quoting? I had to give > up after multiple pages of scrolling without finding anything that > you added to the full quote. I guess it's this part? > > > You should also test w

Re: [PATCH v1] virtio-pci: Fix legacy device flag setting error in probe

2023-07-19 Thread Jason Wang
On Wed, Jul 19, 2023 at 11:46 PM Feng Liu wrote: > > The 'is_legacy' flag is used to differentiate between legacy vs modern > device. Currently, it is based on the value of vp_dev->ldev.ioaddr. > However, due to the shared memory of the union between struct > virtio_pci_legacy_device and struct vi

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-19 Thread Jason Wang
> > > > On Wed, 12 Jul 2023 16:37:43 +0800, Jason Wang > > > > wrote: > > > > > On Wed, Jul 12, 2023 at 4:33 PM Xuan Zhuo > > > > > wrote: > > > > > > > > > > > > On Wed, 12 Jul 2023 15:54:58 +0800, Xuan Z

Re: [PATCH 1/1] MAINTAINERS: add vhost-scsi entry and myself as a co-maintainer

2023-07-16 Thread Jason Wang
On Sat, Jul 15, 2023 at 10:20 PM Mike Christie wrote: > > I've been doing a lot of the development on vhost-scsi the last couple of > years, so per Michael T's suggestion this adds me as co-maintainer. > > Signed-off-by: Mike Christie Acked-by: Jason Wang Thanks

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-13 Thread Jason Wang
On Fri, Jul 14, 2023 at 12:37 PM Xuan Zhuo wrote: > > On Fri, 14 Jul 2023 11:57:05 +0800, Jason Wang wrote: > > On Thu, Jul 13, 2023 at 3:02 PM Xuan Zhuo > > wrote: > > > > > > On Thu, 13 Jul 2023 12:20:01 +0800, Jason Wang > > > wrote: >

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-13 Thread Jason Wang
On Thu, Jul 13, 2023 at 3:02 PM Xuan Zhuo wrote: > > On Thu, 13 Jul 2023 12:20:01 +0800, Jason Wang wrote: > > On Mon, Jul 10, 2023 at 11:43 AM Xuan Zhuo > > wrote: > > > > > > > I'd suggest to tweak the title like: > > > >

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-13 Thread Jason Wang
On Thu, Jul 13, 2023 at 2:54 PM Xuan Zhuo wrote: > > On Thu, 13 Jul 2023 12:20:01 +0800, Jason Wang wrote: > > On Mon, Jul 10, 2023 at 11:43 AM Xuan Zhuo > > wrote: > > > > > > > I'd suggest to tweak the title like: > > > >

Re: [PATCH v2 virtio 5/5] pds_vdpa: fix up debugfs feature bit printing

2023-07-12 Thread Jason Wang
On Tue, Jul 11, 2023 at 12:25 PM Shannon Nelson wrote: > > Make clearer in debugfs output the difference between the hw > feature bits, the features supported through the driver, and > the features that have been negotiated. > > Signed-off-by: Shannon Nelson Acked-by: J

Re: [PATCH v2 virtio 3/5] pds_vdpa: clean and reset vqs entries

2023-07-12 Thread Jason Wang
y: Shannon Nelson Acked-by: Jason Wang Thanks > --- > drivers/vdpa/pds/vdpa_dev.c | 24 +--- > 1 file changed, 17 insertions(+), 7 deletions(-) > > diff --git a/drivers/vdpa/pds/vdpa_dev.c b/drivers/vdpa/pds/vdpa_dev.c > index 5b566e0eef0a..04a362648b02 1006

Re: [PATCH v2 virtio 2/5] pds_vdpa: always allow offering VIRTIO_NET_F_MAC

2023-07-12 Thread Jason Wang
O_NET_F_MAC before > finishing the feature negotiation. If the user specifies a device_features > bitpattern in the vdpa utility without the VIRTIO_NET_F_MAC set, then > don't set the mac. > > Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interface

Re: [PATCH v2 virtio 1/5] pds_vdpa: reset to vdpa specified mac

2023-07-12 Thread Jason Wang
interfaces") > Signed-off-by: Allen Hubbe > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > drivers/vdpa/pds/vdpa_dev.c | 16 > drivers/vdpa/pds/vdpa_dev.h | 1 + > 2 files changed, 9 insertions(+), 8 deletions(-) > > diff

Re: [PATCH vhost v11 06/10] virtio_ring: skip unmap for premapped

2023-07-12 Thread Jason Wang
On Thu, Jul 13, 2023 at 12:06 PM Xuan Zhuo wrote: > > On Thu, 13 Jul 2023 11:50:57 +0800, Jason Wang wrote: > > On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo > > wrote: > > > > > > Now we add a case where we skip dma unmap, the vq->premapped is true. > &

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:43 AM Xuan Zhuo wrote: > I'd suggest to tweak the title like: "merge dma operations when refilling mergeable buffers" > Currently, the virtio core will perform a dma operation for each > operation. "for each buffer"? > Although, the same page may be operated multipl

Re: [PATCH vhost v11 06/10] virtio_ring: skip unmap for premapped

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > > Now we add a case where we skip dma unmap, the vq->premapped is true. > > We can't just rely on use_dma_api to determine whether to skip the dma > operation. For convenience, I introduced the "do_unmap". By default, it > is the same as use_dma_

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-12 Thread Jason Wang
On Wed, Jul 12, 2023 at 4:33 PM Xuan Zhuo wrote: > > On Wed, 12 Jul 2023 15:54:58 +0800, Xuan Zhuo > wrote: > > On Tue, 11 Jul 2023 10:58:51 +0800, Jason Wang wrote: > > > On Tue, Jul 11, 2023 at 10:42 AM Xuan Zhuo > > > wrote: > > > > > >

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

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM 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 Ac

Re: [PATCH vhost v11 04/10] virtio_ring: support add premapped buf

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > > If the vq is the premapped mode, use the sg_dma_address() directly. > > Signed-off-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/drivers/virtio

Re: [PATCH vhost v11 03/10] virtio_ring: introduce virtqueue_set_premapped()

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > This helper allows the driver change the dma mode to premapped mode. > Under the premapped mode, the virtio core do not do dma mapping > internally. > > This just work when the use_dma_api is true. If the use_dma_api is false, > the dma options

Re: [PATCH net-next V1 3/4] virtio_net: support per queue interrupt coalesce command

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 5:21 PM Gavin Li wrote: > Add interrupt_coalesce config in send_queue and receive_queue to cache user > config. > > Send per virtqueue interrupt moderation config to underline device in order > to have more efficient interrupt moderation and cpu utilization of guest > VM.

Re: [PATCH net-next V1 2/4] virtio_net: extract get/set interrupt coalesce to a function

2023-07-12 Thread Jason Wang
rs/net/virtio_net.c | 22 +- > 1 file changed, 17 insertions(+), 5 deletions(-) > Acked-by: Jason Wang Thanks > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index dd5fec073a27..802ed21453f5 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/vir

Re: [PATCH net-next V1 1/4] virtio_net: extract interrupt coalescing settings to a structure

2023-07-12 Thread Jason Wang
rs/net/virtio_net.c | 35 +++ > 1 file changed, 19 insertions(+), 16 deletions(-) > Acked-by: Jason Wang Thanks > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 0db14f6b87d3..dd5fec073a27 100644 > --- a/drivers/net/virtio_net.c &g

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-10 Thread Jason Wang
On Tue, Jul 11, 2023 at 10:42 AM Xuan Zhuo wrote: > > On Tue, 11 Jul 2023 10:36:17 +0800, Jason Wang wrote: > > On Mon, Jul 10, 2023 at 8:41 PM Xuan Zhuo > > wrote: > > > > > > On Mon, 10 Jul 2023 07:59:03 -0400, "Michael S. Tsirkin" > >

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-10 Thread Jason Wang
On Mon, Jul 10, 2023 at 8:41 PM Xuan Zhuo wrote: > > On Mon, 10 Jul 2023 07:59:03 -0400, "Michael S. Tsirkin" > wrote: > > On Mon, Jul 10, 2023 at 06:18:30PM +0800, Xuan Zhuo wrote: > > > On Mon, 10 Jul 2023 05:40:21 -0400, "Michael S. Tsirkin" > > > wrote: > > > > On Mon, Jul 10, 2023 at 11:4

Re: [PATCH virtio] pds_vdpa: protect Makefile from unconfigured debugfs

2023-07-09 Thread Jason Wang
; > Link: > https://lore.kernel.org/linux-next/fec68c3c-8249-7af4-5390-0495386a7...@infradead.org/ > Fixes: a16291b5bcbb ("pds_vdpa: Add new vDPA driver for AMD/Pensando DSC") > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > drivers/vdpa/pds/Makefil

Re: [PATCH virtio 1/4] pds_vdpa: reset to vdpa specified mac

2023-07-09 Thread Jason Wang
On Sat, Jul 8, 2023 at 4:12 AM Shannon Nelson wrote: > > > > On 7/7/23 12:33 AM, Jason Wang wrote: > > Caution: This message originated from an External Source. Use proper > > caution when opening attachments, clicking links, or responding. > > > > > &g

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-07 Thread Jason Wang
On Thu, Jul 6, 2023 at 5:39 PM Eugenio Perez Martin wrote: > > On Thu, Jul 6, 2023 at 10:03 AM Jason Wang wrote: > > > > On Thu, Jul 6, 2023 at 3:55 PM Jason Wang wrote: > > > > > > On Thu, Jul 6, 2023 at 3:06 PM Eugenio Perez Martin > > > wrote: &

Re: [PATCH virtio 2/4] pds_vdpa: always allow offering VIRTIO_NET_F_MAC

2023-07-07 Thread Jason Wang
On Fri, Jun 30, 2023 at 8:36 AM Shannon Nelson wrote: > > Our driver sets a mac if the HW is 00:..:00 so we need to be sure to > advertise VIRTIO_NET_F_MAC even if the HW doesn't. We also need to be > sure that virtio_net sees the VIRTIO_NET_F_MAC and doesn't rewrite the > mac address that a user

Re: [PATCH virtio 4/4] pds_vdpa: alloc irq vectors on DRIVER_OK

2023-07-07 Thread Jason Wang
mt interfaces") > Signed-off-by: Allen Hubbe > Signed-off-by: Shannon Nelson > Reviewed-by: Brett Creeley Acked-by: Jason Wang Thanks > --- > drivers/vdpa/pds/vdpa_dev.c | 110 ++-- > 1 file changed, 81 insertions(+), 29 deletions(-) > &g

Re: [PATCH virtio 3/4] pds_vdpa: clean and reset vqs entries

2023-07-07 Thread Jason Wang
On Fri, Jun 30, 2023 at 8:36 AM Shannon Nelson wrote: > > Make sure that we initialize the vqs[] entries the same > way both for initial setup and after a vq reset. > > Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") > Signed-off-by: Shannon Nelson > Reviewed-by: Br

Re: [PATCH virtio 1/4] pds_vdpa: reset to vdpa specified mac

2023-07-07 Thread Jason Wang
On Fri, Jun 30, 2023 at 8:36 AM Shannon Nelson wrote: > > From: Allen Hubbe > > When the vdpa device is reset, also reinitialize it with the mac address > that was assigned when the device was added. > > Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") > Signed-off-b

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-06 Thread Jason Wang
On Thu, Jul 6, 2023 at 3:55 PM Jason Wang wrote: > > On Thu, Jul 6, 2023 at 3:06 PM Eugenio Perez Martin > wrote: > > > > On Thu, Jul 6, 2023 at 3:55 AM Jason Wang wrote: > > > > > > On Wed, Jul 5, 2023 at 4:41 PM Michael S. Tsirkin wrote: > > &

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-06 Thread Jason Wang
On Thu, Jul 6, 2023 at 3:06 PM Eugenio Perez Martin wrote: > > On Thu, Jul 6, 2023 at 3:55 AM Jason Wang wrote: > > > > On Wed, Jul 5, 2023 at 4:41 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Jul 05, 2023 at 03:49:58PM +0800, Jason Wang wrote: >

Re: [PATCH v3 3/3] vduse: Temporarily disable control queue features

2023-07-05 Thread Jason Wang
gt; > Some work is on-going to make the control queue > implementation robust with VDUSE. Until it is completed, > let's filter out control virtqueue and features that depend > on it by keeping only features known to be supported. > > Signed-off-by: Maxime Coquelin Acked-

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-05 Thread Jason Wang
On Wed, Jul 5, 2023 at 4:42 PM Michael S. Tsirkin wrote: > > On Wed, Jul 05, 2023 at 03:55:23PM +0800, Jason Wang wrote: > > On Tue, Jul 4, 2023 at 6:38 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 04, 2023 at 12:25:32PM +0200, Eugenio Perez Martin wrote: &g

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-05 Thread Jason Wang
On Wed, Jul 5, 2023 at 4:41 PM Michael S. Tsirkin wrote: > > On Wed, Jul 05, 2023 at 03:49:58PM +0800, Jason Wang wrote: > > On Tue, Jul 4, 2023 at 11:45 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 04, 2023 at 01:36:11PM +0200, Eugenio Perez Martin wrote:

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-05 Thread Jason Wang
On Tue, Jul 4, 2023 at 6:38 PM Michael S. Tsirkin wrote: > > On Tue, Jul 04, 2023 at 12:25:32PM +0200, Eugenio Perez Martin wrote: > > On Mon, Jul 3, 2023 at 4:52 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jul 03, 2023 at 04:22:18PM +0200, Eugenio Pérez wrote: > > > > With the current code

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-05 Thread Jason Wang
On Tue, Jul 4, 2023 at 11:45 PM Michael S. Tsirkin wrote: > > On Tue, Jul 04, 2023 at 01:36:11PM +0200, Eugenio Perez Martin wrote: > > On Tue, Jul 4, 2023 at 12:38 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 04, 2023 at 12:25:32PM +0200, Eugenio Perez Martin wrote: > > > > On Mon, Jul 3

Re: [PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK

2023-07-05 Thread Jason Wang
On Wed, Jul 5, 2023 at 2:16 PM Michael S. Tsirkin wrote: > > On Wed, Jul 05, 2023 at 01:47:44PM +0800, Jason Wang wrote: > > On Wed, Jul 5, 2023 at 1:31 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Jul 05, 2023 at 01:11:37PM +0800, Jason Wang wrote: > >

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-07-04 Thread Jason Wang
On Wed, Jul 5, 2023 at 1:41 PM Liang Chen wrote: > > On Fri, Jun 9, 2023 at 10:57 AM Liang Chen wrote: > > > > On Thu, Jun 8, 2023 at 8:38 AM Jason Wang wrote: > > > > > > On Thu, Jun 8, 2023 at 4:17 AM Michael S. Tsirkin wrote: > > > > > &g

Re: [PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK

2023-07-04 Thread Jason Wang
On Wed, Jul 5, 2023 at 1:31 PM Michael S. Tsirkin wrote: > > On Wed, Jul 05, 2023 at 01:11:37PM +0800, Jason Wang wrote: > > On Tue, Jul 4, 2023 at 6:16 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jul 03, 2023 at 05:26:02PM -0700, Si-Wei Liu wrote: > >

Re: [PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK

2023-07-04 Thread Jason Wang
On Tue, Jul 4, 2023 at 6:16 PM Michael S. Tsirkin wrote: > > On Mon, Jul 03, 2023 at 05:26:02PM -0700, Si-Wei Liu wrote: > > > > > > On 7/3/2023 8:46 AM, Michael S. Tsirkin wrote: > > > On Mon, Jul 03, 2023 at 04:25:14PM +0200, Eugenio Pérez wrote: > > > > Offer this backend feature as mlx5 is com

Re: [PATCH v1 0/2] vduse: add support for networking devices

2023-07-03 Thread Jason Wang
On Mon, Jul 3, 2023 at 3:43 PM Maxime Coquelin wrote: > > > On 7/3/23 08:44, Jason Wang wrote: > > On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin wrote: > >> > >> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote: > >>> This small s

Re: [PATCH v1 0/2] vduse: add support for networking devices

2023-07-02 Thread Jason Wang
st-vdpa using DPDK Vhost library series > > adding VDUSE support using split rings layout (merged in > > DPDK v23.07-rc1). > > > > Control queue support (and so multiqueue) has also been > > tested, but requires a Kernel series from Jason Wang > > relaxing control que

Re: [RFC 1/4] vduse: Add the struct to save the vq reconnect info

2023-07-02 Thread Jason Wang
On Sat, Jul 1, 2023 at 5:25 PM Cindy Lu wrote: > > On Wed, Jun 28, 2023 at 4:04 PM Jason Wang wrote: > > > > On Wed, Jun 28, 2023 at 2:59 PM Cindy Lu wrote: > > > > > > From: Your Name > > > > It looks to me your git is not properly config

Re: [PATCH] vp_vdpa: synchronize irq when free irq

2023-06-30 Thread Jason Wang
On Fri, Jun 30, 2023 at 10:37 AM Zhu Lingshan wrote: > > This commits synchronizes irqs when free them Need to explain why it is needed. > > Signed-off-by: Zhu Lingshan > Tested-by: Cindy Lu > --- > drivers/vdpa/virtio_pci/vp_vdpa.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/d

Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-06-28 Thread Jason Wang
On Wed, Jun 28, 2023 at 9:34 PM Michael S. Tsirkin wrote: > > On Wed, May 31, 2023 at 09:07:25AM +0800, Jason Wang wrote: > > On Mon, May 29, 2023 at 9:21 AM Jason Wang wrote: > > > > > > On Sun, May 28, 2023 at 7:39 PM Michael S. Tsirkin > > > wrote: >

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

2023-06-28 Thread Jason Wang
On Wed, Jun 28, 2023 at 3:00 PM Cindy Lu wrote: > > From: Your Name > > in VDUSE_VQ_GET_INFO, driver will sync the last_avail_idx > with reconnect info, I have olny test the split mode, so Typo, should be "only". > only use this here, will add more information later > > Signed-off-by: Cindy Lu

Re: [RFC 3/4] vduse: Add the function for get/free the mapp pages

2023-06-28 Thread Jason Wang
On Wed, Jun 28, 2023 at 2:59 PM Cindy Lu wrote: > > From: Your Name > > Add the function for get/free pages, ad this info > will saved in dev->reconnect_info I think this should be squashed to patch 2 otherwise it fixes a bug that is introduced in patch 2? > > Signed-off-by: Cindy Lu > --- >

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

2023-06-28 Thread Jason Wang
On Wed, Jun 28, 2023 at 2:59 PM Cindy Lu wrote: > > From: Your Name > > Add the operation for mmap, The user space APP will > use this function to map the pages to userspace Please be specific in the log. E.g why and what the main goal for this mmap. > > Signed-off-by: Cindy Lu > --- > driver

Re: [RFC 1/4] vduse: Add the struct to save the vq reconnect info

2023-06-28 Thread Jason Wang
On Wed, Jun 28, 2023 at 2:59 PM Cindy Lu wrote: > > From: Your Name It looks to me your git is not properly configured. > > this struct is to save the reconnect info struct, in this > struct saved the page info that alloc to save the > reconnect info > > Signed-off-by: Cindy Lu > --- > driver

Re: [PATCH vhost v10 03/10] virtio_ring: split: support add premapped buf

2023-06-27 Thread Jason Wang
On Wed, Jun 28, 2023 at 2:02 PM Xuan Zhuo wrote: > > On Wed, 28 Jun 2023 12:07:10 +0800, Jason Wang wrote: > > On Tue, Jun 27, 2023 at 5:05 PM Xuan Zhuo > > wrote: > > > > > > On Tue, 27 Jun 2023 16:03:26 +0800, Jason Wang > > > wrote: >

Re: [PATCH vhost v10 03/10] virtio_ring: split: support add premapped buf

2023-06-27 Thread Jason Wang
On Tue, Jun 27, 2023 at 5:05 PM Xuan Zhuo wrote: > > On Tue, 27 Jun 2023 16:03:26 +0800, Jason Wang wrote: > > On Fri, Jun 2, 2023 at 5:22 PM Xuan Zhuo wrote: > > > > > > If the vq is the premapped mode, use the sg_dma_address() directly. > &

Re: [PATCH v1 2/2] vduse: enable Virtio-net device type

2023-06-27 Thread Jason Wang
t; > Signed-off-by: Maxime Coquelin Acked-by: Jason Wang Thanks > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c > b/drivers/vdpa/vdpa_user/vduse_dev.c > index c1c2f4c711ae

Re: [PATCH v1 1/2] vduse: validate block features only with block devices

2023-06-27 Thread Jason Wang
type. > > Signed-off-by: Maxime Coquelin Acked-by: Jason Wang Thanks > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c > b/drivers/vdpa/vdpa_user/vduse_de

Re: [PATCH vhost v10 10/10] virtio_net: support dma premapped

2023-06-27 Thread Jason Wang
On Fri, Jun 2, 2023 at 5:22 PM Xuan Zhuo wrote: > > Introduce the module param "experiment_premapped" to enable the function > that the virtio-net do dma mapping. > > If that is true, the vq of virtio-net is under the premapped mode. > It just handle the sg with dma_address. And the driver must ge

Re: [PATCH vhost v10 05/10] virtio_ring: split-detach: support return dma info to driver

2023-06-27 Thread Jason Wang
On Fri, Jun 2, 2023 at 5:22 PM Xuan Zhuo wrote: > > Under the premapped mode, the driver needs to unmap the DMA address > after receiving the buffer. The virtio core records the DMA address, > so the driver needs a way to get the dma info from the virtio core. A second thought, can we simply offl

Re: [PATCH vhost v10 04/10] virtio_ring: packed: support add premapped buf

2023-06-27 Thread Jason Wang
On Fri, Jun 2, 2023 at 5:22 PM Xuan Zhuo wrote: > > If the vq is the premapped mode, use the sg_dma_address() directly. > > Signed-off-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c | 36 ++-- > 1 file changed, 26 insertions(+), 10 deletions(-) > > diff --git

Re: [PATCH vhost v10 03/10] virtio_ring: split: support add premapped buf

2023-06-27 Thread Jason Wang
On Fri, Jun 2, 2023 at 5:22 PM Xuan Zhuo wrote: > > If the vq is the premapped mode, use the sg_dma_address() directly. > > Signed-off-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c | 46 ++-- > 1 file changed, 28 insertions(+), 18 deletions(-) > > diff --git

Re: [PATCH vhost v10 02/10] virtio_ring: introduce virtqueue_set_premapped()

2023-06-27 Thread Jason Wang
On Fri, Jun 2, 2023 at 5:22 PM Xuan Zhuo wrote: > > This helper allows the driver change the dma mode to premapped mode. > Under the premapped mode, the virtio core do not do dma mapping > internally. > > This just work when the use_dma_api is true. If the use_dma_api is false, > the dma options i

Re: [PATCH vhost v10 01/10] virtio_ring: put mapping error check in vring_map_one_sg

2023-06-27 Thread Jason Wang
g_error to check the return value. simplifies subsequent >code > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > drivers/virtio/virtio_ring.c | 37 +--- > 1 file changed, 22 insertions(+), 15 deletions(-) > > diff --

Re: [PATCH v2] vdpa/vp_vdpa: Check queue number of vdpa device from add_config

2023-06-25 Thread Jason Wang
On Mon, Jun 26, 2023 at 11:02 AM Angus Chen wrote: > > > > > -Original Message- > > From: Jason Wang > > Sent: Monday, June 26, 2023 10:51 AM > > To: Angus Chen > > Cc: m...@redhat.com; virtualization@lists.linux-foundation.org; > > linux-k

Re: [PATCH v2] vdpa/vp_vdpa: Check queue number of vdpa device from add_config

2023-06-25 Thread Jason Wang
On Mon, Jun 26, 2023 at 10:42 AM Angus Chen wrote: > > > Hi,jason. > > -Original Message- > > From: Jason Wang > > Sent: Monday, June 26, 2023 10:30 AM > > To: Angus Chen > > Cc: m...@redhat.com; virtualization@lists.linux-foundation.org; > >

Re: [PATCH V2 1/3] vDPA/ifcvf: dynamic allocate vq data stores

2023-06-25 Thread Jason Wang
On Mon, Jun 26, 2023 at 10:38 AM Zhu, Lingshan wrote: > > > > On 6/26/2023 10:32 AM, Jason Wang wrote: > > On Mon, Jun 12, 2023 at 3:14 PM Zhu Lingshan wrote: > >> This commit dynamically allocates the data > >> stores for the virtqueues based on > >>

Re: [PATCH V2 3/3] vDPA/ifcvf: implement new accessors for vq_state

2023-06-25 Thread Jason Wang
On Mon, Jun 12, 2023 at 3:14 PM Zhu Lingshan wrote: > > This commit implements a better layout of the > live migration bar, therefore the accessors for virtqueue > state have been refactored. I guess the reason for F2000X is that it can report a #vq which is greater than IFCVF_MAX_QUEUES. If yes,

Re: [PATCH V2 2/3] vDPA/ifcvf: detect and report max allowed vq size

2023-06-25 Thread Jason Wang
On Mon, Jun 12, 2023 at 3:14 PM Zhu Lingshan wrote: > > Rather than a hardcode, this commit detects > and reports the max value of allowed size > of the virtqueues > > Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Thanks > --- > drivers/vdpa

Re: [PATCH V2 1/3] vDPA/ifcvf: dynamic allocate vq data stores

2023-06-25 Thread Jason Wang
On Mon, Jun 12, 2023 at 3:14 PM Zhu Lingshan wrote: > > This commit dynamically allocates the data > stores for the virtqueues based on > virtio_pci_common_cfg.num_queues. While at it, it's better to allocate vring_lm_cfg as well and drop IFCVF_MAX_QUEUES. Thanks > > Signed-off-by: Zhu Lingshan

Re: [PATCH v2] vdpa/vp_vdpa: Check queue number of vdpa device from add_config

2023-06-25 Thread Jason Wang
On Thu, Jun 8, 2023 at 5:02 PM Angus Chen wrote: > > When add virtio_pci vdpa device,check the vqs number of device cap > and max_vq_pairs from add_config. > Simply starting from failing if the provisioned #qp is not > equal to the one that hardware has. > > Signed-off-by: Angus Chen > --- > v1:

Re: [PATCH vhost v10 00/10] virtio core prepares for AF_XDP

2023-06-25 Thread Jason Wang
On Wed, Jun 21, 2023 at 2:43 PM Xuan Zhuo wrote: > > Hi Jason, > > Do you have plan to review this? Just came back from vacation, will do this next week. Thanks > > Thanks. > ___ Virtualization mailing list Virtualization@lists.linux-foundation.org h

Re: [PATCH v2] vduse: fix NULL pointer dereference

2023-06-25 Thread Jason Wang
virtio_device+0x11/0x20 > [ 4761.165543] device_release_driver_internal+0x19b/0x200 > [ 4761.170770] bus_remove_device+0xc2/0x130 > [ 4761.174782] device_del+0x158/0x3e0 > [ 4761.178276] ? __pfx_vdpa_name_match+0x10/0x10 [vdpa] > [ 4761.183336] device_unregister+0x13/0x60 > [ 4761.187260] vdpa

Re: [PATCH] vdpa/mlx5: Support interrupt bypassing

2023-06-08 Thread Jason Wang
t; > Signed-off-by: Eli Cohen > Signed-off-by: Saeed Mahameed Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 165 -- > drivers/vdpa/mlx5/net/mlx5_vnet.h | 15 +++ > 2 files changed, 171 insertions(+), 9 deletions(-) > &

Re: [PATCH v2] vdpa/vp_vdpa: Check queue number of vdpa device from add_config

2023-06-08 Thread Jason Wang
On Fri, Jun 9, 2023 at 3:45 AM Michael S. Tsirkin wrote: > > On Thu, Jun 08, 2023 at 05:01:24PM +0800, Angus Chen wrote: > > When add virtio_pci vdpa device,check the vqs number of device cap > > and max_vq_pairs from add_config. > > Simply starting from failing if the provisioned #qp is not > > e

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-08 Thread Jason Wang
On Thu, Jun 8, 2023 at 10:23 PM Michael S. Tsirkin wrote: > > On Thu, Jun 08, 2023 at 05:29:58PM +0800, Jason Wang wrote: > > On Thu, Jun 8, 2023 at 5:21 PM Stefano Garzarella > > wrote: > > > > > > On Thu, Jun 08, 2023 at 05:00:00PM +0800, Jason Wang wr

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-08 Thread Jason Wang
On Thu, Jun 8, 2023 at 5:21 PM Stefano Garzarella wrote: > > On Thu, Jun 08, 2023 at 05:00:00PM +0800, Jason Wang wrote: > >On Thu, Jun 8, 2023 at 4:00 PM Stefano Garzarella > >wrote: > >> > >> On Thu, Jun 08, 2023 at 03:46:00PM +0800, Jason Wang wrote: &g

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-08 Thread Jason Wang
On Thu, Jun 8, 2023 at 4:00 PM Stefano Garzarella wrote: > > On Thu, Jun 08, 2023 at 03:46:00PM +0800, Jason Wang wrote: > > [...] > > >> > > > > I have a question though, what if down the road there > >> > > > > is a new feature that ne

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-08 Thread Jason Wang
On Thu, Jun 8, 2023 at 2:03 PM Michael S. Tsirkin wrote: > > On Thu, Jun 08, 2023 at 08:42:15AM +0800, Jason Wang wrote: > > On Wed, Jun 7, 2023 at 5:43 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Jun 07, 2023 at 10:39:15AM +0200, Stefano Garzarella wrote: &g

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