[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKOOJTw90wcw=JZfXYGCrCK1GdxkRwgbjA5x5aKfBoE3GkW9jw@mail.gmail.com>
Date: Tue, 1 Dec 2020 17:17:33 -0800
From: Edwin Peer <edwin.peer@...adcom.com>
To: Danielle Ratson <danieller@...dia.com>
Cc: Michal Kubecek <mkubecek@...e.cz>, 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
On Tue, Dec 1, 2020 at 9:23 AM Danielle Ratson <danieller@...dia.com> wrote:
> 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?
Other options include:
1) Let the user specify link encoding directly, as we do for FEC. This would
imply the number of lanes used at a given speed rather than the other way
around. Then you only need a handful of indices in the enum.
2) Instead of an enum, encode the semantics into the link mode bit
representation. N bits define the speed. Other bits define the encoding,
number of lanes, media, etc. This would solve the problem of decoding the
intent from a single user selected link mode index, but would require a v2
UABI. The user could have the same strings, but not much more. And then,
it's probably better to give each dimension their own field in a struct and be
done, lest we run out of bits. Let the user space tool map the link mode
string onto the appropriate struct values.
Regards,
Edwin Peer
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4160 bytes)
Powered by blists - more mailing lists