From: Andrew Lunn Subject: Re: [RFC PATCH net-next v2 09/17] ethtool: implement GET_DRVINFO message Date: Mon, 30 Jul 2018 17:48:03 +0200 Message-ID: <20180730154803.GB2983@lunn.ch> References: <4dcd60f25efe368ada4e0c035dc1d7612ab59132.1532953989.git.mkubecek@suse.cz> <20180730142825.GL13198@lunn.ch> <20180730144644.r3utyf4toqkjcxwd@unicorn.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Pirko , David Miller , Florian Fainelli , Roopa Prabhu , Jakub Kicinski , "John W. Linville" To: Michal Kubecek Return-path: Content-Disposition: inline In-Reply-To: <20180730144644.r3utyf4toqkjcxwd@unicorn.suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > 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