Re: [PATCH 2/6] virtio: split: alloc indirect desc with extra

2022-01-09 Thread Xuan Zhuo
On Mon, 10 Jan 2022 15:41:27 +0800, Jason Wang wrote: > On Mon, Jan 10, 2022 at 3:24 PM Xuan Zhuo wrote: > > > > On Mon, 10 Jan 2022 14:43:39 +0800, Jason Wang wrote: > > > > > > 在 2022/1/7 下午2:33, Xuan Zhuo 写道: > > > > In the scenario where indirect is not used, each desc corresponds to an > >

Re: [PATCH 2/6] virtio: split: alloc indirect desc with extra

2022-01-09 Thread Jason Wang
On Mon, Jan 10, 2022 at 3:24 PM Xuan Zhuo wrote: > > On Mon, 10 Jan 2022 14:43:39 +0800, Jason Wang wrote: > > > > 在 2022/1/7 下午2:33, Xuan Zhuo 写道: > > > In the scenario where indirect is not used, each desc corresponds to an > > > extra, which is used to record information such as dma, flags, an

Re: [PATCH 6/6] virtio: add api virtio_dma_map() for advance dma

2022-01-09 Thread Xuan Zhuo
On Mon, 10 Jan 2022 02:12:23 -0500, Michael S. Tsirkin wrote: > On Fri, Jan 07, 2022 at 02:33:06PM +0800, Xuan Zhuo wrote: > > Added virtio_dma_map() to map DMA addresses for virtual memory in > > advance. The purpose of adding this function is to check > > vring_use_dma_api() for virtio dma opera

Re: [PATCH 4/6] virtio: split: virtqueue_add_split() support dma address

2022-01-09 Thread Xuan Zhuo
On Mon, 10 Jan 2022 14:45:42 +0800, Jason Wang wrote: > > 在 2022/1/7 下午2:33, Xuan Zhuo 写道: > > 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 compl

Re: [PATCH 2/6] virtio: split: alloc indirect desc with extra

2022-01-09 Thread Xuan Zhuo
On Mon, 10 Jan 2022 14:43:39 +0800, Jason Wang wrote: > > 在 2022/1/7 下午2:33, Xuan Zhuo 写道: > > In the scenario where indirect is not used, each desc corresponds to an > > extra, which is used to record information such as dma, flags, and > > next. > > > > In the scenario of using indirect, the ass

Re: [PATCH 6/6] virtio: add api virtio_dma_map() for advance dma

2022-01-09 Thread Michael S. Tsirkin
On Fri, Jan 07, 2022 at 02:33:06PM +0800, Xuan Zhuo wrote: > Added virtio_dma_map() to map DMA addresses for virtual memory in > advance. The purpose of adding this function is to check > vring_use_dma_api() for virtio dma operation and get vdev->dev.parent as > the parameter of dma_map_page(). >

Re: [PATCH v7 00/14] Allow for configuring max number of virtqueue pairs

2022-01-09 Thread Jason Wang
On Mon, Jan 10, 2022 at 3:04 PM Michael S. Tsirkin wrote: > > On Wed, Jan 05, 2022 at 01:46:32PM +0200, Eli Cohen wrote: > > Allow the user to configure the max number of virtqueue pairs for a vdpa > > instance. The user can then control the actual number of virtqueue pairs > > using ethtool. > >

Re: [PATCH v7 00/14] Allow for configuring max number of virtqueue pairs

2022-01-09 Thread Michael S. Tsirkin
On Wed, Jan 05, 2022 at 01:46:32PM +0200, Eli Cohen wrote: > Allow the user to configure the max number of virtqueue pairs for a vdpa > instance. The user can then control the actual number of virtqueue pairs > using ethtool. So I put a version of this in linux-next, but I had to squash in some bu

Re: [PATCH v7 07/14] vdpa/mlx5: Support configuring max data virtqueue

2022-01-09 Thread Michael S. Tsirkin
On Fri, Jan 07, 2022 at 05:43:15PM -0800, Si-Wei Liu wrote: > It's unfortunate. Don't know why this series got pulled into linux-next > prematurely. The code review is still on going and there were outstanding > comments that hadn't been addressed yet. Most patches got acked, and the merge window

Re: [PATCH 4/6] virtio: split: virtqueue_add_split() support dma address

2022-01-09 Thread Jason Wang
在 2022/1/7 下午2:33, Xuan Zhuo 写道: 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 support passing the DMA addre

Re: [PATCH 2/6] virtio: split: alloc indirect desc with extra

2022-01-09 Thread Jason Wang
在 2022/1/7 下午2:33, Xuan Zhuo 写道: In the scenario where indirect is not used, each desc corresponds to an extra, which is used to record information such as dma, flags, and next. In the scenario of using indirect, the assigned desc does not have the corresponding extra record dma information, an

Re: [PATCH 1/6] virtio: rename vring_unmap_state_packed() to vring_unmap_extra_packed()

2022-01-09 Thread Jason Wang
在 2022/1/7 下午2:33, Xuan Zhuo 写道: The actual parameter handled by vring_unmap_state_packed() is that vring_desc_extra, so this function should use "extra" instead of "state". Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 17 - 1 file

Re: [PATCH] virtio: Simplify DMA setting

2022-01-09 Thread Jason Wang
在 2022/1/8 下午3:08, Christophe JAILLET 写道: As stated in [1], dma_set_mask() with a 64-bit mask will never fail if dev->dma_mask is non-NULL. So, if it fails, the 32 bits case will also fail for the same reason. I'd expect to be more verbose here. E.g I see dma_supported() who has a brunch of

Re: [PATCH v7 03/14] vdpa: Sync calls set/get config/status with cf_mutex

2022-01-09 Thread Jason Wang
在 2022/1/8 上午9:23, Si-Wei Liu 写道: On 1/6/2022 9:08 PM, Jason Wang wrote: 在 2022/1/7 上午8:33, Si-Wei Liu 写道: On 1/5/2022 3:46 AM, Eli Cohen wrote: Add wrappers to get/set status and protect these operations with cf_mutex to serialize these operations with respect to get/set config operatio

Re: [PATCH] vdpa/mlx5: fix endian-ness for max vqs

2022-01-09 Thread Jason Wang
On Sun, Jan 9, 2022 at 2:00 AM Michael S. Tsirkin wrote: > > sparse warnings: (new ones prefixed by >>) > >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to > >> restricted __le16 > >> drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast from > >> restricted __virti

[PATCH 4/4] drivers/net/virtio_net: Added RSS hash report control.

2022-01-09 Thread Andrew Melnychenko
Now it's possible to control supported hashflows. Also added hashflow set/get callbacks. Also, disabling RXH_IP_SRC/DST for TCP would disable then for UDP. TCP and UDP supports only: ethtool -U eth0 rx-flow-hash tcp4 sd RXH_IP_SRC + RXH_IP_DST ethtool -U eth0 rx-flow-hash tcp4 sdfn RXH_IP_S

[PATCH 3/4] drivers/net/virtio_net: Added RSS hash report.

2022-01-09 Thread Andrew Melnychenko
Added features for RSS hash report. If hash is provided - it sets to skb. Added checks if rss and/or hash are enabled together. Signed-off-by: Andrew Melnychenko --- drivers/net/virtio_net.c | 56 ++-- 1 file changed, 48 insertions(+), 8 deletions(-) diff --g

[PATCH 2/4] drivers/net/virtio_net: Added basic RSS support.

2022-01-09 Thread Andrew Melnychenko
Added features for RSS. Added initialization, RXHASH feature and ethtool ops. By default RSS/RXHASH is disabled. Virtio RSS "IPv6 extensions" hashes disabled. Added ethtools ops to set key and indirection table. Signed-off-by: Andrew Melnychenko --- drivers/net/virtio_net.c | 194 +++

[PATCH 1/4] drivers/net/virtio_net: Fixed padded vheader to use v1 with hash.

2022-01-09 Thread Andrew Melnychenko
The header v1 provides additional info about RSS. Added changes to computing proper header length. In the next patches, the header may contain RSS hash info for the hash population. Signed-off-by: Andrew Melnychenko --- drivers/net/virtio_net.c | 13 - 1 file changed, 8 insertions(+)

[PATCH 0/4] RSS support for VirtioNet.

2022-01-09 Thread Andrew Melnychenko
Virtio-net supports "hardware" RSS with toeplitz key. Also, it allows receiving calculated hash in vheader that may be used with RPS. Added ethtools callbacks to manipulate RSS. Technically hash calculation may be set only for SRC+DST and SRC+DST+PORTSRC+PORTDST hashflows. The completely disabling

Re: [mst-vhost:vhost 30/44] drivers/vdpa/mlx5/net/mlx5_vnet.c:1247:23: sparse: sparse: cast to restricted __le16

2022-01-09 Thread Michael S. Tsirkin
On Sat, Jan 08, 2022 at 10:48:34PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost > head: 008842b2060c14544ff452483ffd2241d145c7b2 > commit: 7620d51af29aa1c5d32150db2ac4b6187ef8af3a [30/44] vdpa/mlx5: Support > configuring max data v