From: Abdiel Janulgue <abdiel.janulgue@gmail.com>
To: acourbot@nvidia.com, dakr@kernel.org, jgg@ziepe.ca, lyude@redhat.com
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Tamir Duberstein" <tamird@gmail.com>,
"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
linux-kernel@vger.kernel.org (open list),
"Andrew Morton" <akpm@linux-foundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Caleb Sander Mateos" <csander@purestorage.com>,
"Petr Tesarik" <petr@tesarici.cz>,
"Sui Jingfeng" <sui.jingfeng@linux.dev>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Robin Murphy" <robin.murphy@arm.com>,
airlied@redhat.com,
iommu@lists.linux.dev (open list:DMA MAPPING HELPERS),
rust-for-linux@vger.kernel.org,
"Abdiel Janulgue" <abdiel.janulgue@gmail.com>
Subject: [PATCH v3 0/2] rust: add initial scatterlist abstraction
Date: Fri, 18 Jul 2025 13:33:33 +0300 [thread overview]
Message-ID: <20250718103359.1026240-1-abdiel.janulgue@gmail.com> (raw)
Hi all,
This is v3 of the rust scatterlist abstraction incorporating feedback
and code from Alexandre Courbot.
Changes since v3:
- After further discussion it seems we need a variant of typestate after
all. A major change for this version is to introduce unsafe methods only
when using one of the constructors for a SG table. Otherwise nothing in
the interface should need to be unsafe.
Changes since v2:
- Drop typestate pattern. Introduce SGTablePages trait to enforce ownership
of the pages to SGTable.
Link to v2: https://lore.kernel.org/lkml/20250626203247.816273-1-abdiel.janulgue@gmail.com/
Abdiel Janulgue (2):
rust: add initial scatterlist abstraction
samples: rust: add sample code for scatterlist abstraction
rust/bindings/bindings_helper.h | 1 +
rust/helpers/helpers.c | 1 +
rust/helpers/scatterlist.c | 30 +++
rust/kernel/dma.rs | 18 ++
rust/kernel/lib.rs | 1 +
rust/kernel/scatterlist.rs | 405 ++++++++++++++++++++++++++++++++
samples/rust/rust_dma.rs | 49 +++-
7 files changed, 504 insertions(+), 1 deletion(-)
create mode 100644 rust/helpers/scatterlist.c
create mode 100644 rust/kernel/scatterlist.rs
base-commit: 23b128bba76776541dc09efaf3acf6242917e1f0
--
2.43.0
next reply other threads:[~2025-07-18 10:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 10:33 Abdiel Janulgue [this message]
2025-07-18 10:33 ` [PATCH v3 1/2] rust: add initial scatterlist abstraction Abdiel Janulgue
2025-07-23 0:44 ` Daniel Almeida
2025-07-24 5:40 ` Alexandre Courbot
2025-08-04 8:56 ` Abdiel Janulgue
2025-08-05 15:42 ` Jason Gunthorpe
2025-08-05 16:12 ` Danilo Krummrich
2025-07-24 20:19 ` Lyude Paul
2025-07-26 14:10 ` Alexandre Courbot
2025-08-01 18:26 ` Robin Murphy
2025-08-04 9:04 ` Alexandre Courbot
2025-08-08 13:13 ` Andreas Hindborg
2025-08-08 20:23 ` Benno Lossin
2025-07-18 10:33 ` [PATCH v3 2/2] samples: rust: add sample code for " Abdiel Janulgue
2025-07-23 0:54 ` Daniel Almeida
2025-07-23 8:07 ` Alexandre Courbot
2025-08-08 12:18 ` Andreas Hindborg
2025-07-18 10:50 ` [PATCH v3 0/2] rust: add initial " Danilo Krummrich
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=20250718103359.1026240-1-abdiel.janulgue@gmail.com \
--to=abdiel.janulgue@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=csander@purestorage.com \
--cc=dakr@kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=herbert@gondor.apana.org.au \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=m.szyprowski@samsung.com \
--cc=ojeda@kernel.org \
--cc=petr@tesarici.cz \
--cc=rdunlap@infradead.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=sui.jingfeng@linux.dev \
--cc=tamird@gmail.com \
--cc=tmgross@umich.edu \
/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;
as well as URLs for NNTP newsgroup(s).