From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next] net: phy: add GBit master / slave error detection Date: Thu, 19 Jul 2018 23:45:42 +0200 Message-ID: <20180719214542.GE12150@lunn.ch> References: <60685308-a848-e4d0-e170-f2738f046679@gmail.com> <8ccaeb57-3150-65ce-2310-3aac52f446c5@gmail.com> <20180719144637.GA9119@lunn.ch> <048869a5-7fbe-f68d-8d9c-123b2ac38bd5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" To: Heiner Kallweit Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:40578 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727721AbeGSWaq (ORCPT ); Thu, 19 Jul 2018 18:30:46 -0400 Content-Disposition: inline In-Reply-To: <048869a5-7fbe-f68d-8d9c-123b2ac38bd5@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Jul 19, 2018 at 11:11:53PM +0200, Heiner Kallweit wrote: > On 19.07.2018 16:46, Andrew Lunn wrote: > >>> AFAIR there was a patch a while ago from Mellanox guys that was possibly > >>> extending the link notification with an error cause, this sounds like > >>> something that could be useful to report to user space somehow to help > >>> troubleshoot link down events. > >>> > >> Do you by chance have a reference to this patch? There's heavy development > >> on the Mellanox drivers with a lot of patches. > > > > Hi Heiner, Florian > > > > A general mechanism has been added to allow error messages to be > > reported via netlink sockets. I think wifi was the first to actually > > make use of it, since i think Johannes Berg did the core work, but > > other parts of the stack have also started using it. > > > I think you mean the devlink interface. devlink uses netlink, so it can use these extended error message. But all forms of netlink sockets can use this. What Florian might be referring to, is that when netif_carrier_off() or netif_carrier_on() is called, a netlink message is sent to userspace. Tools link ip monitor can be used to display these events. I think Florian is suggesting a more detailed message could be display about master/slave issues. However, how you get that information to rtnl_fill_ifinfo() i don't know. Andrew