Thread (32 messages) 32 messages, 7 authors, 2026-03-23

Re: [PATCH v13 1/1] rust: interop: Add list module for C linked list interface

From: Alice Ryhl <aliceryhl@google.com>
Date: 2026-03-18 10:59:34
Also in: amd-gfx, dri-devel, intel-gfx, intel-xe, linux-doc, lkml, rust-for-linux

On Wed, Mar 18, 2026 at 11:53 AM Alexandre Courbot [off-list ref] wrote:
On Wed Mar 18, 2026 at 5:59 PM JST, Alice Ryhl wrote:
quoted
On Tue, Mar 17, 2026 at 04:18:46PM -0400, Joel Fernandes wrote:
quoted

On 3/17/2026 4:17 PM, Joel Fernandes wrote:
quoted
Add a new module `kernel::interop::list` for working with C's doubly
circular linked lists. Provide low-level iteration over list nodes.

Typed iteration over actual items is provided with a `clist_create`
macro to assist in creation of the `CList` type.

Cc: Nikola Djukic <redacted>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Gary Guo <gary@garyguo.net>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
---
 MAINTAINERS                 |   8 +
 rust/helpers/helpers.c      |   1 +
 rust/helpers/list.c         |  17 ++
 rust/kernel/interop.rs      |   9 +
 rust/kernel/interop/list.rs | 342 ++++++++++++++++++++++++++++++++++++
 rust/kernel/lib.rs          |   2 +
 6 files changed, 379 insertions(+)
 create mode 100644 rust/helpers/list.c
 create mode 100644 rust/kernel/interop.rs
 create mode 100644 rust/kernel/interop/list.rs
diff --git a/MAINTAINERS b/MAINTAINERS
index 4bd6b538a51f..e847099efcc2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23251,6 +23251,14 @@ T:        git https://github.com/Rust-for-Linux/linux.git alloc-next
 F:        rust/kernel/alloc.rs
 F:        rust/kernel/alloc/

+RUST [INTEROP]
+M:        Joel Fernandes <joelagnelf@nvidia.com>
+M:        Alexandre Courbot <acourbot@nvidia.com>
+L:        rust-for-linux@vger.kernel.org
+S:        Maintained
+T:        git https://github.com/Rust-for-Linux/linux.git interop-next
+F:        rust/kernel/interop/
Sorry, I forgot to add an additional F: for the rust/kernel/interop.rs file.
Danilo/Miguel, do you mind adding this when applying?
I think you should consider a mod.rs file to avoid this. It's tiny, and
just re-exports submodules, so I don't think the "mod.rs name in file
view" concern is that big, and IMO having files related to interop/
inside the directory is much better than having them outside.
Ah, so there is a rationale for using a `mod.rs` file after all. What
are the project-wide guidelines re: `foo.rs` vs `foo/mod.rs`?
I'm not sure we have discussed it in detail yet. Both are used in-tree.

Alice
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help