Re: [PATCH v4 5/7] gpu: nova-core: add NVKV typed encoding

From: Alexandre Courbot

Date: Mon Oct 26 2026 - 02:47:41 EST


On Fri Oct 16, 2026 at 10:53 AM JST, Eliot Courtney wrote:
> For struct-like GMCAPI messages encoding field by field manually is
> noisy. Add some type machinery and a macro to automate encoding of
> struct-like messages. The `Encodable` trait can be implemented by any
> type to say that it can be encoded into an NVKV `Encoder`. Add a simple
> `nvkv_encode!` macro that works on structs and encodes each field in
> order. Provide some base types, such as `Key` which statically
> associates an NVKV key with some value, to avoid having to make a lot of
> newtypes and implement `Encodable` on them.
>
> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>

Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>