rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] Rust Socket abstractions
@ 2023-08-14  9:22 Michele Dalle Rive
  2023-08-14  9:22 ` [RFC PATCH 1/7] rust: net: add net module files and shared enums Michele Dalle Rive
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Michele Dalle Rive @ 2023-08-14  9:22 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, David S. Miller
  Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Alice Ryhl, Davide Rovelli,
	rust-for-linux, netdev, linux-kernel, patches, Michele Dalle Rive

This patch series is intended to create Rust abstractions for Sockets
and other fundamental network entities. 

Specifically, it was added:
- Ip address and Socket address wrappers (for `in_addr`, `in6_addr`,
  `sockaddr_in`, `sockaddr_in6`, `sockaddr_storage`).
- Socket wrapper.
- Socket flags and options enums.
- TCP and UDP specific abstractions over the Rust Socket structure.

This series is a RFC because I would appreciate some feedback about:
- The structure of the module: is the division of the files and modules
  appropriate or should it be more or less fine-grained?
  Also, should the `net` module export all the structures of its
  submodules? I noticed that it is done in the standard library.
- Whether the documentation is comprehensive enough.
- A few other specific questions, written in the individual patches.

I would greatly appreciate any kind of feedback or opinion. 
I am pretty new to the patch/mailing list world, so please point out any
mistake I might make.

The changes in this patch series are based on top of the latest commit
of `rust-next` in the Rust git tree: 
19cd7b5d229c ("btf, scripts: rust: drop is_rust_module.sh")

Michele Dalle Rive (7):
  rust: net: add net module files and shared enums.
  rust: net: add ip and socket address bindings.
  rust: net: add socket-related flags and flagset.
  rust: net: add socket wrapper.
  rust: net: implement socket options API.
  rust: net: add socket TCP wrappers.
  rust: net: add socket UDP wrappers.

 rust/bindings/bindings_helper.h |    3 +
 rust/kernel/lib.rs              |    2 +
 rust/kernel/net.rs              |  185 +++++
 rust/kernel/net/addr.rs         | 1215 ++++++++++++++++++++++++++++++
 rust/kernel/net/ip.rs           |   73 ++
 rust/kernel/net/socket.rs       |  641 ++++++++++++++++
 rust/kernel/net/socket/flags.rs |  467 ++++++++++++
 rust/kernel/net/socket/opts.rs  | 1222 +++++++++++++++++++++++++++++++
 rust/kernel/net/tcp.rs          |  252 +++++++
 rust/kernel/net/udp.rs          |  182 +++++
 10 files changed, 4242 insertions(+)
 create mode 100644 rust/kernel/net.rs
 create mode 100644 rust/kernel/net/addr.rs
 create mode 100644 rust/kernel/net/ip.rs
 create mode 100644 rust/kernel/net/socket.rs
 create mode 100644 rust/kernel/net/socket/flags.rs
 create mode 100644 rust/kernel/net/socket/opts.rs
 create mode 100644 rust/kernel/net/tcp.rs
 create mode 100644 rust/kernel/net/udp.rs

-- 
2.41.0


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

end of thread, other threads:[~2023-08-18 12:42 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14  9:22 [RFC PATCH 0/7] Rust Socket abstractions Michele Dalle Rive
2023-08-14  9:22 ` [RFC PATCH 1/7] rust: net: add net module files and shared enums Michele Dalle Rive
2023-08-14  9:22 ` [RFC PATCH 2/7] rust: net: add ip and socket address bindings Michele Dalle Rive
2023-08-14  9:22 ` [RFC PATCH 3/7] rust: net: add socket-related flags and flagset Michele Dalle Rive
2023-08-14  9:22 ` [RFC PATCH 4/7] rust: net: add socket wrapper Michele Dalle Rive
2023-08-14  9:23 ` [RFC PATCH 5/7] rust: net: implement socket options API Michele Dalle Rive
2023-08-14  9:23 ` [RFC PATCH 6/7] rust: net: add socket TCP wrappers Michele Dalle Rive
2023-08-14  9:23 ` [RFC PATCH 7/7] rust: net: add socket UDP wrappers Michele Dalle Rive
2023-08-14 15:25 ` [RFC PATCH 0/7] Rust Socket abstractions Greg KH
2023-08-14 20:23   ` Andrew Lunn
2023-08-14 21:06     ` Michele Dalle Rive
2023-08-14 21:36       ` Andrew Lunn
2023-08-17 14:53         ` Michele Dalle Rive
2023-08-17 15:14           ` Andrew Lunn
2023-08-17 15:48           ` Jakub Kicinski
2023-08-17 17:01             ` Boqun Feng
2023-08-17 17:32             ` Miguel Ojeda
2023-08-17 18:41             ` Jonathan Corbet
2023-08-17 17:14           ` Miguel Ojeda
2023-08-17 18:38             ` Stephen Hemminger
2023-08-17 19:13               ` Miguel Ojeda
2023-08-17 19:14             ` Andrew Lunn
2023-08-17 22:27             ` Davide Rovelli
2023-08-18  1:30               ` Andrew Lunn
2023-08-18  7:50                 ` Davide Rovelli
2023-08-18 12:42                   ` Andrew Lunn

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