netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Arseniy Krasnov <avkrasnov@sberdevices.ru>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	 "Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	 Bobby Eshleman <bobby.eshleman@bytedance.com>,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@sberdevices.ru,  oxffffaa@gmail.com
Subject: Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support
Date: Thu, 27 Jul 2023 10:54:51 +0200	[thread overview]
Message-ID: <p4v23nvilf45gl3snuyvypnhi3zfrmbi7qxtrdalluflt773sf@yt6tkgxiliar> (raw)
In-Reply-To: <f020405e-86af-1b66-c5f4-9bec98298f44@sberdevices.ru>

On Thu, Jul 27, 2023 at 11:32:00AM +0300, Arseniy Krasnov wrote:
>On 25.07.2023 15:28, Stefano Garzarella wrote:
>> On Tue, Jul 25, 2023 at 12:16:11PM +0300, Arseniy Krasnov wrote:
>>> On 25.07.2023 11:46, Arseniy Krasnov wrote:
>>>> On 25.07.2023 11:43, Stefano Garzarella wrote:
>>>>> On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote:

[...]

>>>>>>> +    t = vsock_core_get_transport(info->vsk);
>>>>>>>
>>>>>>> -        if (msg_data_left(info->msg) == 0 &&
>>>>>>> -            info->type == VIRTIO_VSOCK_TYPE_SEQPACKET) {
>>>>>>> -            hdr->flags |= cpu_to_le32(VIRTIO_VSOCK_SEQ_EOM);
>>>>>>> +    if (t->msgzerocopy_check_iov &&
>>>>>>> +        !t->msgzerocopy_check_iov(iov_iter))
>>>>>>> +        return false;
>>>>>
>>>>> I'd avoid adding a new transport callback used only internally in virtio
>>>>> transports.
>>>>
>>>> Ok, I see.
>>>>
>>>>>
>>>>> Usually the transport callbacks are used in af_vsock.c, if we need a
>>>>> callback just for virtio transports, maybe better to add it in struct
>>>>> virtio_vsock_pkt_info or struct virtio_vsock_sock.
>>>
>>> Hm, may be I just need to move this callback from 'struct vsock_transport' to parent 'struct virtio_transport',
>>> after 'send_pkt' callback. In this case:
>>> 1) AF_VSOCK part is not touched.
>>> 2) This callback stays in 'virtio_transport.c' and is set also in this file.
>>>   vhost and loopback are unchanged - only 'send_pkt' still enabled in both
>>>   files for these two transports.
>>
>> Yep, this could also work!
>>
>> Stefano
>
>Great! I'll send this implementation when this patchset for MSG_PEEK will be merged
>to net-next as both conflicts with each other.
>
>https://lore.kernel.org/netdev/20230726060150-mutt-send-email-mst@kernel.org/T/#m56f3b850361a412735616145162d2d9df25f6350

Ack!

Thanks,
Stefano


  reply	other threads:[~2023-07-27  8:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 21:42 [PATCH net-next v3 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations Arseniy Krasnov
2023-07-20 21:42 ` [PATCH net-next v3 1/4] vsock/virtio/vhost: read data from non-linear skb Arseniy Krasnov
2023-07-20 21:42 ` [PATCH net-next v3 2/4] vsock/virtio: support to send " Arseniy Krasnov
2023-07-25  8:17   ` Stefano Garzarella
2023-07-20 21:42 ` [PATCH net-next v3 3/4] vsock/virtio: non-linear skb handling for tap Arseniy Krasnov
2023-07-20 21:42 ` [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support Arseniy Krasnov
2023-07-21  5:09   ` Arseniy Krasnov
2023-07-25  8:43     ` Stefano Garzarella
2023-07-25  8:46       ` Arseniy Krasnov
2023-07-25  9:16         ` Arseniy Krasnov
2023-07-25 12:28           ` Stefano Garzarella
2023-07-25 12:39             ` Michael S. Tsirkin
2023-07-25 12:45               ` Stefano Garzarella
2023-07-27  8:32             ` Arseniy Krasnov
2023-07-27  8:54               ` Stefano Garzarella [this message]
2023-07-25 11:50     ` Michael S. Tsirkin
2023-07-25 12:53       ` Stefano Garzarella
2023-07-25 13:06         ` Michael S. Tsirkin
2023-07-25 13:21           ` Stefano Garzarella
2023-07-25 13:04       ` Arseniy Krasnov
2023-07-25 13:22         ` Michael S. Tsirkin
2023-07-25 13:28           ` Arseniy Krasnov
2023-07-25 13:36             ` Michael S. Tsirkin
2023-07-25 13:35               ` Arseniy Krasnov
2023-07-25  8:25   ` Michael S. Tsirkin
2023-07-25  8:39     ` Arseniy Krasnov
2023-07-25 11:59       ` Michael S. Tsirkin
2023-07-25 13:10         ` Arseniy Krasnov
2023-07-25 13:23           ` Michael S. Tsirkin
2023-07-25 13:30             ` Arseniy Krasnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p4v23nvilf45gl3snuyvypnhi3zfrmbi7qxtrdalluflt773sf@yt6tkgxiliar \
    --to=sgarzare@redhat.com \
    --cc=avkrasnov@sberdevices.ru \
    --cc=bobby.eshleman@bytedance.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=kernel@sberdevices.ru \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oxffffaa@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).