From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Subject: [RFC PATCH crosvm 0/4] Implement vhost-user-net
Date: Wed, 12 May 2021 17:08:08 +0000 [thread overview]
Message-ID: <20210512170812.192540-1-hi@alyssa.is> (raw)
This is a proof of concept, so no need for code review on it.
Here I have taken cloud-hypervisor's implementation of vhost-user-net,
and ported it to crosvm. I based this on old versions of crosvm and
cloud-hypervisor, with the idea being that it would be easier to get
an initial working version from a time when the codebases had diverged
less, which could then be gradually brought forward.
A slight complication is that the cloud-hypervisor version I ported
the implementation from didn't quite behave in the way the vhost-user
specification[1] said it should, so patches 2 and 3 are backports of
cloud-hypervisor fixes that happened later.
Alyssa Ross (4):
devices: port vhost-user-net from cloud-hypervisor
vhost_rs: vhost_user: Add missing protocol features
devices: vhost-user: Vring should be enabled after initialization
crosvm: use vhost-user-net instead of virtio-net
Cargo.lock | 731 ++++++++++------
Cargo.toml | 2 +-
devices/Cargo.toml | 8 +
devices/src/virtio/mod.rs | 2 +
.../virtio/vhost_user/cloud_hypervisor/mod.rs | 1 +
.../vhost_user/cloud_hypervisor/net_util.rs | 162 ++++
devices/src/virtio/vhost_user/handler.rs | 123 +++
devices/src/virtio/vhost_user/mod.rs | 82 ++
devices/src/virtio/vhost_user/net.rs | 230 +++++
.../src/virtio/vhost_user/vu_common_ctrl.rs | 110 +++
src/linux.rs | 32 +-
src/main.rs | 2 +-
vhost_rs/Cargo.toml | 26 +
vhost_rs/LICENSE | 202 +++++
vhost_rs/LICENSE-BSD | 27 +
vhost_rs/LICENSE-MIT | 24 +
vhost_rs/README.md | 10 +
vhost_rs/src/backend.rs | 130 +++
vhost_rs/src/lib.rs | 122 +++
vhost_rs/src/vhost_kern/mod.rs | 320 +++++++
vhost_rs/src/vhost_kern/vhost_binding.rs | 405 +++++++++
vhost_rs/src/vhost_kern/vsock.rs | 84 ++
vhost_rs/src/vhost_user/connection.rs | 737 ++++++++++++++++
vhost_rs/src/vhost_user/dummy_slave.rs | 250 ++++++
vhost_rs/src/vhost_user/master.rs | 757 ++++++++++++++++
vhost_rs/src/vhost_user/master_req_handler.rs | 258 ++++++
vhost_rs/src/vhost_user/message.rs | 823 ++++++++++++++++++
vhost_rs/src/vhost_user/mod.rs | 251 ++++++
vhost_rs/src/vhost_user/slave.rs | 48 +
vhost_rs/src/vhost_user/slave_req_handler.rs | 582 +++++++++++++
vhost_rs/src/vhost_user/sock_ctrl_msg.rs | 464 ++++++++++
vhost_rs/src/vsock.rs | 30 +
virtio-bindings/Cargo.toml | 6 +
virtio-bindings/src/lib.rs | 15 +
virtio-bindings/src/virtio_blk.rs | 486 +++++++++++
virtio-bindings/src/virtio_net.rs | 734 ++++++++++++++++
virtio-bindings/src/virtio_ring.rs | 453 ++++++++++
37 files changed, 8461 insertions(+), 268 deletions(-)
create mode 100644 devices/src/virtio/vhost_user/cloud_hypervisor/mod.rs
create mode 100644 devices/src/virtio/vhost_user/cloud_hypervisor/net_util.rs
create mode 100644 devices/src/virtio/vhost_user/handler.rs
create mode 100644 devices/src/virtio/vhost_user/mod.rs
create mode 100644 devices/src/virtio/vhost_user/net.rs
create mode 100644 devices/src/virtio/vhost_user/vu_common_ctrl.rs
create mode 100644 vhost_rs/Cargo.toml
create mode 100644 vhost_rs/LICENSE
create mode 100644 vhost_rs/LICENSE-BSD
create mode 100644 vhost_rs/LICENSE-MIT
create mode 100644 vhost_rs/README.md
create mode 100644 vhost_rs/src/backend.rs
create mode 100644 vhost_rs/src/lib.rs
create mode 100644 vhost_rs/src/vhost_kern/mod.rs
create mode 100644 vhost_rs/src/vhost_kern/vhost_binding.rs
create mode 100644 vhost_rs/src/vhost_kern/vsock.rs
create mode 100644 vhost_rs/src/vhost_user/connection.rs
create mode 100644 vhost_rs/src/vhost_user/dummy_slave.rs
create mode 100644 vhost_rs/src/vhost_user/master.rs
create mode 100644 vhost_rs/src/vhost_user/master_req_handler.rs
create mode 100644 vhost_rs/src/vhost_user/message.rs
create mode 100644 vhost_rs/src/vhost_user/mod.rs
create mode 100644 vhost_rs/src/vhost_user/slave.rs
create mode 100644 vhost_rs/src/vhost_user/slave_req_handler.rs
create mode 100644 vhost_rs/src/vhost_user/sock_ctrl_msg.rs
create mode 100644 vhost_rs/src/vsock.rs
create mode 100644 virtio-bindings/Cargo.toml
create mode 100644 virtio-bindings/src/lib.rs
create mode 100644 virtio-bindings/src/virtio_blk.rs
create mode 100644 virtio-bindings/src/virtio_net.rs
create mode 100644 virtio-bindings/src/virtio_ring.rs
base-commit: 8a7e4e902a4950b060ea23b40c0dfce7bfa1b2cb
--
2.31.0
next reply other threads:[~2021-05-13 0:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 17:08 Alyssa Ross [this message]
2021-05-12 17:08 ` [RFC PATCH 1/4] devices: port vhost-user-net from cloud-hypervisor Alyssa Ross
2021-05-12 17:08 ` [RFC PATCH 2/4] vhost_rs: vhost_user: Add missing protocol features Alyssa Ross
2021-05-12 17:08 ` [RFC PATCH 3/4] devices: vhost-user: Vring should be enabled after initialization Alyssa Ross
2021-05-12 17:08 ` [RFC PATCH 4/4] crosvm: use vhost-user-net instead of virtio-net Alyssa Ross
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=20210512170812.192540-1-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.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.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
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).