Re: [PATCH 03/27] gpu: nova-core: set MCTP transport header version to 1
Zhi Wang <[email protected]>
| Newsgroups | dev.linux.lists.nova-gpu,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260821080153.469c0655@inno-dell> |
On Thu, 20 Aug 2026 19:31:33 -0700 John Hubbard <[email protected]> wrote: No need to reply to each comment. :) Feel free to use whichever feedback you find helpful. I am just glad I could help a bit. Z. > On 8/20/26 2:38 AM, Zhi Wang wrote: > > On Tue, 18 Aug 2026 20:51:56 -0700 > > John Hubbard <[email protected]> wrote: > > > > One nit: might be better to update the doc as well. > > Yes. Agreed. I'll send individual replies to the patch feedback > as usual, but let me first mention that I've applied all of your > and Timur's feedback, 100%, to a -v2 branch already. > > It's passing tests cleanly, so as soon as I make a few more passes > through it I'll post that. Likely tomorrow. > > thanks, > John Hubbard > > > > > Reviewed-by: Zhi Wang <[email protected]> > > > > diff --git a/Documentation/gpu/nova/core/fsp.rst > > b/Documentation/gpu/nova/core/fsp.rst index > > 52d618d22bb8..60c647181da0 100644 --- > > a/Documentation/gpu/nova/core/fsp.rst +++ > > b/Documentation/gpu/nova/core/fsp.rst @@ -106,6 +106,8 @@ All FSP > > messages share a common header format consisting of two 32-bit > > words: > > - Bit 30: EOM (End of Message) > > - Bits 29:28: Packet sequence number > > - Bits 23:16: Source Endpoint ID > > +- Bits 15:8: Destination Endpoint ID > > +- Bits 3:0: MCTP header version (1) > > > > **NVDM header** (NVIDIA Vendor Defined Message): > > > > > > > >> FSP requires MCTP transport header version 1. Nova-core leaves > >> version bits 3:0 at zero, so every CoT and PRC request carries an > >> invalid transport header. > >> > >> Define the version and destination endpoint ID fields. Set the > >> version to 1 for single-packet requests, and leave the unused > >> destination endpoint ID at zero. > >> > >> Assisted-by: Cursor:claude-opus-5 > >> Signed-off-by: John Hubbard <[email protected]> > >> --- > >> drivers/gpu/nova-core/mctp.rs | 14 ++++++++++++-- > >> 1 file changed, 12 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/gpu/nova-core/mctp.rs > >> b/drivers/gpu/nova-core/mctp.rs index 90c642c91a72..03546213da28 > >> 100644 --- a/drivers/gpu/nova-core/mctp.rs > >> +++ b/drivers/gpu/nova-core/mctp.rs > >> @@ -42,13 +42,23 @@ pub(crate) struct MctpHeader(u32) { > >> 29:28 seq; > >> /// Source endpoint ID. > >> 23:16 seid; > >> + /// Destination endpoint ID. > >> + 15:8 deid; > >> + /// MCTP header version. > >> + 3:0 version; > >> } > >> } > >> > >> impl MctpHeader { > >> - /// Builds a single-packet MCTP header (`SOM=1`, `EOM=1`, > >> `SEQ=0`, `SEID=0`). > >> + /// MCTP specification version 1.0. > >> + const VERSION: u32 = 1; > >> + > >> + /// Builds a single-packet MCTP header (`SOM=1`, `EOM=1`, > >> `SEQ=0`, `SEID=0`, `VERSION=1`). pub(crate) fn single_packet() -> > >> Self { > >> - Self::zeroed().with_som(true).with_eom(true) > >> + Self::zeroed() > >> + .with_const_version::<{ Self::VERSION }>() > >> + .with_som(true) > >> + .with_eom(true) > >> } > >> > >> /// Returns whether this is a complete single-packet message > >> (`SOM=1` and `EOM=1`). > > > > >