All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danielle Ratson <danieller@nvidia.com>
To: Michal Kubecek <mkubecek@suse.cz>, Edwin Peer <edwin.peer@broadcom.com>
Cc: netdev <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@nvidia.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	mlxsw <mlxsw@nvidia.com>, Ido Schimmel <idosch@nvidia.com>
Subject: RE: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters
Date: Sun, 31 Jan 2021 15:33:10 +0000	[thread overview]
Message-ID: <DM6PR12MB4516868A5BD4C2EED7EF818BD8B79@DM6PR12MB4516.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210128202632.iqixlvdfey6sh7fe@lion.mk-sys.cz>



> -----Original Message-----
> From: Michal Kubecek <mkubecek@suse.cz>
> Sent: Thursday, January 28, 2021 10:27 PM
> To: Danielle Ratson <danieller@nvidia.com>
> Cc: Edwin Peer <edwin.peer@broadcom.com>; netdev <netdev@vger.kernel.org>; David S . Miller <davem@davemloft.net>; Jakub
> Kicinski <kuba@kernel.org>; Jiri Pirko <jiri@nvidia.com>; Andrew Lunn <andrew@lunn.ch>; f.fainelli@gmail.com; mlxsw
> <mlxsw@nvidia.com>; Ido Schimmel <idosch@nvidia.com>
> Subject: Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters
> 
> On Wed, Jan 27, 2021 at 01:22:02PM +0000, Danielle Ratson wrote:
> > > -----Original Message-----
> > > From: Edwin Peer <edwin.peer@broadcom.com>
> > > Sent: Tuesday, January 26, 2021 7:14 PM
> > > To: Danielle Ratson <danieller@nvidia.com>
> > > Cc: netdev <netdev@vger.kernel.org>; David S . Miller
> > > <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Jiri Pirko
> > > <jiri@nvidia.com>; Andrew Lunn <andrew@lunn.ch>;
> > > f.fainelli@gmail.com; Michal Kubecek <mkubecek@suse.cz>; mlxsw
> > > <mlxsw@nvidia.com>; Ido Schimmel <idosch@nvidia.com>
> > > Subject: Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use
> > > instead of speed and duplex parameters
> > >
> > > For one thing, it's cleaner if the driver API is symmetric. The
> > > proposed solution sets attributes in terms of speeds and lanes,
> > > etc., but it gets them in terms of a compound link_info. But, this
> > > asymmetry aside, if link_mode may eventually become R/W at the
> > > driver API, as you suggest, then it is more appropriate to guard it
> > > with a capability bit, as has been done for lanes, rather than use
> > > the -1 special value to indicate that the driver did not set it.
> > >
> > > Regards,
> > > Edwin Peer
> >
> > This patchset adds lanes parameter, not link_mode. The link_mode
> > addition was added as a read-only parameter for the reasons we
> > mentioned, and I am not sure that implementing the symmetric side is
> > relevant for this patchset.
> >
> > Michal, do you think we will use the Write side of the link_mode
> > parameter?
> 
> It makes sense, IMHO. Unless we also add "media" (or whatever name would be most appropriate) parameter, we cannot in general
> fully determine the link mode by speed, duplex and lanes. And using "advertise" to select a specific mode with disabled
> autonegotiation would be rather confusing, I believe. (At the moment, ethtool does not even support syntax like "advertise <mode>"
> but it will be easy to support "advertise <mode>... [--]" and I think we should extend the syntax to support it, regardless of what we
> choose.) So if we want to allow user to pick a specific link node by name or bit mask (or rather index?), I would prefer using a separate
> parameter.
> 
> >            And if so, do you think it is relevant for this specific
> > patchset?
> 
> I don't see an obvious problem with leaving that part for later so I would say it's up to you.
> 
> Michal

Thanks Michal.

Edwin, adding the a new parameter requires a new patchset in my opinion. Implementing the symmetrical side of the link_mode get,
however can be a part of this set. But, the problem with that would be that, as Michal said, speed lanes and duplex can't provide us a single
link_mode because of the media. And since link_mode is one bit parameter, passing it to the driver while randomly choosing the media, may
cause either information loss, or even fail to sync on a link mode if the chosen media is specifically not supported in the lower levels.
So, in my opinion it is related to adding the new parameter we discussed, and should be done in a separate set.

Thanks,
Danielle


  reply	other threads:[~2021-01-31 15:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20  9:37 [PATCH net-next v3 0/7] Support setting lanes via ethtool Danielle Ratson
2021-01-20  9:37 ` [PATCH net-next v3 1/7] ethtool: Extend link modes settings uAPI with lanes Danielle Ratson
2021-01-20 22:35   ` Edwin Peer
2021-02-02 18:08     ` Danielle Ratson
2021-01-22  3:44   ` Jakub Kicinski
2021-01-25 15:53     ` Danielle Ratson
2021-01-25 19:02       ` Jakub Kicinski
2021-01-20  9:37 ` [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters Danielle Ratson
2021-01-20 23:39   ` Edwin Peer
2021-01-24  8:36     ` Danielle Ratson
2021-01-25 18:03       ` Edwin Peer
2021-01-26 17:06         ` Danielle Ratson
2021-01-26 17:14           ` Edwin Peer
2021-01-27 13:22             ` Danielle Ratson
2021-01-28 20:26               ` Michal Kubecek
2021-01-31 15:33                 ` Danielle Ratson [this message]
2021-01-31 17:39                   ` Edwin Peer
2021-02-01 13:49                     ` Danielle Ratson
2021-02-01 18:14                       ` Edwin Peer
2021-02-01 20:29                         ` Jakub Kicinski
2021-02-01 21:05                           ` Edwin Peer
2021-02-01 21:41                             ` Jakub Kicinski
2021-02-01 21:59                               ` Edwin Peer
2021-02-01 22:20                                 ` Jakub Kicinski
2021-02-02  0:14                                   ` Edwin Peer
2021-02-02  1:08                                     ` Jakub Kicinski
2021-01-20  9:37 ` [PATCH net-next v3 3/7] ethtool: Expose the number of lanes in use Danielle Ratson
2021-01-20  9:37 ` [PATCH net-next v3 4/7] mlxsw: ethtool: Remove max lanes filtering Danielle Ratson
2021-01-20  9:37 ` [PATCH net-next v3 5/7] mlxsw: ethtool: Add support for setting lanes when autoneg is off Danielle Ratson
2021-01-20  9:37 ` [PATCH net-next v3 6/7] mlxsw: ethtool: Pass link mode in use to ethtool Danielle Ratson
2021-01-20  9:37 ` [PATCH net-next v3 7/7] net: selftests: Add lanes setting test Danielle Ratson

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=DM6PR12MB4516868A5BD4C2EED7EF818BD8B79@DM6PR12MB4516.namprd12.prod.outlook.com \
    --to=danieller@nvidia.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edwin.peer@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mkubecek@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.