Re: [PATCH net v3] virtio_net: Fix error unwinding of XDP initialization

2023-05-09 Thread Jason Wang
在 2023/5/9 09:43, Xuan Zhuo 写道: On Mon, 8 May 2023 11:00:10 -0400, Feng Liu wrote: On 2023-05-07 p.m.9:45, Xuan Zhuo wrote: External email: Use caution opening links or attachments On Sat, 6 May 2023 08:08:02 -0400, Feng Liu wrote: On 2023-05-05 p.m.10:33, Xuan Zhuo wrote: External ema

Re: [PATCH] vdpa/snet: implement the resume vDPA callback

2023-05-11 Thread Jason Wang
On Tue, May 2, 2023 at 9:11 PM Alvaro Karsz wrote: > > The callback sends a resume command to the DPU through > the control mechanism. > > Signed-off-by: Alvaro Karsz Acked-by: Jason Wang Thanks > --- > drivers/vdpa/solidrun/snet_ctrl.c | 6 ++ > drivers/vdpa/s

Re: [PATCH v2] vhost_net: revert upend_idx only on retriable error

2023-05-11 Thread Jason Wang
ansmit. > > Signed-off-by: Andrey Smetanin Acked-by: Jason Wang Thanks > --- > drivers/vhost/net.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index 20265393aee7..0791fbdb3975 100644 &g

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

2023-05-14 Thread Jason Wang
On Wed, May 10, 2023 at 1:33 PM Michael S. Tsirkin wrote: > > On Mon, Apr 17, 2023 at 11:40:58AM +0800, Jason Wang wrote: > > On Fri, Apr 14, 2023 at 3:21 PM Michael S. Tsirkin wrote: > > > > > > On Fri, Apr 14, 2023 at 01:04:15PM +0800, Jason Wang wrote: >

Re: [PATCH net v6] virtio_net: Fix error unwinding of XDP initialization

2023-05-14 Thread Jason Wang
ion in virtnet_open. > > Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") > Signed-off-by: Feng Liu > Reviewed-by: Jiri Pirko > Reviewed-by: William Tu Acked-by: Jason Wang Thanks > --- > v5 -> v6 > feedbacks from Xuan Zhuo > - add disable_delayed_refil

Re: [PATCH vhost v8 01/12] virtio_ring: split: separate dma codes

2023-05-14 Thread Jason Wang
On Fri, May 12, 2023 at 11:27 PM Christoph Hellwig wrote: > > As said before, please don't try to do weird runtime checks based > on the scatterlist. What you have works for now, but there are > plans to repalce the page + offset tuple in the scatterlist with > just a phys_addr_t. And with that

Re: [PATCH v5 virtio 01/11] virtio: allow caller to override device id in vp_modern

2023-05-14 Thread Jason Wang
this is simply indenting the existing code into an else block. Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks --- drivers/virtio/virtio_pci_modern_dev.c | 30 -- include/linux/virtio_pci_modern.h | 3 +++ 2 files changed, 22 insertions(+), 11 d

Re: [PATCH v5 virtio 02/11] virtio: allow caller to override device DMA mask in vp_modern

2023-05-14 Thread Jason Wang
dma_set_mask_and_coherent() instead of the traditional DMA_BIT_MASK(64). This allows limiting the DMA space on vendor devices with address limitations. Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks --- drivers/virtio/virtio_pci_modern_dev.c | 3 ++- include/linux/virtio_pci_modern.h

Re: [PATCH v5 virtio 04/11] pds_vdpa: move enum from common to adminq header

2023-05-14 Thread Jason Wang
which patchset gets pulled first. Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks --- include/linux/pds/pds_adminq.h | 21 + include/linux/pds/pds_common.h | 21 - 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include

Re: [PATCH v5 virtio 05/11] pds_vdpa: new adminq entries

2023-05-14 Thread Jason Wang
On Thu, May 4, 2023 at 2:13 AM Shannon Nelson wrote: > > Add new adminq definitions in support for vDPA operations. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > include/linux/pds/pds_adminq.h | 266 + > 1 file ch

Re: [PATCH v5 virtio 07/11] pds_vdpa: virtio bar setup for vdpa

2023-05-14 Thread Jason Wang
On Thu, May 4, 2023 at 2:13 AM Shannon Nelson wrote: > > Prep and use the "modern" virtio bar utilities to get our > virtio config space ready. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > drivers/vdpa/pds/aux_drv.c | 25 ++

Re: [PATCH v5 virtio 10/11] pds_vdpa: subscribe to the pds_core events

2023-05-14 Thread Jason Wang
On Thu, May 4, 2023 at 2:13 AM Shannon Nelson wrote: > > Register for the pds_core's notification events, primarily to > find out when the FW has been reset so we can pass this on > back up the chain. > > Signed-off-by: Shannon Nelson > --- > drivers/vdpa/pds/vdpa_dev.c | 68

Re: [PATCH v5 virtio 08/11] pds_vdpa: add vdpa config client commands

2023-05-14 Thread Jason Wang
w of these commands > for vDPA support. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > drivers/vdpa/pds/Makefile | 1 + > drivers/vdpa/pds/cmds.c | 207 > drivers/vdpa/pds/cmds.h | 20 > dr

Re: [PATCH v5 virtio 09/11] pds_vdpa: add support for vdpa and vdpamgmt interfaces

2023-05-14 Thread Jason Wang
On Thu, May 4, 2023 at 2:13 AM Shannon Nelson wrote: > > This is the vDPA device support, where we advertise that we can > support the virtio queues and deal with the configuration work > through the pds_core's adminq. > > Signed-off-by: Shannon Nelson Acked-

Re: [PATCH v5 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig

2023-05-14 Thread Jason Wang
On Thu, May 4, 2023 at 2:13 AM Shannon Nelson wrote: > > Add the documentation and Kconfig entry for pds_vdpa driver. > > Signed-off-by: Shannon Nelson > --- > .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++ > .../device_drivers/ethernet/index.rst | 1 + > MAINTA

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

2023-05-14 Thread Jason Wang
On Mon, May 15, 2023 at 12:45 PM Michael S. Tsirkin wrote: > > On Mon, May 15, 2023 at 09:05:54AM +0800, Jason Wang wrote: > > On Wed, May 10, 2023 at 1:33 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Apr 17, 2023 at 11:40:58AM +0800, Jason Wang wrote: > >

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

2023-05-15 Thread Jason Wang
On Mon, May 15, 2023 at 6:17 PM Michael S. Tsirkin wrote: > > On Mon, May 15, 2023 at 01:13:33PM +0800, Jason Wang wrote: > > On Mon, May 15, 2023 at 12:45 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 15, 2023 at 09:05:54AM +0800, Jason Wang wrote: > >

Re: [PATCH v6 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig

2023-05-15 Thread Jason Wang
On Tue, May 16, 2023 at 10:56 AM Shannon Nelson wrote: > > Add the documentation and Kconfig entry for pds_vdpa driver. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++ > .../de

Re: [PATCH v6 virtio 10/11] pds_vdpa: subscribe to the pds_core events

2023-05-15 Thread Jason Wang
On Tue, May 16, 2023 at 10:56 AM Shannon Nelson wrote: > > Register for the pds_core's notification events, primarily to > find out when the FW has been reset so we can pass this on > back up the chain. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks &g

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

2023-05-15 Thread Jason Wang
On Tue, May 16, 2023 at 12:13 PM Michael S. Tsirkin wrote: > > On Tue, May 16, 2023 at 10:44:45AM +0800, Jason Wang wrote: > > On Mon, May 15, 2023 at 6:17 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 15, 2023 at 01:13:33PM +0800, Jason Wang wrote: >

Re: [PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command

2023-05-16 Thread Jason Wang
On Wed, May 17, 2023 at 4:54 AM Michael S. Tsirkin wrote: > > On Thu, Apr 13, 2023 at 02:40:27PM +0800, Jason Wang wrote: > > We used to busy waiting on the cvq command this tends to be > > problematic since there no way for to schedule another process which > > m

Re: [PATCH 13/14] vhost: allow userspace to create workers

2023-05-16 Thread Jason Wang
On Sat, Apr 29, 2023 at 12:32 AM Mike Christie wrote: > > For vhost-scsi with 3 vqs or more and a workload that tries to use > them in parallel like: > > fio --filename=/dev/sdb --direct=1 --rw=randrw --bs=4k \ > --ioengine=libaio --iodepth=128 --numjobs=3 > > the single vhost worker thread will

Re: [PATCH v1] virtio_pci: Optimize virtio_pci_device structure size

2023-05-16 Thread Jason Wang
ze: 1024, cachelines: 16, members: 18 */ > [...] > }; > > Signed-off-by: Feng Liu > Reviewed-by: Jiri Pirko Acked-by: Jason Wang Thanks > --- > drivers/virtio/virtio_pci_common.h | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git

Re: [PATCH] vdpa/mlx5: Fix hang when cvq commands are triggered during device unregister

2023-05-16 Thread Jason Wang
is expected that vhost will not trigger kicks after > the unregister. But even if it would, the wq is disabled already by > setting the pointer to NULL (done so in the referenced commit). > > Fixes: ad6dc1daaf29 ("vdpa/mlx5: Avoid processing works if workqueue was > destroyed&

Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

2023-05-16 Thread Jason Wang
On Wed, May 17, 2023 at 2:26 AM Shannon Nelson wrote: > > On 5/16/23 12:49 AM, Stefano Garzarella wrote: > > On Mon, May 15, 2023 at 01:41:12PM -0700, Shannon Nelson wrote: > >> On 5/9/23 1:46 AM, Stefano Garzarella wrote: > >>> On Mon, Apr 24, 2023 at 03:50:30PM -0700, Shannon Nelson via > >>> Vi

Re: [PATCH] vdpa: consume device_features parameter

2023-05-16 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 Acked-by: Jason Wang Thanks > --- > vdpa/vdpa.c | 2 ++ > 1 file ch

Re: [RESEND PATCH] vdpa: solidrun: constify pointers to hwmon_channel_info

2023-05-16 Thread Jason Wang
On Fri, May 12, 2023 at 1:54 AM Krzysztof Kozlowski wrote: > > Statically allocated array of pointers to hwmon_channel_info can be made > const for safety. > > Acked-by: Michael S. Tsirkin > Reviewed-by: Alvaro Karsz > Signed-off-by: Krzysztof Kozlowski Acked-by

Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 3:00 PM Stefano Garzarella wrote: > > On Wed, May 17, 2023 at 7:26 AM Jason Wang wrote: > > > > On Wed, May 17, 2023 at 2:26 AM Shannon Nelson > > wrote: > > > > > > On 5/16/23 12:49 AM, Stefano Garzarella wrote: > > >

Re: [PATCH vhost v9 01/12] virtio_ring: put mapping error check in vring_map_one_sg

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 10:23 AM Xuan Zhuo wrote: > > This patch put the dma addr error check in vring_map_one_sg(). > > The benefits of doing this: > > 1. make vring_map_one_sg more simple, without calling >vring_mapping_error to check the return value. > 2. reduce one judgment of vq->use_dma

Re: [PATCH vhost v9 02/12] virtio_ring: simplify the reference of desc state inside detach_buf_split()

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 10:23 AM Xuan Zhuo wrote: > > The purpose of this is to simplify the reference to state. It is > convenient for subsequent commit. It's better to be verbose, e.g how it can simplify the following patches. Thanks > > Signed-off-by: Xuan Zhuo > --- > drivers/virtio/virt

Re: [PATCH vhost v9 03/12] virtio_ring: check use_dma_api before unmap desc for indirect

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 10:23 AM Xuan Zhuo wrote: > > Inside detach_buf_split(), if use_dma_api is false, > vring_unmap_one_split_indirect will be called many times, but actually > nothing is done. So this patch check use_dma_api firstly. > > Signed-off-by: Xuan Zhuo Ac

Re: [PATCH vhost v9 04/12] virtio_ring: virtqueue_add() support premapped

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 10:23 AM Xuan Zhuo wrote: > > virtuque_add() adds parameter premapped. I wonder if this patch is over simplified. Maybe it can be squashed with the patch that implements the premapped logic. Thanks > > Signed-off-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c | 9

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 10:23 AM Xuan Zhuo wrote: > > virtqueue_add_split() only supports virtual addresses, dma is completed > in virtqueue_add_split(). > > In some scenarios (such as the AF_XDP scenario), the memory is allocated > and DMA is completed in advance, so it is necessary for us to sup

Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

2023-05-18 Thread Jason Wang
On Thu, May 18, 2023 at 3:34 PM Stefano Garzarella wrote: > > On Thu, May 18, 2023 at 7:24 AM Jason Wang wrote: > > > > On Wed, May 17, 2023 at 3:00 PM Stefano Garzarella > > wrote: > > > > > > On Wed, May 17, 2023 at 7:26 AM Jason Wang wrote: >

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Jason Wang
On Thu, May 18, 2023 at 3:41 PM Xuan Zhuo wrote: > > On Thu, 18 May 2023 03:11:25 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, May 18, 2023 at 02:51:57PM +0800, Jason Wang wrote: > > > On Wed, May 17, 2023 at 10:23 AM Xuan Zhuo > > > wrote:

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Jason Wang
On Thu, May 18, 2023 at 4:29 PM Michael S. Tsirkin wrote: > > On Thu, May 18, 2023 at 03:33:52PM +0800, Xuan Zhuo wrote: > > On Thu, 18 May 2023 03:11:25 -0400, "Michael S. Tsirkin" > > wrote: > > > On Thu, May 18, 2023 at 02:51:57PM +0800, Jason Wang wrot

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Jason Wang
On Thu, May 18, 2023 at 3:57 PM Xuan Zhuo wrote: > > On Thu, 18 May 2023 15:54:09 +0800, Jason Wang wrote: > > On Thu, May 18, 2023 at 3:41 PM Xuan Zhuo > > wrote: > > > > > > On Thu, 18 May 2023 03:11:25 -0400, "Michael S. Tsirkin" > >

Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

2023-05-18 Thread Jason Wang
On Thu, May 18, 2023 at 4:38 PM Michael S. Tsirkin wrote: > > On Thu, May 18, 2023 at 03:52:10PM +0800, Jason Wang wrote: > > On Thu, May 18, 2023 at 3:34 PM Stefano Garzarella > > wrote: > > > > > > On Thu, May 18, 2023 at 7:24 AM Jason Wang wrote: >

Re: [RFC PATCH v2 3/3] PCI: endpoint: Add EP function driver to provide virtio-console functionality

2023-05-18 Thread Jason Wang
On Thu, May 18, 2023 at 5:54 PM Shunsuke Mie wrote: > > Gentle ping ... > > > Thanks, > > Shunsuke. > > On 2023/05/10 12:17, Shunsuke Mie wrote: > > Hi Json, > > 2023年5月8日(月) 13:03 Jason Wang : > >> On Thu, Apr 27, 2023 at 6:44 PM Shunsuke Mie wrot

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Jason Wang
在 2023/5/18 17:49, Michael S. Tsirkin 写道: On Thu, May 18, 2023 at 05:14:03PM +0800, Xuan Zhuo wrote: On Thu, 18 May 2023 16:57:37 +0800, Jason Wang wrote: On Thu, May 18, 2023 at 4:29 PM Michael S. Tsirkin wrote: On Thu, May 18, 2023 at 03:33:52PM +0800, Xuan Zhuo wrote: On Thu, 18 May

Re: [PATCH vhost v9 05/12] virtio_ring: split: virtqueue_add_split() support premapped

2023-05-18 Thread Jason Wang
> > wrote: > > > > On Thu, May 18, 2023 at 05:14:03PM +0800, Xuan Zhuo wrote: > > > > > On Thu, 18 May 2023 16:57:37 +0800, Jason Wang > > > > > wrote: > > > > > > On Thu, May 18, 2023 at 4:29 PM Michael S. Tsirkin > > &g

Re: [PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions

2023-05-23 Thread Jason Wang
On Mon, May 8, 2023 at 6:05 PM Zhu Lingshan wrote: > > In this commit, virtqueue operations including: > set_vq_num(), set_vq_address(), set_vq_ready() > and get_vq_ready() access PCI registers directly > to take immediate actions. > > Signed-off-by: Zhu Lingshan Acked-by

Re: [PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers

2023-05-23 Thread Jason Wang
et_features() > is renamed to ifcvf_get_dev_features() which returns > the provisioned vDPA device features. > > Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Thanks > --- > drivers/vdpa/ifcvf/ifcvf_base.c | 38 + > drivers/vdpa/ifcvf/ifcvf_

Re: [PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine

2023-05-24 Thread Jason Wang
On Mon, May 8, 2023 at 6:05 PM Zhu Lingshan wrote: > > This commit synchronize irqs of the virtqueues > and config space in the reset routine. > Thus ifcvf_stop_hw() and reset() are refactored as well. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/ifcvf/ifcvf_base.c | 41 +

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

2023-05-24 Thread Jason Wang
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(+), 4

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

2023-05-24 Thread Jason Wang
This patch convert rx mode setting to be done in a workqueue, this is a must for allow to sleep when waiting for the cvq command to response since current code is executed under addr spin lock. Signed-off-by: Jason Wang --- Changes since V1: - use RTNL to synchronize rx mode worker --- drivers

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

2023-05-24 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

Re: [PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine

2023-05-24 Thread Jason Wang
On Wed, May 24, 2023 at 4:03 PM Jason Wang wrote: > > On Mon, May 8, 2023 at 6:05 PM Zhu Lingshan wrote: > > > > This commit synchronize irqs of the virtqueues > > and config space in the reset routine. > > Thus ifcvf_stop_hw() and reset() are refactored as we

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

2023-05-24 Thread Jason Wang
On Wed, May 24, 2023 at 5:15 PM Michael S. Tsirkin wrote: > > On Wed, May 24, 2023 at 04:18:41PM +0800, Jason Wang wrote: > > This patch convert rx mode setting to be done in a workqueue, this is > > a must for allow to sleep when waiting for the cvq command to > > respon

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

2023-05-25 Thread Jason Wang
On Thu, May 25, 2023 at 3:41 PM Michael S. Tsirkin wrote: > > On Thu, May 25, 2023 at 11:43:34AM +0800, Jason Wang wrote: > > On Wed, May 24, 2023 at 5:15 PM Michael S. Tsirkin wrote: > > > > > > On Wed, May 24, 2023 at 04:18:41PM +0800, Jason Wang wrote: >

Re: [PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine

2023-05-25 Thread Jason Wang
On Thu, May 25, 2023 at 5:38 PM Zhu, Lingshan wrote: > > > > On 5/24/2023 4:03 PM, Jason Wang wrote: > > On Mon, May 8, 2023 at 6:05 PM Zhu Lingshan wrote: > >> This commit synchronize irqs of the virtqueues > >> and config space in the reset routine. >

Re: [PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine

2023-05-25 Thread Jason Wang
On Fri, May 26, 2023 at 1:30 PM Zhu, Lingshan wrote: > > > > On 5/26/2023 11:36 AM, Zhu, Lingshan wrote: > > > > > > On 5/26/2023 9:34 AM, Jason Wang wrote: > >> On Thu, May 25, 2023 at 5:38 PM Zhu, Lingshan > >> wrote: > >>> > >&

[PATCH] virtio_ring: validate used buffer length

2023-05-25 Thread Jason Wang
is greater than we stored before. This validation is disable by default via module parameter to unbreak some existing devices since some legacy devices are known to report buggy used length. Signed-off-by: Jason Wang --- Changes since V4: - drop the flat for driver to suppress the check

Re: [PATCH net-next 1/5] virtio_net: Fix an unsafe reference to the page chain

2023-05-25 Thread Jason Wang
On Fri, May 26, 2023 at 1:46 PM Liang Chen wrote: > > "private" of buffer page is currently used for big mode to chain pages. > But in mergeable mode, that offset of page could mean something else, > e.g. when page_pool page is used instead. So excluding mergeable mode to > avoid such a problem.

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

2023-05-25 Thread Jason Wang
On Fri, May 26, 2023 at 1:46 PM Liang Chen wrote: > > The implementation at the moment uses one page per packet in both the > normal and XDP path. It's better to explain why we need a page pool and how it can help the performance. > In addition, introducing a module parameter to enable > or disa

Re: [PATCH net-next 4/5] virtio_ring: Introduce DMA pre-handler

2023-05-25 Thread Jason Wang
On Fri, May 26, 2023 at 1:47 PM Liang Chen wrote: > > Currently, DMA operations of virtio devices' data buffer are encapsulated > within the underlying virtqueue implementation. DMA map/unmap operations > are performed for each data buffer attached to/detached from the virtqueue, > which is transp

Re: [PATCH net-next 5/5] virtio_net: Implement DMA pre-handler

2023-05-26 Thread Jason Wang
On Fri, May 26, 2023 at 1:47 PM Liang Chen wrote: > > Adding a DMA pre-handler that utilizes page pool for managing DMA mappings. > When IOMMU is enabled, turning on the page_pool_dma_map module parameter to > select page pool for DMA mapping management gives a significant reduction > in the overh

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-28 Thread Jason Wang
On Sun, May 28, 2023 at 3:57 PM Michael S. Tsirkin wrote: > > On Fri, May 26, 2023 at 02:30:41PM +0800, Jason Wang wrote: > > This patch validate > > validates > > > the used buffer length provided by the device > > before trying to use it. > > before retur

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

2023-05-28 Thread Jason Wang
On Sun, May 28, 2023 at 7:39 PM Michael S. Tsirkin wrote: > > On Fri, May 26, 2023 at 09:31:34AM +0800, Jason Wang wrote: > > On Thu, May 25, 2023 at 3:41 PM Michael S. Tsirkin wrote: > > > > > > On Thu, May 25, 2023 at 11:43:34AM +0800, Jason Wang wrote: > >

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-30 Thread Jason Wang
On Mon, May 29, 2023 at 6:03 PM Michael S. Tsirkin wrote: > > On Mon, May 29, 2023 at 09:18:10AM +0800, Jason Wang wrote: > > On Sun, May 28, 2023 at 3:57 PM Michael S. Tsirkin wrote: > > > > > > On Fri, May 26, 2023 at 02:30:41PM +0800, Jason Wang wrot

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

2023-05-30 Thread Jason Wang
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: > > > > On Fri, May 26, 2023 at 09:31:34AM +0800, Jason Wang wrote: > > > On Thu, May 25, 2023 at 3:41 PM Michael S. Tsirkin > > > wrote: > &

Re: [PATCH v7 virtio 09/11] pds_vdpa: add support for vdpa and vdpamgmt interfaces

2023-05-30 Thread Jason Wang
; Note: this had previously been Acked-by Jason Wang, but changed enough > in v6 that I felt it needs a new Ack. Acked-by: Jason Wang Thanks > > drivers/vdpa/pds/aux_drv.c | 15 + > drivers/vdpa/pds/aux_drv.h | 1 + > drivers/vdpa/pds/debugfs.c | 263 &g

Re: [PATCH] vduse: avoid empty string for dev name

2023-05-30 Thread Jason Wang
t; do_syscall_64+0x94/0x330 linux/src/arch/x86/entry/common.c:291 > entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > Reported-by: Xianjun Zeng > Signed-off-by: Sheng Zhao Acked-by: Jason Wang Thanks > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 3 +++ > 1 file changed, 3 insertions(+) >

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-30 Thread Jason Wang
在 2023/5/23 23:57, Eric W. Biederman 写道: Oleg Nesterov writes: On 05/22, Oleg Nesterov wrote: Right now I think that "int dead" should die, No, probably we shouldn't call get_signal() if we have already dequeued SIGKILL. Very much agreed. It is one thing to add a patch to move do_exit out

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-30 Thread Jason Wang
在 2023/5/23 20:15, Oleg Nesterov 写道: On 05/22, Oleg Nesterov wrote: Right now I think that "int dead" should die, No, probably we shouldn't call get_signal() if we have already dequeued SIGKILL. but let me think tomorrow. May be something like this... I don't like it but I can't suggest any

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Jason Wang
On Wed, May 31, 2023 at 1:50 PM Michael S. Tsirkin wrote: > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > > On Mon, May 29, 2023 at 6:03 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 29, 2023 at 09:18:10AM +0800, Jason Wang wrote: > >

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-31 Thread Jason Wang
On Wed, May 31, 2023 at 3:25 PM Oleg Nesterov wrote: > > On 05/31, Jason Wang wrote: > > > > 在 2023/5/23 20:15, Oleg Nesterov 写道: > > > > > > /* make sure flag is seen after deletion */ > > > smp_wmb(); > > >

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Jason Wang
On Wed, May 31, 2023 at 3:36 PM Jason Wang wrote: > > On Wed, May 31, 2023 at 1:50 PM Michael S. Tsirkin wrote: > > > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > > > On Mon, May 29, 2023 at 6:03 PM Michael S. Tsirkin > > > wrote: > &

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Jason Wang
On Wed, May 31, 2023 at 5:55 PM Michael S. Tsirkin wrote: > > On Wed, May 31, 2023 at 03:36:51PM +0800, Jason Wang wrote: > > On Wed, May 31, 2023 at 1:50 PM Michael S. Tsirkin wrote: > > > > > > On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > >

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-31 Thread Jason Wang
On Wed, May 31, 2023 at 6:25 PM Michael S. Tsirkin wrote: > > On Wed, May 31, 2023 at 04:26:38PM +0800, Jason Wang wrote: > > On Wed, May 31, 2023 at 3:36 PM Jason Wang wrote: > > > > > > On Wed, May 31, 2023 at 1:50 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-31 Thread Jason Wang
On Wed, May 31, 2023 at 5:14 PM Oleg Nesterov wrote: > > On 05/31, Jason Wang wrote: > > > > On Wed, May 31, 2023 at 3:25 PM Oleg Nesterov wrote: > > > > > > On 05/31, Jason Wang wrote: > > > > > > > > 在 2023/5/23 20:15, Oleg Nesterov 写

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-01 Thread Jason Wang
On Thu, Jun 1, 2023 at 3:43 PM Oleg Nesterov wrote: > > On 06/01, Jason Wang wrote: > > > > On Wed, May 31, 2023 at 5:14 PM Oleg Nesterov wrote: > > > > > > > > I don't understand you. OK, to simplify, suppose we have 2 global vars > > &

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

2023-06-04 Thread Jason Wang
On Fri, Jun 2, 2023 at 3:35 PM Angus Chen wrote: > > When add virtio_pci vdpa device,check the vqs number of device cap > and max_vq_pairs from add_config. > > Signed-off-by: Angus Chen > --- > drivers/vdpa/virtio_pci/vp_vdpa.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-)

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

2023-06-05 Thread Jason Wang
On Mon, Jun 5, 2023 at 10:58 PM Stefano Garzarella wrote: > > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote: > >On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote: > >> On Mon, Jun 05, 2023 at 09:00:25AM -0400, Michael S. Tsirkin wrote: > >> > On Mon, Jun 05, 2

Re: [PATCH net] virtio_net: use control_buf for coalesce params

2023-06-05 Thread Jason Wang
scing support") > Reviewed-by: Shannon Nelson > Signed-off-by: Allen Hubbe > Signed-off-by: Brett Creeley > --- > drivers/net/virtio_net.c | 16 ++++---- The patch is needed for -stable I think. Acked-by: Jason Wang Thanks > 1 file changed, 8 insertions(+), 8

Re: [RFC PATCH net] virtio_net: Prevent napi_weight changes with VIRTIO_NET_F_NOTF_COAL support

2023-06-05 Thread Jason Wang
On Tue, Jun 6, 2023 at 5:03 AM Brett Creeley wrote: > > Commit 699b045a8e43 ("net: virtio_net: notifications coalescing > support") added support for VIRTIO_NET_F_NOTF_COAL. The get_coalesce > call made changes to report "1" in tx_max_coalesced_frames if > VIRTIO_NET_F_NOTF_COAL is not supported a

Re: [RFC PATCH net] virtio_net: Prevent napi_weight changes with VIRTIO_NET_F_NOTF_COAL support

2023-06-05 Thread Jason Wang
On Tue, Jun 6, 2023 at 9:57 AM Xuan Zhuo wrote: > > On Mon, 5 Jun 2023 14:02:36 -0700, Brett Creeley > wrote: > > Commit 699b045a8e43 ("net: virtio_net: notifications coalescing > > support") added support for VIRTIO_NET_F_NOTF_COAL. The get_coalesce > > call made changes to report "1" in tx_max

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

2023-06-06 Thread Jason Wang
On Tue, Jun 6, 2023 at 2:19 PM Angus Chen wrote: > > Hi,Jason. > > > -Original Message- > > From: Jason Wang > > Sent: Monday, June 5, 2023 2:54 PM > > To: Angus Chen > > Cc: m...@redhat.com; virtualization@lists.linux-foundation.org; > >

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

2023-06-07 Thread Jason Wang
On Thu, Jun 8, 2023 at 4:17 AM Michael S. Tsirkin wrote: > > On Wed, Jun 07, 2023 at 05:08:59PM +0800, Liang Chen wrote: > > On Tue, May 30, 2023 at 9:19 AM Liang Chen > > wrote: > > > > > > On Mon, May 29, 2023 at 5:55 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, May 29, 2023 at

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

2023-06-07 Thread Jason Wang
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: > > On Tue, Jun 6, 2023 at 2:58 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jun 06, 2023 at 09:29:22AM +0800, Jason Wang wrote: >

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

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 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 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 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] 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] 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 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] 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 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 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 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 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] 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] 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 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 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 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 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 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

  1   2   3   4   5   6   7   8   9   10   >