[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250429100138.0454967a@kernel.org>
Date: Tue, 29 Apr 2025 10:01:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Saeed Mahameed <saeed@...nel.org>, "David S. Miller"
<davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, Eric Dumazet
<edumazet@...gle.com>, Saeed Mahameed <saeedm@...dia.com>,
netdev@...r.kernel.org, Tariq Toukan <tariqt@...dia.com>, Gal Pressman
<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Jiri Pirko
<jiri@...dia.com>
Subject: Re: [PATCH net-next V3 02/15] devlink: define enum for attr types
of dynamic attributes
On Tue, 29 Apr 2025 13:49:16 +0200 Jiri Pirko wrote:
> >>Why do you keep the DEVLINK_PARAM_TYPE_* defines around?
> >>IMO it'd be fine to just use them directly instead of adding
> >>the new enum, fmsg notwithstanding. But failing that we can rename
> >>in the existing in-tree users to DEVLINK_VAR_ATTR_TYPE_* right?
> >>What does this translating back and forth buy us?
> >
> >Sure, I can do that in a separate patch. I think I will send these
> >patchset separatelly prior to Saeed's patchset.
>
> Hmm, on a second thought, we expose DEVLINK_PARAM_TYPE_* to drivers to
> specify type of driver-specific params:
> git grep DEVLINK_PARAM_TYPE_
> I would like to keep it as part of devlink param api. Looks nicer to me.
> Downside is this switch-case, but who really cares?
Who cares about pointless, duplicated code? I do ✋️
Why do you think it's "nicer" to have DEVLINK_PARAM_TYPE_ and
DEVLINK_VAR_ATTR_TYPE_ be separate things if they define
the same, exact, identical values?
If it's because DEVLINK_VAR_ATTR_TYPE_ has the word _ATTR in
it then I totally agree, lets call it DEVLINK_VAR_TYPE_ :)
Powered by blists - more mailing lists