On Mon, 15 May 2023 16:14:56 +0200 Andrew Lunn <andrew@xxxxxxx> wrote: > On Mon, May 15, 2023 at 04:34:28AM +0000, FUJITA Tomonori wrote: >> From: FUJITA Tomonori <fujita.tomonori@xxxxxxxxx> >> >> minimum abstraction for networking. > >> Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxx> >> --- >> 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,