netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	jakub.kicinski@netronome.com, mlxsw@mellanox.com
Subject: Re: [patch net-next] devlink: add format requirement for devlink param names
Date: Sat, 19 Oct 2019 07:39:55 +0200	[thread overview]
Message-ID: <20191019053955.GJ2185@nanopsycho> (raw)
In-Reply-To: <20191018202748.GL4780@lunn.ch>

Fri, Oct 18, 2019 at 10:27:48PM CEST, andrew@lunn.ch wrote:
>On Fri, Oct 18, 2019 at 10:08:22PM +0200, Jiri Pirko wrote:
>> Fri, Oct 18, 2019 at 07:43:04PM CEST, andrew@lunn.ch wrote:
>> >On Fri, Oct 18, 2019 at 06:07:26PM +0200, Jiri Pirko wrote:
>> >> From: Jiri Pirko <jiri@mellanox.com>
>> >> 
>> >> Currently, the name format is not required by the code, however it is
>> >> required during patch review. All params added until now are in-lined
>> >> with the following format:
>> >> 1) lowercase characters, digits and underscored are allowed
>> >> 2) underscore is neither at the beginning nor at the end and
>> >>    there is no more than one in a row.
>> >> 
>> >> Add checker to the code to require this format from drivers and warn if
>> >> they don't follow.
>> >
>> >Hi Jiri
>> >
>> >Could you add a reference to where these requirements are derived
>> >from. What can go wrong if they are ignored? I assume it is something
>> 
>> Well, no reference. All existing params, both generic and driver
>> specific are following this format. I just wanted to make that required
>> so all params are looking similar.
>> 
>> 
>> >to do with sysfs?
>> 
>> No, why would you think so?
>
>I was not expecting it to be totally arbitrary. I thought you would
>have a real technical reason. Spaces often cause problems, as well as
>/ etc.
>
>I've had problems with hwmon device names breaking assumptions in the
>user space code, etc. I was expecting something like this.
>
>I don't really like the all lower case restriction. It makes it hard
>to be consistent. All Marvell Docs refer to the Address Translation
>Unit as ATU. I don't think there is any reference to atu. I would
>prefer to be consistent with the documentation and use ATU. But that
>is against your arbitrary rules.


There are already params with abbrs that could be upper case. So if we
do uppercase now, it would be inconsistent. I just
want the format to be as simple as possible. lowercase, digits and "_"
is very simple and can accomodate everything.


>
>       Andrew

      parent reply	other threads:[~2019-10-19  5:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 16:07 [patch net-next] devlink: add format requirement for devlink param names Jiri Pirko
2019-10-18 16:25 ` Jakub Kicinski
2019-10-18 16:58   ` Jiri Pirko
2019-10-18 16:33 ` Stephen Hemminger
2019-10-18 16:58   ` Jiri Pirko
2019-10-18 16:35 ` Stephen Hemminger
2019-10-18 16:58   ` Jiri Pirko
2019-10-18 17:43 ` Andrew Lunn
2019-10-18 20:08   ` Jiri Pirko
2019-10-18 20:27     ` Andrew Lunn
2019-10-18 21:34       ` Jakub Kicinski
2019-10-19  5:39       ` Jiri Pirko [this message]

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=20191019053955.GJ2185@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /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).