mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Rovelli <roveld@usi.ch>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Michele Dalle Rive <dallerivemichele@gmail.com>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Davide Rovelli" <davide.rovelli@usi.ch>,
	rust-for-linux@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev
Subject: Re: [RFC PATCH 0/7] Rust Socket abstractions
Date: Fri, 18 Aug 2023 00:27:33 +0200	[thread overview]
Message-ID: <bddea099-4468-4f96-2e06-2b207b608485@usi.ch> (raw)
In-Reply-To: <CANiq72=3z+FcyYGV0upsezGAkh2J4EmzbJ=5s374gf=10AYnUQ@mail.gmail.com>



On 8/17/23 19:14, Miguel Ojeda wrote:
> On Thu, Aug 17, 2023 at 4:53 PM Michele Dalle Rive
> <dallerivemichele@gmail.com> wrote:
>>
>> The idea behind this patch is that, as of now, Rust is not a viable option for
>> any OOT module that requires even the highest-level network support.
>>
>> I am wondering whether the `net` subsystem is interested in reviewing, giving
>> feedback and eventually accepting code that is currently OOT-only.
> 
> It is unlikely kernel maintainers in general accept code intended for
> out-of-tree modules only.
> 
> To be clear, Rust for Linux's focus has never been out-of-tree
> modules. In fact, the whole effort since the beginning was about
> adding support for Rust in-tree, unlike other projects that e.g.
> linked `rustc`-built object files into an out-of-tree kernel module.
> 
> We do support out-of-tree modules, and have a sample of that, but that
> is just only to the degree that the kernel supports out-of-tree
> modules in general.
> 
> The abstractions that have been upstreamed so far are those that have
> (or should soon have) a user in-tree. Sometimes we have had to bend a
> bit the rules in order to split the dependency chain or make things
> easier, but abstractions (in general) cannot be upstreamed that do not
> have at least an expected and public user that is going upstream too.
> Here, by user, we generally mean an actual driver or useful component
> (rather than a sample).
> 
> If I understood correctly from Zulip, you cannot (right now) show your
> use case because it is confidential and therefore you cannot upstream
> it, so we will need another user (and, of course, that is a necessary
> but not sufficient condition for the code to be accepted).

Correct. I work with Michele, let me clarify. We are a research lab 
working on a low-jitter networking prototype implemented as an internal 
LKM (our last paper: 
https://www.usenix.org/system/files/atc21-jahnke.pdf). When trying to 
convert it to Rust, we noticed the lack of socket abstractions which 
Michele implemented. We then simply thought about sharing the 
abstractions with the community since they could fit a variety of 
use-cases - hence the patch.
We now understand the necessity of a concrete in-tree user, apologies 
for not realising this earlier: we are indeed new to patch process as 
you probably understood.
Our prototype might become available in the future but there's no clear 
path on when, this is our starting point.

> Of course, this does not preclude discussing about them or having a
> `rust-net` branch or sub-subsystem or similar. That could be quite
> useful so develop those users and to experiment. In fact, we are
> actively trying to onboard more people (and companies and other
> entities) to the Rust overall kernel effort, so please feel free to
> join us.

We will be more than happy to. In fact, I think the best place for this 
patch would be in a net branch/subsystem of the Rust for Linux repo. As 
mentioned in the Zulip chat, it's hard to provide a "full-fledged" patch 
in Rust at this point as many network building blocks are missing. The 
result is a number of bindings patches such as this one which do not 
match maintainers' interests but could be useful for other developers to 
eventually make a concrete user. It would have helped us significantly 
when starting this project, I think other researchers/developers share 
the same view.
If anyone is interested, we could add these patches to the mailing list 
with a low priority tag for feedback.

> By the way, I am a bit confused -- the patch seems to add an in-tree
> sample, not an out-of-tree one.

It is an in-tree sample, I guess Michele meant an "out-of-tree use-case" 
as in the sample doesn't introduce new core features in the kernel, just 
showcasing.

  parent reply	other threads:[~2023-08-17 22:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 [this message]
2023-08-18  1:30               ` Andrew Lunn
2023-08-18  7:50                 ` Davide Rovelli
2023-08-18 12:42                   ` Andrew Lunn

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=bddea099-4468-4f96-2e06-2b207b608485@usi.ch \
    --to=roveld@usi.ch \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=andrew@lunn.ch \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dallerivemichele@gmail.com \
    --cc=davem@davemloft.net \
    --cc=davide.rovelli@usi.ch \
    --cc=edumazet@google.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=pabeni@redhat.com \
    --cc=patches@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®