[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230620084749.597f10b3@kernel.org>
Date: Tue, 20 Jun 2023 08:47:49 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Alice Ryhl <alice@...l.io>
Cc: Andrew Lunn <andrew@...n.ch>, FUJITA Tomonori
<fujita.tomonori@...il.com>, netdev@...r.kernel.org,
rust-for-linux@...r.kernel.org, aliceryhl@...gle.com,
miguel.ojeda.sandonis@...il.com
Subject: Re: [PATCH 0/5] Rust abstractions for network device drivers
On Sat, 17 Jun 2023 12:08:26 +0200 Alice Ryhl wrote:
> > The drop reason indicates why the packet was dropped. It should give
> > some indication of what problem occurred which caused the drop. So
> > ideally we don't want an anonymous drop. The C code does not enforce
> > that, but it would be nice if the rust wrapper to dispose of an skb
> > did enforce it.
>
> It sounds like a destructor with WARN_ON is the best approach right now.
>
> Unfortunately, I don't think we can enforce that the destructor is not
> used today. That said, in the future it may be possible to implement a
> linter that detects it - I know that there have already been experiments
> with other custom lints for the kernel (e.g., enforcing that you don't
> sleep while holding a spinlock).
Can we do something to hide the destructor from the linker?
Powered by blists - more mailing lists