RE: [PATCH linux-next v2 00/14] vdpa: Enable user to set mac address, mtu

2021-04-07 Thread Parav Pandit
Hi Jason, > From: Jason Wang > Sent: Wednesday, April 7, 2021 12:59 PM > > > > Patch summary: > > Patch-1 fix kdoc style comments > > Patch-2 fix kdoc style comments > > Patch-3 introduced and use helpers for get/set config and features > > Patch-4 implement query device config layout > >

Re: [PATCH v6 08/10] vduse: Implement an MMU-based IOMMU driver

2021-04-07 Thread Jason Wang
在 2021/3/31 下午4:05, Xie Yongji 写道: This implements an MMU-based IOMMU driver to support mapping kernel dma buffer into userspace. The basic idea behind it is treating MMU (VA->PA) as IOMMU (IOVA->PA). The driver will set up MMU mapping instead of IOMMU mapping for the DMA transfer so that the

Re: [PATCH v6 07/10] vdpa: Support transferring virtual addressing during DMA mapping

2021-04-07 Thread Jason Wang
在 2021/3/31 下午4:05, Xie Yongji 写道: This patch introduces an attribute for vDPA device to indicate whether virtual address can be used. If vDPA device driver set it, vhost-vdpa bus driver will not pin user page and transfer userspace virtual address instead of physical address during DMA

Re: [External] Re: [RFC] vsock: add multiple transports support for dgram

2021-04-07 Thread Jiang Wang .
On Wed, Apr 7, 2021 at 2:51 AM Jorgen Hansen wrote: > > > > On 6 Apr 2021, at 20:31, Jiang Wang wrote: > > > > From: "jiang.wang" > > > > Currently, only VMCI supports dgram sockets. To supported > > nested VM use case, this patch removes transport_dgram and > > uses transport_g2h and

Re: [PATCH net] virtio_net: Do not pull payload in skb->head

2021-04-07 Thread Michael S. Tsirkin
On Fri, Apr 02, 2021 at 06:26:02AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > Xuan Zhuo reported that commit 3226b158e67c ("net: avoid 32 x truesize > under-estimation for tiny skbs") brought a ~10% performance drop. > > The reason for the performance drop was that GRO was forced > to

Re: [PATCH 1/3] virtio: update reset callback to return status

2021-04-07 Thread kernel test robot
Hi Max, I love your patch! Yet something to improve: [auto build test ERROR on vhost/linux-next] [also build test ERROR on linus/master v5.12-rc6 next-20210407] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base

Re: [PATCH net-next] virtio-net: page_to_skb() use build_skb when there's sufficient tailroom

2021-04-07 Thread Eric Dumazet
On 4/7/21 7:49 AM, Xuan Zhuo wrote: > In page_to_skb(), if we have enough tailroom to save skb_shared_info, we > can use build_skb to create skb directly. No need to alloc for > additional space. And it can save a 'frags slot', which is very friendly > to GRO. > > Here, if the payload of the

Re: [PATCH] fuse: Avoid potential use after free

2021-04-07 Thread Vivek Goyal
On Tue, Apr 06, 2021 at 06:53:32PM -0500, Aditya Pakki wrote: > In virtio_fs_get_tree, after fm is freed, it is again freed in case > s_root is NULL and virtio_fs_fill_super() returns an error. To avoid > a double free, set fm to NULL. > > Signed-off-by: Aditya Pakki > --- > fs/fuse/virtio_fs.c

Re: [RFC PATCH 04/18] virt/mshv: request version ioctl

2021-04-07 Thread Vitaly Kuznetsov
Wei Liu writes: > On Wed, Apr 07, 2021 at 09:38:21AM +0200, Vitaly Kuznetsov wrote: > >> One more though: it is probably a good idea to introduce selftests for >> /dev/mshv (similar to KVM's selftests in >> /tools/testing/selftests/kvm). Selftests don't really need a stable ABI >> as they live

Re: [PATCH 2/3] virito_pci: add timeout to reset device operation

2021-04-07 Thread Michael S. Tsirkin
On Wed, Apr 07, 2021 at 12:09:23PM +, Max Gurtovoy wrote: > According to the spec after writing 0 to device_status, the driver MUST > wait for a read of device_status to return 0 before reinitializing the > device. In case we have a device that won't return 0, the reset > operation will loop

Re: [PATCH 1/3] virtio: update reset callback to return status

2021-04-07 Thread Cornelia Huck
On Wed, 7 Apr 2021 12:09:22 + Max Gurtovoy wrote: > The reset device operation, usually is an operation that might fail from > various reasons. For example, the controller might be in a bad state and > can't answer to any request. Usually, the paravirt SW based virtio > devices always

Re: [PATCH linux-next v2 13/14] vdpa/mlx5: Fix suspend/resume index restoration

2021-04-07 Thread Michael S. Tsirkin
On Wed, Apr 07, 2021 at 01:16:12PM +0300, Eli Cohen wrote: > On Wed, Apr 07, 2021 at 03:25:00PM +0800, Jason Wang wrote: > > > > 在 2021/4/7 上午1:04, Parav Pandit 写道: > > > From: Eli Cohen > > > > > > When we suspend the VM, the VDPA interface will be reset. When the VM is > > > resumed again,

Re: [RFC] vsock: add multiple transports support for dgram

2021-04-07 Thread Jorgen Hansen
> On 6 Apr 2021, at 20:31, Jiang Wang wrote: > > From: "jiang.wang" > > Currently, only VMCI supports dgram sockets. To supported > nested VM use case, this patch removes transport_dgram and > uses transport_g2h and transport_h2g for dgram too. Could you provide some background for

Re: [PATCH net-next v3 8/8] virtio-net: free old xmit handle xsk

2021-04-07 Thread Jason Wang
在 2021/4/7 下午5:26, Xuan Zhuo 写道: + __free_old_xmit(sq, false, ); Let's use a separate patch for this kind of factoring. It is also possible to encounter xsk here, so it should not be a separate patch. Thanks. You can do the factoring first and add xsk stuffs on top. Thanks

Re: [PATCH net-next v3 7/8] virtio-net: poll tx call xsk zerocopy xmit

2021-04-07 Thread Jason Wang
在 2021/4/7 下午5:10, Xuan Zhuo 写道: On Tue, 6 Apr 2021 15:03:29 +0800, Jason Wang wrote: 在 2021/3/31 下午3:11, Xuan Zhuo 写道: poll tx call virtnet_xsk_run, then the data in the xsk tx queue will be continuously consumed by napi. Signed-off-by: Xuan Zhuo Reviewed-by: Dust Li I think we need

Re: [PATCH net-next v3 3/8] virtio-net: xsk zero copy xmit setup

2021-04-07 Thread Jason Wang
在 2021/4/7 下午3:27, Xuan Zhuo 写道: On Tue, 6 Apr 2021 12:27:14 +0800, Jason Wang wrote: 在 2021/3/31 下午3:11, Xuan Zhuo 写道: xsk is a high-performance packet receiving and sending technology. This patch implements the binding and unbinding operations of xsk and the virtio-net queue for xsk zero

Re: cleanup unused or almost unused IOMMU APIs and the FSL PAMU driver v3

2021-04-07 Thread Joerg Roedel
On Thu, Apr 01, 2021 at 05:52:36PM +0200, Christoph Hellwig wrote: > Diffstat: > arch/powerpc/include/asm/fsl_pamu_stash.h | 12 > drivers/gpu/drm/msm/adreno/adreno_gpu.c |5 > drivers/iommu/amd/iommu.c | 23 > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 75

Re: [RFC PATCH 04/18] virt/mshv: request version ioctl

2021-04-07 Thread Vitaly Kuznetsov
Nuno Das Neves writes: > On 3/5/2021 1:18 AM, Vitaly Kuznetsov wrote: >> Nuno Das Neves writes: >> >>> On 2/9/2021 5:11 AM, Vitaly Kuznetsov wrote: Nuno Das Neves writes: >> ... > + > +3.1 MSHV_REQUEST_VERSION > + > +:Type: /dev/mshv ioctl

Re: [PATCH linux-next v2 00/14] vdpa: Enable user to set mac address, mtu

2021-04-07 Thread Jason Wang
在 2021/4/7 上午1:04, Parav Pandit 写道: Currently user cannot set the mac address and mtu of the vdpa device. This patchset enables users to set the mac address and mtu of the vdpa device once the device is created. If a vendor driver supports such configuration user can set it otherwise user gets

RE: [PATCH linux-next v2 14/14] vdpa/mlx5: Fix wrong use of bit numbers

2021-04-07 Thread Parav Pandit
> From: Jason Wang > Sent: Wednesday, April 7, 2021 12:56 PM > > 在 2021/4/7 上午1:04, Parav Pandit 写道: > > From: Eli Cohen > > > > VIRTIO_F_VERSION_1 is a bit number. Use BIT_ULL() with mask > > conditionals. > > > > Also, in mlx5_vdpa_is_little_endian() use BIT_ULL for consistency with > >

Re: [PATCH linux-next v2 14/14] vdpa/mlx5: Fix wrong use of bit numbers

2021-04-07 Thread Jason Wang
在 2021/4/7 上午1:04, Parav Pandit 写道: From: Eli Cohen VIRTIO_F_VERSION_1 is a bit number. Use BIT_ULL() with mask conditionals. Also, in mlx5_vdpa_is_little_endian() use BIT_ULL for consistency with the rest of the code. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5

Re: [PATCH linux-next v2 13/14] vdpa/mlx5: Fix suspend/resume index restoration

2021-04-07 Thread Jason Wang
在 2021/4/7 上午1:04, Parav Pandit 写道: From: Eli Cohen When we suspend the VM, the VDPA interface will be reset. When the VM is resumed again, clear_virtqueues() will clear the available and used indices resulting in hardware virqtqueue objects becoming out of sync. We can avoid this function

Re: [PATCH linux-next v2 10/14] vdpa/mlx5: Support configuration of MAC

2021-04-07 Thread Jason Wang
在 2021/4/7 上午1:04, Parav Pandit 写道: From: Eli Cohen Add code to accept MAC configuration through vdpa tool. The MAC is written into the config struct and later can be retrieved through get_config(). Examples: 1. Configure MAC: $ vdpa dev config set vdpa0 mac 00:11:22:33:44:55 2. Show

Re: [PATCH linux-next v2 04/14] vdpa: Introduce query of device config layout

2021-04-07 Thread Jason Wang
在 2021/4/7 下午1:10, Parav Pandit 写道: From: Jason Wang Sent: Wednesday, April 7, 2021 9:26 AM [..] /** * struct vdpa_config_ops - operations for configuring a vDPA device. * Note: vDPA device drivers are required to implement all of the @@ -164,6 +200,10 @@ struct vdpa_iova_range