Re: [RFC PATCH net-next v3 12/21] ethtool: provide permanent hardware address in GET_INFO request

From: Jiri Pirko
Date: Tue Feb 19 2019 - 05:33:40 EST


Mon, Feb 18, 2019 at 07:22:24PM CET, mkubecek@xxxxxxx 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 <mkubecek@xxxxxxx>
>---
> 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.

[...]