Re: [PATCH 4/4] tun: indicate support for USO feature

2021-05-13 Thread Yuri Benditovich
On Thu, May 13, 2021 at 11:43 PM Willem de Bruijn wrote: > > > > > > > So the question is what to do now: > > > > > > A) > > > > > > Finalize patches for guest TX and respective QEMU patches > > > > > > Prepare RFC patches for guest RX, get ack on them > > > > > > Change the spec > > > > > >

Re: Re: [RFC v2] virtio-vsock: add description for datagram type

2021-05-13 Thread Jiang Wang .
On Mon, May 10, 2021 at 7:52 AM Stefano Garzarella wrote: > > On Fri, May 07, 2021 at 09:53:19AM -0700, Jiang Wang . wrote: > >Hi guys, > > > >I have one question about adding two new virtqueues for dgram. One new > >thought is that we don't add two new virtqueues but keep using existing >

Re: [PATCH 4/4] tun: indicate support for USO feature

2021-05-13 Thread Willem de Bruijn
> > > > > So the question is what to do now: > > > > > A) > > > > > Finalize patches for guest TX and respective QEMU patches > > > > > Prepare RFC patches for guest RX, get ack on them > > > > > Change the spec > > > > > Finalize patches for guest RX according to the spec > > > > > > > > > > B) >

Re: [PATCH 4/4] tun: indicate support for USO feature

2021-05-13 Thread Willem de Bruijn
> > But surprisingly when TUN receives TUN_F_UFO it does not propagate it > > anywhere, there is no corresponding NETIF flag. > > (It looks like I drop the community and other ccs accidentally, adding > them back and sorry) > > Actually, there is one, NETIF_F_GSO_UDP. > > Kernel used to have

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-13 Thread Stefan Hajnoczi
On Fri, Apr 23, 2021 at 04:09:35PM +0800, Jason Wang wrote: > Sometimes, the driver doesn't trust the device. This is usually > happens for the encrtpyed VM or VDUSE[1]. Thanks for doing this. Can you describe the overall memory safety model that virtio drivers must follow? For example: -

Re: [RFC][PATCH] vhost/vsock: Add vsock_list file to map cid with vhost tasks

2021-05-13 Thread Steven Rostedt
On Thu, 13 May 2021 16:57:34 +0100 Stefan Hajnoczi wrote: > This approach relies on process hierarchy of the VMM (QEMU). > Multi-process QEMU is in development and will allow VIRTIO devices to > run as separate processes from the main QEMU. It then becomes harder to > correlate a VIRTIO device

Re: [RFC PATCH] virtio-vsock: add description for datagram type

2021-05-13 Thread Stefan Hajnoczi
On Thu, May 06, 2021 at 04:56:48PM -0700, Cong Wang . wrote: > On Mon, Apr 26, 2021 at 9:07 AM Stefan Hajnoczi wrote: > > > > On Wed, Apr 14, 2021 at 05:43:52PM -0700, Cong Wang . wrote: > > > On Wed, Mar 17, 2021 at 8:45 AM Stefan Hajnoczi > > > wrote: > > > > > > > > Please stick to UDP

Re: [RFC][PATCH] vhost/vsock: Add vsock_list file to map cid with vhost tasks

2021-05-13 Thread Stefan Hajnoczi
On Wed, May 05, 2021 at 04:38:55PM -0400, Steven Rostedt wrote: > The new trace-cmd 3.0 (which is almost ready to be released) allows for > tracing between host and guests with timestamp synchronization such that > the events on the host and the guest can be interleaved in the proper order > that

Re: [RFC PATCH v9 19/19] af_vsock: serialize writes to shared socket

2021-05-13 Thread Stefano Garzarella
On Thu, May 13, 2021 at 05:48:19PM +0300, Arseny Krasnov wrote: On 13.05.2021 17:46, Stefano Garzarella wrote: On Thu, May 13, 2021 at 04:01:50PM +0200, Stefano Garzarella wrote: On Sat, May 08, 2021 at 07:37:35PM +0300, Arseny Krasnov wrote: This add logic, that serializes write access to

Re: [External] Re: [RFC v2] virtio-vsock: add description for datagram type

2021-05-13 Thread Stefan Hajnoczi
On Mon, Apr 12, 2021 at 03:39:36PM -0700, Jiang Wang . wrote: > On Mon, Apr 12, 2021 at 6:50 AM Stefan Hajnoczi wrote: > > On Thu, Apr 01, 2021 at 04:36:02AM +, jiang.wang wrote: > > > +For the rx side, dgram also uses the \field{buf_alloc}. If it is full, > > > the packet > > > +is dropped

Re: [RFC PATCH v9 19/19] af_vsock: serialize writes to shared socket

2021-05-13 Thread Stefano Garzarella
On Thu, May 13, 2021 at 04:01:50PM +0200, Stefano Garzarella wrote: On Sat, May 08, 2021 at 07:37:35PM +0300, Arseny Krasnov wrote: This add logic, that serializes write access to single socket by multiple threads. It is implemented be adding field with TID of current writer. When writer tries

Re: [PATCH] vdpa_sim_blk: Fix duplicate included linux/blkdev.h

2021-05-13 Thread Stefano Garzarella
On Thu, May 13, 2021 at 07:05:00PM +0800, Jiapeng Chong wrote: Clean up the following includecheck warning: ./drivers/vdpa/vdpa_sim/vdpa_sim_blk.c: linux/blkdev.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong ---

Re: [RFC PATCH v9 00/19] virtio/vsock: introduce SOCK_SEQPACKET support

2021-05-13 Thread Stefano Garzarella
Hi Arseny, On Sat, May 08, 2021 at 07:30:23PM +0300, Arseny Krasnov wrote: This patchset implements support of SOCK_SEQPACKET for virtio transport. As SOCK_SEQPACKET guarantees to save record boundaries, so to do it, new bit for field 'flags' was added: SEQ_EOR. This bit is set

Re: [RFC PATCH v9 19/19] af_vsock: serialize writes to shared socket

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:37:35PM +0300, Arseny Krasnov wrote: This add logic, that serializes write access to single socket by multiple threads. It is implemented be adding field with TID of current writer. When writer tries to send something, it checks that field is -1(free), else it sleep in

Re: [RFC PATCH v9 17/19] vsock_test: add SOCK_SEQPACKET tests

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:37:00PM +0300, Arseny Krasnov wrote: This adds two tests of SOCK_SEQPACKET socket: both transfer data and then test MSG_EOR and MSG_TRUNC flags. Cases for connect(), bind(), ^ We removed the MSG_EOR tests, right? etc. are not tested, because it is same as

Re: [RFC PATCH v9 15/19] vhost/vsock: enable SEQPACKET for transport

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:36:31PM +0300, Arseny Krasnov wrote: This removes: 1) Ignore of non-stream type of packets. This adds: 1) Handling of SEQPACKET bit: if guest sets features with this bit cleared, then SOCK_SEQPACKET support will be disabled. 2) 'seqpacket_allow()' callback. 3)

Re: [RFC PATCH v9 13/19] virtio/vsock: rest of SOCK_SEQPACKET support

2021-05-13 Thread Stefano Garzarella
sdf On Thu, May 13, 2021 at 2:27 PM Stefano Garzarella wrote: > > On Sat, May 08, 2021 at 07:35:54PM +0300, Arseny Krasnov wrote: > >This adds rest of logic for SEQPACKET: > >1) Send SHUTDOWN on socket close for SEQPACKET type. > >2) Set SEQPACKET packet type during send. > >3) 'seqpacket_allow'

Re: [RFC PATCH v9 14/19] virtio/vsock: enable SEQPACKET for transport

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:36:14PM +0300, Arseny Krasnov wrote: This adds 1) SEQPACKET ops for virtio transport and 'seqpacket_allow()' callback. 2) Handling of SEQPACKET bit: guest tries to negotiate it with vhost. Signed-off-by: Arseny Krasnov --- v8 -> v9: 1) Move 'seqpacket_allow' to

Re: [RFC PATCH v9 13/19] virtio/vsock: rest of SOCK_SEQPACKET support

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:35:54PM +0300, Arseny Krasnov wrote: This adds rest of logic for SEQPACKET: 1) Send SHUTDOWN on socket close for SEQPACKET type. 2) Set SEQPACKET packet type during send. 3) 'seqpacket_allow' flag to virtio transport. Please update this commit message, point 3 is not

Re: [RFC PATCH v9 11/19] virtio/vsock: dequeue callback for SOCK_SEQPACKET

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:35:20PM +0300, Arseny Krasnov wrote: This adds transport callback and it's logic for SEQPACKET dequeue. Callback fetches RW packets from rx queue of socket until whole record is copied(if user's buffer is full, user is not woken up). This is done to not stall sender,

Re: [RFC PATCH v9 12/19] virtio/vsock: add SEQPACKET receive logic

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:35:40PM +0300, Arseny Krasnov wrote: This modifies current receive logic for SEQPACKET support: 1) Inserts 'RW' packet to socket's rx queue, but without merging with buffer of last packet in queue. This is not true anymore, right? 2) Performs check for packet and

Re: [RFC PATCH v9 11/19] virtio/vsock: dequeue callback for SOCK_SEQPACKET

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:35:20PM +0300, Arseny Krasnov wrote: This adds transport callback and it's logic for SEQPACKET dequeue. Callback fetches RW packets from rx queue of socket until whole record is copied(if user's buffer is full, user is not woken up). This is done to not stall sender,

Re: [RFC PATCH v9 10/19] virtio/vsock: defines and constants for SEQPACKET

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:35:05PM +0300, Arseny Krasnov wrote: This adds set of defines and constants for SOCK_SEQPACKET support in vsock. Here is link to spec patch, which uses it: https://lists.oasis-open.org/archives/virtio-comment/202103/msg00069.html Will you be submitting a new

Re: [RFC PATCH v9 06/19] af_vsock: rest of SEQPACKET support

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:33:46PM +0300, Arseny Krasnov wrote: This does rest of SOCK_SEQPACKET support: 1) Adds socket ops for SEQPACKET type. 2) Allows to create socket with SEQPACKET type. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella This patch is changed, so usually

Re: [RFC PATCH v9 04/19] af_vsock: implement SEQPACKET receive loop

2021-05-13 Thread Stefano Garzarella
On Sat, May 08, 2021 at 07:33:14PM +0300, Arseny Krasnov wrote: This adds receive loop for SEQPACKET. It looks like receive loop for STREAM, but there is a little bit difference: 1) It doesn't call notify callbacks. 2) It doesn't care about 'SO_SNDLOWAT' and 'SO_RCVLOWAT' values, because there

Re: [PATCH 4/4] tun: indicate support for USO feature

2021-05-13 Thread Yuri Benditovich
On Thu, May 13, 2021 at 10:05 AM Jason Wang wrote: > > On Thu, May 13, 2021 at 12:36 PM Yuri Benditovich > wrote: > > > > On Thu, May 13, 2021 at 5:07 AM Jason Wang wrote: > > > > > > On Wed, May 12, 2021 at 6:37 PM Yuri Benditovich > > > wrote: > > > > > > > > On Wed, May 12, 2021 at 12:10 PM

Re: [PATCH 4/4] tun: indicate support for USO feature

2021-05-13 Thread Jason Wang
On Thu, May 13, 2021 at 12:36 PM Yuri Benditovich wrote: > > On Thu, May 13, 2021 at 5:07 AM Jason Wang wrote: > > > > On Wed, May 12, 2021 at 6:37 PM Yuri Benditovich > > wrote: > > > > > > On Wed, May 12, 2021 at 12:10 PM Jason Wang wrote: > > > > > > > > On Wed, May 12, 2021 at 4:32 PM Yuri