Received: by 2002:ac0:ec82:0:0:0:0:0 with SMTP id x2csp3738imt; Wed, 27 Mar 2019 15:27:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVdFdjw/hY6mhxe0PxwYS76vC0MgsbzsWiXFiD3Pp0YeR3TO2qc9R5qUQKr1/V3XN/Ue3x X-Received: by 2002:a62:ab12:: with SMTP id p18mr25227073pff.216.1553725669172; Wed, 27 Mar 2019 15:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553725669; cv=none; d=google.com; s=arc-20160816; b=VRvPYtrYzcT35HVOnCr4kpbTvgdfcGBsKGUGdPP3RqFaFhq46lwavje4VR3TLcc0yL Ku6KXz4Vr3Tn47HdmyK4OBz8j5aw1cT+SegI9nw/A4ftMlISXhhgeQ9OZBu/iqIe1iZy M+tP3miWTu99tTk/u6SOYuz8aXRWIJ/RaWBjM5MPDlVRnaXrndv+O1/W8e7CVBzchEr0 wUPRKSLmTosXzM9Up49GpHtVJfiJDfKNCerFfcp4u5OIo7gguemAHoE0N7kHPl8kbD3A JuvYX3ccfMmdg7P0gy+LnNQ2jn9D6T37hTcjH13JGCY2MiO7uL447FbAg5B02lsdJcBe EUJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=e8jN9yFB9iUMDcsP0ZXsz1feHzW1hEPz7H6s+fc44UM=; b=xgo5uDfSNJfbmDcSbCK8VxNI9lLGrihIwe+PSUyEypGeq2llXsVnjSINZIT/+BB/nS je3oZFmXmJPG03sQYoe4I6T3DXSqt5KEo+/oNlzX5Lf+IwnjFmgULkl9+7lBSdw3Pgb2 Cm6GTSB/eLZd8kLNVOii6tL+FqQU75NmtmFoPu3WuoFrvcetwmaYr+qVgWGMtHOx2l/j 3Ke4lcM+O9PlS2OuKUPyVwh3UR1UTonnPiWMOAFvhl5Xf7KxWA7XOt/6cikOh8UEAgrz gnUVKyt7n0dPoDiQobtAmVePx22Zolz8IGJxD1lUj7gGYeDJGNqnmNbL0NhNxMi6VyHL 2umQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z72si9773351pgd.401.2019.03.27.15.27.32; Wed, 27 Mar 2019 15:27:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729547AbfC0WZ6 (ORCPT + 99 others); Wed, 27 Mar 2019 18:25:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:33564 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727848AbfC0WZ5 (ORCPT ); Wed, 27 Mar 2019 18:25:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6F3BAAD38; Wed, 27 Mar 2019 22:25:55 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id C9A87E1404; Wed, 27 Mar 2019 23:25:54 +0100 (CET) Date: Wed, 27 Mar 2019 23:25:54 +0100 From: Michal Kubecek To: Jiri Pirko Cc: David Miller , netdev@vger.kernel.org, Jakub Kicinski , Andrew Lunn , Florian Fainelli , John Linville , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 13/22] ethtool: provide driver/device information in GET_INFO request Message-ID: <20190327222554.GV26076@unicorn.suse.cz> References: <20190327201411.GH14297@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190327201411.GH14297@nanopsycho> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 27, 2019 at 09:14:11PM +0100, Jiri Pirko wrote: > Mon, Mar 25, 2019 at 06:08:33PM CET, mkubecek@suse.cz wrote: > >+ > >+Kernel response contents: > >+ > >+ ETHA_INFO_DEV (nested) device identification > >+ ETHA_INFO_DRVINFO (nested) driver information > >+ ETHA_DRVINFO_DRIVER (string) driver name > >+ ETHA_DRVINFO_FWVERSION (string) firmware version > >+ ETHA_DRVINFO_BUSINFO (string) device bus address > >+ ETHA_DRVINFO_EROM_VER (string) expansion ROM version > > These are already very nicely supported in devlink. No need to duplicate > here. They are supported by devlink as an interface. But devlink itself is only supported by few NIC drivers at the moment: mike@unicorn:~/work/git/net-next> grep -r devlink_ops drivers/net/ drivers/net/ethernet/mellanox/mlx4/main.c:static const struct devlink_ops mlx4_devlink_ops = { drivers/net/ethernet/mellanox/mlx4/main.c: devlink = devlink_alloc(&mlx4_devlink_ops, sizeof(*priv)); drivers/net/ethernet/mellanox/mlxsw/core.c:static const struct devlink_ops mlxsw_devlink_ops = { drivers/net/ethernet/mellanox/mlxsw/core.c: devlink = devlink_alloc(&mlxsw_devlink_ops, alloc_size); drivers/net/ethernet/mellanox/mlx5/core/main.c:static const struct devlink_ops mlx5_devlink_ops = { drivers/net/ethernet/mellanox/mlx5/core/main.c: devlink = devlink_alloc(&mlx5_devlink_ops, sizeof(*dev)); drivers/net/ethernet/cavium/liquidio/lio_main.c:static const struct devlink_ops liquidio_devlink_ops = { drivers/net/ethernet/cavium/liquidio/lio_main.c: devlink = devlink_alloc(&liquidio_devlink_ops, drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:static const struct devlink_ops bnxt_dl_ops = { drivers/net/ethernet/netronome/nfp/nfp_main.c: devlink = devlink_alloc(&nfp_devlink_ops, sizeof(*pf)); drivers/net/ethernet/netronome/nfp/nfp_main.h:extern const struct devlink_ops nfp_devlink_ops; drivers/net/ethernet/netronome/nfp/nfp_devlink.c:const struct devlink_ops nfp_devlink_ops = { drivers/net/netdevsim/devlink.c:static const struct devlink_ops nsim_devlink_ops = { drivers/net/netdevsim/devlink.c: devlink = devlink_alloc(&nsim_devlink_ops, 0); That's 6 drivers from 4 vendors (if I don't count netdevsim). And I did not check if all of them do actually provide the information shown above. On the other hand: mike@unicorn:~/work/git/net-next> egrep -r '\.get_drvinfo' drivers/net/ | wc -l 240 Some of these 240 lines assign the same handler but not enough to make me optimistic about being able to implement "ethtool -i " using devlink interface in near future (say few months or one year). I'm all for implementing new features which are are related to physical device (ASIC) rather than network interface only in devlink (at the level of kernel-userspace interface). But for features already provided by ethtool (userspace utility) I can't help seeing the state of devlink support in NIC drivers as a serious blocker. Michal