Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3440306imj; Tue, 19 Feb 2019 03:37:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IYyEH5uzPL3/6M/Z0QBW/LjpIVLHKyX0WQNrzUbxMJwX9AGCf/7IiATZ9flW/R780i4+iWV X-Received: by 2002:a17:902:6949:: with SMTP id k9mr30532300plt.85.1550576268843; Tue, 19 Feb 2019 03:37:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550576268; cv=none; d=google.com; s=arc-20160816; b=z37A7ottqGgSEkb/DUgdFy2C56OcNnk/y8KV2Tbrz2vY+6+J7LNCNf7kRj2HMZvd0I W1QXnQJ8n8MMuxCosBQMFufIZGHRYrqCMb/YSjyg5Aso695pOVkjqHVwyMR30n/1qTh9 86mpRdC77g8Xqegj3MEJNclisVA6jFEDKnrZK/SW/zMzzM5uhbtGk4pDPXTI2z5fqT/k 8bYNEriJo23LAKXZFOhkJMOS/IOD+48xR5Ldjhxphau1U2XmYsBxKgQPRoCBhhnCSn8/ fCZ8NyEzuc9YSxV1CxUj8y9XJHPUTuiYEhu4MZgUd7C+BJedF4aTgSwuaUsjSQTu71jg xMag== 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=EtkqsTc2YyYJpcn/BZtw1EixUyWJOGdy9E3aJoV+XJQ=; b=K01l+gB26ZADPezTAcL7RnjwcoVKF+a8xMdEQB5wD6nQlkaXkcuYylTzAYPUuGQ+H5 P1QpEv3DuxBaRiFFzh2N/mIvT3pTrJc+WkGt7pj/ZNYalAK1FIED/FiUAEBDX0ZU1Q+M 4FjiKicoDzF4wCtmvuYX0F5ylfMTea1It89BvQ65dsH70Ha9sLVczYYSw1TNKBFmwWlO 56tCZrrJ8aRELV5oyy0KPiH9o7mDdahHx2qTwGShb844WbZJL5JYxwNsRTtpE4qVTTMN YHYAzPZQAQ1UWDug7aDNHqOpOQJxz23zytV1JCN0wnEghdHuo5YlgZQT70bH16EpWNsp O3xg== 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 a8si15220160pgi.359.2019.02.19.03.37.33; Tue, 19 Feb 2019 03:37:48 -0800 (PST) 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 S1728049AbfBSLgg (ORCPT + 99 others); Tue, 19 Feb 2019 06:36:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:37634 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727777AbfBSLgf (ORCPT ); Tue, 19 Feb 2019 06:36:35 -0500 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 3ECD8AD8F; Tue, 19 Feb 2019 11:36:34 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 9A298E0122; Tue, 19 Feb 2019 12:36:32 +0100 (CET) Date: Tue, 19 Feb 2019 12:36:32 +0100 From: Michal Kubecek To: Jiri Pirko Cc: netdev@vger.kernel.org, David Miller , Andrew Lunn , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH net-next v3 12/21] ethtool: provide permanent hardware address in GET_INFO request Message-ID: <20190219113632.GD23151@unicorn.suse.cz> References: <4e5879e36289c526dc79db37e55e5fc7d89d15fe.1550513384.git.mkubecek@suse.cz> <20190219102400.GC3080@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190219102400.GC3080@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 Tue, Feb 19, 2019 at 11:24:00AM +0100, Jiri Pirko wrote: > Mon, Feb 18, 2019 at 07:22:24PM CET, mkubecek@suse.cz wrote: > >Add information about permanent hadware address of a device (as provided by > >ETHTOOL_GPERMADDR ioctl command) in GET_INFO reply if ETH_INFO_IM_PERMADDR > >flag is set in the request. > > > >There is no separate attribute for hardware address length as nla_len gives > >this information. The reply also provides address type (net_device::type). > > > >Signed-off-by: Michal Kubecek > >--- > > Documentation/networking/ethtool-netlink.txt | 9 ++++- > > include/uapi/linux/ethtool_netlink.h | 12 +++++- > > net/ethtool/info.c | 39 ++++++++++++++++++++ > > 3 files changed, 58 insertions(+), 2 deletions(-) > > > >diff --git a/Documentation/networking/ethtool-netlink.txt b/Documentation/networking/ethtool-netlink.txt > >index b6999a2167e8..1e615e111262 100644 > >--- a/Documentation/networking/ethtool-netlink.txt > >+++ b/Documentation/networking/ethtool-netlink.txt > >@@ -239,6 +239,9 @@ Kernel response contents: > > ETHA_DRVINFO_FWVERSION (string) firmware version > > ETHA_DRVINFO_BUSINFO (string) device bus address > > ETHA_DRVINFO_EROM_VER (string) expansion ROM version > >+ ETHA_INFO_PERMADDR (nested) > >+ ETHA_PERMADDR_ADDRESS (binary) permanent HW address > > I think this is a nice example of thing that should not be exposed with > ethtool but rather via rtnetlink, alongside with the actual hw address. > > [...] I guess you are right. As we don't have to query the driver and just read the information from struct net_device, rtnetlink does indeed seem more appropriate. Michal