[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <010101882315a489-908f5965-2e67-497f-97f8-5c91bc928673-000000@us-west-2.amazonses.com>
Date: Tue, 16 May 2023 05:43:21 +0000
From: FUJITA Tomonori <tomo@...bit.dev>
To: andrew@...n.ch
Cc: tomo@...bit.dev, rust-for-linux@...r.kernel.org,
netdev@...r.kernel.org, linux-crypto@...r.kernel.org,
fujita.tomonori@...il.com
Subject: Re: [PATCH 2/2] rust: add socket support
On Mon, 15 May 2023 16:14:56 +0200
Andrew Lunn <andrew@...n.ch> wrote:
> On Mon, May 15, 2023 at 04:34:28AM +0000, FUJITA Tomonori wrote:
>> From: FUJITA Tomonori <fujita.tomonori@...il.com>
>>
>> minimum abstraction for networking.
>
>> Signed-off-by: FUJITA Tomonori <fujita.tomonori@...il.com>
>> ---
>> rust/bindings/bindings_helper.h | 3 +
>> rust/kernel/lib.rs | 2 +
>> rust/kernel/net.rs | 174 ++++++++++++++++++++++++++++++++
>
> The full networking API is huge. So trying to put it all into net.rs
> is unlikely to work in the long run. Maybe it would be better to name
> this file based on the tiny little bit of the network API you are
> writing an abstraction for?
Yeah, in the long run. I tried the simplest but if the maintainers
prefer that approach as the first step, I'll update the patch. how
about rust/net/socket.rs ?
> If i'm reading the code correctly, you are abstracting the in kernel
> socket API for only TCP over IPv4. Probably with time that will get
> extended to IPv6, and then UDP. So maybe call this net-kern-socket.rs?
Yes. It's thin abstraction, just wrapping socket APIs. So it's easy to
extend it for IPv6, non IP protocols, etc.
Thanks,
Powered by blists - more mailing lists