Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jiri Pirko
Fri, Oct 18, 2019 at 10:27:48PM CEST, and...@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, and...@lunn.ch wrote: >> >On Fri, Oct 18, 2019 at 06:07:26PM +0200, Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> >> >> Currently, the

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jakub Kicinski
On Fri, 18 Oct 2019 22:27:48 +0200, Andrew Lunn wrote: > 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

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Andrew Lunn
On Fri, Oct 18, 2019 at 10:08:22PM +0200, Jiri Pirko wrote: > Fri, Oct 18, 2019 at 07:43:04PM CEST, and...@lunn.ch wrote: > >On Fri, Oct 18, 2019 at 06:07:26PM +0200, Jiri Pirko wrote: > >> From: Jiri Pirko > >> > >> Currently, the name format is not required by the code, however it is > >> requi

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jiri Pirko
Fri, Oct 18, 2019 at 07:43:04PM CEST, and...@lunn.ch wrote: >On Fri, Oct 18, 2019 at 06:07:26PM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> 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

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Andrew Lunn
On Fri, Oct 18, 2019 at 06:07:26PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > 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 under

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jiri Pirko
Fri, Oct 18, 2019 at 06:25:50PM CEST, jakub.kicin...@netronome.com wrote: >On Fri, 18 Oct 2019 18:07:26 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> 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

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jiri Pirko
Fri, Oct 18, 2019 at 06:35:09PM CEST, step...@networkplumber.org wrote: >On Fri, 18 Oct 2019 18:07:26 +0200 >Jiri Pirko wrote: > >> +static bool devlink_param_valid_name(const char *name) >> +{ >> +int len = strlen(name); >> +int i; >> + >> +/* Name can contain lowercase characters or

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jiri Pirko
Fri, Oct 18, 2019 at 06:33:22PM CEST, step...@networkplumber.org wrote: >On Fri, 18 Oct 2019 18:07:26 +0200 >Jiri Pirko wrote: > >> +static bool devlink_param_valid_name(const char *name) >> +{ >> +int len = strlen(name); >> +int i; >> + >> +/* Name can contain lowercase characters or

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Stephen Hemminger
On Fri, 18 Oct 2019 18:07:26 +0200 Jiri Pirko wrote: > +static bool devlink_param_valid_name(const char *name) > +{ > + int len = strlen(name); > + int i; > + > + /* Name can contain lowercase characters or digits. > + * Underscores are also allowed, but not at the beginning > +

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Stephen Hemminger
On Fri, 18 Oct 2019 18:07:26 +0200 Jiri Pirko wrote: > +static bool devlink_param_valid_name(const char *name) > +{ > + int len = strlen(name); > + int i; > + > + /* Name can contain lowercase characters or digits. > + * Underscores are also allowed, but not at the beginning > +

Re: [patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jakub Kicinski
On Fri, 18 Oct 2019 18:07:26 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > 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

[patch net-next] devlink: add format requirement for devlink param names

2019-10-18 Thread Jiri Pirko
From: Jiri Pirko 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