netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Danielle Ratson <danieller@nvidia.com>,
	Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
	Ido Schimmel <idosch@idosch.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Jiri Pirko <jiri@nvidia.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	mlxsw <mlxsw@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>
Subject: Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes
Date: Mon, 19 Oct 2020 15:24:46 +0200	[thread overview]
Message-ID: <20201019132446.tgtelkzmfjdonhfx@lion.mk-sys.cz> (raw)
In-Reply-To: <20201019122643.GC11282@nanopsycho.orion>

On Mon, Oct 19, 2020 at 02:26:43PM +0200, Jiri Pirko wrote:
> Mon, Oct 19, 2020 at 01:04:22PM CEST, mkubecek@suse.cz wrote:
> >
> >It would be quite easy to extend the ethtool command line parser to
> >allow also
> >
> >  ethtool -s <dev> advertise <mode> ...
> >
> >in addition to already supported
> >
> >  ethtool -s <dev> advertise <mask>
> >  ethtool -s <dev> advertise <mask>/<mask>
> >  ethtool -s { <mode> { on | off } } ...

This should have been

  ethtool -s <dev> advertise { <mode> { on | off } } ...

> >Parser converting simple list of values into a maskless bitset is
> >already there so it would be only matter of checking if there are at
> >least two arguments and second is "on" or "off" and using corresponding
> >parser. I think it would be useful independently of this series.
> 
> Understood. So basically you will pass some selectors on cmdline and the
> uapi would stay intact.
> How do you imagine the specific lane number selection should look like
> on the cmdline?

As I said, I meant the extension suggested in my mail as independent of
what this series is about. For lanes count selector, I find proposed

  ethtool -s <dev> ... lanes <lanes_num> ...

the most natural.

From purely syntactic/semantic point of view, there are three types of
requests:

  (1) enable specific set of modes, disable the rest
  (2) enable/disable specific modes, leave the rest as they are
  (3) enable modes matching a condition (and disable the rest)

What I proposed was to allow the use symbolic names instead of masks
(which are getting more and more awful with each new mode) also for (1),
like they can already be used for (2).

The lanes selector is an extension of (3) which I would prefer not to
mix with (1) or (2) within one command line, i.e. either "advertise" or
"speed / duplex / lanes".

IIUC Jakub's and Andrew's comments were not so much about the syntax and
semantic (which is quite clear) but rather about the question if the
requests like "advertise exactly the modes with (100Gb/s speed and) two
lanes" would really address a real life need and wouldn't be more often
used as shortcuts for "advertise 100000baseKR2/Full". (On the other
hand, I suspect existing speed and duplex selectors are often used the
same way.)

Michal

  reply	other threads:[~2020-10-19 13:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-10 15:41 [PATCH net-next 0/6] Support setting lanes via ethtool Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes Ido Schimmel
2020-10-11 22:37   ` Jakub Kicinski
2020-10-12 15:33     ` Danielle Ratson
2020-10-12 15:58       ` Jakub Kicinski
2020-10-13 14:29         ` Danielle Ratson
2020-10-13 15:43           ` Jakub Kicinski
2020-10-16 22:15           ` Andrew Lunn
2020-10-19  7:19             ` Danielle Ratson
2020-10-19 11:04               ` Michal Kubecek
2020-10-19 12:26                 ` Jiri Pirko
2020-10-19 13:24                   ` Michal Kubecek [this message]
2020-10-20  7:39                     ` Danielle Ratson
2020-10-21  7:08                       ` Michal Kubecek
2020-10-21  7:20                         ` Danielle Ratson
2020-10-21  8:47                           ` Michal Kubecek
2020-10-22  6:15                             ` Danielle Ratson
2020-10-22 16:27                               ` Michal Kubecek
2020-11-23  9:47                                 ` Danielle Ratson
2020-11-24 22:12                                   ` Michal Kubecek
2020-11-25 10:35                                     ` Danielle Ratson
2020-11-26 21:07                                       ` Michal Kubecek
2020-12-01 17:22                                         ` Danielle Ratson
2020-12-02  0:52                                           ` Edwin Peer
2020-12-02  1:17                                           ` Edwin Peer
2020-10-19 12:24             ` Jiri Pirko
2020-10-19 12:38               ` Andrew Lunn
2020-10-12 16:40       ` Michal Kubecek
2020-10-12 19:10     ` Johannes Berg
2020-10-12 20:08       ` Jakub Kicinski
2020-10-12 17:03   ` Michal Kubecek
2020-11-19 20:38   ` Edwin Peer
2020-11-23  9:40     ` Jiri Pirko
2020-11-30 17:01       ` Edwin Peer
2020-11-30 17:14         ` Jiri Pirko
2020-11-30 18:00           ` Edwin Peer
2020-12-01 11:22             ` Jiri Pirko
2020-12-02  0:32               ` Edwin Peer
2020-12-02 10:09                 ` Jiri Pirko
2020-12-02 17:53                   ` Edwin Peer
2020-10-10 15:41 ` [PATCH net-next 2/6] ethtool: Expose the number of lanes in use Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 3/6] mlxsw: ethtool: Remove max lanes filtering Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 4/6] mlxsw: ethtool: Add support for setting lanes when autoneg is off Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 5/6] mlxsw: ethtool: Expose the number of lanes in use Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 6/6] net: selftests: Add lanes setting test Ido Schimmel

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=20201019132446.tgtelkzmfjdonhfx@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@idosch.org \
    --cc=idosch@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.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).