Re: [RFC PATCH net-next v2 09/17] ethtool: implement GET_DRVINFO message

From: Andrew Lunn
Date: Mon Jul 30 2018 - 11:48:11 EST


> This is interesting. It would mean current (ioctl) ethtool approach with
> string set may not work correctly either.

Hi Michal

For the statistics, it is a bit of a corner case. One of the Ethernet
switches in DSA can have two different PHYs linked to one MAC. One PHY
is built in, the second is connected via a SERDES interface. Which
every gets link first is used. However, the SERDES interface has
additional statistics counters. So if the SERDES is in use, we return
more statistics. If somebody was to plug in the cable at just the
wrong/right time, the count of statistics could be different to the
number of statistics.

Another corner case i can think of. Some drivers return statistics per
queue. And there is an ioctl to change the number of queues....

I could also imaging tests being similar. There are more loopback
tests you can do with a SERDES which you cannot do with a built in
PHY. But so far, i've not seen anything like that.

Andrew