Subject: Re: [patch net-next v3] tools: ynl: introduce option to process unknown attributes or types

From: Jakub Kicinski <[email-masked]>
Date: Fri, 27 Oct 2023 07:08:15 -0700

On Fri, 27 Oct 2023 10:36:51 +0200 Jiri Pirko wrote:
> >Maybe a good compromise is to stick it into the key, instead of the
> >value. Replacing the stringified type id. Then you can keep the
> >value as binary.  
> 
> Okay, that sounds good. But "key": \bvalue is not something to be
> printed out by __repr__() as it outs string. Therefore I don't
> understand how this compiles with your key requirement above.
> I have to be missing something, pardon my ignorance.

FWIW the assignment would then become (pseudo-code):

	if real attr:
		rsp[name] = [decoded]
	else:
		rsp[UnknownNlAttrKey(nla)] = self._decode_unknown(nla)