ethtool: pause: make sure we init driver stats
authorJakub Kicinski <kuba@kernel.org>
Wed, 14 Apr 2021 03:46:14 +0000 (20:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Apr 2021 20:03:06 +0000 (13:03 -0700)
commit16756d3e77ad58cd07e36cbed724aa13ae5a0278
treec9ba1c42ab61d04ca305e747e0d86d562272753a
parent2afeec08ab5c86ae21952151f726bfe184f6b23d
ethtool: pause: make sure we init driver stats

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>
net/ethtool/pause.c