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: <1e3546d7f774db109f77c465e3d1f838ab7d169d.1603142897.git.mkubecek@suse.cz>
Date:   Mon, 19 Oct 2020 23:32:49 +0200 (CEST)
From:   Michal Kubecek <mkubecek@...e.cz>
To:     netdev@...r.kernel.org
Cc:     Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH ethtool 4/4] netlink: add message descriptions for pause stats

Add message descriptions for pretty printing of new attributes used for pause
statistics.

Signed-off-by: Michal Kubecek <mkubecek@...e.cz>
---
 netlink/desc-ethtool.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c
index ee8fc4796987..96291b9bdd3b 100644
--- a/netlink/desc-ethtool.c
+++ b/netlink/desc-ethtool.c
@@ -180,12 +180,19 @@ static const struct pretty_nla_desc __coalesce_desc[] = {
 	NLATTR_DESC_U32(ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL),
 };
 
+static const struct pretty_nla_desc __pause_stats_desc[] = {
+	NLATTR_DESC_BINARY(ETHTOOL_A_PAUSE_STAT_PAD),
+	NLATTR_DESC_U64(ETHTOOL_A_PAUSE_STAT_TX_FRAMES),
+	NLATTR_DESC_U64(ETHTOOL_A_PAUSE_STAT_RX_FRAMES),
+};
+
 static const struct pretty_nla_desc __pause_desc[] = {
 	NLATTR_DESC_INVALID(ETHTOOL_A_PAUSE_UNSPEC),
 	NLATTR_DESC_NESTED(ETHTOOL_A_PAUSE_HEADER, header),
 	NLATTR_DESC_BOOL(ETHTOOL_A_PAUSE_AUTONEG),
 	NLATTR_DESC_BOOL(ETHTOOL_A_PAUSE_RX),
 	NLATTR_DESC_BOOL(ETHTOOL_A_PAUSE_TX),
+	NLATTR_DESC_NESTED(ETHTOOL_A_PAUSE_STATS, pause_stats),
 };
 
 static const struct pretty_nla_desc __eee_desc[] = {
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ