> OK, we will add API options to select bank and page to read any specific > page the user selects. So advanced user will use it get the optional pages > he needs, but what about non advanced user who wants to use the current API > with a current script for DSFP EEPROM. Isn't it better that he will get the > 5 mandatory pages then keep it not supported ?
Users using ethtool will not see a difference. They get a dump of what ethtool knows how to decode. It should try the netlink API first, and then fall back to the old ioctl interface. If i was implementing the ethtool side of it, i would probably do some sort of caching system. We know page 0 should always exist, so pre-load that into the cache. Try the netlink API first. If that fails, use the ioctl interface. If the ioctl is used, put everything returned into the cache. The decoder can then start decoding, see what bits are set indicating other pages should be available. Ask for them from the cache. The netlink API can go fetch them and load them into the cache. If they cannot be loaded return ENODEV, and the decoder has to skip what it wanted to decode. If you do it correctly, the decoder should not care about ioctl vs netlink. I can do a follow up patch for the generic SFP code in drivers/net/phy, once you have done the first implementation. But i only have a limited number of SFPs and most are 1G only. Russell King can hopefully test with his collection. Andrew