kernel_optimize_test/net/ethtool
Jakub Kicinski 628773a759 ethtool: fix ethtool msg len calculation for pause stats
[ Upstream commit 1aabe578dd86e9f2867c4db4fba9a15f4ba1825d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 14:04:25 +01:00
..
bitset.c
bitset.h
cabletest.c
channels.c
coalesce.c
common.c
common.h
debug.c
eee.c
features.c
ioctl.c ethtool: Fix rxnfc copy to user buffer overflow 2021-09-22 12:27:56 +02:00
linkinfo.c
linkmodes.c
linkstate.c
Makefile
netlink.c ethtool: fix missing NLM_F_MULTI flag when dumping 2021-05-19 10:13:08 +02:00
netlink.h
pause.c ethtool: fix ethtool msg len calculation for pause stats 2021-11-18 14:04:25 +01:00
privflags.c
rings.c
strset.c ethtool: strset: fix message length calculation 2021-06-23 14:42:45 +02:00
tsinfo.c
tunnels.c
wol.c