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