rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Rust abstractions for network device drivers
@ 2023-07-10  7:36 FUJITA Tomonori
  2023-07-10  7:36 ` [PATCH v2 1/5] rust: core " FUJITA Tomonori
  0 siblings, 1 reply; 24+ messages in thread
From: FUJITA Tomonori @ 2023-07-10  7:36 UTC (permalink / raw)
  To: rust-for-linux, netdev
  Cc: kuba, andrew, aliceryhl, miguel.ojeda.sandonis, benno.lossin

This patchset adds minimum Rust abstractions for network device
drivers and an example of a Rust network device driver, a simpler
version of drivers/net/dummy.c.

The major change is a way to drop an skb (1/5 patch); a driver needs
to explicitly call a function to drop a skb. The code to let a skb
go out of scope can't be compiled.

I dropped get_stats64 support patch that the current sample driver
doesn't use. Instead I added a patch to update the NETWORKING DRIVERS
entry in MAINTAINERS.

Changes since v1 [1]:
- a driver must explicitly call a function to drop a skb.
- simplify the code (thanks to Benno Lossin).
- update MAINTAINERS file.

[1] https://lwn.net/ml/netdev/20230613045326.3938283-1-fujita.tomonori@gmail.com/

FUJITA Tomonori (5):
  rust: core abstractions for network device drivers
  rust: add support for ethernet operations
  rust: add methods for configure net_device
  samples: rust: add dummy network driver
  MAINTAINERS: add Rust network abstractions files to the NETWORKING
    DRIVERS entry

 MAINTAINERS                     |   2 +
 rust/bindings/bindings_helper.h |   3 +
 rust/helpers.c                  |  23 ++
 rust/kernel/lib.rs              |   3 +
 rust/kernel/net.rs              |   5 +
 rust/kernel/net/dev.rs          | 598 ++++++++++++++++++++++++++++++++
 samples/rust/Kconfig            |  13 +
 samples/rust/Makefile           |   1 +
 samples/rust/rust_net_dummy.rs  |  75 ++++
 scripts/Makefile.build          |   2 +-
 10 files changed, 724 insertions(+), 1 deletion(-)
 create mode 100644 rust/kernel/net.rs
 create mode 100644 rust/kernel/net/dev.rs
 create mode 100644 samples/rust/rust_net_dummy.rs


base-commit: d2e3115d717197cb2bc020dd1f06b06538474ac3
-- 
2.34.1


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

end of thread, other threads:[~2023-07-14 18:59 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230610071848.3722492-1-tomo@exabit.dev>
2023-06-10  7:20 ` [PATCH v2 1/5] rust: core abstractions for network device drivers FUJITA Tomonori
2023-06-10 14:11   ` Andrew Lunn
2023-06-11  8:03     ` Alice Ryhl
2023-06-11 15:30       ` Andrew Lunn
2023-06-11 17:48         ` Miguel Ojeda
2023-06-12  6:47     ` FUJITA Tomonori
2023-06-12 12:46       ` Andrew Lunn
2023-06-10 19:49   ` Miguel Ojeda
2023-06-12  5:04     ` FUJITA Tomonori
2023-06-12 13:26       ` Miguel Ojeda
2023-06-10  7:20 ` [PATCH v2 4/5] rust: add methods for configure net_device FUJITA Tomonori
2023-06-10  7:20 ` [PATCH v2 2/5] rust: add support for ethernet operations FUJITA Tomonori
2023-06-10 16:48   ` Andrew Lunn
2023-06-12  6:51     ` FUJITA Tomonori
2023-06-10 19:14   ` Miguel Ojeda
2023-06-12  8:51     ` FUJITA Tomonori
2023-06-12 13:35       ` Miguel Ojeda
2023-06-10  7:20 ` [PATCH v2 5/5] samples: rust: add dummy network driver FUJITA Tomonori
2023-06-10 16:59   ` Andrew Lunn
2023-06-12  7:02     ` FUJITA Tomonori
2023-06-10 19:14   ` Miguel Ojeda
2023-06-10  7:20 ` [PATCH v2 3/5] rust: add support for get_stats64 in struct net_device_ops FUJITA Tomonori
2023-07-10  7:36 [PATCH v2 0/5] Rust abstractions for network device drivers FUJITA Tomonori
2023-07-10  7:36 ` [PATCH v2 1/5] rust: core " FUJITA Tomonori
2023-07-14 18:59   ` Benno Lossin

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