lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200630092412.11432-2-amitc@mellanox.com>
Date:   Tue, 30 Jun 2020 12:24:10 +0300
From:   Amit Cohen <amitc@...lanox.com>
To:     netdev@...r.kernel.org
Cc:     mkubecek@...e.cz, davem@...emloft.net, o.rempel@...gutronix.de,
        andrew@...n.ch, f.fainelli@...il.com, jacob.e.keller@...el.com,
        mlxsw@...lanox.com, Amit Cohen <amitc@...lanox.com>
Subject: [PATCH ethtool 1/3] netlink: expand ETHTOOL_LINKSTATE with extended state attributes

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,
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ