From: FUJITA Tomonori <fujita.tomonori@gmail.com>
To: netdev@vger.kernel.org
Cc: rust-for-linux@vger.kernel.org, andrew@lunn.ch,
miguel.ojeda.sandonis@gmail.com
Subject: [PATCH v1 0/3] Rust abstractions for network PHY drivers
Date: Mon, 2 Oct 2023 17:52:59 +0900 [thread overview]
Message-ID: <20231002085302.2274260-1-fujita.tomonori@gmail.com> (raw)
This patchset adds Rust abstractions for network PHY drivers. It
doesn't fully cover the C APIs for PHY drivers yet but I think that
it's already useful. I implement two PHY drivers (Asix AX88772A PHYs
and Realtek Generic FE-GE). Seems they work well with real hardware.
The first patch introduces Rust bindings for the C APIs for network
PHY drivers.
The second patch adds the bindings to the ETHERNET PHY LIBRARY, and
also me as a maintainer of the Rust bindings (as Andrew Lunn
suggested).
The last patch introduces the Rust version of Asix PHY drivers,
drivers/net/phy/ax88796b.c. The features are equivalent to the C
version. You can choose C (by default) or Rust version on kernel
configuration.
You can find discussions on the RFC patches at rust-for-linux ml:
v1:
https://lwn.net/ml/rust-for-linux/20230913133609.1668758-1-fujita.tomonori@gmail.com/
v2:
https://lwn.net/ml/rust-for-linux/20230924064902.1339662-1-fujita.tomonori@gmail.com/
v3:
https://lwn.net/ml/rust-for-linux/20230928225518.2197768-1-fujita.tomonori@gmail.com/
FUJITA Tomonori (3):
rust: core abstractions for network PHY drivers
MAINTAINERS: add Rust PHY abstractions to the ETHERNET PHY LIBRARY
net: phy: add Rust Asix PHY driver
MAINTAINERS | 2 +
drivers/net/phy/Kconfig | 7 +
drivers/net/phy/Makefile | 6 +-
drivers/net/phy/ax88796b_rust.rs | 129 ++++++
rust/Makefile | 1 +
rust/bindings/bindings_helper.h | 3 +
rust/kernel/lib.rs | 3 +
rust/kernel/net.rs | 6 +
rust/kernel/net/phy.rs | 706 +++++++++++++++++++++++++++++++
rust/uapi/uapi_helper.h | 1 +
10 files changed, 863 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/phy/ax88796b_rust.rs
create mode 100644 rust/kernel/net.rs
create mode 100644 rust/kernel/net/phy.rs
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
--
2.34.1
next reply other threads:[~2023-10-02 8:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 8:52 FUJITA Tomonori [this message]
2023-10-02 8:53 ` [PATCH v1 1/3] rust: core abstractions for network PHY drivers FUJITA Tomonori
2023-10-02 9:14 ` Greg KH
2023-10-02 14:52 ` Andrew Lunn
2023-10-03 0:33 ` FUJITA Tomonori
2023-10-03 1:40 ` Andrew Lunn
2023-10-03 3:43 ` FUJITA Tomonori
2023-10-03 6:31 ` Greg KH
2023-10-03 6:40 ` FUJITA Tomonori
2023-10-03 12:45 ` Andrew Lunn
2023-10-02 15:24 ` Andrew Lunn
2023-10-03 23:46 ` FUJITA Tomonori
2023-10-02 8:53 ` [PATCH v1 2/3] MAINTAINERS: add Rust PHY abstractions to the ETHERNET PHY LIBRARY FUJITA Tomonori
2023-10-02 8:53 ` [PATCH v1 3/3] net: phy: add Rust Asix PHY driver FUJITA Tomonori
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=20231002085302.2274260-1-fujita.tomonori@gmail.com \
--to=fujita.tomonori@gmail.com \
--cc=andrew@lunn.ch \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/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).