rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] rust: add initial scatterlist abstraction
@ 2025-07-18 10:33 Abdiel Janulgue
  2025-07-18 10:33 ` [PATCH v3 1/2] " Abdiel Janulgue
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Abdiel Janulgue @ 2025-07-18 10:33 UTC (permalink / raw)
  To: acourbot, dakr, jgg, lyude
  Cc: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Tamir Duberstein, FUJITA Tomonori, open list,
	Andrew Morton, Randy Dunlap, Herbert Xu, Caleb Sander Mateos,
	Petr Tesarik, Sui Jingfeng, Marek Szyprowski, Robin Murphy,
	airlied, open list:DMA MAPPING HELPERS, rust-for-linux,
	Abdiel Janulgue

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


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

end of thread, other threads:[~2025-08-08 20:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 10:33 [PATCH v3 0/2] rust: add initial scatterlist abstraction Abdiel Janulgue
2025-07-18 10:33 ` [PATCH v3 1/2] " 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

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