Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751666AbdISUFH (ORCPT ); Tue, 19 Sep 2017 16:05:07 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38036 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbdISUFC (ORCPT ); Tue, 19 Sep 2017 16:05:02 -0400 X-Google-Smtp-Source: AOwi7QDoYxf4PBCKjP+GDnGZ6iGzgQIJQRCZ5IrxSjDrfWOh1jrFzU5o9nTi0qtmPUZXYK8V1DIgdQ== Subject: Re: [PATCH net-next 0/4] net: dsa: move master ethtool code To: Vivien Didelot , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn References: <20170919155700.14474-1-vivien.didelot@savoirfairelinux.com> From: Florian Fainelli Message-ID: <80b8afa0-e269-c0b7-da4a-dcb604a239ca@gmail.com> Date: Tue, 19 Sep 2017 13:04:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170919155700.14474-1-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1695 Lines: 47 On 09/19/2017 08:56 AM, Vivien Didelot wrote: > The DSA core overrides the master device's ethtool_ops structure so that > it can inject statistics and such of its dedicated switch CPU port. > > This ethtool code is currently called on unnecessary conditions or > before the master interface and its switch CPU port get wired up. > This patchset fixes this. > > Similarly to slave.c where the DSA slave net_device is the entry point > of the dsa_slave_* functions, this patchset also isolates the master's > ethtool code in a new master.c file, where the DSA master net_device is > the entry point of the dsa_master_* functions. > > This is a first step towards better control of the master device and > support for multiple CPU ports. Tested-by: Florian Fainelli * ethtool -S eth0 -> switch port CPU stats are still correctly overlayed * ethtool -s gphy wol g -> both switch port and CPU port correctly enable WoL * ethtool -i eth0 -> driver still reports correct information Thanks! > > Vivien Didelot (4): > net: dsa: remove copy of master ethtool_ops > net: dsa: setup master ethtool unconditionally > net: dsa: setup master ethtool after dsa_ptr > net: dsa: move master ethtool code > > include/net/dsa.h | 1 - > net/dsa/Makefile | 2 +- > net/dsa/dsa.c | 28 ------------- > net/dsa/dsa2.c | 18 ++++---- > net/dsa/dsa_priv.h | 7 ++-- > net/dsa/legacy.c | 10 ++--- > net/dsa/master.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > net/dsa/slave.c | 80 ----------------------------------- > 8 files changed, 136 insertions(+), 130 deletions(-) > create mode 100644 net/dsa/master.c > -- Florian