[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR12MB4516576B5D5B225540A1C877D8F40@DM6PR12MB4516.namprd12.prod.outlook.com>
Date: Tue, 1 Dec 2020 17:22:44 +0000
From: Danielle Ratson <danieller@...dia.com>
To: Michal Kubecek <mkubecek@...e.cz>
CC: Jiri Pirko <jiri@...nulli.us>, Andrew Lunn <andrew@...n.ch>,
"Jakub Kicinski" <kuba@...nel.org>,
Ido Schimmel <idosch@...sch.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
Jiri Pirko <jiri@...dia.com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
mlxsw <mlxsw@...dia.com>, Ido Schimmel <idosch@...dia.com>,
"johannes@...solutions.net" <johannes@...solutions.net>
Subject: RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI
with lanes
> -----Original Message-----
> From: Michal Kubecek <mkubecek@...e.cz>
> Sent: Thursday, November 26, 2020 11:08 PM
> To: Danielle Ratson <danieller@...dia.com>
> Cc: Jiri Pirko <jiri@...nulli.us>; Andrew Lunn <andrew@...n.ch>; Jakub Kicinski <kuba@...nel.org>; Ido Schimmel
> <idosch@...sch.org>; netdev@...r.kernel.org; davem@...emloft.net; Jiri Pirko <jiri@...dia.com>; f.fainelli@...il.com; mlxsw
> <mlxsw@...dia.com>; Ido Schimmel <idosch@...dia.com>; johannes@...solutions.net
> Subject: Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes
>
> On Wed, Nov 25, 2020 at 10:35:35AM +0000, Danielle Ratson wrote:
> > > > What do you think of passing the link modes you have suggested as
> > > > a bitmask, similar to "supported", that contains only one positive bit?
> > > > Something like that:
> >
> > Hi Michal,
> >
> > Thanks for your response.
> >
> > Actually what I said is not very accurate.
> > In ethtool, for speed 100G and 4 lanes for example, there are few link modes that fits:
> > ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT
> > ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT
> > ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT
> > ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT
> >
> > The difference is the media. And in the driver we shrink into one bit.
> > But maybe that makes passing a bitmask more sense, or am I missing something?
>
> But as far as I understand, at any moment, only one of these will be actually in use so that's what the driver should report. Or is the
> problem that the driver cannot identify the media in use? (To be
> precise: by "cannot identify" I mean "it's not possible for the driver to find out", not "current code does not distinguish".)
>
> Michal
After more investigation, those are my conclusions:
We have two types of supported asics in the driver- one of them is able to distinguish between the medias and the other one doesn't.
So in the first type I can send one bit as you requested from the driver to ethtool but in the other one I can't.
The suggestions I have are:
1. Add a bit that for unknown media for each link (something like ETHTOOL_LINK_MODE_100000unknown_Full_BIT). I am not sure it is even possible or makes sense.
2. Pass the link mode as bitmap.
Do you see any other option?
Thanks.
Powered by blists - more mailing lists