[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdYJJ-1D2d71-Vz2@nanopsycho>
Date: Wed, 21 Feb 2024 15:31:03 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
edumazet@...gle.com, jacob.e.keller@...el.com,
swarupkotikalapudi@...il.com, donald.hunter@...il.com,
sdf@...gle.com, lorenzo@...nel.org, alessandromarcolini99@...il.com
Subject: Re: [patch net-next 03/13] tools: ynl: allow user to pass enum
string instead of scalar value
Wed, Feb 21, 2024 at 02:55:56AM CET, kuba@...nel.org wrote:
>On Tue, 20 Feb 2024 08:25:14 +0100 Jiri Pirko wrote:
>> >It'd be cleaner to make it more symmetric with _decode_enum(), and call
>> >it _encode_enum().
>>
>> That is misleading name, as it does not have to be enum.
>
>It's a variant of a encode function using enum metadata.
Not really. "decode_enum()" is exactly that, it only works with enum
case. Here, the enum is optional. If user passes scalar directly or if
the attribute does not have "enum" defined, this has nothing to do with
enum. But, as you wish.
Powered by blists - more mailing lists