rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] rust: virtio: add virtio support
@ 2023-04-05 20:14 Daniel Almeida
  2023-04-05 20:14 ` [PATCH v2 1/2] rust: add scatterlist support Daniel Almeida
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Daniel Almeida @ 2023-04-05 20:14 UTC (permalink / raw)
  To: wedsonaf, ojeda
  Cc: Daniel Almeida, rust-for-linux, linux-kernel, virtualization

This used to be a single patch, but I split it into two with the
addition of struct Scatterlist.

Again a bit new with Rust submissions. I was told by Gary Guo to
rebase on top of rust-next, but it seems *very* behind?

The first patch does not build on its own due to a dead_code warning.
It is hard to not have dead code when one is adding infrastructure to be
used by others at a later opportunity. Let me know if you would like to
see the patches squashed into one to fix this.

As suggested by Bjorn, I added a small virtio-entropy based sample.
It is a very bare-bones clone of virtio-rng.c that only sends a
single request.

Changes from v1:

- Addressed review comments by Miguel and Bjorn.
- Added a scatterlist abstraction
- Added a virtio-rng based sample

Daniel Almeida (2):
  rust: add scatterlist support
  rust: virtio: add virtio support

 rust/bindings/bindings_helper.h |   3 +
 rust/helpers.c                  |  25 +++
 rust/kernel/lib.rs              |   3 +
 rust/kernel/scatterlist.rs      |  40 +++++
 rust/kernel/virtio.rs           | 261 ++++++++++++++++++++++++++++++++
 rust/kernel/virtio/virtqueue.rs | 126 +++++++++++++++
 samples/rust/Kconfig            |  10 ++
 samples/rust/Makefile           |   1 +
 samples/rust/rust_virtio.rs     | 195 ++++++++++++++++++++++++
 9 files changed, 664 insertions(+)
 create mode 100644 rust/kernel/scatterlist.rs
 create mode 100644 rust/kernel/virtio.rs
 create mode 100644 rust/kernel/virtio/virtqueue.rs
 create mode 100644 samples/rust/rust_virtio.rs

-- 
2.40.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-04-07 23:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 20:14 [PATCH v2 0/2] rust: virtio: add virtio support Daniel Almeida
2023-04-05 20:14 ` [PATCH v2 1/2] rust: add scatterlist support Daniel Almeida
2023-04-06 14:21   ` Martin Rodriguez Reboredo
2023-04-05 20:14 ` [PATCH v2 2/2] rust: virtio: add virtio support Daniel Almeida
2023-04-06 14:22   ` Martin Rodriguez Reboredo
2023-04-06 18:26     ` Wedson Almeida Filho
2023-04-06 19:04   ` Wedson Almeida Filho
2023-04-07 23:36     ` Daniel Almeida
2023-04-05 23:19 ` [PATCH v2 0/2] " Miguel Ojeda

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).