* Re: [RFC PATCH v3 1/6] virtio/vsock: rename 'EOR' to 'EOM' bit.
[not found] ` <20210816085112.4173869-1-arseny.krasnov@kaspersky.com>
@ 2021-08-24 9:52 ` Stefano Garzarella
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Garzarella @ 2021-08-24 9:52 UTC (permalink / raw)
To: Arseny Krasnov
Cc: Andra Paraschiv, kvm, Michael S. Tsirkin, netdev, stsp2,
linux-kernel, virtualization, oxffffaa, Norbert Slusarek,
Stefan Hajnoczi, Colin Ian King, Jakub Kicinski, David S. Miller
On Mon, Aug 16, 2021 at 11:51:09AM +0300, Arseny Krasnov wrote:
>This current implemented bit is used to mark end of messages
>('EOM' - end of message), not records('EOR' - end of record).
>Also rename 'record' to 'message' in implementation as it is
>different things.
>
>Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
>---
> drivers/vhost/vsock.c | 12 ++++++------
> include/uapi/linux/virtio_vsock.h | 2 +-
> net/vmw_vsock/virtio_transport_common.c | 14 +++++++-------
> 3 files changed, 14 insertions(+), 14 deletions(-)
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH v3 2/6] virtio/vsock: add 'VIRTIO_VSOCK_SEQ_EOR' bit.
[not found] ` <20210816085126.4173978-1-arseny.krasnov@kaspersky.com>
@ 2021-08-24 9:53 ` Stefano Garzarella
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Garzarella @ 2021-08-24 9:53 UTC (permalink / raw)
To: Arseny Krasnov
Cc: Andra Paraschiv, kvm, Michael S. Tsirkin, netdev, stsp2,
linux-kernel, virtualization, oxffffaa, Norbert Slusarek,
Stefan Hajnoczi, Jakub Kicinski, Colin Ian King, David S. Miller
On Mon, Aug 16, 2021 at 11:51:23AM +0300, Arseny Krasnov wrote:
>This bit is used to handle POSIX MSG_EOR flag passed from
>userspace in 'sendXXX()' system calls. It marks end of each
Maybe better 'send*()'.
>record and is visible to receiver using 'recvmsg()' system
>call.
>
>Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
>---
> include/uapi/linux/virtio_vsock.h | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/include/uapi/linux/virtio_vsock.h b/include/uapi/linux/virtio_vsock.h
>index 8485b004a5f8..64738838bee5 100644
>--- a/include/uapi/linux/virtio_vsock.h
>+++ b/include/uapi/linux/virtio_vsock.h
>@@ -98,6 +98,7 @@ enum virtio_vsock_shutdown {
> /* VIRTIO_VSOCK_OP_RW flags values */
> enum virtio_vsock_rw {
> VIRTIO_VSOCK_SEQ_EOM = 1,
>+ VIRTIO_VSOCK_SEQ_EOR = 2,
> };
>
> #endif /* _UAPI_LINUX_VIRTIO_VSOCK_H */
>--
>2.25.1
>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH v3 3/6] vhost/vsock: support MSG_EOR bit processing
[not found] ` <20210816085143.4174099-1-arseny.krasnov@kaspersky.com>
@ 2021-08-24 10:00 ` Stefano Garzarella
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Garzarella @ 2021-08-24 10:00 UTC (permalink / raw)
To: Arseny Krasnov
Cc: Andra Paraschiv, kvm, Michael S. Tsirkin, netdev, stsp2,
linux-kernel, virtualization, oxffffaa, Norbert Slusarek,
Stefan Hajnoczi, Colin Ian King, Jakub Kicinski, David S. Miller
On Mon, Aug 16, 2021 at 11:51:40AM +0300, Arseny Krasnov wrote:
>'MSG_EOR' handling has same logic as 'MSG_EOM' - if bit present
s/same/similar
>in packet's header, reset it to 0. Then restore it back if packet
>processing wasn't completed. Instead of bool variable for each
>flag, bit mask variable was added: it has logical OR of 'MSG_EOR'
>and 'MSG_EOM' if needed, to restore flags, this variable is ORed
>with flags field of packet.
>
>Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
>---
> drivers/vhost/vsock.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
>index feaf650affbe..d217955bbcd4 100644
>--- a/drivers/vhost/vsock.c
>+++ b/drivers/vhost/vsock.c
>@@ -114,7 +114,7 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock,
> size_t nbytes;
> size_t iov_len, payload_len;
> int head;
>- bool restore_flag = false;
>+ uint32_t flags_to_restore = 0;
checkpatch.pl suggest the following:
CHECK: Prefer kernel type 'u32' over 'uint32_t'
Sorry, I suggested that, I forgot that u32 is preferable :-)
>
> spin_lock_bh(&vsock->send_pkt_list_lock);
> if (list_empty(&vsock->send_pkt_list)) {
>@@ -187,7 +187,12 @@ vhost_transport_do_send_pkt(struct vhost_vsock
>*vsock,
> */
Please also update the comment above with the new flag handled.
> if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SEQ_EOM) {
> pkt->hdr.flags &= ~cpu_to_le32(VIRTIO_VSOCK_SEQ_EOM);
>- restore_flag = true;
>+ flags_to_restore |= VIRTIO_VSOCK_SEQ_EOM;
>+
>+ if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SEQ_EOR) {
>+ pkt->hdr.flags &= ~cpu_to_le32(VIRTIO_VSOCK_SEQ_EOR);
>+ flags_to_restore |= VIRTIO_VSOCK_SEQ_EOR;
>+ }
> }
> }
>
>@@ -224,8 +229,7 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock,
> * to send it with the next available buffer.
> */
> if (pkt->off < pkt->len) {
>- if (restore_flag)
>- pkt->hdr.flags |= cpu_to_le32(VIRTIO_VSOCK_SEQ_EOM);
>+ pkt->hdr.flags |= cpu_to_le32(flags_to_restore);
>
> /* We are queueing the same virtio_vsock_pkt to handle
> * the remaining bytes, and we want to deliver it
>--
>2.25.1
>
The rest LGTM.
Stefano
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH v3 0/6] virtio/vsock: introduce MSG_EOR flag for SEQPACKET
[not found] ` <3f3fc268-10fc-1917-32c2-dc0e7737dc48@kaspersky.com>
@ 2021-08-24 10:05 ` Stefano Garzarella
[not found] ` <d28ff03e-c8ab-f7c6-68a2-90c9a400d029@kaspersky.com>
0 siblings, 1 reply; 5+ messages in thread
From: Stefano Garzarella @ 2021-08-24 10:05 UTC (permalink / raw)
To: Arseny Krasnov
Cc: Andra Paraschiv, kvm, Michael S. Tsirkin, netdev, stsp2,
linux-kernel, virtualization, oxffffaa, Norbert Slusarek,
Stefan Hajnoczi, Colin Ian King, Jakub Kicinski, David S. Miller
Hi Arseny,
On Mon, Aug 23, 2021 at 09:41:16PM +0300, Arseny Krasnov wrote:
>Hello, please ping :)
>
Sorry, I was off last week.
I left some minor comments in the patches.
Let's wait a bit for other comments before next version, also on the
spec, then I think you can send the next version without RFC tag.
The target should be the net-next tree, since this is a new feature.
Thanks,
Stefano
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH v3 0/6] virtio/vsock: introduce MSG_EOR flag for SEQPACKET
[not found] ` <d28ff03e-c8ab-f7c6-68a2-90c9a400d029@kaspersky.com>
@ 2021-08-24 10:31 ` Stefano Garzarella
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Garzarella @ 2021-08-24 10:31 UTC (permalink / raw)
To: Arseny Krasnov
Cc: Andra Paraschiv, kvm, Michael S. Tsirkin, netdev, stsp2,
linux-kernel, virtualization, oxffffaa, Norbert Slusarek,
Stefan Hajnoczi, Colin Ian King, Jakub Kicinski, David S. Miller
On Tue, Aug 24, 2021 at 01:18:06PM +0300, Arseny Krasnov wrote:
>
>On 24.08.2021 13:05, Stefano Garzarella wrote:
>> Caution: This is an external email. Be cautious while opening links or attachments.
>>
>>
>>
>> Hi Arseny,
>>
>> On Mon, Aug 23, 2021 at 09:41:16PM +0300, Arseny Krasnov wrote:
>>> Hello, please ping :)
>>>
>> Sorry, I was off last week.
>> I left some minor comments in the patches.
>>
>> Let's wait a bit for other comments before next version, also on the
>> spec, then I think you can send the next version without RFC tag.
>> The target should be the net-next tree, since this is a new feature.
>Hello,
>
>E.g. next version will be [net-next] instead of [RFC] for both
>kernel and spec patches?
Nope, net-next tag is useful only for kernel patches (net tree -
Documentation/networking/netdev-FAQ.rst).
Thanks,
Stefano
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-24 10:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210816085036.4173627-1-arseny.krasnov@kaspersky.com>
[not found] ` <20210816085112.4173869-1-arseny.krasnov@kaspersky.com>
2021-08-24 9:52 ` [RFC PATCH v3 1/6] virtio/vsock: rename 'EOR' to 'EOM' bit Stefano Garzarella
[not found] ` <20210816085126.4173978-1-arseny.krasnov@kaspersky.com>
2021-08-24 9:53 ` [RFC PATCH v3 2/6] virtio/vsock: add 'VIRTIO_VSOCK_SEQ_EOR' bit Stefano Garzarella
[not found] ` <20210816085143.4174099-1-arseny.krasnov@kaspersky.com>
2021-08-24 10:00 ` [RFC PATCH v3 3/6] vhost/vsock: support MSG_EOR bit processing Stefano Garzarella
[not found] ` <3f3fc268-10fc-1917-32c2-dc0e7737dc48@kaspersky.com>
2021-08-24 10:05 ` [RFC PATCH v3 0/6] virtio/vsock: introduce MSG_EOR flag for SEQPACKET Stefano Garzarella
[not found] ` <d28ff03e-c8ab-f7c6-68a2-90c9a400d029@kaspersky.com>
2021-08-24 10:31 ` Stefano Garzarella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).