[PATCH 0/2] Rust scatterlist abstractions

From: Qingsong Chen
Date: Tue May 30 2023 - 02:48:48 EST


Hi All!

This is a version of scatterlist abstractions for Rust drivers.

Scatterlist is used for efficient management of memory buffers, which is
essential for many kernel-level operations such as Direct Memory Access
(DMA) transfers and crypto APIs.

This patch should be a good start to introduce the crypto APIs for Rust
drivers and to develop cipher algorithms in Rust later.

Qingsong Chen (2):
rust: kernel: add scatterlist wrapper
samples: rust: add `SgTable` and `ScatterList` selftests

rust/bindings/bindings_helper.h | 1 +
rust/helpers.c | 14 +
rust/kernel/error.rs | 2 +-
rust/kernel/lib.rs | 1 +
rust/kernel/scatterlist.rs | 478 ++++++++++++++++++++++++++++++++
samples/rust/Kconfig | 10 +
samples/rust/Makefile | 1 +
samples/rust/rust_selftests.rs | 186 +++++++++++++
8 files changed, 692 insertions(+), 1 deletion(-)
create mode 100644 rust/kernel/scatterlist.rs
create mode 100644 samples/rust/rust_selftests.rs

--
2.40.1