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