]> git.itanic.dy.fi Git - linux-stable/commit
ethtool: pause: make sure we init driver stats
authorJakub Kicinski <kuba@kernel.org>
Wed, 14 Apr 2021 03:46:14 +0000 (20:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:13:26 +0000 (13:13 +0200)
commit82aa7596eec035446c51205d4de5f00fe629f528
tree5a3bc20fe3cc01a9e97760231432a255c622083b
parent3f4b85c3cac6b39bbc6da921d9afee7daaaee3b6
ethtool: pause: make sure we init driver stats

commit 16756d3e77ad58cd07e36cbed724aa13ae5a0278 upstream.

The intention was for pause statistics to not be reported
when driver does not have the relevant callback (only
report an empty netlink nest). What happens currently
we report all 0s instead. Make sure statistics are
initialized to "not set" (which is -1) so the dumping
code skips them.

Fixes: 9a27a33027f2 ("ethtool: add standard pause stats")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ethtool/pause.c