Thread (45 messages) 45 messages, 8 authors, 2020-12-02

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

From: Edwin Peer <hidden>
Date: 2020-12-02 01:18:53

On Tue, Dec 1, 2020 at 9:23 AM Danielle Ratson [off-list ref] 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

Attachments

  • smime.p7s [application/pkcs7-signature] 4160 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help