netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<davem@davemloft.net>, <edumazet@google.com>,
	<johannes@sipsolutions.net>
Subject: Re: [patch net-next 02/10] tools: ynl-gen: introduce support for bitfield32 attribute type
Date: Thu, 12 Oct 2023 14:06:57 -0700	[thread overview]
Message-ID: <b8705217-c26e-454d-a7f7-d24a4d8cbd0d@intel.com> (raw)
In-Reply-To: <ZSe8SGY3QeaJsYfg@nanopsycho>



On 10/12/2023 2:28 AM, Jiri Pirko wrote:
> Wed, Oct 11, 2023 at 08:25:37PM CEST, kuba@kernel.org wrote:
>> On Wed, 11 Oct 2023 19:04:42 +0200 Jiri Pirko wrote:
>>>>> Why? Should be usable for all, same as other types, no?  
>>>>
>>>> array-nest already isn't. I don't see much value in bitfiled32
>>>> and listing it means every future codegen for genetlink will
>>>> have to support it to be compatible. It's easier to add stuff
>>>> than to remove it, so let's not.  
>>>
>>> Interesting. You want to somehow mark bitfield32 obsolete? But why is
>>> it? I mean, what is the reason to discourage use of bitfield32?
>>
>> It's a tradeoff between simplicity of base types and usefulness.
>> bitfield32 is not bad in any way, but:
>>
>> - it's 32b, new features/caps like to start with 64b
> 

To me, this is the biggest annoyance with bitfield32: that its not
flexible in size, which is one of the big benefits of netlink. That
limits bitfield32 to be most useful in places where you don't expect any
such extension.

> That's fun. Back when Jamal (I think it was him) was pushing bitfield32,
> I argued that it would be better to make it flexible bitfield so it it
> future proof. IIRC DavidM said that it should be enough and that you can
> use extra attr in case the current one overflows.
> 
> Sigh :/
> 
I don't like that approach because it means you need different handling
for different sets of bits which can be a bit frustrating. I would have
also preferred flexible bitfield as well.

>> - it doesn't support "by name" operations so ethtool didn't use it
> 
> It follows the original Netlink rule: "all uapi should be well defined in
> enums/defines".
> 

What's the "by name" operation?

> 
>> - it can be trivially re-implemented with 2 attrs
> 
> Yeah, it's basically a wrapper to avoid unnecessary boilerplate and
> re-implementations. But I think that is a good thing. Or do you say it
> is not desirable to rather re-implement this with 2 attrs instead of
> using bitfield32 directly? 
> 

This reads to me as "its easy to re-implement with 2 attributes rather
than baking them into one", and those attributes can support varying
sizes instead of just bitfield32

  reply	other threads:[~2023-10-12 21:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 11:08 [patch net-next 00/10] devlink: finish conversion to generated split_ops Jiri Pirko
2023-10-10 11:08 ` [patch net-next 01/10] genetlink: don't merge dumpit split op for different cmds into single iter Jiri Pirko
2023-10-10 11:24   ` Johannes Berg
2023-10-10 11:39     ` Jiri Pirko
2023-10-10 12:09       ` Johannes Berg
2023-10-10 12:12   ` Johannes Berg
2023-10-10 18:48   ` Jakub Kicinski
2023-10-11  6:08     ` Jiri Pirko
2023-10-11 11:27       ` Jiri Pirko
2023-10-11 16:47         ` Jakub Kicinski
2023-10-11 17:00           ` Jiri Pirko
2023-10-12 20:58           ` Jacob Keller
2023-10-10 11:08 ` [patch net-next 02/10] tools: ynl-gen: introduce support for bitfield32 attribute type Jiri Pirko
2023-10-10 11:11   ` Johannes Berg
2023-10-10 18:58   ` Jakub Kicinski
2023-10-11  6:07     ` Jiri Pirko
2023-10-11 16:52       ` Jakub Kicinski
2023-10-11 17:04         ` Jiri Pirko
2023-10-11 18:25           ` Jakub Kicinski
2023-10-12  9:28             ` Jiri Pirko
2023-10-12 21:06               ` Jacob Keller [this message]
2023-10-13  0:15                 ` Jakub Kicinski
2023-10-13 18:49                   ` Jacob Keller
2023-10-13  0:25               ` Jakub Kicinski
2023-10-10 19:01   ` Jakub Kicinski
2023-10-11  6:06     ` Jiri Pirko
2023-10-10 11:08 ` [patch net-next 03/10] netlink: specs: devlink: remove reload-action from devlink-get cmd reply Jiri Pirko
2023-10-10 11:08 ` [patch net-next 04/10] netlink: specs: devlink: make dont-validate single line Jiri Pirko
2023-10-10 11:08 ` [patch net-next 05/10] netlink: specs: devlink: fix reply command values Jiri Pirko
2023-10-10 18:59   ` Jakub Kicinski
2023-10-11  6:04     ` Jiri Pirko
2023-10-11 16:44       ` Jakub Kicinski
2023-10-11 17:00         ` Jiri Pirko
2023-10-10 11:08 ` [patch net-next 06/10] devlink: make devlink_flash_overwrite enum named one Jiri Pirko
2023-10-10 11:08 ` [patch net-next 07/10] devlink: rename netlink callback to be aligned with the generated ones Jiri Pirko
2023-10-10 11:08 ` [patch net-next 08/10] netlink: specs: devlink: add the remaining command to generate complete split_ops Jiri Pirko
2023-10-10 11:08 ` [patch net-next 09/10] devlink: remove duplicated netlink callback prototypes Jiri Pirko
2023-10-10 11:18 ` [patch net-next 10/10] devlink: remove netlink small_ops Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8705217-c26e-454d-a7f7-d24a4d8cbd0d@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).