On Tue, 2021-11-02 at 11:10 -0700, Jakub Kicinski wrote:
On Tue, 2 Nov 2021 16:08:52 +0000 Saeed Mahameed wrote:
quoted
quoted
...
quoted
maybe we need to separate stats from non-stats, or define
ETHTOOL_A_PAUSE_STAT_CNT where it needs to be defined.
Fair point, something like this?
LGTM
quoted hunk ↗ jump to hunk
+++ b/include/uapi/linux/ethtool_netlink.h
@@ -411,10 +411,14 @@ enum { ETHTOOL_A_PAUSE_STAT_TX_FRAMES,
ETHTOOL_A_PAUSE_STAT_RX_FRAMES,
- /* add new constants above here */
+ /* add new constants above here
+ * adjust ETHTOOL_PAUSE_STAT_CNT if adding non-stats!
+ */
__ETHTOOL_A_PAUSE_STAT_CNT,
ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1)
};
+#define ETHTOOL_PAUSE_STAT_CNT (__ETHTOOL_A_PAUSE_STAT_CNT -
\
+ ETHTOOL_A_PAUSE_STAT_TX_FRAMES)
/* EEE */