Re: [PATCH v3 13/17] virtio_pci: queue_reset: support VIRTIO_F_RING_RESET

2022-02-08 Thread Xuan Zhuo
On Wed, 9 Feb 2022 13:44:06 +0800, Jason Wang wrote: > On Tue, Feb 8, 2022 at 3:44 PM Xuan Zhuo wrote: > > > > On Tue, 8 Feb 2022 10:55:37 +0800, Jason Wang wrote: > > > On Mon, Feb 7, 2022 at 4:19 PM Xuan Zhuo > > > wrote: > > > > > > > > On Mon, 7 Feb 2022 14:57:13 +0800, Jason Wang > > >

Re: [PATCH v3 13/17] virtio_pci: queue_reset: support VIRTIO_F_RING_RESET

2022-02-08 Thread Jason Wang
On Tue, Feb 8, 2022 at 3:44 PM Xuan Zhuo wrote: > > On Tue, 8 Feb 2022 10:55:37 +0800, Jason Wang wrote: > > On Mon, Feb 7, 2022 at 4:19 PM Xuan Zhuo wrote: > > > > > > On Mon, 7 Feb 2022 14:57:13 +0800, Jason Wang wrote: > > > > > > > > 在 2022/1/26 下午3:35, Xuan Zhuo 写道: > > > > > This patch

Re: [RFC PATCH 0/5] TUN/VirtioNet USO features support.

2022-02-08 Thread Jason Wang
在 2022/2/8 下午9:09, Andrew Melnichenko 写道: Hi people, Can you please review this series? Are there any performance number to demonstrate the difference? Thanks On Wed, Jan 26, 2022 at 10:32 AM Yuri Benditovich wrote: On Wed, Jan 26, 2022 at 9:54 AM Xuan Zhuo wrote: On Tue, 25 Jan

Re: [PATCH v3 00/17] virtio pci support VIRTIO_F_RING_RESET

2022-02-08 Thread Jason Wang
On Tue, Feb 8, 2022 at 3:56 PM Xuan Zhuo wrote: > > On Tue, 08 Feb 2022 11:14:45 +0800, Xuan Zhuo > wrote: > > On Tue, 8 Feb 2022 10:59:48 +0800, Jason Wang wrote: > > > > > > 在 2022/2/7 下午2:02, Xuan Zhuo 写道: > > > > On Mon, 7 Feb 2022 11:39:36 +0800, Jason Wang > > > > wrote: > > > >> On

Re: [RFC PATCH 5/5] drivers/net/virtio_net.c: Added USO support.

2022-02-08 Thread Jason Wang
在 2022/1/25 下午4:47, Andrew Melnychenko 写道: Now, it possible to enable GSO_UDP_L4("tx-udp-segmentation") for VirtioNet. Signed-off-by: Andrew Melnychenko --- drivers/net/virtio_net.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git

Re: [RFC PATCH 4/5] linux/virtio_net.h: Added Support for GSO_UDP_L4 offload.

2022-02-08 Thread Jason Wang
在 2022/1/25 下午4:47, Andrew Melnychenko 写道: Now, it's possible to convert vnet packets from/to skb. I suggest to change the title to "net: support XXX offload in vnet header" Thanks Signed-off-by: Andrew Melnychenko --- include/linux/virtio_net.h | 11 +++ 1 file changed, 11

Re: [RFC PATCH 3/5] uapi/linux/virtio_net.h: Added USO types.

2022-02-08 Thread Jason Wang
在 2022/1/25 下午4:47, Andrew Melnychenko 写道: Added new GSO type for USO: VIRTIO_NET_HDR_GSO_UDP_L4. Feature VIRTIO_NET_F_HOST_USO allows to enable NETIF_F_GSO_UDP_L4. Separated VIRTIO_NET_F_GUEST_USO4 & VIRTIO_NET_F_GUEST_USO6 features required for Windows guests. Signed-off-by: Andrew

Re: [RFC PATCH 2/5] driver/net/tun: Added features for USO.

2022-02-08 Thread Jason Wang
在 2022/1/25 下午4:46, Andrew Melnychenko 写道: Added support for USO4 and USO6, also added code for new ioctl TUNGETSUPPORTEDOFFLOADS. For now, to "enable" USO, it's required to set both USO4 and USO6 simultaneously. USO enables NETIF_F_GSO_UDP_L4. Signed-off-by: Andrew Melnychenko ---

Re: [RFC PATCH 1/5] uapi/linux/if_tun.h: Added new ioctl for tun/tap.

2022-02-08 Thread Jason Wang
在 2022/1/25 下午4:46, Andrew Melnychenko 写道: Added TUNGETSUPPORTEDOFFLOADS that should allow to get bits of supported offloads. So we don't use dedicated ioctls in the past, instead, we just probing by checking the return value of TUNSETOFFLOADS. E.g qemu has the following codes: int

Re: one question about your patch "vhost: log dirty page correctly"

2022-02-08 Thread Jason Wang
Adding lists. On Wed, Feb 9, 2022 at 4:58 AM Michael S. Tsirkin wrote: > > On Tue, Feb 08, 2022 at 11:37:00AM -0800, Xingyu Li wrote: > > Hi Jason, > > > > Sorry to disturb you. I have a question about your Linux kernel > > patch-- 1981e4c9a97("vhost: log dirty page correctly"). I noted that the

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

2022-02-08 Thread Willem de Bruijn
On Tue, Feb 8, 2022 at 1:19 PM Andrew Melnychenko wrote: > > Now it's possible to control supported hashflows. > Added hashflow set/get callbacks. > Also, disabling RXH_IP_SRC/DST for TCP would disable then for UDP. I don't follow this comment. Can you elaborate? > TCP and UDP supports only: >

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

2022-02-08 Thread Willem de Bruijn
On Tue, Feb 8, 2022 at 1:19 PM Andrew Melnychenko wrote: > > 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 | 51

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

2022-02-08 Thread Willem de Bruijn
On Tue, Feb 8, 2022 at 1:19 PM Andrew Melnychenko wrote: > > 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. > >

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

2022-02-08 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 | 191

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

2022-02-08 Thread Andrew Melnychenko
Now it's possible to control supported hashflows. 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_SRC +

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

2022-02-08 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 | 51 ++-- 1 file changed, 44 insertions(+), 7 deletions(-) diff

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

2022-02-08 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 | 9 + 1 file changed, 5 insertions(+), 4

[PATCH v3 0/4] RSS support for VirtioNet.

2022-02-08 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

Re: [RFC PATCH 0/5] TUN/VirtioNet USO features support.

2022-02-08 Thread Andrew Melnichenko
Hi people, Can you please review this series? On Wed, Jan 26, 2022 at 10:32 AM Yuri Benditovich wrote: > > On Wed, Jan 26, 2022 at 9:54 AM Xuan Zhuo wrote: > > > > On Tue, 25 Jan 2022 10:46:57 +0200, Andrew Melnychenko > > wrote: > > > Added new offloads for TUN devices TUN_F_USO4 and

Re: [PATCH 06/31] vhost: Route guest->host notification through shadow virtqueue

2022-02-08 Thread Jason Wang
在 2022/1/31 下午7:33, Eugenio Perez Martin 写道: On Fri, Jan 28, 2022 at 7:57 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: At this moment no buffer forwarding will be performed in SVQ mode: Qemu just forward the guest's kicks to the device. This commit also set up SVQs in the

Re: [PATCH 04/31] vdpa: Add vhost_svq_set_svq_kick_fd

2022-02-08 Thread Jason Wang
在 2022/1/31 下午6:18, Eugenio Perez Martin 写道: On Fri, Jan 28, 2022 at 7:29 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: This function allows the vhost-vdpa backend to override kick_fd. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 1 +

Re: [PATCH 00/31] vDPA shadow virtqueue

2022-02-08 Thread Jason Wang
在 2022/1/31 下午5:15, Eugenio Perez Martin 写道: On Fri, Jan 28, 2022 at 7:02 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: This series enables shadow virtqueue (SVQ) for vhost-vdpa devices. This is intended as a new method of tracking the memory the devices touch during a

Re: [PATCH 28/31] vdpa: Expose VHOST_F_LOG_ALL on SVQ

2022-02-08 Thread Jason Wang
在 2022/2/1 下午7:45, Eugenio Perez Martin 写道: On Sun, Jan 30, 2022 at 7:50 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: SVQ is able to log the dirty bits by itself, so let's use it to not block migration. Also, ignore set and clear of VHOST_F_LOG_ALL on set_features if SVQ is

Re: [PATCH 23/31] vdpa: Add custom IOTLB translations to SVQ

2022-02-08 Thread Jason Wang
在 2022/2/1 上午3:11, Eugenio Perez Martin 写道: +return false; +} + +/* + * Map->iova chunk size is ignored. What to do if descriptor + * (addr, size) does not fit is delegated to the device. + */ I think we need at least check the size and fail

Re: [PATCH 22/31] vhost: Add VhostIOVATree

2022-02-08 Thread Jason Wang
在 2022/2/2 上午1:27, Eugenio Perez Martin 写道: On Sun, Jan 30, 2022 at 6:21 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: This tree is able to look for a translated address from an IOVA address. At first glance it is similar to util/iova-tree. However, SVQ working on devices with

Re: [PATCH 18/31] vhost: Shadow virtqueue buffers forwarding

2022-02-08 Thread Jason Wang
在 2022/2/1 下午7:25, Eugenio Perez Martin 写道: On Sun, Jan 30, 2022 at 7:47 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: @@ -272,6 +590,28 @@ void vhost_svq_set_svq_kick_fd(VhostShadowVirtqueue *svq, int svq_kick_fd) void vhost_svq_stop(VhostShadowVirtqueue *svq) {

Re: [PATCH 18/31] vhost: Shadow virtqueue buffers forwarding

2022-02-08 Thread Jason Wang
在 2022/2/2 上午1:08, Eugenio Perez Martin 写道: On Sun, Jan 30, 2022 at 5:43 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: Initial version of shadow virtqueue that actually forward buffers. There is no iommu support at the moment, and that will be addressed in future patches of