mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ethtool: fix ethtool msg len calculation for pause stats
ETHTOOL_A_PAUSE_STAT_MAX is the MAX attribute id,
so we need to subtract non-stats and add one to
get a count (IOW -2+1 == -1).
Otherwise we'll see:
ethnl cmd 21: calculated reply length 40, but consumed 52
Fixes: 9a27a33027
("ethtool: add standard pause stats")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9b65b17db7
commit
1aabe578dd
3 changed files with 7 additions and 3 deletions
|
@ -10,6 +10,9 @@
|
|||
#define __ETHTOOL_LINK_MODE_MASK_NWORDS \
|
||||
DIV_ROUND_UP(__ETHTOOL_LINK_MODE_MASK_NBITS, 32)
|
||||
|
||||
#define ETHTOOL_PAUSE_STAT_CNT (__ETHTOOL_A_PAUSE_STAT_CNT - \
|
||||
ETHTOOL_A_PAUSE_STAT_TX_FRAMES)
|
||||
|
||||
enum ethtool_multicast_groups {
|
||||
ETHNL_MCGRP_MONITOR,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue