Re: [PATCH v2 2/2] rust: virtio: add virtio support

From: Wedson Almeida Filho
Date: Thu Apr 06 2023 - 14:27:17 EST


On Thu, 6 Apr 2023 at 11:22, Martin Rodriguez Reboredo
<yakoyoku@xxxxxxxxx> wrote:
>
> On 4/5/23 17:14, Daniel Almeida wrote:
> > This patch adds virtIO support to the rust crate. This includes the
> > capability to create a virtIO driver (through the module_virtio_driver
> > macro and the respective Driver trait) as well as initial virtqueue
> > support.
> >
> > A sample virtIO module is included for conveninence.
> >
> > Signed-off-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
> > ---
> > rust/bindings/bindings_helper.h | 3 +
> > rust/helpers.c | 25 +++
> > rust/kernel/lib.rs | 2 +
> > 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 ++++++++++++++++++++++++
> > 8 files changed, 623 insertions(+)
> > create mode 100644 rust/kernel/virtio.rs
> > create mode 100644 rust/kernel/virtio/virtqueue.rs
> > create mode 100644 samples/rust/rust_virtio.rs
>
> IMO this should be split further. If I were to suggest I'd say to do it
> as following.
>
> - virtio bindings
> - virtqueue bindings
> - sample virtio module
>
> This way the size of each commit would be more amenable to reviews.

Yes, I agree with Martin's suggestion.

Daniel, please split this further.

Cheers,
-Wedson