From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel RAYNAL Subject: Re: [PATCH net-next v2] net: mvpp2: add ethtool GOP statistics Date: Mon, 6 Nov 2017 22:02:30 +0100 Message-ID: <20171106220230.2081aceb@xps13> References: <20171103110425.16097-1-miquel.raynal@free-electrons.com> <20171103151906.GQ24320@lunn.ch> <20171106110653.034009ad@xps13> <20171106142534.GC24822@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: "David S . Miller" , Thomas Petazzoni , Antoine Tenart , Gregory Clement , Nadav Haklai , netdev@vger.kernel.org, Stefan Chulski , Florian Fainelli To: Andrew Lunn Return-path: Received: from mail.free-electrons.com ([62.4.15.54]:54429 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbdKFVCf (ORCPT ); Mon, 6 Nov 2017 16:02:35 -0500 In-Reply-To: <20171106142534.GC24822@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: Hi Andrew, > > Here I do have a problem: I choose the IDA solution because it was > > quite straightforward but I agree it would be better to use an > > unique name. Unfortunately, on the Armada-8040-DB that instantiate > > this driver twice, the node name is not unique. There are two CP > > (master and slave) and both names are "ethernet@0". Otherwise, if I > > use the full path, I get something like > > "/cp110-master/config-space@f2000000/ethernet@0" and > > "/cp110-slave/config-space@f4000000/ethernet@0" but the problem is > > that workqueue names are truncated to 24 characters and only 15 > > appears in ps, so it would not solve the issue and choosing the > > "parent parent node name" would work here but does not scale very > > well. Do you have any idea to get this right? > > Hi Miquel > > You could move the starting of the thread into mvpp2_port_probe(). If > you do it after register_netdev(dev), you can use netdev_name(dev). > > Andrew There is one workqueue per instance of the driver, not per port. Hence, I choose to use the netdev_name() (short) with a '+' after it if there are other ports involved, ie. "stats-wq-eth0+" and "stats-wq-eth2+". Thanks for your help, Miquèl