mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arseniy Krasnov <oxffffaa@gmail.com>
To: Stefano Garzarella <sgarzare@redhat.com>,
	Bobby Eshleman <bobby.eshleman@bytedance.com>
Cc: Bobby Eshleman <bobbyeshleman@gmail.com>,
	Cong Wang <cong.wang@bytedance.com>,
	Jiang Wang <jiang.wang@bytedance.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	AVKrasnov@sberdevices.ru
Subject: Re: [PATCH v4] virtio/vsock: replace virtio_vsock_pkt with sk_buff
Date: Thu, 24 Nov 2022 18:13:49 +0300	[thread overview]
Message-ID: <03d74a68-91a3-04dd-613b-33e232937cbc@gmail.com> (raw)
In-Reply-To: <20221124150005.vchk6ieoacrcu2gb@sgarzare-redhat>

Hello Stefano

On 24.11.2022 18:00, Stefano Garzarella wrote:
> This is a net-next material, please remember to use net-next tag:
> https://www.kernel.org/doc/html/v6.0/process/maintainer-netdev.html#netdev-faq
> 
> On Wed, Nov 23, 2022 at 10:07:49PM -0800, Bobby Eshleman wrote:
>> This commit changes virtio/vsock to use sk_buff instead of
>> virtio_vsock_pkt. Beyond better conforming to other net code, using
>> sk_buff allows vsock to use sk_buff-dependent features in the future
>> (such as sockmap) and improves throughput.
>>
>> This patch introduces the following performance changes:
>>
>> Tool/Config: uperf w/ 64 threads, SOCK_STREAM
>> Test Runs: 5, mean of results
>> Before: commit 95ec6bce2a0b ("Merge branch 'net-ipa-more-endpoints'")
>>
>> Test: 64KB, g2h
>> Before: 21.63 Gb/s
>> After: 25.59 Gb/s (+18%)
>>
>> Test: 16B, g2h
>> Before: 11.86 Mb/s
>> After: 17.41 Mb/s (+46%)
>>
>> Test: 64KB, h2g
>> Before: 2.15 Gb/s
>> After: 3.6 Gb/s (+67%)
>>
>> Test: 16B, h2g
>> Before: 14.38 Mb/s
>> After: 18.43 Mb/s (+28%)
>>
>> Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
>> ---
> 
> The patch LGTM. I run several tests (iperf3, vsock_test,
> vsock_diag_test, vhost-user-vsock, tcpdump) and IMO we are okay.
> 
> I found the following problems that I would like to report:
> 
> - vhost-user-vsock [1] is failing, but it is not an issue of this patch,
>   but a spec violation in the rust-vmm/vm-virtio/virtio-vsock crate as I
>   reported here [2]. We will fix it there, this patch is fine, indeed
>   trying a guest with the new layout (1 descriptor for both header and
>   data) with vhost-vsock in Linux 6.0, everything works perfectly.
> 
> - the new "SOCK_SEQPACKET msg bounds" [3] reworked by Arseniy fails
>   intermittently with this patch.
> 
>   Using the tests currently in the kernel tree everything is fine, so
>   I don't understand if it's a problem in the new test or in this
>   patch. I've looked at the code again and don't seem to see any
>   criticisms.
> 
>   @Arseniy @Bobby can you take a look?
Seems i've found this problem here:

https://lkml.org/lkml/2022/11/24/708

Being fixed - all tests passes

Thank You!
> 
>   I'll try to take a closer look too, and before I give my R-b I'd like
>   to make sure it's a problem in the test and not in this patch.
> 
>   This is what I have (some times, not always) with both host and guest
>   with this patch and the series of [3] applied:
> 
>   host$ ./vsock_test --control-host=192.168.133.3 --control-port=12345 \
>                      --mode=client --peer-cid=4
>   Control socket connected to 192.168.133.3:12345.
>   0 - SOCK_STREAM connection reset...ok
>   1 - SOCK_STREAM bind only...ok
>   2 - SOCK_STREAM client close...ok
>   3 - SOCK_STREAM server close...ok
>   4 - SOCK_STREAM multiple connections...ok
>   5 - SOCK_STREAM MSG_PEEK...ok
>   6 - SOCK_SEQPACKET msg bounds...ok
>   7 - SOCK_SEQPACKET MSG_TRUNC flag...recv: Connection reset by peer
> 
>   guest$ ./vsock_test --control-port=12345 --mode=server --peer-cid=2
>   Control socket listening on 0.0.0.0:12345
>   Control socket connection accepted...
>   0 - SOCK_STREAM connection reset...ok
>   1 - SOCK_STREAM bind only...ok
>   2 - SOCK_STREAM client close...ok
>   3 - SOCK_STREAM server close...ok
>   4 - SOCK_STREAM multiple connections...ok
>   5 - SOCK_STREAM MSG_PEEK...ok
>   6 - SOCK_SEQPACKET msg bounds...Message bounds broken
> 
> Thanks,
> Stefano
> 
> [1] https://github.com/rust-vmm/vhost-device/tree/main/crates/vsock
> [2] https://github.com/rust-vmm/vm-virtio/issues/204
> [3] https://lore.kernel.org/lkml/c991dffd-1dbc-e1d1-b682-a3c71f6ce51c@sberdevices.ru/
> 

  reply	other threads:[~2022-11-24 15:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  6:07 Bobby Eshleman
2022-11-24 14:30 ` Arseniy Krasnov
2022-11-24 15:27   ` Stefano Garzarella
2022-11-24 15:00 ` Stefano Garzarella
2022-11-24 15:13   ` Arseniy Krasnov [this message]
2022-11-24 15:28     ` Stefano Garzarella

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=03d74a68-91a3-04dd-613b-33e232937cbc@gmail.com \
    --to=oxffffaa@gmail.com \
    --cc=AVKrasnov@sberdevices.ru \
    --cc=bobby.eshleman@bytedance.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=cong.wang@bytedance.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=jiang.wang@bytedance.com \
    --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=pabeni@redhat.com \
    --cc=sgarzare@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

all inboxes | Powered by JetHome®