[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260128193011.3294f41e.zhiw@nvidia.com>
Date: Wed, 28 Jan 2026 19:30:11 +0200
From: Zhi Wang <zhiw@...dia.com>
To: Danilo Krummrich <dakr@...nel.org>
CC: Jason Gunthorpe <jgg@...dia.com>, <rust-for-linux@...r.kernel.org>,
<linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<aliceryhl@...gle.com>, <bhelgaas@...gle.com>, <kwilczynski@...nel.org>,
<ojeda@...nel.org>, <alex.gaynor@...il.com>, <boqun.feng@...il.com>,
<gary@...yguo.net>, <bjorn3_gh@...tonmail.com>, <lossin@...nel.org>,
<a.hindborg@...nel.org>, <tmgross@...ch.edu>, <markus.probst@...teo.de>,
<helgaas@...nel.org>, <cjia@...dia.com>, <smitra@...dia.com>,
<ankita@...dia.com>, <aniketa@...dia.com>, <kwankhede@...dia.com>,
<targupta@...dia.com>, <acourbot@...dia.com>, <joelagnelf@...dia.com>,
<jhubbard@...dia.com>, <zhiwang@...nel.org>, <daniel.almeida@...labora.com>
Subject: Re: [PATCH v2 1/2] rust: introduce abstractions for fwctlg
On Wed, 28 Jan 2026 17:35:04 +0100
"Danilo Krummrich" <dakr@...nel.org> wrote:
> On Wed Jan 28, 2026 at 4:56 PM CET, Jason Gunthorpe wrote:
> > On Wed, Jan 28, 2026 at 04:49:07PM +0100, Danilo Krummrich wrote:
snip
> > Or is it needed to add the typestate?
>
> This is something we should consider when a fwctl::Device would have
> different states it can be in, where calling certain methods of a
> fwctl::Device is only valid for a certain state and would cause
> undefined behavior if called from the wrong state.
Are you saying we should define typestate like Device<Bound/Core> also for
fwctl device? I haven't thought about this and some design consideration
would be helpful, as the rust PCI subsystem has it, while some of other
abstractions don't have it. I could start to picture about this if this
is necessary.
Z.
Powered by blists - more mailing lists