From: Andrew Lunn <andrew@lunn.ch>
To: Benno Lossin <benno.lossin@proton.me>
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>,
netdev@vger.kernel.org, rust-for-linux@vger.kernel.org,
miguel.ojeda.sandonis@gmail.com, tmgross@umich.edu,
boqun.feng@gmail.com, wedsonaf@gmail.com, greg@kroah.com
Subject: Re: [PATCH net-next v4 1/4] rust: core abstractions for network PHY drivers
Date: Sat, 14 Oct 2023 04:12:57 +0200 [thread overview]
Message-ID: <4b7096cd-076d-42fd-b0cc-f842d3b64ee4@lunn.ch> (raw)
In-Reply-To: <85d5c498-efbc-4c1a-8d12-f1eca63c45cf@proton.me>
> > +config RUST_PHYLIB_ABSTRACTIONS
> > + bool "PHYLIB abstractions support"
> > + depends on RUST
> > + depends on PHYLIB=y
> > + help
> > + Adds support needed for PHY drivers written in Rust. It provides
> > + a wrapper around the C phylib core.
> > +
>
> I find it a bit weird that this is its own option under "General". I think
> it would be reasonable to put it under "Rust", since that would also scale
> better when other subsystems do this.
To some extent, this is just a temporary location. Once the
restrictions of the build systems are solved, i expect this will move
into drivers/net/phy/Kconfig, inside the 'if PHYLIB'. However, i
agree, this should be under the Rust menu.
> > + }
> > +
> > + /// Reads a given C22 PHY register.
> > + pub fn read(&self, regnum: u16) -> Result<u16> {
>
> No idea if this function should be `&mut self` or `&self`. Would
> it be ok for mutltiple threads to call this function concurrently?
> If yes, then leave it as `&self`, if no then change it to `&mut self`.
The MDIO layer before has a lock, so its will serialize parallel
reads/writes. With the current Rust integration, it should never be
possible for multiple threads to be active at once, but if it does
happen, its not a problem anyway.
Andrew
next prev parent reply other threads:[~2023-10-14 2:13 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 12:53 [PATCH net-next v4 0/4] Rust abstractions for network PHY drivers FUJITA Tomonori
2023-10-12 12:53 ` [PATCH net-next v4 1/4] rust: core " FUJITA Tomonori
2023-10-13 21:31 ` Benno Lossin
2023-10-14 2:12 ` Andrew Lunn [this message]
2023-10-14 4:50 ` FUJITA Tomonori
2023-10-14 17:00 ` Miguel Ojeda
2023-10-14 23:18 ` FUJITA Tomonori
2023-10-15 15:47 ` Andrew Lunn
2023-10-14 7:22 ` FUJITA Tomonori
2023-10-14 8:07 ` Benno Lossin
2023-10-14 10:32 ` FUJITA Tomonori
2023-10-14 14:54 ` Benno Lossin
2023-10-14 15:53 ` Boqun Feng
2023-10-14 16:15 ` FUJITA Tomonori
2023-10-14 17:07 ` Benno Lossin
2023-10-14 21:18 ` Andrew Lunn
2023-10-14 22:39 ` FUJITA Tomonori
2023-10-17 7:06 ` Benno Lossin
2023-10-17 7:32 ` FUJITA Tomonori
2023-10-17 7:41 ` Benno Lossin
2023-10-17 11:32 ` FUJITA Tomonori
2023-10-17 12:38 ` Andrew Lunn
2023-10-17 14:04 ` Benno Lossin
2023-10-17 14:21 ` Greg KH
2023-10-17 14:32 ` Benno Lossin
2023-10-17 15:17 ` Miguel Ojeda
2023-10-17 16:15 ` Greg KH
2023-10-17 16:13 ` Boqun Feng
2023-10-17 15:03 ` Miguel Ojeda
2023-10-14 12:00 ` Miguel Ojeda
2023-10-12 12:53 ` [PATCH net-next v4 2/4] rust: net::phy add module_phy_driver macro FUJITA Tomonori
2023-10-12 12:53 ` [PATCH net-next v4 3/4] MAINTAINERS: add Rust PHY abstractions to the ETHERNET PHY LIBRARY FUJITA Tomonori
2023-10-13 14:34 ` Boqun Feng
2023-10-13 15:24 ` FUJITA Tomonori
2023-10-13 16:10 ` Boqun Feng
2023-10-13 16:17 ` Trevor Gross
2023-10-13 18:43 ` Miguel Ojeda
2023-10-13 18:49 ` Andrew Lunn
2023-10-14 5:15 ` FUJITA Tomonori
2023-10-14 18:18 ` Miguel Ojeda
2023-10-12 12:53 ` [PATCH net-next v4 4/4] net: phy: add Rust Asix PHY driver FUJITA Tomonori
2023-10-14 6:01 ` 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=4b7096cd-076d-42fd-b0cc-f842d3b64ee4@lunn.ch \
--to=andrew@lunn.ch \
--cc=benno.lossin@proton.me \
--cc=boqun.feng@gmail.com \
--cc=fujita.tomonori@gmail.com \
--cc=greg@kroah.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=wedsonaf@gmail.com \
/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).