From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Kubecek Subject: Re: [RFC net-next 0/6] devlink: add device (driver) information API Date: Tue, 15 Jan 2019 08:36:47 +0100 Message-ID: <20190115073647.GC26670@unicorn.suse.cz> References: <20190115005009.16025-1-jakub.kicinski@netronome.com> <20190115011859.GA8882@lunn.ch> <20190114173306.3d8037cd@cakuba.netronome.com> <20190115015755.GE8882@lunn.ch> <20190114192734.47c25589@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Lunn , davem@davemloft.net, netdev@vger.kernel.org, oss-drivers@netronome.com, jiri@resnulli.us To: Jakub Kicinski Return-path: Received: from mx2.suse.de ([195.135.220.15]:41204 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726886AbfAOHgt (ORCPT ); Tue, 15 Jan 2019 02:36:49 -0500 Content-Disposition: inline In-Reply-To: <20190114192734.47c25589@cakuba.netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Jan 14, 2019 at 07:27:34PM -0800, Jakub Kicinski wrote: > On Tue, 15 Jan 2019 02:57:55 +0100, Andrew Lunn wrote: > > > > Using that argument, you should probably make the devlink core call > > the ethtool .get_drvinfo op if the device does not implement the > > devlink op. > > Could it possibly be done in user space? Have iproute2/devlink call old > ethtool API on first netdev associated with one of the ports? I suppose it could, as long as there is an interface to find the corresponding netdev name (or ifindex). Some time ago I tried to find a way to get a devlink handle for a given net device and I couldn't find any straightforward way even in kernel. (I needed the opposite direction as I was investigating the options for implementing ethtool dump/flash commands using devlink regions.) Michal Kubecek