[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200630163856.si5vs7ejikdzbb4y@lion.mk-sys.cz>
Date: Tue, 30 Jun 2020 18:38:56 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Amit Cohen <amitc@...lanox.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
o.rempel@...gutronix.de, andrew@...n.ch, f.fainelli@...il.com,
jacob.e.keller@...el.com, mlxsw@...lanox.com
Subject: Re: [PATCH ethtool 1/3] netlink: expand ETHTOOL_LINKSTATE with
extended state attributes
On Tue, Jun 30, 2020 at 12:24:10PM +0300, Amit Cohen wrote:
> Add ETHTOOL_A_LINKSTATE_EXT_STATE to expose general extended state.
>
> Add ETHTOOL_A_LINKSTATE_EXT_SUBSTATE to expose more information in
> addition to the extended state.
>
> Signed-off-by: Amit Cohen <amitc@...lanox.com>
> ---
> netlink/desc-ethtool.c | 2 ++
> uapi/linux/ethtool_netlink.h | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c
> index 98b898e..bce22e2 100644
> --- a/netlink/desc-ethtool.c
> +++ b/netlink/desc-ethtool.c
> @@ -95,6 +95,8 @@ static const struct pretty_nla_desc __linkstate_desc[] = {
> NLATTR_DESC_BOOL(ETHTOOL_A_LINKSTATE_LINK),
> NLATTR_DESC_U32(ETHTOOL_A_LINKSTATE_SQI),
> NLATTR_DESC_U32(ETHTOOL_A_LINKSTATE_SQI_MAX),
> + NLATTR_DESC_U8(ETHTOOL_A_LINKSTATE_EXT_STATE),
> + NLATTR_DESC_U8(ETHTOOL_A_LINKSTATE_EXT_SUBSTATE),
> };
>
> static const struct pretty_nla_desc __debug_desc[] = {
> diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h
> index b18e7bc..0922ca6 100644
> --- a/uapi/linux/ethtool_netlink.h
> +++ b/uapi/linux/ethtool_netlink.h
> @@ -236,6 +236,8 @@ enum {
> ETHTOOL_A_LINKSTATE_LINK, /* u8 */
> ETHTOOL_A_LINKSTATE_SQI, /* u32 */
> ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */
> + ETHTOOL_A_LINKSTATE_EXT_STATE, /* u8 */
> + ETHTOOL_A_LINKSTATE_EXT_SUBSTATE, /* u8 */
>
> /* add new constants above here */
> __ETHTOOL_A_LINKSTATE_CNT,
Please do not mix uapi header updates with other changes. Once the
kernel counterpart is in net-next, update all headers in uapi/ to
a net-next snapshot as described at
https://www.kernel.org/pub/software/network/ethtool/devel.html
and use that as first commit of your series.
Michal
Powered by blists - more mailing lists