Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3385350imj; Tue, 19 Feb 2019 02:34:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IZltGqAqn7sMLXxV+AGM3c1IeE4WPdDF99L3/Tcj6w5S5J2UqSqY3nOOGvmmtPA5aVSUaVV X-Received: by 2002:a63:fa10:: with SMTP id y16mr22498865pgh.88.1550572480728; Tue, 19 Feb 2019 02:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550572480; cv=none; d=google.com; s=arc-20160816; b=TlnVOmzynmfpyMX96KUYDA5B+2Q/AfoXdYUCQENDHIgGDSdirnLhN54BnTvNYsBqfQ Iy9i3XCN5iC4iHbcjdM0mYz40sEGKxxKwBzf+sF5Psa79+LNvXvdgy38hP0ewbgT1Co1 tJ7n6xjnIkie7P6y4zVIpCcFOrwO+J4HaBmj/9tDfVeNm8mGTUZDNVzCeHwMwXKYN496 l/vw2CNnoyb9iqOpbYg1Kd5JUdKaSbUyiw8pZsX83VB+wpkJsv0h8Vu6pl6aKU8CrV84 x2KMWB++0nuv/JNDYjOxCLltaXB4H6xfxoplE4V75ehp1ToSyBbj/G6hCK6TVJeUMmUF /FNQ== 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:dkim-signature; bh=XQDyHqOvUcj4FAsXSdC/kmRv0ETWzYOwOSqV3VOHxjk=; b=ijN1znLuHFuj+7Pl7AixeYabC8qfUmAMS1sA/VwbVwvli/0fe22lmmsCs1RTln+CzY OYBGWXGj8QkmaAFRCoObH18kK+ze/+50uAoBjMvoeiuhvZzvDp5+Lfpb7+fGT0ZKxPP9 ksZtkwyCrHyX8D+Vl/dYe3XZbnsPyNEoiwulzau6bdvczeCc+cUJKHwGspbBL1VRumYk 373rF26+iKy45AQ1BZS+AFgL0YJXQswSmtvvrRuRQpWGi0VJ5uirWFKcfedlFJtzO5uA bcAILzkNeG+8tccBNt7l6Tz56cZe0CnV24zXOiRERq2JZ2B73Cb9tx2t1bD2dTkoJy6J a4rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=EWxaB6sv; 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 w10si11436416pgj.214.2019.02.19.02.34.25; Tue, 19 Feb 2019 02:34:40 -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; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=EWxaB6sv; 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 S1728318AbfBSKdi (ORCPT + 99 others); Tue, 19 Feb 2019 05:33:38 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41465 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728644AbfBSKdh (ORCPT ); Tue, 19 Feb 2019 05:33:37 -0500 Received: by mail-wr1-f65.google.com with SMTP id n2so9418953wrw.8 for ; Tue, 19 Feb 2019 02:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XQDyHqOvUcj4FAsXSdC/kmRv0ETWzYOwOSqV3VOHxjk=; b=EWxaB6svBcGce8egr76tIBw/782BQMLvjnzkjOjg4yc44l+vYRPgz7zAEd44nga+aF sZ4w7Ahsx+HzE7jWtnAaXvFz0lxhB/YTA2Z5i4ZDezSoBcvNXjcACED1bD8ZUW58AFc/ sG1CeoPMFlNAXXegui3D4QqD9+mFIcpzwxx4VCQgNulNg2K51Eqt41XaDXwimO+u7mIe G0uYnEFZPY8aqdpqmxxJ09240qunyKMOxwyKH6tp7pgyUAoAe14osiblCaNrOd0DQtxd iuAlQA1lVGlYcaaQun7L7erF6Fr7EAaSxY050XkHNxrQsd7zo14Zo5jUNIApGT1xLROO dusA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XQDyHqOvUcj4FAsXSdC/kmRv0ETWzYOwOSqV3VOHxjk=; b=pxy9nXoC8zdyAn8WuVHRF1jQGzHmbJ/DfCCxzAdp5xcn2JIOc/UYaPpchkS8pbomH2 jBkeja+3cEf7MPtnPddvGffcL3f16SQyo/+AHKnUekotYnHeKwGUyULY/NTRECy07MxO VqEFl/1fhD1r7DkoIuNlfUU/smp+cR1W/c5Zwb3DIqlzCtAVSdteJvN7zHezTQWEHwS9 UmReLC7i/KLmi2ghml5UvG7eOyf6zOYete+CEX979OWpcL3oicc8CNyPP85e3kmz3iAq uUa5xEw1o7f+tjM8X8NVfBuj6SrIFKP4rNMPxSnZ298bJkR6eO6fUWl7mKK7LE0D8PK4 3cIg== X-Gm-Message-State: AHQUAub4egSPoGA3bXc/QlT5THJOl6HSRpPP5x46qK76IvRLt70Hd+4g ODzSHIs12J5QU90Gl2Aqx5q11w== X-Received: by 2002:adf:fa51:: with SMTP id y17mr21117866wrr.233.1550572415627; Tue, 19 Feb 2019 02:33:35 -0800 (PST) Received: from localhost (ip-213-220-234-21.net.upcbroadband.cz. [213.220.234.21]) by smtp.gmail.com with ESMTPSA id j15sm12624481wrt.1.2019.02.19.02.33.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 02:33:35 -0800 (PST) Date: Tue, 19 Feb 2019 11:24:00 +0100 From: Jiri Pirko To: Michal Kubecek 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: <20190219102400.GC3080@nanopsycho> References: <4e5879e36289c526dc79db37e55e5fc7d89d15fe.1550513384.git.mkubecek@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e5879e36289c526dc79db37e55e5fc7d89d15fe.1550513384.git.mkubecek@suse.cz> 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 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. [...]