[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250409071549.6e1934ab@kernel.org>
Date: Wed, 9 Apr 2025 07:15:49 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: Jacob Keller <jacob.e.keller@...el.com>, <davem@...emloft.net>,
<netdev@...r.kernel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<andrew+netdev@...n.ch>, <horms@...nel.org>, <yuyanghuang@...gle.com>,
<sdf@...ichev.me>, <gnault@...hat.com>, <nicolas.dichtel@...nd.com>,
<petrm@...dia.com>
Subject: Re: [PATCH net-next 01/13] netlink: specs: rename rtnetlink specs
in accordance with family name
I thought about it some more.
On Wed, 09 Apr 2025 13:15:42 +0100 Donald Hunter wrote:
> I'll just note that the genl convention is underscores in family names,
> if you wanted consistency across all families.
I wasn't clear on whether it's a convention or just how we did things
historically. We recommend the use of dashes in the spec itself so it
stands to reason to also use dashes in the family name.
But replacing dashes with underscores is a "C thing", and family name
string is used by all languages, so we shouldn't s/-/_/ when we output
the family name for the kernel's code struct genl_family.
IOW I think that either we
- accept the slight inconsistency with old families using _, or
- accept the slight annoyance with all languages having to do s/-/_/
when looking up family ID, or
- accept the inconsistency with all name properties in new YAML spec
being separated with - and just the family name always using _.
:( I picked the first option, assuming the genl family names don't have
much of a convention. Admittedly I don't know of any with dashes but
some of them use capital letters :S
LMK if you think we should pick differently. In my mind picking option
1 is prioritizing consistency of the spec language over the consistency
of user experience. We can alleviate the annoyance of typing --family ..
with bash completions?
Powered by blists - more mailing lists