mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Eliot Courtney" <ecourtney@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	<nouveau@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/7] gpu: nova-core: gsp: add mechanism to wait for space on command queue
Date: Wed, 18 Feb 2026 16:20:34 +0900	[thread overview]
Message-ID: <DGHWME7KSKXW.2DIMW5UTM5NO@nvidia.com> (raw)
In-Reply-To: <DGHSGO2E0U9F.2M8MOSKBNA9JY@nvidia.com>

On Wed Feb 18, 2026 at 1:05 PM JST, Eliot Courtney wrote:
>>> +    fn command_size<M>(command: &M) -> usize
>>
>> Shouldn't this be a member function of `CommandToGsp`? Please add some
>> basic documentation for it as well. As a general rule, all methods, even
>> basic ones, should have at least one line of doccomment.
>
> I thought about this, but adding a function to CommandToGsp with
> a default implementation seems odd to me, because implementors of that
> trait could override it, which does not really make sense. We have
> command size defined as the size of the struct plus the variable payload
> size. Adding a function to CommandToGsp would give two methods to
> calculate the command size which could differ. So, seems weird to me.
>
> An alternative would be to make it a free standing function. This would
> let it be used by WrappingCommand later as well. WDYT?

Using default trait methods even when they should not be overriden is
common in the kernel, so I am not worried about that. But you are right
that the use of this size is local to the command queue so maybe it's
better to keep it as a (documented :)) method of it.

  reply	other threads:[~2026-02-18  7:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12  6:28 [PATCH 0/7] gpu: nova-core: gsp: add continuation record support Eliot Courtney
2026-02-12  6:28 ` [PATCH 1/7] gpu: nova-core: gsp: sort MsgFunction variants alphabetically Eliot Courtney
2026-02-12  6:28 ` [PATCH 2/7] gpu: nova-core: gsp: add mechanism to wait for space on command queue Eliot Courtney
2026-02-18  3:13   ` Alexandre Courbot
2026-02-18  4:05     ` Eliot Courtney
2026-02-18  7:20       ` Alexandre Courbot [this message]
2026-02-12  6:28 ` [PATCH 3/7] gpu: nova-core: gsp: add checking oversized commands Eliot Courtney
2026-02-18  3:23   ` Alexandre Courbot
2026-02-18  6:50     ` Eliot Courtney
2026-02-18  7:25       ` Alexandre Courbot
2026-02-12  6:28 ` [PATCH 4/7] gpu: nova-core: gsp: clarify invariant on command queue Eliot Courtney
2026-02-12  6:28 ` [PATCH 5/7] gpu: nova-core: gsp: unconditionally call variable payload handling Eliot Courtney
2026-02-12  6:28 ` [PATCH 6/7] gpu: nova-core: gsp: support large RPCs via continuation record Eliot Courtney
2026-02-18  7:16   ` Alexandre Courbot
2026-02-18  9:00     ` Eliot Courtney
2026-02-18 11:49       ` Alexandre Courbot
2026-02-12  6:28 ` [PATCH 7/7] gpu: nova-core: gsp: add tests for WrappingCommand Eliot Courtney
2026-02-17 18:18 ` [PATCH 0/7] gpu: nova-core: gsp: add continuation record support John Hubbard

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=DGHWME7KSKXW.2DIMW5UTM5NO@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=simona@ffwll.ch \
    /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®