From 5d4ecfe153434ffae3bf9858b870eafc70e55ccf Mon Sep 17 00:00:00 2001
From: Michal Kubecek <mkubecek@suse.cz>
Date: Mon, 19 Oct 2020 23:32:49 +0200
Subject: [PATCH 37/37] 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@suse.cz>
(cherry picked from commit 9922adcbb4383c50eb8d0046f283873b999b40ba)
---
netlink/desc-ethtool.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c
index 54f057915d6d..8dd4a91ad0d7 100644
--- a/netlink/desc-ethtool.c
+++ b/netlink/desc-ethtool.c
@@ -178,12 +178,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.26.2